@ -1,4 +1,4 @@
<?php //$Id: work.lib.php 20410 2009-05-08 15:56:31Z herodoto $
<?php //$Id: work.lib.php 20475 2009-05-11 10:52:26Z ivantcholakov $
/* For licensing terms, see /dokeos_license.txt */
/**
* @package dokeos.work
@ -6,7 +6,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 Roan Embrechts, code refactoring and virtual course support
* @author Frederic Vauthier, directories management
* @version $Id: work.lib.php 20410 2009-05-08 15:56:31Z herodoto $
* @version $Id: work.lib.php 20475 2009-05-11 10:52:26Z ivantcholakov $
*/
/**
* Displays action links (for admins, authorized groups members and authorized students)
@ -588,7 +588,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
$text_dir=get_lang('Directories');
if ($cant_files==1) {
$text_file=strtolower(get_lang('FileUpload'));
$text_file=api_ strtolower(get_lang('FileUpload'));
}
if ($cant_dir==1) {
@ -639,7 +639,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
if( $is_allowed_to_edit) {
$action .= '< a href = "'.api_get_self().'?cidReq='.api_get_course_id().
'& curdirpath='.$my_sub_dir.'& origin='.$origin.'& gradebook='.$gradebook.'& edit_dir='.$mydir.'">< img src = "../img/edit.gif" alt = "'.get_lang('Modify').'" title = "'.get_lang('Modify').'" > < / a > ';
$action .= '< a href = "'.api_get_self().'?'.api_get_cidreq().'&origin='.$origin.'&gradebook='.$gradebook.'&delete_dir='.$mydir.'&delete2='.$id2.'" 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').'" title = "'.get_lang('DirDelete').'" > < / a > ';
$action .= '< a href = "'.api_get_self().'?'.api_get_cidreq().'&origin='.$origin.'&gradebook='.$gradebook.'&delete_dir='.$mydir.'&delete2='.$id2.'" onclick = "javascript:if(!confirm('." ' " . addslashes ( api_ 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').'" title = "'.get_lang('DirDelete').'" > < / a > ';
$row[] = $action;
} else {
$row[] = "";
@ -697,7 +697,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
$action = '';
$action .= '< a href = "'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.urlencode($my_sub_dir).'&origin='.$origin.'&gradebook='.$gradebook.'&edit='.$work->id.'&gradebook='.Security::remove_XSS($_GET['gradebook']).'&parent_id='.$work->parent_id.'" title = "'.get_lang('Modify').'" > < img src = "../img/edit.gif" alt = "'.get_lang('Modify').'" title = "'.get_lang('Modify').'" > < / a > ';
$action .= '< a href = "'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.urlencode($my_sub_dir).'&origin='.$origin.'&gradebook='.$gradebook.'&delete='.$work->id.'" onclick = "javascript:if(!confirm('." ' " . addslashes ( htmlentities ( get_lang ( ' ConfirmYourChoice ' ) , ENT_QUOTES , $ charset ) ) . " ' " . ' ) ) return false ; " title = "'.get_lang('WorkDelete').'" > < img src = "../img/delete.gif" alt = "'.get_lang('WorkDelete').'" title = "'.get_lang('WorkDelete').'" > < / a > ';
$action .= '< a href = "'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.urlencode($my_sub_dir).'&origin='.$origin.'&gradebook='.$gradebook.'&delete='.$work->id.'" onclick = "javascript:if(!confirm('." ' " . addslashes ( api_ htmlentities( get_lang ( ' ConfirmYourChoice ' ) , ENT_QUOTES , $ charset ) ) . " ' " . ' ) ) return false ; " title = "'.get_lang('WorkDelete').'" > < img src = "../img/delete.gif" alt = "'.get_lang('WorkDelete').'" title = "'.get_lang('WorkDelete').'" > < / a > ';
$action .= '< a href = "'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.urlencode($my_sub_dir).'&origin='.$origin.'&gradebook='.$gradebook.'&move='.$work->id.'" title = "'.get_lang('Move').'" > < img src = "../img/deplacer_fichier.gif" border = "0" title = "'.get_lang('Move').'" alt = "'.get_lang('Move').'" / > < / a > ';
if($work->accepted == '1') {
$action .= '< a href = "'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.urlencode($my_sub_dir).'&origin='.$origin.'&gradebook='.$gradebook.'&make_invisible='.$work->id.'&'.$sort_params.'" title = "'.get_lang('Invisible').'" > < img src = "../img/visible.gif" alt = "'.get_lang('Invisible').'" title = "'.get_lang('Invisible').'" > < / a > ';
@ -709,7 +709,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
} elseif($is_author) {
$action = '';
$action .= '< a href = "'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.urlencode($my_sub_dir).'&gradebook='.Security::remove_XSS($_GET['gradebook']).'&origin='.$origin.'&gradebook='.$gradebook.'&edit='.$work->id.'" title = "'.get_lang('Modify').'" > < img src = "../img/edit.gif" alt = "'.get_lang('Modify').'" title = "'.get_lang('Modify').'" > < / a > ';
$action .= '< a href = "'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.urlencode($my_sub_dir).'&origin='.$origin.'&gradebook='.$gradebook.'&delete='.$work->id.'" onclick = "javascript:if(!confirm('." ' " . addslashes ( htmlentities ( get_lang ( ' ConfirmYourChoice ' ) , ENT_QUOTES , $ charset ) ) . " ' " . ' ) ) return false ; " title = "'.get_lang('WorkDelete').'" > < img src = "../img/delete.gif" alt = "'.get_lang('WorkDelete').'" title = "'.get_lang('WorkDelete').'" > < / a > ';
$action .= '< a href = "'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.urlencode($my_sub_dir).'&origin='.$origin.'&gradebook='.$gradebook.'&delete='.$work->id.'" onclick = "javascript:if(!confirm('." ' " . addslashes ( api_ htmlentities( get_lang ( ' ConfirmYourChoice ' ) , ENT_QUOTES , $ charset ) ) . " ' " . ' ) ) return false ; " title = "'.get_lang('WorkDelete').'" > < img src = "../img/delete.gif" alt = "'.get_lang('WorkDelete').'" title = "'.get_lang('WorkDelete').'" > < / a > ';
$row[] = $action;
} else {
@ -1353,4 +1353,4 @@ function get_work_id($path) {
} else {
return false;
}
}
}