[svn r14835] Améliorer la mise en page de l'outil Travaux (FS#2449)

skala
Julio Montoya 17 years ago
parent 67e962cb17
commit dd23b68f6d
  1. 2
      main/css/academica/default.css
  2. 5
      main/css/academica/scorm.css
  3. 2
      main/css/baby/default.css
  4. 5
      main/css/baby/scorm.css
  5. 2
      main/css/corporativa/default.css
  6. 5
      main/css/corporativa/scorm.css
  7. 2
      main/css/default/default.css
  8. 5
      main/css/default/scorm.css
  9. 3
      main/css/default_with_tabs/default.css
  10. 6
      main/css/default_with_tabs/scorm.css
  11. 2
      main/css/dokeosgrey/default.css
  12. 6
      main/css/dokeosgrey/scorm.css
  13. 4
      main/newscorm/learnpath.class.php
  14. 2
      main/newscorm/lp_add_item.php
  15. 2
      main/newscorm/lp_build.php
  16. 2
      main/newscorm/lp_edit_item.php
  17. 2
      main/newscorm/lp_edit_item_prereq.php
  18. 2
      main/newscorm/lp_list.php
  19. 2
      main/newscorm/lp_move_item.php
  20. 2
      main/newscorm/lp_view_item.php
  21. 27
      main/work/work.lib.php
  22. 40
      main/work/work.php

