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


PHP html_writer::end_div方法代码示例

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


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

示例1: display_options_adv

 /**
  * Print HTML to display the "Also show old questions" checkbox
  */
 public function display_options_adv()
 {
     echo \html_writer::start_div();
     echo \html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'showhidden', 'value' => '0', 'id' => 'showhidden_off'));
     echo \html_writer::checkbox('showhidden', '1', !$this->hide, get_string('showhidden', 'question'), array('id' => 'showhidden_on', 'class' => 'searchoptions'));
     echo \html_writer::end_div() . "\n";
 }
开发者ID:evltuma,项目名称:moodle,代码行数:10,代码来源:hidden_condition.php

示例2: edit_page

    /**
     * Render the edit page
     *
     * @param \quiz $quizobj object containing all the quiz settings information.
     * @param structure $structure object containing the structure of the quiz.
     * @param \question_edit_contexts $contexts the relevant question bank contexts.
     * @param \moodle_url $pageurl the canonical URL of this page.
     * @param array $pagevars the variables from {@link question_edit_setup()}.
     * @return string HTML to output.
     */
    public function edit_page(\quiz $quizobj, structure $structure,
            \question_edit_contexts $contexts, \moodle_url $pageurl, array $pagevars) {
        $output = '';

        // Page title.
        $output .= $this->heading_with_help(get_string('editingquizx', 'quiz',
                format_string($quizobj->get_quiz_name())), 'editingquiz', 'quiz', '',
                get_string('basicideasofquiz', 'quiz'), 2);

        // Information at the top.
        $output .= $this->quiz_state_warnings($structure);
        $output .= $this->quiz_information($structure);
        $output .= $this->maximum_grade_input($structure, $pageurl);
        $output .= $this->repaginate_button($structure, $pageurl);
        $output .= $this->total_marks($quizobj->get_quiz());

        // Show the questions organised into sections and pages.
        $output .= $this->start_section_list($structure);

        foreach ($structure->get_sections() as $section) {
            $output .= $this->start_section($structure, $section);
            $output .= $this->questions_in_section($structure, $section, $contexts, $pagevars, $pageurl);

            if ($structure->is_last_section($section)) {
                $output .= \html_writer::start_div('last-add-menu');
                $output .= html_writer::tag('span', $this->add_menu_actions($structure, 0,
                        $pageurl, $contexts, $pagevars), array('class' => 'add-menu-outer'));
                $output .= \html_writer::end_div();
            }

            $output .= $this->end_section();
        }

        $output .= $this->end_section_list();

        // Initialise the JavaScript.
        $this->initialise_editing_javascript($structure, $contexts, $pagevars, $pageurl);

        // Include the contents of any other popups required.
        if ($structure->can_be_edited()) {
            $popups = '';

            $popups .= $this->question_bank_loading();
            $this->page->requires->yui_module('moodle-mod_quiz-quizquestionbank',
                    'M.mod_quiz.quizquestionbank.init',
                    array('class' => 'questionbank', 'cmid' => $structure->get_cmid()));

            $popups .= $this->random_question_form($pageurl, $contexts, $pagevars);
            $this->page->requires->yui_module('moodle-mod_quiz-randomquestion',
                    'M.mod_quiz.randomquestion.init');

            $output .= html_writer::div($popups, 'mod_quiz_edit_forms');

            // Include the question chooser.
            $output .= $this->question_chooser();
            $this->page->requires->yui_module('moodle-mod_quiz-questionchooser', 'M.mod_quiz.init_questionchooser');
        }

        return $output;
    }
开发者ID:JuliaGolutvina,项目名称:moodle,代码行数:70,代码来源:edit_renderer.php

示例3: detail_pair

 protected function detail_pair($key, $value, $class = '')
 {
     $html = html_writer::start_div('detail-pair row ' . preg_replace('#[^a-zA-Z0-9_\\-]#', '-', $class));
     $html .= html_writer::div(html_writer::span($key), 'pair-key col-sm-3');
     $html .= html_writer::div(html_writer::span($value), 'pair-value col-sm-9');
     $html .= html_writer::end_div();
     return $html;
 }
