-
Bug
-
Resolution: Won't Fix
-
Minor
-
None
-
2.8.2
-
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?