当前位置: 首页>>代码示例>>PHP>>正文


PHP Display::page_subheader方法代码示例

本文整理汇总了PHP中Display::page_subheader方法的典型用法代码示例。如果您正苦于以下问题:PHP Display::page_subheader方法的具体用法?PHP Display::page_subheader怎么用?PHP Display::page_subheader使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Display的用法示例。


在下文中一共展示了Display::page_subheader方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: returnCoursesAndSessionsViewBySession

 /**
  * UserPortal view for session, return the HTLK of the course list
  * @param $user_id
  * @return string
  */
 public function returnCoursesAndSessionsViewBySession($user_id)
 {
     $sessionCount = 0;
     $courseCount = 0;
     $load_history = isset($_GET['history']) && intval($_GET['history']) == 1 ? true : false;
     if ($load_history) {
         //Load sessions in category in *history*
         $session_categories = UserManager::get_sessions_by_category($user_id, true);
     } else {
         //Load sessions in category
         $session_categories = UserManager::get_sessions_by_category($user_id, false);
     }
     $html = '';
     //Showing history title
     if ($load_history) {
         $html .= Display::page_subheader(get_lang('HistoryTrainingSession'));
         if (empty($session_categories)) {
             $html .= get_lang('YouDoNotHaveAnySessionInItsHistory');
         }
     }
     $specialCourses = '';
     $loadDirs = $this->load_directories_preview;
     // If we're not in the history view...
     $listCoursesInfo = array();
     if (!isset($_GET['history'])) {
         // Display special courses
         $specialCoursesResult = CourseManager::display_special_courses($user_id, $loadDirs);
         $specialCourses = $specialCoursesResult['html'];
         // Display courses
         // [code=>xxx, real_id=>000]
         $listCourses = CourseManager::get_courses_list_by_user_id($user_id, false);
         foreach ($listCourses as $i => $listCourseCodeId) {
             list($userCategoryId, $userCatTitle) = CourseManager::getUserCourseCategoryForCourse($user_id, $listCourseCodeId['real_id']);
             $listCourse = api_get_course_info_by_id($listCourseCodeId['real_id']);
             $listCoursesInfo[] = array('course' => $listCourse, 'code' => $listCourseCodeId['code'], 'id' => $listCourseCodeId['real_id'], 'title' => $listCourse['title'], 'userCatId' => $userCategoryId, 'userCatTitle' => $userCatTitle);
             $courseCount++;
         }
         usort($listCoursesInfo, 'self::compareByCourse');
     }
     if (is_array($session_categories)) {
         // all courses that are in a session
         $listCoursesInSession = SessionManager::getNamedSessionCourseForCoach($user_id);
     }
     // we got all courses
     // for each user category, sorted alphabetically, display courses
     $listUserCategories = CourseManager::get_user_course_categories($user_id);
     $listCoursesAlreadyDisplayed = array();
     uasort($listUserCategories, "self::compareListUserCategory");
     $listUserCategories[0] = '';
     $html = '<div class="session-view-block">';
     foreach ($listUserCategories as $userCategoryId => $userCatTitle) {
         // add user category
         $userCategoryHtml = '';
         if ($userCategoryId != 0) {
             $userCategoryHtml = '<div class="session-view-well ">';
         }
         $userCategoryHtml .= self::getHtmlForUserCategory($userCategoryId, $userCatTitle);
         // look for course in this userCat in session courses : $listCoursesInSession
         $htmlCategory = '';
         if (isset($listCoursesInSession[$userCategoryId])) {
             // list of courses in this user cat
             foreach ($listCoursesInSession[$userCategoryId]['courseInUserCatList'] as $i => $listCourse) {
                 // add course
                 $listCoursesAlreadyDisplayed[$listCourse['courseId']] = 1;
                 if ($userCategoryId == 0) {
                     $htmlCategory .= '<div class="session-view-well session-view-row well" >';
                 } else {
                     $htmlCategory .= '<div class="session-view-row" >';
                 }
                 $coursesInfo = $listCourse['course'];
                 $htmlCategory .= self::getHtmlForCourse($coursesInfo, $userCategoryId, 1, $loadDirs);
                 // list of session category
                 $htmlSessionCategory = '<div class="session-view-row" style="display:none;" id="courseblock-' . $coursesInfo['real_id'] . '">';
                 foreach ($listCourse['sessionCatList'] as $j => $listCategorySession) {
                     // add session category
                     $htmlSessionCategory .= self::getHtmlSessionCategory($listCategorySession['catSessionId'], $listCategorySession['catSessionName']);
                     // list of session
                     $htmlSession = '';
                     // start
                     foreach ($listCategorySession['sessionList'] as $k => $listSession) {
                         // add session
                         $htmlSession .= '<div class="session-view-row">';
                         $htmlSession .= self::getHtmlForSession($listSession['sessionId'], $listSession['sessionName'], $listCategorySession['catSessionId'], $coursesInfo);
                         $htmlSession .= '</div>';
                         $sessionCount++;
                     }
                     $htmlSession .= '';
                     // end session block
                     $htmlSessionCategory .= $htmlSession;
                 }
                 $htmlSessionCategory .= '</div>';
                 // end session cat block
                 $htmlCategory .= $htmlSessionCategory . '</div>';
                 $htmlCategory .= '';
                 // end course block
//.........这里部分代码省略.........
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:101,代码来源:userportal.lib.php

示例2: get_lang

                        <input type="hidden" name="unsubscribe" value="<?php echo $course['code']; ?>" />
                         <button class="btn" value="<?php echo get_lang('Unsubscribe'); ?>" name="unsub">
                        <?php echo get_lang('Unsubscribe'); ?>
                        </button>
                    </form>
                  </div>
                      <?php }
                    }
                    $key++;
                }
                echo '</table>';
            }
    }
}

