Bläddra i källkod

[svn r10319] audiorecorder patch

Eric Marguin 18 år sedan
förälder
incheckning
2ba8fdb185

+ 4 - 3
main/newscorm/audiorecorder.inc.php

@@ -9,9 +9,9 @@
  
 
 
-$params = "?lzt=swf&lzr=swf8&document_id=".$audio_recorder_item_id."&dbName=".$_SESSION["_course"]["dbName"]."&user_id=".$_SESSION["_user"]["user_id"].'?studentview='.$audio_recorder_studentview ;     
+$params = "?lzt=swf&lzr=swf8&document_id=".$audio_recorder_item_id."&dbName=".$_SESSION["_course"]["dbName"]."&user_id=".$_SESSION["_user"]["user_id"].'&studentview='.$audio_recorder_studentview ;     
 
-list($width, $height) = $audio_recorder_studentview ? array(220, 67) : array(220,140);
+list($width, $height) = $audio_recorder_studentview == 'true' ? array(220, 67) : array(220,140);
 
 $path_to_lzx = api_get_setting('service_ppt2lp','path_to_lzx');
 
@@ -22,6 +22,7 @@ if(!empty($path_to_lzx)){
 	printf ("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'
 				codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0'
 			 WIDTH='".$width."px' HEIGHT='".$height."px'>
+			 <param name='studentview' VALUE='%s'>
 			 <param name='movie' VALUE='%s'>
 			 <param name='quality' VALUE='high'>
 			 <param name='scale' VALUE='scale'>
@@ -33,7 +34,7 @@ if(!empty($path_to_lzx)){
 			 	bgcolor='#ffffff'  WIDTH='".$width."px' HEIGHT='".$height."px' ALIGN='center' TYPE='application/x-shockwave-flash' 
 			 	PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'>
 			 </embed>
-			 </object>", $path_to_lzx,$audio_recorder_item_id,$_course["dbName"],$_user["user_id"],$path_to_lzx);
+			 </object>",$audio_recorder_studentview,  $path_to_lzx,$audio_recorder_item_id,$_course["dbName"],$_user["user_id"],$path_to_lzx);
 }
 
 ?>

+ 3 - 8
main/newscorm/display_audiorecorder.php

@@ -31,14 +31,9 @@ echo '<html>
 
 echo '<div id="audiorecorder">	';
 	
-// get the audiorecorder.
-$course_id=$_SESSION["_course"]["id"];
-if($_SESSION["status"][$course_id]==5){
-	$audio_recorder_studentview = true;
-}
-else{
-	$audio_recorder_studentview = false;
-}
+
+$audio_recorder_studentview = false;
+
 
 $audio_recorder_item_id = $_SESSION['oLP']->current;
 if(api_get_setting('service_ppt2lp','active')=='true' && api_get_setting('service_ppt2lp','path_to_lzx')!=''){

+ 1 - 1
main/newscorm/learnpath.class.php

@@ -6000,7 +6000,7 @@ class learnpath {
 		
 		// get the audiorecorder. Use of ob_* functions since there are echos in the file
 		ob_start();
-		$audio_recorder_studentview = false;
+		$audio_recorder_studentview = 'false';
 		$audio_recorder_item_id = $item_id;
 		if(api_get_setting('service_ppt2lp','active')=='true' && api_get_setting('service_ppt2lp','path_to_lzx')!=''){
 			include('audiorecorder.inc.php');