]> git.mjollnir.org Git - moodle.git/commitdiff
Merged in several display and bug fixes from MOODLE_18_STABLE
authormark-nielsen <mark-nielsen>
Fri, 23 Feb 2007 20:20:50 +0000 (20:20 +0000)
committermark-nielsen <mark-nielsen>
Fri, 23 Feb 2007 20:20:50 +0000 (20:20 +0000)
mod/lesson/action/addbranchtable.php
mod/lesson/action/addpage.php
mod/lesson/action/continue.php
mod/lesson/action/editpage.php
mod/lesson/edit.php
mod/lesson/styles.php
mod/lesson/tabs.php
mod/lesson/view.php

index afd31463b10b0cc9525b7fade945992b88efb5df..3fb28ef18e0b6b16e332fb9e42dcbbbb38ab95bc 100644 (file)
@@ -37,7 +37,7 @@
     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, "");
index e6ef9ef1c2702ee674337479207eecb564a0e9dc..1d4130a89e174deffd0dc2136aad692bceaf412e 100644 (file)
@@ -47,7 +47,7 @@
     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 ?>" />
@@ -78,7 +78,9 @@
     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 :
index ad3ed95ef8a54b30b453464185927528ecbadc3c..6cd9e6b794f1cb3a09ff94cfacdb4d2994e106c6 100644 (file)
         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');
 ?>
index 35e85eddb6a6d1c21218e776033c3992feac9408..27c33520ec4932cd722c7f5e39870ed383594ebe 100644 (file)
@@ -54,6 +54,7 @@
     // 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>
index 82d17558f9a24e56f11f447f410c2804182a923b..b9d1c2032ef3c87052f6d013ffc5f85c45e3c009 100644 (file)
@@ -52,7 +52,7 @@
                 get_string("addabranchtable", "lesson")."</a></td></tr><tr><td>".
                 "<a href=\"lesson.php?id=$cm->id&amp;action=addpage&amp;pageid=0&amp;firstpage=1\">".
                 get_string("addaquestionpage", "lesson").
-                "</a></td></tr></table>\n", 'center');
+                "</a></td></tr></table>\n", 'center', '20%');
         }
     } else {
         // Set some standard variables
index f343c33644164c6981468c015e45909d8d90c6d0..af51fc20b98b67a0171619177e5557b3902ec29d 100644 (file)
     vertical-align: middle;
 }
 
+.mod-lesson .invisiblefieldset.fieldsetfix {
+    display: block;
+}
+
+.mod-lesson .invisiblefieldset.fieldsetfix tr {
+    text-align: left;
+}
+
 /***
  *** Style for view.php
  ***/
index d25c58cc25f3a0e2cc6bdbf6e14863ad0ccaf048..385f38e76b24f45ce86e4aff5c77ebdc0d5e7425 100644 (file)
         $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&amp;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&amp;mode=collapsed", get_string('collapsed', 'lesson'));
@@ -72,6 +71,6 @@
             break;
     }
 
-    print_tabs($tabs, $currenttab, $inactive);
+    print_tabs($tabs, $currenttab, $inactive, $activated);
 
 ?>
index 044b99ba3b6668c11b094dcbb3fd247ef38c04fb..20800b2e01292c5336b7931781ad86b6dd3fbe62 100644 (file)
                         }
                         // 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;