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


PHP Display::toolbarButton方法代码示例

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


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

示例1: api_block_anonymous_users

     break;
 case 'get_icon':
     api_block_anonymous_users();
     api_protect_admin_script();
     $link = '';
     switch ($type) {
         case 'session':
             $type = SequenceResource::SESSION_TYPE;
             $showDelete = isset($_REQUEST['show_delete']) ? $_REQUEST['show_delete'] : false;
             $image = Display::return_icon('item-sequence.png', null, null, ICON_SIZE_LARGE);
             $sessionInfo = api_get_session_info($id);
             if (!empty($sessionInfo)) {
                 $linkDelete = $linkUndo = '';
                 if ($showDelete) {
                     $linkDelete = Display::toolbarButton(get_lang('Delete'), '#', 'trash', 'default', ['class' => 'delete_vertex btn btn-block btn-xs', 'data-id' => $id]);
                     $linkUndo = Display::toolbarButton(get_lang('Undo'), '#', 'undo', 'default', ['class' => 'undo_delete btn btn-block btn-xs', 'style' => 'display: none;', 'data-id' => $id]);
                 }
                 $link = '<div class="parent" data-id="' . $id . '">';
                 $link .= '<div class="big-icon">';
                 $link .= $image;
                 $link .= '<div class="sequence-course">' . $sessionInfo['name'] . '</div>';
                 $link .= '<a href="#" class="sequence-id">' . $id . '</a>';
                 $link .= $linkDelete;
                 $link .= $linkUndo;
                 $link .= '</div></div>';
             }
             break;
     }
     echo $link;
     break;
 case 'delete_vertex':
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:sequence.ajax.php

示例2: header

                $skill->setUpdatedAt($updatedAt);
                $entityManager->persist($skill);
            }
            $entityManager->flush();
            Display::addFlash(Display::return_message(sprintf(get_lang('SkillXDisabled'), $skill->getName()), 'success'));
        }
        header('Location: ' . api_get_self());
        exit;
        break;
    case 'list':
        //no break
    //no break
    default:
        $interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
        $message = Session::has('message') ? Session::read('message') : null;
        $toolbar = Display::toolbarButton(get_lang('CreateSkill'), api_get_path(WEB_CODE_PATH) . 'admin/skill_create.php', 'plus', 'success', ['title' => get_lang('CreateSkill')]);
        $toolbar .= Display::toolbarButton(get_lang('SkillsWheel'), api_get_path(WEB_CODE_PATH) . 'admin/skills_wheel.php', 'bullseye', 'primary', ['title' => get_lang('CreateSkill')]);
        $toolbar .= Display::toolbarButton(get_lang('BadgesManagement'), api_get_path(WEB_CODE_PATH) . 'admin/skill_badge_list.php', 'shield', 'warning', ['title' => get_lang('BadgesManagement')]);
        /* View */
        $skill = new Skill();
        $skillList = $skill->get_all();
        $tpl = new Template(get_lang('ManageSkills'));
        $tpl->assign('message', $message);
        $tpl->assign('skills', $skillList);
        $content = $tpl->fetch('default/skill/list.tpl');
        $tpl->assign('actions', $toolbar);
        $tpl->assign('content', $content);
        $tpl->display_one_col_template();
        Session::erase('message');
        break;
}
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:skill_list.php

示例3: showlinksofcategory

 /**
  * Displays all the links of a given category.
  * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
  */
 public static function showlinksofcategory($catid)
 {
     global $token;
     $_user = api_get_user_info();
     $course_id = api_get_course_int_id();
     $session_id = api_get_session_id();
     $catid = intval($catid);
     $tbl_link = Database::get_course_table(TABLE_LINK);
     $TABLE_ITEM_PROPERTY = Database::get_course_table(TABLE_ITEM_PROPERTY);
     // Condition for the session.
     $condition_session = api_get_session_condition($session_id, true, true, 'link.session_id');
     $content = '';
     $sql = "SELECT *, link.id FROM {$tbl_link} link\n                INNER JOIN {$TABLE_ITEM_PROPERTY} itemproperties\n                ON (link.id=itemproperties.ref AND link.c_id = itemproperties.c_id )\n                WHERE\n                    itemproperties.tool='" . TOOL_LINK . "' AND\n                    link.category_id='" . $catid . "' AND\n                    (itemproperties.visibility='0' OR itemproperties.visibility='1')\n                    {$condition_session} AND\n                    link.c_id = " . $course_id . " AND\n                    itemproperties.c_id = " . $course_id . "\n                ORDER BY link.display_order DESC";
     $result = Database::query($sql);
     $numberoflinks = Database::num_rows($result);
     if ($numberoflinks > 0) {
         $content .= '<div class="link list-group">';
         $i = 1;
         while ($myrow = Database::fetch_array($result)) {
             // Validation when belongs to a session.
             $session_img = api_get_session_image($myrow['session_id'], $_user['status']);
             //$css_class = $i % 2 == 0 ? $css_class = 'row_odd' : $css_class = 'row_even';
             $toolbar = '';
             $link_validator = '';
             if (api_is_allowed_to_edit(null, true)) {
                 $toolbar .= Display::toolbarButton('', '#', 'retweet', 'default btn-sm', array('onclick' => "check_url('" . $myrow['id'] . "', '" . addslashes($myrow['url']) . "');", 'title' => get_lang('CheckURL')));
                 $link_validator .= Display::span('', array('id' => 'url_id_' . $myrow['id'], 'class' => 'check-link'));
             }
             if (api_is_allowed_to_edit(null, true)) {
                 if ($session_id == $myrow['session_id']) {
                     $url = api_get_self() . '?' . api_get_cidreq() . '&action=editlink&category=' . (!empty($category) ? $category : '') . '&id=' . $myrow['id'] . '&category_id=' . $myrow['id'];
                     $title = get_lang('Edit');
                     $toolbar .= Display::toolbarButton('', $url, 'pencil', 'default btn-sm', array('title' => $title));
                     // DISPLAY MOVE UP COMMAND only if it is not the top link.
                     /* commented at least since 2014-10-11
                                             if ($i != 1) {
                                                 echo '<a href="' . api_get_self() . '?' . api_get_cidreq() .  '&sec_token='.$token.'&urlview=' . $urlview . '&up=', $myrow[0], '" title="' . get_lang('Up') . '">' . Display :: return_icon('up.png', get_lang('Up'), array (), ICON_SIZE_SMALL) . '', "</a>\n";
                                             } else {
                                                 echo Display :: return_icon('up_na.png', get_lang('Up'), array (), ICON_SIZE_SMALL) . '</a>';
                                             }
                     
                                             // DISPLAY MOVE DOWN COMMAND only if it is not the bottom link.
                                             if ($i < $numberoflinks) {
                                                 echo '<a href="' . api_get_self() . '?' . api_get_cidreq() .  '&sec_token='.$token.'&urlview=' . $urlview . '&down=' . $myrow[0] . '" title="' . get_lang('Down') . '">' . Display :: return_icon('down.png', get_lang('Down'), array (), ICON_SIZE_SMALL) . '', "</a>\n";
                                             } else {
                                                 echo Display :: return_icon('down_na.png', get_lang('Down'), array (), ICON_SIZE_SMALL) . '', "</a>\n";
                                             }*/
                     if ($myrow['visibility'] == '1') {
                         $url .= 'link.php?' . api_get_cidreq() . '&sec_token=' . $token . '&action=invisible&id=' . $myrow['id'] . '&scope=link&category_id=' . $myrow['category_id'];
                         $title = get_lang('MakeInvisible');
                         $toolbar .= Display::toolbarButton('', $url, 'eye', 'default btn-sm', array('title' => $title));
                     }
                     if ($myrow['visibility'] == '0') {
                         $url .= 'link.php?' . api_get_cidreq() . '&sec_token=' . $token . '&action=visible&id=' . $myrow['id'] . '&scope=link&category_id=' . $myrow['category_id'];
                         $title = get_lang('MakeVisible');
                         $toolbar .= Display::toolbarButton('', $url, 'eye-slash', 'primary btn-sm', array('title' => $title));
                     }
                     $url .= api_get_self() . '?' . api_get_cidreq() . '&sec_token=' . $token . '&action=deletelink&id=' . $myrow['id'] . '&category_id=' . $myrow['category_id'];
                     $event = "javascript: if(!confirm('" . get_lang('LinkDelconfirm') . "'))return false;";
                     $title = get_lang('Delete');
                     $toolbar .= Display::toolbarButton('', $url, 'trash', 'default btn-sm', array('onclick' => $event, 'title' => $title));
                 } else {
                     $title = get_lang('EditionNotAvailableFromSession');
                     $toolbar .= Display::toolbarButton('', '#', 'trash-o', 'default btn-sm', array('title' => $title));
                 }
             }
             $iconLink = Display::return_icon('url.png', get_lang('Link'), null, ICON_SIZE_SMALL);
             if ($myrow['visibility'] == '1') {
                 $content .= '<div class="list-group-item">';
                 $content .= '<div class="pull-right"><div class="btn-group">' . $toolbar . '</div></div>';
                 $content .= '<h4 class="list-group-item-heading">';
                 $content .= $iconLink;
                 $url = 'link_goto.php?' . api_get_cidreq() . '&link_id=' . $myrow['id'] . '&link_url=' . urlencode($myrow['url']);
                 $content .= Display::tag('a', Security::remove_XSS($myrow['title']), array('href' => $url, 'target' => $myrow['target']));
                 $content .= $link_validator;
                 $content .= $session_img;
                 $content .= '</h4>';
                 $content .= '<p class="list-group-item-text">' . $myrow['description'] . '</p>';
                 $content .= '</div>';
             } else {
                 if (api_is_allowed_to_edit(null, true)) {
                     $content .= '<div class="list-group-item">';
                     $content .= '<div class="pull-right"><div class="btn-group">' . $toolbar . '</div></div>';
                     $content .= '<h4 class="list-group-item-heading">';
                     $content .= $iconLink;
                     $url = 'link_goto.php?' . api_get_cidreq() . '&link_id=' . $myrow['id'] . "&link_url=" . urlencode($myrow['url']);
                     $content .= Display::tag('a', Security::remove_XSS($myrow['title']), array('href' => $url, 'target' => '_blank', 'class' => 'invisible'));
                     $content .= $link_validator;
                     $content .= $session_img;
                     $content .= '</h4>';
                     $content .= '<p class="list-group-item-text">' . $myrow['description'] . '</p>';
                     $content .= '</div>';
                 }
             }
             $i++;
         }
//.........这里部分代码省略.........
开发者ID:feroli1000,项目名称:chamilo-lms,代码行数:101,代码来源:link.lib.php

示例4: api_get_jqgrid_js

$htmlHeadXtra[] = api_get_jqgrid_js();
$url_dir = api_get_path(WEB_CODE_PATH) . 'work/work.php?' . api_get_cidreq();
if (!empty($group_id)) {
    $group_properties = GroupManager::get_group_properties($group_id);
    $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'group/group.php?' . api_get_cidreq(), 'name' => get_lang('Groups'));
    $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'group/group_space.php?' . api_get_cidreq(), 'name' => get_lang('GroupSpace') . ' ' . $group_properties['name']);
}
$interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'work/work.php?' . api_get_cidreq(), 'name' => get_lang('StudentPublications'));
$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);
$actionsLeft = '<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) && !api_is_invitee()) {
    $url = api_get_path(WEB_CODE_PATH) . 'work/upload.php?' . api_get_cidreq() . '&id=' . $workId . '&origin=' . $origin;
    //$actionsRight .= Display::return_icon('upload_file.png', get_lang('UploadADocument'), '', ICON_SIZE_MEDIUM).' ' . get_lang('UploadADocument') . '</a>';
    $actionsRight = Display::toolbarButton(get_lang('UploadMyAssignment'), $url, 'upload', 'success');
}
echo Display::toolbarAction('toolbar-work', array(0 => $actionsLeft . $actionsRight));
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'])) {
    $contentWork = Security::remove_XSS($my_folder_data['description']);
    $html = '';
    $html .= Display::panel($contentWork, get_lang('Description'));
    echo $html;
开发者ID:secuencia24,项目名称:chamilo-lms,代码行数:31,代码来源:work_list.php

示例5: Skill

                                plusButton: "<em class=\\"fa fa-plus-circle \\"></em>  ",
                                minusButton: "<em class=\\"fa fa-minus-circle\\"></em>  "
                              });
                            });
                           </script>';
        $skill = new Skill();
        //obtain all skills
        $allSkills = $skill->get_all();
        //order the skill list by a nested view array
        $skillList = $skill->get_nested_skill_view($allSkills);
        //$tpl = new Template(get_lang('ManageSkills'));
        echo $toolbar;
        echo Container::getTemplating()->render('@template_style/skill/nested.html.twig', ['skills' => $skillList]);
        break;
    case 'list':
        //no break
    //no break
    default:
        $interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
        $interbreadcrumb[] = array("url" => '#', "name" => get_lang('ManageSkills'));
        $toolbar = Display::toolbarButton(get_lang('CreateSkill'), api_get_path(WEB_CODE_PATH) . 'admin/skill_create.php', 'plus', 'success', ['title' => get_lang('CreateSkill')]);
        $toolbar .= Display::toolbarButton(get_lang('SkillsWheel'), api_get_path(WEB_CODE_PATH) . 'admin/skills_wheel.php', 'bullseye', 'primary', ['title' => get_lang('CreateSkill')]);
        $toolbar .= Display::toolbarButton(get_lang('BadgesManagement'), api_get_path(WEB_CODE_PATH) . 'admin/skill_badge_list.php', 'shield', 'warning', ['title' => get_lang('BadgesManagement')]);
        $toolbar .= Display::toolbarButton(get_lang('NestedView'), api_get_path(WEB_CODE_PATH) . 'admin/skill_list.php?view=nested', 'eye', 'info pull-right', ['title' => get_lang('NestedView')]);
        /* List View */
        $skill = new Skill();
        $skillList = $skill->get_all();
        echo $toolbar;
        echo Container::getTemplating()->render('@template_style/skill/list.html.twig', ['skills' => $skillList]);
        break;
}
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:skill_list.php

示例6: getRegisteredInSessionButton

 /**
  * Get a HTML button for subscribe to session
  * @param int $sessionId The session ID
  * @param string $sessionName The session name
  * @param boolean $checkRequirements Optional.
  *        Whether the session has requirement. Default is false
  * @return string The button HTML
  */
 public function getRegisteredInSessionButton($sessionId, $sessionName, $checkRequirements = false)
 {
     if ($checkRequirements) {
         $url = api_get_path(WEB_AJAX_PATH);
         $url .= 'sequence.ajax.php?';
         $url .= http_build_query(['a' => 'get_requirements', 'id' => intval($sessionId), 'type' => SequenceResource::SESSION_TYPE]);
         return Display::toolbarButton(get_lang('CheckRequirements'), $url, 'check-circle', 'primary', ['class' => 'btn-lg btn-block ajax', 'data-title' => get_lang('CheckRequirements'), 'data-size' => 'md']);
     }
     $catalogSessionAutoSubscriptionAllowed = false;
     if (api_get_setting('session.catalog_allow_session_auto_subscription') === 'true') {
         $catalogSessionAutoSubscriptionAllowed = true;
     }
     $url = api_get_path(WEB_CODE_PATH);
     if ($catalogSessionAutoSubscriptionAllowed) {
         $url .= 'auth/courses.php?';
         $url .= http_build_query(['action' => 'subscribe_to_session', 'session_id' => intval($sessionId)]);
         $result = Display::toolbarButton(get_lang('Subscribe'), $url, 'check-circle', 'primary', ['class' => 'btn-lg btn-block ajax', 'data-title' => get_lang('AreYouSureToSubscribe'), 'data-size' => 'md']);
     } else {
         $url .= 'inc/email_editor.php?';
         $url .= http_build_query(['action' => 'subscribe_me_to_session', 'session' => Security::remove_XSS($sessionName)]);
         $result = Display::toolbarButton(get_lang('Subscribe'), $url, 'check-circle', 'primary', ['class' => 'btn-lg btn-block']);
     }
     $hook = HookResubscribe::create();
     if (!empty($hook)) {
         $hook->setEventData(array('session_id' => intval($sessionId)));
         try {
             $hook->notifyResubscribe(HOOK_EVENT_TYPE_PRE);
         } catch (Exception $exception) {
             $result = $exception->getMessage();
         }
     }
     return $result;
 }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:41,代码来源:courses_controller.php

示例7: foreach

 $results = '<div id="whoisonline">';
 if (is_array($users) && count($users) > 0) {
     $results .= '<div class="row">';
     $buttonClass = 'btn btn-default btn-sm';
     foreach ($users as $user) {
         $user_info = api_get_user_info($user['id'], true);
         $send_inv = '<button class="' . $buttonClass . ' disabled "><em class="fa fa-user"></em> ' . get_lang('SendInvitation') . '</button>';
         $relation_type = intval(SocialManager::get_relation_between_contacts(api_get_user_id(), $user_info['user_id']));
         $url = api_get_path(WEB_PATH) . 'main/social/profile.php?u=' . $user_info['user_id'];
         // Show send invitation icon if they are not friends yet
         if ($relation_type != 3 && $relation_type != 4 && $user_info['user_id'] != api_get_user_id()) {
             $send_inv = '<a href="#" class="' . $buttonClass . ' btn-to-send-invitation" data-send-to="' . $user_info['user_id'] . '">
                          <em class="fa fa-user"></em> ' . get_lang('SendInvitation') . '</a>';
         }
         $sendMesssageUrl = api_get_path(WEB_AJAX_PATH) . 'user_manager.ajax.php?' . http_build_query(['a' => 'get_user_popup', 'user_id' => $user_info['user_id']]);
         $send_msg = Display::toolbarButton(get_lang('SendMessage'), $sendMesssageUrl, 'envelope', 'default', ['class' => 'ajax btn-sm', 'data-title' => get_lang('SendMessage')]);
         $img = '<img src="' . $user_info['avatar'] . '" class="img-responsive img-circle" width="100" height="100">';
         if ($user_info['user_is_online']) {
             $status_icon = Display::return_icon('online.png', get_lang('OnLine'), null, ICON_SIZE_TINY);
         } else {
             $status_icon = Display::return_icon('offline.png', get_lang('Disconnected'), null, ICON_SIZE_TINY);
         }
         if ($user_info['status'] == 5) {
             $user_icon = Display::return_icon('user.png', get_lang('Student'), null, ICON_SIZE_TINY);
         } else {
             $user_icon = Display::return_icon('teacher.png', get_lang('Teacher'), null, ICON_SIZE_TINY);
         }
         $tag = isset($user['tag']) ? ' <br /><br />' . $user['tag'] : null;
         $user_info['complete_name'] = Display::url($user_info['complete_name'], $url);
         $invitations = $user['tag'] . $send_inv . $send_msg;
         $results .= '<div class="col-md-3">
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:search.php

示例8: get_lang

            if (isset($_SESSION['image_resizing']) && $_SESSION['image_resizing'] == 'resizing') {
                $resize_info = get_lang('Resizing') . '<br />';
                $resize_width = $_SESSION["image_resizing_width"] . ' x ';
                $resize_height = $_SESSION['image_resizing_height'];
            } elseif (isset($_SESSION['image_resizing']) && $_SESSION['image_resizing'] != 'noresizing') {
                $resize_info = get_lang('Resizing') . '<br />';
                $resize_width = get_lang('Auto') . ' x ';
                $resize_height = get_lang('Auto');
            } else {
                $resize_info = get_lang('NoResizing') . '<br />';
                $resize_width = '';
                $resize_height = '';
            }
            echo '<li class="text-center">';
            echo $image_files_only[$slide] . ' ';
            echo Display::toolbarButton(get_lang('Modify'), 'edit_document.php?' . api_get_cidreq() . '&' . http_build_query(['id' => $row['id'], 'origin' => 'slideshow', 'origin_opt' => $edit_slide_id, 'curdirpath' => $pathurl]), 'edit', 'link', [], false);
            echo '</li>';
            echo '<li class="text-center">' . $width . ' x ' . $height . '</li>';
            echo '<li class="text-center">' . round(filesize($image) / 1024, 2) . ' KB - ' . $ext . '</li>';
            echo '<li class="text-center">' . $resize_info . '</li>';
            echo '<li class="text-center">' . $resize_width . '</li>';
            echo '<li class="text-center">' . $resize_height . '</li>';
            echo '</ul>';
        }
    } else {
        Display::display_warning_message(get_lang('FileNotFound'));
    }
} else {
    if ($slide_id != 'all') {
        Display::display_warning_message(get_lang('NoDataAvailable'));
    }
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:slideshow.php

示例9: array

$interbreadcrumb[] = array('url' => 'profile.php', 'name' => get_lang('SocialNetwork'));
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Friends'));
//Block Social Menu
$social_menu_block = SocialManager::show_social_menu('friends');
$user_id = api_get_user_id();
$name_search = isset($_POST['search_name_q']) ? $_POST['search_name_q'] : null;
$number_friends = 0;
if (isset($name_search) && $name_search != 'undefined') {
    $friends = SocialManager::get_friends($user_id, null, $name_search);
} else {
    $friends = SocialManager::get_friends($user_id);
}
$social_right_content = '<div class="col-md-12">';
if (count($friends) == 0) {
    $social_right_content .= Display::return_message(Display::tag('p', get_lang('NoFriendsInYourContactList')), 'warning', false);
    $social_right_content .= Display::toolbarButton(get_lang('TryAndFindSomeFriends'), 'search.php', 'search', 'success');
} else {
    $filterForm = new FormValidator('filter');
    $filterForm->addText('id_search_image', get_lang('Search'), false, ['onkeyup' => 'search_image_social()', 'id' => 'id_search_image']);
    $social_right_content .= $filterForm->returnForm();
    $friend_html = '<div id="friends" class="row">';
    $number_friends = count($friends);
    $j = 0;
    for ($k = 0; $k < $number_friends; $k++) {
        while ($j < $number_friends) {
            if (isset($friends[$j])) {
                $friend = $friends[$j];
                $user_name = api_xml_http_response_encode($friend['firstName'] . ' ' . $friend['lastName']);
                $userPicture = UserManager::getUserPicture($friend['friend_user_id']);
                $friend_html .= '
                    <div class="col-md-3">
开发者ID:feroli1000,项目名称:chamilo-lms,代码行数:31,代码来源:friends.php

示例10: api_get_path

    $actionsLeft .= '<a href="' . api_get_path(WEB_CODE_PATH) . 'work/add_document.php?' . api_get_cidreq() . '&id=' . $workId . '">';
    $actionsLeft .= Display::return_icon('new_document.png', get_lang('AddDocument'), '', ICON_SIZE_MEDIUM) . '</a>';
    $actionsLeft .= '<a href="' . api_get_path(WEB_CODE_PATH) . 'work/add_user.php?' . api_get_cidreq() . '&id=' . $workId . '">';
    $actionsLeft .= Display::return_icon('addworkuser.png', get_lang('AddUsers'), '', ICON_SIZE_MEDIUM) . '</a>';
    $actionsLeft .= '<a href="' . api_get_path(WEB_CODE_PATH) . 'work/work_list_all.php?' . api_get_cidreq() . '&id=' . $workId . '&action=export_pdf">';
    $actionsLeft .= Display::return_icon('pdf.png', get_lang('Export'), '', ICON_SIZE_MEDIUM) . '</a>';
    $display_output = '<a href="' . api_get_path(WEB_CODE_PATH) . 'work/work_missing.php?' . api_get_cidreq() . '&id=' . $workId . '&amp;list=without">' . Display::return_icon('exercice_uncheck.png', get_lang('ViewUsersWithoutTask'), '', ICON_SIZE_MEDIUM) . "</a>";
    $count = get_count_work($workId);
    if ($count > 0) {
        $display_output .= '<a href="downloadfolder.inc.php?id=' . $workId . '&' . api_get_cidreq() . '">' . Display::return_icon('save_pack.png', get_lang('Save'), null, ICON_SIZE_MEDIUM) . '</a>';
    }
    $actionsLeft .= $display_output;
    $actionsLeft .= '<a href="' . api_get_path(WEB_CODE_PATH) . 'work/edit_work.php?' . api_get_cidreq() . '&id=' . $workId . '">';
    $actionsLeft .= Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_MEDIUM) . '</a>';
    $url = api_get_path(WEB_CODE_PATH) . 'work/upload_corrections.php?' . api_get_cidreq() . '&id=' . $workId;
    $actionsLeft .= Display::toolbarButton(get_lang('UploadCorrections'), $url, 'upload', 'success');
}
echo Display::toolbarAction('toolbar-worklist', array(0 => $actionsLeft));
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'])) {
    $contentWork = Security::remove_XSS($my_folder_data['description']);
    $html = '';
    $html .= Display::panel($contentWork, get_lang('Description'));
    echo $html;
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:work_list_all.php

示例11: api_get_patth

$i = $total_score = $max_score = 0;
//We check if the user attempts before sending to the exercise_result.php
if ($objExercise->selectAttempts() > 0) {
    $attempt_count = Event::get_attempt_count(api_get_user_id(), $objExercise->id, $learnpath_id, $learnpath_item_id, $learnpath_item_view_id);
    if ($attempt_count >= $objExercise->selectAttempts()) {
        Display::display_warning_message(sprintf(get_lang('ReachedMaxAttempts'), $objExercise->selectTitle(), $objExercise->selectAttempts()), false);
        if ($origin != 'learnpath') {
            //we are not in learnpath tool
            Display::display_footer();
        }
        exit;
    } else {
        $attempt_count++;
        $remainingAttempts = $objExercise->selectAttempts() - $attempt_count;
        if ($remainingAttempts) {
            $attemptButton = Display::toolbarButton(get_lang('AnotherAttempt'), api_get_patth(WEB_CODE_PATH) . 'exercice/overview.php?' . api_get_cidreq() . '&' . http_build_query(['exerciseId' => $objExercise->id]), 'pencil-square-o', 'info');
            $attemptMessage = sprintf(get_lang('RemainingXAttempts'), $remainingAttempts);
            Display::display_normal_message(sprintf("<p>%s</p> %s", $attemptMessage, $attemptButton), false);
        }
    }
}
$total_score = 0;
if (!empty($exercise_stat_info)) {
    $total_score = $exercise_stat_info['exe_result'];
}
$max_score = $objExercise->get_max_score();
Display::display_normal_message(get_lang('Saved') . '<br />', false);
// Display and save questions
ExerciseLib::display_question_list_by_attempt($objExercise, $exe_id, true);
//Unset session for clock time
ExerciseLib::exercise_time_control_delete($objExercise->id, $learnpath_id, $learnpath_item_id);
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:exercise_result.php

示例12: get_lang

         } else {
             $dsp_order .= Display::url(Display::return_icon('down.png', get_lang('MoveDown'), '', ICON_SIZE_SMALL), "lp_controller.php?" . api_get_cidreq() . "&action=move_lp_down&lp_id={$id}");
             $dsp_order .= Display::url(Display::return_icon('up.png', get_lang('MoveUp'), '', ICON_SIZE_SMALL), "lp_controller.php?" . api_get_cidreq() . "&action=move_lp_up&lp_id={$id}");
         }
     }
     if ($is_allowed_to_edit) {
         $start_time = $start_time;
         $end_time = $end_time;
     } else {
         $start_time = $end_time = '';
     }
     if (api_get_setting('gamification_mode') == 1) {
         if ($details['seriousgame_mode'] == 0) {
             $actionSeriousGame = Display::toolbarButton(null, api_get_self() . '?' . api_get_cidreq() . "&lp_id={$id}&action=toggle_seriousgame", 'trophy', 'default', ['class' => 'btn-xs', 'title' => get_lang('EnableGamificationMode')]);
         } else {
             $actionSeriousGame = Display::toolbarButton(null, api_get_self() . '?' . api_get_cidreq() . "&lp_id={$id}&action=toggle_seriousgame", 'trophy', 'warning', ['class' => 'btn-xs active', 'title' => get_lang('DisableGamificationMode')]);
         }
     }
 } else {
     // Student
     $export_icon = Display::url(Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_SMALL), api_get_self() . '?' . api_get_cidreq() . "&action=export_to_pdf&lp_id={$id}");
 }
 $hideScormExportLink = api_get_setting('hide_scorm_export_link');
 if ($hideScormExportLink === 'true') {
     $dsp_disk = null;
 }
 $hideScormCopyLink = api_get_setting('hide_scorm_copy_link');
 if ($hideScormCopyLink === 'true') {
     $copy = null;
 }
 $hideScormPdfLink = api_get_setting('hide_scorm_pdf_link');
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:lp_list.php

