Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

- Fixed some bugs detected with Jeff's glossary (mostly with dynalink…

… link feature)
  • Loading branch information...
commit 4d4c38f3fe2ba267fa1dec7f918e63268bc7ea72 1 parent e023438
authored October 21, 2003
18  mod/glossary/dynalink.php
@@ -12,7 +12,7 @@ function glossary_dynamic_link($courseid, $text) {
@@ -20,7 +20,7 @@ function glossary_dynamic_link($courseid, $text) {
@@ -80,11 +80,13 @@ function glossary_link_concepts($text,$concept,$href_tag_begin,$href_tag_end = "
@@ -149,4 +151,4 @@ function glossary_sort_entries_by_lenght ( $entry0, $entry1 ) {
4  mod/glossary/edit.php
@@ -110,9 +110,9 @@
110 110
 
111 111
     delete_records("glossary_entries_categories","entryid",$e);
112 112
 
113  
-    if ( $categories ) {
  113
+    if ( isset($form->categories) ) {
114 114
         $newcategory->entryid = $newentry->id;
115  
-        foreach ($categories as $category) {
  115
+        foreach ($form->categories as $category) {
116 116
             if ( $category > 0 ) {
117 117
                 $newcategory->categoryid =$category;
118 118
                 insert_record("glossary_entries_categories",$newcategory);
4  mod/glossary/lib.php
@@ -418,8 +418,8 @@ function glossary_search_entries($searchterms, $glossary, $includedefinition) {
418 418
 
419 419
 //    $totalcount = count_records_sql("SELECT COUNT(*) FROM $selectsql");
420 420
 
421  
-    return get_records_sql("SELECT e.concept, e.definition, e.userid, e.timemodified, e.id, e.format 
422  
-                            FROM $selectsql ORDER BY e.concept ASC $limit");
  421
+    return get_records_sql("SELECT e.* 
  422
+                            FROM $selectsql ORDER BY e.concept ASC");
423 423
 }
424 424
 
425 425
 function glossary_file_area_name($entry) {
4  mod/glossary/showentry.php
@@ -8,10 +8,10 @@
8 8
     print_header();
9 9
     $entries = get_records_sql("select e.* from {$CFG->prefix}glossary_entries e, {$CFG->prefix}glossary g".
10 10
                                   " where e.glossaryid = g.id and".
11  
-                                      " (e.casesensitive = 1 and ucase(concept) = '" . strtoupper(trim($concept)). "' or".
  11
+                                      " (e.casesensitive != 0 and ucase(concept) = '" . strtoupper(trim($concept)). "' or".
12 12
                                       " e.casesensitive = 0 and concept = '$concept') and".
13 13
                                       " g.course = $courseid and".
14  
-                                      " e.usedynalink = 1 and g.usedynalink = 1");
  14
+                                      " e.usedynalink != 0 and g.usedynalink != 0");
15 15
     
16 16
     glossary_print_dynaentry($courseid, $entries);
17 17
     
4  mod/glossary/view.php
@@ -296,8 +296,8 @@
296 296
                                 } 
297 297
                             } 
298 298
                         } 
299  
-                        $dumptoscreen = 1;
300 299
                     }
  300
+                    $dumptoscreen = 1;
301 301
                 } elseif ($l == "SPECIAL" and ord($firstletter) != ord("Ñ") and 
302 302
                          (ord($firstletter) < ord("A") or ord($firstletter) > ord("Z"))) {
303 303
                     $dumptoscreen = 1;
@@ -328,9 +328,9 @@
328 328
                                     if ( $glossary->displayformat == GLOSSARY_FORMAT_CONTINUOUS ) {
329 329
                                         echo "</center><p>";
330 330
                                     }
331  
-                                    $dumptoscreen = 1;
332 331
                                 }
333 332
                             } 
  333
+                            $dumptoscreen = 1;
334 334
     
335 335
                             if ($glossary->displayformat == GLOSSARY_FORMAT_SIMPLE) {
336 336
                                 echo "\n</center></td></tr></table></center>";

0 notes on commit 4d4c38f

Please sign in to comment.
Something went wrong with that request. Please try again.