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

Arguments to scorm_seq_termination reversed

    XMLWordPrintable

Details

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

    Description

      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?

      Attachments

        Activity

          People

            danmarsden Dan Marsden
            raymor Ray Morris
            Dan Marsden, Matteo Scaramuccia, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: