]> git.mjollnir.org Git - moodle.git/commitdiff
Follow up fixes MDL-12029 "Glossary view needs heading markup..."
authornfreear <nfreear>
Wed, 7 Nov 2007 17:45:57 +0000 (17:45 +0000)
committernfreear <nfreear>
Wed, 7 Nov 2007 17:45:57 +0000 (17:45 +0000)
mod/glossary/formats/TEMPLATE/TEMPLATE_format.php
mod/glossary/formats/continuous/continuous_format.php
mod/glossary/formats/dictionary/dictionary_format.php
mod/glossary/formats/encyclopedia/encyclopedia_format.php
mod/glossary/formats/entrylist/entrylist_format.php
mod/glossary/formats/faq/faq_format.php
mod/glossary/formats/fullwithauthor/fullwithauthor_format.php
mod/glossary/formats/fullwithoutauthor/fullwithoutauthor_format.php
mod/glossary/lib.php
mod/glossary/view.php
theme/standard/styles_fonts.css

index 96886b5bc5713ff32e592a986e8cfe9de1fbac7d..b13d962507573ebf3c0f0e459fa484a167224c86 100755 (executable)
@@ -24,6 +24,7 @@ function glossary_show_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode='',
         //Use this code to show author's name
         //Comments: Configuration not supported
         $fullname = fullname($user);
+        $by = new object();
         $by->name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&amp;course='.$course->id.'">'.$fullname.'</a>';
         $by->date = userdate($entry->timemodified);
         echo '<span class="author">'.get_string('bynameondate', 'forum', $by).'</span>' . '<br />';
@@ -67,12 +68,12 @@ function glossary_show_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode='',
         echo '<tr valign="top">';
         echo '<td class="entry">';
 
-        //Use this function to print the concept
+        //Use this function to print the concept in a heading <h3>
         //Comments: Configuration not supported
         glossary_print_entry_concept($entry);
 
-        //Line separator to show this template fine. :-)
-        echo "<br />\n";
+        //Line separator not normally needed now.
+        //echo "<br />\n";
 
         //Use this function to show the definition 
         //Comments: Configuration not supported