echo Display::page_subheader(get_lang('NoCourseCategory'));

echo '<table class="data_table">';
// COURSES WITHOUT CATEGORY
if (!empty($courses_without_category)) {
    $number_of_courses = count($courses_without_category);
    $key = 0;

    foreach ($courses_without_category as $course) {
        echo '<tr>';
        ?>

        <td>
            <a name="course<?php echo $course['code']; ?>"></a>
            <strong><?php echo $course['title']; ?></strong><br />
            <?php
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:courses_list.php

示例3: action_formatter

//height auto
$extra_params['height'] = 'auto';
//With this function we can add actions to the jgrid (edit, delete, etc)
/*
$action_links = 'function action_formatter(cellvalue, options, rowObject) {
     return \'<a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'.
     '&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;"  href="?sec_token='.$token.'&action=copy&id=\'+options.rowId+\'">'.Display::return_icon('copy.png',get_lang('Copy'),'',ICON_SIZE_SMALL).'</a>'.
     '&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;"  href="?sec_token='.$token.'&action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'.
     '\';
 }';*/
$action_links = null;
$room = UserManager::get_extra_user_data_by_field(api_get_user_id(), 'exam_room');
$room = $room['exam_room'];
$schedule = UserManager::get_extra_user_data_by_field(api_get_user_id(), 'exam_schedule');
$schedule = $schedule['exam_schedule'];
echo Display::page_subheader(get_lang('UserList') . ": " . $room . " - " . $schedule);
?>
<script>
$(function() {
<?php 
echo Display::grid_js('user_list', $url, $columns, $column_model, $extra_params, array(), $action_links, true);
?>
    jQuery("#user_list").jqGrid("navGrid","#user_list_pager",{view:false, edit:false, add:false, del:false, search:false, excel:true});
    jQuery("#user_list").jqGrid("navButtonAdd","#user_list_pager",{
       caption:"",
       onClickButton : function () {
           jQuery("#user_list").jqGrid("excelExport",{"url": "<? echo $url?>&export_format=xls"});
    }
});

});
开发者ID:ragebat,项目名称:chamilo-lms,代码行数:31,代码来源:user_list.php

示例4: api_get_path

            break;
    }
}
Display::display_header($tool_name);
echo '<div class="actions">
        <a href="' . api_get_path(WEB_CODE_PATH) . 'mySpace/myStudents.php?student=' . intval($_GET['user_id']) . '" title="' . get_lang('Reporting') . '">' . Display::return_icon('statistics.png', get_lang('Reporting'), '', ICON_SIZE_MEDIUM) . '
        </a>
        ' . $login_as_icon . '
        ' . $editUser . '
        ' . $exportLink . '
    </div>';
echo Display::page_header($tool_name);
$fullUrlBig = Usermanager::getUserPicture($user['user_id'], USER_IMAGE_SIZE_BIG);
$fullUrl = Usermanager::getUserPicture($user['user_id'], USER_IMAGE_SIZE_ORIGINAL);
echo '<div class="row">';
echo '<div class="col-md-2">';
echo '<a class="expand-image" href="' . $fullUrlBig . '">' . '<img src="' . $fullUrl . '" /></a><br />';
echo '</div>';
echo $message;
echo '<div class="col-md-5">';
echo $userInformation;
echo '</div>';
echo '<div class="col-md-5">';
echo $trackingInformation;
echo '</div>';
echo '</div>';
echo Display::page_subheader(get_lang('SessionList'));
echo $sessionInformation;
echo $courseInformation;
echo $urlInformation;
Display::display_footer();
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:user_information.php

