MDL-35418 SCORM: remove dumb function, include sequencinglib.php as scorm_13lib.php still calls some of the functions.

This commit is contained in:
Dan Marsden 2012-09-13 21:29:26 +12:00
parent 92be6fa471
commit 995e322e75
3 changed files with 4 additions and 6 deletions

View File

@ -14,7 +14,10 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot.'/mod/scorm/datamodels/scormlib.php');
require_once($CFG->dirroot.'/mod/scorm/datamodels/sequencinglib.php');
function scorm_seq_overall ($scoid, $userid, $request, $attempt) {
$seq = scorm_seq_navigation($scoid, $userid, $request, $attempt);

View File

@ -14,10 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
function scorm_seq_evaluate($scoid,$usertracks) {
return true;
}
function scorm_seq_exit_action_rules($seq,$userid) {
$sco = $seq->currentactivity;
$ancestors = scorm_get_ancestors($sco);

View File

@ -1418,8 +1418,7 @@ function scorm_get_toc_object($user, $scorm, $currentorg='', $scoid='', $mode='n
}
if (scorm_version_check($scorm->version, SCORM_13)) {
require_once($CFG->dirroot.'/mod/scorm/datamodels/sequencinglib.php');
$sco->prereq = scorm_seq_evaluate($sco->id, $usertracks);
$sco->prereq = true;
} else {
$sco->prereq = empty($sco->prerequisites) || scorm_eval_prerequisites($sco->prerequisites, $usertracks);
}