]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19797 Upgraded calls to choose_from_menu
authornicolasconnault <nicolasconnault>
Mon, 17 Aug 2009 15:19:06 +0000 (15:19 +0000)
committernicolasconnault <nicolasconnault>
Mon, 17 Aug 2009 15:19:06 +0000 (15:19 +0000)
grade/import/grade_import_form.php
grade/report/grader/lib.php

index 99a15ed0538c40e85a6faa32ba06f5695069138f..292946bd19b72a712d7b23683db8c8050868edfe 100755 (executable)
@@ -83,10 +83,8 @@ class grade_import_mapping_form extends moodleform {
             }
         }
         $mform->addElement('select', 'mapfrom', get_string('mapfrom', 'grades'), $mapfromoptions);
-        //choose_from_menu($mapfromoptions, 'mapfrom');
 
         $maptooptions = array('userid'=>'userid', 'username'=>'username', 'useridnumber'=>'useridnumber', 'useremail'=>'useremail', '0'=>'ignore');
-        //choose_from_menu($maptooptions, 'mapto');
         $mform->addElement('select', 'mapto', get_string('mapto', 'grades'), $maptooptions);
 
         $mform->addElement('header', 'general', get_string('mappings', 'grades'));
index 687836e449a72b0bf5bf1fc1e98b17ec8854f53c..131029b28fc5ec705e2d1d334ec30da05ef6c5e3 100644 (file)
@@ -687,7 +687,7 @@ class grade_report_grader extends grade_report {
      * @return string HTML
      */
     public function get_studentshtml() {
-        global $CFG, $USER, $DB;
+        global $CFG, $USER, $DB, $OUTPUT;
 
         $studentshtml = '';
         $strfeedback  = $this->get_lang_string("feedback");
@@ -866,9 +866,10 @@ class grade_report_grader extends grade_report {
                             }
                             $studentshtml .= '<input type="hidden" name="oldgrade_'.$userid.'_'
                                           .$item->id.'" value="'.$oldval.'"/>';
-                            $studentshtml .= choose_from_menu($scaleopt, 'grade_'.$userid.'_'.$item->id,
-                                                              $gradeval, $nogradestr, '', '-1',
-                                                              true, false, $tabindices[$item->id]['grade']);
+                            $select = html_select::make($scaleopt, 'grade_'.$userid.'_'.$item->id,$gradeval, $nogradestr);
+                            $select->nothingvalue = '-1';
+                            $select->tabindex = $tabindices[$item->id]['grade'];
+                            $studentshtml .= $OUTPUT->select($select);
                         } elseif(!empty($scale)) {
                             $scales = explode(",", $scale->scale);