3 * Action for confirming the deletion of a page
6 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
11 $pageid = required_param('pageid', PARAM_INT
);
12 if (!$thispage = get_record("lesson_pages", "id", $pageid)) {
13 error("Confirm delete: the page record not found");
15 print_heading(get_string("deletingpage", "lesson", format_string($thispage->title
)));
16 // print the jumps to this page
17 if ($answers = get_records_select("lesson_answers", "lessonid = $lesson->id AND jumpto = $pageid + 1")) {
18 print_heading(get_string("thefollowingpagesjumptothispage", "lesson"));
19 echo "<p align=\"center\">\n";
20 foreach ($answers as $answer) {
21 if (!$title = get_field("lesson_pages", "title", "id", $answer->pageid
)) {
22 error("Confirm delete: page title not found");
24 echo $title."<br />\n";
27 notice_yesno(get_string("confirmdeletionofthispage","lesson"),
28 "lesson.php?action=delete&id=$cm->id&pageid=$pageid&sesskey=".$USER->sesskey
,
29 "view.php?id=$cm->id");