diff --git a/mod/lesson/action/addbranchtable.php b/mod/lesson/action/addbranchtable.php index afd31463b10..3fb28ef18e0 100644 --- a/mod/lesson/action/addbranchtable.php +++ b/mod/lesson/action/addbranchtable.php @@ -37,7 +37,7 @@ print_heading_with_help(get_string("addabranchtable", "lesson"), "overview", "lesson"); ?>
-
+
@@ -45,13 +45,15 @@ - \n"; echo "\n"; for ($i = 0; $i < $lesson->maxanswers; $i++) { $iplus1 = $i + 1; - echo "\n"; - echo "\n"; switch ($qtype) { case LESSON_TRUEFALSE : diff --git a/mod/lesson/action/continue.php b/mod/lesson/action/continue.php index ad3ed95ef8a..6cd9e6b794f 100644 --- a/mod/lesson/action/continue.php +++ b/mod/lesson/action/continue.php @@ -772,7 +772,7 @@ lesson_set_message('('.get_string("maximumnumberofattemptsreached", "lesson").')'); } - lesson_print_header($cm, $course, $lesson, 'navigation'); + lesson_print_header($cm, $course, $lesson, 'view'); include(dirname(__FILE__).'/continue.html'); ?> diff --git a/mod/lesson/action/editpage.php b/mod/lesson/action/editpage.php index 35e85eddb6a..27c33520ec4 100644 --- a/mod/lesson/action/editpage.php +++ b/mod/lesson/action/editpage.php @@ -54,6 +54,7 @@ // give teacher a proforma ?> +
@@ -114,7 +115,9 @@ echo "
\n"; $n = 0; switch ($page->qtype) { @@ -477,4 +480,5 @@ " /> " /> + diff --git a/mod/lesson/edit.php b/mod/lesson/edit.php index 82d17558f9a..b9d1c2032ef 100644 --- a/mod/lesson/edit.php +++ b/mod/lesson/edit.php @@ -52,7 +52,7 @@ get_string("addabranchtable", "lesson")."

+

"; echo get_string("pagecontents", "lesson").":
\n"; - print_textarea($usehtmleditor, 25,70, 630, 400, "contents"); - use_html_editor("contents"); + print_textarea($usehtmleditor, 25,70, 0, 0, "contents"); + if ($usehtmleditor) { + use_html_editor("contents"); + } echo "
\n"; echo "
"; @@ -62,10 +64,10 @@ echo "
".get_string("description", "lesson")." $iplus1:
\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"; + echo "
".get_string("jump", "lesson")." $iplus1: \n"; if ($i) { // answers 2, 3, 4... jumpto this page choose_from_menu($jump, "jumpto[$i]", 0, ""); diff --git a/mod/lesson/action/addpage.php b/mod/lesson/action/addpage.php index e6ef9ef1c27..1d4130a89e1 100644 --- a/mod/lesson/action/addpage.php +++ b/mod/lesson/action/addpage.php @@ -47,7 +47,7 @@ print_heading_with_help(get_string("addaquestionpage", "lesson"), "overview", "lesson"); ?> -
+
@@ -78,7 +78,9 @@ echo "
"; echo get_string("pagecontents", "lesson").":
\n"; print_textarea($usehtmleditor, 25,70, 630, 400, "contents"); - use_html_editor("contents"); + if ($usehtmleditor) { + use_html_editor("contents"); + } echo "
"; echo get_string("pagecontents", "lesson").":
\n"; print_textarea($usehtmleditor, 25, 70, 630, 400, "contents", $page->contents); - use_html_editor("contents"); // always the editor + if ($usehtmleditor) { + use_html_editor("contents"); + } echo "
". "id&action=addpage&pageid=0&firstpage=1\">". get_string("addaquestionpage", "lesson"). - "
\n", 'center'); + "\n", 'center', '20%'); } } else { // Set some standard variables diff --git a/mod/lesson/styles.php b/mod/lesson/styles.php index f343c336441..af51fc20b98 100644 --- a/mod/lesson/styles.php +++ b/mod/lesson/styles.php @@ -23,6 +23,14 @@ vertical-align: middle; } +.mod-lesson .invisiblefieldset.fieldsetfix { + display: block; +} + +.mod-lesson .invisiblefieldset.fieldsetfix tr { + text-align: left; +} + /*** *** Style for view.php ***/ diff --git a/mod/lesson/tabs.php b/mod/lesson/tabs.php index d25c58cc25f..385f38e76b2 100644 --- a/mod/lesson/tabs.php +++ b/mod/lesson/tabs.php @@ -25,10 +25,7 @@ $course = get_record('course', 'id', $lesson->course); } - $tabs = array(); - $row = array(); - $inactive = array(); - + $tabs = $row = $inactive = $activated = array(); /// user attempt count for reports link hover (completed attempts - much faster) $counts = new stdClass; @@ -53,6 +50,7 @@ case 'reportdetail': /// sub tabs for reports (overview and detail) $inactive[] = 'reports'; + $activated[] = 'reports'; $row = array(); $row[] = new tabobject('reportoverview', "$CFG->wwwroot/mod/lesson/report.php?id=$cm->id&action=reportoverview", get_string('overview', 'lesson')); @@ -64,6 +62,7 @@ case 'single': /// sub tabs for edit view (collapsed and expanded aka full) $inactive[] = 'edit'; + $activated[] = 'edit'; $row = array(); $row[] = new tabobject('collapsed', "$CFG->wwwroot/mod/lesson/edit.php?id=$cm->id&mode=collapsed", get_string('collapsed', 'lesson')); @@ -72,6 +71,6 @@ break; } - print_tabs($tabs, $currenttab, $inactive); + print_tabs($tabs, $currenttab, $inactive, $activated); ?> diff --git a/mod/lesson/view.php b/mod/lesson/view.php index 044b99ba3b6..20800b2e012 100644 --- a/mod/lesson/view.php +++ b/mod/lesson/view.php @@ -688,14 +688,14 @@ } // Each button must have its own form inorder for it to work with JavaScript turned off $button = "
wwwroot/mod/lesson/lesson.php\">\n". - '
'; + '
'. "id\" />\n". "\n". "\n". "\n". "jumpto\" />\n". lesson_print_submit_link(strip_tags(format_text($answer->answer, FORMAT_MOODLE, $options)), "answerform$i", '', $class, '', '', true). - '
'. + '
'. ''; $buttons[$type][] = $button; @@ -722,11 +722,13 @@ echo ''; echo $fullbuttonhtml; } else { - echo ''; + echo ''; // ends the answers table + // When buttons are horizontal and inside the table, the button then line wraps when clicked in FF. + // Seems like the border-collapse might be the problem? Easiest fix is to move the buttons outside + // of the table. print_simple_box_start('center'); echo $fullbuttonhtml; print_simple_box_end(); - echo ''; // ends the answers table } break;