grade MDL-19797 Upgraded deprecated function calls

This commit is contained in:
samhemelryk
2009-09-30 07:20:31 +00:00
parent e25b7ded61
commit cac0c3ef3d
4 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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
+1
View File
@@ -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';