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


PHP question_edit_form::display方法代码示例

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


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

示例1: list

 /**
  * This method should be overriden if you want to include a special heading or some other
  * html on a question editing page besides the question editing form.
  *
  * @param question_edit_form $mform a child of question_edit_form
  * @param object $question
  * @param string $wizardnow is '' for first page.
  */
 function display_question_editing_page(&$mform, $question, $wizardnow)
 {
     list($heading, $langmodule) = $this->get_heading(empty($question->id));
     print_heading_with_help($heading, $this->name(), $langmodule);
     $permissionstrs = array();
     if (!empty($question->id)) {
         if ($question->formoptions->canedit) {
             $permissionstrs[] = get_string('permissionedit', 'question');
         }
         if ($question->formoptions->canmove) {
             $permissionstrs[] = get_string('permissionmove', 'question');
         }
         if ($question->formoptions->cansaveasnew) {
             $permissionstrs[] = get_string('permissionsaveasnew', 'question');
         }
     }
     if (!$question->formoptions->movecontext && count($permissionstrs)) {
         print_heading(get_string('permissionto', 'question'), 'center', 3);
         $html = '<ul>';
         foreach ($permissionstrs as $permissionstr) {
             $html .= '<li>' . $permissionstr . '</li>';
         }
         $html .= '</ul>';
         print_box($html, 'boxwidthnarrow boxaligncenter generalbox');
     }
     $mform->display();
 }
开发者ID:kai707,项目名称:ITSA-backup,代码行数:35,代码来源:questiontype.php

示例2: display_question_editing_page

    /**
     * This method should be overriden if you want to include a special heading or some other
     * html on a question editing page besides the question editing form.
     *
     * @param question_edit_form $mform a child of question_edit_form
     * @param object $question
     * @param string $wizardnow is '' for first page.
     */
    public function display_question_editing_page($mform, $question, $wizardnow) {
        global $OUTPUT;
        $heading = $this->get_heading(empty($question->id));

        echo $OUTPUT->heading_with_help($heading, 'pluginname', $this->plugin_name());

        $permissionstrs = array();
        if (!empty($question->id)) {
            if ($question->formoptions->canedit) {
                $permissionstrs[] = get_string('permissionedit', 'question');
            }
            if ($question->formoptions->canmove) {
                $permissionstrs[] = get_string('permissionmove', 'question');
            }
            if ($question->formoptions->cansaveasnew) {
                $permissionstrs[] = get_string('permissionsaveasnew', 'question');
            }
        }
        if (count($permissionstrs)) {
            echo $OUTPUT->heading(get_string('permissionto', 'question'), 3);
            $html = '<ul>';
            foreach ($permissionstrs as $permissionstr) {
                $html .= '<li>'.$permissionstr.'</li>';
            }
            $html .= '</ul>';
            echo $OUTPUT->box($html, 'boxwidthnarrow boxaligncenter generalbox');
        }
        $mform->display();
    }
开发者ID:rwijaya,项目名称:moodle,代码行数:37,代码来源:questiontypebase.php

示例3: display_question_editing_page

 /**
  * This method should be overriden if you want to include a special heading or some other
  * html on a question editing page besides the question editing form.
  *
  * @param question_edit_form $mform a child of question_edit_form
  * @param object $question
  * @param string $wizardnow is '' for first page.
  */
 public function display_question_editing_page($mform, $question, $wizardnow)
 {
     global $OUTPUT;
     $heading = $this->get_heading(empty($question->id));
     echo $OUTPUT->heading_with_help($heading, 'pluginname', $this->plugin_name());
     $mform->display();
 }
开发者ID:janaece,项目名称:globalclassroom4_clean,代码行数:15,代码来源:questiontypebase.php

示例4: display_question_editing_page

 /**
  * This method should be overriden if you want to include a special heading or some other
  * html on a question editing page besides the question editing form.
  *
  * @param question_edit_form $mform a child of question_edit_form
  * @param object $question
  * @param string $wizardnow is '' for first page.
  */
 public function display_question_editing_page($mform, $question, $wizardnow)
 {
     global $OUTPUT;
     $heading = $this->get_heading(empty($question->id));
     if (get_string_manager()->string_exists('pluginname_help', $this->plugin_name())) {
         echo $OUTPUT->heading_with_help($heading, 'pluginname', $this->plugin_name());
     } else {
         echo $OUTPUT->heading_with_help($heading, $this->name(), $this->plugin_name());
     }
     //Who cares about that:
     //        $permissionstrs = array();
     //        if (!empty($question->id)) {
     //            if ($question->formoptions->canedit) {
     //                $permissionstrs[] = get_string('permissionedit', 'question');
     //            }
     //            if ($question->formoptions->canmove) {
     //                $permissionstrs[] = get_string('permissionmove', 'question');
     //            }
     //            if ($question->formoptions->cansaveasnew) {
     //                $permissionstrs[] = get_string('permissionsaveasnew', 'question');
     //            }
     //        }
     //        if (!$question->formoptions->movecontext  && count($permissionstrs)) {
     //            echo $OUTPUT->heading(get_string('permissionto', 'question'), 3);
     //            $html = '<ul>';
     //            foreach ($permissionstrs as $permissionstr) {
     //                $html .= '<li>'.$permissionstr.'</li>';
     //            }
     //            $html .= '</ul>';
     //            echo $OUTPUT->box($html, 'boxwidthnarrow boxaligncenter generalbox');
     //        }
     $mform->display();
 }
开发者ID:sunilwebaccess,项目名称:moodle-question-matrix,代码行数:41,代码来源:questiontype.php

示例5: list

 /**
  * This method should be overriden if you want to include a special heading or some other
  * html on a question editing page besides the question editing form.
  *
  * @param question_edit_form $mform a child of question_edit_form
  * @param object $question
  * @param string $wizardnow is '' for first page.
  */
 function display_question_editing_page(&$mform, $question, $wizardnow)
 {
     list($heading, $langmodule) = $this->get_heading();
     print_heading_with_help($heading, $this->name(), $langmodule);
     $mform->display();
 }
开发者ID:veritech,项目名称:pare-project,代码行数:14,代码来源:questiontype.php


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