From 4d08554229a0664bc42005f0325945955dbc65c1 Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 15 Oct 2021 19:49:53 -0500 Subject: [PATCH] Thematic: Fix Teacher can't rearrange Course Progress content - refs BT#19222 --- main/course_progress/thematic.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main/course_progress/thematic.php b/main/course_progress/thematic.php index e91a1ae1ab..404f0b392c 100755 --- a/main/course_progress/thematic.php +++ b/main/course_progress/thematic.php @@ -121,13 +121,16 @@ if ($action == 'thematic_list') { // Display thematic data if (!empty($thematic_data)) { // display progress + $displayOrder = 1; + $maxThematicItem = count($thematic_data); foreach ($thematic_data as $thematic) { $list['id'] = $thematic['id']; $list['id_course'] = $thematic['c_id']; $list['id_session'] = $thematic['session_id']; $list['title'] = Security::remove_XSS($thematic['title'], STUDENT); $list['content'] = Security::remove_XSS($thematic['content'], STUDENT); - $list['display_orden'] = $thematic['display_order']; + $thematic['display_order'] = $displayOrder; + $thematic['max_thematic_item'] = $maxThematicItem; $list['active'] = $thematic['active']; $my_thematic_id = $thematic['id']; @@ -214,6 +217,7 @@ if ($action == 'thematic_list') { $listThematic[] = $list; $tpl->assign('data', $listThematic); + $displayOrder++; } //End for } $thematicLayout = $tpl->get_template('course_progress/progress.tpl');