MDL-11082 Improved groups upgrade performance 1.8x -> 1.9; thanks Eloy for telling...
[moodle-pu.git] / mod / lesson / action / confirmdelete.php
bloba1f2a3a75da892255ba6a82377e6594b9ce43261
1 <?php // $Id$
2 /**
3 * Action for confirming the deletion of a page
5 * @version $Id$
6 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
7 * @package lesson
8 **/
9 confirm_sesskey();
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&amp;id=$cm->id&amp;pageid=$pageid&amp;sesskey=".$USER->sesskey,
29 "view.php?id=$cm->id");