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


PHP moodleform::display方法代码示例

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


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

示例1: render_stepsdefinitions

 /**
  * Renders the list of available steps according to the submitted filters
  *
  * @param string     $stepsdefinitions HTML from behat with the available steps
  * @param moodleform $form
  * @return string HTML code
  */
 public function render_stepsdefinitions($stepsdefinitions, $form)
 {
     $title = get_string('pluginname', 'tool_behat');
     // Header.
     $html = $this->output->header();
     $html .= $this->output->heading($title);
     // Info.
     $installurl = behat_command::DOCS_URL . '#Installation';
     $installlink = html_writer::tag('a', $installurl, array('href' => $installurl, 'target' => '_blank'));
     $writetestsurl = behat_command::DOCS_URL . '#Writting_features';
     $writetestslink = html_writer::tag('a', $writetestsurl, array('href' => $writetestsurl, 'target' => '_blank'));
     $writestepsurl = behat_command::DOCS_URL . '#Adding_steps_definitions';
     $writestepslink = html_writer::tag('a', $writestepsurl, array('href' => $writestepsurl, 'target' => '_blank'));
     $infos = array(get_string('installinfo', 'tool_behat', $installlink), get_string('newtestsinfo', 'tool_behat', $writetestslink), get_string('newstepsinfo', 'tool_behat', $writestepslink));
     // List of steps
     $html .= $this->output->box_start();
     $html .= html_writer::tag('h1', 'Info');
     $html .= html_writer::empty_tag('div');
     $html .= html_writer::empty_tag('ul');
     $html .= html_writer::empty_tag('li');
     $html .= implode(html_writer::end_tag('li') . html_writer::empty_tag('li'), $infos);
     $html .= html_writer::end_tag('li');
     $html .= html_writer::end_tag('ul');
     $html .= html_writer::end_tag('div');
     $html .= $this->output->box_end();
     // Form.
     ob_start();
     $form->display();
     $html .= ob_get_contents();
     ob_end_clean();
     // Steps definitions.
     $html .= html_writer::tag('div', $stepsdefinitions, array('class' => 'steps-definitions'));
     $html .= $this->output->footer();
     return $html;
 }
开发者ID:Burick,项目名称:moodle,代码行数:42,代码来源:renderer.php

示例2: moodleform

 /**
  * Use this since we can't fetch the output of a moodle form
  * @param moodleform $mform
  * @return type string HTML
  */
 protected function moodleform(moodleform $mform)
 {
     ob_start();
     $mform->display();
     $o = ob_get_contents();
     ob_end_clean();
     return $o;
 }
开发者ID:nateyb93,项目名称:upad-createcourse,代码行数:13,代码来源:renderer.php

示例3: capability_form

 /**
  * Render a formslib form.
  * @param moodleform $form
  * @return string the HTML to output.
  */
 protected function capability_form(moodleform $form)
 {
     ob_start();
     $form->display();
     $output = ob_get_contents();
     ob_end_clean();
     return $output;
 }
开发者ID:Keneth1212,项目名称:moodle,代码行数:13,代码来源:renderer.php

