[svn r16074] Showing the LP image and the author name. FS#2841

skala
Julio Montoya 16 years ago
parent f5c0bb1bf5
commit 5d2468d2ce
  1. 6
      main/css/academica/scorm.css
  2. 6
      main/css/academica/scormfs.css
  3. 7
      main/css/baby_orange/scorm.css
  4. 6
      main/css/baby_orange/scormfs.css
  5. 7
      main/css/corporate/scorm.css
  6. 7
      main/css/corporate/scormfs.css
  7. 7
      main/css/cosmic_campus/scorm.css
  8. 6
      main/css/cosmic_campus/scormfs.css
  9. 9
      main/css/dokeos_classic/scorm.css
  10. 6
      main/css/dokeos_classic/scormfs.css
  11. 6
      main/css/medical/scorm.css
  12. 6
      main/css/medical/scormfs.css
  13. 15
      main/css/public_admin/scorm.css
  14. 9
      main/css/public_admin/scormfs.css
  15. 7
      main/css/silver_line/scorm.css
  16. 6
      main/css/silver_line/scormfs.css
  17. 6
      main/css/sober_brown/scorm.css
  18. 7
      main/css/sober_brown/scormfs.css
  19. 5
      main/inc/lib/add_course.lib.inc.php
  20. 3
      main/install/migrate-db-1.8.5-1.8.6-pre.sql
  21. 36
      main/newscorm/aicc.class.php
  22. 2
      main/newscorm/aicc_api.php
  23. 175
      main/newscorm/learnpath.class.php
  24. 3
      main/newscorm/learnpathList.class.php
  25. 26
      main/newscorm/lp_controller.php
  26. 33
      main/newscorm/lp_edit.php
  27. 30
      main/newscorm/lp_nav.php
  28. 12
      main/newscorm/lp_view.php
  29. 37
      main/newscorm/scorm.class.php
  30. 6
      main/newscorm/scorm_api.php

@ -160,3 +160,9 @@ vertical-align: top;
.scormpage .footer{
clear: both;
}
.preview_image
{
text-align: right;
margin-right: 5px;
padding-left: 15px;
}

@ -81,3 +81,9 @@
.scormpage .footer{
clear: both;
}
.preview_image
{
text-align: right;
margin-right: 5px;
padding-left: 15px;
}

@ -162,3 +162,10 @@ vertical-align: top;
.scormpage .footer{
clear: both;
}
.preview_image
{
text-align: right;
margin-right: 5px;
padding-left: 15px;
}

@ -81,3 +81,9 @@
.scormpage .footer{
clear: both;
}
.preview_image
{
text-align: right;
margin-right: 5px;
padding-left: 15px;
}

@ -155,3 +155,10 @@ vertical-align: top;
.scormpage .footer{
clear: both;
}
.preview_image
{
text-align: right;
margin-right: 5px;
padding-left: 15px;
}

@ -81,3 +81,10 @@
.scormpage .footer{
clear: both;
}
.preview_image
{
text-align: right;
margin-right: 5px;
padding-left: 15px;
}

@ -174,3 +174,10 @@
.scormpage .footer{
clear: both;
}
.preview_image
{
text-align: right;
margin-right: 5px;
padding-left: 15px;
}

@ -77,3 +77,9 @@
.scormpage .footer{
clear: both;
}
.preview_image
{
text-align: right;
margin-right: 5px;
padding-left: 15px;
}

@ -171,4 +171,11 @@ vertical-align: top;
}
.scormpage .footer{
clear: both;
}
}
.preview_image
{
text-align: right;
margin-right: 5px;
padding-left: 15px;
}

@ -81,3 +81,9 @@
.scormpage .footer{
clear: both;
}
.preview_image
{
text-align: right;
margin-right: 5px;
padding-left: 15px;
}

@ -174,3 +174,9 @@
clear: both;
}
.preview_image
{
text-align: right;
margin-right: 5px;
}

@ -77,3 +77,9 @@
.scormpage .footer{
clear: both;
}
.preview_image
{
text-align: right;
margin-right: 5px;
padding-left: 15px;
}

