3 * Action that displays an interface for moving a page
6 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
10 $pageid = required_param('pageid', PARAM_INT
);
11 $title = get_field("lesson_pages", "title", "id", $pageid);
12 print_heading(get_string("moving", "lesson", format_string($title)));
14 if (!$page = get_record_select("lesson_pages", "lessonid = $lesson->id AND prevpageid = 0")) {
15 error("Move: first page not found");
18 echo "<center><table cellpadding=\"5\" border=\"1\">\n";
19 echo "<tr><td><a href=\"lesson.php?id=$cm->id&sesskey=".$USER->sesskey
."&action=moveit&pageid=$pageid&after=0\"><small>".
20 get_string("movepagehere", "lesson")."</small></a></td></tr>\n";
22 if ($page->id
!= $pageid) {
23 if (!$title = trim(format_string($page->title
))) {
24 $title = "<< ".get_string("notitle", "lesson")." >>";
26 echo "<tr><td><b>$title</b></td></tr>\n";
27 echo "<tr><td><a href=\"lesson.php?id=$cm->id&sesskey=".$USER->sesskey
."&action=moveit&pageid=$pageid&after={$page->id}\"><small>".
28 get_string("movepagehere", "lesson")."</small></a></td></tr>\n";
30 if ($page->nextpageid
) {
31 if (!$page = get_record("lesson_pages", "id", $page->nextpageid
)) {
32 error("Teacher view: Next page not found!");