Details
-
Bug
-
Resolution: Fixed
-
Minor
-
2.8.8, 2.9.2
-
MOODLE_28_STABLE, MOODLE_29_STABLE
-
MOODLE_29_STABLE, MOODLE_30_STABLE
-
master_
MDL-51757 -
Description
As picked up in MDL-51011:
diff --git a/mod/scorm/datamodels/scorm_13lib.php b/mod/scorm/datamodels/scorm_13lib.php
|
index b883223..ac9b80d 100644
|
--- a/mod/scorm/datamodels/scorm_13lib.php
|
+++ b/mod/scorm/datamodels/scorm_13lib.php
|
@@ -1108,7 +1108,7 @@ function scorm_seq_flow_tree_traversal($activity, $direction, $childrenflag, $pr
|
}
|
|
// Returns the next activity on the tree, traversal direction, control returned to the LTS, (may) exception.
|
-function scorm_seq_flow_activity_traversal ($activity, $userid, $direction, $childrenflag, $prevdirection, $seq, $userid) {
|
+function scorm_seq_flow_activity_traversal ($activity, $userid, $direction, $childrenflag, $prevdirection, $seq, $unused = null) {
|
$parent = scorm_get_parent ($activity);
|
if (!isset($parent->flow) || ($parent->flow == false)) {
|
$seq->deliverable = false;
|
diff --git a/mod/scorm/datamodels/sequencinglib.php b/mod/scorm/datamodels/sequencinglib.php
|
index 497206e..def1319 100644
|
--- a/mod/scorm/datamodels/sequencinglib.php
|
+++ b/mod/scorm/datamodels/sequencinglib.php
|
@@ -421,7 +421,7 @@ function scorm_seq_choice_sequencing($sco, $userid, $seq) {
|
}
|
|
if ($seq->currentactivity === $sco) {
|
- break;
|
+ throw new \coding_exception('Unexpected state encountered');
|
}
|
|
$sib = scorm_get_siblings($seq->currentactivity);
|
@@ -451,7 +451,7 @@ function scorm_seq_choice_sequencing($sco, $userid, $seq) {
|
return $seq;
|
}
|
}
|
- break;
|
+ throw new \coding_exception('Unexpected state encountered');
|
}
|
|
if ($seq->currentactivity == null || $seq->currentactivity == $comancestor) {
|
@@ -478,7 +478,7 @@ function scorm_seq_choice_sequencing($sco, $userid, $seq) {
|
return $seq;
|
}
|
}
|
- break;
|
+ throw new \coding_exception('Unexpected state encountered');
|
}
|
|
if ($comancestor->id == $sco->id) {
|
@@ -504,7 +504,7 @@ function scorm_seq_choice_sequencing($sco, $userid, $seq) {
|
}
|
}
|
}
|
- break;
|
+ throw new \coding_exception('Unexpected state encountered');
|
}
|
|
if (array_search($ancestors, $comancestor) !== false) {
|
@@ -589,7 +589,7 @@ function scorm_seq_choice_sequencing($sco, $userid, $seq) {
|
}
|
}
|
}
|
- break;
|
+ throw new \coding_exception('Unexpected state encountered');
|
}
|
|
if (scorm_is_leaf ($sco)) {
|