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


PHP scorm_get_what_grade_array函数代码示例

本文整理汇总了PHP中scorm_get_what_grade_array函数的典型用法代码示例。如果您正苦于以下问题:PHP scorm_get_what_grade_array函数的具体用法?PHP scorm_get_what_grade_array怎么用?PHP scorm_get_what_grade_array使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: definition


//.........这里部分代码省略.........
     $mform->addElement('select', 'maxgrade', get_string('maximumgrade'), $grades);
     $mform->setDefault('maxgrade', $cfg_scorm->maxgrade);
     $mform->disabledIf('maxgrade', 'grademethod', 'eq', GRADESCOES);
     // Attempts
     $mform->addElement('static', '', '', '<hr />');
     // Max Attempts
     $mform->addElement('select', 'maxattempt', get_string('maximumattempts', 'scorm'), scorm_get_attempts_array());
     $mform->setHelpButton('maxattempt', array('maxattempt', get_string('maximumattempts', 'scorm'), 'scorm'));
     $mform->setDefault('maxattempt', $cfg_scorm->maxattempts);
     // Display attempt status
     $mform->addElement('selectyesno', 'displayattemptstatus', get_string('displayattemptstatus', 'scorm'));
     $mform->setHelpButton('displayattemptstatus', array('displayattemptstatus', get_string('displayattemptstatus', 'scorm'), 'scorm'));
     $mform->setDefault('displayattemptstatus', $cfg_scorm->displayattemptstatus);
     // Display course structure
     $mform->addElement('selectyesno', 'displaycoursestructure', get_string('displaycoursestructure', 'scorm'));
     $mform->setHelpButton('displaycoursestructure', array('displaycoursestructure', get_string('displaycoursestructure', 'scorm'), 'scorm'));
     $mform->setDefault('displaycoursestructure', $cfg_scorm->displaycoursestructure);
     // Force completed
     $mform->addElement('selectyesno', 'forcecompleted', get_string('forcecompleted', 'scorm'));
     $mform->setHelpButton('forcecompleted', array('forcecompleted', get_string('forcecompleted', 'scorm'), 'scorm'));
     $mform->setDefault('forcecompleted', $cfg_scorm->forcecompleted);
     $mform->setAdvanced('forcecompleted');
     // Force new attempt
     $mform->addElement('selectyesno', 'forcenewattempt', get_string('forcenewattempt', 'scorm'));
     $mform->setHelpButton('forcenewattempt', array('forcenewattempt', get_string('forcenewattempt', 'scorm'), 'scorm'));
     $mform->setDefault('forcenewattempt', $cfg_scorm->forcenewattempt);
     $mform->setAdvanced('forcenewattempt');
     // Last attempt lock - lock the enter button after the last available attempt has been made
     $mform->addElement('selectyesno', 'lastattemptlock', get_string('lastattemptlock', 'scorm'));
     $mform->setHelpButton('lastattemptlock', array('lastattemptlock', get_string('lastattemptlock', 'scorm'), 'scorm'));
     $mform->setDefault('lastattemptlock', $cfg_scorm->lastattemptlock);
     $mform->setAdvanced('lastattemptlock');
     // What Grade
     $mform->addElement('select', 'whatgrade', get_string('whatgrade', 'scorm'), scorm_get_what_grade_array());
     $mform->disabledIf('whatgrade', 'maxattempt', 'eq', 1);
     $mform->setHelpButton('whatgrade', array('whatgrade', get_string('whatgrade', 'scorm'), 'scorm'));
     $mform->setDefault('whatgrade', $cfg_scorm->whatgrade);
     $mform->setAdvanced('whatgrade');
     // Activation period
     /*        $mform->addElement('static', '', '' ,'<hr />');
             $mform->addElement('static', 'activation', get_string('activation','scorm'));
             $datestartgrp = array();
             $datestartgrp[] = &$mform->createElement('date_time_selector', 'startdate');
             $datestartgrp[] = &$mform->createElement('checkbox', 'startdisabled', null, get_string('disable'));
             $mform->addGroup($datestartgrp, 'startdategrp', get_string('from'), ' ', false);
             $mform->setDefault('startdate', 0);
             $mform->setDefault('startdisabled', 1);
             $mform->disabledIf('startdategrp', 'startdisabled', 'checked');
     
             $dateendgrp = array();
             $dateendgrp[] = &$mform->createElement('date_time_selector', 'enddate');
             $dateendgrp[] = &$mform->createElement('checkbox', 'enddisabled', null, get_string('disable'));
             $mform->addGroup($dateendgrp, 'dateendgrp', get_string('to'), ' ', false);
             $mform->setDefault('enddate', 0);
             $mform->setDefault('enddisabled', 1);
             $mform->disabledIf('dateendgrp', 'enddisabled', 'checked');
     */
     // Stage Size
     $mform->addElement('static', '', '', '<hr />');
     $mform->addElement('static', 'stagesize', get_string('stagesize', 'scorm'));
     $mform->setHelpButton('stagesize', array('stagesize', get_string('stagesize', 'scorm'), 'scorm'));
     // Width
     $mform->addElement('text', 'width', get_string('width', 'scorm'), 'maxlength="5" size="5"');
     $mform->setDefault('width', $cfg_scorm->framewidth);
     $mform->setType('width', PARAM_INT);
     // Height