开发者ID:adonm,项目名称:learning,代码行数:8,代码来源:course_management.php

示例4: detail_pair

 /**
  * Renderers a key value pair of information for display.
  *
  * @param string $key
  * @param string $value
  * @param string $class
  * @return string
  */
 protected function detail_pair($key, $value, $class = '')
 {
     $html = html_writer::start_div('detail-pair row yui3-g ' . preg_replace('#[^a-zA-Z0-9_\\-]#', '-', $class));
     $html .= html_writer::div(html_writer::span($key), 'pair-key span4 yui3-u-1-4');
     $html .= html_writer::div(html_writer::span($value), 'pair-value span8 yui3-u-3-4');
     $html .= html_writer::end_div();
     return $html;
 }
开发者ID:igormateus,项目名称:moodle-theme_essential,代码行数:16,代码来源:core_course_management_renderer.php

示例5: log_display

 /**
  * The backup and restore pages may display a log (if any) in a scrolling box.
  *
  * @param string $loghtml Log content in HTML format
  * @return string HTML content that shows the log
  */
 public function log_display($loghtml)
 {
     global $OUTPUT;
     $out = html_writer::start_div('backup_log');
     $out .= $OUTPUT->heading(get_string('backuplog', 'backup'));
     $out .= html_writer::start_div('backup_log_contents');
     $out .= $loghtml;
     $out .= html_writer::end_div();
     $out .= html_writer::end_div();
     return $out;
 }
开发者ID:covex-nn,项目名称:moodle,代码行数:17,代码来源:renderer.php

示例6: render_library_content

 public function render_library_content($config, $id)
 {
     $this->page->requires->js('/blocks/library/module.js');
     $html = html_writer::start_div('library-block');
     // Build the Header.
     $headerimage = html_writer::empty_tag('img', array('src' => '/blocks/library/pix/library-banner.jpg'));
     $header = html_writer::link(get_string('universityhomelink', 'block_library'), $headerimage, array('target' => '_blank'));
     $header .= html_writer::link(get_string('libraryloginlink', 'block_library'), get_string('librarylogin', 'block_library'), array('class' => 'my-account', 'target' => '_blank'));
     // Library search.
     if (empty($config) || $config->enablesearch == 1) {
         $search = '';
         $search .= html_writer::start_tag('form', array('onsubmit' => 'return M.block_library.ebscoHostSearchGo(this);', 'id' => 'ebscohostCustomSearchBox', 'class' => 'searcher', 'name' => 'ebscoSearch', 'method' => 'post'));
         $search .= html_writer::tag('input', '', array('id' => 'ebscohostwindow', 'name' => 'ebscohostwindow', 'type' => 'hidden', 'value' => '0'));
         $search .= html_writer::tag('input', '', array('id' => 'ebscohosturl', 'name' => 'ebscohosturl', 'type' => 'hidden', 'value' => get_string('ebscohosturl', 'block_library')));
         $search .= html_writer::tag('input', '', array('id' => 'ebscohostsearchsrc', 'name' => 'ebscohostsearchsrc', 'type' => 'hidden', 'value' => 'db'));
         $search .= html_writer::tag('input', '', array('id' => 'ebscohostsearchmode', 'name' => 'ebscohostsearchmode', 'type' => 'hidden', 'value' => '+'));
         $search .= html_writer::tag('input', '', array('id' => 'ebscohostkeywords', 'name' => 'ebscohostkeywords', 'type' => 'hidden'));
         $search .= html_writer::tag('input', '', array('id' => 'oversizeNiceInput', 'name' => 'ebscohostsearchtext', 'type' => 'text', 'class' => 'oversize input-text front', 'title' => get_string('searchtip', 'block_library'), 'placeholder' => get_string('findbooks', 'block_library')));
         $search .= html_writer::tag('button', get_string('searchbuttontext', 'block_library'), array('type' => 'submit', 'value' => 'Search', 'class' => 'lib_button mleft', 'onclick' => '_gaq.push([\'_trackEvent\', \'eds\', \'clicked\'])'));
         $search .= html_writer::end_tag('form');
     }
     $html .= $header;
     $html .= $search;
     //  Library Links.
     if (empty($config) || $config->enablelibrarylinks == 1) {
         $llinks = '';
         $llinks .= html_writer::tag('div', get_string('library_links', 'block_library'), array('class' => 'library-links'));
         $html .= $llinks;
     }
     // Course links.
     if (!empty($config->enablecourselinks) && $config->enablecourselinks == 1 && !empty($config->rawhtml['text'])) {
         $clinks = '';
         $clinks .= html_writer::start_tag('div');
         $clinks .= html_writer::tag('p', get_string('librarycourse', 'block_library'), array('class' => 'library-coursetitle'));
         $clinks .= $config->rawhtml['text'];
         $clinks .= html_writer::end_tag('div');
         $html .= $clinks;
     }
     // Build the footer content.
     $listitems = array();
     $askcontent = '';
     if (empty($config) || $config->enableaskbubble == 1) {
         $listitems[] = html_writer::link(get_string('asklibrarystafflink', 'block_library'), get_string('asklibrarystaff', 'block_library'), array('class' => 'ask-main', 'target' => '_blank'));
         $listitems[] = html_writer::link(get_string('asklibrarystafflink', 'block_library'), get_string('textstaff', 'block_library'), array('target' => '_blank'));
         $listitems[] = html_writer::link(get_string('chatwithstafflink', 'block_library'), get_string('chatwithstaff', 'block_library'), array('target' => '_blank'));
         $listitems[] = html_writer::link(get_string('emailstafflink', 'block_library'), get_string('emailstaff', 'block_library'), array('target' => '_blank'));
         $listitems[] = html_writer::link(get_string('asklibrarystafflink', 'block_library'), get_string('phonestaff', 'block_library'), array('class' => 'last', 'target' => '_blank'));
         $askcontent = html_writer::alist($listitems, array('class' => 'ask'));
     }
     $footer = html_writer::tag('div', $askcontent, array('class' => 'library-bottom'));
     $html .= $footer;
     $html .= html_writer::end_div();
     return $html;
 }
开发者ID:MoodleMetaData,项目名称:MoodleMetaData,代码行数:54,代码来源:renderer.php

示例7: full_header

 public function full_header()
 {
     $html = html_writer::start_tag('header', array('id' => 'page-header', 'class' => 'clearfix'));
     $html .= html_writer::start_div('clearfix', array('id' => 'page-navbar'));
     $html .= html_writer::tag('nav', $this->navbar(), array('class' => 'breadcrumb-nav'));
     $html .= html_writer::div($this->page_heading_button(), 'breadcrumb-button');
     $html .= html_writer::end_div();
     $html .= html_writer::tag('div', $this->course_header(), array('id' => 'course-header'));
     $html .= html_writer::end_tag('header');
     return $html;
 }
开发者ID:xow,项目名称:moodle-theme_shiny,代码行数:11,代码来源:core_renderer.php

示例8: search_form

 public function search_form(moodle_url $formtarget, $searchvalue)
 {
     $content = html_writer::start_tag('form', array('class' => 'adminsearchform', 'method' => 'get', 'action' => $formtarget, 'role' => 'search'));
     $content .= html_writer::start_div('input-group');
     $content .= html_writer::empty_tag('input', array('id' => 'adminsearchquery', 'type' => 'text', 'name' => 'query', 'class' => 'form-control', 'placeholder' => s(get_string('searchinsettings', 'admin')), 'value' => s($searchvalue)));
     $content .= html_writer::start_span('input-group-btn');
     $content .= html_writer::tag('button', s(get_string('go')), array('type' => 'button', 'class' => 'btn btn-default'));
     $content .= html_writer::end_span();
     $content .= html_writer::end_div();
     $content .= html_writer::end_tag('form');
     return $content;
 }
开发者ID:noelchavez,项目名称:moodle-theme_elegance,代码行数:12,代码来源:block_settings_renderer.php