示例4: render_stepsdefinitions

 /**
  * Renders the list of available steps according to the submitted filters.
  *
  * @param mixed $stepsdefinitions Available steps array.
  * @param moodleform $form
  * @return string HTML code
  */
 public function render_stepsdefinitions($stepsdefinitions, $form)
 {
     $title = get_string('pluginname', 'tool_behat');
     // Header.
     $html = $this->output->header();
     $html .= $this->output->heading($title);
     // Info.
     $installurl = behat_command::DOCS_URL . '#Installation';
     $installlink = html_writer::tag('a', $installurl, array('href' => $installurl, 'target' => '_blank'));
     $writetestsurl = behat_command::DOCS_URL . '#Writting_features';
     $writetestslink = html_writer::tag('a', $writetestsurl, array('href' => $writetestsurl, 'target' => '_blank'));
     $writestepsurl = behat_command::DOCS_URL . '#Adding_steps_definitions';
     $writestepslink = html_writer::tag('a', $writestepsurl, array('href' => $writestepsurl, 'target' => '_blank'));
     $infos = array(get_string('installinfo', 'tool_behat', $installlink), get_string('newtestsinfo', 'tool_behat', $writetestslink), get_string('newstepsinfo', 'tool_behat', $writestepslink));
     // List of steps.
     $html .= $this->output->box_start();
     $html .= html_writer::tag('h1', get_string('infoheading', 'tool_behat'));
     $html .= html_writer::tag('div', get_string('aim', 'tool_behat'));
     $html .= html_writer::start_tag('div');
     $html .= html_writer::start_tag('ul');
     $html .= html_writer::start_tag('li');
     $html .= implode(html_writer::end_tag('li') . html_writer::start_tag('li'), $infos);
     $html .= html_writer::end_tag('li');
     $html .= html_writer::end_tag('ul');
     $html .= html_writer::end_tag('div');
     $html .= $this->output->box_end();
     // Form.
     ob_start();
     $form->display();
     $html .= ob_get_contents();
     ob_end_clean();
     if (empty($stepsdefinitions)) {
         $stepsdefinitions = get_string('nostepsdefinitions', 'tool_behat');
     } else {
         $stepsdefinitions = implode('', $stepsdefinitions);
         // Replace text selector type arguments with a user-friendly select.
         $stepsdefinitions = preg_replace_callback('/(TEXT_SELECTOR\\d?_STRING)/', function ($matches) {
             return html_writer::select(behat_selectors::get_allowed_text_selectors(), uniqid());
         }, $stepsdefinitions);
         // Replace selector type arguments with a user-friendly select.
         $stepsdefinitions = preg_replace_callback('/(SELECTOR\\d?_STRING)/', function ($matches) {
             return html_writer::select(behat_selectors::get_allowed_selectors(), uniqid());
         }, $stepsdefinitions);
         // Replace simple OR options.
         $regex = '#\\(\\?P<[^>]+>([^\\)|]+\\|[^\\)]+)\\)#';
         $stepsdefinitions = preg_replace_callback($regex, function ($matches) {
             return html_writer::select(explode('|', $matches[1]), uniqid());
         }, $stepsdefinitions);
     }
     // Steps definitions.
     $html .= html_writer::tag('div', $stepsdefinitions, array('class' => 'steps-definitions'));
     $html .= $this->output->footer();
     return $html;
 }
开发者ID:bobpuffer,项目名称:moodleUCLA-LUTH,代码行数:61,代码来源:renderer.php

示例5: display

 /**
  * Intercept the display of form so can format errors as notifications
  *
  * @global type $OUTPUT
  */
 public function display()
 {
     global $OUTPUT;
     if ($this->_form->_errors) {
         foreach ($this->_form->_errors as $error) {
             echo $OUTPUT->notification($error, 'notifyproblem');
         }
         unset($this->_form->_errors);
     }
     parent::display();
 }
开发者ID:troywilliams,项目名称:moodle-mod_dialogue,代码行数:16,代码来源:formlib.php

示例6: render_stepsdefinitions

    /**
     * Renders the list of available steps according to the submitted filters.
     *
     * @param mixed $stepsdefinitions Available steps array.
     * @param moodleform $form
     * @return string HTML code
     */
    public function render_stepsdefinitions($stepsdefinitions, $form) {

        $html = $this->generic_info();

        // Form.
        ob_start();
        $form->display();
        $html .= ob_get_contents();
        ob_end_clean();

        if (empty($stepsdefinitions)) {
            $stepsdefinitions = get_string('nostepsdefinitions', 'tool_behat');
        } else {

            $stepsdefinitions = implode('', $stepsdefinitions);

            // Replace text selector type arguments with a user-friendly select.
            $stepsdefinitions = preg_replace_callback('/(TEXT_SELECTOR\d?_STRING)/',
                function ($matches) {
                    return html_writer::select(behat_selectors::get_allowed_text_selectors(), uniqid());
                },
                $stepsdefinitions
            );

            // Replace selector type arguments with a user-friendly select.
            $stepsdefinitions = preg_replace_callback('/(SELECTOR\d?_STRING)/',
                function ($matches) {
                    return html_writer::select(behat_selectors::get_allowed_selectors(), uniqid());
                },
                $stepsdefinitions
            );

            // Replace simple OR options.
            $regex = '#\(\?P<[^>]+>([^\)|]+\|[^\)]+)\)#';
            $stepsdefinitions = preg_replace_callback($regex,
                function($matches){
                    return html_writer::select(explode('|', $matches[1]), uniqid());
                },
                $stepsdefinitions
            );

        }

        // Steps definitions.
        $html .= html_writer::tag('div', $stepsdefinitions, array('class' => 'steps-definitions'));

        $html .= $this->output->footer();

        return $html;
    }