开发者ID:ajv,项目名称:Offline-Caching,代码行数:67,代码来源:mod_form.php

示例2: admin_setting_configselect_with_advanced

 $settings->add(new admin_setting_configselect_with_advanced('scorm/nav', get_string('nav', 'scorm'), get_string('navdesc', 'scorm'), array('value' => SCORM_NAV_UNDER_CONTENT, 'adv' => true), scorm_get_navigation_display_array()));
 $settings->add(new admin_setting_configtext_with_advanced('scorm/navpositionleft', get_string('fromleft', 'scorm'), get_string('navpositionleft', 'scorm'), array('value' => -100, 'adv' => true)));
 $settings->add(new admin_setting_configtext_with_advanced('scorm/navpositiontop', get_string('fromtop', 'scorm'), get_string('navpositiontop', 'scorm'), array('value' => -100, 'adv' => true)));
 $settings->add(new admin_setting_configtext_with_advanced('scorm/collapsetocwinsize', get_string('collapsetocwinsize', 'scorm'), get_string('collapsetocwinsizedesc', 'scorm'), array('value' => 767, 'adv' => true)));
 $settings->add(new admin_setting_configselect_with_advanced('scorm/displayattemptstatus', get_string('displayattemptstatus', 'scorm'), get_string('displayattemptstatusdesc', 'scorm'), array('value' => 1, 'adv' => false), $yesno));
 // Default grade settings.
 $settings->add(new admin_setting_heading('scorm/gradesettings', get_string('defaultgradesettings', 'scorm'), ''));
 $settings->add(new admin_setting_configselect('scorm/grademethod', get_string('grademethod', 'scorm'), get_string('grademethoddesc', 'scorm'), GRADEHIGHEST, scorm_get_grade_method_array()));
 for ($i = 0; $i <= 100; $i++) {
     $grades[$i] = "{$i}";
 }
 $settings->add(new admin_setting_configselect('scorm/maxgrade', get_string('maximumgrade'), get_string('maximumgradedesc', 'scorm'), 100, $grades));
 $settings->add(new admin_setting_heading('scorm/othersettings', get_string('defaultothersettings', 'scorm'), ''));
 // Default attempts settings.
 $settings->add(new admin_setting_configselect('scorm/maxattempt', get_string('maximumattempts', 'scorm'), '', '0', scorm_get_attempts_array()));
 $settings->add(new admin_setting_configselect('scorm/whatgrade', get_string('whatgrade', 'scorm'), get_string('whatgradedesc', 'scorm'), HIGHESTATTEMPT, scorm_get_what_grade_array()));
 $settings->add(new admin_setting_configselect('scorm/forcecompleted', get_string('forcecompleted', 'scorm'), get_string('forcecompleteddesc', 'scorm'), 0, $yesno));
 $settings->add(new admin_setting_configselect('scorm/forcenewattempt', get_string('forcenewattempt', 'scorm'), get_string('forcenewattemptdesc', 'scorm'), 0, $yesno));
 $settings->add(new admin_setting_configselect('scorm/autocommit', get_string('autocommit', 'scorm'), get_string('autocommitdesc', 'scorm'), 0, $yesno));
 $settings->add(new admin_setting_configselect('scorm/masteryoverride', get_string('masteryoverride', 'scorm'), get_string('masteryoverridedesc', 'scorm'), 1, $yesno));
 $settings->add(new admin_setting_configselect('scorm/lastattemptlock', get_string('lastattemptlock', 'scorm'), get_string('lastattemptlockdesc', 'scorm'), 0, $yesno));
 $settings->add(new admin_setting_configselect('scorm/auto', get_string('autocontinue', 'scorm'), get_string('autocontinuedesc', 'scorm'), 0, $yesno));
 $settings->add(new admin_setting_configselect('scorm/updatefreq', get_string('updatefreq', 'scorm'), get_string('updatefreqdesc', 'scorm'), 0, scorm_get_updatefreq_array()));
 // Admin level settings.
 $settings->add(new admin_setting_heading('scorm/adminsettings', get_string('adminsettings', 'scorm'), ''));
 $settings->add(new admin_setting_configcheckbox('scorm/scorm12standard', get_string('scorm12standard', 'scorm'), get_string('scorm12standarddesc', 'scorm'), 1));
 $settings->add(new admin_setting_configcheckbox('scorm/allowtypeexternal', get_string('allowtypeexternal', 'scorm'), '', 0));
 $settings->add(new admin_setting_configcheckbox('scorm/allowtypelocalsync', get_string('allowtypelocalsync', 'scorm'), '', 0));
 $settings->add(new admin_setting_configcheckbox('scorm/allowtypeexternalaicc', get_string('allowtypeexternalaicc', 'scorm'), get_string('allowtypeexternalaicc_desc', 'scorm'), 0));
 $settings->add(new admin_setting_configcheckbox('scorm/allowaicchacp', get_string('allowtypeaicchacp', 'scorm'), get_string('allowtypeaicchacp_desc', 'scorm'), 0));
 $settings->add(new admin_setting_configtext('scorm/aicchacptimeout', get_string('aicchacptimeout', 'scorm'), get_string('aicchacptimeout_desc', 'scorm'), 30, PARAM_INT));
