Task #1765 - LP tool, cleaning files (2).

skala
Ivan Tcholakov 14 years ago
parent 2826f1d418
commit 88d0e16fb7
  1. 37
      main/newscorm/audiorecorder.inc.php
  2. 7
      main/newscorm/back_compat.inc.php
  3. 15
      main/newscorm/blank.php
  4. 13
      main/newscorm/content_makers.inc.php
  5. 27
      main/newscorm/display_audiorecorder.php
  6. 7
      main/newscorm/index.php

@ -1,17 +1,19 @@
<?php //$id: $
// This file is part of the Dokeos software - See license and credits in the documentation/ directory
<?php
/* For licensing terms, see /license.txt */
/**
* 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>
* @author Arnaud Ligot <arnaud@cblue.be>
* @package chamilo.learnpath
*/
global $_configuration;
$web_path = api_get_path(WEB_CODE_PATH);
$getid3_path = api_get_path(LIBRARY_PATH);
require_once $getid3_path.'getid3/getid3.php';
function getFLVDuration($flv_path) {
@ -25,19 +27,15 @@ function getFLVDuration($flv_path) {
}
}
if($audio_recorder_studentview=='false')
{
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';
$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 = 'lpi'.$audio_recorder_item_id.'-'.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
{
} else {
$width = 295;
$height = 24;
$player = 'player2.swf';
@ -47,8 +45,7 @@ else
" WHERE path like BINARY '/audio/lpi".Database::escape_string($audio_recorder_item_id)."-%' AND filetype='file' " .
" ORDER BY path DESC";
$res = Database::query($select);
if(Database::num_rows($res)>0)
{
if (Database::num_rows($res) > 0) {
$row = Database::fetch_array($res);
//$filepath = api_get_path(WEB_COURSE_PATH).$cp.'/document'.$row['path'];
$duration = getFLVDuration(api_get_path(SYS_COURSE_PATH).$cp.'/document'.$row['path']);
@ -57,16 +54,15 @@ else
}
}
if(!empty($path_to_lzx)){
if (!empty($path_to_lzx)) {
$recorder_content = sprintf("<object type=\"application/x-shockwave-flash\" data=\"%s\" ".
"width='$width' height='$height'>".
"<param name=\"movie\" value=\"%s\">".
"<param name=\"quality\" value=\"high\">".
"<param name=\"scale\" value=\"noscale\">".
"<param name=\"salign\" value=\"LT\">".
"<param name=\"menu\" value=\"false\"></object>",$path_to_lzx,$path_to_lzx);
if($audio_recorder_studentview=='false')
{
"<param name=\"menu\" value=\"false\"></object>", $path_to_lzx, $path_to_lzx);
if ($audio_recorder_studentview == 'false') {
echo '<script type="text/javascript">
function show_audiorecorder()
@ -77,13 +73,10 @@ if(!empty($path_to_lzx)){
</script>
';
//Commented the audio for the version stable
// Commented the audio for the version stable.
//echo '<div id="show_audiorecorder_div"><a style="cursor:pointer" onclick="show_audiorecorder()">'.get_lang('ShowAudioRecorder').'</a></div>';
//echo '<div id="audiorecorder_frame"></div>';
}
else
{
} else {
echo $recorder_content;
}
}
?>

@ -1,5 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* This script used to allow compatibility between the New SCORM tool and both
* version 1.6.3 and 1.8 of Dokeos by loading libraries in a different way.
@ -7,11 +8,11 @@
* something like lp_includes.inc.php
* @package chamilo.learnpath
*/
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'database.lib.php';
require_once api_get_path(LIBRARY_PATH).'document.lib.php';
require_once api_get_path(LIBRARY_PATH).'fileDisplay.lib.php';
require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php'; //replace_dangerous_char()
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php'; //check_name_exists()
require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php'; // replace_dangerous_char()
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php'; // check_name_exists()
require_once api_get_path(LIBRARY_PATH).'pclzip/pclzip.lib.php';
?>

@ -1,21 +1,22 @@
<?php //$id: $
<?php
/* For licensing terms, see /license.txt */
/**
* Script that displays a blank page (with later a message saying why)
* @package chamilo.learnpath
* @author Yannick Warnier <ywarnier@beeznest.org>
*/
$language_file = array('learnpath','document');
$language_file = array('learnpath', 'document');
//flag to allow for anonymous user - needs to be set before global.inc.php
// Flag to allow for anonymous user - needs to be set before global.inc.php.
$use_anonymous = true;
require_once '../inc/global.inc.php';
require_once '../inc/reduced_header.inc.php';
?>
<body>
<?php
echo '<body dir="'.api_get_text_direction().'">';
if (isset($_GET['error'])) {
switch($_GET['error']){
case 'document_deleted':
@ -33,7 +34,7 @@ if (isset($_GET['error'])) {
default:
break;
}
} else if(isset($_GET['msg']) && $_GET['msg']=='exerciseFinished') {
} elseif (isset($_GET['msg']) && $_GET['msg'] == 'exerciseFinished') {
echo '<br /><br />';
Display::display_normal_message(get_lang('ExerciseFinished'));
}

@ -1,16 +1,15 @@
<?php
/* For licensing terms, see /license.txt */
/**
* The only usage of this script is to have a portable way of keeping the list of content makers
* @package chamilo.learnpath
* @author Yannick Warnier <yannick.warnier@beeznest.com>
*/
/**
* Script
*/
$content_origins = array(
"--".get_lang('GenericScorm')."--",
"--".get_lang('Other')."--",
$content_origins = array(
'--'.get_lang('GenericScorm').'--',
'--'.get_lang('Other').'--',
'Accent',
'Accenture',
'ADLNet',
@ -50,4 +49,4 @@
'U&I Learning',
'Udutu',
'WebCT'
);
);

@ -1,43 +1,44 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Script opened in an iframe and containing the learning path's table of contents
* @package chamilo.learnpath
* @author Yannick Warnier <ywarnier@beeznest.org>
* @license GNU/GPL
*/
//flag to allow for anonymous user - needs to be set before global.inc.php
// Flag to allow for anonymous user - needs to be set before global.inc.php.
$use_anonymous = true;
require_once 'back_compat.inc.php';
require_once 'learnpath.class.php';
require_once 'scorm.class.php';
require_once 'aicc.class.php';
if(isset($_SESSION['lpobject']))
{
if (isset($_SESSION['lpobject'])) {
$oLP = unserialize($_SESSION['lpobject']);
if(is_object($oLP)){
if (is_object($oLP)) {
$_SESSION['oLP'] = $oLP;
}else{
die('Could not instanciate lp object');
} else {
die('Could not instanciate lp object.');
}
}
$charset = $_SESSION['oLP']->encoding;
$lp_theme_css=$_SESSION['oLP']->get_theme();
$scorm_css_header=true;
include_once '../inc/reduced_header.inc.php';
echo '<html>
<body>';
$lp_theme_css = $_SESSION['oLP']->get_theme();
$scorm_css_header = true;
require_once '../inc/reduced_header.inc.php';
echo '<body dir="'.api_get_text_direction().'">';
echo '<div id="audiorecorder"> ';
$audio_recorder_studentview = 'true';
$audio_recorder_item_id = $_SESSION['oLP']->current;
if(api_get_setting('service_visio','active')=='true'){
if (api_get_setting('service_visio', 'active') == 'true') {
include 'audiorecorder.inc.php';
}
echo '</div>';
// end of audiorecorder include
echo '</body></html>';
?>

@ -1,14 +1,13 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Redirection script
* @package chamilo.learnpath
* @author Yannick Warnier <ywarnier@beeznest.org>
*/
/**
* Script
*/
//flag to allow for anonymous user - needs to be set before global.inc.php
// Flag to allow for anonymous user - needs to be set before global.inc.php.
$use_anonymous = true;
require 'back_compat.inc.php';

Loading…
Cancel
Save