Thematic: Fix Teacher can't rearrange Course Progress content - refs BT#19222

pull/4029/head
Christian 4 years ago
parent 0dee07294e
commit 4d08554229
  1. 6
      main/course_progress/thematic.php

@ -121,13 +121,16 @@ if ($action == 'thematic_list') {
// Display thematic data // Display thematic data
if (!empty($thematic_data)) { if (!empty($thematic_data)) {
// display progress // display progress
$displayOrder = 1;
$maxThematicItem = count($thematic_data);
foreach ($thematic_data as $thematic) { foreach ($thematic_data as $thematic) {
$list['id'] = $thematic['id']; $list['id'] = $thematic['id'];
$list['id_course'] = $thematic['c_id']; $list['id_course'] = $thematic['c_id'];
$list['id_session'] = $thematic['session_id']; $list['id_session'] = $thematic['session_id'];
$list['title'] = Security::remove_XSS($thematic['title'], STUDENT); $list['title'] = Security::remove_XSS($thematic['title'], STUDENT);
$list['content'] = Security::remove_XSS($thematic['content'], 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']; $list['active'] = $thematic['active'];
$my_thematic_id = $thematic['id']; $my_thematic_id = $thematic['id'];
@ -214,6 +217,7 @@ if ($action == 'thematic_list') {
$listThematic[] = $list; $listThematic[] = $list;
$tpl->assign('data', $listThematic); $tpl->assign('data', $listThematic);
$displayOrder++;
} //End for } //End for
} }
$thematicLayout = $tpl->get_template('course_progress/progress.tpl'); $thematicLayout = $tpl->get_template('course_progress/progress.tpl');

Loading…
Cancel
Save