示例5: foreach

 $counter = 1;
 foreach ($rows as $row) {
     if ($row['status'] == '0') {
         $style = " id = 'post" . $post_en . "' class=\"hide-me\" style=\"border:1px solid red; display:none; background-color:#F7F7F7; width:95%; margin: 0px 0px 4px 40px; \" ";
         $url_post = '';
     } else {
         $style = "";
         $post_en = $row['post_parent_id'];
     }
     if ($row['user_id'] == '0') {
         $name = prepare4display($row['poster_name']);
     } else {
         $name = api_get_person_name($row['firstname'], $row['lastname']);
     }
     if ($counter == 1) {
         echo Display::page_subheader($name);
     }
     echo "<div " . $style . "><table class=\"data_table\">";
     if ($row['visible'] == '0') {
         $titleclass = 'forum_message_post_title_2_be_approved';
         $messageclass = 'forum_message_post_text_2_be_approved';
         $leftclass = 'forum_message_left_2_be_approved';
     } else {
         $titleclass = 'forum_message_post_title';
         $messageclass = 'forum_message_post_text';
         $leftclass = 'forum_message_left';
     }
     echo "<tr>";
     echo "<td rowspan=\"3\" class=\"{$leftclass}\">";
     echo '<br /><b>' . api_convert_and_format_date($row['post_date'], DATE_TIME_FORMAT_LONG) . '</b><br />';
     if (api_is_allowed_to_edit(null, true)) {
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:viewpost.inc.php

示例6: api_get_local_time

        $column++;
        $table->setCellContents($row, $column, $userResult['sent_date']);
        $column++;
        $dateQualification = !empty($workExtraData['expires_on']) ? api_get_local_time($workExtraData['expires_on']) : '-';
        $table->setCellContents($row, $column, $dateQualification);
        $column++;
        $score = null;
        $score = $userResult['qualification'];
        $table->setCellContents($row, $column, $score);
        $column++;
        // Actions
        $links = null;
        // is a text
        $url = api_get_path(WEB_CODE_PATH) . 'work/view.php?' . api_get_cidreq() . '&id=' . $itemId;
        $links .= Display::url(Display::return_icon('default.png', get_lang('View')), $url);
        if (!empty($userResult['url'])) {
            $url = api_get_path(WEB_CODE_PATH) . 'work/download.php?' . api_get_cidreq() . '&id=' . $itemId;
            $links .= Display::url(Display::return_icon('save.png', get_lang('Download')), $url);
        }
        if (api_is_allowed_to_edit()) {
            $url = api_get_path(WEB_CODE_PATH) . 'work/edit.php?' . api_get_cidreq() . '&item_id=' . $itemId . '&id=' . $workId . '&parent_id=' . $workId;
            $links .= Display::url(Display::return_icon('rate_work.png', get_lang('Comment')), $url);
        }
        $table->setCellContents($row, $column, $links);
        $row++;
        $column = 0;
    }
}
echo Display::page_subheader($userInfo['complete_name']);
echo $table->toHtml();
Display::display_footer();
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:student_work.php

