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


PHP object::addHelpButton方法代码示例

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


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

示例1: array

 /**
  * Add question-type specific form fields.
  *
  * @param object $mform the form being built.
  */
 function definition_inner(&$mform)
 {
     global $QTYPES;
     $menu = array(get_string('answersingleno', 'qtype_multichoice'), get_string('answersingleyes', 'qtype_multichoice'));
     $mform->addElement('select', 'single', get_string('answerhowmany', 'qtype_multichoice'), $menu);
     $mform->setDefault('single', 1);
     $mform->addElement('advcheckbox', 'shuffleanswers', get_string('shuffleanswers', 'qtype_multichoice'), null, null, array(0, 1));
     $mform->addHelpButton('shuffleanswers', 'shuffleanswers', 'qtype_multichoice');
     $mform->setDefault('shuffleanswers', 1);
     $numberingoptions = $QTYPES[$this->qtype()]->get_numbering_styles();
     $menu = array();
     foreach ($numberingoptions as $numberingoption) {
         $menu[$numberingoption] = get_string('answernumbering' . $numberingoption, 'qtype_multichoice');
     }
     $mform->addElement('select', 'answernumbering', get_string('answernumbering', 'qtype_multichoice'), $menu);
     $mform->setDefault('answernumbering', 'abc');
     /*        $mform->addElement('static', 'answersinstruct', get_string('choices', 'qtype_multichoice'), get_string('fillouttwochoices', 'qtype_multichoice'));
             $mform->closeHeaderBefore('answersinstruct');
     */
     $creategrades = get_grade_options();
     $this->add_per_answer_fields($mform, get_string('choiceno', 'qtype_multichoice', '{no}'), $creategrades->gradeoptionsfull, max(5, QUESTION_NUMANS_START));
     $mform->addElement('header', 'overallfeedbackhdr', get_string('overallfeedback', 'qtype_multichoice'));
     foreach (array('correctfeedback', 'partiallycorrectfeedback', 'incorrectfeedback') as $feedbackname) {
         $mform->addElement('editor', $feedbackname, get_string($feedbackname, 'qtype_multichoice'), array('rows' => 10), $this->editoroptions);
         $mform->setType($feedbackname, PARAM_RAW);
     }
 }
开发者ID:vuchannguyen,项目名称:web,代码行数:32,代码来源:edit_multichoice_form.php

示例2: add_unit_options

 /**
  * Add the unit handling options to the form.
  * @param object $mform the form being built.
  */
 protected function add_unit_options($mform)
 {
     $mform->addElement('header', 'unithandling', get_string('unithandling', 'qtype_numerical'));
     $unitoptions = array(qtype_numerical::UNITNONE => get_string('onlynumerical', 'qtype_numerical'), qtype_numerical::UNITOPTIONAL => get_string('manynumerical', 'qtype_numerical'), qtype_numerical::UNITGRADED => get_string('unitgraded', 'qtype_numerical'));
     $mform->addElement('select', 'unitrole', get_string('unithandling', 'qtype_numerical'), $unitoptions);
     $penaltygrp = array();
     $penaltygrp[] = $mform->createElement('text', 'unitpenalty', get_string('unitpenalty', 'qtype_numerical'), array('size' => 6));
     $mform->setType('unitpenalty', PARAM_FLOAT);
     $mform->setDefault('unitpenalty', 0.1);
     $unitgradingtypes = array(qtype_numerical::UNITGRADEDOUTOFMARK => get_string('decfractionofresponsegrade', 'qtype_numerical'), qtype_numerical::UNITGRADEDOUTOFMAX => get_string('decfractionofquestiongrade', 'qtype_numerical'));
     $penaltygrp[] = $mform->createElement('select', 'unitgradingtypes', '', $unitgradingtypes);
     $mform->setDefault('unitgradingtypes', 1);
     $mform->addGroup($penaltygrp, 'penaltygrp', get_string('unitpenalty', 'qtype_numerical'), ' ', false);
     $mform->addHelpButton('penaltygrp', 'unitpenalty', 'qtype_numerical');
     $unitinputoptions = array(qtype_numerical::UNITINPUT => get_string('editableunittext', 'qtype_numerical'), qtype_numerical::UNITRADIO => get_string('unitchoice', 'qtype_numerical'), qtype_numerical::UNITSELECT => get_string('unitselect', 'qtype_numerical'));
     $mform->addElement('select', 'multichoicedisplay', get_string('studentunitanswer', 'qtype_numerical'), $unitinputoptions);
     $unitsleftoptions = array(0 => get_string('rightexample', 'qtype_numerical'), 1 => get_string('leftexample', 'qtype_numerical'));
     $mform->addElement('select', 'unitsleft', get_string('unitposition', 'qtype_numerical'), $unitsleftoptions);
     $mform->setDefault('unitsleft', 0);
     $mform->disabledIf('penaltygrp', 'unitrole', 'eq', qtype_numerical::UNITNONE);
     $mform->disabledIf('penaltygrp', 'unitrole', 'eq', qtype_numerical::UNITOPTIONAL);
     $mform->disabledIf('unitsleft', 'unitrole', 'eq', qtype_numerical::UNITNONE);
     $mform->disabledIf('multichoicedisplay', 'unitrole', 'eq', qtype_numerical::UNITNONE);
     $mform->disabledIf('multichoicedisplay', 'unitrole', 'eq', qtype_numerical::UNITOPTIONAL);
 }
开发者ID:EmmanuelYupit,项目名称:educursos,代码行数:29,代码来源:edit_numerical_form.php

示例3: definition_inner

    /**
     * Add question-type specific form fields.
     *
     * @param object $mform the form being built.
     */
    protected function definition_inner($mform) {
        $menu = array(
            get_string('answersingleno', 'qtype_multichoice'),
            get_string('answersingleyes', 'qtype_multichoice'),
        );
        $mform->addElement('select', 'single',
                get_string('answerhowmany', 'qtype_multichoice'), $menu);
        $mform->setDefault('single', 1);

        $mform->addElement('advcheckbox', 'shuffleanswers',
                get_string('shuffleanswers', 'qtype_multichoice'), null, null, array(0, 1));
        $mform->addHelpButton('shuffleanswers', 'shuffleanswers', 'qtype_multichoice');
        $mform->setDefault('shuffleanswers', 1);

        $mform->addElement('select', 'answernumbering',
                get_string('answernumbering', 'qtype_multichoice'),
                qtype_multichoice::get_numbering_styles());
        $mform->setDefault('answernumbering', 'abc');

        $this->add_per_answer_fields($mform, get_string('choiceno', 'qtype_multichoice', '{no}'),
                question_bank::fraction_options_full(), max(5, QUESTION_NUMANS_START));

        $this->add_combined_feedback_fields(true);
        $mform->disabledIf('shownumcorrect', 'single', 'eq', 1);

        $this->add_interactive_settings(true, true);
    }
开发者ID:Burick,项目名称:moodle,代码行数:32,代码来源:edit_multichoice_form.php

示例4: definition_inner

 /**
  * Add question-type specific form fields.
  *
  * @param object $mform the form being built.
  */
 protected function definition_inner($mform)
 {
     $mform->removeElement('defaultmark');
     $mform->addElement('hidden', 'defaultmark', '1');
     $mform->removeElement('generalfeedback');
     $mform->addElement('advcheckbox', 'autoplay', get_string('autoplay', 'qtype_turmultiplechoice'), null, null, array(0, 1));
     $mform->addHelpButton('autoplay', 'autoplay', 'qtype_turmultiplechoice');
     $mform->setDefault('autoplay', 0);
     $menu = array(get_string('answersingleno', 'qtype_turmultiplechoice'), get_string('answersingleyes', 'qtype_turmultiplechoice'));
     $mform->addElement('select', 'single', get_string('answerhowmany', 'qtype_turmultiplechoice'), $menu);
     $mform->setDefault('single', 0);
     // 'Image to display' filemanager
     $mform->addElement('filemanager', 'questionimage', 'Image to display', null, array('maxfiles' => 1));
     // TODO: Use lang string
     // 'Choose soundfile for question' filemanager
     $mform->addElement('filemanager', 'questionsound', 'Choose soundfile for question', null, array('maxfiles' => 1, 'accepted_types' => array('.mp3')));
     // TODO: Use lang string
     $question_difficulties = array();
     $question_difficulties[0] = get_string('q_easy1', 'qtype_turmultiplechoice');
     $question_difficulties[1] = get_string('q_easy2', 'qtype_turmultiplechoice');
     $question_difficulties[2] = get_string('q_easy3', 'qtype_turmultiplechoice');
     $question_difficulties[3] = get_string('q_medium1', 'qtype_turmultiplechoice');
     $question_difficulties[4] = get_string('q_medium2', 'qtype_turmultiplechoice');
     $question_difficulties[5] = get_string('q_medium3', 'qtype_turmultiplechoice');
     $question_difficulties[6] = get_string('q_hard1', 'qtype_turmultiplechoice');
     $question_difficulties[7] = get_string('q_hard2', 'qtype_turmultiplechoice');
     $question_difficulties[8] = get_string('q_hard3', 'qtype_turmultiplechoice');
     $mform->addElement('select', 'qdifficulty', get_string('qdifficulty', 'qtype_turmultiplechoice'), $question_difficulties);
     $mform->setDefault('qdifficulty', 0);
     $mform->addElement('hidden', 'shuffleanswers', 1);
     $this->add_per_answer_fields($mform, get_string('choiceno', 'qtype_turmultiplechoice', '{no}'), question_bank::fraction_options_full(), max(4, QUESTION_NUMANS_START), 4);
     $this->add_combined_feedback_fields(true);
     $mform->disabledIf('shownumcorrect', 'single', 'eq', 1);
 }
开发者ID:edwinphillips,项目名称:turmultiplechoice_2.2,代码行数:39,代码来源:edit_turmultiplechoice_form.php

示例5: setup_upload_gradatt

 /**
  * Add form elements for upload graduate attributes.
  * @param object $mform		form definition
  * @return void
  */
 private function setup_upload_gradatt($mform)
 {
     $mform->addElement('header', 'upload_gradatt_header', get_string('upload_gradatt_header', 'local_metadata'));
     $mform->addHelpButton('upload_gradatt_header', 'upload_gradatt_header', 'local_metadata');
     $mform->addElement('filepicker', 'temp_gradatt', get_string('file'), null, array('maxbytes' => 0, 'accepted_types' => '.csv'));
     $mform->addElement('submit', 'upload_gradatt', get_string('upload_gradatt', 'local_metadata'));
 }
开发者ID:MoodleMetaData,项目名称:MoodleMetaData,代码行数:12,代码来源:university_gradatt.php

示例6: setupForm

 /**
  * Adds controls specific to this filter in the form.
  * @param object $mform a MoodleForm object to setup
  */
 function setupForm(&$mform)
 {
     $choices = array();
     foreach ($this->_options as $key => $value) {
         $choices[serialize($value)] = $key;
     }
     if (isset($this->_anyvalue)) {
         $choices = array('' => get_string('anyvalue', 'filters')) + $choices;
     }
     $mform->addElement('select', $this->_uniqueid, $this->_label, $choices);
     $data = $mform->exportValues();
     // ELIS-3474,ELIS-3475: since called from definition_after_data()
     // we MUST check if data has been set or default will override!
     if ((!is_array($data) || !isset($data[$this->_uniqueid]) || $data[$this->_uniqueid] === '') && isset($this->_default)) {
         $value = $this->_default;
         if (is_array($value)) {
             $value = serialize($value);
         }
         $mform->setDefault($this->_uniqueid, $value);
     }
     $mform->addHelpButton($this->_uniqueid, $this->_filterhelp[0], $this->_filterhelp[2]);
     if ($this->_advanced) {
         $mform->setAdvanced($this->_uniqueid);
     }
 }
开发者ID:jamesmcq,项目名称:elis,代码行数:29,代码来源:setselect.php

示例7: definition_inner

 /**
  * Add question-type specific form fields.
  *
  * @param object $mform the form being built.
  */
 public function definition_inner($mform)
 {
     // cache this plugins name
     $plugin = 'qtype_ordering';
     // selecttype
     $name = 'selecttype';
     $label = get_string($name, $plugin);
     $options = array(0 => get_string('selectall', $plugin), 1 => get_string('selectrandom', $plugin), 2 => get_string('selectcontiguous', $plugin));
     $mform->addElement('select', $name, $label, $options);
     $mform->addHelpButton($name, $name, $plugin);
     $mform->setDefault($name, 0);
     // selectcount
     $name = 'selectcount';
     $label = get_string($name, $plugin);
     $options = array(0 => get_string('all'));
     for ($i = 3; $i <= 20; $i++) {
         $options[$i] = $i;
     }
     $mform->addElement('select', $name, $label, $options);
     $mform->disabledIf($name, 'selecttype', 'eq', 0);
     $mform->addHelpButton($name, $name, $plugin);
     $mform->setDefault($name, 0);
     // answers (=items)
     $elements = array();
     $name = 'answerheader';
     $label = get_string($name, $plugin);
     $elements[] =& $mform->createElement('header', $name, $label);
     $name = 'answer';
     $label = get_string($name, $plugin);
     $options = array('rows' => self::NUM_ANS_ROWS, 'cols' => self::NUM_ANS_COLS);
     $elements[] =& $mform->createElement('textarea', $name, $label, $options);
     if (empty($this->question->options)) {
         $start = 0;
     } else {
         $start = count($this->question->options->answers);
     }
     if ($start < self::NUM_ANS_START) {
         $start = self::NUM_ANS_START;
     }
     $options = array('answerheader' => array('expanded' => true));
     $buttontext = get_string('addmoreanswers', $plugin, self::NUM_ANS_ADD);
     $this->repeat_elements($elements, $start, $options, 'countanswers', 'addanswers', self::NUM_ANS_ADD, $buttontext);
     // feedback
     $this->add_ordering_feedback_fields();
 }
开发者ID:Kathrin84,项目名称:moodle-qtype_ordering,代码行数:50,代码来源:edit_ordering_form.php

示例8: setupForm

 /**
  * Adds controls specific to this filter in the form.
  * @param object $mform a MoodleForm object to setup
  */
 function setupForm(&$mform)
 {
     $mform->addElement('select', $this->_uniqueid, $this->_label, $this->_options);
     $mform->addHelpButton($this->_uniqueid, 'simpleselect', 'local_eliscore');
     // TBV
     if ($this->_advanced) {
         $mform->setAdvanced($this->_uniqueid);
     }
 }
开发者ID:jamesmcq,项目名称:elis,代码行数:13,代码来源:selectany.php

示例9: definition_inner

 /**
  * Add question-type specific form fields.
  *
  * @param object $mform the form being built.
  */
 protected function definition_inner($mform)
 {
     $mform->addElement('advcheckbox', 'shuffleanswers', get_string('shuffle', 'qtype_match'), null, null, array(0, 1));
     $mform->addHelpButton('shuffleanswers', 'shuffle', 'qtype_match');
     $mform->setDefault('shuffleanswers', 1);
     $this->add_per_answer_fields($mform, get_string('questionno', 'question', '{no}'), 0);
     $this->add_combined_feedback_fields(true);
     $this->add_interactive_settings(true, true);
 }
开发者ID:antoniorodrigues,项目名称:redes-digitais,代码行数:14,代码来源:edit_ddmatch_form.php

示例10: array

 /**
  * Add question-type specific form fields.
  *
  * @param object $mform the form being built.
  */
 function definition_inner(&$mform)
 {
     $mform->addElement('advcheckbox', 'shuffleanswers', get_string('shuffle', 'qtype_match'), null, null, array(0, 1));
     $mform->addHelpButton('shuffleanswers', 'shuffle', 'qtype_match');
     $mform->setDefault('shuffleanswers', 1);
     $mform->addElement('static', 'answersinstruct', get_string('choices', 'quiz'), get_string('filloutthreeqsandtwoas', 'qtype_match'));
     $mform->closeHeaderBefore('answersinstruct');
     $this->add_per_answer_fields($mform, get_string('questionno', 'quiz', '{no}'), 0);
 }
开发者ID:vuchannguyen,项目名称:web,代码行数:14,代码来源:edit_match_form.php

示例11: setup_upload_categories

 /**
  * Add form elements for upload course categories.
  * @param object $mform		form definition
  * @return void
  */
 private function setup_upload_categories($mform)
 {
     $mform->addElement('header', 'upload_category_header', get_string('upload_category_header', 'local_metadata'));
     $mform->addHelpButton('upload_category_header', 'upload_category_header', 'local_metadata');
     $mform->addElement('text', 'category_label', get_string('category_label', 'local_metadata'));
     $mform->setType('category_label', PARAM_TEXT);
     //$mform->addRule('category_label', get_string('err_required'), 'required', null, 'server');
     //$faculty_selection = $mform->addElement ('select', 'course_faculty', get_string ( 'course_faculty', 'local_metadata' ), $faculty_list);
     $mform->addElement('filepicker', 'temp_categories', get_string('file'), null, array('maxbytes' => 0, 'accepted_types' => '.csv'));
     $mform->addElement('submit', 'submit_category', get_string('submit_category', 'local_metadata'));
 }
开发者ID:MoodleMetaData,项目名称:MoodleMetaData,代码行数:16,代码来源:categories_form.php

