Accessibility: MDL-17705: Thanks Tim
[moodle.git] / mod / scorm / datamodels / aicclib.php
index 2bd6288..94fce52 100644 (file)
@@ -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 = "<ul id='s0' class='$liststyle'>\n";
     $tocmenus = array();
     $result->prerequisites = true;
     $incomplete = false;
-    
+
     //
     // Get the current organization infos
     //
@@ -353,7 +353,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
     if ($scoes = scorm_get_scoes($scorm->id, $currentorg)){
         //
         // Retrieve user tracking data for each learning object
-        // 
+        //
         $usertracks = array();
         foreach ($scoes as $sco) {
             if (!empty($sco->launch)) {
@@ -372,7 +372,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
         $nextid = 0;
         $findnext = false;
         $parents[$level]='/';
-        
+
         foreach ($scoes as $pos => $sco) {
             $isvisible = false;
             $sco->title = $sco->title;
@@ -426,7 +426,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
                 }
                 $result->toc .= '<a href="javascript:expandCollide(\'img'.$sublist.'\',\'s'.$sublist.'\','.$nextsco->id.');"><img id="img'.$sublist.'" src="'.$scormpixdir.'/'.$icon.'.gif" alt="'.$strexpand.'" title="'.$strexpand.'"/></a>';
             } else if ($isvisible) {
-                $result->toc .= '<img src="'.$scormpixdir.'/spacer.gif" alt="spacer" />';
+                $result->toc .= '<img src="'.$scormpixdir.'/spacer.gif" alt="" />';
             }
             if (empty($sco->title)) {
                 $sco->title = $sco->identifier;
@@ -447,7 +447,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
                         } else {
                             $statusicon = '<img src="'.$scormpixdir.'/assetc.gif" alt="'.get_string('assetlaunched','scorm').'" title="'.get_string('assetlaunched','scorm').'" />';
                         }
-                    
+
                         if (($usertrack->status == 'notattempted') || ($usertrack->status == 'incomplete') || ($usertrack->status == 'browsed')) {
                             $incomplete = true;
                             if ($play && empty($scoid)) {
@@ -479,7 +479,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
                         $shownext = isset($sco->next) ? $sco->next : 0;
                         $showprev = isset($sco->previous) ? $sco->previous : 0;
                     }
-                
+
                     if (($nextid == 0) && (scorm_count_launchable($scorm->id,$currentorg) > 1) && ($nextsco!==false) && (!$findnext)) {
                         if (!empty($sco->launch)) {
                             $previd = $sco->id;
@@ -511,7 +511,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
         for ($i=0;$i<$level;$i++) {
             $result->toc .= "\t\t</ul></li>\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
           //]]>
           </script>'."\n";
     }
-    
+
     $url = $CFG->wwwroot.'/mod/scorm/player.php?a='.$scorm->id.'&amp;currentorg='.$currentorg.$modestr.'&amp;scoid=';
     $result->tocmenu = popup_form($url,$tocmenus, "tocmenu", $sco->id, '', '', '', true);