From f6c88bc3b0de39748974b2b0b537b764ae9bf268 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Wed, 16 Mar 2016 22:18:26 +1300 Subject: [PATCH] Coding guideline fix --- locallib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locallib.php b/locallib.php index dc5dff3..9cd860e 100644 --- a/locallib.php +++ b/locallib.php @@ -227,9 +227,9 @@ function attendance_update_all_users_grades(mod_attendance_structure $attendance $dbparams = array('id' => -($attendance->grade)); $scale = $DB->get_record('scale', $dbparams); $scalearray = explode(',', $scale->scale); - $gradebook_maxgrade = count($scalearray); + $gradebookmaxgrade = count($scalearray); } else { - $gradebook_maxgrade = $attendance->grade; + $gradebookmaxgrade = $attendance->grade; } foreach ($usergrades as $userid => $existinggrade) { if (is_null($existinggrade->grade)) { @@ -242,7 +242,7 @@ function attendance_update_all_users_grades(mod_attendance_structure $attendance $usertakensesscount = attendance_get_user_taken_sessions_count($attendance->id, $course->startdate, $userid, $coursemodule); $usergrade = attendance_get_user_grade($userstatusesstat, $statuses); $usermaxgrade = attendance_get_user_max_grade($usertakensesscount, $statuses); - $grade->rawgrade = attendance_calc_user_grade_fraction($usergrade, $usermaxgrade) * $gradebook_maxgrade; + $grade->rawgrade = attendance_calc_user_grade_fraction($usergrade, $usermaxgrade) * $gradebookmaxgrade; $grades[$userid] = $grade; }