示例13: api_get_navigator

}
if ($show_web_odf) {
    $browser = api_get_navigator();
    $pdfUrl = api_get_path(WEB_LIBRARY_PATH) . 'javascript/ViewerJS/index.html#' . $file_url;
    if ($browser['name'] == 'Mozilla' && preg_match('|.*\\.pdf|i', $header_file)) {
        $pdfUrl = $file_url;
    }
    echo '<div id="viewerJS">';
    echo '<iframe id="viewerJSContent" frameborder="0" allowfullscreen="allowfullscreen" webkitallowfullscreen style="width:100%;"
            src="' . $pdfUrl . '">
        </iframe>';
    echo '</div>';
} elseif (!$originIsLearnpath) {
    // ViewerJS already have download button
    echo '<p>';
    echo Display::toolbarButton(get_lang('Download'), $file_url_web, 'download', 'default', ['target' => '_blank']);
    echo '</p>';
}
echo '</div>';
if ($jplayer_supported) {
    echo DocumentManager::generate_video_preview($document_data);
    // media_element blocks jplayer disable it
    //Display::$global_template->assign('show_media_element', 0);
}
if ($is_freemind_available) {
    echo api_get_js('js/swfobject/swfobject.js');
    ?>
    <style type="text/css">
        #flashcontent {
            height: 500px;
            padding-top:10px;
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:showinframes.php

示例14: get_lang

    $socialInvitationsBlock .= Display::panel($invitationSentHtml, get_lang('InvitationSent'));
}
if (count($pending_invitations) > 0) {
    $new_invitation = array();
    $waitingInvitation = '';
    foreach ($pending_invitations as $invitation) {
        $picture = $userGroup->get_picture_group($invitation['id'], $invitation['picture'], 80);
        $img = '<img class="social-groups-image" src="' . $picture['file'] . '" />';
        $invitation['picture_uri'] = '<a href="group_view.php?id=' . $invitation['id'] . '">' . $img . '</a>';
        $invitation['name'] = '<a href="group_view.php?id=' . $invitation['id'] . '">' . cut($invitation['name'], 120, true) . '</a>';
        $invitation['description'] = cut($invitation['description'], 220, true);
        $new_invitation[] = $invitation;
        $waitingInvitation .= '<div class="well"><div class="row">';
        $waitingInvitation .= '<div class="col-md-3">' . $invitation['picture_uri'] . '</div>';
        $waitingInvitation .= '<div class="col-md-9">';
        $waitingInvitation .= '<h4 class="tittle-profile">' . $invitation['name'] . '</h4>';
        $waitingInvitation .= '<div class="description-group">' . $invitation['description'] . '</div>';
        $waitingInvitation .= '<div class="btn-group" role="group">';
        $waitingInvitation .= Display::toolbarButton(get_lang('AcceptInvitation'), api_get_path(WEB_CODE_PATH) . 'social/invitations.php?' . http_build_query(['accept' => $invitation['id']]), 'check', 'success', ['id' => 'accept-invitation-' . $invitation['id']]);
        $waitingInvitation .= Display::toolbarButton(get_lang('DenyInvitation'), api_get_path(WEB_CODE_PATH) . 'social/invitations.php?' . http_build_query(['deny' => $invitation['id']]), 'times', 'danger', ['id' => 'deny-invitation-' . $invitation['id']]);
        $waitingInvitation .= '</div>';
        $waitingInvitation .= '</div></div>';
    }
    $socialInvitationsBlock .= Display::panel($waitingInvitation, get_lang('GroupsWaitingApproval'));
}
$tpl = \Chamilo\CoreBundle\Framework\Container::getTwig();
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'invitations');
$tpl->addGlobal('social_menu_block', $social_menu_block);
$tpl->addGlobal('social_invitations_block', $socialInvitationsBlock);
$tpl->addGlobal('content', $content);
echo $tpl->render('@template_style/social/invitations.html.twig');
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:invitations.php

