Tracking: Improve filters and navigation using sid parameters - refs BT#19044

pull/3994/head
Christian 3 years ago
parent 91e93a6606
commit d8ac72409b
  1. 4
      public/main/admin/user_information.php
  2. 4
      public/main/inc/ajax/model.ajax.php
  3. 3
      public/main/inc/lib/attendance.lib.php
  4. 2
      public/main/inc/lib/myspace.lib.php
  5. 10
      public/main/inc/lib/sessionmanager.lib.php
  6. 223
      public/main/inc/lib/tracking.lib.php
  7. 22
      public/main/mySpace/course.php
  8. 16
      public/main/tracking/courseLog.php
  9. 6
      public/main/tracking/course_log_tools.php
  10. 3
      public/main/tracking/exams.php
  11. 6
      public/main/tracking/lp_results_by_user.php
  12. 6
      public/main/tracking/total_time.php

@ -316,7 +316,7 @@ if (count($sessions) > 0) {
$tools = Display::url(
Display::return_icon('statistics.png', get_lang('Statistics')),
api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?details=true&student='.$userId.'&id_session='.$sessionId.'&course='.$courseCode
api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?details=true&student='.$userId.'&sid='.$sessionId.'&course='.$courseCode
);
$tools .= '&nbsp;<a href="course_information.php?id='.$courseId.'&id_session='.$sessionId.'">'.
Display::return_icon('info2.png', get_lang('Overview')).'</a>'.
@ -425,7 +425,7 @@ if (count($courseRelUserList) > 0) {
$courseUrl = api_get_course_url($courseId);
$tools = Display::url(
Display::return_icon('statistics.png', get_lang('Statistics')),
api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?details=true&student='.$userId.'&id_session=0&course='.$courseCode
api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?details=true&student='.$userId.'&sid=0&course='.$courseCode
);
$tools .= '&nbsp;<a href="course_information.php?id='.$courseId.'">'.
Display::return_icon('info2.png', get_lang('Overview')).'</a>'.

@ -1903,13 +1903,13 @@ switch ($action) {
);
$detailButtons[] = Display::url(
Display::return_icon('2rightarrow.png'),
api_get_path(WEB_CODE_PATH).'mySpace/course.php?session_id='.$session['id']
api_get_path(WEB_CODE_PATH).'mySpace/course.php?sid='.$session['id']
);
$item = [
'name' => Display::url(
$session['name'],
api_get_path(WEB_CODE_PATH).'mySpace/course.php?session_id='.$session['id']
api_get_path(WEB_CODE_PATH).'mySpace/course.php?sid='.$session['id']
),
'date' => $dateToString,
'course_per_session' => $count_courses_in_session,

@ -3110,7 +3110,8 @@ class Attendance
if ($exportToPdf) {
$result = $this->exportAttendanceLogin($startDate, $endDate);
if (empty($result)) {
api_not_allowed(true, get_lang('No data available'));
return false;
//api_not_allowed(true, get_lang('No data available'));
}
}

@ -128,7 +128,7 @@ class MySpace
[],
32
),
api_get_path(WEB_CODE_PATH).'mySpace/?view=teacher'
api_get_path(WEB_CODE_PATH).'mySpace/index.php?view=teacher'
);
$menuItems[] = Display::url(
Display::return_icon(

@ -1319,11 +1319,11 @@ class SessionManager
// Overall Total
$overall_total = ($course_description_progress + $exercises_progress + $forums_progress + $assignments_progress + $wiki_progress + $surveys_progress) / 6;
$link = '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?student='.$user[0].'&details=true&course='.$course['code'].'&sid='.$user['id_session'].'"> %s </a>';
$linkForum = '<a href="'.api_get_path(WEB_CODE_PATH).'forum/index.php?cid='.$course['real_id'].'&sid='.$user['id_session'].'"> %s </a>';
$linkWork = '<a href="'.api_get_path(WEB_CODE_PATH).'work/work.php?cid='.$course['real_id'].'&sid='.$user['id_session'].'"> %s </a>';
$linkWiki = '<a href="'.api_get_path(WEB_CODE_PATH).'wiki/index.php?cid='.$course['real_id'].'&sid='.$user['id_session'].'&action=statistics"> %s </a>';
$linkSurvey = '<a href="'.api_get_path(WEB_CODE_PATH).'survey/survey_list.php?cid='.$course['real_id'].'&sid='.$user['id_session'].'"> %s </a>';
$link = '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?student='.$user[0].'&details=true&course='.$course['code'].'&sid='.$sessionId.'"> %s </a>';
$linkForum = '<a href="'.api_get_path(WEB_CODE_PATH).'forum/index.php?cid='.$course['real_id'].'&sid='.$sessionId.'"> %s </a>';
$linkWork = '<a href="'.api_get_path(WEB_CODE_PATH).'work/work.php?cid='.$course['real_id'].'&sid='.$sessionId.'"> %s </a>';
$linkWiki = '<a href="'.api_get_path(WEB_CODE_PATH).'wiki/index.php?cid='.$course['real_id'].'&sid='.$sessionId.'&action=statistics"> %s </a>';
$linkSurvey = '<a href="'.api_get_path(WEB_CODE_PATH).'survey/survey_list.php?cid='.$course['real_id'].'&sid='.$sessionId.'"> %s </a>';
$table[] = [
'lastname' => $user[1],

@ -3981,52 +3981,18 @@ class Tracking
*
* @return int The number of post by course
*/
public static function count_number_of_posts_by_course($course_code, $sessionId = null, $groupId = 0)
public static function count_number_of_posts_by_course($courseId, $sessionId = null, $groupId = 0)
{
$courseInfo = api_get_course_info($course_code);
if (!empty($courseInfo)) {
$tbl_posts = Database::get_course_table(TABLE_FORUM_POST);
$tbl_forums = Database::get_course_table(TABLE_FORUM);
$condition_session = '';
if (isset($sessionId)) {
$sessionId = (int) $sessionId;
$condition_session = api_get_session_condition(
$sessionId,
true,
false,
'f.session_id'
);
}
$courseId = $courseInfo['real_id'];
$groupId = (int) $groupId;
if (!empty($groupId)) {
$groupCondition = " i.to_group_id = $groupId ";
} else {
$groupCondition = ' (i.to_group_id = 0 OR i.to_group_id IS NULL) ';
}
$item = Database::get_course_table(TABLE_ITEM_PROPERTY);
$sql = "SELECT count(*) FROM $tbl_posts p
INNER JOIN $tbl_forums f
ON f.forum_id = p.forum_id AND p.c_id = f.c_id
INNER JOIN $item i
ON (tool = '".TOOL_FORUM."' AND f.c_id = i.c_id AND f.iid = i.ref)
WHERE
p.c_id = $courseId AND
f.c_id = $courseId AND
$groupCondition
$condition_session
";
$result = Database::query($sql);
$row = Database::fetch_row($result);
$count = $row[0];
$repo = Container::getForumPostRepository();
$course = api_get_course_entity($courseId);
$session = api_get_session_entity($sessionId);
$qb = $repo->getResourcesByCourse($course, $session);
return $count;
}
$qb->select('count(resource)');
$count = $qb->getQuery()->getSingleScalarResult();
return 0;
return $count;
}
/**
@ -4041,60 +4007,19 @@ class Tracking
* @return int The number of threads by course
*/
public static function count_number_of_threads_by_course(
$course_code,
$courseId,
$sessionId = null,
$groupId = 0
) {
$course_info = api_get_course_info($course_code);
if (empty($course_info)) {
return null;
}
$courseId = $course_info['real_id'];
$tbl_threads = Database::get_course_table(TABLE_FORUM_THREAD);
$tbl_forums = Database::get_course_table(TABLE_FORUM);
$condition_session = '';
if (isset($sessionId)) {
$sessionId = (int) $sessionId;
$condition_session = ' AND f.session_id = '.$sessionId;
}
$groupId = (int) $groupId;
if (!empty($groupId)) {
$groupCondition = " i.to_group_id = $groupId ";
} else {
$groupCondition = " (i.to_group_id = 0 OR i.to_group_id IS NULL) ";
}
$item = Database::get_course_table(TABLE_ITEM_PROPERTY);
$sql = "SELECT count(*)
FROM $tbl_threads t
INNER JOIN $tbl_forums f
ON f.iid = t.forum_id AND f.c_id = t.c_id
INNER JOIN $item i
ON (
tool = '".TOOL_FORUM_THREAD."' AND
f.c_id = i.c_id AND
t.iid = i.ref
)
WHERE
t.c_id = $courseId AND
f.c_id = $courseId AND
$groupCondition
$condition_session
";
$result = Database::query($sql);
if (Database::num_rows($result)) {
$row = Database::fetch_row($result);
$count = $row[0];
$repo = Container::getForumThreadRepository();
$course = api_get_course_entity($courseId);
$session = api_get_session_entity($sessionId);
$qb = $repo->getResourcesByCourse($course, $session);
return $count;
}
$qb->select('count(resource)');
$count = $qb->getQuery()->getSingleScalarResult();
return 0;
return $count;
}
/**
@ -4109,50 +4034,19 @@ class Tracking
* @return int The number of forums by course
*/
public static function count_number_of_forums_by_course(
$course_code,
$courseId,
$sessionId = null,
$groupId = 0
) {
$course_info = api_get_course_info($course_code);
if (empty($course_info)) {
return null;
}
$courseId = $course_info['real_id'];
$condition_session = '';
if (isset($sessionId)) {
$sessionId = (int) $sessionId;
$condition_session = ' AND f.session_id = '.$sessionId;
}
$groupId = (int) $groupId;
if (!empty($groupId)) {
$groupCondition = " i.to_group_id = $groupId ";
} else {
$groupCondition = " (i.to_group_id = 0 OR i.to_group_id IS NULL) ";
}
$tbl_forums = Database::get_course_table(TABLE_FORUM);
$item = Database::get_course_table(TABLE_ITEM_PROPERTY);
$sql = "SELECT count(*)
FROM $tbl_forums f
INNER JOIN $item i
ON f.c_id = i.c_id AND f.iid = i.ref AND tool = '".TOOL_FORUM."'
WHERE
f.c_id = $courseId AND
$groupCondition
$condition_session
";
$result = Database::query($sql);
if (Database::num_rows($result)) {
$row = Database::fetch_row($result);
$count = $row[0];
$repo = Container::getForumRepository();
$course = api_get_course_entity($courseId);
$session = api_get_session_entity($sessionId);
return $count;
}
$qb = $repo->getResourcesByCourse($course, $session);
$qb->select('count(resource)');
$count = $qb->getQuery()->getSingleScalarResult();
return 0;
return $count;
}
/**
@ -4541,14 +4435,13 @@ class Tracking
$condition_session = '';
if (isset($session_id)) {
$session_id = intval($session_id);
$condition_session = ' AND cl.session_id = '.$session_id;
$condition_session = ' AND sl.links_session_id = '.$session_id;
}
$sql = "SELECT cl.title, cl.url,count(DISTINCT sl.links_user_id), count(cl.title) as count_visits
FROM $TABLETRACK_LINKS AS sl, $TABLECOURSE_LINKS AS cl
WHERE
cl.c_id = $courseId AND
sl.links_link_id = cl.id AND
sl.links_link_id = cl.iid AND
sl.c_id = $courseId
$condition_session
GROUP BY cl.title, cl.url
@ -8456,16 +8349,16 @@ class TrackingCourseLog
$users = implode(',', $new_user_array);
$extraFieldType = EntityExtraField::USER_FIELD_TYPE;
// Selecting only the necessary information NOT ALL the user list
$sql = "SELECT user.user_id, v.value
$sql = "SELECT user.id as user_id, v.value
FROM $table_user user
INNER JOIN $table_user_field_values v
ON (user.user_id = v.item_id)
ON (user.id = v.item_id)
INNER JOIN $extraField f
ON (f.id = v.field_id)
WHERE
f.extra_field_type = $extraFieldType AND
v.field_id=".intval($field_id)." AND
user.user_id IN ($users)";
user.id IN ($users)";
$result = Database::query($sql);
while ($row = Database::fetch_array($result)) {
@ -8572,7 +8465,7 @@ class TrackingCourseLog
$conditions = [],
$options = []
) {
global $user_ids, $export_csv, $session_id;
global $user_ids, $export_csv, $sessionId;
$includeInvitedUsers = $conditions['include_invited_users']; // include the invited users
$getCount = isset($conditions['get_count']) ? $conditions['get_count'] : false;
@ -8688,12 +8581,12 @@ class TrackingCourseLog
false,
3
);*/
$session = api_get_session_entity($session_id);
$session = api_get_session_entity($sessionId);
$repo = Container::getQuizRepository();
$qb = $repo->findAllByCourse($course, $session, null, 2);
$exercises = $qb->getQuery()->getResult();
if (empty($session_id)) {
if (empty($sessionId)) {
$survey_user_list = [];
// @todo
//$surveyList = SurveyManager::get_surveys($courseCode, $session_id);
@ -8715,7 +8608,7 @@ class TrackingCourseLog
}
$urlBase = api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?details=true&cid='.$courseId.
'&origin=tracking_course&sid='.$session_id;
'&origin=tracking_course&sid='.$sessionId;
$sortByFirstName = api_sort_by_first_name();
Session::write('user_id_list', []);
@ -8743,7 +8636,7 @@ class TrackingCourseLog
Tracking::get_time_spent_on_the_course(
$user['user_id'],
$courseId,
$session_id
$sessionId
)
);
@ -8780,7 +8673,7 @@ class TrackingCourseLog
$exercises,
$user['user_id'],
$courseId,
$session_id
$sessionId
);
$user['exercise_progress'] = $total_user_exercise;
@ -8789,7 +8682,7 @@ class TrackingCourseLog
$exercises,
$user['user_id'],
$courseId,
$session_id
$sessionId
);
$user['exercise_average_best_attempt'] = $total_user_exercise;
@ -8813,7 +8706,7 @@ class TrackingCourseLog
$user['user_id'],
$exercise->iId,
$courseId,
$session_id,
$sessionId,
false
);
@ -8839,14 +8732,14 @@ class TrackingCourseLog
$user['first_connection'] = Tracking::get_first_connection_date_on_the_course(
$user['user_id'],
$courseId,
$session_id,
$sessionId,
false === $export_csv
);
$user['last_connection'] = Tracking::get_last_connection_date_on_the_course(
$user['user_id'],
['real_id' => $course->getId()],
$session_id,
$sessionId,
false === $export_csv
);
@ -8863,7 +8756,7 @@ class TrackingCourseLog
}
}
if (empty($session_id)) {
if (empty($sessionId)) {
$user['survey'] = (isset($survey_user_list[$user['user_id']]) ? $survey_user_list[$user['user_id']] : 0).' / '.$total_surveys;
}
@ -8901,10 +8794,10 @@ class TrackingCourseLog
$userGroupManager = new UserGroupModel();
$user_row['classes'] = $userGroupManager->getLabelsFromNameList($user['user_id'], Usergroup::NORMAL_CLASS);
if (empty($session_id)) {
if (empty($sessionId)) {
$user_row['survey'] = $user['survey'];
} else {
$userSession = SessionManager::getUserSession($user['user_id'], $session_id);
$userSession = SessionManager::getUserSession($user['user_id'], $sessionId);
$user_row['registered_at'] = '';
if ($userSession) {
$user_row['registered_at'] = api_get_local_time($userSession['registered_at']);
@ -8942,7 +8835,7 @@ class TrackingCourseLog
$user_row['link'] = $user['link'];
if ($export_csv) {
if (empty($session_id)) {
if (empty($sessionId)) {
unset($user_row['classes']);
unset($user_row['link']);
} else {
@ -8984,7 +8877,7 @@ class TrackingCourseLog
$direction,
$params = []
) {
global $user_ids, $course_code, $export_csv, $csv_content, $session_id;
global $user_ids, $course_code, $export_csv, $csv_content, $sessionId;
$includeInvitedUsers = false;
$courseId = $params['cid'];
$sessionId = $params['sid'];
@ -9050,7 +8943,7 @@ class TrackingCourseLog
$totalCourseTime = Tracking::get_time_spent_on_the_course(
$user['user_id'],
$courseId,
$session_id
$sessionId
);
$user['time'] = api_time_to_hms($totalCourseTime);
@ -9058,7 +8951,7 @@ class TrackingCourseLog
$user['user_id'],
$course,
[],
$session_id
$sessionId
);
$user['total_lp_time'] = $totalLpTime;
@ -9071,19 +8964,19 @@ class TrackingCourseLog
$user['first_connection'] = Tracking::get_first_connection_date_on_the_course(
$user['user_id'],
$courseId,
$session_id
$sessionId
);
$user['last_connection'] = Tracking::get_last_connection_date_on_the_course(
$user['user_id'],
$courseInfo,
$session_id,
$sessionId,
false === $export_csv
);
$user['link'] = '
<center>
<a
href="../mySpace/myStudents.php?student='.$user['user_id'].'&details=true&cid='.$courseId.'&origin=tracking_course&sid='.$session_id.'">
href="../mySpace/myStudents.php?student='.$user['user_id'].'&details=true&cid='.$courseId.'&origin=tracking_course&sid='.$sessionId.'">
'.Display::return_icon('2rightarrow.png', get_lang('Details')).'
</a>
</center>';
@ -9124,11 +9017,11 @@ class TrackingCourseLog
Display::return_icon('group.png', get_lang('Group reporting'), [], ICON_SIZE_MEDIUM),
'course_log_groups.php?'.api_get_cidreq()
);
$resourcesLink = Display::url(
$resourcesLink = '';
/*$resourcesLink = Display::url(
Display::return_icon('tools.png', get_lang('Report on resource'), [], ICON_SIZE_MEDIUM),
'course_log_resources.php?'.api_get_cidreq(true, false)
);
);*/
$courseLink = Display::url(
Display::return_icon('course.png', get_lang('Course report'), [], ICON_SIZE_MEDIUM),
@ -9152,10 +9045,14 @@ class TrackingCourseLog
$attendanceLink = '';
if (!empty($sessionId)) {
$attendanceLink = Display::url(
Display::return_icon('attendance_list.png', get_lang('Logins'), '', ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'attendance/index.php?'.api_get_cidreq().'&action=calendar_logins'
);
$attendance = new Attendance();
$result = $attendance->getAttendanceBaseInLogin(false, true);
if (false !== $result) {
$attendanceLink = Display::url(
Display::return_icon('attendance_list.png', get_lang('Logins'), '', ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'attendance/index.php?'.api_get_cidreq().'&action=calendar_logins'
);
}
}
switch ($current) {

@ -10,7 +10,7 @@ require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_TRACKING;
$sessionId = isset($_GET['session_id']) ? intval($_GET['session_id']) : null;
$sessionId = isset($_GET['sid']) ? (int) $_GET['sid'] : null;
api_block_anonymous_users();
@ -155,7 +155,7 @@ if ($showImportIcon) {
function get_count_courses()
{
$userId = api_get_user_id();
$sessionId = isset($_GET['session_id']) ? intval($_GET['session_id']) : null;
$sessionId = isset($_GET['sid']) ? (int) $_GET['sid'] : null;
$keyword = isset($_GET['keyword']) ? $_GET['keyword'] : null;
$drhLoaded = false;
@ -220,7 +220,7 @@ function get_count_courses()
function get_courses($from, $limit, $column, $direction)
{
$userId = api_get_user_id();
$sessionId = isset($_GET['session_id']) ? intval($_GET['session_id']) : 0;
$sessionId = isset($_GET['sid']) ? (int) $_GET['sid'] : 0;
$keyword = isset($_GET['keyword']) ? $_GET['keyword'] : null;
$follow = isset($_GET['follow']) ? true : false;
$drhLoaded = false;
@ -347,11 +347,15 @@ function get_courses($from, $limit, $column, $direction)
$data['title'],
$courseInfo['course_public_url'].'?id_session='.$sessionId
);
$attendanceLink = Display::url(
Display::return_icon('attendance_list.png', get_lang('Attendance'), [], ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'attendance/index.php?cid='.$courseId.'&sid='.$sessionId.'&action=calendar_logins'
);
$attendance = new Attendance();
$result = $attendance->getAttendanceBaseInLogin(false, true);
$attendanceLink = '';
if (false !== $result) {
$attendanceLink = Display::url(
Display::return_icon('attendance_list.png', get_lang('Attendance'), [], ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'attendance/index.php?cid='.$courseId.'&sid='.$sessionId.'&action=calendar_logins'
);
}
$courseList[] = [
$title,
@ -393,7 +397,7 @@ $table->set_header(9, get_lang('Details'), false);
$form = new FormValidator('search_course', 'get', api_get_path(WEB_CODE_PATH).'mySpace/course.php');
$form->addElement('text', 'keyword', get_lang('Keyword'));
$form->addButtonSearch(get_lang('Search'));
$form->addElement('hidden', 'session_id', $sessionId);
$form->addElement('hidden', 'sid', $sessionId);
$keyword = isset($_GET['keyword']) ? Security::remove_XSS($_GET['keyword']) : null;

@ -228,7 +228,7 @@ $form_search = new FormValidator(
$renderer = $form_search->defaultRenderer();
$renderer->setCustomElementTemplate('<span>{element}</span>');
$form_search->addHidden('from', Security::remove_XSS($from));
$form_search->addHidden('session_id', $sessionId);
$form_search->addHidden('sessionId', $sessionId);
$form_search->addHidden('sid', $sessionId);
$form_search->addHidden('cid', $courseId);
$form_search->addElement('text', 'user_keyword');
@ -313,18 +313,16 @@ if ($showReporting) {
if (SESSION_INVISIBLE == $visibility) {
continue;
}
// Check if is coach
$isCoach = api_is_coach($session['id'], $courseId);
if (!$isCoach) {
continue;
}
}
$url = $urlWebCode.'mySpace/course.php?session_id='.$session['id'].'&cid='.$courseId;
$url = $urlWebCode.'mySpace/course.php?sid='.$session['id'].'&cid='.$courseId;
$table->setCellContents($row++, 0, $icon.' '.Display::url($session['name'], $url));
}
if ($row > 1) {
if ($row > 0) {
$html .= $table->toHtml();
}
}
@ -628,7 +626,7 @@ if ($nbStudents > 0) {
}
$parameters['cidReq'] = isset($_GET['cidReq']) ? Security::remove_XSS($_GET['cidReq']) : '';
$parameters['id_session'] = $sessionId;
$parameters['sid'] = $sessionId;
$parameters['from'] = isset($_GET['myspace']) ? Security::remove_XSS($_GET['myspace']) : null;
$headerCounter = 0;
@ -758,13 +756,13 @@ if ($nbStudents > 0) {
}
}
$parameters['cidReq'] = $courseCode;
$parameters['id_session'] = $sessionId;
$parameters['sid'] = $sessionId;
$table->set_additional_parameters($parameters);
// display buttons to un hide hidden columns
$html .= '<div id="unhideButtons" class="btn-toolbar">';
$index = 0;
$getLangDisplayColumn = get_lang('Show column');
foreach ($headers as $header) {
/*foreach ($headers as $header) {
$html .= Display::toolbarButton(
$header,
'#',
@ -777,7 +775,7 @@ if ($nbStudents > 0) {
]
);
$index++;
}
}*/
$html .= '</div>';
$html .= '<div id="reporting_table">';

@ -248,19 +248,19 @@ if (!empty($groupId)) {
}
$count_number_of_forums_by_course = Tracking::count_number_of_forums_by_course(
$course_code,
$course_id,
$session_id,
$groupId
);
$count_number_of_threads_by_course = Tracking::count_number_of_threads_by_course(
$course_code,
$course_id,
$session_id,
$groupId
);
$count_number_of_posts_by_course = Tracking::count_number_of_posts_by_course(
$course_code,
$course_id,
$session_id,
$groupId
);

@ -109,7 +109,7 @@ if (!$exportToXLS) {
$menuItems[] = Display::url(
Display::return_icon('teacher.png', get_lang('Trainer View'), [], 32),
api_get_path(WEB_CODE_PATH).'mySpace/?view=teacher'
api_get_path(WEB_CODE_PATH).'mySpace/index.php?view=teacher'
);
if (api_is_platform_admin()) {
$menuItems[] = Display::url(
@ -130,6 +130,7 @@ if (!$exportToXLS) {
$actionsLeft .= $item;
}
}
$actionsLeft = TrackingCourseLog::actionsLeft('exams', $sessionId, false);
} else {
$actionsLeft = TrackingCourseLog::actionsLeft('exams', api_get_session_id(), false);
$actionsRight .= Display::url(

@ -92,11 +92,11 @@ if (!$export_to_csv) {
&nbsp;'.get_lang('Print').'</a>
</div>';
$menu_items[] = '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/?view=teacher">'.get_lang('Trainer View').'</a>';
$menu_items[] = '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/index.php?view=teacher">'.get_lang('Trainer View').'</a>';
if (api_is_platform_admin()) {
$menu_items[] = '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/?view=admin">'.get_lang('Admin view').'</a>';
$menu_items[] = '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/index.php?view=admin">'.get_lang('Admin view').'</a>';
} else {
$menu_items[] = '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/?view=coach">'.get_lang('Admin view').'</a>';
$menu_items[] = '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/index.php?view=coach">'.get_lang('Admin view').'</a>';
}
$menu_items[] = get_lang('Exam tracking');
$nb_menu_items = count($menu_items);

@ -148,10 +148,10 @@ $actionsLeft .= Display::url(
'course_log_tools.php?'.api_get_cidreq()
);
$actionsLeft .= Display::url(
/*$actionsLeft .= Display::url(
Display::return_icon('tools.png', get_lang('ResourcesReporting'), [], ICON_SIZE_MEDIUM),
'course_log_resources.php?'.api_get_cidreq()
);
);*/
$actionsLeft .= Display::url(
Display::return_icon('quiz.png', get_lang('ExamReporting'), [], ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'tracking/exams.php?'.api_get_cidreq()
@ -261,7 +261,7 @@ if (api_is_platform_admin(true) ||
$html .= '<ul class="session-list">';
foreach ($sessionList as $session) {
$url = api_get_path(WEB_CODE_PATH).'mySpace/course.php?session_id='
$url = api_get_path(WEB_CODE_PATH).'mySpace/course.php?sid='
.$session['id'].'&cidReq='.$courseInfo['code'];
$html .= Display::tag('li', $icon.' '.Display::url($session['name'], $url));
}

Loading…
Cancel
Save