Fixing work to users in a course-session see BT#9113

1.9.x
Julio Montoya 10 years ago
parent f9a3ca5dc5
commit 0056481a92
  1. 12
      main/work/add_user.php

@ -17,6 +17,7 @@ $current_course_tool = TOOL_STUDENTPUBLICATION;
$workId = isset($_GET['id']) ? intval($_GET['id']) : null; $workId = isset($_GET['id']) ? intval($_GET['id']) : null;
$userId = isset($_GET['user_id']) ? intval($_GET['user_id']) : null; $userId = isset($_GET['user_id']) ? intval($_GET['user_id']) : null;
$action = isset($_GET['action']) ? $_GET['action'] : null; $action = isset($_GET['action']) ? $_GET['action'] : null;
$sessionId = api_get_session_id();
if (empty($workId)) { if (empty($workId)) {
api_not_allowed(true); api_not_allowed(true);
@ -79,12 +80,19 @@ if (!empty($items)) {
echo '</div>'; echo '</div>';
} }
if (empty($sessionId)) {
$status = STUDENT;
} else {
$status = 0;
}
$userList = CourseManager::get_user_list_from_course_code( $userList = CourseManager::get_user_list_from_course_code(
$courseInfo['code'], $courseInfo['code'],
api_get_session_id(), $sessionId,
null, null,
null, null,
STUDENT $status
); );
$userToAddList = array(); $userToAddList = array();

Loading…
Cancel
Save