"MDL-14129, fix print_error"

This commit is contained in:
dongsheng 2008-05-14 08:17:40 +00:00
parent f39c16e0f4
commit 14398fd611
5 changed files with 5 additions and 5 deletions

View File

@ -41,7 +41,7 @@ switch ($action) {
if (!empty($userid) && !empty($itemid) && $newvalue !== false && !empty($type)) {
// Save the grade or feedback
if (!$grade_item = grade_item::fetch(array('id'=>$itemid, 'courseid'=>$courseid))) { // we must verify course id here!
print_error('Incorrect grade item id');
print_error('invalidgradeitmeid');
}
/**

View File

@ -180,7 +180,7 @@ class grade_report_grader extends grade_report {
}
if (!$grade_item = grade_item::fetch(array('id'=>$itemid, 'courseid'=>$this->courseid))) { // we must verify course id here!
print_error('Incorrect grade item id');
print_error('invalidgradeitmeid');
}
// Pre-process grade

View File

@ -43,7 +43,7 @@ if ($reports = get_list_of_plugins('grade/report', 'CVS')) { // Get all inst
}
if (empty($reports)) {
print_error('No reports accessible', '', $CFG->wwwroot.'/course/view.php?id='.$course->id); // TODO: localize
print_error('noreports', 'debug', $CFG->wwwroot.'/course/view.php?id='.$course->id); // TODO: localize
}
if (!isset($USER->grade_last_report)) {

View File

@ -37,7 +37,7 @@ if (!$course = get_record('course', 'id', $courseid)) {
require_login($course);
if (!$user = get_complete_user_data('id', $userid)) {
print_error("Incorrect userid");
print_error('invaliduser');
}
$context = get_context_instance(CONTEXT_COURSE, $course->id);

View File

@ -44,7 +44,7 @@ if (empty($userid)) {
} else {
if (!get_complete_user_data('id', $userid)) {
print_error("Incorrect userid");
print_error('invaliduser');
}
}