Skip to content

Commit

Permalink
SAK-50327 Assignments add support for LTI assignments when using clas…
Browse files Browse the repository at this point in the history
…sic grader (sakaiproject#12761)
  • Loading branch information
csev authored Jul 30, 2024
1 parent 524ef95 commit b7a924f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4348,6 +4348,13 @@ protected String build_instructor_grade_submission_context(VelocityPortlet portl
String siteId = (String) state.getAttribute(STATE_CONTEXT_STRING);
String toolId = toolManager.getCurrentPlacement().getId();

if (assignment.isPresent()) {
if (assignment.get().getTypeOfSubmission() == Assignment.SubmissionType.EXTERNAL_TOOL_SUBMISSION) {
putExternalToolIntoContext(context, assignment.get(), state);
context.put("externalTool", Boolean.TRUE);
}
}

String template = (String) getContext(data).get("template");
if (useSakaiGrader()) {
if (MODE_INSTRUCTOR_VIEW_STUDENTS_ASSIGNMENT.equals(state.getAttribute(FROM_VIEW))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#set( $H = '-' )
#set( $T = 'T' )
#javascript("/library/js/lang-datepicker/lang-datepicker.js")

<script type="module" src="/webcomponents/bundles/lti.js"></script>
<script>
focus_path = ['$fField'];
$(document).ready(function () {
Expand Down Expand Up @@ -320,7 +320,7 @@
</p>
#end
## Submitted Attachment
#set ($attachAllowed = $submissionType != 1 && $submissionType != 4)
#set ($attachAllowed = $submissionType != 1 && $submissionType != 4 && $submissionType != 6)
#if ($attachAllowed || $size != 0) ##do not show attach messages if no attach are allowed unless an attach is present anyway.
<h3>
#if ($submissionType == 5)
Expand Down Expand Up @@ -449,6 +449,12 @@
</script>
#end

#if($submissionType == 6 && $value_ContentId && $value_ContentLaunchURL)
<p>
<sakai-lti-popup launch-url="$value_ContentLaunchURL"></sakai-lti-popup>
</p>
#end

<div class="highlightPanel" style="width:80%">
#if ($allowToGrade)
#if ($gradeType == 1)
Expand Down

0 comments on commit b7a924f

Please sign in to comment.