index a1152bd04a57b72fcdeef31ecaab8794279496f6..f87d0fc008f9374be0acfbed936f98da7c39665e 100644 (file)
@@ -9,9 +9,9 @@ function glossary_show_entry_continuous($course, $cm, $glossary, $entry, $mode='
     echo '<td class="entry">';
     glossary_print_entry_approval($cm, $entry, $mode);
     glossary_print_entry_attachment($entry,'html','right');
-    echo '<span class="concept">';
+    echo '<div class="concept">';
     glossary_print_entry_concept($entry);
-    echo ':</span> ';
+    echo ':</div> ';
     glossary_print_entry_definition($entry);
     $entry->alias = '';
     echo '</td></tr>';
index db5634b536d7c7b87676c6bb19d0693f76a5ed06..e24c2f661d65b8efe9abe984cdf17154aaa91cad 100644 (file)
@@ -9,9 +9,9 @@ function glossary_show_entry_dictionary($course, $cm, $glossary, $entry, $mode='
     echo '<td class="entry">';
     glossary_print_entry_approval($cm, $entry, $mode);
     glossary_print_entry_attachment($entry,'html','right');
-    echo '<span class="concept">';
+    echo '<div class="concept">';
     glossary_print_entry_concept($entry);
-    echo ':</span> ';
+    echo ':</div> ';
     glossary_print_entry_definition($entry);
     echo '</td></tr>';
     echo '<tr valign="top"><td class="entrylowersection">';
index e46ce0280fe62a45547783faa58b2809bcf53dc6..b19ead33ff5fc8ba2593dd9681a29b4227a21d93 100644 (file)
@@ -17,9 +17,9 @@ function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode
     
         echo '</td>';
         echo '<th class="entryheader">';
-        echo '<span class="concept">';
+        echo '<div class="concept">';
         glossary_print_entry_concept($entry);
-        echo '</span>';
+        echo '</div>';
 
         $fullname = fullname($user);
         $by->name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&amp;course='.$course->id.'">'.$fullname.'</a>';
index 011748b93e4a31e577cfe13cd9a2464ea113566a..47b2e5438de604eedb19b086b1b2c74719deee94 100644 (file)
@@ -11,9 +11,9 @@ function glossary_show_entry_entrylist($course, $cm, $glossary, $entry, $mode=''
     echo '<td class="entry">';
     if ($entry) {
         glossary_print_entry_approval($cm, $entry, $mode);
-        echo "<span class=\"concept\"><a href=\"showentry.php?courseid=$course->id&amp;eid=$entry->id&amp;displayformat=dictionary\" target=\"_blank\" onClick=\"return openpopup('/mod/glossary/showentry.php?courseid=$course->id&amp;eid=$entry->id&amp;displayformat=dictionary', 'entry', 'menubar=0,location=0,scrollbars,resizable,width=600,height=450', 0);\">";
+        echo "<div class=\"concept\"><a href=\"showentry.php?courseid=$course->id&amp;eid=$entry->id&amp;displayformat=dictionary\" target=\"_blank\" onclick=\"return openpopup('/mod/glossary/showentry.php?courseid=$course->id&amp;eid=$entry->id&amp;displayformat=dictionary', 'entry', 'menubar=0,location=0,scrollbars,resizable,width=600,height=450', 0);\">";
         glossary_print_entry_concept($entry);
-        echo '</a></span> ';
+        echo '</a></div> ';
         echo '</td><td align="right" class="entrylowersection">';
         if ($printicons) {
             glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode, $hook,'print');
index b4ed5cc7066b814079c9a779adf6e21c6eda5d22..0780a5802add5824178b024f8ae6379a83c2cbc0 100644 (file)
@@ -11,9 +11,9 @@ function glossary_show_entry_faq($course, $cm, $glossary, $entry, $mode="", $hoo
         echo '<th class="entryheader">';
         $entry->course = $course->id;
 
-        echo '<span class="concept">' . get_string('question','glossary') . ': ';
+        echo '<div class="concept">' . get_string('question','glossary') . ': ';
         glossary_print_entry_concept($entry);
-        echo '</span>';
+        echo '</div>';
 
         echo '<span class="time">('.get_string('lastedited').': '.
              userdate($entry->timemodified).')</span>';
index 545069257e69c31be7fea41ee824c2087924bfe4..f251bfaf99675efea0252765a8956e10923388a7 100644 (file)
@@ -16,18 +16,19 @@ function glossary_show_entry_fullwithauthor($course, $cm, $glossary, $entry, $mo
         print_user_picture($user->id, $course->id, $user->picture);
         echo '</td>';
         
-        echo '<td class="entryheader">';
+        echo '<th class="entryheader">';
 
-        echo '<span class="concept">';
+        echo '<div class="concept">';
         glossary_print_entry_concept($entry);
-        echo '</span><br />';
+        echo '</div>';
 
         $fullname = fullname($user);
+        $by = new object();
         $by->name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&amp;course='.$course->id.'">'.$fullname.'</a>';
         $by->date = userdate($entry->timemodified);
         echo '<span class="author">'.get_string('bynameondate', 'forum', $by).'</span>';
 
-        echo '</td>';
+        echo '</th>';
         echo '<td class="entryattachment">';
 
         glossary_print_entry_approval($cm, $entry, $mode);
index fad2ba4f37d3876aaba1ff6d301d8a815f6dfa42..06534b2d44a1e2fb6a2135bfd97f0ac2ffa58729 100644 (file)
@@ -9,15 +9,15 @@ function glossary_show_entry_fullwithoutauthor($course, $cm, $glossary, $entry,
         echo '<table class="glossarypost fullwithoutauthor" cellspacing="0">';
         echo '<tr valign="top">';
 
-        echo '<td class="entryheader">';
+        echo '<th class="entryheader">';
 
-        echo '<span class="concept">';
+        echo '<div class="concept">';
         glossary_print_entry_concept($entry);
-        echo '</span><br />';
+        echo '</div>';
 
         echo '<span class="time">('.get_string('lastedited').': '.
              userdate($entry->timemodified).')</span>';
-        echo '</td>';
+        echo '</th>';
         echo '<td class="entryattachment">';
 
         glossary_print_entry_approval($cm, $entry, $mode);
index fe100d0f9f182fcb12d1adfc8b812726be121885..83053f8b304441d1bcc8f6f2eed9781432c436ba 100644 (file)
@@ -668,10 +668,13 @@ function glossary_print_entry_default ($entry) {
     echo '<br /><br />';
 }
 
+/**
+ * Print glossary concept/term as a heading &lt;h3>
+ */
 function  glossary_print_entry_concept($entry) {
     $options = new object();
     $options->para = false;
-    $text = format_text('<h3 class="nolink">' . $entry->concept . '</h3>', FORMAT_MOODLE, $options);
+    $text = format_text(print_heading($entry->concept, '', 3, 'nolink'), FORMAT_MOODLE, $options);
     if (!empty($entry->highlight)) {
         $text = highlight($entry->highlight, $text);
     }
index bac4bad575decc1dec5b94363d5210b37c6ef1da..f55ad450b2b9e75af8be91efe11fa2ab4e1d68a8 100644 (file)
                     $pivottoshow = $currentpivot;
                     if ( isset($entry->userispivot) ) {
                     // printing the user icon if defined (only when browsing authors)
-                        echo '<td align="left">';
+                        echo '<th align="left">';
 
                         $user = get_record("user","id",$entry->userid);
                         print_user_picture($user->id, $course->id, $user->picture);
                     }
 
                     print_heading($pivottoshow);
-                    echo '</th></tr></table></div>';
+                    echo "</th></tr></table></div>\n";
 
                 }
             }
index 25243fb0d2f8470fd75733e7d2659eda9edd8178..95f7891fed4ed069574502db3f57f249724a607a 100644 (file)
@@ -734,12 +734,15 @@ body#mod-forum-index .generalbox .cell {
 .glossarypost .time {
   font-size: 0.8em;
 }
-.glossarycategoryheader h2 {
-  margin: 0;
-} 
+.glossarycategoryheader h2,
 .glossarypost .concept h3 {
+  font-size: 1em;
   margin: 0;
 }
+.glossarypost div.concept h3,
+.glossarypost.continuous .concept {
+  display: inline;
+}
 .glossarypost .entryheader {
   font-weight: normal;
   text-align: left;