MDL-32249 completion: Make grade criteria more consistent

Also, round course grades and remove hardcoded string.

Note: This patch also removes the ability to update the course grade
from the completion interface
This commit is contained in:
Aaron Barnes
2012-06-26 13:58:19 +12:00
parent 68b0cae5bc
commit 91190892f1
4 changed files with 21 additions and 23 deletions
-10
View File
@@ -141,16 +141,6 @@ if ($form->is_cancelled()){
$aggregation->setMethod($data->role_aggregation);
$aggregation->save();
// Update course total passing grade
if (!empty($data->criteria_grade)) {
if ($grade_item = grade_category::fetch_course_category($course->id)->grade_item) {
$grade_item->gradepass = $data->criteria_grade_value;
if (method_exists($grade_item, 'update')) {
$grade_item->update('course/completion.php');
}
}
}
add_to_log($course->id, 'course', 'completion updated', 'completion.php?id='.$course->id);
$url = new moodle_url('/course/view.php', array('id' => $course->id));