From f9d7be71d3ef9a2710a05a8d54f649190a61e140 Mon Sep 17 00:00:00 2001 From: Francis Gonzales Date: Tue, 14 Feb 2023 11:34:38 -0500 Subject: [PATCH] Plugin: AI Helper: Fix wrong order of items in learning path - refs #4604 --- plugin/ai_helper/tool/learnpath.php | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/ai_helper/tool/learnpath.php b/plugin/ai_helper/tool/learnpath.php index b5e32def48..e75307a044 100644 --- a/plugin/ai_helper/tool/learnpath.php +++ b/plugin/ai_helper/tool/learnpath.php @@ -52,6 +52,7 @@ switch ($apiName) { // Create the learnpath and return the id generated. $return = ['success' => false, 'lp_id' => 0]; if (!empty($lpItems)) { + krsort($lpItems); $lpId = learnpath::add_lp( $courseCode, $topic,