From 9cba23810068ab445316bf87c140c2056ade9fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?manu=20=E2=80=A2=E2=80=A2?= Date: Tue, 18 Jun 2024 17:07:33 +0200 Subject: [PATCH] SAK-49998 Assignments updates to group filtering, grades viewing, and navigation (#12644) --- .../assignment/tool/AssignmentAction.java | 8 +++++--- ...ents_instructor_student_list_submissions.vm | 18 +++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/assignment/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java b/assignment/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java index 869c787b8ca3..4fcbcc347f1d 100644 --- a/assignment/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java +++ b/assignment/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java @@ -6096,6 +6096,8 @@ public void doView_submission(RunData data) { ParameterParser params = data.getParameters(); String assignmentReference = params.getString("assignmentReference"); + String id = params.getString("submitterId"); + state.setAttribute(EXPANDED_USER_ID, id); if (assignmentReference == null) { assignmentReference = params.getString("assignmentId"); @@ -11028,8 +11030,8 @@ public void doGrade_submission(RunData data) { String assignmentId = params.getString("assignmentId"); state.setAttribute(EXPORT_ASSIGNMENT_REF, assignmentId); String submissionId = params.getString("submissionId"); - String userId = params.getString("user_id"); - state.setAttribute(EXPANDED_USER_ID, userId); + String id = params.getString("submitterId"); + state.setAttribute(EXPANDED_USER_ID, id); // SAK-29314 - put submission information into state boolean viewSubsOnlySelected = stringToBool((String) data.getParameters().getString(PARAMS_VIEW_SUBS_ONLY_CHECKBOX)); @@ -11254,7 +11256,7 @@ public void doHide_student_submission(RunData data) { ParameterParser params = data.getParameters(); String id = params.getString("studentId"); - state.removeAttribute(EXPANDED_USER_ID); + state.setAttribute(EXPANDED_USER_ID, id); // remove the student id from the table t.remove(id); diff --git a/assignment/tool/src/webapp/vm/assignment/chef_assignments_instructor_student_list_submissions.vm b/assignment/tool/src/webapp/vm/assignment/chef_assignments_instructor_student_list_submissions.vm index d76e29814f80..c21149051aee 100644 --- a/assignment/tool/src/webapp/vm/assignment/chef_assignments_instructor_student_list_submissions.vm +++ b/assignment/tool/src/webapp/vm/assignment/chef_assignments_instructor_student_list_submissions.vm @@ -138,8 +138,8 @@ #else #set($assignments=false) #set($assignments=$!studentAssignmentsTable.get($member)) - #foreach ($assignment in $!assignments) - #if ($assignment.isGroup) + #foreach ($assignment in $assignments) + #if ($assignment.TypeOfAccess.ordinal() == 1) #set($displayAssignment = $service.permissionCheckInGroups("asn.submit", $assignment, "$member.id")) #else #set($displayAssignment = true) @@ -165,7 +165,7 @@ - $assignmentTitle + $assignmentTitle #if ($allowAddAssignment && $allowSubmitByInstructor) #set( $submitSpinnerID = "submitFor_" + $member.Id + "_" + $formattedText.escapeUrl($assignmentReference) )
@@ -234,14 +234,14 @@ #if ($assignment.TypeOfGrade.ordinal() == 1) $tlang.getString("gen.nograd") #elseif ($assignment.TypeOfGrade.ordinal() == 3) - #if ($assignment.IsGroup) - #if ($grade) + #if ($submission.Graded) + #if ($assignment.IsGroup) $grade ($!service.getGradeDisplay($!submission.Grade, $assignment.TypeOfGrade, $assignment.ScaleFactor)) - #else - $tlang.getString("gen.nograd") + #elseif ($grade) + $!grade #end - #elseif ($grade) - $!grade + #else + $tlang.getString("gen.nograd") #end #elseif ($grade) $!grade