@ -126,14 +126,14 @@
}
.lp_navigation_elem{
padding-left: 60px;
padding-left: 15px;
padding-top: 0px;
}
/*.scormpage .menu */
.lp_navigation_elem .progresstext{
margin-top: -12px;
margin-left: 4em;
font-size: smaller;
margin-top: -15px;
margin-left: 5em;
font-size: normal;
}
/*.scormpage .menu */
@ -174,3 +174,10 @@
.scormpage .footer{
clear: both;
}
.preview_image
{
text-align: right;
margin-right: 5px;
padding-left: 15px;
}

@ -21,7 +21,7 @@
}
.lp_navigation_elem{
padding-left: 60px;
padding-left: 15px;
padding-top: 0px;
}
/*.scormpage .menu */
@ -77,3 +77,10 @@
.scormpage .footer{
clear: both;
}
.preview_image
{
text-align: right;
margin-right: 5px;
padding-left: 15px;
}

@ -156,3 +156,10 @@ vertical-align: top;
.scormpage .footer{
clear: both;
}
.preview_image
{
text-align: right;
margin-right: 5px;
padding-left: 15px;
}

@ -81,3 +81,9 @@
.scormpage .footer{
clear: both;
}
.preview_image
{
text-align: right;
margin-right: 5px;
padding-left: 15px;
}

@ -169,3 +169,9 @@ height: 100%;
.scormpage .footer{
clear: both;
}
.preview_image
{
text-align: right;
margin-right: 5px;
}

@ -77,3 +77,10 @@
.scormpage .footer{
clear: both;
}
.preview_image
{
text-align: right;
margin-right: 5px;
padding-left: 15px;
}

