mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
force scorm update:MDL-17034: force update of SCORM when scorm_simple_play is used.
This commit is contained in:
parent
fed640276f
commit
9316beca89
@ -775,23 +775,27 @@ function scorm_view_display ($user, $scorm, $action, $cm, $boxwidth='') {
|
||||
function scorm_simple_play($scorm,$user) {
|
||||
global $DB;
|
||||
|
||||
$result = false;
|
||||
$result = false;
|
||||
|
||||
$scoes = $DB->get_records_select('scorm_scoes', 'scorm = ? AND launch <> ?', array($scorm->id, $DB->sql_empty()));
|
||||
if ($scorm->updatefreq == UPDATE_EVERYTIME) {
|
||||
scorm_parse($scorm, false);
|
||||
}
|
||||
|
||||
if ($scoes && (count($scoes) == 1)) {
|
||||
if ($scorm->skipview >= 1) {
|
||||
$sco = current($scoes);
|
||||
if (scorm_get_tracks($sco->id,$user->id) === false) {
|
||||
header('Location: player.php?a='.$scorm->id.'&scoid='.$sco->id);
|
||||
$result = true;
|
||||
} else if ($scorm->skipview == 2) {
|
||||
header('Location: player.php?a='.$scorm->id.'&scoid='.$sco->id);
|
||||
$result = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
$scoes = $DB->get_records_select('scorm_scoes', 'scorm = ? AND launch <> ?', array($scorm->id, $DB->sql_empty()));
|
||||
|
||||
if ($scoes && (count($scoes) == 1)) {
|
||||
if ($scorm->skipview >= 1) {
|
||||
$sco = current($scoes);
|
||||
if (scorm_get_tracks($sco->id,$user->id) === false) {
|
||||
header('Location: player.php?a='.$scorm->id.'&scoid='.$sco->id);
|
||||
$result = true;
|
||||
} else if ($scorm->skipview == 2) {
|
||||
header('Location: player.php?a='.$scorm->id.'&scoid='.$sco->id);
|
||||
$result = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
/*
|
||||
function scorm_simple_play($scorm,$user) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user