开发者ID:evltuma,项目名称:moodle,代码行数:31,代码来源:settings.php

示例3: definition


//.........这里部分代码省略.........
     $mform->addElement('selectyesno', 'displaycoursestructure', get_string('displaycoursestructure', 'scorm'));
     $mform->addHelpButton('displaycoursestructure', 'displaycoursestructure', 'scorm');
     $mform->setDefault('displaycoursestructure', $cfgscorm->displaycoursestructure);
     $mform->setAdvanced('displaycoursestructure', $cfgscorm->displaycoursestructure_adv);
     // Toc display.
     $mform->addElement('select', 'hidetoc', get_string('hidetoc', 'scorm'), scorm_get_hidetoc_array());
     $mform->addHelpButton('hidetoc', 'hidetoc', 'scorm');
     $mform->setDefault('hidetoc', $cfgscorm->hidetoc);
     $mform->setAdvanced('hidetoc', $cfgscorm->hidetoc_adv);
     $mform->disabledIf('hidetoc', 'scormtype', 'eq', SCORM_TYPE_AICCURL);
     // Navigation panel display.
     $mform->addElement('select', 'nav', get_string('nav', 'scorm'), scorm_get_navigation_display_array());
     $mform->addHelpButton('nav', 'nav', 'scorm');
     $mform->setDefault('nav', $cfgscorm->nav);
     $mform->setAdvanced('nav', $cfgscorm->nav_adv);
     $mform->disabledIf('nav', 'hidetoc', 'noteq', SCORM_TOC_SIDE);
     // Navigation panel position from left.
     $mform->addElement('text', 'navpositionleft', get_string('fromleft', 'scorm'), 'maxlength="5" size="5"');
     $mform->setDefault('navpositionleft', $cfgscorm->navpositionleft);
     $mform->setType('navpositionleft', PARAM_INT);
     $mform->setAdvanced('navpositionleft', $cfgscorm->navpositionleft_adv);
     $mform->disabledIf('navpositionleft', 'hidetoc', 'noteq', SCORM_TOC_SIDE);
     $mform->disabledIf('navpositionleft', 'nav', 'noteq', SCORM_NAV_FLOATING);
     // Navigation panel position from top.
     $mform->addElement('text', 'navpositiontop', get_string('fromtop', 'scorm'), 'maxlength="5" size="5"');
     $mform->setDefault('navpositiontop', $cfgscorm->navpositiontop);
     $mform->setType('navpositiontop', PARAM_INT);
     $mform->setAdvanced('navpositiontop', $cfgscorm->navpositiontop_adv);
     $mform->disabledIf('navpositiontop', 'hidetoc', 'noteq', SCORM_TOC_SIDE);
     $mform->disabledIf('navpositiontop', 'nav', 'noteq', SCORM_NAV_FLOATING);
     // Display attempt status.
     $mform->addElement('select', 'displayattemptstatus', get_string('displayattemptstatus', 'scorm'), scorm_get_attemptstatus_array());
     $mform->addHelpButton('displayattemptstatus', 'displayattemptstatus', 'scorm');
     $mform->setDefault('displayattemptstatus', $cfgscorm->displayattemptstatus);
     $mform->setAdvanced('displayattemptstatus', $cfgscorm->displayattemptstatus_adv);
     // Availability.
     $mform->addElement('header', 'availability', get_string('availability'));
     $mform->addElement('date_time_selector', 'timeopen', get_string("scormopen", "scorm"), array('optional' => true));
     $mform->addElement('date_time_selector', 'timeclose', get_string("scormclose", "scorm"), array('optional' => true));
     // Grade Settings.
     $mform->addElement('header', 'gradesettings', get_string('grade'));
     // Grade Method.
     $mform->addElement('select', 'grademethod', get_string('grademethod', 'scorm'), scorm_get_grade_method_array());
     $mform->addHelpButton('grademethod', 'grademethod', 'scorm');
     $mform->setDefault('grademethod', $cfgscorm->grademethod);
     // Maximum Grade.
     for ($i = 0; $i <= 100; $i++) {
         $grades[$i] = "{$i}";
     }
     $mform->addElement('select', 'maxgrade', get_string('maximumgrade'), $grades);
     $mform->setDefault('maxgrade', $cfgscorm->maxgrade);
     $mform->disabledIf('maxgrade', 'grademethod', 'eq', GRADESCOES);
     // Attempts management.
     $mform->addElement('header', 'attemptsmanagementhdr', get_string('attemptsmanagement', 'scorm'));
     // Max Attempts.
     $mform->addElement('select', 'maxattempt', get_string('maximumattempts', 'scorm'), scorm_get_attempts_array());
     $mform->addHelpButton('maxattempt', 'maximumattempts', 'scorm');
     $mform->setDefault('maxattempt', $cfgscorm->maxattempt);
     // What Grade.
     $mform->addElement('select', 'whatgrade', get_string('whatgrade', 'scorm'), scorm_get_what_grade_array());
     $mform->disabledIf('whatgrade', 'maxattempt', 'eq', 1);
     $mform->addHelpButton('whatgrade', 'whatgrade', 'scorm');
     $mform->setDefault('whatgrade', $cfgscorm->whatgrade);
     // Force new attempt.
     $mform->addElement('selectyesno', 'forcenewattempt', get_string('forcenewattempt', 'scorm'));
     $mform->addHelpButton('forcenewattempt', 'forcenewattempt', 'scorm');
     $mform->setDefault('forcenewattempt', $cfgscorm->forcenewattempt);
     // Last attempt lock - lock the enter button after the last available attempt has been made.
     $mform->addElement('selectyesno', 'lastattemptlock', get_string('lastattemptlock', 'scorm'));
     $mform->addHelpButton('lastattemptlock', 'lastattemptlock', 'scorm');
     $mform->setDefault('lastattemptlock', $cfgscorm->lastattemptlock);
     // Compatibility settings.
     $mform->addElement('header', 'compatibilitysettingshdr', get_string('compatibilitysettings', 'scorm'));
     // Force completed.
     $mform->addElement('selectyesno', 'forcecompleted', get_string('forcecompleted', 'scorm'));
     $mform->addHelpButton('forcecompleted', 'forcecompleted', 'scorm');
     $mform->setDefault('forcecompleted', $cfgscorm->forcecompleted);
     // Autocontinue.
     $mform->addElement('selectyesno', 'auto', get_string('autocontinue', 'scorm'));
     $mform->addHelpButton('auto', 'autocontinue', 'scorm');
     $mform->setDefault('auto', $cfgscorm->auto);
     // Autocommit.
     $mform->addElement('selectyesno', 'autocommit', get_string('autocommit', 'scorm'));
     $mform->addHelpButton('autocommit', 'autocommit', 'scorm');
     $mform->setDefault('autocommit', $cfgscorm->autocommit);
     // Hidden Settings.
     $mform->addElement('hidden', 'datadir', null);
     $mform->setType('datadir', PARAM_RAW);
     $mform->addElement('hidden', 'pkgtype', null);
     $mform->setType('pkgtype', PARAM_RAW);
     $mform->addElement('hidden', 'launch', null);
     $mform->setType('launch', PARAM_RAW);
     $mform->addElement('hidden', 'redirect', null);
     $mform->setType('redirect', PARAM_RAW);
     $mform->addElement('hidden', 'redirecturl', null);
     $mform->setType('redirecturl', PARAM_RAW);
     $this->standard_coursemodule_elements();
     // Buttons.
     $this->add_action_buttons();
 }
