From d9e6517a2f2dcba02bfad1e8773402283b565d38 Mon Sep 17 00:00:00 2001 From: danmarsden Date: Mon, 22 Dec 2008 07:03:09 +0000 Subject: [PATCH] Accessibility: MDL-17705: Thanks Tim --- mod/scorm/datamodels/aicclib.php | 26 ++++++++++---------- mod/scorm/datamodels/scorm_12lib.php | 36 ++++++++++++++-------------- mod/scorm/datamodels/scorm_13lib.php | 22 ++++++++--------- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/mod/scorm/datamodels/aicclib.php b/mod/scorm/datamodels/aicclib.php index 2bd6288ed8..94fce520fb 100644 --- a/mod/scorm/datamodels/aicclib.php +++ b/mod/scorm/datamodels/aicclib.php @@ -210,7 +210,7 @@ function scorm_parse_aicc($scorm) { //print_r($courses); $oldscoes = $DB->get_records('scorm_scoes', array('scorm'=>$scorm->id)); - + $launch = 0; if (isset($courses)) { foreach ($courses as $course) { @@ -242,7 +242,7 @@ function scorm_parse_aicc($scorm) { $sco->scorm = $scorm->id; $sco->organization = $course->id; $sco->title = $element->title; - + if (!isset($element->parent) || strtolower($element->parent) == 'root') { $sco->parent = '/'; } else { @@ -320,20 +320,20 @@ function scorm_parse_aicc($scorm) { function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='normal',$attempt='',$play=false) { global $CFG, $DB; - + $strexpand = get_string('expcoll','scorm'); $modestr = ''; if ($mode == 'browse') { $modestr = '&mode='.$mode; - } + } $scormpixdir = $CFG->modpixpath.'/scorm/pix'; - + $result = new stdClass(); $result->toc = "\n"; } - + if ($play) { $sco = scorm_get_sco($scoid); $sco->previd = $previd; @@ -544,7 +544,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n //]]> '."\n"; } - + $url = $CFG->wwwroot.'/mod/scorm/player.php?a='.$scorm->id.'&currentorg='.$currentorg.$modestr.'&scoid='; $result->tocmenu = popup_form($url,$tocmenus, "tocmenu", $sco->id, '', '', '', true); diff --git a/mod/scorm/datamodels/scorm_12lib.php b/mod/scorm/datamodels/scorm_12lib.php index 039a5a5b3e..be20df944e 100644 --- a/mod/scorm/datamodels/scorm_12lib.php +++ b/mod/scorm/datamodels/scorm_12lib.php @@ -9,8 +9,8 @@ * @return boolean */ function scorm_eval_prerequisites($prerequisites, $usertracks) { - - // this is really a little language parser - AICC_SCRIPT is the reference + + // this is really a little language parser - AICC_SCRIPT is the reference // see 2.3.2.5.1. Sequencing/Navigation Today - from the SCORM 1.2 spec $element = ''; $stack = array(); @@ -28,7 +28,7 @@ function scorm_eval_prerequisites($prerequisites, $usertracks) { 'b' => 'browsed', 'n' => 'notattempted' ); - $i=0; + $i=0; // expand the amp entities $prerequisites = preg_replace('/&/', '&', $prerequisites); @@ -50,7 +50,7 @@ function scorm_eval_prerequisites($prerequisites, $usertracks) { if (!preg_match('/^(&&|\|\||\(|\))$/', $element)) { // create each individual expression // search for ~ = <> X*{} - + // sets like 3*{S34, S36, S37, S39} if (preg_match('/^(\d+)\*\{(.+)\}$/', $element, $matches)) { $repeat = $matches[1]; @@ -67,11 +67,11 @@ function scorm_eval_prerequisites($prerequisites, $usertracks) { } else { $element = 'false'; } - + // ~ Not } else if ($element == '~') { $element = '!'; - + // = | <> } else if (preg_match('/^(.+)(\=|\<\>)(.+)$/', $element, $matches)) { $element = trim($matches[1]); @@ -89,7 +89,7 @@ function scorm_eval_prerequisites($prerequisites, $usertracks) { } else { $element = 'false'; } - + // everything else must be an element defined like S45 ... } else { if (isset($usertracks[$element]) && @@ -99,7 +99,7 @@ function scorm_eval_prerequisites($prerequisites, $usertracks) { $element = 'false'; } } - + } $stack []= ' '.$element.' '; } @@ -108,20 +108,20 @@ function scorm_eval_prerequisites($prerequisites, $usertracks) { function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='normal',$attempt='',$play=false) { global $CFG, $DB; - + $strexpand = get_string('expcoll','scorm'); $modestr = ''; if ($mode == 'browse') { $modestr = '&mode='.$mode; - } + } $scormpixdir = $CFG->modpixpath.'/scorm/pix'; - + $result = new stdClass(); $result->toc = "\n"; } - + if ($play) { // it is possible that scoid is still not set, in this case we dont want an empty object if ($scoid) { @@ -338,7 +338,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n //]]> '."\n"; } - + $url = $CFG->wwwroot.'/mod/scorm/player.php?a='.$scorm->id.'&currentorg='.$currentorg.$modestr.'&scoid='; $result->tocmenu = popup_form($url,$tocmenus, "tocmenu", $sco->id, '', '', '', true); diff --git a/mod/scorm/datamodels/scorm_13lib.php b/mod/scorm/datamodels/scorm_13lib.php index 09aecacf0c..626358bfd3 100644 --- a/mod/scorm/datamodels/scorm_13lib.php +++ b/mod/scorm/datamodels/scorm_13lib.php @@ -7,15 +7,15 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n $modestr = ''; if ($mode == 'browse') { $modestr = '&mode='.$mode; - } + } $scormpixdir = $CFG->modpixpath.'/scorm/pix'; - + $result = new stdClass(); $result->toc = "\n"; } - + if ($play) { $sco = $DB->get_record('scorm_scoes', array('id'=>$scoid)); $sco->previd = $previd; @@ -229,7 +229,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n //]]> '."\n"; } - + $url = $CFG->wwwroot.'/mod/scorm/player.php?a='.$scorm->id.'&currentorg='.$currentorg.$modestr.'&scoid='; $result->tocmenu = popup_form($url,$tocmenus, "tocmenu", $sco->id, '', '', '', true); -- 2.39.5