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


PHP scorm_get_updatefreq_array函数代码示例

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


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

示例1: definition


//.........这里部分代码省略.........
     // 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
     $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);
     }
     $mform->addGroup($winoptgrp, 'winoptgrp', get_string('options', 'scorm'), '<br />', false);
     $mform->setAdvanced('winoptgrp');
     $mform->disabledIf('winoptgrp', 'popup', 'eq', 0);
     // Skip view page
     $mform->addElement('select', 'skipview', get_string('skipview', 'scorm'), scorm_get_skip_view_array());
     $mform->setHelpButton('skipview', array('skipview', get_string('skipview', 'scorm'), 'scorm'));
     $mform->setDefault('skipview', $cfg_scorm->skipview);
     $mform->setAdvanced('skipview');
     // Hide Browse
     $mform->addElement('selectyesno', 'hidebrowse', get_string('hidebrowse', 'scorm'));
     $mform->setHelpButton('hidebrowse', array('hidebrowse', get_string('hidebrowse', 'scorm'), 'scorm'));
     $mform->setDefault('hidebrowse', $cfg_scorm->hidebrowse);
     $mform->setAdvanced('hidebrowse');
     // Toc display
     $mform->addElement('select', 'hidetoc', get_string('hidetoc', 'scorm'), scorm_get_hidetoc_array());
     $mform->setDefault('hidetoc', $cfg_scorm->hidetoc);
     $mform->setAdvanced('hidetoc');
     // Hide Navigation panel
     $mform->addElement('selectyesno', 'hidenav', get_string('hidenav', 'scorm'));
     $mform->setDefault('hidenav', $cfg_scorm->hidenav);
     $mform->setAdvanced('hidenav');
     // Autocontinue
     $mform->addElement('selectyesno', 'auto', get_string('autocontinue', 'scorm'));
     $mform->setHelpButton('auto', array('autocontinue', get_string('autocontinue', 'scorm'), 'scorm'));
     $mform->setDefault('auto', $cfg_scorm->auto);
     $mform->setAdvanced('auto');
     // Update packages timing
     $mform->addElement('select', 'updatefreq', get_string('updatefreq', 'scorm'), scorm_get_updatefreq_array());
     $mform->setDefault('updatefreq', $cfg_scorm->updatefreq);
     $mform->setAdvanced('updatefreq');
     //-------------------------------------------------------------------------------
     // Hidden Settings
     $mform->addElement('hidden', 'datadir', null);
     $mform->addElement('hidden', 'pkgtype', null);
     $mform->addElement('hidden', 'launch', null);
     $mform->addElement('hidden', 'redirect', null);
     $mform->addElement('hidden', 'redirecturl', null);
     //-------------------------------------------------------------------------------
     $this->standard_coursemodule_elements();
     //-------------------------------------------------------------------------------
     // buttons
     $this->add_action_buttons();
 }
开发者ID:ajv,项目名称:Offline-Caching,代码行数:101,代码来源:mod_form.php

示例2: admin_setting_configselect

    $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));
    $settings->add(new admin_setting_configtext('scorm/aicchacpkeepsessiondata', get_string('aicchacpkeepsessiondata', 'scorm'), get_string('aicchacpkeepsessiondata_desc', 'scorm'), 1, PARAM_INT));
    $settings->add(new admin_setting_configcheckbox('scorm/aiccuserid', get_string('aiccuserid', 'scorm'), get_string('aiccuserid_desc', 'scorm'), 1));
    $settings->add(new admin_setting_configcheckbox('scorm/forcejavascript', get_string('forcejavascript', 'scorm'), get_string('forcejavascript_desc', 'scorm'), 1));
    $settings->add(new admin_setting_configcheckbox('scorm/allowapidebug', get_string('allowapidebug', 'scorm'), '', 0));
    $settings->add(new admin_setting_configtext('scorm/apidebugmask', get_string('apidebugmask', 'scorm'), '', '.*'));
    $settings->add(new admin_setting_configcheckbox('scorm/protectpackagedownloads', get_string('protectpackagedownloads', 'scorm'), get_string('protectpackagedownloads_desc', 'scorm'), 0));
}
开发者ID:evltuma,项目名称:moodle,代码行数:31,代码来源:settings.php

