mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
Merge branch 'master_MDL-35737' of git://github.com/danmarsden/moodle
This commit is contained in:
commit
7ac94cab86
1 changed files with 3 additions and 6 deletions
|
@ -263,9 +263,6 @@ function scorm_parse($scorm, $full) {
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if ($scorm->scormtype === SCORM_TYPE_EXTERNAL and $cfg_scorm->allowtypeexternal) {
|
} else if ($scorm->scormtype === SCORM_TYPE_EXTERNAL and $cfg_scorm->allowtypeexternal) {
|
||||||
if (!$full and $scorm->sha1hash === sha1($scorm->reference)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
require_once("$CFG->dirroot/mod/scorm/datamodels/scormlib.php");
|
require_once("$CFG->dirroot/mod/scorm/datamodels/scormlib.php");
|
||||||
// SCORM only, AICC can not be external
|
// SCORM only, AICC can not be external
|
||||||
if (!scorm_parse_scorm($scorm, $scorm->reference)) {
|
if (!scorm_parse_scorm($scorm, $scorm->reference)) {
|
||||||
|
@ -936,13 +933,13 @@ function scorm_simple_play($scorm, $user, $context, $cmid) {
|
||||||
|
|
||||||
$result = false;
|
$result = false;
|
||||||
|
|
||||||
if ($scorm->scormtype != SCORM_TYPE_LOCAL && $scorm->updatefreq == SCORM_UPDATE_EVERYTIME) {
|
|
||||||
scorm_parse($scorm, false);
|
|
||||||
}
|
|
||||||
if (has_capability('mod/scorm:viewreport', $context)) { //if this user can view reports, don't skipview so they can see links to reports.
|
if (has_capability('mod/scorm:viewreport', $context)) { //if this user can view reports, don't skipview so they can see links to reports.
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($scorm->scormtype != SCORM_TYPE_LOCAL && $scorm->updatefreq == SCORM_UPDATE_EVERYTIME) {
|
||||||
|
scorm_parse($scorm, false);
|
||||||
|
}
|
||||||
$scoes = $DB->get_records_select('scorm_scoes', 'scorm = ? AND '.$DB->sql_isnotempty('scorm_scoes', 'launch', false, true), array($scorm->id), 'id', 'id');
|
$scoes = $DB->get_records_select('scorm_scoes', 'scorm = ? AND '.$DB->sql_isnotempty('scorm_scoes', 'launch', false, true), array($scorm->id), 'id', 'id');
|
||||||
|
|
||||||
if ($scoes) {
|
if ($scoes) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue