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


PHP workshop::available_assessment_weights_list方法代码示例

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


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

示例1: definition

 function definition()
 {
     $mform = $this->_form;
     $current = $this->_customdata['current'];
     $workshop = $this->_customdata['workshop'];
     $editoropts = $this->_customdata['editoropts'];
     $options = $this->_customdata['options'];
     $mform->addElement('header', 'assessmentsettings', get_string('assessmentsettings', 'workshop'));
     if (!empty($options['editableweight'])) {
         $mform->addElement('select', 'weight', get_string('assessmentweight', 'workshop'), workshop::available_assessment_weights_list());
         $mform->setDefault('weight', 1);
     }
     $mform->addElement('static', 'gradinggrade', get_string('gradinggradecalculated', 'workshop'));
     if (!empty($options['overridablegradinggrade'])) {
         $grades = array('' => get_string('notoverridden', 'workshop'));
         for ($i = (int) $workshop->gradinggrade; $i >= 0; $i--) {
             $grades[$i] = $i;
         }
         $mform->addElement('select', 'gradinggradeover', get_string('gradinggradeover', 'workshop'), $grades);
         $mform->addElement('editor', 'feedbackreviewer_editor', get_string('feedbackreviewer', 'workshop'), null, $editoropts);
         $mform->setType('feedbackreviewer_editor', PARAM_RAW);
     }
     $mform->addElement('hidden', 'asid');
     $mform->setType('asid', PARAM_INT);
     $mform->addElement('submit', 'save', get_string('saveandclose', 'workshop'));
     $this->set_data($current);
 }
开发者ID:evltuma,项目名称:moodle,代码行数:27,代码来源:feedbackreviewer_form.php

示例2: definition

    /**
     * Add the fields that are common for all grading strategies.
     *
     * If the strategy does not support all these fields, then you can override
     * this method and remove the ones you don't want with
     * $mform->removeElement().
     * Strategy subclassess should define their own fields in definition_inner()
     *
     * @return void
     */
    public function definition() {
        global $CFG;

        $mform          = $this->_form;
        $this->mode     = $this->_customdata['mode'];       // influences the save buttons
        $this->strategy = $this->_customdata['strategy'];   // instance of the strategy api class
        $this->workshop = $this->_customdata['workshop'];   // instance of the workshop api class
        $this->options  = $this->_customdata['options'];    // array with addiotional options

        // add the strategy-specific fields
        $this->definition_inner($mform);

        // add the data common for all subplugins
        $mform->addElement('hidden', 'strategy', $this->workshop->strategy);
        $mform->setType('strategy', PARAM_PLUGIN);

        if (!empty($this->options['editableweight']) and !$mform->isFrozen()) {
            $mform->addElement('header', 'assessmentsettings', get_string('assessmentweight', 'workshop'));
            $mform->addElement('select', 'weight',
                    get_string('assessmentweight', 'workshop'), workshop::available_assessment_weights_list());
            $mform->setDefault('weight', 1);
        }

        $buttonarray = array();
        if ($this->mode == 'preview') {
            $buttonarray[] = $mform->createElement('cancel', 'backtoeditform', get_string('backtoeditform', 'workshop'));
        }
        if ($this->mode == 'assessment') {
            $buttonarray[] = $mform->createElement('submit', 'saveandcontinue', get_string('saveandcontinue', 'workshop'));
            $buttonarray[] = $mform->createElement('submit', 'saveandclose', get_string('saveandclose', 'workshop'));
            $buttonarray[] = $mform->createElement('cancel');
        }
        $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);
        $mform->closeHeaderBefore('buttonar');
    }
开发者ID:JP-Git,项目名称:moodle,代码行数:45,代码来源:assessment_form.php

示例3: definition

 /**
  * Add the fields that are common for all grading strategies.
  *
  * If the strategy does not support all these fields, then you can override
  * this method and remove the ones you don't want with
  * $mform->removeElement().
  * Strategy subclassess should define their own fields in definition_inner()
  *
  * @return void
  */
 public function definition()
 {
     global $CFG;
     $mform = $this->_form;
     $this->mode = $this->_customdata['mode'];
     // influences the save buttons
     $this->strategy = $this->_customdata['strategy'];
     // instance of the strategy api class
     $this->workshop = $this->_customdata['workshop'];
     // instance of the workshop api class
     $this->options = $this->_customdata['options'];
     // array with addiotional options
     // Disable shortforms
     $mform->setDisableShortforms();
     // add the strategy-specific fields
     $this->definition_inner($mform);
     // add the data common for all subplugins
     $mform->addElement('hidden', 'strategy', $this->workshop->strategy);
     $mform->setType('strategy', PARAM_PLUGIN);
     if ($this->workshop->overallfeedbackmode and $this->is_editable()) {
         $mform->addElement('header', 'overallfeedbacksection', get_string('overallfeedback', 'mod_workshop'));
         $mform->addElement('editor', 'feedbackauthor_editor', get_string('feedbackauthor', 'mod_workshop'), null, $this->workshop->overall_feedback_content_options());
         if ($this->workshop->overallfeedbackmode == 2) {
             $mform->addRule('feedbackauthor_editor', null, 'required', null, 'client');
         }
         if ($this->workshop->overallfeedbackfiles) {
             $mform->addElement('filemanager', 'feedbackauthorattachment_filemanager', get_string('feedbackauthorattachment', 'mod_workshop'), null, $this->workshop->overall_feedback_attachment_options());
         }
     }
     if (!empty($this->options['editableweight']) and $this->is_editable()) {
         $mform->addElement('header', 'assessmentsettings', get_string('assessmentweight', 'workshop'));
         $mform->addElement('select', 'weight', get_string('assessmentweight', 'workshop'), workshop::available_assessment_weights_list());
         $mform->setDefault('weight', 1);
     }
     $buttonarray = array();
     if ($this->mode == 'preview') {
         $buttonarray[] = $mform->createElement('cancel', 'backtoeditform', get_string('backtoeditform', 'workshop'));
     }
     if ($this->mode == 'assessment') {
         if (!empty($this->options['pending'])) {
             $buttonarray[] = $mform->createElement('submit', 'saveandshownext', get_string('saveandshownext', 'workshop'));
         }
         $buttonarray[] = $mform->createElement('submit', 'saveandclose', get_string('saveandclose', 'workshop'));
         $buttonarray[] = $mform->createElement('submit', 'saveandcontinue', get_string('saveandcontinue', 'workshop'));
         $buttonarray[] = $mform->createElement('cancel');
     }
     $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);
     $mform->closeHeaderBefore('buttonar');
 }
开发者ID:alanaipe2015,项目名称:moodle,代码行数:59,代码来源:assessment_form.php


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