示例7: display_message_for_group

 /**
  * Displays messages of a group with nested view
  * @param $group_id
  * @param $topic_id
  * @param $is_member
  * @param $message_id
  * @return string
  */
 public static function display_message_for_group($group_id, $topic_id, $is_member, $message_id)
 {
     global $my_group_role;
     $main_message = self::get_message_by_id($topic_id);
     if (empty($main_message)) {
         return false;
     }
     $rows = self::get_messages_by_group_by_message($group_id, $topic_id);
     $rows = self::calculate_children($rows, $topic_id);
     $current_user_id = api_get_user_id();
     $items_per_page = 50;
     $query_vars = array('id' => $group_id, 'topic_id' => $topic_id, 'topics_page_nr' => 0);
     // Main message
     $links = '';
     $main_content = '';
     $items_page_nr = null;
     $html = '';
     $delete_button = '';
     if (api_is_platform_admin()) {
         $delete_button = Display::url(Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL), 'group_topics.php?action=delete&id=' . $group_id . '&topic_id=' . $topic_id);
     }
     $html .= Display::page_subheader(Security::remove_XSS($main_message['title'] . $delete_button, STUDENT, true));
     $user_sender_info = api_get_user_info($main_message['user_sender_id']);
     $files_attachments = self::get_links_message_attachment_files($main_message['id']);
     $name = $user_sender_info['complete_name'];
     $topic_page_nr = isset($_GET['topics_page_nr']) ? intval($_GET['topics_page_nr']) : null;
     $links .= '<div id="message-reply-link">';
     if ($my_group_role == GROUP_USER_PERMISSION_ADMIN || $my_group_role == GROUP_USER_PERMISSION_MODERATOR || $main_message['user_sender_id'] == $current_user_id) {
         $urlEdit = api_get_path(WEB_CODE_PATH);
         $urlEdit .= 'social/message_for_group_form.inc.php?';
         $urlEdit .= http_build_query(['user_friend' => $current_user_id, 'group_id' => $group_id, 'message_id' => $main_message['id'], 'action' => 'edit_message_group', 'anchor_topic' => 'topic_' . $main_message['id'], 'topics_page_nr' => $topic_page_nr, 'items_page_nr' => $items_page_nr, 'topic_id' => $main_message['id']]);
         $links .= Display::url(Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL), $urlEdit, ['class' => 'ajax btn btn-default', 'title' => get_lang('Edit'), 'data-title' => get_lang('Edit'), 'data-size' => 'lg']);
     }
     $urlReply = api_get_path(WEB_CODE_PATH);
     $urlReply .= 'social/message_for_group_form.inc.php?';
     $urlReply .= http_build_query(['user_friend' => api_get_user_id(), 'group_id' => $group_id, 'message_id' => $main_message['id'], 'action' => 'reply_message_group', 'anchor_topic' => 'topic_' . $main_message['id'], 'topics_page_nr' => $topic_page_nr, 'topic_id' => $main_message['id']]);
     $links .= Display::url(Display::return_icon('talk.png', get_lang('Reply')), $urlReply, ['class' => 'ajax btn btn-default', 'title' => get_lang('Reply'), 'data-title' => get_lang('Reply'), 'data-size' => 'lg']);
     $links .= '</div>';
     $userPicture = $user_sender_info['avatar'];
     $main_content .= '<div class="message-group-author">
                      <img src="' . $userPicture . '" alt="' . $name . '"  width="32" height="32" title="' . $name . '" /></div>';
     $user_link = '<a href="' . api_get_path(WEB_PATH) . 'main/social/profile.php?u=' . $main_message['user_sender_id'] . '">' . $name . '&nbsp;</a>';
     $date = '';
     if ($main_message['send_date'] != $main_message['update_date']) {
         if (!empty($main_message['update_date']) && $main_message['update_date'] != '0000-00-00 00:00:00') {
             $date = '<div class="message-group-date"> ' . get_lang('LastUpdate') . ' ' . date_to_str_ago($main_message['update_date']) . '</div>';
         }
     } else {
         $date = '<div class="message-group-date"> ' . get_lang('Created') . ' ' . date_to_str_ago($main_message['send_date']) . '</div>';
     }
     $attachment = '<div class="message-attach">' . (!empty($files_attachments) ? implode('<br />', $files_attachments) : '') . '</div>';
     $main_content .= '<div class="message-group-content">' . $links . $user_link . ' ' . $date . $main_message['content'] . $attachment . '</div>';
     $main_content = Security::remove_XSS($main_content, STUDENT, true);
     $html .= Display::div(Display::div(Display::div($main_content, array('class' => 'group_social_sub_item', 'style' => 'background-color:#fff;')), array('class' => 'group_social_item')), array('class' => 'group_social_grid'));
     $topic_id = $main_message['id'];
     if (is_array($rows) && count($rows) > 0) {
         $topics = $rows;
         $array_html_items = array();
         foreach ($topics as $index => $topic) {
             if (empty($topic['id'])) {
                 continue;
             }
             $items_page_nr = isset($_GET['items_' . $topic['id'] . '_page_nr']) ? intval($_GET['items_' . $topic['id'] . '_page_nr']) : null;
             $links = '';
             $html_items = '';
             $user_sender_info = api_get_user_info($topic['user_sender_id']);
             $files_attachments = self::get_links_message_attachment_files($topic['id']);
             $name = $user_sender_info['complete_name'];
             $links .= '<div id="message-reply-link">';
             if ($my_group_role == GROUP_USER_PERMISSION_ADMIN || $my_group_role == GROUP_USER_PERMISSION_MODERATOR || $topic['user_sender_id'] == $current_user_id) {
                 $links .= '<a href="' . api_get_path(WEB_CODE_PATH) . 'social/message_for_group_form.inc.php?height=400&width=800&&user_friend=' . $current_user_id . '&group_id=' . $group_id . '&message_id=' . $topic['id'] . '&action=edit_message_group&anchor_topic=topic_' . $topic_id . '&topics_page_nr=' . $topic_page_nr . '&items_page_nr=' . $items_page_nr . '&topic_id=' . $topic_id . '" class="ajax btn" data-size="lg" data-title="' . get_lang('Edit') . '" title="' . get_lang('Edit') . '">' . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) . '</a>';
             }
             $links .= '&nbsp;&nbsp;<a href="' . api_get_path(WEB_CODE_PATH) . 'social/message_for_group_form.inc.php?height=400&width=800&&user_friend=' . api_get_user_id() . '&group_id=' . $group_id . '&message_id=' . $topic['id'] . '&action=reply_message_group&anchor_topic=topic_' . $topic_id . '&topics_page_nr=' . $topic_page_nr . '&items_page_nr=' . $items_page_nr . '&topic_id=' . $topic_id . '" class="ajax btn" data-size="lg" data-title="' . get_lang('Reply') . '" title="' . get_lang('Reply') . '">';
             $links .= Display::return_icon('talk.png', get_lang('Reply')) . '</a>';
             $links .= '</div>';
             $userPicture = $user_sender_info['avatar'];
             $html_items .= '<div class="message-group-author"><img src="' . $userPicture . '" alt="' . $name . '"  width="32" height="32" title="' . $name . '" /></div>';
             $user_link = '<a href="' . api_get_path(WEB_PATH) . 'main/social/profile.php?u=' . $topic['user_sender_id'] . '">' . $name . '&nbsp;</a>';
             $date = '';
             if ($topic['send_date'] != $topic['update_date']) {
                 if (!empty($topic['update_date']) && $topic['update_date'] != '0000-00-00 00:00:00') {
                     $date = '<div class="message-group-date"> ' . get_lang('LastUpdate') . ' ' . date_to_str_ago($topic['update_date']) . '</div>';
                 }
             } else {
                 $date = '<div class="message-group-date"> ' . get_lang('Created') . ' ' . date_to_str_ago($topic['send_date']) . '</div>';
             }
             $attachment = '<div class="message-attach">' . (!empty($files_attachments) ? implode('<br />', $files_attachments) : '') . '</div>';
             $html_items .= '<div class="message-group-content">' . $links . $user_link . ' ' . $date . Security::remove_XSS($topic['content'], STUDENT, true) . $attachment . '</div>';
             $base_padding = 20;
             if ($topic['indent_cnt'] == 0) {
                 $indent = $base_padding;
             } else {
//.........这里部分代码省略.........
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:101,代码来源:message.lib.php

示例8: api_convert_and_format_date

        $date = api_convert_and_format_date($invitation['send_date'], DATE_TIME_FORMAT_LONG);
        $social_right_content .= '
        <div class="span2">
            <a class="thumbnail" href="' . $userInfo['profile_url'] . '">
            <img src="' . $friends_profile['file'] . '"  /></a>
        </div>
        <div class="span3">
            <a class="profile_link" href="' . $userInfo['profile_url'] . '">' . $userInfo['complete_name'] . '</a>
            <div>' . $title . ' : ' . $content . '</div>
            <div>' . get_lang('DateSend') . ' : ' . $date . '</div>
            </div>
        </div>';
    }
}
if (count($pending_invitations) > 0) {
    $social_right_content .= Display::page_subheader(get_lang('GroupsWaitingApproval'));
    $new_invitation = array();
    foreach ($pending_invitations as $invitation) {
        $picture = $usergroup->get_picture_group($invitation['id'], $invitation['picture'], 80);
        $img = '<img class="social-groups-image" src="' . $picture['file'] . '" hspace="4" height="50" border="2" align="left" width="50" />';
        $invitation['picture'] = '<a href="groups.php?id=' . $invitation['id'] . '">' . $img . '</a>';
        $invitation['name'] = '<a href="groups.php?id=' . $invitation['id'] . '">' . Text::cut($invitation['name'], 120, true) . '</a>';
        $invitation['join'] = '<a class="btn btn-primary" href="invitations.php?accept=' . $invitation['id'] . '">' . get_lang('AcceptInvitation') . '</a>';
        $invitation['deny'] = '<a class="btn btn-danger" href="invitations.php?deny=' . $invitation['id'] . '">' . get_lang('DenyInvitation') . '</a>';
        $invitation['description'] = Text::cut($invitation['description'], 220, true);
        $new_invitation[] = $invitation;
    }
    $social_right_content .= Display::return_sortable_grid('waiting_user', array(), $new_invitation, array('hide_navigation' => true, 'per_page' => 100), array(), false, array(true, true, true, false, false, true, true, true, true));
}
$social_right_content = Display::div($social_right_content, array('class' => 'span9'));
$tpl = $app['template'];
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:invitations.php