示例3: definition

 public function definition()
 {
     global $CFG, $COURSE, $OUTPUT;
     $cfgscorm = get_config('scorm');
     $mform = $this->_form;
     if (!$CFG->slasharguments) {
         $mform->addElement('static', '', '', $OUTPUT->notification(get_string('slashargs', 'scorm'), 'notifyproblem'));
     }
     $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_CLEANHTML);
     }
     $mform->addRule('name', null, 'required', null, 'client');
     $mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
     // Summary.
     $this->add_intro_editor(true);
     // Package.
     $mform->addElement('header', 'packagehdr', get_string('packagehdr', 'scorm'));
     $mform->setExpanded('packagehdr', true);
     // Scorm types.
     $scormtypes = array(SCORM_TYPE_LOCAL => get_string('typelocal', 'scorm'));
     if ($cfgscorm->allowtypeexternal) {
         $scormtypes[SCORM_TYPE_EXTERNAL] = get_string('typeexternal', 'scorm');
     }
     if ($cfgscorm->allowtypelocalsync) {
         $scormtypes[SCORM_TYPE_LOCALSYNC] = get_string('typelocalsync', 'scorm');
     }
     if ($cfgscorm->allowtypeexternalaicc) {
         $scormtypes[SCORM_TYPE_AICCURL] = get_string('typeaiccurl', 'scorm');
     }
     // Reference.
     if (count($scormtypes) > 1) {
         $mform->addElement('select', 'scormtype', get_string('scormtype', 'scorm'), $scormtypes);
         $mform->setType('scormtype', PARAM_ALPHA);
         $mform->addHelpButton('scormtype', 'scormtype', 'scorm');
         $mform->addElement('text', 'packageurl', get_string('packageurl', 'scorm'), array('size' => 60));
         $mform->setType('packageurl', PARAM_RAW);
         $mform->addHelpButton('packageurl', 'packageurl', 'scorm');
         $mform->disabledIf('packageurl', 'scormtype', 'eq', SCORM_TYPE_LOCAL);
     } else {
         $mform->addElement('hidden', 'scormtype', SCORM_TYPE_LOCAL);
         $mform->setType('scormtype', PARAM_ALPHA);
     }
     // New local package upload.
     $filemanageroptions = array();
     $filemanageroptions['accepted_types'] = array('.zip', '.xml');
     $filemanageroptions['maxbytes'] = 0;
     $filemanageroptions['maxfiles'] = 1;
     $filemanageroptions['subdirs'] = 0;
     $mform->addElement('filemanager', 'packagefile', get_string('package', 'scorm'), null, $filemanageroptions);
     $mform->addHelpButton('packagefile', 'package', 'scorm');
     $mform->disabledIf('packagefile', 'scormtype', 'noteq', SCORM_TYPE_LOCAL);
     // Update packages timing.
     $mform->addElement('select', 'updatefreq', get_string('updatefreq', 'scorm'), scorm_get_updatefreq_array());
     $mform->setType('updatefreq', PARAM_INT);
     $mform->setDefault('updatefreq', $cfgscorm->updatefreq);
     $mform->addHelpButton('updatefreq', 'updatefreq', 'scorm');
     // Display Settings.
     $mform->addElement('header', 'displaysettings', get_string('appearance'));
     // Framed / Popup Window.
     $mform->addElement('select', 'popup', get_string('display', 'scorm'), scorm_get_popup_display_array());
     $mform->setDefault('popup', $cfgscorm->popup);
     $mform->setAdvanced('popup', $cfgscorm->popup_adv);
     // Width.
     $mform->addElement('text', 'width', get_string('width', 'scorm'), 'maxlength="5" size="5"');
     $mform->setDefault('width', $cfgscorm->framewidth);
     $mform->setType('width', PARAM_INT);
     $mform->setAdvanced('width', $cfgscorm->framewidth_adv);
     $mform->disabledIf('width', 'popup', 'eq', 0);
     // Height.
     $mform->addElement('text', 'height', get_string('height', 'scorm'), 'maxlength="5" size="5"');
     $mform->setDefault('height', $cfgscorm->frameheight);
     $mform->setType('height', PARAM_INT);
     $mform->setAdvanced('height', $cfgscorm->frameheight_adv);
     $mform->disabledIf('height', 'popup', 'eq', 0);
     // 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);
     }
     $mform->addGroup($winoptgrp, 'winoptgrp', get_string('options', 'scorm'), '<br />', false);
     $mform->disabledIf('winoptgrp', 'popup', 'eq', 0);
     $mform->setAdvanced('winoptgrp', $cfgscorm->winoptgrp_adv);
     // Display activity name.
     $mform->addElement('advcheckbox', 'displayactivityname', get_string('displayactivityname', 'scorm'));
     $mform->addHelpButton('displayactivityname', 'displayactivityname', 'scorm');
     $mform->setDefault('displayactivityname', $cfgscorm->displayactivityname);
     // Skip view page.
     $skipviewoptions = scorm_get_skip_view_array();
     if ($COURSE->format == 'singleactivity') {
         // Remove option that would cause a constant redirect.
         unset($skipviewoptions[SCORM_SKIPVIEW_ALWAYS]);
         if ($cfgscorm->skipview == SCORM_SKIPVIEW_ALWAYS) {
             $cfgscorm->skipview = SCORM_SKIPVIEW_FIRST;
         }
//.........这里部分代码省略.........
开发者ID:janaece,项目名称:globalclassroom4_clean,代码行数:101,代码来源:mod_form.php

示例4: admin_setting_configselect_with_advanced

    $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',
开发者ID:JP-Git,项目名称:moodle,代码行数:30,代码来源:settings.php

示例5: definition


//.........这里部分代码省略.........
     $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);
     }
     $mform->addGroup($winoptgrp, 'winoptgrp', get_string('options', 'scorm'), '<br />', false);
     $mform->setAdvanced('winoptgrp');
     $mform->disabledIf('winoptgrp', 'popup', 'eq', 0);
     // Skip view page
     $mform->addElement('select', 'skipview', get_string('skipview', 'scorm'), scorm_get_skip_view_array());
     $mform->setHelpButton('skipview', array('skipview', get_string('skipview', 'scorm'), 'scorm'));
     $mform->setDefault('skipview', $CFG->scorm_skipview);
     $mform->setAdvanced('skipview');
     // Hide Browse
     $mform->addElement('selectyesno', 'hidebrowse', get_string('hidebrowse', 'scorm'));
     $mform->setHelpButton('hidebrowse', array('hidebrowse', get_string('hidebrowse', 'scorm'), 'scorm'));
     $mform->setDefault('hidebrowse', $CFG->scorm_hidebrowse);
     $mform->setAdvanced('hidebrowse');
     // Toc display
     $mform->addElement('select', 'hidetoc', get_string('hidetoc', 'scorm'), scorm_get_hidetoc_array());
     $mform->setDefault('hidetoc', $CFG->scorm_hidetoc);
     $mform->setAdvanced('hidetoc');
     // Hide Navigation panel
     $mform->addElement('selectyesno', 'hidenav', get_string('hidenav', 'scorm'));
     $mform->setDefault('hidenav', $CFG->scorm_hidenav);
     $mform->setAdvanced('hidenav');
     // Autocontinue
     $mform->addElement('selectyesno', 'auto', get_string('autocontinue', 'scorm'));
     $mform->setHelpButton('auto', array('autocontinue', get_string('autocontinue', 'scorm'), 'scorm'));
     $mform->setDefault('auto', $CFG->scorm_auto);
     $mform->setAdvanced('auto');
     // Update packages timing
     $mform->addElement('select', 'updatefreq', get_string('updatefreq', 'scorm'), scorm_get_updatefreq_array());
     $mform->setDefault('updatefreq', $CFG->scorm_updatefreq);
     $mform->setAdvanced('updatefreq');
     //-------------------------------------------------------------------------------
     // 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);
     //-------------------------------------------------------------------------------
     $features = new stdClass();
     $features->groups = false;
     $features->groupings = true;
     $features->groupmembersonly = true;
     $this->standard_coursemodule_elements($features);
     //-------------------------------------------------------------------------------
     // buttons
     $this->add_action_buttons();
 }
