Browse Source

Save and redirect to Thematic Control when you save in the Edit Thematic Advance form - refs #7253

Angel Fernando Quiroz Campos 10 years ago
parent
commit
b9bf6d1044
2 changed files with 10 additions and 0 deletions
  1. 4 0
      main/course_progress/thematic.php
  2. 6 0
      main/course_progress/thematic_controller.php

+ 4 - 0
main/course_progress/thematic.php

@@ -53,6 +53,10 @@ if ($action == 'thematic_list') {
 	$table->display();
 	
 } elseif ($action == 'thematic_details') {
+    
+    if (isset($_GET['thematic_plan_save_message']) && $_GET['thematic_plan_save_message'] == 'ok') {
+        Display::display_confirmation_message(get_lang('ThematicSectionHasBeenCreatedSuccessfull'));
+    }
 
 	if (isset($last_id) && $last_id) {
 		$link_to_thematic_plan = '<a href="index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$last_id.'">'.Display::return_icon('lesson_plan.png', get_lang('ThematicPlan'), array('style'=>'vertical-align:middle;float:none;'),ICON_SIZE_SMALL).'</a>';

+ 6 - 0
main/course_progress/thematic_controller.php

@@ -286,6 +286,12 @@ class ThematicController
                             }
                             unset($_SESSION['thematic_plan_token']);
                             $data['message'] = 'ok';
+                            
+                            $saveRedirect = api_get_path(WEB_PATH) . 'main/course_progress/index.php?';
+                            $saveRedirect.= api_get_cidreq() . '&';
+                            $saveRedirect.= 'thematic_plan_save_message=ok';
+
+                            header("Location: $saveRedirect");
                         }
                         $data['action'] = 'thematic_plan_list';
                     }