print_heading_with_help(get_string("addabranchtable", "lesson"), "overview", "lesson");
?>
<form id="form" method="post" action="lesson.php" class="addform">
- <fieldset class="invisiblefieldset">
+ <fieldset class="invisiblefieldset fieldsetfix">
<input type="hidden" name="id" value="<?PHP echo $cm->id ?>" />
<input type="hidden" name="action" value="insertpage" />
<input type="hidden" name="pageid" value="<?PHP echo $pageid ?>" />
<input type="hidden" name="sesskey" value="<?PHP echo $USER->sesskey ?>" />
<table class="generalbox boxaligncenter" cellpadding="5" border="1">
<tr valign="top">
- <td><b><label for="title"><?php print_string("pagetitle", "lesson"); ?>:</label></b><br />
+ <td><strong><label for="title"><?php print_string("pagetitle", "lesson"); ?>:</label></strong><br />
<input type="text" id="title" name="title" size="80" value="" /></td></tr>
<?php
echo "<tr><td><strong>";
echo get_string("pagecontents", "lesson").":</strong><br />\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 "</td></tr>\n";
echo "<tr><td>\n";
echo "<div class=\"boxaligncenter addform\"><input name=\"layout\" type=\"checkbox\" value=\"1\" checked=\"checked\" />";
echo "</td></tr>\n";
for ($i = 0; $i < $lesson->maxanswers; $i++) {
$iplus1 = $i + 1;
- echo "<tr><td><b>".get_string("description", "lesson")." $iplus1:</b><br />\n";
+ echo "<tr><td><strong>".get_string("description", "lesson")." $iplus1:</strong><br />\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 "</td></tr>\n";
- echo "<tr><td><b>".get_string("jump", "lesson")." $iplus1:</b> \n";
+ echo "<tr><td><strong>".get_string("jump", "lesson")." $iplus1:</strong> \n";
if ($i) {
// answers 2, 3, 4... jumpto this page
choose_from_menu($jump, "jumpto[$i]", 0, "");
print_heading_with_help(get_string("addaquestionpage", "lesson"), "overview", "lesson");
?>
<form id="form" method="post" action="lesson.php" class="addform">
- <fieldset class="invisiblefieldset">
+ <fieldset class="invisiblefieldset fieldsetfix">
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="action" value="insertpage" />
<input type="hidden" name="pageid" value="<?php echo $pageid ?>" />
echo "<tr><td><b>";
echo get_string("pagecontents", "lesson").":</b><br />\n";
print_textarea($usehtmleditor, 25,70, 630, 400, "contents");
- use_html_editor("contents");
+ if ($usehtmleditor) {
+ use_html_editor("contents");
+ }
echo "</td></tr>\n";
switch ($qtype) {
case LESSON_TRUEFALSE :
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');
?>
// give teacher a proforma
?>
<form id="editpage" method="post" action="lesson.php">
+ <fieldset class="invisiblefieldset fieldsetfix">
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="action" value="updatepage" />
<input type="hidden" name="pageid" value="<?php echo $pageid ?>" />
echo "<tr><td><b>";
echo get_string("pagecontents", "lesson").":</b><br />\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 "</td></tr>\n";
$n = 0;
switch ($page->qtype) {
<input type="submit" value="<?php print_string("savepage", "lesson") ?>" />
<input type="submit" name="cancel" value="<?php print_string("cancel") ?>" />
</center>
+ </fieldset>
</form>
get_string("addabranchtable", "lesson")."</a></td></tr><tr><td>".
"<a href=\"lesson.php?id=$cm->id&action=addpage&pageid=0&firstpage=1\">".
get_string("addaquestionpage", "lesson").
- "</a></td></tr></table>\n", 'center');
+ "</a></td></tr></table>\n", 'center', '20%');
}
} else {
// Set some standard variables
vertical-align: middle;
}
+.mod-lesson .invisiblefieldset.fieldsetfix {
+ display: block;
+}
+
+.mod-lesson .invisiblefieldset.fieldsetfix tr {
+ text-align: left;
+}
+
/***
*** Style for view.php
***/
$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;
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'));
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'));
break;
}
- print_tabs($tabs, $currenttab, $inactive);
+ print_tabs($tabs, $currenttab, $inactive, $activated);
?>
}
// Each button must have its own form inorder for it to work with JavaScript turned off
$button = "<form id=\"answerform$i\" method=\"post\" action=\"$CFG->wwwroot/mod/lesson/lesson.php\">\n".
- '<fieldset class="invisiblefieldset">';
+ '<fieldset class="invisiblefieldset">'.
"<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />\n".
"<input type=\"hidden\" name=\"action\" value=\"continue\" />\n".
"<input type=\"hidden\" name=\"pageid\" value=\"$pageid\" />\n".
"<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />\n".
"<input type=\"hidden\" name=\"jumpto\" value=\"$answer->jumpto\" />\n".
lesson_print_submit_link(strip_tags(format_text($answer->answer, FORMAT_MOODLE, $options)), "answerform$i", '', $class, '', '', true).
- '<fieldset>'.
+ '</fieldset>'.
'</form>';
$buttons[$type][] = $button;
echo '</div><!--end slideshow div-->';
echo $fullbuttonhtml;
} else {
- echo '<tr><td>';
+ echo '<tr><td></td></tr></table>'; // 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 '</td></tr></table>'; // ends the answers table
}
break;