开发者ID:nagyistoce,项目名称:moodle-Teach-Pilot,代码行数:101,代码来源:mod_form.php

示例6: definition


//.........这里部分代码省略.........
        }
        $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'));
        $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');
*/

        // Autocontinue.
        $mform->addElement('selectyesno', 'auto', get_string('autocontinue', 'scorm'));
        $mform->addHelpButton('auto', 'autocontinue', 'scorm');
        $mform->setDefault('auto', $cfg_scorm->auto);
        $mform->setAdvanced('auto', $cfg_scorm->auto_adv);

        if (count($scormtypes) > 1) {
            // Update packages timing.
            $mform->addElement('select', 'updatefreq', get_string('updatefreq', 'scorm'), scorm_get_updatefreq_array());
            $mform->setDefault('updatefreq', $cfg_scorm->updatefreq);
            $mform->setAdvanced('updatefreq', $cfg_scorm->updatefreq_adv);
            $mform->addHelpButton('updatefreq', 'updatefreq', 'scorm');
            $mform->disabledIf('updatefreq', 'scormtype', 'eq', SCORM_TYPE_LOCAL);
        } else {
            $mform->addElement('hidden', 'updatefreq', 0);
        }
        //-------------------------------------------------------------------------------
        // 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:ncsu-delta,项目名称:moodle,代码行数:101,代码来源:mod_form.php

示例7: admin_setting_configselect_with_advanced

    $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));
    $settings->add(new admin_setting_configcheckbox('scorm/forcejavascript', get_string('forcejavascript', 'scorm'), get_string('forcejavascript_desc', 'scorm'), 1));
    $settings->add(new admin_setting_configcheckbox('scorm/allowapidebug', get_string('allowapidebug', 'scorm'), '', 0));
    $settings->add(new admin_setting_configtext('scorm/apidebugmask', get_string('apidebugmask', 'scorm'), '', '.*'));
}
开发者ID:nmicha,项目名称:moodle,代码行数:31,代码来源:settings.php

示例8: get_string

        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()));

    //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',
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:31,代码来源:settings.php


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