Browse Source

[svn r10238] add the audiorecorder admin + creation

Eric Marguin 18 years ago
parent
commit
c6b3b53fe0

+ 10 - 0
main/admin/configure_extensions.php

@@ -109,6 +109,12 @@ if(isset($_POST['activeExtension'])){
 					WHERE variable="service_ppt2lp"
 					AND subkey="user"';
 			api_sql_query($sql, __FILE__, __LINE__);
+			
+			$sql = 'UPDATE '.$tbl_settings_current.' SET
+					selected_value="'.addslashes($_POST['ppt2lp_path_to_lzx']).'"
+					WHERE variable="service_ppt2lp"
+					AND subkey="path_to_lzx"';
+			api_sql_query($sql, __FILE__, __LINE__);
 				
 			break;		
 	}
@@ -275,6 +281,10 @@ Display::display_header($nameTool);
 											<td align="left">'.get_lang('FtpPassword').' : </td>
 											<td><input type="text" size="25" name="ppt2lp_ftp_password" /></td>
 										</tr>
+										<tr>
+											<td align="left">'.get_lang('PathToLzx').' : </td>
+											<td><input type="text" size="25" name="ppt2lp_path_to_lzx" /></td>
+										</tr>
 										<tr>
 											<td colspan="2">
 												<input type="hidden" name="extension_code" value="ppt2lp" />

+ 35 - 0
main/newscorm/audiorecorder.inc.php

@@ -0,0 +1,35 @@
+<?php
+/**
+ * Created on 27.09.2006
+ * Include the lazlo file necessary to use the audiorecorder  
+ * @author Sebastian Wagner <seba.wagner@gmail.com>
+ * @author Eric Marguin <e.marguin@elixir-interactive.com>
+ */
+ 
+/**
+ * this url should be removed with a path to another Application
+ */
+
+$params = "?lzt=swf&lzr=swf8&document_id=".$_GET['id']."&dbName=".$_SESSION["_course"]["dbName"]."&user_id=".$_SESSION["_user"]["user_id"] ;     
+$path_to_lzx = api_get_setting('service_ppt2lp','path_to_lzx');
+if(!empty($path_to_lzx)){
+
+	$path_to_lzx .= $params;
+	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='540px' HEIGHT='140px'>
+			 <param name='movie' VALUE='%s'>
+			 <param name='quality' VALUE='high'>
+			 <param name='scale' VALUE='scale'>
+			 <param name='swliveconnect' value='true'>
+			 <param name='FlashVars' value='document_id=%s&dbName=%s&user_id=%s' />
+			 <param name='salign' value='lt' />
+			 <param name='bgcolor' VALUE='#ffffff'> 
+			 <embed src='%s' quality='high' scale='noscale' salign='lb' 
+			 	bgcolor='#ffffff'  WIDTH='540px' HEIGHT='140px' ALIGN='center' TYPE='application/x-shockwave-flash' 
+			 	PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'>
+			 </embed>
+			 </object>", $path_to_lzx,Database::get_course_table('lp_item'),$_course["dbName"],$_user["user_id"],$path_to_lzx);
+}
+
+?>

+ 8 - 0
main/newscorm/learnpath.class.php

@@ -5941,7 +5941,15 @@ class learnpath {
 			
 			$return .= '<a href="' . $_SERVER['PHP_SELF'] . '?cidReq=' . $_GET['cidReq'] . '&amp;action=delete_item&amp;view=build&amp;id=' . $item_id . '&amp;lp_id=' . $this->lp_id . '" onclick="return confirmation(\'' . $row['title'] . '\');" title="Delete the current item"><img alt="Delete the current item" src="../img/delete.gif" title="Delete the current item" /> Delete</a>';
 		
+		ob_start();
+		if(api_get_setting('service_ppt2lp','active')=='true'){
+			include('audiorecorder.inc.php');
+		}
+		$return .= ob_get_contents();
+		ob_end_clean();
+		
 		$return .= '</div>';
+		
 
 		return $return;
 	}