Fixed alignment issues and removed underscore from variable name
This commit is contained in:
parent
3d4811cc0c
commit
2df3ee4fa5
2 changed files with 17 additions and 14 deletions
|
@ -196,9 +196,12 @@ class customcert_element_date extends customcert_element_base {
|
||||||
if (!in_array(($day % 100), array(11, 12, 13))) {
|
if (!in_array(($day % 100), array(11, 12, 13))) {
|
||||||
switch ($day % 10) {
|
switch ($day % 10) {
|
||||||
// Handle 1st, 2nd, 3rd.
|
// Handle 1st, 2nd, 3rd.
|
||||||
case 1: return get_string('numbersuffix_st', 'customcertelement_date');
|
case 1:
|
||||||
case 2: return get_string('numbersuffix_nd', 'customcertelement_date');
|
return get_string('numbersuffix_st', 'customcertelement_date');
|
||||||
case 3: return get_string('numbersuffix_rd', 'customcertelement_date');
|
case 2:
|
||||||
|
return get_string('numbersuffix_nd', 'customcertelement_date');
|
||||||
|
case 3:
|
||||||
|
return get_string('numbersuffix_rd', 'customcertelement_date');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 'th';
|
return 'th';
|
||||||
|
|
|
@ -170,8 +170,8 @@ class customcert_element_grade extends customcert_element_base {
|
||||||
$instance = $DB->get_record($mod->modname, array('id' => $mod->instance));
|
$instance = $DB->get_record($mod->modname, array('id' => $mod->instance));
|
||||||
// Get the grade items for this activity.
|
// Get the grade items for this activity.
|
||||||
if ($grade_items = grade_get_grade_items_for_activity($mod)) {
|
if ($grade_items = grade_get_grade_items_for_activity($mod)) {
|
||||||
$mod_item = grade_get_grades($COURSE->id, 'mod', $mod->modname, $mod->instance);
|
$moditem = grade_get_grades($COURSE->id, 'mod', $mod->modname, $mod->instance);
|
||||||
$gradeitem = reset($mod_item->items);
|
$gradeitem = reset($moditem->items);
|
||||||
if (isset($gradeitem->grademax)) {
|
if (isset($gradeitem->grademax)) {
|
||||||
$modules[$mod->id] = $sectionlabel . ' ' . $section->section . ' : ' . $instance->name;
|
$modules[$mod->id] = $sectionlabel . ' ' . $section->section . ' : ' . $instance->name;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue