Skip to content

Commit

Permalink
"MDL-14120, fix print_error"
Browse files Browse the repository at this point in the history
  • Loading branch information
dongsheng committed Jun 8, 2008
1 parent b10ccbc commit ea05eeb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mod/label/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@

if ($id) {
if (! $cm = get_coursemodule_from_id('label', $id)) {
print_error("Course Module ID was incorrect");
print_error('invalidcoursemodule');
}

if (! $course = $DB->get_record("course", array("id"=>$cm->course))) {
print_error("Course is misconfigured");
print_error('coursemisconf');
}

if (! $label = $DB->get_record("label", array("id"=>$cm->instance))) {
print_error("Course module is incorrect");
print_error('invalidcoursemodule');
}

} else {
if (! $label = $DB->get_record("label", array("id"=>$l))) {
print_error("Course module is incorrect");
print_error('invalidcoursemodule');
}
if (! $course = $DB->get_record("course", array("id"=>$label->course)) ){
print_error("Course is misconfigured");
print_error('coursemisconf');
}
if (! $cm = get_coursemodule_from_instance("label", $label->id, $course->id)) {
print_error("Course Module ID was incorrect");
print_error('invalidcoursemodule');
}
}

Expand Down

0 comments on commit ea05eeb

Please sign in to comment.