@ -620,7 +620,7 @@ td .menu {
div.row { div.row {
clear: both; clear: both;
padding-top: 5px; padding-top: 8px;
margin-left: 1em; margin-left: 1em;
} }

@ -22,11 +22,12 @@ background-color: white;
height: 325px; height: 325px;
width: 99%; width: 99%;
border-right: 1px #999999 solid; border-right: 1px #999999 solid;
border-left: 15px #FFF solid;
} }
.inner_lp_toc .scorm_item{ .inner_lp_toc .scorm_item{
font-size: 11px; font-size: 11px;
margin-left: 10px; margin-left: 10px;
margin-right:10px; margin-right:25px;
padding-bottom: 2px; padding-bottom: 2px;
text-decoration: none; text-decoration: none;
} }
@ -42,7 +43,7 @@ text-decoration: none;
.inner_lp_toc .scorm_item_highlight{ .inner_lp_toc .scorm_item_highlight{
font-size: 11px; font-size: 11px;
margin-left: 10px; margin-left: 10px;
margin-right: 10px; margin-right: 25px;
padding-bottom: 2px; padding-bottom: 2px;
text-decoration: none; text-decoration: none;
background:#F8F8F8; border:1px dashed #999999; background:#F8F8F8; border:1px dashed #999999;

@ -587,7 +587,7 @@ td .menu {
div.row { div.row {
clear: both; clear: both;
padding-top: 5px; padding-top: 8px;
margin-left: 1em; margin-left: 1em;
} }

@ -22,11 +22,12 @@ background-color: white;
height: 325px; height: 325px;
width: 99%; width: 99%;
border-right: 1px #999999 solid; border-right: 1px #999999 solid;
border-left: 15px #FFF solid;
} }
.inner_lp_toc .scorm_item{ .inner_lp_toc .scorm_item{
font-size: 11px; font-size: 11px;
margin-left: 10px; margin-left: 10px;
margin-right:10px; margin-right:25px;
padding-bottom: 2px; padding-bottom: 2px;
text-decoration: none; text-decoration: none;
} }
@ -42,7 +43,7 @@ text-decoration: none;
.inner_lp_toc .scorm_item_highlight{ .inner_lp_toc .scorm_item_highlight{
font-size: 11px; font-size: 11px;
margin-left: 10px; margin-left: 10px;
margin-right: 10px; margin-right: 25px;
padding-bottom: 2px; padding-bottom: 2px;
text-decoration: none; text-decoration: none;
background:#F8F8F8; border:1px dashed #999999; background:#F8F8F8; border:1px dashed #999999;

@ -562,7 +562,7 @@ td .menu {
div.row { div.row {
clear: both; clear: both;
padding-top: 5px; padding-top: 8px;
margin-left: 1em; margin-left: 1em;
} }

@ -22,11 +22,12 @@ background-color: white;
height: 325px; height: 325px;
width: 99%; width: 99%;
border-right: 1px #999999 solid; border-right: 1px #999999 solid;
border-left: 15px #FFF solid;
} }
.inner_lp_toc .scorm_item{ .inner_lp_toc .scorm_item{
font-size: 11px; font-size: 11px;
margin-left: 10px; margin-left: 10px;
margin-right:10px; margin-right:25px;
padding-bottom: 2px; padding-bottom: 2px;
text-decoration: none; text-decoration: none;
} }
@ -42,7 +43,7 @@ text-decoration: none;
.inner_lp_toc .scorm_item_highlight{ .inner_lp_toc .scorm_item_highlight{
font-size: 11px; font-size: 11px;
margin-left: 10px; margin-left: 10px;
margin-right: 10px; margin-right: 25px;
padding-bottom: 2px; padding-bottom: 2px;
text-decoration: none; text-decoration: none;
background:#F8F8F8; border:1px dashed #999999; background:#F8F8F8; border:1px dashed #999999;

@ -1135,7 +1135,7 @@ a.nobold:hover {
div.row { div.row {
clear: both; clear: both;
padding-top: 5px; padding-top: 8px;
} }
div.row div.form_header { div.row div.form_header {

@ -22,11 +22,12 @@ background-color: white;
height: 325px; height: 325px;
width: 99%; width: 99%;
border-right: 1px #999999 solid; border-right: 1px #999999 solid;
border-left: 15px #FFF solid;
} }
.inner_lp_toc .scorm_item{ .inner_lp_toc .scorm_item{
font-size: 11px; font-size: 11px;
margin-left: 10px; margin-left: 10px;
margin-right:10px; margin-right:25px;
padding-bottom: 2px; padding-bottom: 2px;
text-decoration: none; text-decoration: none;
} }
@ -42,7 +43,7 @@ text-decoration: none;
.inner_lp_toc .scorm_item_highlight{ .inner_lp_toc .scorm_item_highlight{
font-size: 11px; font-size: 11px;
margin-left: 10px; margin-left: 10px;
margin-right: 10px; margin-right: 25px;
padding-bottom: 2px; padding-bottom: 2px;
text-decoration: none; text-decoration: none;
background:#F8F8F8; border:1px dashed #999999; background:#F8F8F8; border:1px dashed #999999;

@ -787,7 +787,7 @@ a.nobold:hover { font-weight: normal; color: #999; text-decoration: underline; m
*****************************************************/ *****************************************************/
div.row { div.row {
clear: both; clear: both;
padding-top: 5px; padding-top: 8px;
} }
div.row div.form_header { div.row div.form_header {
white-space: nowrap; white-space: nowrap;
@ -800,6 +800,7 @@ div.row div.label {
width: 18%; width: 18%;
text-align: right; text-align: right;
} }
div.row div.formw { div.row div.formw {
width: 80%; width: 80%;
} }

@ -22,11 +22,13 @@ background-color: white;
height: 325px; height: 325px;
width: 99%; width: 99%;
border-right: 1px #999999 solid; border-right: 1px #999999 solid;
border-left: 15px #FFF solid;
} }
.inner_lp_toc .scorm_item{ .inner_lp_toc .scorm_item{
font-size: 11px; font-size: 11px;
margin-left: 10px; margin-left: 10px;
margin-right:10px; margin-right:25px;
padding-bottom: 2px; padding-bottom: 2px;
text-decoration: none; text-decoration: none;
} }
@ -42,7 +44,7 @@ text-decoration: none;
.inner_lp_toc .scorm_item_highlight{ .inner_lp_toc .scorm_item_highlight{
font-size: 11px; font-size: 11px;
margin-left: 10px; margin-left: 10px;
margin-right: 10px; margin-right: 25px;
padding-bottom: 2px; padding-bottom: 2px;
text-decoration: none; text-decoration: none;
background:#F8F8F8; border:1px dashed #999999; background:#F8F8F8; border:1px dashed #999999;

@ -765,7 +765,7 @@ a.nobold:hover { font-weight: normal; color: #999; text-decoration: underline; m
*****************************************************/ *****************************************************/
div.row { div.row {
clear: both; clear: both;
padding-top: 5px; padding-top: 8px;
} }
div.row div.form_header { div.row div.form_header {
white-space: nowrap; white-space: nowrap;

@ -22,13 +22,15 @@ background-color: white;
height: 325px; height: 325px;
width: 99%; width: 99%;
border-right: 1px #999999 solid; border-right: 1px #999999 solid;
border-left: 15px #FFF solid;
} }
.inner_lp_toc .scorm_item{ .inner_lp_toc .scorm_item{
font-size: 11px; font-size: 11px;
margin-left: 10px; margin-left: 10px;
margin-right:10px; margin-right:25px;
padding-bottom: 2px; padding-bottom: 2px;
text-decoration: none; text-decoration: none;
} }
.inner_lp_toc .scorm_item A{ .inner_lp_toc .scorm_item A{
@ -42,7 +44,7 @@ text-decoration: none;
.inner_lp_toc .scorm_item_highlight{ .inner_lp_toc .scorm_item_highlight{
font-size: 11px; font-size: 11px;
margin-left: 10px; margin-left: 10px;
margin-right: 10px; margin-right: 25px;
padding-bottom: 2px; padding-bottom: 2px;
text-decoration: none; text-decoration: none;
background:#F8F8F8; border:1px dashed #999999; background:#F8F8F8; border:1px dashed #999999;

@ -2450,7 +2450,7 @@ class learnpath {
$html .= '<div class="inner_lp_toc">'."\n" ; $html .= '<div class="inner_lp_toc">'."\n" ;
if(api_is_allowed_to_edit()){ if(api_is_allowed_to_edit()){
$mych = api_get_setting('platform_charset'); $mych = api_get_setting('platform_charset');
$html.="<a href='lp_controller.php?".api_get_cidreq()."&action=build&lp_id=".$this->lp_id."' style='font-size: 11px' target='_parent'>".mb_convert_encoding(get_lang("Build"),$this->encoding,$mych)."</a>&#124;<a style='font-size: 11px' href='lp_controller.php?".api_get_cidreq()."&action=admin_view&lp_id=".$this->lp_id."' target='_parent'>".mb_convert_encoding(get_lang("BasicOverview"),$this->encoding,$mych)."</a>&#124;".mb_convert_encoding(get_lang("Display"),$this->encoding,$mych)."<br/><br/>"; $html.="<p>&nbsp;&nbsp;&nbsp;&nbsp;<a target='_parent' href='lp_controller.php?".api_get_cidreq()."&action=build&lp_id=".$this->lp_id."' style= target='_parent'>".mb_convert_encoding(get_lang("Build"),$this->encoding,$mych)."</a>&nbsp;&#124;&nbsp;<a href='lp_controller.php?".api_get_cidreq()."&action=admin_view&lp_id=".$this->lp_id."' target='_parent'>".mb_convert_encoding(get_lang("BasicOverview"),$this->encoding,$mych)."</a>&nbsp;&#124;&nbsp;".mb_convert_encoding(get_lang("Display"),$this->encoding,$mych)."</p>";
unset($mych); unset($mych);
} }
// " onchange=\"javascript:document.getElementById('toc_$parent').focus();\">\n"; // " onchange=\"javascript:document.getElementById('toc_$parent').focus();\">\n";
@ -3968,7 +3968,7 @@ class learnpath {
unset($this->arrMenu); unset($this->arrMenu);
if(api_is_allowed_to_edit()) if(api_is_allowed_to_edit())
$return .= '<p><a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=build&amp;lp_id=' . $this->lp_id . '">'.get_lang("Advanced").'</a>&#124;'.get_lang("BasicOverview").'&#124;<a href="lp_controller.php?cidReq='.$_GET['cidReq'].'&action=view&lp_id='.$this->lp_id.'">'.get_lang("Display").'</a></p>'; $return .= '<p><a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=build&amp;lp_id=' . $this->lp_id . '">'.get_lang("Advanced").'</a>&nbsp;&#124;&nbsp;'.get_lang("BasicOverview").'&nbsp;&#124;&nbsp;<a href="lp_controller.php?cidReq='.$_GET['cidReq'].'&action=view&lp_id='.$this->lp_id.'">'.get_lang("Display").'</a></p>';
$return .= '<table class="data_table">' . "\n"; $return .= '<table class="data_table">' . "\n";

@ -189,7 +189,7 @@ echo '<table cellpadding="0" cellspacing="0" class="lp_build">';
echo '<td class="tree">'; echo '<td class="tree">';
echo '<p style="border-bottom:1px solid #999999; margin:0; padding:2px;">'.get_lang("Build").'&nbsp;<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">'.get_lang("BasicOverview").'</a>&nbsp;<a href="lp_controller.php?cidReq='.$_GET['cidReq'].'&action=view&lp_id='.$_SESSION['oLP']->lp_id.'">'.get_lang("Display").'</a></p>'; echo '<p style="border-bottom:1px solid #999999; margin:0; padding:2px;">'.get_lang("Build").'&nbsp;&#124;&nbsp;<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">'.get_lang("BasicOverview").'</a>&nbsp;&#124;&nbsp;<a href="lp_controller.php?cidReq='.$_GET['cidReq'].'&action=view&lp_id='.$_SESSION['oLP']->lp_id.'">'.get_lang("Display").'</a></p>';
//links for adding a module, chapter or step //links for adding a module, chapter or step
echo '<div class="lp_actions">'; echo '<div class="lp_actions">';

@ -195,7 +195,7 @@ echo '<table cellpadding="0" cellspacing="0" class="lp_build">';
echo '<td class="tree">'; echo '<td class="tree">';
echo '<p style="border-bottom:1px solid #999999; margin:0; padding:2px;">'.get_lang("Build").'&#124;<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">'.get_lang("BasicOverview").'</a>&#124;<a href="lp_controller.php?cidReq='.$_GET['cidReq'].'&action=view&lp_id='.$_SESSION['oLP']->lp_id.'">'.get_lang("Display").'</a></p>'; echo '<p style="border-bottom:1px solid #999999; margin:0; padding:2px;">'.get_lang("Build").'&nbsp;&#124;&nbsp;<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">'.get_lang("BasicOverview").'</a>&nbsp;&#124;&nbsp;<a href="lp_controller.php?cidReq='.$_GET['cidReq'].'&action=view&lp_id='.$_SESSION['oLP']->lp_id.'">'.get_lang("Display").'</a></p>';
//links for adding a module, chapter or step //links for adding a module, chapter or step
echo '<div class="lp_actions">'; echo '<div class="lp_actions">';

@ -183,7 +183,7 @@ echo '<table cellpadding="0" cellspacing="0" class="lp_build">';
echo '<td class="tree">'; echo '<td class="tree">';
echo '<p style="border-bottom:1px solid #999999; margin:0; padding:2px;">'.get_lang("Build").'&nbsp;<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">'.get_lang("BasicOverview").'</a>&nbsp;<a href="lp_controller.php?cidReq='.$_GET['cidReq'].'&action=view&lp_id='.$_SESSION['oLP']->lp_id.'">'.get_lang("Display").'</a></p>'; echo '<p style="border-bottom:1px solid #999999; margin:0; padding:2px;">'.get_lang("Build").'&nbsp;&#124;&nbsp;<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">'.get_lang("BasicOverview").'</a>&nbsp;&#124;&nbsp;<a href="lp_controller.php?cidReq='.$_GET['cidReq'].'&action=view&lp_id='.$_SESSION['oLP']->lp_id.'">'.get_lang("Display").'</a></p>';
//links for adding a module, chapter or step //links for adding a module, chapter or step
echo '<div class="lp_actions">'; echo '<div class="lp_actions">';

@ -172,7 +172,7 @@ echo '<table cellpadding="0" cellspacing="0" class="lp_build">';
echo '<td class="tree">'; echo '<td class="tree">';
echo '<p style="border-bottom:1px solid #999999; margin:0; padding:2px;">'.get_lang("Build").'&nbsp;<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">'.get_lang("BasicOverview").'</a>&nbsp;<a href="lp_controller.php?cidReq='.$_GET['cidReq'].'&action=view&lp_id='.$_SESSION['oLP']->lp_id.'">'.get_lang("Display").'</a></p>'; echo '<p style="border-bottom:1px solid #999999; margin:0; padding:2px;">'.get_lang("Build").'&nbsp;&#124;&nbsp;<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">'.get_lang("BasicOverview").'</a>&nbsp;&#124;&nbsp;<a href="lp_controller.php?cidReq='.$_GET['cidReq'].'&action=view&lp_id='.$_SESSION['oLP']->lp_id.'">'.get_lang("Display").'</a></p>';
//links for adding a module, chapter or step //links for adding a module, chapter or step
echo '<div class="lp_actions">'; echo '<div class="lp_actions">';

@ -336,7 +336,7 @@ if (is_array($flat_list))
if($details['lp_type']==1 || $details['lp_type']==2){ 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;'; $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;';
}else{ }else{
$dsp_build = '<img src="../img/wizard_gray.gif" border="0" title="'.get_lang("build").'">&nbsp;'; $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())
{ {

@ -179,7 +179,7 @@ echo '<table cellpadding="0" cellspacing="0" class="lp_build">';
echo '<td class="tree">'; echo '<td class="tree">';
echo '<p style="border-bottom:1px solid #999999; margin:0; padding:2px;">'.get_lang("Build").'&nbsp;<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">'.get_lang("BasicOverview").'</a>&nbsp;<a href="lp_controller.php?cidReq='.$_GET['cidReq'].'&action=view&lp_id='.$_SESSION['oLP']->lp_id.'">'.get_lang("Display").'</a></p>'; echo '<p style="border-bottom:1px solid #999999; margin:0; padding:2px;">'.get_lang("Build").'&nbsp;&#124;&nbsp;<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">'.get_lang("BasicOverview").'</a>&nbsp;&#124;&nbsp;<a href="lp_controller.php?cidReq='.$_GET['cidReq'].'&action=view&lp_id='.$_SESSION['oLP']->lp_id.'">'.get_lang("Display").'</a></p>';
//links for adding a module, chapter or step //links for adding a module, chapter or step
echo '<div class="lp_actions">'; echo '<div class="lp_actions">';

@ -185,7 +185,7 @@ echo '<table cellpadding="0" cellspacing="0" class="lp_build">';
echo '<td class="tree">'; echo '<td class="tree">';
echo '<p style="border-bottom:1px solid #999999; margin:0; padding:2px;">'.get_lang("Build").'&nbsp;<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">'.get_lang("BasicOverview").'</a>&nbsp;<a href="lp_controller.php?cidReq='.$_GET['cidReq'].'&action=view&lp_id='.$_SESSION['oLP']->lp_id.'">'.get_lang("Display").'</a></p>'; echo '<p style="border-bottom:1px solid #999999; margin:0; padding:2px;">'.get_lang("Build").'&nbsp;&#124;&nbsp;<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">'.get_lang("BasicOverview").'</a>&nbsp;&#124;&nbsp;<a href="lp_controller.php?cidReq='.$_GET['cidReq'].'&action=view&lp_id='.$_SESSION['oLP']->lp_id.'">'.get_lang("Display").'</a></p>';
//links for adding a module, chapter or step //links for adding a module, chapter or step
echo '<div class="lp_actions">'; echo '<div class="lp_actions">';

@ -45,20 +45,22 @@ function display_action_links($cur_dir_path, $always_show_tool_options, $always_
if(strlen($cur_dir_path) > 0 && $cur_dir_path != '/') if(strlen($cur_dir_path) > 0 && $cur_dir_path != '/')
{ {
$parent_dir = dirname($cur_dir_path); $parent_dir = dirname($cur_dir_path);
$display_output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.$parent_dir.'">'.Display::return_icon('folder_up.gif').' '.get_lang('Up').'</a> '; $display_output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&origin='.Security::remove_XSS($_GET['origin']).'&curdirpath='.$parent_dir.'">'.Display::return_icon('folder_up.gif').' '.get_lang('Up').'</a>&nbsp&nbsp';
} }
if (! $always_show_upload_form ) if (! $always_show_upload_form )
{ {
$display_output .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&curdirpath=".$cur_dir_path."&amp;display_upload_form=true&amp;origin=".Security::remove_XSS($_GET['origin'])."\">".Display::return_icon('submit_file.gif')." ". get_lang("UploadADocument") . "</a> "; $display_output .= "&nbsp&nbsp<a href=\"".api_get_self()."?".api_get_cidreq()."&curdirpath=".$cur_dir_path."&amp;display_upload_form=true&amp;origin=".Security::remove_XSS($_GET['origin'])."\">".Display::return_icon('submit_file.gif')." ". get_lang("UploadADocument") .'</a>&nbsp&nbsp&nbsp&nbsp';
} }
if (! $always_show_tool_options && api_is_allowed_to_edit() ) if (! $always_show_tool_options && api_is_allowed_to_edit() )
{ {
// Create dir // Create dir
$display_output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;curdirpath='.$cur_dir_path.'&amp;createdir=1"><img src="../img/folder_new.gif" border="0"alt ="'.get_lang('CreateDir').'" /> '.get_lang('CreateDir').' </a>'; $display_output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;curdirpath='.$cur_dir_path.'&amp;createdir=1&origin='.Security::remove_XSS($_GET['origin']).'"><img src="../img/folder_new.gif" border="0"alt ="'.get_lang('CreateDir').'" /> '.get_lang('CreateDir').' </a>&nbsp&nbsp';
// Options // Options
$display_output .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&curdirpath=".$cur_dir_path."&amp;display_tool_options=true&amp;origin=".Security::remove_XSS($_GET['origin'])."\">".Display::return_icon('acces_tool.gif').' ' . get_lang("EditToolOptions") . "</a> "; $display_output .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&curdirpath=".$cur_dir_path."&amp;origin=".Security::remove_XSS($_GET['origin'])."&amp;display_tool_options=true&amp;origin=".Security::remove_XSS($_GET['origin'])."\">".Display::return_icon('acces_tool.gif').' ' . get_lang("EditToolOptions") . "</a>&nbsp&nbsp";
} }
if ($display_output != "") if ($display_output != "")
@ -253,6 +255,8 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
} }
$sort_params = implode('&amp;',$sort_params); $sort_params = implode('&amp;',$sort_params);
$origin=Security::remove_XSS($origin);
if(substr($sub_course_dir,-1,1)!='/' && !empty($sub_course_dir)) if(substr($sub_course_dir,-1,1)!='/' && !empty($sub_course_dir))
{ {
$sub_course_dir = $sub_course_dir.'/'; $sub_course_dir = $sub_course_dir.'/';
@ -402,7 +406,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
// form edit directory // form edit directory
if(isset($clean_edit_dir) && $clean_edit_dir==$mydir) if(isset($clean_edit_dir) && $clean_edit_dir==$mydir)
{ {
$form_folder = new FormValidator('edit_dir', 'post', api_get_self().'?curdirpath='.$my_sub_dir.'&edit_dir='.$mydir); $form_folder = new FormValidator('edit_dir', 'post', api_get_self().'?curdirpath='.$my_sub_dir.'&origin='.$origin.'&edit_dir='.$mydir);
$group_name[] = FormValidator :: createElement('text','dir_name'); $group_name[] = FormValidator :: createElement('text','dir_name');
$group_name[] = FormValidator :: createElement('submit','submit_edit_dir',get_lang('Ok')); $group_name[] = FormValidator :: createElement('submit','submit_edit_dir',get_lang('Ok'));
$form_folder -> addGroup($group_name,'my_group'); $form_folder -> addGroup($group_name,'my_group');
@ -418,6 +422,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
$mydir = $my_sub_dir.$values['dir_name']; $mydir = $my_sub_dir.$values['dir_name'];
$dir = $values['dir_name']; $dir = $values['dir_name'];
$display_edit_form=false; $display_edit_form=false;
} }
} }
@ -459,7 +464,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
} }
else else
{ {
$row[] = '<a href="'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.$mydir.'"'.$class.'>'.$dir.'</a><br>'.$cant_files.' '.$text_file.$dirtext; $row[] = '<a href="'.api_get_self().'?'.api_get_cidreq().'&origin='.$origin.'&curdirpath='.$mydir.'"'.$class.'>'.$dir.'</a><br>'.$cant_files.' '.$text_file.$dirtext;
} }
if ($count_files!=0) if ($count_files!=0)
@ -479,8 +484,8 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
if( $is_allowed_to_edit) if( $is_allowed_to_edit)
{ {
$action .= '<a href="'.api_get_self().'?cidReq='.api_get_course_id(). $action .= '<a href="'.api_get_self().'?cidReq='.api_get_course_id().
'&curdirpath='.$my_sub_dir.'&edit_dir='.$mydir.'"><img src="../img/edit.gif" alt="'.get_lang('Modify').'"></a>'; '&curdirpath='.$my_sub_dir.'&origin='.$origin.'&edit_dir='.$mydir.'"><img src="../img/edit.gif" alt="'.get_lang('Modify').'"></a>';
$action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&delete_dir='.$mydir.'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset))."'".')) return false;" title="'.get_lang('DirDelete').'" ><img src="'.api_get_path(WEB_IMG_PATH).'delete.gif" alt="'.get_lang('DirDelete').'"></a>'; $action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&origin='.$origin.'&delete_dir='.$mydir.'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset))."'".')) return false;" title="'.get_lang('DirDelete').'" ><img src="'.api_get_path(WEB_IMG_PATH).'delete.gif" alt="'.get_lang('DirDelete').'"></a>';
$row[] = $action; $row[] = $action;
} }
else else
@ -939,11 +944,11 @@ function insert_all_directory_in_course_table($base_work_dir)
{ {
$only_dir[]=substr($dir_to_array[$i],strlen($base_work_dir), strlen($dir_to_array[$i])); $only_dir[]=substr($dir_to_array[$i],strlen($base_work_dir), strlen($dir_to_array[$i]));
} }
/*
echo "<pre>"; echo "<pre>";
print_r($only_dir); print_r($only_dir);
echo "<pre>"; echo "<pre>";
*/
for($i=0;$i<count($only_dir);$i++) for($i=0;$i<count($only_dir);$i++)
{ {
global $work_table; global $work_table;
@ -978,7 +983,7 @@ function count_dir($path_dir, $recurse)
{ {
if (!(($entry == "..") || ($entry == "."))) if (!(($entry == "..") || ($entry == ".")))
{ {
if (Is_Dir($path_dir.'/'.$entry)) if (is_dir($path_dir.'/'.$entry))
{ {
$count_dir++; $count_dir++;
if ($recurse) if ($recurse)

@ -27,7 +27,7 @@
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University - ability for course admins to specify wether uploaded documents are visible or invisible by default. * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University - ability for course admins to specify wether uploaded documents are visible or invisible by default.
* @author Roan Embrechts, code refactoring and virtual course support * @author Roan Embrechts, code refactoring and virtual course support
* @author Frederic Vauthier, directories management * @author Frederic Vauthier, directories management
* @version $Id: work.php 14753 2008-04-03 22:20:25Z juliomontoya $ * @version $Id: work.php 14835 2008-04-10 21:26:48Z juliomontoya $
* *
* @todo refactor more code into functions, use quickforms, coding standards, ... * @todo refactor more code into functions, use quickforms, coding standards, ...
*/ */
@ -219,6 +219,7 @@ elseif (substr($my_cur_dir_path, -1, 1) != '/')
$link_target_parameter = ""; //or e.g. "target=\"_blank\""; $link_target_parameter = ""; //or e.g. "target=\"_blank\"";
$always_show_tool_options = false; $always_show_tool_options = false;
$always_show_upload_form = false; $always_show_upload_form = false;
if ($always_show_tool_options) { if ($always_show_tool_options) {
$display_tool_options = true; $display_tool_options = true;
} }
@ -273,8 +274,7 @@ if (!api_is_course_admin()) {
if ($origin != 'learnpath') { if ($origin != 'learnpath') {
$interbreadcrumb[] = array ( $interbreadcrumb[] = array (
'url' => $url_dir, 'url' => $url_dir,
'name' => get_lang('StudentPublications' 'name' => get_lang('StudentPublications'));
));
//if (!$display_tool_options && !$display_upload_form) //if (!$display_tool_options && !$display_upload_form)
//{ //{
@ -282,12 +282,12 @@ if ($origin != 'learnpath') {
$dir_array = explode("/", $cur_dir_path); $dir_array = explode("/", $cur_dir_path);
$array_len = count($dir_array); $array_len = count($dir_array);
if ($array_len > 0) { if ($array_len > 0)
{
$url_dir = 'work.php?&curdirpath=/'; $url_dir = 'work.php?&curdirpath=/';
$interbreadcrumb[] = array ( $interbreadcrumb[] = array (
'url' => $url_dir, 'url' => $url_dir,
'name' => get_lang('HomeDirectory' 'name' => get_lang('HomeDirectory'));
));
} }
$dir_acum = ''; $dir_acum = '';
@ -316,11 +316,11 @@ if ($origin != 'learnpath') {
"url" => "work.php", "url" => "work.php",
"name" => get_lang('EditToolOptions')); "name" => get_lang('EditToolOptions'));
} }
//-------------------------------------------------- //--------------------------------------------------
Display :: display_header(null); Display :: display_header(null);
} else { }
else
{
//we are in the learnpath tool //we are in the learnpath tool
include api_get_path(INCLUDE_PATH) . 'reduced_header.inc.php'; include api_get_path(INCLUDE_PATH) . 'reduced_header.inc.php';
} }
@ -694,7 +694,7 @@ $error_message = "";
$check = Security :: check_token('post'); //check the token inserted into the form $check = Security :: check_token('post'); //check the token inserted into the form
if ($_POST['submitWork'] && $is_course_member && $check) if ($_POST['submitWork'] && $is_course_member && $check)
{ {
if ($_FILES['file']['size']) if ($_FILES['file']['size'])
{ {
$updir = $currentCourseRepositorySys . 'work/'; //directory path to upload $updir = $currentCourseRepositorySys . 'work/'; //directory path to upload
@ -949,7 +949,8 @@ display_action_links($cur_dir_path, $always_show_tool_options, $always_show_uplo
Display form to upload document Display form to upload document
=======================================*/ =======================================*/
if ($is_course_member) { if ($is_course_member)
{
if ($display_upload_form || $edit) if ($display_upload_form || $edit)
{ {
$token = Security :: get_token(); //generate token to be used to check validity of request $token = Security :: get_token(); //generate token to be used to check validity of request
@ -997,7 +998,7 @@ if ($is_course_member) {
} }
else // else standard upload option else // else standard upload option
{ {
$form->addElement('file', 'file', get_lang('DownloadFile'), 'size="30" onchange="updateDocumentTitle(this.value)"'); $form->addElement('file', 'file', get_lang('DownloadFile'), 'size="40" onchange="updateDocumentTitle(this.value)"');
} }
$titleWork = $form->addElement('text', 'title', get_lang("TitleWork"), 'id="file_upload" style="width: 350px;"'); $titleWork = $form->addElement('text', 'title', get_lang("TitleWork"), 'id="file_upload" style="width: 350px;"');
@ -1019,7 +1020,17 @@ if ($is_course_member) {
$form->addElement('hidden', 'accepted', 1); $form->addElement('hidden', 'accepted', 1);
$form->addElement('hidden', 'sec_token', $token); $form->addElement('hidden', 'sec_token', $token);
// fix the Ok button when we see the tool in the learn path
if ($origin== 'learnpath')
{
$form->addElement('html', '<div style="margin-left:137px">');
$form->addElement('submit', 'submitWork', get_lang('Ok')); $form->addElement('submit', 'submitWork', get_lang('Ok'));
$form->addElement('html', '</div>');
}
else
{
$form->addElement('submit', 'submitWork', get_lang('Ok'));
}
if ($_POST['submitWork'] || $edit) if ($_POST['submitWork'] || $edit)
{ {
@ -1028,14 +1039,17 @@ if ($is_course_member) {
$form->add_real_progress_bar('uploadWork', 'DownloadFile'); $form->add_real_progress_bar('uploadWork', 'DownloadFile');
$form->setDefaults($defaults); $form->setDefaults($defaults);
echo '<br /><br />';
$form->display(); $form->display();
} }
//show them the form for the directory name //show them the form for the directory name
if (isset ($_REQUEST['createdir']) && $is_allowed_to_edit) if (isset ($_REQUEST['createdir']) && $is_allowed_to_edit)
{ {
//create the form that asks for the directory name //create the form that asks for the directory name
$new_folder_text = '<br /><br /><form action="' . api_get_self() . '" method="POST">'; $new_folder_text = '<br /><br /><form action="' . api_get_self() . '?origin='.$origin.'" method="POST">';
$new_folder_text .= '<input type="hidden" name="curdirpath" value="' . Security :: remove_XSS($cur_dir_path) . '"/>'; $new_folder_text .= '<input type="hidden" name="curdirpath" value="' . Security :: remove_XSS($cur_dir_path) . '"/>';
$new_folder_text .= get_lang('NewDir') . ' '; $new_folder_text .= get_lang('NewDir') . ' ';
$new_folder_text .= '<input type="text" name="new_dir"/>'; $new_folder_text .= '<input type="text" name="new_dir"/>';

Loading…
Cancel
Save