示例15: api_get_user_info

 * @package chamilo.plugin.buycourses
 */
/**
 * Initialization
 */
$cidReset = true;
require_once '../../../main/inc/global.inc.php';
$plugin = BuyCoursesPlugin::create();
$includeSessions = $plugin->get('include_sessions') === 'true';
$userInfo = api_get_user_info();
$productTypes = $plugin->getProductTypes();
$saleStatuses = $plugin->getSaleStatuses();
$paymentTypes = $plugin->getPaymentTypes();
$sales = $plugin->getSaleListByUserId($userInfo['id']);
$saleList = [];
foreach ($sales as $sale) {
    if ($sale['product_type'] == 2) {
        $saleList[] = ['id' => $sale['id'], 'reference' => $sale['reference'], 'date' => api_format_date($sale['date'], DATE_TIME_FORMAT_LONG_24H), 'currency' => $sale['iso_code'], 'price' => $sale['price'], 'product_name' => $sale['product_name'], 'product_type' => $productTypes[$sale['product_type']], 'payment_type' => $paymentTypes[$sale['payment_type']]];
    }
}
$toolbar = Display::toolbarButton($plugin->get_lang('CourseListOnSale'), 'course_catalog.php', 'search-plus', 'primary', ['title' => $plugin->get_lang('CourseListOnSale')]);
$templateName = get_lang('TabsDashboard');
$tpl = new Template($templateName);
$tpl->assign('showing_courses', true);
$tpl->assign('sessions_are_included', $includeSessions);
$tpl->assign('sale_list', $saleList);
$content = $tpl->fetch('buycourses/view/session_panel.tpl');
$tpl->assign('actions', $toolbar);
$tpl->assign('header', $templateName);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:session_panel.php


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