[svn r15644] Removed notice-level messages

skala
Yannick Warnier 17 years ago
parent d6ab494309
commit 76049f4111
  1. 1
      main/inc/lib/main_api.lib.php
  2. 4
      main/inc/reduced_header.inc.php
  3. 9
      main/newscorm/learnpath.class.php
  4. 1
      main/newscorm/learnpathList.class.php
  5. 13
      main/newscorm/lp_controller.php
  6. 16
      main/newscorm/lp_list.php
  7. 1
      main/newscorm/lp_message.php
  8. 5
      main/newscorm/lp_view.php

@ -1091,6 +1091,7 @@ class api_failure
function get_last_failure()
{
global $api_failureList;
if(count($api_failureList)==0){return '';}
return $api_failureList[count($api_failureList) - 1];
}
}

@ -118,7 +118,7 @@ if (!empty($mycourseid) && $mycourseid != -1)
}
}
if ($lp_theme_log){
if (!empty($lp_theme_log)){
$my_style=$platform_theme;
}
@ -136,7 +136,7 @@ if ($scorm_css_header)
$scormfs_css='scormfs.css';
}
if($display_mode == 'fullscreen')
if(!empty($display_mode) && $display_mode == 'fullscreen')
{
$htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
/*<![CDATA[*/

@ -1858,7 +1858,7 @@ class learnpath {
return null;
}
}
if(!$progress)
if(empty($progress))
{
$progress = '0';
}
@ -1928,7 +1928,7 @@ class learnpath {
}
//if($this->debug>0){error_log('New LP - In learnpath::get_progress_bar()',0);}
if(is_object($this) && ($percentage=='-1' OR $text_add==''))
if(isset($this) && is_object($this) && ($percentage=='-1' OR $text_add==''))
{
list ($percentage, $text_add) = $this->get_progress_bar_text($mode);
}
@ -2445,11 +2445,10 @@ class learnpath {
if($this->debug>0){error_log('New LP - In learnpath::get_html_toc()',0);}
$list = $this->get_toc();
$mych = api_get_setting('platform_charset');
//echo $this->current;
//$parent = $this->items[$this->current]->get_parent();
//if(empty($parent)){$parent = $this->ordered_items[$this->items[$this->current]->get_previous_index()];}
$html.= '<div class="inner_lp_toc">'."\n" ;
$html = '<div class="inner_lp_toc">'."\n" ;
$html.= '<div class="scorm_title">&nbsp;&nbsp;&nbsp;&nbsp;'.mb_convert_encoding($this->get_name(),$this->encoding,$mych).'</div>';
// build, display
@ -2627,7 +2626,7 @@ class learnpath {
$lp_item_type = $row['litype'];
$lp_item_path = $row['lipath'];
$lp_item_params = $row['liparams'];
if(empty($lp_item_params))
if(empty($lp_item_params) && strpos($lp_item_path,'?')!==false)
{
list($lp_item_path,$lp_item_params) = explode('?',$lp_item_path);
}

@ -70,7 +70,6 @@ class learnpathList {
'lp_maker' => stripslashes($row['content_maker']),
'lp_proximity' => $row['content_local'],
'lp_encoding' => $row['default_encoding'],
'lp_progress' => $row['progress'],
'lp_visibility' => $vis,
'lp_published' => $pub,
'lp_prevent_reinit' => $row['prevent_reinit'],

@ -69,6 +69,7 @@ if(!empty($_REQUEST['dialog_box'])){
}
$lp_controller_touched = 1;
$lp_found = false;
if(isset($_SESSION['lpobject']))
{
@ -76,7 +77,7 @@ if(isset($_SESSION['lpobject']))
$oLP = unserialize($_SESSION['lpobject']);
if(is_object($oLP)){
if($debug>0) error_log('New LP - oLP is object',0);
if($myrefresh == 1 OR $oLP->cc != api_get_course_id()){
if($myrefresh == 1 OR (empty($oLP->cc)) OR $oLP->cc != api_get_course_id()){
if($debug>0) error_log('New LP - Course has changed, discard lp object',0);
if($myrefresh == 1){$myrefresh_id = $oLP->get_id();}
$oLP = null;
@ -159,7 +160,7 @@ $fck_attribute['Height'] = '950';
$fck_attribute['ToolbarSet'] = 'Full';
$fck_attribute['Config']['FullPage'] = true;
if($_GET['isStudentView'] == 'true')
if(isset($_GET['isStudentView']) && $_GET['isStudentView'] == 'true')
{
if($_REQUEST['action'] != 'list' AND $_REQUEST['action'] != 'view')
{
@ -174,7 +175,8 @@ if($_GET['isStudentView'] == 'true')
}
}
switch($_REQUEST['action'])
$action = (!empty($_REQUEST['action'])?$_REQUEST['action']:'');
switch($action)
{
case 'add_item':
@ -684,7 +686,10 @@ switch($_REQUEST['action'])
else
{
if($debug > 0){error_log('New LP - Trying to set current item to ' . $_REQUEST['item_id'], 0);}
$_SESSION['oLP']->set_current_item($_REQUEST['item_id']);
if ( !empty($_REQUEST['item_id']) )
{
$_SESSION['oLP']->set_current_item($_REQUEST['item_id']);
}
require('lp_view.php');
}
break;

@ -59,7 +59,7 @@ $htmlHeadXtra[] =
function confirmation(name)
{
if (confirm(\" ".trim(get_lang('AreYouSureToDelete'))." ?\"))
if (confirm(\" ".trim(get_lang('AreYouSureToDelete'))." \"+name+\"?\"))
{return true;}
else
{return false;}
@ -92,7 +92,7 @@ if(api_is_allowed_to_edit())
DIALOG BOX SECTION
--------------------------------------*/
if ($dialog_box)
if (!empty($dialog_box))
{
Display::display_normal_message($dialog_box);
}
@ -130,7 +130,7 @@ if ($curDirName) // if the $curDirName is empty, we're in the root point and we
<?php
}
*/
if ($curDirPath)
if (!empty($curDirPath))
{
if(substr($curDirPath,1,1)=='/'){
$tmpcurDirPath=substr($curDirPath,1,strlen($curDirPath));
@ -191,8 +191,8 @@ if (is_array($flat_list))
$image='<img src="../img/kcmdf.gif" border="0" align="absmiddle" alt="scorm">'."\n";
$dsp_line = '<tr align="center" class="'.$oddclass.'">'."\n" .
'<td align="left" valign="top">' .
'<div style="float: left; width: 35px; height: 22px;"><a href="'.$url_start_lp.'" '.$style.'>' .
$image . '</a></div><a href="'.$url_start_lp.'" '.$style.'>' . $name . '</a>' .
'<div style="float: left; width: 35px; height: 22px;"><a href="'.$url_start_lp.'">' .
$image . '</a></div><a href="'.$url_start_lp.'">' . $name . '</a>' .
"</td>\n";
//$dsp_desc='<td>'.$details['lp_desc'].'</td>'."\n";
$dsp_desc = '';
@ -236,8 +236,6 @@ if (is_array($flat_list))
if($is_allowed_to_edit)
{
$dsp_desc = '<td valign="middle" style="color: grey; padding-top:1em;"><em>'.$details['lp_maker'].'</em> &nbsp;&nbsp; '.$details['lp_proximity'].' &nbsp;&nbsp; '.$details['lp_encoding'].'<a href="lp_controller.php?'.api_get_cidreq().'&action=edit&lp_id='.$id.'">&nbsp;&nbsp;<img src="../img/edit.gif" border="0" title="'.get_lang('_edit_learnpath').'"></a></td>'."\n";
$fileExtension=explode('.',$dspFileName);
$fileExtension=strtolower($fileExtension[sizeof($fileExtension)-1]);
/* export */
//export not available for normal lps yet
@ -267,7 +265,7 @@ if (is_array($flat_list))
/* DELETE COMMAND */
$dsp_delete = "<a href=\"lp_controller.php?".api_get_cidreq()."&action=delete&lp_id=$id\" " .
"onClick=\"return confirmation('".addslashes($dspFileName)."');\">" .
"onClick=\"return confirmation('".addslashes($name)."');\">" .
"<img src=\"../img/delete.gif\" border=\"0\" title=\"".get_lang('_delete_learnpath')."\" />" .
"</a>";
@ -378,7 +376,7 @@ if (is_array($flat_list))
}
} // end if($is_allowedToEdit)
//echo $dsp_line.$dsp_desc.$dsp_export.$dsp_edit.$dsp_delete.$dsp_visible;
echo $dsp_line.$dsp_progress.$dsp_desc.$dsp_export.$dsp_edit.$dsp_build.$dsp_visible.$dsp_publish.$dsp_reinit.$dsp_default_view.$dsp_force_commit.$dsp_debug.$dsp_delete.$dsp_close.$dsp_order;
echo $dsp_line.$dsp_progress.$dsp_desc.$dsp_export.$dsp_edit.$dsp_build.$dsp_visible.$dsp_publish.$dsp_reinit.$dsp_default_view.$dsp_debug.$dsp_delete.$dsp_order;
//echo $dsp_line.$dsp_progress.$dsp_desc.$dsp_export.$dsp_edit.$dsp_build.$dsp_visible.$dsp_reinit.$dsp_force_commit.$dsp_delete;
echo "</tr>\n";
$current ++; //counter for number of elements treated

@ -23,6 +23,7 @@ $language_file = "learnpath";
require_once('back_compat.inc.php');
require_once('learnpath.class.php');
require_once('scorm.class.php');
if(empty($debug)){$debug=0;}
$error = '';
$display_mode = '';
if(isset($_SESSION['lpobject'])){

@ -72,7 +72,10 @@ $lp_item_id = $_SESSION['oLP']->get_current_item_id();
$_SESSION['scorm_view_id'] = $_SESSION['oLP']->get_view_id();
$_SESSION['scorm_item_id'] = $lp_item_id;
//reinit exercises variables to avoid spacename clashes (see exercise tool)
api_session_unregister($exerciseResult);
if(isset($exerciseResult) or isset($_SESSION['exerciseResult']))
{
api_session_unregister($exerciseResult);
}
unset($_SESSION['objExercise']);
unset($_SESSION['questionList']);
/**

Loading…
Cancel
Save