Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAK-50500 LTI rename basiclti to lti #12902

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions assignment/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,16 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.sakaiproject.basiclti</groupId>
<artifactId>basiclti-api</artifactId>
<groupId>org.sakaiproject.lti</groupId>
<artifactId>lti-api</artifactId>
</dependency>
<dependency>
<groupId>org.sakaiproject.basiclti</groupId>
<artifactId>basiclti-util</artifactId>
<groupId>org.sakaiproject.lti</groupId>
<artifactId>lti-util</artifactId>
</dependency>
<dependency>
<groupId>org.sakaiproject.basiclti</groupId>
<artifactId>basiclti-common</artifactId>
<groupId>org.sakaiproject.lti</groupId>
<artifactId>lti-common</artifactId>
<version>${sakai.version}</version>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
import org.sakaiproject.authz.api.Member;
import org.sakaiproject.authz.api.SecurityAdvisor;
import org.sakaiproject.authz.api.SecurityService;
import org.sakaiproject.basiclti.util.SakaiBLTIUtil;
import org.sakaiproject.lti.util.SakaiLTIUtil;
import org.sakaiproject.calendar.api.Calendar;
import org.sakaiproject.calendar.api.CalendarEvent;
import org.sakaiproject.calendar.api.CalendarService;
Expand Down Expand Up @@ -4253,7 +4253,7 @@ public Map<String, String> transferCopyEntities(String fromContext, String toCon
// If there is a LTI launch associated with this copy it over
if ( oAssignment.getContentId() != null ) {
Long contentKey = oAssignment.getContentId().longValue();
Object retval = SakaiBLTIUtil.copyLTIContent(contentKey, toContext, fromContext);
Object retval = SakaiLTIUtil.copyLTIContent(contentKey, toContext, fromContext);
if ( retval instanceof Long ) {
nAssignment.setContentId(((Long) retval).intValue());
// If something went wrong, we can't be an LTI submission in the new site
Expand Down
12 changes: 6 additions & 6 deletions assignment/tool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,17 @@
<artifactId>sakai-velocity-tool</artifactId>
</dependency>
<dependency>
<groupId>org.sakaiproject.basiclti</groupId>
<artifactId>basiclti-api</artifactId>
<groupId>org.sakaiproject.lti</groupId>
<artifactId>lti-api</artifactId>
</dependency>
<dependency>
<groupId>org.sakaiproject.basiclti</groupId>
<artifactId>basiclti-common</artifactId>
<groupId>org.sakaiproject.lti</groupId>
<artifactId>lti-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.sakaiproject.basiclti</groupId>
<artifactId>basiclti-util</artifactId>
<groupId>org.sakaiproject.lti</groupId>
<artifactId>lti-util</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ private Map<String, Object> submissionToMap(Set<String> activeSubmitters, Assign
if ( content != null ) {
String contentItem = StringUtils.trimToEmpty((String) content.get(LTIService.LTI_CONTENTITEM));
// Instead of parsing, the JSON we just look for a simple existance of the submission review entry
// Delegate the complex understanding of the launch to SakaiBLTIUtil
// Delegate the complex understanding of the launch to SakaiLTIUtil
// TODO: Eventually, Sakai's LTIService will implement a submissionReview checkbox and we should check for that here
boolean submissionReviewAvailable = contentItem.indexOf("\"submissionReview\"") > 0;

Expand Down Expand Up @@ -1098,7 +1098,7 @@ public ActionReturn getGradableForSite(EntityView view , Map<String, Object> par
ltiSubmissionLaunch = "/access/lti/site/" + siteId + "/content:" + contentKey + "?for_user=" + submitter.get("id");

// Instead of parsing, the JSON we just look for a simple existance of the submission review entry
// Delegate the complex understanding of the launch to SakaiBLTIUtil
// Delegate the complex understanding of the launch to SakaiLTIUtil
if ( contentItem.indexOf("\"submissionReview\"") > 0 ) {
ltiSubmissionLaunch = ltiSubmissionLaunch + "&message_type=content_review";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
import org.sakaiproject.authz.api.Role;
import org.sakaiproject.authz.api.SecurityAdvisor;
import org.sakaiproject.authz.api.SecurityService;
import org.tsugi.basiclti.BasicLTIUtil;
import org.tsugi.lti.LTIUtil;
import org.tsugi.lti13.LTICustomVars;
import org.tsugi.lti13.DeepLinkResponse;
import org.tsugi.lti13.LTI13Util;
Expand Down Expand Up @@ -256,7 +256,7 @@
import org.sakaiproject.util.comparator.AlphaNumericComparator;
import org.sakaiproject.util.comparator.UserSortNameComparator;
import org.sakaiproject.lti.api.LTIService;
import org.sakaiproject.basiclti.util.SakaiBLTIUtil;
import org.sakaiproject.lti.util.SakaiLTIUtil;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;

Expand Down Expand Up @@ -1998,12 +1998,12 @@ private String build_view_external_tool_launch_context(VelocityPortlet portlet,
}

// Ignore the Content Item - use the value in the assignment if tool allows
context.put("newpage", Boolean.valueOf(SakaiBLTIUtil.getNewpage(tool, null, newpage)));
context.put("height",SakaiBLTIUtil.getFrameHeight(tool, content, "1200px"));
context.put("newpage", Boolean.valueOf(SakaiLTIUtil.getNewpage(tool, null, newpage)));
context.put("height",SakaiLTIUtil.getFrameHeight(tool, content, "1200px"));
context.put("browser-feature-allow", String.join(";", serverConfigurationService.getStrings("browser.feature.allow")));

// Copy title, description, and dates from Assignment to content if mis-match
int protect = SakaiBLTIUtil.getInt(content.get(LTIService.LTI_PROTECT));
int protect = SakaiLTIUtil.getInt(content.get(LTIService.LTI_PROTECT));
String assignmentTitle = StringUtils.trimToEmpty(assignment.getTitle());
String assignmentDesc = StringUtils.trimToEmpty(assignment.getInstructions());
Instant visibleDate = assignment.getVisibleDate();
Expand All @@ -2021,7 +2021,7 @@ private String build_view_external_tool_launch_context(VelocityPortlet portlet,
String placement_secret = StringUtils.trimToNull((String) content.get(LTIService.LTI_PLACEMENTSECRET));

String content_settings = (String) content.get(LTIService.LTI_SETTINGS);
JSONObject content_json = BasicLTIUtil.parseJSONObject(content_settings);
JSONObject content_json = LTIUtil.parseJSONObject(content_settings);
String contentVisibleDate = StringUtils.trimToEmpty((String) content_json.get(DeepLinkResponse.RESOURCELINK_AVAILABLE_STARTDATETIME));
String contentOpenDate = StringUtils.trimToEmpty((String) content_json.get(DeepLinkResponse.RESOURCELINK_SUBMISSION_STARTDATETIME));
String contentDueDate = StringUtils.trimToEmpty((String) content_json.get(DeepLinkResponse.RESOURCELINK_SUBMISSION_ENDDATETIME));
Expand All @@ -2045,7 +2045,7 @@ private String build_view_external_tool_launch_context(VelocityPortlet portlet,
content_json.put(LTIService.LTI_DESCRIPTION, assignmentDesc);
content_json.put(LTIService.LTI_PROTECT, new Integer(1));

// Copy assignment specific custom parameter substitutions to pass into SakaiBLTIUtil
// Copy assignment specific custom parameter substitutions to pass into SakaiLTIUtil
content_json.put(DeepLinkResponse.RESOURCELINK_AVAILABLE_STARTDATETIME, assignmentVisibleDate);
content_json.put(DeepLinkResponse.RESOURCELINK_SUBMISSION_STARTDATETIME, assignmentOpenDate);
content_json.put(DeepLinkResponse.RESOURCELINK_AVAILABLE_ENDDATETIME, assignmentDueDate);
Expand All @@ -2061,8 +2061,8 @@ private String build_view_external_tool_launch_context(VelocityPortlet portlet,
}

// Unlock this assignment for one launch...
String launch_code_key = SakaiBLTIUtil.getLaunchCodeKey(content);
String launch_code = SakaiBLTIUtil.getLaunchCode(content);
String launch_code_key = SakaiLTIUtil.getLaunchCodeKey(content);
String launch_code = SakaiLTIUtil.getLaunchCode(content);
if ( launch_code_key != null && launch_code != null ) {
Session session = sessionManager.getCurrentSession();
session.setAttribute(launch_code_key, launch_code);
Expand Down Expand Up @@ -3634,7 +3634,7 @@ protected void setAssignmentFormContext(SessionState state, Context context) {
}

Placement placement = toolManager.getCurrentPlacement();
// String contentReturn = SakaiBLTIUtil.getOurServerUrl() + "/portal/tool/" + placement.getId() +
// String contentReturn = SakaiLTIUtil.getOurServerUrl() + "/portal/tool/" + placement.getId() +
String contentReturn = serverConfigurationService.getToolUrl() + "/" + placement.getId()
+ "/sakai.lti.admin.helper.helper"
+ "?panel=AssignmentsMain"
Expand Down Expand Up @@ -10343,7 +10343,7 @@ public void doEdit_assignment(RunData data) {
Map<String, Object> tool = ltiService.getTool(toolKey, site.getId());
String toolTitle = (String) tool.get(LTIService.LTI_TITLE);
state.setAttribute(NEW_ASSIGNMENT_CONTENT_TITLE, toolTitle);
Long toolNewpage = SakaiBLTIUtil.getLong(tool.get(LTIService.LTI_NEWPAGE));
Long toolNewpage = SakaiLTIUtil.getLong(tool.get(LTIService.LTI_NEWPAGE));
state.setAttribute(NEW_ASSIGNMENT_CONTENT_TOOL_NEWPAGE, toolNewpage);
}
} catch(org.sakaiproject.exception.IdUnusedException e ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@
</div>
<div class="form-group row">
<div class="col-sm-6">
<a title="$tlang.getString('external.tool.find')" target="sakai-basiclti-admin-iframe" onclick="showExternalIframe(this.title, false);"
<a title="$tlang.getString('external.tool.find')" target="sakai-lti-admin-iframe" onclick="showExternalIframe(this.title, false);"
class="btn btn-primary" role="button"
href="$findExternalToolUrl">$tlang.getString('external.tool.find')</a>
</div>
Expand All @@ -598,7 +598,7 @@
</fieldset>
</div>
<div id="external-modal-iframe-div" style="display:none" tabindex="-1" role="dialog">
<iframe name="sakai-basiclti-admin-iframe" id="sakai-basiclti-admin-iframe" src="/library/image/sakai/spinner.gif" tabindex="0"></iframe>
<iframe name="sakai-lti-admin-iframe" id="sakai-lti-admin-iframe" src="/library/image/sakai/spinner.gif" tabindex="0"></iframe>
</div>
<style>
.ui-widget-overlay.ui-front {
Expand All @@ -617,25 +617,25 @@ function showExternalIframe(title, doreload) {
open: function() {
$("#external-modal-iframe-div").dialog("option", "width", modalDialogWidth());
$("#external-modal-iframe-div").dialog("option", "height", modalDialogHeight());
$('#sakai-basiclti-admin-iframe').attr('width', '100%');
$('#sakai-basiclti-admin-iframe').attr('height', '100%');
$('#sakai-lti-admin-iframe').attr('width', '100%');
$('#sakai-lti-admin-iframe').attr('height', '100%');
// https://stackoverflow.com/questions/1202079/prevent-jquery-ui-dialog-from-setting-focus-to-first-textbox
$(this).parent().focus();
},
close: function() {
if ( doreload ) {
location.reload();
} else {
$('#sakai-basiclti-admin-iframe').attr('src','/library/image/sakai/spinner.gif');
$('#sakai-lti-admin-iframe').attr('src','/library/image/sakai/spinner.gif');
}
}
});

$(window).resize(function() {
$("#external-modal-iframe-div").dialog("option", "width", modalDialogWidth());
$("#external-modal-iframe-div").dialog("option", "height", modalDialogHeight());
$('#sakai-basiclti-admin-iframe').attr('width', '100%');
$('#sakai-basiclti-admin-iframe').attr('height', '100%');
$('#sakai-lti-admin-iframe').attr('width', '100%');
$('#sakai-lti-admin-iframe').attr('height', '100%');
});
}
//]]>
Expand Down
2 changes: 0 additions & 2 deletions basiclti/basiclti-tool/src/bundle/basiclti-events.properties

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading