diff --git a/main/inc/lib/ScheduledAnnouncement.php b/main/inc/lib/ScheduledAnnouncement.php index 123a2b67fe..a71f11df47 100644 --- a/main/inc/lib/ScheduledAnnouncement.php +++ b/main/inc/lib/ScheduledAnnouncement.php @@ -68,9 +68,10 @@ class ScheduledAnnouncement extends Model { // action links $action = '
'; - $action .= ''. - Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM). - ''; + $action .= Display::url( + Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM), + api_get_path(WEB_CODE_PATH).'session/resume_session.php?id_session='.$sessionId + ); $action .= ''. Display::return_icon('add.png', get_lang('Add'), '', ICON_SIZE_MEDIUM).''; @@ -294,6 +295,7 @@ class ScheduledAnnouncement extends Model '((user_complete_name))' => $userInfo['complete_name'], '((user_first_name))' => $userInfo['firstname'], '((user_last_name))' => $userInfo['lastname'], + //'((course_title))' => $userInfo['lastname'], '((lp_progress))' => $progress, ]; diff --git a/main/session/resume_session.php b/main/session/resume_session.php index faddd54c0d..3b9104a353 100644 --- a/main/session/resume_session.php +++ b/main/session/resume_session.php @@ -18,12 +18,6 @@ use Chamilo\CoreBundle\Entity\Session, $cidReset = true; require_once __DIR__.'/../inc/global.inc.php'; -// setting breadcrumbs -$interbreadcrumb[] = array( - 'url' => 'session_list.php', - 'name' => get_lang('Sessions'), -); - // setting the section (for the tabs) $this_section = SECTION_PLATFORM_ADMIN; @@ -36,7 +30,10 @@ if (empty($sessionId)) { SessionManager::protectSession($sessionId); $tool_name = get_lang('SessionOverview'); -$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); +$interbreadcrumb[] = array( + 'url' => 'session_list.php', + 'name' => get_lang('SessionList') +); $orig_param = '&origin=resume_session'; @@ -362,7 +359,7 @@ if (!empty($sessionInfo['promotion_id'])) { $programmedAnnouncement = new ScheduledAnnouncement(); $programmedAnnouncement = $programmedAnnouncement->allowed(); -$tpl = new Template(get_lang('Session')); +$tpl = new Template($tool_name); $tpl->assign('session_header', $sessionHeader); $tpl->assign('title', $sessionTitle); $tpl->assign('general_coach', $generalCoach); diff --git a/main/session/scheduled_announcement.php b/main/session/scheduled_announcement.php index 23385bcadd..aeb2e607d0 100644 --- a/main/session/scheduled_announcement.php +++ b/main/session/scheduled_announcement.php @@ -22,24 +22,33 @@ if (!$object->allowed()) { api_not_allowed(true); } + +$sessionUrl = api_get_path(WEB_CODE_PATH).'session/resume_session.php?id_session='.$sessionId; + $htmlHeadXtra[] = api_get_jqgrid_js(); -$interbreadcrumb[] = array('url' => "session_list.php", "name" => get_lang('SessionList')); $interbreadcrumb[] = array( - 'url' => "resume_session.php?id_session=".$sessionId, - "name" => get_lang('SessionOverview') + 'url' => "session_list.php", + "name" => get_lang('SessionList') ); - $interbreadcrumb[] = array( - 'url' => api_get_self()."?session_id=".$sessionId, - "name" => get_lang('ScheduledAnnouncements') + 'url' => $sessionUrl, + "name" => get_lang('SessionOverview') ); if ($action == 'add') { + $interbreadcrumb[] = array( + 'url' => api_get_self()."?session_id=".$sessionId, + "name" => get_lang('ScheduledAnnouncements') + ); $tool_name = get_lang('Add'); } elseif ($action == 'edit') { $tool_name = get_lang('Edit'); + $interbreadcrumb[] = array( + 'url' => api_get_self()."?session_id=".$sessionId, + "name" => get_lang('ScheduledAnnouncements') + ); } else { - $tool_name = ''; + $tool_name = get_lang('ScheduledAnnouncements'); } switch ($action) { @@ -102,8 +111,10 @@ switch ($action) { $content = $object->getGrid($sessionId); } else { $content = '
'; - $content .= ''. - Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).''; + $content .= Display::url( + Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM), + api_get_self().'?session_id='.$sessionId + ); $content .= '
'; $form->addElement('hidden', 'sec_token'); @@ -206,5 +217,6 @@ $(function() { '; $tpl = new Template($tool_name); -$tpl->assign('content', $content); +$sessionTitle = Display::page_header($sessionInfo['name']); +$tpl->assign('content', $sessionTitle.$content); $tpl->display_one_col_template(); diff --git a/main/session/session_edit.php b/main/session/session_edit.php index 935e991106..5806a2cbbd 100644 --- a/main/session/session_edit.php +++ b/main/session/session_edit.php @@ -55,7 +55,6 @@ if (!empty($sessionInfo['coach_access_end_date'])) { $id_coach = $sessionInfo['id_coach']; $tool_name = get_lang('EditSession'); -//$interbreadcrumb[] = array('url' => 'index.php',"name" => get_lang('PlatformAdmin')); $interbreadcrumb[] = array('url' => "session_list.php", "name" => get_lang('SessionList')); $interbreadcrumb[] = array('url' => "resume_session.php?id_session=".$id, "name" => get_lang('SessionOverview')); @@ -71,15 +70,15 @@ $sql = "SELECT user_id,lastname,firstname,username WHERE status='1'".$order_clause; if (api_is_multiple_url_enabled()) { - $table_access_url_rel_user = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); - $access_url_id = api_get_current_access_url_id(); - if ($access_url_id != -1) { - $sql = "SELECT DISTINCT u.user_id,lastname,firstname,username - FROM $tbl_user u + $table_access_url_rel_user = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); + $access_url_id = api_get_current_access_url_id(); + if ($access_url_id != -1) { + $sql = "SELECT DISTINCT u.user_id,lastname,firstname,username + FROM $tbl_user u INNER JOIN $table_access_url_rel_user url_rel_user ON (url_rel_user.user_id = u.user_id) - WHERE status='1' AND access_url_id = '$access_url_id' $order_clause"; - } + WHERE status='1' AND access_url_id = '$access_url_id' $order_clause"; + } } $result = Database::query($sql); @@ -157,6 +156,7 @@ if ($form->validate()) { if ($params['access'] == 1) { $duration = null; } + $description = $params['description']; $showDescription = isset($params['show_description']) ? 1 : 0; $sendSubscriptionNotification = isset($params['send_subscription_notification']);