[svn r12580] Fix a bug in dropbox with the session mode : http://projects.dokeos.com/?do=details&id=1639

skala
Julian Prud'homme 19 years ago
parent 1ab5479067
commit be03c9c7e4
  1. 32
      main/dropbox/dropbox_functions.inc.php
  2. 8
      main/dropbox/index.php

@ -531,6 +531,27 @@ function display_add_form()
<?php echo dropbox_lang("sendTo")?>:
</td>
<td valign="top" align="left">
<?php
//list of all users in this course and all virtual courses combined with it
if(isset($_SESSION['id_session'])){
$complete_user_list_for_dropbox = CourseManager :: get_user_list_from_course_code($course_info['code'],true,$_SESSION['id_session']);
$complete_user_list2 = CourseManager :: get_coach_list_from_course_code($course_info['code'],$_SESSION['id_session']);
$complete_user_list_for_dropbox = array_merge($complete_user_list_for_dropbox,$complete_user_list2);
}
else{
$complete_user_list_for_dropbox = CourseManager :: get_user_list_from_course_code($course_info['code']);
}
foreach ($complete_user_list_for_dropbox as $k => $e)
$complete_user_list_for_dropbox[$k] = $e +
array('lastcommafirst' => $e['lastname'] . ', ' . $e['firstname']);
$complete_user_list_for_dropbox = TableSort::sort_table($complete_user_list_for_dropbox, 'lastcommafirst');
?>
<select name="recipients[]" size="
<?php
if ( $dropbox_person -> isCourseTutor || $dropbox_person -> isCourseAdmin)
@ -541,18 +562,11 @@ function display_add_form()
{
echo 6;
}
?>" multiple style="width: 350px;">
<?php
//list of all users in this course and all virtual courses combined with it
$complete_user_list_for_dropbox = CourseManager::get_real_and_linked_user_list($course_info['code'], true, $_SESSION['id_session']);
foreach ($complete_user_list_for_dropbox as $k => $e)
$complete_user_list_for_dropbox[$k] = $e +
array('lastcommafirst' => $e['lastname'] . ', ' . $e['firstname']);
$complete_user_list_for_dropbox = TableSort::sort_table($complete_user_list_for_dropbox, 'lastcommafirst');
/*
Create the options inside the select box:
List all selected users their user id as value and a name string as display

@ -484,11 +484,9 @@ if ($_GET['view']=='sent' OR $dropbox_cnf['sent_received_tabs']==false)
// the content of the sortable table = the received files
foreach ( $dropbox_person -> sentWork as $dropbox_file)
{
/*echo '<pre>';
print_r($dropbox_file);
echo '</pre>'; */
$dropbox_file_data=array();
if ($view_dropbox_category_sent==$dropbox_file->category)
{
$dropbox_file_data[]=display_file_checkbox($dropbox_file->id, 'sent'); ;
@ -518,9 +516,7 @@ if ($_GET['view']=='sent' OR $dropbox_cnf['sent_received_tabs']==false)
$dropbox_file_data[]=$action_icons;
$action_icons='';
$dropbox_data_sent[]=$dropbox_file_data;
//echo '<pre>';
//print_r($dropbox_data_sent);
//echo '</pre>';
}
}

Loading…
Cancel
Save