开发者ID:rwijaya,项目名称:moodle,代码行数:57,代码来源:renderer.php

示例7: organizer_display_form

function organizer_display_form(moodleform $mform, $title, $addcalendar = true)
{
    global $OUTPUT;
    if ($addcalendar) {
        organizer_add_calendar();
    }
    echo $OUTPUT->header();
    echo $OUTPUT->heading($title);
    echo $OUTPUT->box_start('', 'organizer_main_cointainer');
    $mform->display();
    echo $OUTPUT->box_end();
    echo $OUTPUT->footer();
    die;
}
开发者ID:nmisic,项目名称:moodle-mod_organizer,代码行数:14,代码来源:view_lib.php

示例8: render_stepsdefinitions

 /**
  * Renders the list of available steps according to the submitted filters.
  *
  * @param mixed $stepsdefinitions Available steps array.
  * @param moodleform $form
  * @return string HTML code
  */
 public function render_stepsdefinitions($stepsdefinitions, $form)
 {
     $html = $this->generic_info();
     // Form.
     ob_start();
     $form->display();
     $html .= ob_get_contents();
     ob_end_clean();
     if (empty($stepsdefinitions)) {
         $stepsdefinitions = get_string('nostepsdefinitions', 'tool_behat');
     } else {
         $stepsdefinitions = implode('', $stepsdefinitions);
         // Replace text selector type arguments with a user-friendly select.
         $stepsdefinitions = preg_replace_callback('/(TEXT_SELECTOR\\d?_STRING)/', function ($matches) {
             return html_writer::select(behat_selectors::get_allowed_text_selectors(), uniqid());
         }, $stepsdefinitions);
         // Replace selector type arguments with a user-friendly select.
         $stepsdefinitions = preg_replace_callback('/(SELECTOR\\d?_STRING)/', function ($matches) {
             return html_writer::select(behat_selectors::get_allowed_selectors(), uniqid());
         }, $stepsdefinitions);
         // Replace simple OR options.
         $regex = '#\\(\\?P<[^>]+>([^\\)|]+\\|[^\\)]+)\\)#';
         $stepsdefinitions = preg_replace_callback($regex, function ($matches) {
             return html_writer::select(explode('|', $matches[1]), uniqid());
         }, $stepsdefinitions);
         $stepsdefinitions = preg_replace_callback('/(FIELD_VALUE_STRING)/', function ($matches) {
             global $CFG;
             // Creating a link to a popup with the help.
             $url = new moodle_url('/help.php', array('component' => 'tool_behat', 'identifier' => 'fieldvalueargument', 'lang' => current_language()));
             // Note: this title is displayed only if JS is disabled,
             // otherwise the link will have the new ajax tooltip.
             $title = get_string('fieldvalueargument', 'tool_behat');
             $title = get_string('helpprefix2', '', trim($title, ". \t"));
             $attributes = array('href' => $url, 'title' => $title, 'aria-haspopup' => 'true', 'target' => '_blank');
             $output = html_writer::tag('a', 'FIELD_VALUE_STRING', $attributes);
             return html_writer::tag('span', $output, array('class' => 'helptooltip'));
         }, $stepsdefinitions);
     }
     // Steps definitions.
     $html .= html_writer::tag('div', $stepsdefinitions, array('class' => 'steps-definitions'));
     $html .= $this->output->footer();
     return $html;
 }
开发者ID:evltuma,项目名称:moodle,代码行数:50,代码来源:renderer.php

示例9: display

 function display()
 {
     parent::display();
     form_init_date_js();
 }
