}
}
$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'));
* @return string HTML
*/
public function get_studentshtml() {
- global $CFG, $USER, $DB;
+ global $CFG, $USER, $DB, $OUTPUT;
$studentshtml = '';
$strfeedback = $this->get_lang_string("feedback");
}
$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);