MDL-32572 fix notice when changing internal auth_db passwords
[moodle.git] / mod / scorm / settings.php
blobe45d0ce788819e568f66e594c389135477705324
1 <?php
2 // This file is part of Moodle - http://moodle.org/
3 //
4 // Moodle is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // Moodle is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
17 defined('MOODLE_INTERNAL') || die;
19 if ($ADMIN->fulltree) {
20 require_once($CFG->dirroot . '/mod/scorm/locallib.php');
21 $yesno = array(0 => get_string('no'),
22 1 => get_string('yes'));
24 //default display settings
25 $settings->add(new admin_setting_heading('scorm/displaysettings', get_string('defaultdisplaysettings', 'scorm'), ''));
27 $settings->add(new admin_setting_configselect_with_advanced('scorm/displaycoursestructure',
28 get_string('displaycoursestructure', 'scorm'), get_string('displaycoursestructuredesc', 'scorm'),
29 array('value' => 0, 'adv' => false), $yesno));
31 $settings->add(new admin_setting_configselect_with_advanced('scorm/popup',
32 get_string('display', 'scorm'), get_string('displaydesc', 'scorm'),
33 array('value' => 0, 'adv' => false), scorm_get_popup_display_array()));
35 $settings->add(new admin_setting_configtext_with_advanced('scorm/framewidth',
36 get_string('width', 'scorm'), get_string('framewidth', 'scorm'),
37 array('value' => '100', 'adv' => true)));
39 $settings->add(new admin_setting_configtext_with_advanced('scorm/frameheight',
40 get_string('height', 'scorm'), get_string('frameheight', 'scorm'),
41 array('value' => '500', 'adv' => true)));
43 $settings->add(new admin_setting_configcheckbox('scorm/winoptgrp_adv',
44 get_string('optionsadv', 'scorm'), get_string('optionsadv_desc', 'scorm'), 1));
46 foreach (scorm_get_popup_options_array() as $key => $value) {
47 $settings->add(new admin_setting_configcheckbox('scorm/'.$key,
48 get_string($key, 'scorm'), '', $value));
51 $settings->add(new admin_setting_configselect_with_advanced('scorm/skipview',
52 get_string('skipview', 'scorm'), get_string('skipviewdesc', 'scorm'),
53 array('value' => 0, 'adv' => true), scorm_get_skip_view_array()));
55 $settings->add(new admin_setting_configselect_with_advanced('scorm/hidebrowse',
56 get_string('hidebrowse', 'scorm'), get_string('hidebrowsedesc', 'scorm'),
57 array('value' => 0, 'adv' => true), $yesno));
59 $settings->add(new admin_setting_configselect_with_advanced('scorm/hidetoc',
60 get_string('hidetoc', 'scorm'), get_string('hidetocdesc', 'scorm'),
61 array('value' => 0, 'adv' => true), scorm_get_hidetoc_array()));
63 $settings->add(new admin_setting_configselect_with_advanced('scorm/hidenav',
64 get_string('hidenav', 'scorm'), get_string('hidenavdesc', 'scorm'),
65 array('value' => 0, 'adv' => false), $yesno));
68 //default grade settings
69 $settings->add(new admin_setting_heading('scorm/gradesettings', get_string('defaultgradesettings', 'scorm'), ''));
70 $settings->add(new admin_setting_configselect_with_advanced('scorm/grademethod',
71 get_string('grademethod', 'scorm'), get_string('grademethoddesc', 'scorm'),
72 array('value' => GRADEHIGHEST, 'adv' => false), scorm_get_grade_method_array()));
74 for ($i=0; $i<=100; $i++) {
75 $grades[$i] = "$i";
78 $settings->add(new admin_setting_configselect_with_advanced('scorm/maxgrade',
79 get_string('maximumgrade'), get_string('maximumgradedesc', 'scorm'),
80 array('value' => 100, 'adv' => false), $grades));
82 $settings->add(new admin_setting_heading('scorm/othersettings', get_string('defaultothersettings', 'scorm'), ''));
84 //default attempts settings.
85 $settings->add(new admin_setting_configselect_with_advanced('scorm/maxattempts',
86 get_string('maximumattempts', 'scorm'), '',
87 array('value' => '0', 'adv' => false), scorm_get_attempts_array()));
89 $settings->add(new admin_setting_configselect_with_advanced('scorm/whatgrade',
90 get_string('whatgrade', 'scorm'), get_string('whatgradedesc', 'scorm'),
91 array('value' => HIGHESTATTEMPT, 'adv' => false), scorm_get_what_grade_array()));
93 $settings->add(new admin_setting_configselect_with_advanced('scorm/displayattemptstatus',
94 get_string('displayattemptstatus', 'scorm'), get_string('displayattemptstatusdesc', 'scorm'),
95 array('value' => 1, 'adv' => false), $yesno));
97 $settings->add(new admin_setting_configselect_with_advanced('scorm/forcecompleted',
98 get_string('forcecompleted', 'scorm'), get_string('forcecompleteddesc', 'scorm'),
99 array('value' => 0, 'adv' => true), $yesno));
101 $settings->add(new admin_setting_configselect_with_advanced('scorm/forcenewattempt',
102 get_string('forcenewattempt', 'scorm'), get_string('forcenewattemptdesc', 'scorm'),
103 array('value' => 0, 'adv' => true), $yesno));
105 $settings->add(new admin_setting_configselect_with_advanced('scorm/lastattemptlock',
106 get_string('lastattemptlock', 'scorm'), get_string('lastattemptlockdesc', 'scorm'),
107 array('value' => 0, 'adv' => true), $yesno));
109 $settings->add(new admin_setting_configselect_with_advanced('scorm/auto',
110 get_string('autocontinue', 'scorm'), get_string('autocontinuedesc', 'scorm'),
111 array('value' => 0, 'adv' => true), $yesno));
113 $settings->add(new admin_setting_configselect_with_advanced('scorm/updatefreq',
114 get_string('updatefreq', 'scorm'), get_string('updatefreqdesc', 'scorm'),
115 array('value' => 0, 'adv' => true), scorm_get_updatefreq_array()));
117 //admin level settings.
118 $settings->add(new admin_setting_heading('scorm/adminsettings', get_string('adminsettings', 'scorm'), ''));
120 $settings->add(new admin_setting_configcheckbox('scorm/allowtypeexternal', get_string('allowtypeexternal', 'scorm'), '', 0));
122 $settings->add(new admin_setting_configcheckbox('scorm/allowtypelocalsync', get_string('allowtypelocalsync', 'scorm'), '', 0));
124 $settings->add(new admin_setting_configcheckbox('scorm/allowtypeimsrepository', get_string('allowtypeimsrepository', 'scorm'), '', 0));
126 $settings->add(new admin_setting_configcheckbox('scorm/allowtypeexternalaicc', get_string('allowtypeexternalaicc', 'scorm'), get_string('allowtypeexternalaicc_desc', 'scorm'), 0));
128 $settings->add(new admin_setting_configcheckbox('scorm/allowaicchacp', get_string('allowtypeaicchacp', 'scorm'), get_string('allowtypeaicchacp_desc', 'scorm'), 0));
130 $settings->add(new admin_setting_configtext('scorm/aicchacptimeout',
131 get_string('aicchacptimeout', 'scorm'), get_string('aicchacptimeout_desc', 'scorm'),
132 30, PARAM_INT));
134 $settings->add(new admin_setting_configtext('scorm/aicchacpkeepsessiondata',
135 get_string('aicchacpkeepsessiondata', 'scorm'), get_string('aicchacpkeepsessiondata_desc', 'scorm'),
136 1, PARAM_INT));
138 $settings->add(new admin_setting_configcheckbox('scorm/forcejavascript', get_string('forcejavascript', 'scorm'), get_string('forcejavascript_desc', 'scorm'), 1));
140 $settings->add(new admin_setting_configcheckbox('scorm/allowapidebug', get_string('allowapidebug', 'scorm'), '', 0));
142 $settings->add(new admin_setting_configtext('scorm/apidebugmask', get_string('apidebugmask', 'scorm'), '', '.*'));