示例9: SortableTable

        $photo = '<img src="' . $userInfo['avatar'] . '" alt="' . $completeName . '" width="32" height="32" title="' . $completeName . '" />';
        $tutor_info .= '<li>';
        $tutor_info .= Display::url($userInfo['complete_name'], $userInfo['profile_url']);
        $tutor_info .= '</li>';
    }
    $tutor_info .= '</ul>';
}
echo Display::page_subheader(get_lang('GroupTutors'));
if (!empty($tutor_info)) {
    echo $tutor_info;
}
echo '<br />';
/*
 * List all the members of the current group
 */
echo Display::page_subheader(get_lang('GroupMembers'));
$table = new SortableTable('group_users', 'get_number_of_group_users', 'get_group_user_data', (api_is_western_name_order() xor api_sort_by_first_name()) ? 2 : 1);
$my_cidreq = isset($_GET['cidReq']) ? Security::remove_XSS($_GET['cidReq']) : '';
$my_origin = isset($_GET['origin']) ? Security::remove_XSS($_GET['origin']) : '';
$my_gidreq = isset($_GET['gidReq']) ? Security::remove_XSS($_GET['gidReq']) : '';
$parameters = array('cidReq' => $my_cidreq, 'origin' => $my_origin, 'gidReq' => $my_gidreq);
$table->set_additional_parameters($parameters);
$table->set_header(0, '');
if (api_is_western_name_order()) {
    $table->set_header(1, get_lang('FirstName'));
    $table->set_header(2, get_lang('LastName'));
} else {
    $table->set_header(1, get_lang('LastName'));
    $table->set_header(2, get_lang('FirstName'));
}
if (api_get_setting('display.show_email_addresses') == 'true') {
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:group_space.php

示例10: get_lang

    $form->addElement('date_picker', 'end_date_time', get_lang('RepeatEnd'), array('form_name' => 'attendance_calendar_add'));
    $defaults['end_date_time'] = date('Y-m-d');
    $form->addElement('html', '</div>');
    $defaults['repeat_type'] = 'weekly';
    $form->addSelect('groups', get_lang('Group'), $groupIdList);
    $form->addButtonCreate(get_lang('Save'));
    $form->setDefaults($defaults);
    $form->display();
} else {
    // Calendar list
    $groupList = GroupManager::get_group_list();
    $groupIdList = array('--');
    foreach ($groupList as $group) {
        $groupIdList[$group['id']] = $group['name'];
    }
    echo Display::page_subheader(get_lang('CalendarList'));
    echo '<div class="attendance-calendar-list">';
    if (!empty($attendance_calendar)) {
        foreach ($attendance_calendar as $calendar) {
            echo '<div class="attendance-calendar-row">';
            if (isset($action) && $action == 'calendar_edit' && (isset($calendar_id) && $calendar_id == $calendar['id'])) {
                // calendar edit form
                echo '<div class="attendance-calendar-edit">';
                $form = new FormValidator('attendance_calendar_edit', 'POST', 'index.php?action=calendar_edit&attendance_id=' . $attendance_id . '&calendar_id=' . $calendar_id . '&' . api_get_cidreq() . $param_gradebook, '');
                $form->addElement('date_time_picker', 'date_time', '', array('form_name' => 'attendance_calendar_edit'), 5);
                $defaults['date_time'] = $calendar['date_time'];
                $form->addButtonSave(get_lang('Save'));
                $form->addButtonCancel(get_lang('Cancel'), 'cancel');
                $form->setDefaults($defaults);
                $form->display();
                echo '</div>';
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:attendance_calendar.php

示例11: return_courses_and_sessions

    /**
     * Prints the session and course list (user_portal.php)
     * @param int $user_id
     * @return string
     */
    public function return_courses_and_sessions($user_id)
    {
        global $_configuration;

        $load_history = (isset($_GET['history']) && intval($_GET['history']) == 1) ? true : false;
        if ($load_history) {
            // Load sessions in category in *history*
            $session_categories = UserManager::get_sessions_by_category(
                $user_id,
                true
            );
        } else {
            // Load sessions in category
            $session_categories = UserManager::get_sessions_by_category(
                $user_id,
                false
            );
        }

        $html = '';

        // Showing history title

        if ($load_history) {
            $html .= Display::page_subheader(get_lang('HistoryTrainingSession'));
            if (empty($session_categories)) {
                $html .= get_lang('YouDoNotHaveAnySessionInItsHistory');
            }
        }

        $courses_html = '';
        $special_courses = '';

        // If we're not in the history view...
        if (!isset($_GET['history'])) {
            // Display special courses.
            $special_courses = CourseManager::display_special_courses($user_id, $this->load_directories_preview);
            // Display courses.
            $courses_html .= CourseManager::display_courses($user_id, $this->load_directories_preview);
        }

        $sessions_with_category = '';
        $sessions_with_no_category = '';
        if (is_array($session_categories)) {
            foreach ($session_categories as $session_category) {
                $session_category_id = $session_category['session_category']['id'];

                // Sessions and courses that are not in a session category
                if ($session_category_id == 0 &&
                    isset($session_category['sessions'])
                ) {
                    // Independent sessions
                    foreach ($session_category['sessions'] as $session) {
                        $session_id = $session['session_id'];

                        // Don't show empty sessions.
                        if (count($session['courses']) < 1) {
                            continue;
                        }

                        // Courses inside the current session.
                        $date_session_start = $session['date_start'];
                        $date_session_end = $session['date_end'];
                        $days_access_before_beginning  = $session['nb_days_access_before_beginning'];
                        $days_access_after_end = $session['nb_days_access_after_end'];

                        $session_now = time();
                        $count_courses_session = 0;

                        // Loop course content
                        $html_courses_session = '';
                        $atLeastOneCourseIsVisible = false;

                        foreach ($session['courses'] as $course) {
                            $is_coach_course = api_is_coach($session_id, $course['code']);
                            $allowed_time = 0;
                            $dif_time_after = 0;
                            if ($date_session_start != '0000-00-00') {
                                if ($is_coach_course) {
                                    $allowed_time = api_strtotime($date_session_start.' 00:00:00') - ($days_access_before_beginning * 86400);
                                } else {
                                    $allowed_time = api_strtotime($date_session_start.' 00:00:00');
                                }
                                if (!isset($_GET['history'])) {
                                    if ($date_session_end != '0000-00-00') {
                                        $endSessionToTms = api_strtotime($date_session_end.' 23:59:59');
                                        if ($session_now > $endSessionToTms) {
                                            $dif_time_after = $session_now - $endSessionToTms;
                                            $dif_time_after = round($dif_time_after/86400);
                                        }
                                    }
                                }
                            }

                            if ($session_now > $allowed_time &&
//.........这里部分代码省略.........
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:101,代码来源:userportal.lib.php

示例12: implode

        $table->setCellContents($row, 2, $link);
        $row++;
    }
    $userListToShow .= $table->toHtml();
}
/** @var SequenceRepository $repo */
$repo = Database::getManager()->getRepository('ChamiloCoreBundle:SequenceResource');
$requirementAndDependencies = $repo->getRequirementAndDependencies($sessionId, SequenceResource::SESSION_TYPE);
$requirements = '';
if (!empty($requirementAndDependencies['requirements'])) {
    $requirements = Display::page_subheader(get_lang('Requirements'));
    $requirements .= implode(' + ', array_column($requirementAndDependencies['requirements'], 'admin_link'));
}
$dependencies = '';
if (!empty($requirementAndDependencies['dependencies'])) {
    $dependencies = Display::page_subheader(get_lang('Dependencies'));
    $dependencies .= implode(', ', array_column($requirementAndDependencies['dependencies'], 'admin_link'));
}
//$tpl = new Template(get_lang('Session'));
$tpl = Container::getTwig();
$tpl->addGlobal('session_header', $sessionHeader);
$tpl->addGlobal('title', $sessionTitle);
$tpl->addGlobal('general_coach', $generalCoach);
$tpl->addGlobal('session_admin', api_get_user_info($session->getSessionAdminId()));
$tpl->addGlobal('session', $sessionInfo);
$tpl->addGlobal('session_category', is_null($sessionCategory) ? null : $sessionCategory->getName());
$tpl->addGlobal('session_dates', SessionManager::parseSessionDates($sessionInfo));
$tpl->addGlobal('session_visibility', SessionManager::getSessionVisibility($sessionInfo));
$tpl->addGlobal('url_list', $urlList);
$tpl->addGlobal('extra_fields', $extraFieldData);
$tpl->addGlobal('course_list', $courseListToShow);
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:resume_session.php

示例13: getAllUserToWork

$items = getAllUserToWork($workId, api_get_course_int_id());
$usersAdded = array();
if (!empty($items)) {
    echo Display::page_subheader(get_lang('UsersAdded'));
    echo '<div class="well">';
    foreach ($items as $data) {
        $myUserId = $data['user_id'];
        $usersAdded[] = $myUserId;
        $userInfo = api_get_user_info($myUserId);
        $url = api_get_path(WEB_CODE_PATH) . 'work/add_user.php?action=delete&id=' . $workId . '&user_id=' . $myUserId;
        $link = Display::url(get_lang('Delete'), $url);
        echo $userInfo['complete_name'] . ' ' . $link . '<br />';
    }
    echo '</div>';
}
$userList = CourseManager::get_user_list_from_course_code($courseInfo['code'], api_get_session_id(), null, null, STUDENT);
echo Display::page_subheader(get_lang('UserToAdd'));
if (!empty($userList)) {
    echo '<div class="well">';
    foreach ($userList as $user) {
        if (in_array($user['user_id'], $usersAdded)) {
            continue;
        }
        $userName = api_get_person_name($user['firstname'], $user['lastname']);
        $url = api_get_path(WEB_CODE_PATH) . 'work/add_user.php?action=add&id=' . $workId . '&user_id=' . $user['user_id'];
        $link = Display::url(get_lang('Add'), $url);
        echo $userName . ' ' . $link . '<br />';
    }
    echo '</div>';
}
echo '<hr /><div class="clear"></div>';
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:add_user.php

示例14: sprintf

        $issues .= '<li id ="' . $login . '">
                        <div class="row">
                            <div class="col-md-12"><div class="thumbnail">' . $course_image . '</div>
                        </div>
                        <div class="col-md-3">' . sprintf(get_lang('YouHaveEnteredTheCourseXInY'), $courseInfo['code'], api_convert_and_format_date($login, DATE_FORMAT_LONG)) . '</div>
                    </li>';
        $count++;
    }
}
$content = Tracking::show_user_progress(api_get_user_id(), $sessionId);
$content .= Tracking::show_course_detail(api_get_user_id(), $courseCode, $sessionId);
if (!empty($dates)) {
    if (!empty($content)) {
        $content .= '<br /><br />';
    }
    $content .= '<div class="row"><div class="col-md-12">' . Display::page_subheader(get_lang('Timeline')) . '</div>';
    $content .= '<div id="my_timeline">
        <div class="actions">
            <a href="#" id="prev"></a> <!-- optional -->
            <a href="#" id="next"></a> <!-- optional -->
        </div>
    <ul id="dates">
        ' . $dates . '
    </ul>
    <ul id="issues">
        ' . $issues . '
    </ul>
    </div></div>';
}
$message = null;
if (empty($content)) {
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:my_progress.php

示例15: array

$interbreadcrumb[] = array ('url' => api_get_path(WEB_CODE_PATH).'work/work_list.php?'.api_get_cidreq().'&id='.$workId, 'name' =>  $my_folder_data['title']);

$documentsAddedInWork = getAllDocumentsFromWorkToString($workId, $courseInfo);

Display :: display_header(null);

echo '<div class="actions">';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq().'&origin='.$origin.'">'.Display::return_icon('back.png', get_lang('BackToWorksList'),'',ICON_SIZE_MEDIUM).'</a>';
if (api_is_allowed_to_session_edit(false, true) && !empty($workId)) {
    echo '<a href="'.api_get_path(WEB_CODE_PATH).'work/upload.php?'.api_get_cidreq().'&id='.$workId.'&origin='.$origin.'">';
    echo Display::return_icon('upload_file.png', get_lang('UploadADocument'), '', ICON_SIZE_MEDIUM).'</a>';
}
echo '</div>';

if (!empty($my_folder_data['title'])) {
    echo Display::page_subheader($my_folder_data['title']);
}

$error_message = Session::read('error_message');
if (!empty($error_message)) {
    echo $error_message;
    Session::erase('error_message');
}

if (!empty($my_folder_data['description'])) {
    echo '<p><div><strong>'.get_lang('Description').':</strong><p>'.Security::remove_XSS($my_folder_data['description']).'</p></div></p>';
}

$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : null;
$item_id = isset($_REQUEST['item_id']) ? intval($_REQUEST['item_id']) : null;
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:30,代码来源:work_list.php


注:本文中的Display::page_subheader方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。