students should not be able to change the display in groups
skala
Juan Carlos Raña 14 years ago
parent 17581b3927
commit bdf31f1f1d
  1. 8
      main/document/document.inc.php
  2. 4
      main/document/document.php

@ -295,7 +295,9 @@ function build_edit_icons($curdirpath, $type, $path, $visibility, $id, $is_templ
$modify_icons = Display::return_icon('edit_na.gif', get_lang('Modify'));
$modify_icons .= ' '.Display::return_icon('delete_na.gif', get_lang('Delete'));
$modify_icons .= ' '.Display::return_icon('deplacer_fichier_na.gif', get_lang('Move'));
$modify_icons .= ' '.Display::return_icon($visibility_icon.'_na.gif', get_lang('VisibilityCannotBeChanged'));
if(api_is_allowed_to_edit() || api_is_platform_admin()){
$modify_icons .= ' '.Display::return_icon($visibility_icon.'_na.gif', get_lang('VisibilityCannotBeChanged'));
}
} else {
if ($is_certificate_mode) {
$modify_icons = '<a href="edit_document.php?'.api_get_cidreq().'&curdirpath='.$curdirpath.'&amp;file='.urlencode($path).$req_gid.'&selectcat='.$gradebook_category.'"><img src="../img/edit.gif" border="0" title="'.get_lang('Modify').'" alt="" /></a>';
@ -328,7 +330,9 @@ function build_edit_icons($curdirpath, $type, $path, $visibility, $id, $is_templ
$modify_icons .= '&nbsp;<a href="'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.$curdirpath.'&amp;'.$visibility_command.'='.$id.$req_gid.'&amp;'.$sort_params.'&selectcat='.$gradebook_category.'"><img src="../img/'.$visibility_icon.'.gif" border="0" title="'.get_lang('Visible').'" alt="" /></a>';
} else {
$modify_icons .= '&nbsp;<a href="'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.$curdirpath.'&amp;move='.urlencode($path).$req_gid.'"><img src="../img/deplacer_fichier.gif" border="0" title="'.get_lang('Move').'" alt="" /></a>';
$modify_icons .= '&nbsp;<a href="'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.$curdirpath.'&amp;'.$visibility_command.'='.$id.$req_gid.'&amp;'.$sort_params.'"><img src="../img/'.$visibility_icon.'.gif" border="0" title="'.get_lang('Visible').'" alt="" /></a>';
if(api_is_allowed_to_edit() || api_is_platform_admin()){
$modify_icons .= '&nbsp;<a href="'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.$curdirpath.'&amp;'.$visibility_command.'='.$id.$req_gid.'&amp;'.$sort_params.'"><img src="../img/'.$visibility_icon.'.gif" border="0" title="'.get_lang('Visible').'" alt="" /></a>';
}
}
}

@ -600,8 +600,8 @@ if (isset($_GET['action']) && $_GET['action'] == 'copytomyfiles' && api_get_sett
}
/* VISIBILITY COMMANDS */
//Only teacher and all users into their group
if($is_allowed_to_edit || $group_member_with_upload_rights){
//Only teacher
if($is_allowed_to_edit){
if ((isset($_GET['set_invisible']) && !empty($_GET['set_invisible'])) || (isset($_GET['set_visible']) && !empty($_GET['set_visible'])) && $_GET['set_visible'] != '*' && $_GET['set_invisible'] != '*') {
// Make visible or invisible?
if (isset($_GET['set_visible'])) {

Loading…
Cancel
Save