开发者ID:remotelearner,项目名称:elis.cm,代码行数:5,代码来源:cmform.class.php

示例10: display

 /**
  * Displays the form
  */
 public function display()
 {
     global $PAGE, $COURSE;
     $this->require_definition_after_data();
     $config = new stdClass();
     $config->title = get_string('confirmcancel', 'backup');
     $config->question = get_string('confirmcancelquestion', 'backup');
     $config->yesLabel = get_string('confirmcancelyes', 'backup');
     $config->noLabel = get_string('confirmcancelno', 'backup');
     $config->closeButtonTitle = get_string('close', 'editor');
     $PAGE->requires->yui_module('moodle-backup-confirmcancel', 'M.core_backup.confirmcancel.watch_cancel_buttons', array($config));
     // Get list of module types on course.
     $modinfo = get_fast_modinfo($COURSE);
     $modnames = $modinfo->get_used_module_names(true);
     $PAGE->requires->yui_module('moodle-backup-backupselectall', 'M.core_backup.backupselectall', array($modnames));
     $PAGE->requires->strings_for_js(array('select', 'all', 'none'), 'moodle');
     $PAGE->requires->strings_for_js(array('showtypes', 'hidetypes'), 'backup');
     parent::display();
 }
开发者ID:evltuma,项目名称:moodle,代码行数:22,代码来源:base_moodleform.class.php

示例11: display

 function display()
 {
     parent::display();
     echo "<script>\n\t        function showFullForm(form) {\n\t           var e = document.getElementById('id_period');\n               if(!e) {\n                  return;\n               }\n               var period = e.options[e.selectedIndex].value;\n            // Custom period shows dates\n\t           if (period == 50) {\n                    document.getElementById('fitem_id_startdate').style.display = 'block';\n                    document.getElementById('fitem_id_enddate').style.display = 'block';\n                    document.getElementById('fitem_id_submitbutton').style.display = 'block';\t        \n                } else {\n                    document.getElementById('fitem_id_startdate').style.display = 'none';\n                    document.getElementById('fitem_id_enddate').style.display = 'none';\n                    document.getElementById('fitem_id_submitbutton').style.display = 'none';\t        \n\t                if(period > 0)\n\t                   form.submit();\n                }\t\n\t       }\n            showFullForm();\n\t        </script>";
 }
开发者ID:eduagdo,项目名称:emarking,代码行数:5,代码来源:dates_form.php

示例12: display

 /**
  * Displays the form
  */
 public function display()
 {
     global $PAGE;
     $this->require_definition_after_data();
     $config = new stdClass();
     $config->title = get_string('confirmcancel', 'backup');
     $config->question = get_string('confirmcancelquestion', 'backup');
     $config->yesLabel = get_string('confirmcancelyes', 'backup');
     $config->noLabel = get_string('confirmcancelno', 'backup');
     $PAGE->requires->yui_module('moodle-backup-confirmcancel', 'M.core_backup.watch_cancel_buttons', array($config));
     parent::display();
 }
开发者ID:nigeli,项目名称:moodle,代码行数:15,代码来源:base_moodleform.class.php

示例13: display

 /**
  * Displays the form
  */
 public function display()
 {
     $this->require_definition_after_data();
     parent::display();
 }
开发者ID:nicusX,项目名称:moodle,代码行数:8,代码来源:base_moodleform.class.php

示例14: editrender_addquestionform

 /**
  * renders the add question form
  *
  * @param moodleform $mform
  */
 public function editrender_addquestionform($mform)
 {
     echo $mform->display();
 }
开发者ID:agarnav,项目名称:moodle-mod_activequiz,代码行数:9,代码来源:renderer.php

示例15: display

 /**
  * Display the form, saving the contents of the output buffer overiding Moodle's
  * display function that prints to screen when called
  *
  * @return the form as an object to print to screen at our convenience
  */
 public function display()
 {
     ob_start();
     parent::display();
     $form = ob_get_contents();
     ob_end_clean();
     return $form;
 }
开发者ID:Dextirpe,项目名称:moodle-mod_turnitintooltwo,代码行数:14,代码来源:turnitintooltwo_form.class.php


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