示例9: eclass_header

 public function eclass_header($columns)
 {
     global $CFG, $SITE;
     $output = html_writer::start_tag('header', array("role" => "banner", "class" => "navbar navbar-fixed-top moodle-has-zindex"));
     $output .= html_writer::start_tag('nav', array("role" => "navigation", "class" => "navbar-inner"));
     $output .= html_writer::start_div("container-fluid");
     $output .= html_writer::tag('img', '', array("src" => $this->pix_url('ua-logo', 'theme'), "class" => "uofa-logo", "height" => "40px"));
     $output .= html_writer::link($CFG->wwwroot, $SITE->shortname, array("class" => "brand"));
     $output .= html_writer::end_div();
     $output .= html_writer::end_tag('nav');
     $output .= html_writer::end_tag('header');
     return $output;
 }
开发者ID:MoodleMetaData,项目名称:MoodleMetaData,代码行数:13,代码来源:core_renderer_maintenance.php

示例10: edit_page

 /**
  * Render the edit page
  *
  * @param \offlinequiz $offlinequizobj object containing all the offlinequiz settings information.
  * @param structure $structure object containing the structure of the offlinequiz.
  * @param \question_edit_contexts $contexts the relevant question bank contexts.
  * @param \moodle_url $pageurl the canonical URL of this page.
  * @param array $pagevars the variables from {@link question_edit_setup()}.
  * @return string HTML to output.
  */
 public function edit_page(\offlinequiz $offlinequizobj, structure $structure, \question_edit_contexts $contexts, \moodle_url $pageurl, array $pagevars, array $groupletters)
 {
     $offlinequiz = $offlinequizobj->get_offlinequiz();
     $output = '';
     // Page title.
     $output .= $this->heading_with_help(get_string('editingofflinequizx', 'offlinequiz', format_string($offlinequizobj->get_offlinequiz_name())) . ' (' . get_string('group', 'offlinequiz') . ' ' . $groupletters[$offlinequiz->groupnumber] . ') ', 'editingofflinequiz', 'offlinequiz', '', get_string('basicideasofofflinequiz', 'offlinequiz'), 2);
     // Information at the top.
     $output .= $this->offlinequiz_group_selector($offlinequiz, $pageurl);
     $output .= $this->offlinequiz_information($structure);
     $output .= $this->maximum_grade_input($offlinequiz, $this->page->url);
     $output .= $this->offlinequiz_state_warnings($structure);
     $output .= $this->repaginate_button($structure, $pageurl, $offlinequiz);
     $output .= $this->total_marks($offlinequiz);
     // Start form for question checkboxes
     $output .= $this->start_add_to_group_form($offlinequiz, $pageurl);
     // Add buttons for adding selected to another group and for removing selected.
     $output .= $this->add_to_group_button($structure, $offlinequiz, $pageurl);
     $output .= $this->remove_selected_button($structure, $offlinequiz, $pageurl);
     $output .= $this->select_all_links($structure);
     // Show the questions organised into sections and pages.
     $output .= $this->start_section_list();
     $sections = $structure->get_offlinequiz_sections();
     $lastsection = end($sections);
     foreach ($sections as $section) {
         $output .= $this->start_section($section);
         $output .= $this->questions_in_section($structure, $section, $contexts, $pagevars, $pageurl);
         if ($section === $lastsection) {
             $output .= \html_writer::start_div('last-add-menu');
             $output .= html_writer::tag('span', $this->add_menu_actions($structure, 0, $pageurl, $contexts, $pagevars), array('class' => 'add-menu-outer'));
             $output .= \html_writer::end_div();
         }
         $output .= $this->end_section();
     }
     $output .= $this->end_section_list();
     $output .= $this->end_add_to_group_form();
     // Inialise the JavaScript.
     $this->initialise_editing_javascript($offlinequizobj->get_course(), $offlinequizobj->get_offlinequiz(), $structure, $contexts, $pagevars, $pageurl);
     // Include the contents of any other popups required.
     if ($structure->can_be_edited()) {
         $popups = '';
         $popups .= $this->question_bank_loading();
         $this->page->requires->yui_module('moodle-mod_offlinequiz-offlinequizquestionbank', 'M.mod_offlinequiz.offlinequizquestionbank.init', array('class' => 'questionbank', 'cmid' => $structure->get_cmid()));
         $popups .= $this->random_question_form($pageurl, $contexts, $pagevars);
         $this->page->requires->yui_module('moodle-mod_offlinequiz-randomquestion', 'M.mod_offlinequiz.randomquestion.init');
         $output .= html_writer::div($popups, 'mod_offlinequiz_edit_forms');
         // Include the question chooser.
         $output .= $this->question_chooser();
         $this->page->requires->yui_module('moodle-mod_offlinequiz-questionchooser', 'M.mod_offlinequiz.init_questionchooser');
     }
     return $output;
 }