示例12: setup_upload_program_obj

 /**
  * Add form elements for upload a file for program objective.
  * @param object $mform		form definition
  * @return void
  */
 private function setup_upload_program_obj($mform)
 {
     $mform->addElement('header', 'program_obj_header', get_string('program_obj_header', 'local_metadata'));
     // Text box to add new program specific learning objectives
     $mform->addElement('text', 'new_group', get_string('new_group', 'local_metadata'), '');
     //$mform->addRule('new_group', get_string('err_required', 'local_metadata'), 'required', null, 'client');
     $mform->setType('new_group', PARAM_RAW);
     $mform->addHelpButton('program_obj_header', 'program_obj_header', 'local_metadata');
     $mform->addElement('filepicker', 'temp_program_obj', get_string('file'), null, array('maxbytes' => 0, 'accepted_types' => '.csv'));
     $mform->addElement('submit', 'upload_program_obj', get_string('upload_program_obj', 'local_metadata'));
 }
开发者ID:MoodleMetaData,项目名称:MoodleMetaData,代码行数:16,代码来源:knowledge_form.php

示例13: definition_inner

 /**
  * Add question-type specific form fields.
  *
  * @param object $mform the form being built.
  */
 protected function definition_inner($mform)
 {
     $mform->addElement('select', 'correctanswer', get_string('correctanswer', 'qtype_truefalse'), array(0 => get_string('false', 'qtype_truefalse'), 1 => get_string('true', 'qtype_truefalse')));
     $mform->addElement('editor', 'feedbacktrue', get_string('feedbacktrue', 'qtype_truefalse'), null, $this->editoroptions);
     $mform->setType('feedbacktrue', PARAM_RAW);
     $mform->addElement('editor', 'feedbackfalse', get_string('feedbackfalse', 'qtype_truefalse'), null, $this->editoroptions);
     $mform->setType('feedbackfalse', PARAM_RAW);
     $mform->addElement('header', 'multitriesheader', get_string('settingsformultipletries', 'question'));
     $mform->addElement('hidden', 'penalty', 1);
     $mform->addElement('static', 'penaltymessage', get_string('penaltyforeachincorrecttry', 'question'), 1);
     $mform->addHelpButton('penaltymessage', 'penaltyforeachincorrecttry', 'question');
 }
开发者ID:sebastiansanio,项目名称:tallerdeprogramacion2fiuba,代码行数:17,代码来源:edit_truefalse_form.php

示例14: setupForm

 /**
  * Adds controls specific to this filter in the form.
  * @param object $mform a MoodleForm object to setup
  */
 function setupForm(&$mform)
 {
     $objs = array();
     $objs[] =& $mform->createElement('select', $this->_uniqueid . '_op', null, $this->getOperators());
     $objs[] =& $mform->createElement('text', $this->_uniqueid, null);
     $grp =& $mform->addElement('group', $this->_uniqueid . '_grp', $this->_label, $objs, '', false);
     $mform->setType($this->_uniqueid, PARAM_RAW);
     $mform->addHelpButton($this->_uniqueid . '_grp', $this->_filterhelp[0], $this->_filterhelp[2]);
     // TBV
     $mform->disabledIf($this->_uniqueid, $this->_uniqueid . '_op', 'eq', 5);
     if ($this->_advanced) {
         $mform->setAdvanced($this->_uniqueid . '_grp');
     }
 }
开发者ID:jamesmcq,项目名称:elis,代码行数:18,代码来源:text.php

示例15: definition_inner

    /**
     * Add question-type specific form fields.
     *
     * @param object $mform the form being built.
     */
    protected function definition_inner($mform) {
        $mform->addElement('advcheckbox', 'shuffleanswers',
                get_string('shuffle', 'qtype_match'), null, null, array(0, 1));
        $mform->addHelpButton('shuffleanswers', 'shuffle', 'qtype_match');
        $mform->setDefault('shuffleanswers', 1);

        $mform->addElement('static', 'answersinstruct',
                get_string('availablechoices', 'qtype_match'),
                get_string('filloutthreeqsandtwoas', 'qtype_match'));
        $mform->closeHeaderBefore('answersinstruct');

        $this->add_per_answer_fields($mform, get_string('questionno', 'question', '{no}'), 0);

        $this->add_combined_feedback_fields(true);
        $this->add_interactive_settings(true, true);
    }
开发者ID:JP-Git,项目名称:moodle,代码行数:21,代码来源:edit_match_form.php


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