grade MDL-19797 Upgraded deprecated function calls
This commit is contained in:
@@ -98,7 +98,7 @@ if (has_capability('moodle/grade:manage', $context)) {
|
||||
// Change category aggregation if requested
|
||||
if (!is_null($category) && !is_null($aggregationtype) && confirm_sesskey()) {
|
||||
if (!$grade_category = grade_category::fetch(array('id'=>$category, 'courseid'=>$courseid))) {
|
||||
error('Incorrect category id!');
|
||||
print_error('invalidcategoryid');
|
||||
}
|
||||
$data->aggregation = $aggregationtype;
|
||||
grade_category::set_properties($grade_category, $data);
|
||||
|
||||
@@ -38,7 +38,7 @@ if (empty($userid)) {
|
||||
|
||||
} else {
|
||||
if (!$DB->get_record('user', array('id'=>$userid, 'deleted'=>0)) or isguestuser($userid)) {
|
||||
error("Incorrect userid");
|
||||
print_error('invaliduserid');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ if (has_capability('moodle/grade:viewall', $systemcontext)) {
|
||||
|
||||
if (!$access) {
|
||||
// no access to grades!
|
||||
error("Can not view grades.", $CFG->wwwroot.'/course/view.php?id='.$courseid); //TODO: localize
|
||||
print_error('nopermissiontoviewgrades', 'error', $CFG->wwwroot.'/course/view.php?id='.$courseid);
|
||||
}
|
||||
|
||||
/// return tracking object
|
||||
|
||||
@@ -57,7 +57,7 @@ if (has_capability('moodle/grade:viewall', $context)) {
|
||||
|
||||
if (!$access) {
|
||||
// no access to grades!
|
||||
error("Can not view grades.", $CFG->wwwroot.'/course/view.php?id='.$courseid); //TODO: localize
|
||||
print_error('nopermissiontoviewgrades', 'error', $CFG->wwwroot.'/course/view.php?id='.$courseid);
|
||||
}
|
||||
|
||||
/// return tracking object
|
||||
|
||||
@@ -355,6 +355,7 @@ $string['nopermissiontolock'] = 'No permission to lock!';
|
||||
$string['nopermissiontomkdir'] = 'Cannot create folder. The site administrator needs to fix the file permissions';
|
||||
$string['nopermissiontoshow'] = 'No permission to see this!';
|
||||
$string['nopermissiontounlock'] = 'No permission to unlock!';
|
||||
$string['nopermissiontoviewgrades'] = 'Can not view grades.';
|
||||
$string['nopermissiontoviewpage'] = 'You are not allowed to look at this page';
|
||||
$string['nopermissiontoviewletergrade'] = 'Missing permission to view letter grades';
|
||||
$string['nopermissiontomanagegroup'] = 'You do not have the required permissions to manage groups';
|
||||
|
||||
Reference in New Issue
Block a user