pagepath = 'mod/lesson/addbranchtable'; // first get the preceeding page $pageid = required_param('pageid', PARAM_INT); // set of jump array $jump = array(); $jump[0] = get_string("thispage", "lesson"); $jump[LESSON_NEXTPAGE] = get_string("nextpage", "lesson"); $jump[LESSON_PREVIOUSPAGE] = get_string("previouspage", "lesson"); $jump[LESSON_EOL] = get_string("endoflesson", "lesson"); if (!optional_param('firstpage', 0, PARAM_INT)) { if (!$apageid = get_field("lesson_pages", "id", "lessonid", $lesson->id, "prevpageid", 0)) { error("Add page: first page not found"); } while (true) { if ($apageid) { $title = get_field("lesson_pages", "title", "id", $apageid); $jump[$apageid] = $title; $apageid = get_field("lesson_pages", "nextpageid", "id", $apageid); } else { // last page reached break; } } } // give teacher a blank proforma print_heading_with_help(get_string("addabranchtable", "lesson"), "overview", "lesson"); ?>
\n"; echo "\n"; for ($i = 0; $i < $lesson->maxanswers; $i++) { $iplus1 = $i + 1; echo "\n"; echo "\n"; } // close table and form ?>

"; echo get_string("pagecontents", "lesson").":
\n"; print_textarea($usehtmleditor, 25,70, 0, 0, "contents"); if ($usehtmleditor) { use_html_editor("contents"); } echo "
\n"; echo "
"; echo get_string("arrangebuttonshorizontally", "lesson")."\n"; echo "
"; echo get_string("displayinleftmenu", "lesson"); echo "
\n"; echo "
".get_string("description", "lesson")." $iplus1:
\n"; print_textarea(false, 10, 70, 630, 300, "answer[$i]"); // made the default set to off also removed use_html_editor(); line from down below, which made all textareas turn into html editors echo "
".get_string("jump", "lesson")." $iplus1: \n"; if ($i) { // answers 2, 3, 4... jumpto this page choose_from_menu($jump, "jumpto[$i]", 0, ""); } else { // answer 1 jumpto next page choose_from_menu($jump, "jumpto[$i]", LESSON_NEXTPAGE, ""); } helpbutton("jumpto", get_string("jump", "lesson"), "lesson"); echo "

" /> " />