mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-10557, adding format_string() to support multilang filter usage on grade item names
This commit is contained in:
parent
b0e1ed348a
commit
bf4bb28d4f
@ -11,7 +11,7 @@ class grade_export_form extends moodleform {
|
||||
$mform->addElement('hidden', 'id', $id);
|
||||
if ($grade_items = grade_item::fetch_all(array('courseid'=>$id))) {
|
||||
foreach ($grade_items as $grade_item) {
|
||||
$element = new HTML_QuickForm_advcheckbox('itemids[]', null, $grade_item->itemname, array('selected'=>'selected'), array(0, $grade_item->id));
|
||||
$element = new HTML_QuickForm_advcheckbox('itemids[]', null, $grade_item->get_name(), array('selected'=>'selected'), array(0, $grade_item->id));
|
||||
$element->setChecked(1);
|
||||
$mform->addElement($element);
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ class grade_export {
|
||||
// load as an array of grade_final objects
|
||||
if ($itemgrades = $gradeitem -> get_final()) {
|
||||
|
||||
$this->columns[$gradeitem->id] = "$gradeitem->itemmodule: ".format_string($gradeitem->itemname,true)." - $gradeitem->grademax";
|
||||
$this->columns[$gradeitem->id] = "$gradeitem->itemmodule: ".$gradeitem->get_name()." - $gradeitem->grademax";
|
||||
|
||||
$this->columnidnumbers[$gradeitem->id] = $gradeitem->idnumber; // this might be needed for some export plugins
|
||||
|
||||
|
@ -11,7 +11,7 @@ class grade_export_txt_form extends moodleform {
|
||||
$mform->addElement('hidden', 'id', $id);
|
||||
if ($grade_items = grade_item::fetch_all(array('courseid'=>$id))) {
|
||||
foreach ($grade_items as $grade_item) {
|
||||
$element = new HTML_QuickForm_advcheckbox('itemids[]', null, $grade_item->itemname, array('selected'=>'selected'), array(0, $grade_item->id));
|
||||
$element = new HTML_QuickForm_advcheckbox('itemids[]', null, $grade_item->get_name(), array('selected'=>'selected'), array(0, $grade_item->id));
|
||||
$element->setChecked(1);
|
||||
$mform->addElement($element);
|
||||
}
|
||||
|
@ -383,7 +383,7 @@ if (($formdata = data_submitted()) && !empty($formdata->map)) {
|
||||
}
|
||||
|
||||
// this was idnumber
|
||||
$gradeitems[$grade_item->id] = $grade_item->itemname;
|
||||
$gradeitems[$grade_item->id] = $grade_item->get_name();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user