| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -46,18 +46,14 @@ if (empty($doc_url)) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					// Dealing with image included into survey: when users receive a link towards a | 
					 | 
					 | 
					 | 
					// Dealing with image included into survey: when users receive a link towards a | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					// survey while not being authenticated on the platform. | 
					 | 
					 | 
					 | 
					// survey while not being authenticated on the platform. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					// The administrator should probably be able to disable this code through admin | 
					 | 
					 | 
					 | 
					// The administrator should probably be able to disable this code through admin | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					// inteface. | 
					 | 
					 | 
					 | 
					// interface. | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					$refer_script = isset($_SERVER["HTTP_REFERER"]) ? strrchr($_SERVER["HTTP_REFERER"], '/') : null; | 
					 | 
					 | 
					 | 
					$refer_script = isset($_SERVER["HTTP_REFERER"]) ? strrchr($_SERVER["HTTP_REFERER"], '/') : null; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					$sys_course_path = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'; | 
					 | 
					 | 
					 | 
					$sys_course_path = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					if (substr($refer_script, 0, 15) == '/fillsurvey.php') { | 
					 | 
					 | 
					 | 
					if (substr($refer_script, 0, 15) == '/fillsurvey.php') { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    list($part1, $part2) = preg_split('/invitationcode=/', $refer_script); | 
					 | 
					 | 
					 | 
					    parse_str($refer_script, $parts); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    list($invitation, $part1) = preg_split('/&/', $part2); | 
					 | 
					 | 
					 | 
					    $course = isset($parts['course']) ? $parts['course'] : ''; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    unset($part1); | 
					 | 
					 | 
					 | 
					    $invitation = isset($parts['invitationcode']) ? $parts['invitationcode'] : ''; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    unset($part2); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    $course = strstr($refer_script, 'course='); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    $course = substr($course, 7, strpos($course, '&') - 7); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    include '../survey/survey.download.inc.php'; | 
					 | 
					 | 
					 | 
					    include '../survey/survey.download.inc.php'; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    $_course = check_download_survey($course, $invitation, $doc_url); | 
					 | 
					 | 
					 | 
					    $_course = check_download_survey($course, $invitation, $doc_url); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    $_course['path'] = $_course['directory']; | 
					 | 
					 | 
					 | 
					    $_course['path'] = $_course['directory']; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |