| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -67,14 +67,23 @@ switch ($action) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (Security::check_token('get')) { | 
					 | 
					 | 
					 | 
					        if (Security::check_token('get')) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            $courseInfo = api_get_course_info($courseCodeToSubscribe); | 
					 | 
					 | 
					 | 
					            $courseInfo = api_get_course_info($courseCodeToSubscribe); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            CourseManager::autoSubscribeToCourse($courseCodeToSubscribe); | 
					 | 
					 | 
					 | 
					            if (!empty($courseInfo)) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            $redirectionTarget = CoursesAndSessionsCatalog::generateRedirectUrlAfterSubscription( | 
					 | 
					 | 
					 | 
					                CourseManager::autoSubscribeToCourse($courseCodeToSubscribe); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                $courseInfo['course_public_url'] | 
					 | 
					 | 
					 | 
					                $redirectionTarget = CoursesAndSessionsCatalog::generateRedirectUrlAfterSubscription( | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            ); | 
					 | 
					 | 
					 | 
					                    $courseInfo['course_public_url'] | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                ); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            header("Location: $redirectionTarget"); | 
					 | 
					 | 
					 | 
					                header("Location: $redirectionTarget"); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            exit; | 
					 | 
					 | 
					 | 
					                exit; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        Display::addFlash( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            Display::return_message(get_lang('NoResults'), 'warning') | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        ); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        CoursesAndSessionsCatalog::displayCoursesList('search_course', $searchTerm, $categoryCode); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        exit; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        break; | 
					 | 
					 | 
					 | 
					        break; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    case 'subscribe_course_validation': | 
					 | 
					 | 
					 | 
					    case 'subscribe_course_validation': | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        $toolTitle = get_lang('Subscribe'); | 
					 | 
					 | 
					 | 
					        $toolTitle = get_lang('Subscribe'); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |