Removed strings that were included when displaying a grade element

It may not be the case where everyone wants the name of the grade item to be displayed on the page next to the grade. However, if they do they can simply add another element to show the desired name.
This commit is contained in:
Mark Nelson 2013-07-24 14:05:32 +08:00
parent cb7d86340a
commit 25e18c25f2
2 changed files with 2 additions and 4 deletions

View file

@ -22,8 +22,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
$string['coursegrade'] = 'Course grade';
$string['grade'] = 'Grade';
$string['gradeitem'] = 'Grade item'; $string['gradeitem'] = 'Grade item';
$string['gradeitem_help'] = 'The grade item you wish to display the grade of.'; $string['gradeitem_help'] = 'The grade item you wish to display the grade of.';
$string['gradeformat'] = 'Grade format'; $string['gradeformat'] = 'Grade format';

View file

@ -233,11 +233,11 @@ class customcert_element_grade extends customcert_element_base {
$courseitem->gradetype = GRADE_TYPE_VALUE; $courseitem->gradetype = GRADE_TYPE_VALUE;
$grade = new grade_grade(array('itemid' => $courseitem->id, 'userid' => $userid)); $grade = new grade_grade(array('itemid' => $courseitem->id, 'userid' => $userid));
$coursegrade = grade_format_gradevalue($grade->finalgrade, $courseitem, true, $gradeformat, 2); $coursegrade = grade_format_gradevalue($grade->finalgrade, $courseitem, true, $gradeformat, 2);
return get_string('coursegrade', 'customcertelement_grade') . ': ' . $coursegrade; return $coursegrade;
} }
} else { // Get the module grade. } else { // Get the module grade.
if ($modinfo = self::get_mod_grade($gradeitem, $gradeformat, $userid)) { if ($modinfo = self::get_mod_grade($gradeitem, $gradeformat, $userid)) {
return get_string('grade', 'customcertelement_grade') . ': ' . $modinfo->gradetodisplay; return $modinfo->gradetodisplay;
} }
} }