Skip to content

Commit

Permalink
Improved feedback after an action (on redirect) and also put a
Browse files Browse the repository at this point in the history
navigation check link up the top.
  • Loading branch information
moodler committed Feb 9, 2005
1 parent 2c5d79d commit a710d8c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 7 additions & 8 deletions mod/lesson/lesson.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
if(!$newanswerid = insert_record("lesson_answers", $newanswer)) {
error("Add end of branch: answer record not inserted");
}
redirect("view.php?id=$cm->id", get_string("ok"));
redirect("view.php?id=$cm->id", get_string('addedanendofbranch', 'lesson'));
} else {
notice(get_string("nobranchtablefound", "lesson"), "view.php?id=$cm->id");
}
Expand Down Expand Up @@ -278,7 +278,7 @@
if(!$newanswerid = insert_record("lesson_answers", $newanswer)) {
error("Add cluster: answer record not inserted");
}
redirect("view.php?id=$cm->id", get_string("ok"));
redirect("view.php?id=$cm->id", get_string('addedcluster', 'lesson'));
}
/// CDC-FLAG ///

Expand Down Expand Up @@ -332,7 +332,7 @@
if(!$newanswerid = insert_record("lesson_answers", $newanswer)) {
error("Add end of cluster: answer record not inserted");
}
redirect("view.php?id=$cm->id", get_string("ok"));
redirect("view.php?id=$cm->id", get_string('addedendofcluster', 'lesson'));
}
/// CDC-FLAG ///

Expand Down Expand Up @@ -1444,7 +1444,7 @@
error("Delete: unable to set prev link");
}
}
redirect("view.php?id=$cm->id", get_string("ok"));
redirect("view.php?id=$cm->id", get_string('deletedpage', 'lesson'));
}


Expand Down Expand Up @@ -2111,7 +2111,7 @@
}
}
/// CDC-FLAG ///
redirect("view.php?id=$cm->id", get_string("ok"));
redirect("view.php?id=$cm->id", get_string('insertedpage', 'lesson'));
}


Expand Down Expand Up @@ -2254,7 +2254,7 @@
if (!set_field("lesson_pages", "nextpageid", 0, "id", $newlastpageid)) {
error("Moveit: unable to update link");
}
redirect("view.php?id=$cm->id", get_string("ok"));
redirect("view.php?id=$cm->id", get_string('movedpage', 'lesson'));
}


Expand Down Expand Up @@ -2400,7 +2400,7 @@
if ($form->redisplay) {
redirect("lesson.php?id=$cm->id&action=editpage&pageid=$page->id");
} else {
redirect("view.php?id=$cm->id", get_string("ok"));
redirect("view.php?id=$cm->id", get_string('updatedpage', 'lesson'));
}
}

Expand All @@ -2412,4 +2412,3 @@
print_footer($course);

?>

2 changes: 2 additions & 0 deletions mod/lesson/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -1114,6 +1114,8 @@
/*******************teacher view **************************************/
elseif ($action == 'teacherview') {
print_heading_with_help($lesson->name, "overview", "lesson");
print_heading("<a href=\"view.php?id=$cm->id&amp;action=navigation\">".get_string("checknavigation",
"lesson")."</a>\n");
// get number of pages
if ($page = get_record_select("lesson_pages", "lessonid = $lesson->id AND prevpageid = 0")) {
$npages = 1;
Expand Down

0 comments on commit a710d8c

Please sign in to comment.