MDL-19815 Converted calls to popup_form()
authornicolasconnault <nicolasconnault>
Mon, 10 Aug 2009 03:36:01 +0000 (03:36 +0000)
committernicolasconnault <nicolasconnault>
Mon, 10 Aug 2009 03:36:01 +0000 (03:36 +0000)
mod/scorm/datamodels/aicclib.php
mod/scorm/datamodels/scorm_12lib.php
mod/scorm/datamodels/scorm_13lib.php

index 804f756..728abd9 100644 (file)
@@ -539,8 +539,10 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
         $result->toc .= $PAGE->requires->js('mod/scorm/datamodels/scorm_datamodels.js')->asap();
     }
 
-    $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);
+    $url = $CFG->wwwroot.'/mod/scorm/player.php?a='.$scorm->id.'&currentorg='.$currentorg.$modestr;
+    $select = moodle_select::make_popup_form($url, 'scoid', $tocmenus, "tocmenu", $sco->id);
+    $select->nothinglabel = false;
+    $result->tocmenu = $OUTPUT->select($select);
 
     return $result;
 }
index 637f3b4..116a2b6 100644 (file)
@@ -323,8 +323,10 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
         $PAGE->requires->js('mod/scorm/datamodels/scorm_datamodels.js');
     }
 
-    $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);
+    $url = $CFG->wwwroot.'/mod/scorm/player.php?a='.$scorm->id.'&currentorg='.$currentorg.$modestr;
+    $select = moodle_select::make_popup_form($url, 'scoid', $tocmenus, "tocmenu", $sco->id);
+    $select->nothinglabel = false;
+    $result->tocmenu = $OUTPUT->select($select);
 
     return $result;
 }
index 95b3aed..f7fa4d5 100644 (file)
@@ -214,8 +214,10 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
         $PAGE->requires->js('mod/scorm/datamodels/scorm_datamodels.js');
     }
 
-    $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);
+    $url = $CFG->wwwroot.'/mod/scorm/player.php?a='.$scorm->id.'&currentorg='.$currentorg.$modestr;
+    $select = moodle_select::make_popup_form($url, 'scoid', $tocmenus, "tocmenu", $sco->id);
+    $select->nothinglabel = false;
+    $result->tocmenu = $OUTPUT->select($select);
 
     return $result;
 }