Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-16963

Problem with gradebook service if points are null

    XMLWordPrintable

    Details

      Description

      We identified a 2.6 compatibility problem that specifically effected old expected behavior of gradebook by the contrib tool mneme. This was related to an api change in SAK-12835.

      If an instructor selects the option during publishing of: Release Grades: "Manual release" instead of the default "Automatic Release" there is a stack trace from gradebook (NPE on .toString()) when the students submit the test.

      The specific line changed that causes the bug is:
      844 externalAssessmentService.updateExternalAssessmentScore(gradebookUid,
      externalId, studentUid, points.toString());

      This appears to be the only conversion to string of this type done.

      It needs to do an NPE on points as some tools use null to actually clear out the points (as test center does). The previous version just passed points to updateExternalAssessmentScore without doing a toString.

      Attached is a possible fix, the other possibility would be to detect null and just call the old function, but I have tested this and confirmed that the old behavior of score retraction also works with the function that accepts a string as a parameter

      mneme was using null as score in retractSubmissionGrade(Submission submission), it needs to continue to pass though null.

      341 // null retracts the score
      342 Double score = null;
      343
      344 // report it
      345

      This seems like a pretty big deal, and I'm not sure if any other tools are using this "feature" of gradebook.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jonespm Matthew Jones
                  Reporter:
                  jonespm Matthew Jones
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code