开发者ID:frankkoch,项目名称:moodle-mod_offlinequiz,代码行数:61,代码来源:edit_renderer.php

示例11: eclass_header

 public function eclass_header($columns)
 {
     global $CFG, $SITE;
     $output = html_writer::start_tag('header', array("role" => "banner", "class" => "navbar navbar-fixed-top moodle-has-zindex"));
     $output .= html_writer::start_tag('nav', array("role" => "navigation", "class" => "navbar-inner"));
     $output .= html_writer::start_div("container-fluid");
     $output .= html_writer::tag('img', '', array("src" => $this->pix_url('ua-logo', 'theme'), "class" => "uofa-logo", "height" => "40px"));
     $output .= html_writer::div(html_writer::link($CFG->wwwroot, $SITE->shortname, array("class" => "brand")), 'nav-brand');
     $output .= html_writer::start_div("pull-right");
     $output .= $this->custom_menu();
     $headingmenu = $this->page_heading_menu();
     $output .= html_writer::alist(array($headingmenu), array("class" => "nav pull-right"));
     $output .= html_writer::div(html_writer::span('', "glyphicons collapse_top"), "scroll-top pull-right", array("title" => "Scroll to top"));
     $output .= $this->login_info();
     $output .= html_writer::end_div();
     $output .= html_writer::end_div();
     $output .= html_writer::end_tag('nav');
     // Mobile stuff.
     $toggleleft = '<li><label class="toggle toggle-navigation"   for="toggle-left" onclick>' . '<div class="mobile-nav-icon glyphicons list"></div><span>Navigation</span></label></li>';
     $togglecenter = '<li><label class="toggle toggle-content" for="toggle-center" onclick>' . '<div class="mobile-nav-icon glyphicons book"></div><span>Content</span></label></li>';
     $toggleright = '';
     if ($this->page->blocks->region_has_content('side-post', $this)) {
         $toggleright = '<li><label class="toggle toggle-blocks"  for="toggle-right" onclick>' . '<div class="mobile-nav-icon glyphicons show_big_thumbnails"></div><span>Blocks</span></label></li>';
     }
     $toggleprofile = '<li><label class="toggle toggle-profile"  for="toggle-profile" onclick>' . '<div class="mobile-nav-icon glyphicons user"></div><span>Profile</span></label></li>';
     switch ($columns) {
         default:
         case 1:
             $togglelist = $togglecenter . $toggleprofile;
             break;
         case 2:
             $togglelist = $toggleleft . $togglecenter . $toggleprofile;
             break;
         case 3:
             $togglelist = $toggleleft . $togglecenter . $toggleright . $toggleprofile;
             break;
     }
     $togglelist .= html_writer::div('', 'active-indicator');
     $output .= html_writer::start_tag('nav', array("class" => "mobile-nav"));
     $output .= html_writer::tag('ul', $togglelist, array("class" => "view-selector"));
     $output .= html_writer::end_tag('nav');
     $output .= html_writer::end_tag('header');
     return $output;
 }
开发者ID:MoodleMetaData,项目名称:MoodleMetaData,代码行数:44,代码来源:core_renderer.php

