Fix redirection and icons - refs #7296

1.9.x
Imanol Losada 11 years ago
parent 340144d383
commit e315422c25
  1. 4
      main/mySpace/course.php
  2. 16
      main/mySpace/index.php
  3. 2
      plugin/dashboard/block_course/block_course.class.php

@ -197,6 +197,7 @@ function get_courses($from, $limit, $column, $direction)
$userId = api_get_user_id();
$sessionId = isset($_GET['session_id']) ? intval($_GET['session_id']) : 0;
$keyword = isset($_GET['keyword']) ? $_GET['keyword'] : null;
$follow = isset($_GET['follow']) ? true : false;
$drhLoaded = false;
if (api_is_drh()) {
if (api_drh_can_access_all_session_content()) {
@ -224,7 +225,8 @@ function get_courses($from, $limit, $column, $direction)
$direction,
false,
$keyword,
$sessionId
$sessionId,
$follow
);
}

@ -221,6 +221,7 @@ $nb_posts = $posts;
$avg_time_spent = $totalTimeSpent;
$linkAddUser = null;
$linkCourseDetailsAsTeacher = null;
$linkAddCourse = null;
$linkAddSession = null;
@ -230,9 +231,14 @@ if (api_is_platform_admin()) {
api_get_path(WEB_CODE_PATH).'admin/dashboard_add_users_to_user.php?user='.api_get_user_id(),
array('class' => '')
);
$linkCourseDetailsAsTeacher = ' '.Display::url(
Display::return_icon('2rightarrow.gif', get_lang('Details')),
api_get_path(WEB_CODE_PATH).'mySpace/course.php',
array('class' => '')
);
$linkAddCourse = ' '.Display::url(
Display::return_icon('add.png', get_lang('Add')),
api_get_path(WEB_CODE_PATH).'admin/dashboard_add_courses_to_user.php?user='.api_get_user_id(),
Display::return_icon('2rightarrow.gif', get_lang('Details')),
api_get_path(WEB_CODE_PATH).'mySpace/course.php?follow',
array('class' => '')
);
$linkAddSession = ' '.Display::url(
@ -282,15 +288,15 @@ echo '<div class="report_section">
api_get_path(WEB_CODE_PATH).'mySpace/course.php'
).
'</td>
<td align="right">'.$countAssignedCourses.$linkAddCourse.'</td>
<td align="right">'.$count_courses.$linkCourseDetailsAsTeacher.'</td>
</tr>
<tr>
<td>'.Display::url(
get_lang('FollowedCourses'),
api_get_path(WEB_CODE_PATH).'mySpace/course.php'
api_get_path(WEB_CODE_PATH).'mySpace/course.php?follow'
).
'</td>
<td align="right">'.$count_courses.$linkAddCourse.'</td>
<td align="right">'.$countAssignedCourses.$linkAddCourse.'</td>
</tr>
<tr>
<td>'.Display::url(

@ -130,7 +130,7 @@ class BlockCourse extends Block
}
$content .= $data_table;
if (!empty($course_data)) {
$content .= '<div style="text-align:right;margin-top:10px;"><a href="' . api_get_path(WEB_CODE_PATH) . 'mySpace/course.php">' . get_lang('SeeMore') . '</a></div>';
$content .= '<div style="text-align:right;margin-top:10px;"><a href="' . api_get_path(WEB_CODE_PATH) . 'mySpace/course.php?follow">' . get_lang('SeeMore') . '</a></div>';
}
$content .= '</div>';

Loading…
Cancel
Save