@ -976,7 +976,10 @@ function update_Db_course($courseDbName)
"prevent_reinit tinyint unsigned not null default 1," . //stores the default behaviour regarding items re-initialisation when viewed a second time after success
"js_lib tinytext not null default ''," . //the JavaScript library to load for this lp
"debug tinyint unsigned not null default 0," . //stores the default behaviour regarding items re-initialisation when viewed a second time after success
"theme varchar(255) not null default '' " . //stores the theme of the LP
"theme varchar(255) not null default '', " . //stores the theme of the LP
"preview_image varchar(255) not null default '', " . //stores the theme of the LP
"author varchar(255) not null default '' " . //stores the theme of the LP
")";
if(!api_sql_query($sql, __FILE__, __LINE__))
{

@ -46,3 +46,6 @@ ALTER TABLE survey ADD show_form_profile int NOT NULL default 0;
ALTER TABLE survey ADD form_fields TEXT NOT NULL;
ALTER TABLE quiz_answer CHANGE hotspot_type hotspot_type ENUM( 'square', 'circle', 'poly', 'delineation' ) NULL DEFAULT NULL;
ALTER TABLE forum_forum ADD forum_image varchar(255) NOT NULL default '';
ALTER TABLE lp ADD preview_image varchar(255) NOT NULL default '';
ALTER TABLE lp ADD author varchar(255) NOT NULL default '';

@ -587,6 +587,42 @@ class aicc extends learnpath {
}
}
/**
* Sets the image LP in the database
* @param string Theme setting
*/
function set_preview_image($preview_image=''){
if($this->debug>0){error_log('In aicc::set_preview_image('.$preview_image.') method',0);}
$lp = $this->get_id();
if($lp!=0){
$tbl_lp = Database::get_course_table('lp');
$sql = "UPDATE $tbl_lp SET preview_image = '$preview_image' WHERE id = ".$lp;
$res = api_sql_query($sql);
return $res;
}else{
return false;
}
}
/**
* Sets the Author LP in the database
* @param string Theme setting
*/
function set_author($author=''){
if($this->debug>0){error_log('In aicc::set_author('.$author.') method',0);}
$lp = $this->get_id();
if($lp!=0){
$tbl_lp = Database::get_course_table('lp');
$sql = "UPDATE $tbl_lp SET author = '$author' WHERE id = ".$lp;
$res = api_sql_query($sql);
return $res;
}else{
return false;
}
}
/**
* Sets the content maker setting in the database
* @param string Proximity setting

@ -605,7 +605,7 @@ function update_message_frame(msg_msg)
* @param string This parameter can be a string specifying the next
* item (like 'next', 'previous', 'first' or 'last') or the id to the next item
*/
function switch_item(current_item, next_item){
function switch_item(current_item, next_item){
/*
if(!current_item){
logit_lms('In switch - no current_item defined',0);

@ -37,7 +37,8 @@ class learnpath {
var $name; //learnpath name (they generally have one)
var $ordered_items = array(); //list of the learnpath items in the order they are to be read
var $path = ''; //path inside the scorm directory (if scorm)
var $theme; // the current theme of the learning path
var $theme; // the current theme of the learning path
var $preview_image; // the current image of the learning path
// Tells if all the items of the learnpath can be tried again. Defaults to "no" (=1)
var $prevent_reinit = 1;
@ -130,6 +131,9 @@ class learnpath {
$this->scorm_debug = $row['debug'];
$this->js_lib = $row['js_lib'];
$this->path = $row['path'];
$this->preview_image= $row['preview_image'];
$this->author= $row['author'];
if($this->type == 2){
if($row['force_commit'] == 1){
$this->force_commit = true;
@ -1578,23 +1582,15 @@ class learnpath {
if($this->debug>0){error_log('New LP - In learnpath::get_navigation_bar()',0);}
//TODO find a good value for the following variables
$file = '';
$openDir = '';
$edoceo = '';
$time = 0;
$navbar = '';
$RequestUri = '';
$mycurrentitemid = $this->get_current_item_id();
if($this->mode == 'fullscreen'){
if($this->mode == 'fullscreen')
{
$navbar = '<table cellpadding="0" cellspacing="0" align="left">'."\n".
' <tr> '."\n" .
@ -1609,7 +1605,7 @@ class learnpath {
' <a href="" onclick="dokeos_xajax_handler.switch_item('.$mycurrentitemid.',\'next\');return false;" title="next" ><img border="0" src="../img/lp_rightarrow.gif" title="'.get_lang('ScormNext').'"></a>&nbsp;'."\n" .
' <a href="lp_controller.php?action=mode&mode=embedded" target="_top" title="embedded mode"><img border="0" src="../img/view_choose.gif" title="'.get_lang('ScormExitFullScreen').'"></a>'."\n" .
//' <a href="lp_controller.php?action=mode&mode=embedded" target="_top" title="embedded mode"><img border="0" src="../img/view_choose.gif" title="'.get_lang('ScormExitFullScreen').'"></a>'."\n" .
//' <a href="lp_controller.php?action=list" target="_top" title="learnpaths list"><img border="0" src="../img/exit.png" title="Exit"></a>'."\n" .
@ -1639,7 +1635,7 @@ class learnpath {
' <a href="" onclick="dokeos_xajax_handler.switch_item('.$mycurrentitemid.',\'next\');return false;" title="next" ><img border="0" src="../img/lp_rightarrow.gif" title="'.get_lang('ScormNext').'"></a>&nbsp;'."\n" .
' <a href="lp_controller.php?action=mode&mode=fullscreen" target="_top" title="fullscreen"><img border="0" src="../img/view_fullscreen.gif" width="18" height="18" title="'.get_lang('ScormFullScreen').'"></a>'."\n" .
// ' <a href="lp_controller.php?action=mode&mode=fullscreen" target="_top" title="fullscreen"><img border="0" src="../img/view_fullscreen.gif" width="18" height="18" title="'.get_lang('ScormFullScreen').'"></a>'."\n" .
' </div>'."\n" .
@ -1938,24 +1934,29 @@ class learnpath {
list ($percentage, $text_add) = $this->get_progress_bar_text($mode);
}
$text = $percentage.$text_add;
//Default progress bar config
$factor=1.5;
$progress_height='16';
$size = str_replace('%','',$percentage);
$output = ''
//.htmlentities(get_lang('ScormCompstatus'),ENT_QUOTES,'ISO-8859-1')."<br />"
//.htmlentities(get_lang('ScormCompstatus'),ENT_QUOTES,'ISO-8859-1')."<br />"
.'<table border="0" cellpadding="0" cellspacing="0"><tr><td>'
.'<img id="progress_img_limit_left" src="'.$css_path.'bar_1.gif" width="1" height="12">'
.'<img id="progress_img_full" src="'.$css_path.'bar_1u.gif" width="'.$size.'px" height="12" id="full_portion">'
.'<img id="progress_img_limit_middle" src="'.$css_path.'bar_1m.gif" width="1" height="12">';
.'<img id="progress_img_limit_left" src="'.$css_path.'bar_1.gif" width="1" height="'.$progress_height.'">'
.'<img id="progress_img_full" src="'.$css_path.'bar_1u.gif" width="'.$size*$factor.'px" height="'.$progress_height.'" id="full_portion">'
.'<img id="progress_img_limit_middle" src="'.$css_path.'bar_1m.gif" width="1" height="'.$progress_height.'">';
if($percentage <= 98)
{
$output .= '<img id="progress_img_empty" src="'.$css_path.'bar_1r.gif" width="'.(100-$size).'px" height="12" id="empty_portion">';
{
$output .= '<img id="progress_img_empty" src="'.$css_path.'bar_1r.gif" width="'.(100-$size)*$factor.'px" height="'.$progress_height.'" id="empty_portion">';
}
else
{
$output .= '<img id="progress_img_empty" src="'.$css_path.'bar_1r.gif" width="0" height="12" id="empty_portion">';
$output .= '<img id="progress_img_empty" src="'.$css_path.'bar_1r.gif" width="0" height="'.$progress_height.'" id="empty_portion">';
}
$output .= '<img id="progress_bar_img_limit_right" src="'.$css_path.'bar_1.gif" width="1" height="12"></td></tr></table>'
$output .= '<img id="progress_bar_img_limit_right" src="'.$css_path.'bar_1.gif" width="1" height="'.$progress_height.'"></td></tr></table>'
.'<div class="progresstext" id="progress_text">'.$text.'</div>';
return $output;
}
@ -2031,6 +2032,28 @@ class learnpath {
if(!empty($this->theme)){return $this->theme;}else{return '';}
}
/**
* Gets the learnpath image
* @return string Web URL of the LP image
*/
function get_preview_image()
{
if($this->debug>0){error_log('New LP - In learnpath::get_preview_image()',0);}
if(!empty($this->preview_image)){return $this->preview_image;}else{return '';}
}
/**
* Gets the learnpath author
* @return string LP's author
*/
function get_author()
{
if($this->debug>0){error_log('New LP - In learnpath::get_author()',0);}
if(!empty($this->author)){return $this->author;}else{return '';}
}
/**
* Generate a new prerequisites string for a given item. If this item was a sco and
* its prerequisites were strings (instead of IDs), then transform those strings into
@ -3491,7 +3514,7 @@ class learnpath {
}
/**
/**
* Sets the theme of the LP (local/remote) (and save)
* @param string Optional string giving the new theme of this learnpath
* @return bool returns true if theme name is not empty
@ -3508,6 +3531,40 @@ class learnpath {
return true;
}
/**
* Sets the image of a LP (local/remote) (and save)
* @param string Optional string giving the new image of this learnpath
* @return bool returns true if theme name is not empty
*/
function set_preview_image($name=''){
if($this->debug>0){error_log('New LP - In learnpath::set_preview_image()',0);}
$this->preview_image = $this->escape_string($name);
$lp_table = Database::get_course_table('lp');
$lp_id = $this->get_id();
$sql = "UPDATE $lp_table SET preview_image = '".$this->preview_image."' WHERE id = '$lp_id'";
if($this->debug>2){error_log('New LP - lp updated with new preview image : '.$this->preview_image,0);}
$res = api_sql_query($sql, __FILE__, __LINE__);
return true;
}
/**
* Sets the author of a LP (local/remote) (and save)
* @param string Optional string giving the new author of this learnpath
* @return bool returns true if author's name is not empty
*/
function set_author($name=''){
if($this->debug>0){error_log('New LP - In learnpath::set_author()',0);}
$this->author = $this->escape_string($name);
$lp_table = Database::get_course_table('lp');
$lp_id = $this->get_id();
$sql = "UPDATE $lp_table SET author = '".$this->author."' WHERE id = '$lp_id'";
if($this->debug>2){error_log('New LP - lp updated with new preview author : '.$this->author,0);}
$res = api_sql_query($sql, __FILE__, __LINE__);
return true;
}
/**
* Sets the location/proximity of the LP (local/remote) (and save)
* @param string Optional string giving the new location of this learnpath
@ -8352,5 +8409,79 @@ EOD;
}
}
}
/**
*
*/
function delete_lp_image()
{
$img = $this->get_preview_image();
if ($img!='')
{
$del_file = api_get_path(SYS_COURSE_PATH).api_get_course_path().'/upload/learning_path/images/'.$img;
$this->set_preview_image('');
return @unlink($del_file);
}
else
{
return false;
}
}
/**
*
*/
function upload_image($image_array)
{
$image_moved=false;
if(!empty($image_array['name']))
{
$upload_ok = process_uploaded_file($image_array);
$has_attachment=true;
}
else
{
$image_moved=true;
}
if($upload_ok)
{
if ($has_attachment)
{
$courseDir = api_get_course_path().'/upload/learning_path/images';
$sys_course_path = api_get_path(SYS_COURSE_PATH);
$updir = $sys_course_path.$courseDir;
// Try to add an extension to the file if it hasn't one
$new_file_name = add_ext_on_mime(stripslashes($image_array['name']), $image_array['type']);
// user's file name
$file_name =$image_array['name'];
if (!filter_extension($new_file_name))
{
//Display :: display_error_message(get_lang('UplUnableToSaveFileFilteredExtension'));
$image_moved=false;
}
else
{
$file_extension = explode('.', $image_array['name']);
$file_extension = strtolower($file_extension[sizeof($file_extension) - 1]);
$new_file_name = uniqid('').'.'.$file_extension;
$new_path=$updir.'/'.$new_file_name;
$result= @move_uploaded_file($image_array['tmp_name'], $new_path);
// Storing the attachments if any
if ($result)
{
$image_moved=true;
$this->set_preview_image($new_file_name);
return true;
}
}
}
}
return false;
}
}
?>

@ -75,7 +75,8 @@ class learnpathList {
'lp_prevent_reinit' => $row['prevent_reinit'],
'lp_scorm_debug' => $row['debug'],
'lp_display_order' => $row['display_order'],
);
'lp_preview_image' => stripslashes($row['preview_image'])
);
$names[$row['name']]=$row['id'];
}
$this->alpha_list = asort($names);

