SCORM MDL-25794 fix db call to use select_menu to pass into single_select renderer...
authorDan Marsden <dan@catalyst.net.nz>
Sun, 9 Jan 2011 22:22:50 +0000 (11:22 +1300)
committerDan Marsden <dan@catalyst.net.nz>
Sun, 9 Jan 2011 22:22:50 +0000 (11:22 +1300)
mod/scorm/locallib.php

index 9d8bf02..115f466 100755 (executable)
@@ -723,13 +723,13 @@ function scorm_view_display ($user, $scorm, $action, $cm, $boxwidth='') {
     if (empty($organization)) {
         $organization = $scorm->launch;
     }
-    if ($orgs = $DB->get_records_select('scorm_scoes', 'scorm = ? AND '.
+    if ($orgs = $DB->get_records_select_menu('scorm_scoes', 'scorm = ? AND '.
                                          $DB->sql_isempty('scorm_scoes', 'launch', false, true).' AND '.
                                          $DB->sql_isempty('scorm_scoes', 'organization', false, false),
                                          array($scorm->id),'id','id,title')) {
         if (count($orgs) > 1) {
             $select = new single_select(new moodle_url($action), 'organization', $orgs, $organization, null);
-            $select->lable = get_string('organizations','scorm');
+            $select->label = get_string('organizations','scorm');
             $select->class = 'scorm-center';
             echo $OUTPUT->render($select);
         }