示例12: output_html

 /**
  * Returns XHTML select field and wrapping div(s)
  *
  * @see output_select_html()
  *
  * @param string $data the option to show as selected
  * @param string $query
  * @return string XHTML field and wrapping div
  */
 public function output_html($data, $query = '')
 {
     $html = '';
     $baseid = $this->get_id();
     $inputname = $this->get_full_name();
     foreach ($this->flowtypes as $flowtype) {
         $html .= \html_writer::start_div();
         $flowtypeid = $baseid . '_' . $flowtype;
         $radioattrs = ['type' => 'radio', 'name' => $inputname, 'id' => $flowtypeid, 'value' => $flowtype];
         if ($data === $flowtype || empty($data) && $flowtype === $this->get_defaultsetting()) {
             $radioattrs['checked'] = 'checked';
         }
         $typename = get_string('cfg_loginflow_' . $flowtype, 'auth_oidc');
         $typedesc = get_string('cfg_loginflow_' . $flowtype . '_desc', 'auth_oidc');
         $html .= \html_writer::empty_tag('input', $radioattrs);
         $html .= \html_writer::label($typename, $flowtypeid, false);
         $html .= '<br />';
         $html .= \html_writer::span($typedesc);
         $html .= '<br /><br />';
         $html .= \html_writer::end_div();
     }
     return format_admin_setting($this, $this->visiblename, $html, $this->description, true, '', null, $query);
 }
开发者ID:eugeneventer,项目名称:o365-moodle,代码行数:32,代码来源:loginflow.php

示例13: get_grade_publishing_url

 /**
  * Create the html code of the grade publishing feature.
  *
  * @return string $output html code of the grade publishing.
  */
 public function get_grade_publishing_url()
 {
     $url = $this->get_export_url();
     $output = html_writer::start_div();
     $output .= html_writer::tag('p', get_string('gradepublishinglink', 'grades', html_writer::link($url, $url)));
     $output .= html_writer::end_div();
     return $output;
 }
开发者ID:elie89,项目名称:moodle,代码行数:13,代码来源:lib.php

示例14: displaydir


