[svn r15136] Fixes to audio recorder

skala
Yannick Warnier 17 years ago
parent 3d3c19e819
commit 6063565436
  1. 8
      main/newscorm/audiorecorder.inc.php
  2. 8
      main/newscorm/display_audiorecorder.php

@ -8,17 +8,15 @@
* @author Arnaud Ligot <arnaud@cblue.be>
*/
global $_configuration;
$audio_recorder_tutorview = api_is_course_tutor();
$web_path = api_get_path(WEB_CODE_PATH);
if($audio_recorder_tutorview)
if($audio_recorder_studentview=='false')
{
$width = 295;
$height= 90;
$player = 'recorder2.swf';
$server = (api_get_setting('service_visio','visio_use_rtmpt')=='true'?'rtmpt://':'rtmp://').api_get_setting('service_visio','visio_host').':'.(api_get_setting('service_visio','visio_use_rtmpt')=='true'?'80':api_get_setting('service_visio','visio_port')).'/recorder';
$post_uri = urlencode($web_path.'conference/audiopost.php?course_code='.api_get_course_id().'&user_id='.api_get_user_id().'&checker='.md5(api_get_course_id().api_get_user_id().gmdate('Ymd').$_configuration['security_key']));
//$filename = str_replace('.','dot',substr($web_path,strpos($web_path,'://')+3,-1)).'-z-'.api_get_course_id().'-z-'.api_get_user_id().'-z-'.gmdate('YmdHis').'.flv';//using -z- as fields splitter
$filename = $mylpid.'-'.$mylpitemid.'-'.gmdate('YmdHis').api_get_user_id().'.flv';//using -z- as fields splitter
$filename = 'lpi'.$audio_recorder_item_id.'-'.gmdate('YmdHis').api_get_user_id().'.flv';//using -z- as fields splitter
$path_to_lzx = $web_path.'conference/'.$player.'?server='.urlencode($server).'&postURI='.$post_uri.'&filename='.$filename;
}
else
@ -29,7 +27,7 @@ else
$cp = api_get_course_path();
$docs = Database::get_main_table(TABLE_MAIN_DOCUMENT);
$select = "SELECT * FROM $docs " .
" WHERE path like BINARY '/audio/".Database::escape_string($mylpid).'-'.Database::escape_string($mylpitemid)."%' AND filetype='file' " .
" WHERE path like BINARY '/audio/lpi".Database::escape_string($audio_recorder_item_id)."-%' AND filetype='file' " .
" ORDER BY path DESC";
$res = api_sql_query($select);
if(Database::num_rows($res)>0)

@ -9,7 +9,6 @@
/**
* Script
*/
//flag to allow for anonymous user - needs to be set before global.inc.php
$use_anonymous = true;
@ -18,23 +17,16 @@ require_once('learnpath.class.php');
require_once('scorm.class.php');
require_once('aicc.class.php');
$mylpid = 0;
$mylpitemid = 0;
if(isset($_SESSION['lpobject']))
{
//if($debug>0) error_log('New LP - in lp_toc.php - SESSION[lpobject] is defined',0);
$oLP = unserialize($_SESSION['lpobject']);
if(is_object($oLP)){
$_SESSION['oLP'] = $oLP;
$mylpid = $oLP->get_id();
$mylpitemid = $oLP->get_current_item_id();
}else{
//error_log('New LP - in lp_toc.php - SESSION[lpobject] is not object - dying',0);
die('Could not instanciate lp object');
}
}
$charset = $_SESSION['oLP']->encoding;
//$lp_id = $_SESSION['oLP']->get_id();
echo '<html>
<body>';

Loading…
Cancel
Save