@ -19,11 +19,12 @@ if (isset($_GET['action']))
$language_file[] = 'exercice';
}
}
$language_file[] = "course_home";
$language_file[] = "scormdocument";
$language_file[] = "scorm";
$language_file[] = "learnpath";
$language_file[] = 'course_home';
$language_file[] = 'scormdocument';
$language_file[] = 'scorm';
$language_file[] = 'learnpath';
$language_file[] = 'resourcelinker';
$language_file[] = 'registration';
//flag to allow for anonymous user - needs to be set before global.inc.php
$use_anonymous = true;
@ -89,6 +90,7 @@ if(isset($_SESSION['lpobject']))
}
}
}
if($debug>0) error_log('New LP - Passed data remains check',0);
if($lp_found == false
@ -556,7 +558,7 @@ switch($action)
if(!api_is_allowed_to_edit())
{
api_not_allowed(true);
}
}
if($debug>0) error_log('New LP - edit action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for edit',0); require('lp_list.php'); }
else{
@ -573,10 +575,20 @@ switch($action)
else{
$_SESSION['refresh'] = 1;
$_SESSION['oLP']->set_name($_REQUEST['lp_name']);
$_SESSION['oLP']->set_author($_REQUEST['lp_author']);
$_SESSION['oLP']->set_encoding($_REQUEST['lp_encoding']);
$_SESSION['oLP']->set_maker($_REQUEST['lp_maker']);
$_SESSION['oLP']->set_proximity($_REQUEST['lp_proximity']);
$_SESSION['oLP']->set_theme($_REQUEST['lp_theme']);
$_SESSION['oLP']->set_proximity($_REQUEST['lp_proximity']);
$_SESSION['oLP']->set_theme($_REQUEST['lp_theme']);
if ($_REQUEST['remove_picture'])
{
$_SESSION['oLP']->delete_lp_image();
}
if ($_FILES['lp_preview_image']['size']>0)
$_SESSION['oLP']->upload_image($_FILES['lp_preview_image']);
require('lp_list.php');
}
break;

@ -43,6 +43,7 @@ foreach($encodings as $encoding){
//Origin
$origin_select = &$form->addElement('select', 'lp_maker', get_lang('Origin'));
$lp_orig = $_SESSION['oLP']->get_maker();
include('content_makers.inc.php');
foreach($content_origins as $origin){
if($lp_orig == $origin){
@ -78,17 +79,45 @@ if (api_get_setting('allow_course_theme') == 'true')
}
}
//Author
$form -> addElement('text', 'lp_author', ucfirst(get_lang('Author')));
// LP image
$form->add_progress_bar();
if( strlen($_SESSION['oLP']->get_preview_image() ) > 0)
{
$show_preview_image='<img src='.api_get_path(WEB_COURSE_PATH).api_get_course_path().'/upload/learning_path/images/'.$_SESSION['oLP']->get_preview_image().'>';
$div = '<div class="row">
<div class="label">'.get_lang('ImagePreview').'</div>
<div class="formw">
'.$show_preview_image.'
</div>
</div>';
$form->addElement('html', $div .'<br/>');
$form->addElement('checkbox', 'remove_picture', null, get_lang('DelImage'));
}
$form->addElement('file', 'lp_preview_image', ($_SESSION['oLP']->get_preview_image() != '' ? get_lang('UpdateImage') : get_lang('AddImage')));
$form->addRule('lp_preview_image', get_lang('OnlyImagesAllowed'), 'mimetype', array('image/gif', 'image/jpeg', 'image/png'));
//default values
$content_proximity_select -> setSelected($s_selected_proximity);
$origin_select -> setSelected($s_selected_origin);
$encoding_select -> setSelected($s_selected_encoding);
$defaults["lp_name"]=$_SESSION['oLP']->get_name();
$defaults['lp_name']=$_SESSION['oLP']->get_name();
$defaults['lp_author']=$_SESSION['oLP']->get_author();
//Submit button
$form->addElement('submit', 'Submit', get_lang('Ok'));
//Hidden fields
$form->addElement('hidden', 'action', 'update_lp');
$form->addElement('hidden', 'lp_id', $_SESSION['oLP']->get_id());

@ -42,8 +42,7 @@ if(isset($_SESSION['lpobject']))
//error_log('New LP - in lp_nav.php - SESSION[lpobject] is not object - dying',0);
die('Could not instanciate lp object');
}
$display_mode = $_SESSION['oLP']->mode;
$display_mode = $_SESSION['oLP']->mode;
$scorm_css_header=true;
$lp_theme_css=$_SESSION['oLP']->get_theme();
@ -57,16 +56,37 @@ if(isset($_SESSION['lpobject']))
else
{
$lp_theme_css=$my_style;
}
}
$progress_bar = $_SESSION['oLP']->get_progress_bar();
$navigation_bar = $_SESSION['oLP']->get_navigation_bar(); }
session_write_close();
?>
<body>
<?
$html='<div class="preview_image">'."\n";
if ($_SESSION['oLP']->get_preview_image()!='')
$html .='<img src='.api_get_path(WEB_COURSE_PATH).api_get_course_path().'/upload/learning_path/images/'.$_SESSION['oLP']->get_preview_image().'>';
if ($_SESSION['oLP']->get_author()!='')
{
$html .='<br />'.get_lang('Author').': '.$_SESSION['oLP']->get_author();
}
$html .='</div>';
echo $html;
?>
<div class="lp_navigation_elem">
<?php echo $progress_bar; ?>
<?php echo $navigation_bar; ?>
<table>
<tr valign="middle">
<td>
<?php echo $progress_bar; ?>
</td>
<td>
<?php echo $navigation_bar; ?>
</td>
</tr>
</table>
</div>
</body>
</html>

