Fixed alignment issues and removed underscore from variable name

This commit is contained in:
Mark Nelson 2013-07-23 12:43:56 +08:00
parent 3d4811cc0c
commit 2df3ee4fa5
2 changed files with 17 additions and 14 deletions

View file

@ -196,9 +196,12 @@ class customcert_element_date extends customcert_element_base {
if (!in_array(($day % 100), array(11, 12, 13))) {
switch ($day % 10) {
// Handle 1st, 2nd, 3rd.
case 1: return get_string('numbersuffix_st', 'customcertelement_date');
case 2: return get_string('numbersuffix_nd', 'customcertelement_date');
case 3: return get_string('numbersuffix_rd', 'customcertelement_date');
case 1:
return get_string('numbersuffix_st', 'customcertelement_date');
case 2:
return get_string('numbersuffix_nd', 'customcertelement_date');
case 3:
return get_string('numbersuffix_rd', 'customcertelement_date');
}
}
return 'th';

View file

@ -170,8 +170,8 @@ class customcert_element_grade extends customcert_element_base {
$instance = $DB->get_record($mod->modname, array('id' => $mod->instance));
// Get the grade items for this activity.
if ($grade_items = grade_get_grade_items_for_activity($mod)) {
$mod_item = grade_get_grades($COURSE->id, 'mod', $mod->modname, $mod->instance);
$gradeitem = reset($mod_item->items);
$moditem = grade_get_grades($COURSE->id, 'mod', $mod->modname, $mod->instance);
$gradeitem = reset($moditem->items);
if (isset($gradeitem->grademax)) {
$modules[$mod->id] = $sectionlabel . ' ' . $section->section . ' : ' . $instance->name;
}