]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-18244 sql_length() - apply new function to resource names filter ; merged from...
authorstronk7 <stronk7>
Sun, 15 Feb 2009 23:23:41 +0000 (23:23 +0000)
committerstronk7 <stronk7>
Sun, 15 Feb 2009 23:23:41 +0000 (23:23 +0000)
mod/resource/filter.php

index 54826a741eb3f4ec7107b3aba118df1ed7d1d694..6ecfcc7594cf8c4c6b076203cc246c8550a426ce 100644 (file)
@@ -43,7 +43,7 @@
                                      cm.visible =  1 AND
                                      r.id = cm.instance AND
                                      cm.course = ?
-                            ORDER BY CHAR_LENGTH(r.name) DESC, cm.section ASC";
+                            ORDER BY " . $DB->sql_length('r.name') . " DESC, cm.section ASC";
 
             if (!$resources = $DB->get_records_sql($resource_sql, array($courseid)) ){
                 $nothingtodo = true;