Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-48879

Arguments to scorm_seq_termination reversed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • 2.8.2
    • SCORM
    • MOODLE_28_STABLE

      In mod/scorm/datamodels/scorm_13lib.php, it appears that the arguments to scorm_seq_termination() are reversed.

      The function is defined to take $seq, $userid, where $seq is an object:
      line 212 function scorm_seq_termination ($seq, $userid) {
      line 213 if (empty($seq->currentactivity)) {
      line 214 $seq->termination = false;

      It's called on line #26 with different arguments:
      line 26 $seq = scorm_seq_termination($scoid, $userid, $seq);

      This results in the predictable error:
      Attempt to assign property of non-object in on line 215

      Without spending hours trying to understand what exactly $seq (sequence?) is and how it is supposed to behave, I think the fix is to pass the arguments to scorm_seq_termination in the order that the function declaration expects them:
      $seq = scorm_seq_termination($seq, $userid);

      Does anyone who understands what that code is supposed to do have a comment on that?

            danmarsden Dan Marsden
            raymor Ray Morris
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.