//.........这里部分代码省略.........
                    echo html_writer::start_tag('form', array('action' => 'morslefiles.php', 'method' => 'get'));
                    echo html_writer::tag('input', '', array('type' => 'hidden', 'name' => 'choose', 'value' => $choose));
                    echo html_writer::tag('input', '', array('type' => 'hidden', 'name' => 'courseid', 'value' => $courseid));
                    echo html_writer::tag('input', '', array('type' => 'hidden', 'name' => 'wdir', 'value' => $wdir));
                    echo html_writer::tag('input', '', array('type' => 'hidden', 'name' => 'action', 'value' => 'makedir'));
                    echo html_writer::tag('input', '', array('type' => 'submit', 'value' => $strmakeafolder));
                    echo html_writer::end_tag('form');
                }
                echo html_writer::end_tag('td');
                echo html_writer::end_tag('tr');
            }
        }
    }
    echo html_writer::start_tag('form', array('action' => 'morslefiles.php', 'method' => 'post', 'id' => 'dirform'));
    echo html_writer::start_div();
    echo html_writer::tag('input', '', array('type' => 'hidden', 'name' => 'choose', 'value' => $choose));
    echo html_writer::start_tag('tr');
    echo html_writer::start_tag('th', array('class' => 'header', 'scope' => 'col', 'style' => 'max-width:40px;'));
    echo html_writer::tag('input', '', array('type' => 'hidden', 'name' => 'courseid', 'value' => $courseid));
    echo html_writer::tag('input', '', array('type' => 'hidden', 'name' => 'choose', 'value' => $choose));
    echo html_writer::tag('input', '', array('type' => 'hidden', 'name' => 'wdir', 'value' => $wdir));
    echo html_writer::tag('input', '', array('type' => 'hidden', 'name' => 'sesskey', 'value' => $USER->sesskey));
    //      $options = array ("delete" => "$strdeletefromcollection");
    // only editing teachers can link items to course page
    if (has_capability('moodle/course:update', $coursecontext)) {
        $options['link'] = "{$strlinktocourse}";
    }
    if (!empty($filelist) || !empty($dirlist)) {
        //        echo html_writer::tag('label', "$strwithchosenfiles...", array('for'=>'formactionid'));
        //    	  echo html_writer::select($options, "$strwithchosenfiles...", '', array(1 => "$strwithchosenfiles..."));
        echo html_writer::start_div('', array('id' => 'noscriptgo', 'style' => 'display:inline;'));
        echo html_writer::tag('input', '', array('type' => 'submit', 'value' => get_string('go')));
        echo html_writer::script('document.getElementById("noscriptgo").style.display="none"');
        echo html_writer::end_div();
    }
    echo html_writer::end_tag('th');
    echo html_writer::start_tag('th', array('style' => 'padding-right:120px;', 'class' => 'header name', 'scope' => 'col')) . html_writer::link(qualified_me(), $strname, array('&sort' => '{' . $sortvalues[0] . '}')) . html_writer::end_tag('th');
    echo html_writer::start_tag('th', array('class' => 'header date', 'scope' => 'col')) . html_writer::link(qualified_me(), $strmodified, array('&sort' => '{' . $sortvalues[2] . '}')) . html_writer::end_tag('th');
    echo html_writer::tag('th', $straction, array('class' => 'header commands', 'scope' => 'col'));
    echo html_writer::end_tag('tr') . "\n";
    // Sort parameter indicates column to sort by, and parity gives the direction
    switch ($sort) {
        case 1:
            $sortcmp = 'return strcasecmp($a[0],$b[0]);';
            break;
        case -1:
            $sortcmp = 'return strcasecmp($b[0],$a[0]);';
            break;
        case 2:
            $sortcmp = 'return ($a[1] - $b[1]);';
            break;
        case -2:
            $sortcmp = 'return ($b[1] - $a[1]);';
            break;
        case 3:
            $sortcmp = 'return ($a[2] - $b[2]);';
            break;
        case -3:
            $sortcmp = 'return ($b[2] - $a[2]);';
            break;
    }
    // Create a 2D array of directories and sort
    $dirdetails = array();
    foreach ($dirlist as $name => $dir) {
        $dirdetails[$name] = new stdClass();
        $dirdetails[$name]->updated = docdate($dir);
开发者ID:rlorenzo,项目名称:moodle-block_morsle,代码行数:67,代码来源:morslelib.php

示例15: emarking_show_export_buttons

function emarking_show_export_buttons($issupervisor, $rubriccriteria, $cm, $emarking, $numdraftsgrading)
{
    global $OUTPUT;
    echo html_writer::start_div('exportbuttons');
    // Show export to Excel button if supervisor and there are students to export.
    if ($issupervisor && $rubriccriteria) {
        if ($emarking->type == EMARKING_TYPE_ON_SCREEN_MARKING) {
            echo "<table><tr><td>";
            $csvurl = new moodle_url('view.php', array('id' => $cm->id, 'exportcsv' => 'grades'));
            echo $OUTPUT->single_button($csvurl, get_string('exportgrades', 'mod_emarking'));
            echo "</td><td>";
            $csvurl = new moodle_url('view.php', array('id' => $cm->id, 'enrolment' => 'true'));
            echo $OUTPUT->single_button($csvurl, get_string('showunenrolled', 'mod_emarking'), 'GET');
            echo "</td></tr><table>";
        }
    }
    // Show export to Excel button if supervisor and there are students to export.
    if ($issupervisor && $emarking->type == EMARKING_TYPE_PEER_REVIEW && $numdraftsgrading == 0) {
        $csvurl = new moodle_url('view.php', array('id' => $cm->id, 'reassignpeers' => 'true'));
        echo $OUTPUT->single_button($csvurl, get_string('reassignpeers', 'mod_emarking'));
    }
    if ($numdraftsgrading > 1) {
        echo html_writer::tag("input", null, array("id" => "searchInput", 'value' => get_string("filter")));
    }
    echo html_writer::end_div();
}
开发者ID:sikeze,项目名称:emarking,代码行数:26,代码来源:view.php


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