[svn r16868] added alternative texts on the icons

skala
Juan Carlos Raña 17 years ago
parent dda975440b
commit e1788ddf17
  1. 17662
      main/newscorm/learnpath.class.php
  2. 6
      main/newscorm/lp_build.php
  3. 807
      main/newscorm/lp_list.php

File diff suppressed because it is too large Load Diff

@ -190,9 +190,9 @@ function confirmation(name)
----------------------------------------------------------- -----------------------------------------------------------
*/ */
echo '<div class="actions">'; echo '<div class="actions">';
echo '<span>'.Display::return_icon('learnpath_build.gif').' '.get_lang('Build').'</span>'; echo '<span>'.Display::return_icon('learnpath_build.gif', get_lang('Build')).' '.get_lang('Build').'</span>';
echo '<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">'.Display::return_icon('learnpath_organize.gif').' '.get_lang("BasicOverview").'</a>'; echo '<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">'.Display::return_icon('learnpath_organize.gif', get_lang("BasicOverview")).' '.get_lang("BasicOverview").'</a>';
echo '<a href="lp_controller.php?cidReq='.$_GET['cidReq'].'&action=view&lp_id='.$_SESSION['oLP']->lp_id.'">'.Display::return_icon('learnpath_view.gif').' '.get_lang("Display").'</a>'; echo '<a href="lp_controller.php?cidReq='.$_GET['cidReq'].'&action=view&lp_id='.$_SESSION['oLP']->lp_id.'">'.Display::return_icon('learnpath_view.gif', get_lang("Display")).' '.get_lang("Display").'</a>';
echo '<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=add_item&amp;type=chapter&amp;lp_id=' . $_SESSION['oLP']->lp_id . '" title="'.get_lang("NewChapter").'"><img alt="'.get_lang("NewChapter").'" src="../img/lp_dokeos_chapter_add.png" title="'.get_lang("NewChapter").'" />'.get_lang("NewChapter").'</a>'; echo '<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=add_item&amp;type=chapter&amp;lp_id=' . $_SESSION['oLP']->lp_id . '" title="'.get_lang("NewChapter").'"><img alt="'.get_lang("NewChapter").'" src="../img/lp_dokeos_chapter_add.png" title="'.get_lang("NewChapter").'" />'.get_lang("NewChapter").'</a>';
echo '<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=add_item&amp;type=step&amp;lp_id=' . $_SESSION['oLP']->lp_id . '" title="'.get_lang("NewStep").'"><img alt="'.get_lang("NewStep").'" src="../img/lp_dokeos_step_add.png" title="'.get_lang("NewStep").'" />'.get_lang("NewStep").'</a>'; echo '<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=add_item&amp;type=step&amp;lp_id=' . $_SESSION['oLP']->lp_id . '" title="'.get_lang("NewStep").'"><img alt="'.get_lang("NewStep").'" src="../img/lp_dokeos_step_add.png" title="'.get_lang("NewStep").'" />'.get_lang("NewStep").'</a>';
echo '</div>'; echo '</div>';

