Minor - Cleanup course progress code

1.10.x
Yannick Warnier 10 years ago
parent f810f69e37
commit da86364ec5
  1. 3
      main/course_progress/thematic.php
  2. 4
      main/course_progress/thematic_controller.php

@ -275,8 +275,9 @@ if ($action == 'thematic_list') {
if (isset($error)) {
Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'),false);
}
if ($show_form)
if ($show_form) {
$form->display();
}
} elseif ($action == 'thematic_import_select') {
// Create form to upload csv file.
$form = new FormValidator('thematic_import','POST','index.php?action=thematic_import&'.api_get_cidreq().$url_token);

@ -55,8 +55,8 @@ class ThematicController
if (api_is_allowed_to_edit(null, true)) {
$id = isset($_POST['thematic_id']) ? $_POST['thematic_id'] : null;
$title = $_POST['title'];
$content = $_POST['content'];
$title = trim($_POST['title']);
$content = trim($_POST['content']);
$session_id = api_get_session_id();
$thematic->set_thematic_attributes($id, $title, $content, $session_id);
$last_id = $thematic->thematic_save();

Loading…
Cancel
Save