|
@@ -175,6 +175,7 @@ if ($action == 'thematic_list') {
|
|
$tpl->assign('data', $listThematic);
|
|
$tpl->assign('data', $listThematic);
|
|
} //End for
|
|
} //End for
|
|
}
|
|
}
|
|
|
|
+ $thematicLayout = $tpl->get_template('course_progress/progress.tpl');
|
|
} elseif ($action == 'thematic_add' || $action == 'thematic_edit') {
|
|
} elseif ($action == 'thematic_add' || $action == 'thematic_edit') {
|
|
// Display form
|
|
// Display form
|
|
$form = new FormValidator('thematic_add', 'POST', 'index.php?action=thematic_add&'.api_get_cidreq());
|
|
$form = new FormValidator('thematic_add', 'POST', 'index.php?action=thematic_add&'.api_get_cidreq());
|
|
@@ -213,7 +214,8 @@ if ($action == 'thematic_list') {
|
|
Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'), false);
|
|
Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'), false);
|
|
}
|
|
}
|
|
if ($show_form) {
|
|
if ($show_form) {
|
|
- $form->display();
|
|
|
|
|
|
+ $html = $form->return_form();
|
|
|
|
+
|
|
}
|
|
}
|
|
} elseif ($action == 'thematic_import_select') {
|
|
} elseif ($action == 'thematic_import_select') {
|
|
// Create form to upload csv file.
|
|
// Create form to upload csv file.
|
|
@@ -222,11 +224,15 @@ if ($action == 'thematic_list') {
|
|
$form->addElement('file', 'file');
|
|
$form->addElement('file', 'file');
|
|
$form->addElement('checkbox', 'replace', null, get_lang('DeleteAllThematic'));
|
|
$form->addElement('checkbox', 'replace', null, get_lang('DeleteAllThematic'));
|
|
$form->addButtonImport(get_lang('Import'), 'SubmitImport');
|
|
$form->addButtonImport(get_lang('Import'), 'SubmitImport');
|
|
- $form->display();
|
|
|
|
|
|
+ $html = $form->return_form();
|
|
}
|
|
}
|
|
-
|
|
|
|
$tpl->assign('actions', $toolbar);
|
|
$tpl->assign('actions', $toolbar);
|
|
-$tpl->assign('message', $message);
|
|
|
|
-$tpl->assign('score_progress', $total_average_of_advances);
|
|
|
|
-$thematicLayout = $tpl->get_template('course_progress/progress.tpl');
|
|
|
|
|
|
+if (!empty($html)) {
|
|
|
|
+ $tpl->assign('content', $html);
|
|
|
|
+ $thematicLayout = $tpl->get_template('course_progress/layout.tpl');
|
|
|
|
+}
|
|
|
|
+if (!empty($message) && !empty($total_average_of_advances)) {
|
|
|
|
+ $tpl->assign('message', $message);
|
|
|
|
+ $tpl->assign('score_progress', $total_average_of_advances);
|
|
|
|
+}
|
|
$tpl->display($thematicLayout);
|
|
$tpl->display($thematicLayout);
|