@ -1,404 +1,405 @@
<?php //$id:$ <?php //$id:$
/* /*
============================================================================== ==============================================================================
Dokeos - elearning and course management software Dokeos - elearning and course management software
Copyright (c) 2004-2008 Dokeos SPRL Copyright (c) 2004-2008 Dokeos SPRL
Copyright (c) 2004 Denes Nagy Copyright (c) 2004 Denes Nagy
Copyright (c) 2003 Ghent University (UGent) Copyright (c) 2003 Ghent University (UGent)
Copyright (c) 2001 Universite catholique de Louvain (UCL) Copyright (c) 2001 Universite catholique de Louvain (UCL)
For a full list of contributors, see "credits.txt". For a full list of contributors, see "credits.txt".
The full license can be read in "license.txt". The full license can be read in "license.txt".
This program is free software; you can redistribute it and/or This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version. of the License, or (at your option) any later version.
See the GNU General Public License for more details. See the GNU General Public License for more details.
Contact: Dokeos, rue du Corbeau, 108, B-1000 Brussels, Belgium, info@dokeos.com Contact: Dokeos, rue du Corbeau, 108, B-1000 Brussels, Belgium, info@dokeos.com
============================================================================== ==============================================================================
*/ */
/** /**
============================================================================== ==============================================================================
* This file was origially the copy of document.php, but many modifications happened since then ; * This file was origially the copy of document.php, but many modifications happened since then ;
* the direct file view is not any more needed, if the user uploads a scorm zip file, a directory * the direct file view is not any more needed, if the user uploads a scorm zip file, a directory
* will be automatically created for it, and the files will be uncompressed there for example ; * will be automatically created for it, and the files will be uncompressed there for example ;
* *
* @package dokeos.learnpath * @package dokeos.learnpath
* @author Yannick Warnier <ywarnier@beeznest.org> * @author Yannick Warnier <ywarnier@beeznest.org>
============================================================================== ==============================================================================
*/ */
/** /**
* Script * Script
*/ */
if(empty($lp_controller_touched) || $lp_controller_touched!=1){ if(empty($lp_controller_touched) || $lp_controller_touched!=1){
header('location: lp_controller.php?action=list'); header('location: lp_controller.php?action=list');
} }
require_once('back_compat.inc.php'); require_once('back_compat.inc.php');
$courseDir = api_get_course_path().'/scorm'; $courseDir = api_get_course_path().'/scorm';
$baseWordDir = $courseDir; $baseWordDir = $courseDir;
$display_progress_bar = true; $display_progress_bar = true;
require_once('learnpathList.class.php'); require_once('learnpathList.class.php');
require_once('learnpath.class.php'); require_once('learnpath.class.php');
require_once('learnpathItem.class.php'); require_once('learnpathItem.class.php');
//$charset = 'UTF-8'; //$charset = 'UTF-8';
//$charset = 'ISO-8859-1'; //$charset = 'ISO-8859-1';
/** /**
* Display initialisation and security checks * Display initialisation and security checks
*/ */
//extra javascript functions for in html head: //extra javascript functions for in html head:
$htmlHeadXtra[] = $htmlHeadXtra[] =
"<script language='javascript' type='text/javascript'> "<script language='javascript' type='text/javascript'>
function confirmation(name) function confirmation(name)
{ {
if (confirm(\" ".trim(get_lang('AreYouSureToDelete'))." \"+name+\"?\")) if (confirm(\" ".trim(get_lang('AreYouSureToDelete'))." \"+name+\"?\"))
{return true;} {return true;}
else else
{return false;} {return false;}
} }
</script>"; </script>";
$nameTools = get_lang(ucfirst(TOOL_LEARNPATH)); $nameTools = get_lang(ucfirst(TOOL_LEARNPATH));
event_access_tool(TOOL_LEARNPATH); event_access_tool(TOOL_LEARNPATH);
if (! $is_allowed_in_course) api_not_allowed(); if (! $is_allowed_in_course) api_not_allowed();
/** /**
* Display * Display
*/ */
/* Require the search widget and prepare the header with its stuff */ /* Require the search widget and prepare the header with its stuff */
if (api_get_setting('search_enabled') == 'true') { if (api_get_setting('search_enabled') == 'true') {
require api_get_path(LIBRARY_PATH).'search/search_widget.php'; require api_get_path(LIBRARY_PATH).'search/search_widget.php';
search_widget_prepare(&$htmlHeadXtra); search_widget_prepare(&$htmlHeadXtra);
} }
Display::display_header($nameTools,"Path"); Display::display_header($nameTools,"Path");
//api_display_tool_title($nameTools); //api_display_tool_title($nameTools);
/* /*
----------------------------------------------------------- -----------------------------------------------------------
Introduction section Introduction section
(editable by course admins) (editable by course admins)
----------------------------------------------------------- -----------------------------------------------------------
*/ */
Display::display_introduction_section(TOOL_LEARNPATH); Display::display_introduction_section(TOOL_LEARNPATH);
if(api_is_allowed_to_edit()) if(api_is_allowed_to_edit())
{ {
/*-------------------------------------- /*--------------------------------------
DIALOG BOX SECTION DIALOG BOX SECTION
--------------------------------------*/ --------------------------------------*/
if (!empty($dialog_box)) if (!empty($dialog_box))
{ {
Display::display_normal_message($dialog_box); Display::display_normal_message($dialog_box);
} }
if (api_failure::get_last_failure()) if (api_failure::get_last_failure())
{ {
Display::display_normal_message(api_failure::get_last_failure()); Display::display_normal_message(api_failure::get_last_failure());
} }
//include('content_makers.inc.php'); //include('content_makers.inc.php');
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=add_lp">'. echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=add_lp">'.
'<img src="../img/wizard.gif" border="0" align="absmiddle" alt="scormbuilder">&nbsp;'.get_lang('_add_learnpath'). '<img src="../img/wizard.gif" border="0" align="absmiddle" alt="'.get_lang('_add_learnpath').
'</a>' . '">&nbsp;'.get_lang('_add_learnpath').
str_repeat('&nbsp;',3). '</a>' .
'<a href="../upload/index.php?'.api_get_cidreq().'&curdirpath=/&tool='.TOOL_LEARNPATH.'"><img src="../img/file_zip.gif" border="0" alt="scormbuilder" align="absmiddle">&nbsp;'.get_lang("UploadScorm").'</a>'; str_repeat('&nbsp;',3).
if (api_get_setting('service_ppt2lp', 'active') == 'true') '<a href="../upload/index.php?'.api_get_cidreq().'&curdirpath=/&tool='.TOOL_LEARNPATH.'"><img src="../img/file_zip.gif" border="0" alt="'.get_lang("UploadScorm").'" align="absmiddle">&nbsp;'.get_lang("UploadScorm").'</a>';
{ if (api_get_setting('service_ppt2lp', 'active') == 'true')
echo str_repeat('&nbsp;',3).'<a href="../upload/upload_ppt.php?'.api_get_cidreq().'&curdirpath=/&tool='.TOOL_LEARNPATH.'"><img src="../img/powerpoint.gif" border="0" alt="scormbuilder" align="absmiddle">&nbsp;'.get_lang("PowerPointConvert").'</a>'; {
echo str_repeat('&nbsp;',3).'<a href="../upload/upload_word.php?'.api_get_cidreq().'&curdirpath=/&tool='.TOOL_LEARNPATH.'"><img src="../img/word.gif" border="0" alt="scormbuilder" align="absmiddle">&nbsp;'.get_lang("WordConvert").'</a>'; echo str_repeat('&nbsp;',3).'<a href="../upload/upload_ppt.php?'.api_get_cidreq().'&curdirpath=/&tool='.TOOL_LEARNPATH.'"><img src="../img/powerpoint.gif" border="0" alt="'.get_lang("PowerPointConvert").'" align="absmiddle">&nbsp;'.get_lang("PowerPointConvert").'</a>';
} echo str_repeat('&nbsp;',3).'<a href="../upload/upload_word.php?'.api_get_cidreq().'&curdirpath=/&tool='.TOOL_LEARNPATH.'"><img src="../img/word.gif" border="0" alt="'.get_lang("WordConvert").'" align="absmiddle">&nbsp;'.get_lang("WordConvert").'</a>';
}
}
}
echo '<table width="100%" border="0" cellspacing="2" class="data_table">';
api_is_allowed_to_edit() ? $colspan = 9 : $colspan = 3; echo '<table width="100%" border="0" cellspacing="2" class="data_table">';
api_is_allowed_to_edit() ? $colspan = 9 : $colspan = 3;
/*
if ($curDirName) // if the $curDirName is empty, we're in the root point and we can't go to a parent dir /*
{ if ($curDirName) // if the $curDirName is empty, we're in the root point and we can't go to a parent dir
?> {
<!-- parent dir --> ?>
<a href="<?php echo api_get_self().'?'.api_get_cidreq().'&openDir='.$cmdParentDir.'&subdirs=yes'; ?>"> <!-- parent dir -->
<img src="../img/parent.gif" border="0" align="absbottom" hspace="5" alt="parent" /> <a href="<?php echo api_get_self().'?'.api_get_cidreq().'&openDir='.$cmdParentDir.'&subdirs=yes'; ?>">
<?php echo get_lang("Up"); ?></a>&nbsp; <img src="../img/parent.gif" border="0" align="absbottom" hspace="5" alt="parent" />
<?php <?php echo get_lang("Up"); ?></a>&nbsp;
} <?php
*/ }
if (!empty($curDirPath)) */
{ if (!empty($curDirPath))
if(substr($curDirPath,1,1)=='/'){ {
$tmpcurDirPath=substr($curDirPath,1,strlen($curDirPath)); if(substr($curDirPath,1,1)=='/'){
}else{ $tmpcurDirPath=substr($curDirPath,1,strlen($curDirPath));
$tmpcurDirPath = $curDirPath; }else{
} $tmpcurDirPath = $curDirPath;
?> }
<!-- current dir name --> ?>
<tr> <!-- current dir name -->
<td colspan="<?php echo $colspan ?>" align="left" bgcolor="#4171B5"> <tr>
<img src="../img/opendir.gif" align="absbottom" vspace="2" hspace="3" alt="open_dir" /> <td colspan="<?php echo $colspan ?>" align="left" bgcolor="#4171B5">
<font color="#ffffff"><b><?php echo $tmpcurDirPath ?></b></font> <img src="../img/opendir.gif" align="absbottom" vspace="2" hspace="3" alt="open_dir" />
</td> <font color="#ffffff"><b><?php echo $tmpcurDirPath ?></b></font>
</tr> </td>
<?php </tr>
} <?php
}
/* CURRENT DIRECTORY */
/* CURRENT DIRECTORY */
echo '<tr>';
echo '<th>'.get_lang('Name').'</th>'."\n" . echo '<tr>';
'<th>'.get_lang('Progress')."</th>\n"; echo '<th>'.get_lang('Name').'</th>'."\n" .
if (api_is_allowed_to_edit()) '<th>'.get_lang('Progress')."</th>\n";
{ if (api_is_allowed_to_edit())
echo '<th>'.get_lang('Description')."</th>\n" . {
'<th>'.get_lang('ExportShort')."</th>\n" . echo '<th>'.get_lang('Description')."</th>\n" .
'<th>'.get_lang('Modify')."</th>\n" . '<th>'.get_lang('ExportShort')."</th>\n" .
'<th>'.get_lang('Move')."</th>\n"; '<th>'.get_lang('Modify')."</th>\n" .
} '<th>'.get_lang('Move')."</th>\n";
}
echo "</tr>\n";
echo "</tr>\n";
/*--------------------------------------
DISPLAY SCORM LIST /*--------------------------------------
--------------------------------------*/ DISPLAY SCORM LIST
$list = new LearnpathList(api_get_user_id()); --------------------------------------*/
$flat_list = $list->get_flat_list(); $list = new LearnpathList(api_get_user_id());
$is_allowed_to_edit = api_is_allowed_to_edit(); $flat_list = $list->get_flat_list();
$test_mode = api_get_setting('server_type'); $is_allowed_to_edit = api_is_allowed_to_edit();
$max = count($flat_list); $test_mode = api_get_setting('server_type');
//var_dump($flat_list); $max = count($flat_list);
if (is_array($flat_list)) //var_dump($flat_list);
{ if (is_array($flat_list))
$counter = 0; {
$current = 0; $counter = 0;
foreach ($flat_list as $id => $details) $current = 0;
{ foreach ($flat_list as $id => $details)
if(!$is_allowed_to_edit && $details['lp_visibility'] == 0) {
{ if(!$is_allowed_to_edit && $details['lp_visibility'] == 0)
// This is a student and this path is invisible, skip {
continue; // This is a student and this path is invisible, skip
} continue;
$counter++; }
if (($counter % 2)==0) { $oddclass="row_odd"; } else { $oddclass="row_even"; } $counter++;
if (($counter % 2)==0) { $oddclass="row_odd"; } else { $oddclass="row_even"; }
$url_start_lp = 'lp_controller.php?'.api_get_cidreq().'&action=view&lp_id='.$id;
$name = $details['lp_name']; $url_start_lp = 'lp_controller.php?'.api_get_cidreq().'&action=view&lp_id='.$id;
$image='<img src="../img/kcmdf.gif" border="0" align="absmiddle" alt="scorm">'."\n"; $name = $details['lp_name'];
$dsp_line = '<tr align="center" class="'.$oddclass.'">'."\n" . $image='<img src="../img/kcmdf.gif" border="0" align="absmiddle" alt="' . $name . '">'."\n";
'<td align="left" valign="top">' . $dsp_line = '<tr align="center" class="'.$oddclass.'">'."\n" .
'<div style="float: left; width: 35px; height: 22px;"><a href="'.$url_start_lp.'">' . '<td align="left" valign="top">' .
$image . '</a></div><a href="'.$url_start_lp.'">' . $name . '</a>' . '<div style="float: left; width: 35px; height: 22px;"><a href="'.$url_start_lp.'">' .
"</td>\n"; $image . '</a></div><a href="'.$url_start_lp.'">' . $name . '</a>' .
//$dsp_desc='<td>'.$details['lp_desc'].'</td>'."\n"; "</td>\n";
$dsp_desc = ''; //$dsp_desc='<td>'.$details['lp_desc'].'</td>'."\n";
$dsp_desc = '';
$dsp_export = '';
$dsp_edit = ''; $dsp_export = '';
$dsp_edit_close = ''; $dsp_edit = '';
$dsp_delete = ''; $dsp_edit_close = '';
$dsp_visible = ''; $dsp_delete = '';
$dsp_default_view = ''; $dsp_visible = '';
$dsp_debug = ''; $dsp_default_view = '';
$dsp_order = ''; $dsp_debug = '';
$dsp_order = '';
// Select course theme
if (!empty($platform_theme)) // Select course theme
{ if (!empty($platform_theme))
$mystyle=$platform_theme; {
} $mystyle=$platform_theme;
}
if (!empty($user_theme))
{ if (!empty($user_theme))
$mystyle=$user_theme; {
} $mystyle=$user_theme;
}
if (!empty($mycoursetheme))
{ if (!empty($mycoursetheme))
$mystyle=$mycoursetheme; {
} $mystyle=$mycoursetheme;
}
$lp_theme_css=$mystyle;
$lp_theme_css=$mystyle;
if($display_progress_bar)
{ if($display_progress_bar)
$dsp_progress = '<td>'.learnpath::get_progress_bar('%',learnpath::get_db_progress($id,api_get_user_id()),'').'</td>'; {
} $dsp_progress = '<td>'.learnpath::get_progress_bar('%',learnpath::get_db_progress($id,api_get_user_id()),'').'</td>';
else }
{ else
$dsp_progress = '<td style="padding-top:1em;">'.learnpath::get_db_progress($id,api_get_user_id(),'both').'</td>'; {
} $dsp_progress = '<td style="padding-top:1em;">'.learnpath::get_db_progress($id,api_get_user_id(),'both').'</td>';
if($is_allowed_to_edit) }
{ 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"; {
$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";
/* export */
//export not available for normal lps yet /* export */
if($details['lp_type']==1){ //export not available for normal lps yet
$dsp_export = '<td align="center">' . if($details['lp_type']==1){
"<a href='".api_get_self()."?".api_get_cidreq()."&action=export&lp_id=$id'>" . $dsp_export = '<td align="center">' .
"<img src=\"../img/cd.gif\" border=\"0\" title=\"".get_lang('Export')."\">" . "<a href='".api_get_self()."?".api_get_cidreq()."&action=export&lp_id=$id'>" .
"</a>" . "<img src=\"../img/cd.gif\" border=\"0\" title=\"".get_lang('Export')."\">" .
""; "</a>" .
}elseif($details['lp_type']==2){ "";
$dsp_export = '<td align="center">' . }elseif($details['lp_type']==2){
"<a href='".api_get_self()."?".api_get_cidreq()."&action=export&lp_id=$id&export_name=".replace_dangerous_char($name,'strict').".zip'>" . $dsp_export = '<td align="center">' .
"<img src=\"../img/cd.gif\" border=\"0\" title=\"".get_lang('Export')."\">" . "<a href='".api_get_self()."?".api_get_cidreq()."&action=export&lp_id=$id&export_name=".replace_dangerous_char($name,'strict').".zip'>" .
"</a>" . "<img src=\"../img/cd.gif\" border=\"0\" title=\"".get_lang('Export')."\">" .
""; "</a>" .
}else{ "";
$dsp_export = '<td align="center">' . }else{
//"<a href='".api_get_self()."?".api_get_cidreq()."&action=export&lp_id=$id'>" . $dsp_export = '<td align="center">' .
"<img src=\"../img/cd_gray.gif\" border=\"0\" title=\"".get_lang('Export')."\">" . //"<a href='".api_get_self()."?".api_get_cidreq()."&action=export&lp_id=$id'>" .
//"</a>" . "<img src=\"../img/cd_gray.gif\" border=\"0\" title=\"".get_lang('Export')."\">" .
""; //"</a>" .
} "";
/* edit title and description */ }
/* edit title and description */
$dsp_edit = '<td align="center">';
$dsp_edit_close = '</td>'; $dsp_edit = '<td align="center">';
$dsp_edit_close = '</td>';
/* DELETE COMMAND */
$dsp_delete = "<a href=\"lp_controller.php?".api_get_cidreq()."&action=delete&lp_id=$id\" " . /* DELETE COMMAND */
"onClick=\"return confirmation('".addslashes($name)."');\">" . $dsp_delete = "<a href=\"lp_controller.php?".api_get_cidreq()."&action=delete&lp_id=$id\" " .
"<img src=\"../img/delete.gif\" border=\"0\" title=\"".get_lang('_delete_learnpath')."\" />" . "onClick=\"return confirmation('".addslashes($name)."');\">" .
"</a>"; "<img src=\"../img/delete.gif\" border=\"0\" title=\"".get_lang('_delete_learnpath')."\" />" .
"</a>";
/* VISIBILITY COMMAND */
/* VISIBILITY COMMAND */
if ($details['lp_published'] == "i")
{ if ($details['lp_published'] == "i")
$dsp_publish = "<a href=\"".api_get_self()."?".api_get_cidreq()."&lp_id=$id&action=toggle_publish&new_status=v\">" . {
"<img src=\"../img/visible_LP_list.gif\" border=\"0\" title=\"".get_lang('_publish')."\" />" . $dsp_publish = "<a href=\"".api_get_self()."?".api_get_cidreq()."&lp_id=$id&action=toggle_publish&new_status=v\">" .
"</a>" . "<img src=\"../img/invisible_LP_list.gif\" border=\"0\" title=\"".get_lang('_publish')."\" />" .
""; "</a>" .
} "";
else }
{ else
$dsp_publish = "<a href='".api_get_self()."?".api_get_cidreq()."&lp_id=$id&action=toggle_publish&new_status=i'>" . {
"<img src=\"../img/invisible_LP_list.gif\" border=\"0\" title=\"".get_lang('_no_publish')."\" />" . $dsp_publish = "<a href='".api_get_self()."?".api_get_cidreq()."&lp_id=$id&action=toggle_publish&new_status=i'>" .
"</a>". "<img src=\"../img/visible_LP_list.gif\" border=\"0\" title=\"".get_lang('_no_publish')."\" />" .
""; "</a>".
} "";
/* VISIBILITY COMMAND */ }
/* VISIBILITY COMMAND */
if ($details['lp_visibility'] == 0)
{ if ($details['lp_visibility'] == 0)
$dsp_visible = "<a href=\"".api_get_self()."?".api_get_cidreq()."&lp_id=$id&action=toggle_visible&new_status=1\">" . {
"<img src=\"../img/invisible.gif\" border=\"0\" title=\"".get_lang('Show')."\" />" . $dsp_visible = "<a href=\"".api_get_self()."?".api_get_cidreq()."&lp_id=$id&action=toggle_visible&new_status=1\">" .
"</a>" . "<img src=\"../img/invisible.gif\" border=\"0\" title=\"".get_lang('Show')."\" />" .
""; "</a>" .
} "";
else }
{ else
$dsp_visible = "<a href='".api_get_self()."?".api_get_cidreq()."&lp_id=$id&action=toggle_visible&new_status=0'>" . {
"<img src=\"../img/visible.gif\" border=\"0\" title=\"".get_lang('Hide')."\" />" . $dsp_visible = "<a href='".api_get_self()."?".api_get_cidreq()."&lp_id=$id&action=toggle_visible&new_status=0'>" .
"</a>". "<img src=\"../img/visible.gif\" border=\"0\" title=\"".get_lang('Hide')."\" />" .
""; "</a>".
} "";
/* Default view mode settings (fullscreen/embedded) */ }
if($details['lp_view_mode'] == 'fullscreen'){ /* Default view mode settings (fullscreen/embedded) */
$dsp_default_view = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_view_mode&lp_id='.$id.'">' . if($details['lp_view_mode'] == 'fullscreen'){
'<img src="../img/view_fullscreen.gif" border="0" alt="'.get_lang("ViewModeEmbedded").'" title="'.get_lang("ViewModeEmbedded").'"/>' . $dsp_default_view = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_view_mode&lp_id='.$id.'">' .
'</a>&nbsp;'; '<img src="../img/view_fullscreen.gif" border="0" alt="'.get_lang("ViewModeEmbedded").'" title="'.get_lang("ViewModeEmbedded").'"/>' .
}else{ '</a>&nbsp;';
$dsp_default_view = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_view_mode&lp_id='.$id.'">' . }else{
'<img src="../img/view_choose.gif" border="0" alt="'.get_lang("ViewModeFullScreen").'" title="'.get_lang("ViewModeFullScreen").'"/>' . $dsp_default_view = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_view_mode&lp_id='.$id.'">' .
'</a>&nbsp;'; '<img src="../img/view_choose.gif" border="0" alt="'.get_lang("ViewModeFullScreen").'" title="'.get_lang("ViewModeFullScreen").'"/>' .
} '</a>&nbsp;';
/* Increase SCORM recording */ }
/* /* Increase SCORM recording */
if($details['lp_force_commit'] == 1){ /*
$dsp_force_commit = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_force_commit&lp_id='.$id.'">' . if($details['lp_force_commit'] == 1){
'<img src="../img/clock.gif" border="0" alt="Normal SCORM recordings" title="'.get_lang("MakeScormRecordingNormal").'"/>' . $dsp_force_commit = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_force_commit&lp_id='.$id.'">' .
'</a>&nbsp;'; '<img src="../img/clock.gif" border="0" alt="Normal SCORM recordings" title="'.get_lang("MakeScormRecordingNormal").'"/>' .
}else{ '</a>&nbsp;';
$dsp_force_commit = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_force_commit&lp_id='.$id.'">' . }else{
'<img src="../img/clock_gray.gif" border="0" alt="Extra SCORM recordings" title="'.get_lang("MakeScormRecordingExtra").'"/>' . $dsp_force_commit = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_force_commit&lp_id='.$id.'">' .
'</a>&nbsp;'; '<img src="../img/clock_gray.gif" border="0" alt="Extra SCORM recordings" title="'.get_lang("MakeScormRecordingExtra").'"/>' .
} '</a>&nbsp;';
*/ }
if($details['lp_prevent_reinit']==1){ */
$dsp_reinit = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_reinit&lp_id='.$id.'">' . if($details['lp_prevent_reinit']==1){
'<img src="../img/kaboodleloop_gray.gif" border="0" alt="Allow reinit" title="'.get_lang("AllowMultipleAttempts").'"/>' . $dsp_reinit = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_reinit&lp_id='.$id.'">' .
'</a>&nbsp;'; '<img src="../img/kaboodleloop_gray.gif" border="0" alt="Allow reinit" title="'.get_lang("AllowMultipleAttempts").'"/>' .
}else{ '</a>&nbsp;';
$dsp_reinit = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_reinit&lp_id='.$id.'">' . }else{
'<img src="../img/kaboodleloop.gif" border="0" alt="Prevent reinit" title="'.get_lang("PreventMultipleAttempts").'"/>' . $dsp_reinit = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_reinit&lp_id='.$id.'">' .
'</a>&nbsp;'; '<img src="../img/kaboodleloop.gif" border="0" alt="Prevent reinit" title="'.get_lang("PreventMultipleAttempts").'"/>' .
} '</a>&nbsp;';
if($details['lp_type']==1 || $details['lp_type']==2){ }
$dsp_build = '<a href="lp_controller.php?'.api_get_cidreq().'&amp;action=build&amp;lp_id='.$id.'"><img src="../img/wizard.gif" border="0" title="'.get_lang("Build").'"></a>&nbsp;'; if($details['lp_type']==1 || $details['lp_type']==2){
}else{ $dsp_build = '<a href="lp_controller.php?'.api_get_cidreq().'&amp;action=build&amp;lp_id='.$id.'"><img src="../img/wizard.gif" border="0" title="'.get_lang("Build").'"></a>&nbsp;';
$dsp_build = '<img src="../img/wizard_gray.gif" border="0" title="'.get_lang("Build").'">&nbsp;'; }else{
} $dsp_build = '<img src="../img/wizard_gray.gif" border="0" title="'.get_lang("Build").'">&nbsp;';
if($test_mode == 'test' or api_is_course_admin()) }
{ if($test_mode == 'test' or api_is_course_admin())
if($details['lp_scorm_debug']==1){ {
$dsp_debug = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_scorm_debug&lp_id='.$id.'">' . if($details['lp_scorm_debug']==1){
'<img src="../img/bug.gif" border="0" alt="'.get_lang("HideDebug").'" title="'.get_lang("HideDebug").'"/>' . $dsp_debug = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_scorm_debug&lp_id='.$id.'">' .
'</a>&nbsp;'; '<img src="../img/bug.gif" border="0" alt="'.get_lang("HideDebug").'" title="'.get_lang("HideDebug").'"/>' .
}else{ '</a>&nbsp;';
$dsp_debug = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_scorm_debug&lp_id='.$id.'">' . }else{
'<img src="../img/bug_gray.gif" border="0" alt="'.get_lang("ShowDebug").'" title="'.get_lang("ShowDebug").'"/>' . $dsp_debug = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_scorm_debug&lp_id='.$id.'">' .
'</a>&nbsp;'; '<img src="../img/bug_gray.gif" border="0" alt="'.get_lang("ShowDebug").'" title="'.get_lang("ShowDebug").'"/>' .
} '</a>&nbsp;';
} }
if($details['lp_display_order'] == 1 && $max != 1) }
{ if($details['lp_display_order'] == 1 && $max != 1)
$dsp_order .= '<td><a href="lp_controller.php?'.api_get_cidreq().'&action=move_lp_down&lp_id='.$id.'">' . {
'<img src="../img/arrow_down_0.gif" border="0" alt="'.get_lang("MoveDown").'" title="'.get_lang("MoveDown").'"/>' . $dsp_order .= '<td><a href="lp_controller.php?'.api_get_cidreq().'&action=move_lp_down&lp_id='.$id.'">' .
'</a><img src="../img/blanco.png" border="0" alt="" title="" /></td>'; '<img src="../img/arrow_down_0.gif" border="0" alt="'.get_lang("MoveDown").'" title="'.get_lang("MoveDown").'"/>' .
} '</a><img src="../img/blanco.png" border="0" alt="" title="" /></td>';
elseif($current == $max-1 && $max != 1) //last element }
{ elseif($current == $max-1 && $max != 1) //last element
$dsp_order .= '<td><img src="../img/blanco.png" border="0" alt="" title="" /><a href="lp_controller.php?'.api_get_cidreq().'&action=move_lp_up&lp_id='.$id.'">' . {
'<img src="../img/arrow_up_0.gif" border="0" alt="'.get_lang("MoveDown").'" title="'.get_lang("MoveDown").'"/>' . $dsp_order .= '<td><img src="../img/blanco.png" border="0" alt="" title="" /><a href="lp_controller.php?'.api_get_cidreq().'&action=move_lp_up&lp_id='.$id.'">' .
'</a></td>'; '<img src="../img/arrow_up_0.gif" border="0" alt="'.get_lang("MoveUp").'" title="'.get_lang("MoveUp").'"/>' .
} '</a></td>';
elseif($max == 1) }
{ elseif($max == 1)
$dsp_order = '<td></td>'; {
} $dsp_order = '<td></td>';
else }
{ else
$dsp_order .= '<td><a href="lp_controller.php?'.api_get_cidreq().'&action=move_lp_down&lp_id='.$id.'">' . {
'<img src="../img/arrow_down_0.gif" border="0" alt="'.get_lang("MoveDown").'" title="'.get_lang("MoveDown").'"/>' . $dsp_order .= '<td><a href="lp_controller.php?'.api_get_cidreq().'&action=move_lp_down&lp_id='.$id.'">' .
'</a>&nbsp;'; '<img src="../img/arrow_down_0.gif" border="0" alt="'.get_lang("MoveDown").'" title="'.get_lang("MoveDown").'"/>' .
$dsp_order .= '<a href="lp_controller.php?'.api_get_cidreq().'&action=move_lp_up&lp_id='.$id.'">' . '</a>&nbsp;';
'<img src="../img/arrow_up_0.gif" border="0" alt="'.get_lang("MoveDown").'" title="'.get_lang("MoveDown").'"/>' . $dsp_order .= '<a href="lp_controller.php?'.api_get_cidreq().'&action=move_lp_up&lp_id='.$id.'">' .
'</a></td>'; '<img src="../img/arrow_up_0.gif" border="0" alt="'.get_lang("MoveDown").'" title="'.get_lang("MoveDown").'"/>' .
} '</a></td>';
} // end if($is_allowedToEdit) }
//echo $dsp_line.$dsp_desc.$dsp_export.$dsp_edit.$dsp_delete.$dsp_visible; } // end if($is_allowedToEdit)
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_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_reinit.$dsp_force_commit.$dsp_delete; 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 "</tr>\n"; //echo $dsp_line.$dsp_progress.$dsp_desc.$dsp_export.$dsp_edit.$dsp_build.$dsp_visible.$dsp_reinit.$dsp_force_commit.$dsp_delete;
$current ++; //counter for number of elements treated echo "</tr>\n";
} // end foreach ($flat_list) $current ++; //counter for number of elements treated
//TODO print some user-friendly message if counter is still = 0 to tell nothing can be displayd yet } // end foreach ($flat_list)
}// end if ( is_array($flat_list) //TODO print some user-friendly message if counter is still = 0 to tell nothing can be displayd yet
echo "</table>"; }// end if ( is_array($flat_list)
echo "<br/><br/>"; echo "</table>";
echo "<br/><br/>";
/* search widget */
if (api_get_setting('search_enabled') == 'true') /* search widget */
search_widget_show(); if (api_get_setting('search_enabled') == 'true')
search_widget_show();
/*
============================================================================== /*
FOOTER ==============================================================================
============================================================================== FOOTER
*/ ==============================================================================
Display::display_footer(); */
Display::display_footer();
?> ?>
Loading…
Cancel
Save