MDL-69399 LTI: Alphabetize LTI tool list in selection menu
authorMichelle Melton <meltonml@appstate.edu>
Tue, 20 Oct 2020 20:52:44 +0000 (16:52 -0400)
committerMichelle Melton <meltonml@appstate.edu>
Fri, 18 Dec 2020 13:58:07 +0000 (08:58 -0500)
mod/lti/locallib.php

index 33854f1..12969d1 100644 (file)
@@ -2321,7 +2321,8 @@ function lti_get_lti_types_by_course($courseid, $coursevisible = null) {
                 FROM {lti_types}
                WHERE coursevisible $coursevisiblesql
                  AND ($coursecond)
-                 AND state = :active";
+                 AND state = :active
+            ORDER BY name ASC";
 
     return $DB->get_records_sql($query,
         array('siteid' => $SITE->id, 'courseid' => $courseid, 'active' => LTI_TOOL_STATE_CONFIGURED) + $coursevisparams);