MDL-60181 glossary: Glossary rating is displayed wrongly
authorMihail Geshoski <mihail@moodle.com>
Mon, 22 Jan 2018 05:51:58 +0000 (13:51 +0800)
committerMihail Geshoski <mihail@moodle.com>
Mon, 22 Jan 2018 05:51:58 +0000 (13:51 +0800)
mod/glossary/formats/entrylist/entrylist_format.php
mod/glossary/lib.php

index 6a35248..b1482f6 100644 (file)
@@ -25,7 +25,7 @@ function glossary_show_entry_entrylist($course, $cm, $glossary, $entry, $mode=''
         }
         if (!empty($entry->rating)) {
             echo '<br />';
-            echo '<span class="ratings">';
+            echo '<span class="ratings d-block p-t-1">';
             $return = glossary_print_entry_ratings($course, $entry);
             echo '</span>';
         }
@@ -37,7 +37,8 @@ function glossary_show_entry_entrylist($course, $cm, $glossary, $entry, $mode=''
     }
     echo '</td></tr>';
 
-    echo "</table>\n";
+    echo "</table>";
+    echo "<hr>\n";
     return $return;
 }
 
index b3c9f92..83ec65d 100644 (file)
@@ -1329,7 +1329,6 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h
         $return .= '<div>'.$comment->output(true).'</div>';
         $output = true;
     }
-    $return .= '<hr>';
 
     //If we haven't calculated any REAL thing, delete result ($return)
     if (!$output) {
@@ -1373,11 +1372,12 @@ function  glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $m
             echo '<tr valign="top"><td class="icons">'.$icons.'</td></tr>';
         }
         if (!empty($entry->rating)) {
-            echo '<tr valign="top"><td class="ratings">';
+            echo '<tr valign="top"><td class="ratings p-t-1">';
             glossary_print_entry_ratings($course, $entry);
             echo '</td></tr>';
         }
         echo '</table>';
+        echo "<hr>\n";
     }
 }