开发者ID:janaece,项目名称:globalclassroom4_clean,代码行数:101,代码来源:mod_form.php

示例4: admin_setting_configselect_with_advanced

    }

    $settings->add(new admin_setting_configselect_with_advanced('scorm/maxgrade',
        get_string('maximumgrade'), get_string('maximumgradedesc', 'scorm'),
        array('value' => 100, 'adv' => false), $grades));

    $settings->add(new admin_setting_heading('scorm/othersettings', get_string('defaultothersettings', 'scorm'), ''));

    //default attempts settings.
    $settings->add(new admin_setting_configselect_with_advanced('scorm/maxattempt',
        get_string('maximumattempts', 'scorm'), '',
        array('value' => '0', 'adv' => false), scorm_get_attempts_array()));

    $settings->add(new admin_setting_configselect_with_advanced('scorm/whatgrade',
        get_string('whatgrade', 'scorm'), get_string('whatgradedesc', 'scorm'),
        array('value' => HIGHESTATTEMPT, 'adv' => false), scorm_get_what_grade_array()));

    $settings->add(new admin_setting_configselect_with_advanced('scorm/displayattemptstatus',
        get_string('displayattemptstatus', 'scorm'), get_string('displayattemptstatusdesc', 'scorm'),
        array('value' => 1, 'adv' => false), $yesno));

    $settings->add(new admin_setting_configselect_with_advanced('scorm/forcecompleted',
        get_string('forcecompleted', 'scorm'), get_string('forcecompleteddesc', 'scorm'),
        array('value' => 0, 'adv' => true), $yesno));

    $settings->add(new admin_setting_configselect_with_advanced('scorm/forcenewattempt',
        get_string('forcenewattempt', 'scorm'), get_string('forcenewattemptdesc', 'scorm'),
        array('value' => 0, 'adv' => true), $yesno));

    $settings->add(new admin_setting_configselect_with_advanced('scorm/lastattemptlock',
        get_string('lastattemptlock', 'scorm'), get_string('lastattemptlockdesc', 'scorm'),
开发者ID:JP-Git,项目名称:moodle,代码行数:31,代码来源:settings.php

示例5: definition

 function definition()
 {
     global $CFG, $COURSE;
     $mform =& $this->_form;
     if (isset($CFG->slasharguments) && !$CFG->slasharguments) {
         $mform->addElement('static', '', '', notify(get_string('slashargs', 'scorm'), 'notifyproblem', 'center', true));
     }
     $zlib = ini_get('zlib.output_compression');
     //check for zlib compression - if used, throw error because of IE bug. - SEE MDL-16185
     if (isset($zlib) && $zlib) {
         $mform->addElement('static', '', '', notify(get_string('zlibwarning', 'scorm'), 'notifyproblem', 'center', true));
     }
     //-------------------------------------------------------------------------------
     $mform->addElement('header', 'general', get_string('general', 'form'));
     // Name
     $mform->addElement('text', 'name', get_string('name'));
     if (!empty($CFG->formatstringstriptags)) {
         $mform->setType('name', PARAM_TEXT);
     } else {
         $mform->setType('name', PARAM_CLEAN);
     }
     $mform->addRule('name', null, 'required', null, 'client');
     // Summary
     $mform->addElement('htmleditor', 'summary', get_string('summary'));
     $mform->setType('summary', PARAM_RAW);
     $mform->addRule('summary', get_string('required'), 'required', null, 'client');
     $mform->setHelpButton('summary', array('writing', 'questions', 'richtext'), false, 'editorhelpbutton');
     // Reference
     $mform->addElement('choosecoursefileorimsrepo', 'reference', get_string('package', 'scorm'));
     $mform->setType('reference', PARAM_RAW);
     // We need to find a better PARAM
     $mform->addRule('reference', get_string('required'), 'required');
     $mform->setHelpButton('reference', array('package', get_string('package', 'scorm'), 'scorm'));
     //-------------------------------------------------------------------------------
     // Other Settings
     $mform->addElement('header', 'advanced', get_string('othersettings', 'form'));
     // Grade Method
     $mform->addElement('select', 'grademethod', get_string('grademethod', 'scorm'), scorm_get_grade_method_array());
     $mform->setHelpButton('grademethod', array('grademethod', get_string('grademethod', 'scorm'), 'scorm'));
     $mform->setDefault('grademethod', $CFG->scorm_grademethod);
     // Maximum Grade
     for ($i = 0; $i <= 100; $i++) {
         $grades[$i] = "{$i}";
     }
     $mform->addElement('select', 'maxgrade', get_string('maximumgrade'), $grades);
     $mform->setDefault('maxgrade', $CFG->scorm_maxgrade);
     $mform->disabledIf('maxgrade', 'grademethod', 'eq', GRADESCOES);
     // Attempts
     $mform->addElement('static', '', '', '<hr />');
     // Max Attempts
     $mform->addElement('select', 'maxattempt', get_string('maximumattempts', 'scorm'), scorm_get_attempts_array());
     $mform->setHelpButton('maxattempt', array('maxattempt', get_string('maximumattempts', 'scorm'), 'scorm'));
     $mform->setDefault('maxattempt', $CFG->scorm_maxattempts);
     // What Grade
     $mform->addElement('select', 'whatgrade', get_string('whatgrade', 'scorm'), scorm_get_what_grade_array());
     $mform->disabledIf('whatgrade', 'maxattempt', 'eq', 1);
     $mform->setHelpButton('whatgrade', array('whatgrade', get_string('whatgrade', 'scorm'), 'scorm'));
     $mform->setDefault('whatgrade', $CFG->scorm_whatgrade);
     $mform->setAdvanced('whatgrade');
     // Activation period
     /*        $mform->addElement('static', '', '' ,'<hr />');
             $mform->addElement('static', 'activation', get_string('activation','scorm'));
             $datestartgrp = array();
             $datestartgrp[] = &$mform->createElement('date_time_selector', 'startdate');
             $datestartgrp[] = &$mform->createElement('checkbox', 'startdisabled', null, get_string('disable'));
             $mform->addGroup($datestartgrp, 'startdategrp', get_string('from'), ' ', false);
             $mform->setDefault('startdate', 0);
             $mform->setDefault('startdisabled', 1);
             $mform->disabledIf('startdategrp', 'startdisabled', 'checked');
     
             $dateendgrp = array();
             $dateendgrp[] = &$mform->createElement('date_time_selector', 'enddate');
             $dateendgrp[] = &$mform->createElement('checkbox', 'enddisabled', null, get_string('disable'));
             $mform->addGroup($dateendgrp, 'dateendgrp', get_string('to'), ' ', false);
             $mform->setDefault('enddate', 0);
             $mform->setDefault('enddisabled', 1);
             $mform->disabledIf('dateendgrp', 'enddisabled', 'checked');
     */
     // Stage Size
     $mform->addElement('static', '', '', '<hr />');
     $mform->addElement('static', 'stagesize', get_string('stagesize', 'scorm'));
     $mform->setHelpButton('stagesize', array('stagesize', get_string('stagesize', 'scorm'), 'scorm'));
     // Width
     $mform->addElement('text', 'width', get_string('width', 'scorm'), 'maxlength="5" size="5"');
     $mform->setDefault('width', $CFG->scorm_framewidth);
     $mform->setType('width', PARAM_INT);
     // Height
     $mform->addElement('text', 'height', get_string('height', 'scorm'), 'maxlength="5" size="5"');
     $mform->setDefault('height', $CFG->scorm_frameheight);
     $mform->setType('height', PARAM_INT);
     // Framed / Popup Window
     $mform->addElement('select', 'popup', get_string('display', 'scorm'), scorm_get_popup_display_array());
     $mform->setDefault('popup', $CFG->scorm_popup);
     $mform->setAdvanced('popup');
     // Window Options
     $winoptgrp = array();
     foreach (scorm_get_popup_options_array() as $key => $value) {
         $winoptgrp[] =& $mform->createElement('checkbox', $key, '', get_string($key, 'scorm'));
         $mform->setDefault($key, $value);
     }
//.........这里部分代码省略.........
开发者ID:nagyistoce,项目名称:moodle-Teach-Pilot,代码行数:101,代码来源:mod_form.php

示例6: definition


//.........这里部分代码省略.........
        $mform->addElement('selectyesno', 'hidenav', get_string('hidenav', 'scorm'));
        $mform->setDefault('hidenav', $cfg_scorm->hidenav);
        $mform->setAdvanced('hidenav', $cfg_scorm->hidenav_adv);
        $mform->disabledIf('hidenav', 'hidetoc', 'noteq', 0);

        //-------------------------------------------------------------------------------
        // Grade Settings.
        $mform->addElement('header', 'gradesettings', get_string('gradesettings', 'scorm'));

        // Grade Method.
        $mform->addElement('select', 'grademethod', get_string('grademethod', 'scorm'), scorm_get_grade_method_array());
        $mform->addHelpButton('grademethod', 'grademethod', 'scorm');
        $mform->setDefault('grademethod', $cfg_scorm->grademethod);
        $mform->setAdvanced('grademethod', $cfg_scorm->grademethod_adv);

        // Maximum Grade.
        for ($i=0; $i<=100; $i++) {
            $grades[$i] = "$i";
        }
        $mform->addElement('select', 'maxgrade', get_string('maximumgrade'), $grades);
        $mform->setDefault('maxgrade', $cfg_scorm->maxgrade);
        $mform->disabledIf('maxgrade', 'grademethod', 'eq', GRADESCOES);
        $mform->setAdvanced('maxgrade', $cfg_scorm->maxgrade_adv);

        $mform->addElement('header', 'othersettings', get_string('othersettings', 'scorm'));

        // Max Attempts.
        $mform->addElement('select', 'maxattempt', get_string('maximumattempts', 'scorm'), scorm_get_attempts_array());
        $mform->addHelpButton('maxattempt', 'maximumattempts', 'scorm');
        $mform->setDefault('maxattempt', $cfg_scorm->maxattempt);
        $mform->setAdvanced('maxattempt', $cfg_scorm->maxattempt_adv);

        // What Grade.
        $mform->addElement('select', 'whatgrade', get_string('whatgrade', 'scorm'),  scorm_get_what_grade_array());
        $mform->disabledIf('whatgrade', 'maxattempt', 'eq', 1);
        $mform->addHelpButton('whatgrade', 'whatgrade', 'scorm');
        $mform->setDefault('whatgrade', $cfg_scorm->whatgrade);
        $mform->setAdvanced('whatgrade', $cfg_scorm->whatgrade_adv);

        // Display attempt status.
        $mform->addElement('selectyesno', 'displayattemptstatus', get_string('displayattemptstatus', 'scorm'));
        $mform->addHelpButton('displayattemptstatus', 'displayattemptstatus', 'scorm');
        $mform->setDefault('displayattemptstatus', $cfg_scorm->displayattemptstatus);
        $mform->setAdvanced('displayattemptstatus', $cfg_scorm->displayattemptstatus_adv);

        // Force completed
        $mform->addElement('selectyesno', 'forcecompleted', get_string('forcecompleted', 'scorm'));
        $mform->addHelpButton('forcecompleted', 'forcecompleted', 'scorm');
        $mform->setDefault('forcecompleted', $cfg_scorm->forcecompleted);
        $mform->setAdvanced('forcecompleted', $cfg_scorm->forcecompleted_adv);

        // Force new attempt.
        $mform->addElement('selectyesno', 'forcenewattempt', get_string('forcenewattempt', 'scorm'));
        $mform->addHelpButton('forcenewattempt', 'forcenewattempt', 'scorm');
        $mform->setDefault('forcenewattempt', $cfg_scorm->forcenewattempt);
        $mform->setAdvanced('forcenewattempt', $cfg_scorm->forcenewattempt_adv);

        // Last attempt lock - lock the enter button after the last available attempt has been made.
        $mform->addElement('selectyesno', 'lastattemptlock', get_string('lastattemptlock', 'scorm'));
        $mform->addHelpButton('lastattemptlock', 'lastattemptlock', 'scorm');
        $mform->setDefault('lastattemptlock', $cfg_scorm->lastattemptlock);
        $mform->setAdvanced('lastattemptlock', $cfg_scorm->lastattemptlock_adv);

        // Activation period.
/*        $mform->addElement('static', '', '' ,'<hr />');
        $mform->addElement('static', 'activation', get_string('activation','scorm'));
开发者ID:ncsu-delta,项目名称:moodle,代码行数:67,代码来源:mod_form.php

示例7: admin_setting_configselect_with_advanced

 }
 $settings->add(new admin_setting_configselect_with_advanced('scorm/skipview', get_string('skipview', 'scorm'), get_string('skipviewdesc', 'scorm'), array('value' => 0, 'adv' => true), scorm_get_skip_view_array()));
 $settings->add(new admin_setting_configselect_with_advanced('scorm/hidebrowse', get_string('hidebrowse', 'scorm'), get_string('hidebrowsedesc', 'scorm'), array('value' => 0, 'adv' => true), $yesno));
 $settings->add(new admin_setting_configselect_with_advanced('scorm/hidetoc', get_string('hidetoc', 'scorm'), get_string('hidetocdesc', 'scorm'), array('value' => 0, 'adv' => true), scorm_get_hidetoc_array()));
 $settings->add(new admin_setting_configselect_with_advanced('scorm/hidenav', get_string('hidenav', 'scorm'), get_string('hidenavdesc', 'scorm'), array('value' => 0, 'adv' => false), $yesno));
 //default grade settings
 $settings->add(new admin_setting_heading('scorm/gradesettings', get_string('defaultgradesettings', 'scorm'), ''));
 $settings->add(new admin_setting_configselect_with_advanced('scorm/grademethod', get_string('grademethod', 'scorm'), get_string('grademethoddesc', 'scorm'), array('value' => GRADEHIGHEST, 'adv' => false), scorm_get_grade_method_array()));
 for ($i = 0; $i <= 100; $i++) {
     $grades[$i] = "{$i}";
 }
 $settings->add(new admin_setting_configselect_with_advanced('scorm/maxgrade', get_string('maximumgrade'), get_string('maximumgradedesc', 'scorm'), array('value' => 100, 'adv' => false), $grades));
 $settings->add(new admin_setting_heading('scorm/othersettings', get_string('defaultothersettings', 'scorm'), ''));
 //default attempts settings.
 $settings->add(new admin_setting_configselect_with_advanced('scorm/maxattempts', get_string('maximumattempts', 'scorm'), '', array('value' => '0', 'adv' => false), scorm_get_attempts_array()));
 $settings->add(new admin_setting_configselect_with_advanced('scorm/whatgrade', get_string('whatgrade', 'scorm'), get_string('whatgradedesc', 'scorm'), array('value' => HIGHESTATTEMPT, 'adv' => false), scorm_get_what_grade_array()));
 $settings->add(new admin_setting_configselect_with_advanced('scorm/displayattemptstatus', get_string('displayattemptstatus', 'scorm'), get_string('displayattemptstatusdesc', 'scorm'), array('value' => 1, 'adv' => false), $yesno));
 $settings->add(new admin_setting_configselect_with_advanced('scorm/forcecompleted', get_string('forcecompleted', 'scorm'), get_string('forcecompleteddesc', 'scorm'), array('value' => 0, 'adv' => true), $yesno));
 $settings->add(new admin_setting_configselect_with_advanced('scorm/forcenewattempt', get_string('forcenewattempt', 'scorm'), get_string('forcenewattemptdesc', 'scorm'), array('value' => 0, 'adv' => true), $yesno));
 $settings->add(new admin_setting_configselect_with_advanced('scorm/lastattemptlock', get_string('lastattemptlock', 'scorm'), get_string('lastattemptlockdesc', 'scorm'), array('value' => 0, 'adv' => true), $yesno));
 $settings->add(new admin_setting_configselect_with_advanced('scorm/auto', get_string('autocontinue', 'scorm'), get_string('autocontinuedesc', 'scorm'), array('value' => 0, 'adv' => true), $yesno));
 $settings->add(new admin_setting_configselect_with_advanced('scorm/updatefreq', get_string('updatefreq', 'scorm'), get_string('updatefreqdesc', 'scorm'), array('value' => 0, 'adv' => true), scorm_get_updatefreq_array()));
 //admin level settings.
 $settings->add(new admin_setting_heading('scorm/adminsettings', get_string('adminsettings', 'scorm'), ''));
 $settings->add(new admin_setting_configcheckbox('scorm/allowtypeexternal', get_string('allowtypeexternal', 'scorm'), '', 0));
 $settings->add(new admin_setting_configcheckbox('scorm/allowtypelocalsync', get_string('allowtypelocalsync', 'scorm'), '', 0));
 $settings->add(new admin_setting_configcheckbox('scorm/allowtypeimsrepository', get_string('allowtypeimsrepository', 'scorm'), '', 0));
 $settings->add(new admin_setting_configcheckbox('scorm/allowtypeexternalaicc', get_string('allowtypeexternalaicc', 'scorm'), get_string('allowtypeexternalaicc_desc', 'scorm'), 0));
 $settings->add(new admin_setting_configcheckbox('scorm/allowaicchacp', get_string('allowtypeaicchacp', 'scorm'), get_string('allowtypeaicchacp_desc', 'scorm'), 0));
 $settings->add(new admin_setting_configtext('scorm/aicchacptimeout', get_string('aicchacptimeout', 'scorm'), get_string('aicchacptimeout_desc', 'scorm'), 30, PARAM_INT));
 $settings->add(new admin_setting_configtext('scorm/aicchacpkeepsessiondata', get_string('aicchacpkeepsessiondata', 'scorm'), get_string('aicchacpkeepsessiondata_desc', 'scorm'), 1, PARAM_INT));
开发者ID:nmicha,项目名称:moodle,代码行数:31,代码来源:settings.php

示例8: admin_setting_configselect

    for ($i=0; $i<=100; $i++) {
        $grades[$i] = "$i";
    }

    $settings->add(new admin_setting_configselect('scorm/maxgrade',
        get_string('maximumgrade'), get_string('maximumgradedesc', 'scorm'), 100, $grades));

    $settings->add(new admin_setting_heading('scorm/othersettings', get_string('defaultothersettings', 'scorm'), ''));

    //default attempts settings.
    $settings->add(new admin_setting_configselect('scorm/maxattempt',
        get_string('maximumattempts', 'scorm'), '', '0', scorm_get_attempts_array()));

    $settings->add(new admin_setting_configselect('scorm/whatgrade',
        get_string('whatgrade', 'scorm'), get_string('whatgradedesc', 'scorm'), HIGHESTATTEMPT, scorm_get_what_grade_array()));

    $settings->add(new admin_setting_configselect('scorm/forcecompleted',
        get_string('forcecompleted', 'scorm'), get_string('forcecompleteddesc', 'scorm'), 0, $yesno));

    $settings->add(new admin_setting_configselect('scorm/forcenewattempt',
        get_string('forcenewattempt', 'scorm'), get_string('forcenewattemptdesc', 'scorm'), 0, $yesno));

    $settings->add(new admin_setting_configselect('scorm/lastattemptlock',
        get_string('lastattemptlock', 'scorm'), get_string('lastattemptlockdesc', 'scorm'), 0, $yesno));

    $settings->add(new admin_setting_configselect('scorm/auto',
        get_string('autocontinue', 'scorm'), get_string('autocontinuedesc', 'scorm'), 0, $yesno));

    $settings->add(new admin_setting_configselect('scorm/updatefreq',
        get_string('updatefreq', 'scorm'), get_string('updatefreqdesc', 'scorm'), 0, scorm_get_updatefreq_array()));
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:30,代码来源:settings.php


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