Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'm25_MDL-38678_SCORM_RTE_not_required_for_SCO_Assets' of h…
  • Loading branch information
danpoltawski committed Apr 16, 2013
2 parents 05e1747 + 5ecd13b commit f7f1465
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
8 changes: 8 additions & 0 deletions mod/scorm/datamodels/debug.js.php
Expand Up @@ -737,6 +737,14 @@ function LogAPICall(func, nam, val, rc) {
}
s += ' => ' + String(rc);
AppendToLog(s, rc);
<?php
if (scorm_debugging($scorm) && ($sco->scormtype == 'asset')) {
?>
hint = 'Item <?php echo $sco->identifier; ?> has been defined as an Asset: it should never call the SCORM API';
AppendToLog(hint, 101);
<?php
}
?>
}


Expand Down
14 changes: 11 additions & 3 deletions mod/scorm/loadSCO.php
Expand Up @@ -161,11 +161,19 @@

add_to_log($course->id, 'scorm', 'launch', 'view.php?id='.$cm->id, $result, $cm->id);

// which API are we looking for
$LMS_api = (scorm_version_check($scorm->version, SCORM_12) || empty($scorm->version)) ? 'API' : 'API_1484_11';

header('Content-Type: text/html; charset=UTF-8');

if ($sco->scormtype == 'asset') {
// HTTP 302 Found => Moved Temporarily.
header('Location: ' . $result);
// Provide a short feedback in case of slow network connection.
echo '<html><body><p>' . get_string('activitypleasewait', 'scorm'). '</p></body></html>';
exit;
}

// We expect a SCO: select which API are we looking for.
$LMS_api = (scorm_version_check($scorm->version, SCORM_12) || empty($scorm->version)) ? 'API' : 'API_1484_11';

?>
<html>
<head>
Expand Down

0 comments on commit f7f1465

Please sign in to comment.