@ -131,7 +131,7 @@ $_setting['show_navigation_menu'] = false;
$scorm_css_header=true;
$lp_theme_css=$_SESSION['oLP']->get_theme(); //sets the css theme of the LP this call is also use at the frames (toc, nav, message)
if($_SESSION['oLP']->mode == 'fullscreen')
{
$htmlHeadXtra[] = "<script>window.open('$src','content_name','toolbar=0,location=0,status=0,scrollbars=1,resizable=1');</script>";
@ -175,14 +175,16 @@ else
$_SESSION['loaded_lp_view'] = true;
?>
<frameset cols="270,*">
<frameset rows="20,<?php echo($displayAudioRecorder?'60,':'');?>600,70,80,*">
<frameset rows="20,<?php echo($displayAudioRecorder?'60,':'');?>200,600,80,*">
<frame id="header" src="lp_header.php" border="0" frameborder="0" scrolling="no"/>
<?php
<?php
if($displayAudioRecorder) //if audio recorder is required (set a few lines above)
echo '<frame id="audiorecorder_id" name="audiorecorder_name" src="display_audiorecorder.php" border="0" frameborder="0" scrolling="no"/>';
?>
?>
<frame id="nav_id" name="nav_name" class="lp_nav" src="lp_nav.php" border="0" frameborder="0" />
<frame id="toc_id" name="toc_name" class="lp_toc" src="lp_toc.php" border="0" frameborder="0" scrolling="no"/>
<frame id="nav_id" name="nav_name" class="lp_nav" src="lp_nav.php" border="0" frameborder="0" />
<frame id="message_id" name="message_name" class="message" src="lp_message.php" border="0" frameborder="0" />
<frame id="lp_log_id" name="lp_log_name" class="lp_log" src="lp_log.php" border="0" frameborder="0" />
</frameset>

@ -719,6 +719,43 @@ class scorm extends learnpath {
}
}
/**
* Sets the image setting in the database
* @param string preview_image setting
*/
function set_preview_image($preview_image=''){
if($this->debug>0){error_log('In scorm::set_theme('.$preview_image.') method',0);}
$lp = $this->get_id();
if($lp!=0){
$tbl_lp = Database::get_course_table('lp');
$sql = "UPDATE $tbl_lp SET preview_image = '$preview_image' WHERE id = ".$lp;
$res = api_sql_query($sql);
return $res;
}else{
return false;
}
}
/**
* Sets the author setting in the database
* @param string preview_image setting
*/
function set_author($author=''){
if($this->debug>0){error_log('In scorm::set_author('.$author.') method',0);}
$lp = $this->get_id();
if($lp!=0){
$tbl_lp = Database::get_course_table('lp');
$sql = "UPDATE $tbl_lp SET author = '$author' WHERE id = ".$lp;
$res = api_sql_query($sql);
return $res;
}else{
return false;
}
}
/**
* Sets the content maker setting in the database

@ -1,4 +1,4 @@
<?php // $Id: scorm_api.php 15386 2008-05-24 05:13:09Z yannoo $
<?php // $Id: scorm_api.php 16074 2008-08-26 23:20:21Z juliomontoya $
/*
==============================================================================
Dokeos - elearning and course management software
@ -922,8 +922,8 @@ function update_progress_bar(nbr_complete, nbr_total, mode)
var pr_full = myframe.document.getElementById('progress_img_full');
var pr_empty = myframe.document.getElementById('progress_img_empty');
pr_full.width = percentage;
pr_empty.width = 100-percentage;
pr_full.width = percentage*1.5;
pr_empty.width = (100-percentage)*1.5;
var mytext = '';
switch(mode){
case 'abs':

Loading…
Cancel
Save