From f3f7610c9013bd06ae0033e0143cc87e68c64bf3 Mon Sep 17 00:00:00 2001 From: Martin Langhoff Date: Thu, 4 Jan 2007 13:15:04 +1300 Subject: [PATCH] cvsimport fixups -- cvshead had strayed from upstream --- admin/config.php | 185 - admin/configvars.php | 660 ---- admin/index.php | 4 + admin/roles/assign.php | 2 +- admin/uploaduser.php | 4 +- admin/utfdbmigrate.html | 70 - admin/utfdbmigrate.php | 1238 ------- .../get_db_directories.class.php | 8 + backup/backuplib.php | 8 +- backup/db/migrate2utf8.php | 42 - backup/db/migrate2utf8.xml | 36 - blocks/admin/block_admin.php | 2 +- blocks/db/migrate2utf8.php | 190 - blocks/db/migrate2utf8.xml | 31 - blocks/online_users/block_online_users.php | 4 +- blocks/pagedemo.php | 204 -- blocks/quiz_results/block_quiz_results.php | 4 +- blocks/rss_client/db/migrate2utf8.php | 140 - blocks/rss_client/db/migrate2utf8.xml | 24 - blog/header.php | 15 +- blog/index.php | 2 +- blog/lib.php | 9 +- blog/rsslib.php | 3 +- calendar/event.php | 6 +- course/groups.php | 8 +- course/lib.php | 6 +- doc/COPYRIGHT.txt | 20 - doc/contents.php | 38 - doc/docstyles.css | 131 - doc/index.php | 54 - doc/install.html | 421 --- doc/top.php | 24 - doc/view.php | 40 - enrol/authorize/db/migrate2utf8.xml | 18 - group/assign.php | 182 + group/db/dbbasicgrouplib.php | 89 +- group/db/dbgroupinglib.php | 6 +- group/db/dbsetup.php | 40 +- group/db/install.xml | 96 + group/db/mysql.sql | 42 +- group/db/postgres7.sql | 106 +- group/db/upgrade.php | 223 ++ group/group.php | 208 ++ group/grouping.php | 132 + group/install.php | 56 - group/install.sql | 199 - group/lib.php | 21 + group/lib/basicgrouplib.php | 83 +- group/lib/groupinglib.php | 60 +- group/lib/legacylib.php | 181 +- group/lib/utillib.php | 82 +- group/simpletest/test_basicgrouplib.php | 9 +- group/simpletest/test_groupinglib.php | 2 +- group/version.php | 11 + lang/en_utf8/group.php | 20 +- lang/en_utf8/help/lesson/deleteattempts.html | 3 + lib/accesslib.php | 26 +- lib/adodb/adodb-connection.inc.php | 1787 --------- lib/adodb/adodb-cryptsession.php | 316 -- lib/adodb/adodb-recordset.inc.php | 919 ----- lib/adodb/adodb-session-clob.php | 439 --- lib/adodb/adodb-session.php | 398 -- .../Changelog | 43 - .../INSTALL | 8 - .../LICENSE | 544 --- .../adodb-xmlschema-0.0.1-snap20030511/README | 36 - .../adodb-xmlschema.inc.php | 722 ---- .../docs/blank.html | 114 - .../docs/classtrees_xmlschema.html | 28 - .../docs/elementindex.html | 99 - .../docs/elementindex_xmlschema.html | 109 - .../docs/errors.html | 20 - .../docs/index.html | 17 - .../docs/li_xmlschema.html | 38 - .../docs/media/stylesheet.css | 94 - .../docs/packages.html | 25 - .../docs/xmlschema/_adodb-xmlschema_php.html | 111 - .../docs/xmlschema/adoSchema.html | 235 -- .../docs/xmlschema/package_xmlschema.html | 114 - .../example.php | 24 - .../example.xml | 27 - .../xmlschema.dtd | 31 - .../xmlschema.html | 116 - lib/adodb/adodb-xmlschema.inc.php | 6 +- lib/adodb/adodb-xmlschema03.inc.php | 6 +- lib/adodb/crypt.inc.php | 64 - lib/adodb/docs-adodb.htm | 3229 ----------------- lib/adodb/docs-datadict.htm | 551 --- lib/adodb/docs-perf.htm | 386 -- lib/adodb/docs-session.htm | 213 -- lib/adodb/pear/Auth/Container/ADOdb.php | 413 --- lib/adodb/pear/readme.Auth.txt | 20 - lib/adodb/readme.htm | 69 - lib/adodb/tips_portable_sql.htm | 362 -- lib/adodb/tute.htm | 290 -- lib/datalib.php | 19 +- lib/db/install.xml | 42 +- lib/db/migrate2utf8.php | 2308 ------------ lib/db/migrate2utf8.xml | 563 --- lib/db/mysql.sql | 39 - lib/db/postgres7.sql | 26 - lib/deprecatedlib.php | 4 +- .../plugins/advimage/editor_plugin_src.js | 6 +- .../plugins/fullscreen/editor_plugin_src.js | 6 +- .../themes/advanced/editor_template_src.js | 6 +- .../themes/simple/editor_template_src.js | 6 +- .../jscripts/tiny_mce/tiny_mce_gzip.php | 8 +- .../jscripts/tiny_mce/tiny_mce_popup.js | 6 +- .../jscripts/tiny_mce/utils/form_utils.js | 6 +- .../jscripts/tiny_mce/utils/mclayer.js | 6 +- .../tinymce/jscripts/tiny_mce/utils/mctabs.js | 6 +- .../jscripts/tiny_mce/utils/validate.js | 6 +- lib/filelib.php | 2 +- lib/pear/HTML/QuickForm/Rule/Compare.php | 2 +- lib/soap/nusoap.php | 2 +- mod/assignment/db/migrate2utf8.php | 77 - mod/assignment/db/migrate2utf8.xml | 65 - mod/assignment/index.php | 2 +- mod/chat/db/migrate2utf8.php | 78 - mod/chat/db/migrate2utf8.xml | 44 - mod/chat/gui_header_js/index.php | 2 +- mod/chat/gui_sockets/index.php | 2 +- mod/choice/db/migrate2utf8.php | 126 - mod/choice/db/migrate2utf8.xml | 28 - mod/data/db/migrate2utf8.php | 521 --- mod/data/db/migrate2utf8.xml | 189 - mod/data/index.php | 2 +- mod/exercise/db/migrate2utf8.php | 193 - mod/exercise/db/migrate2utf8.xml | 95 - mod/exercise/locallib.php | 22 +- mod/exercise/view.php | 2 +- mod/forum/db/migrate2utf8.php | 78 - mod/forum/db/migrate2utf8.xml | 73 - mod/forum/discuss.php | 2 +- mod/forum/view.php | 2 +- mod/glossary/db/migrate2utf8.php | 125 - mod/glossary/db/migrate2utf8.xml | 115 - mod/hotpot/db/migrate2utf8.php | 213 -- mod/hotpot/db/migrate2utf8.xml | 76 - mod/hotpot/report.php | 12 +- mod/journal/db/migrate2utf8.php | 77 - mod/journal/db/migrate2utf8.xml | 50 - mod/journal/lib.php | 5 +- mod/journal/view.php | 2 +- mod/label/db/migrate2utf8.php | 77 - mod/label/db/migrate2utf8.xml | 18 - mod/lams/db/migrate2utf8.php | 78 - mod/lams/db/migrate2utf8.xml | 18 - mod/lesson/db/migrate2utf8.php | 304 -- mod/lesson/db/migrate2utf8.xml | 77 - mod/lesson/mod_form.php | 2 +- mod/quiz/db/migrate2utf8.php | 934 ----- mod/quiz/db/migrate2utf8.xml | 255 -- mod/quiz/lib.php | 4 +- mod/quiz/report/analysis/report.php | 8 +- mod/quiz/report/overview/report.php | 17 +- mod/resource/db/migrate2utf8.php | 151 - mod/resource/db/migrate2utf8.xml | 31 - mod/scorm/db/migrate2utf8.php | 802 ---- mod/scorm/db/migrate2utf8.xml | 132 - mod/survey/db/migrate2utf8.php | 79 - mod/survey/db/migrate2utf8.xml | 78 - mod/survey/lib.php | 4 +- mod/wiki/db/migrate2utf8.php | 157 - mod/wiki/db/migrate2utf8.xml | 126 - mod/wiki/lib.php | 7 +- mod/workshop/db/migrate2utf8.php | 315 -- mod/workshop/db/migrate2utf8.xml | 141 - user/index.php | 10 +- user/tabs.php | 4 +- user/view.php | 5 +- 171 files changed, 1548 insertions(+), 25184 deletions(-) delete mode 100644 admin/config.php delete mode 100644 admin/configvars.php delete mode 100644 admin/utfdbmigrate.html delete mode 100755 admin/utfdbmigrate.php delete mode 100755 backup/db/migrate2utf8.php delete mode 100755 backup/db/migrate2utf8.xml delete mode 100755 blocks/db/migrate2utf8.php delete mode 100755 blocks/db/migrate2utf8.xml delete mode 100644 blocks/pagedemo.php delete mode 100755 blocks/rss_client/db/migrate2utf8.php delete mode 100755 blocks/rss_client/db/migrate2utf8.xml delete mode 100644 doc/COPYRIGHT.txt delete mode 100755 doc/contents.php delete mode 100755 doc/docstyles.css delete mode 100644 doc/index.php delete mode 100755 doc/install.html delete mode 100644 doc/top.php delete mode 100644 doc/view.php delete mode 100755 enrol/authorize/db/migrate2utf8.xml create mode 100644 group/assign.php create mode 100644 group/db/install.xml create mode 100644 group/db/upgrade.php create mode 100644 group/group.php create mode 100644 group/grouping.php delete mode 100644 group/install.php delete mode 100644 group/install.sql create mode 100644 group/lib.php create mode 100644 group/version.php create mode 100644 lang/en_utf8/help/lesson/deleteattempts.html delete mode 100644 lib/adodb/adodb-connection.inc.php delete mode 100644 lib/adodb/adodb-cryptsession.php delete mode 100644 lib/adodb/adodb-recordset.inc.php delete mode 100644 lib/adodb/adodb-session-clob.php delete mode 100644 lib/adodb/adodb-session.php delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/Changelog delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/INSTALL delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/LICENSE delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/README delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/adodb-xmlschema.inc.php delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/docs/blank.html delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/docs/classtrees_xmlschema.html delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/docs/elementindex.html delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/docs/elementindex_xmlschema.html delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/docs/errors.html delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/docs/index.html delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/docs/li_xmlschema.html delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/docs/media/stylesheet.css delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/docs/packages.html delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/docs/xmlschema/_adodb-xmlschema_php.html delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/docs/xmlschema/adoSchema.html delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/docs/xmlschema/package_xmlschema.html delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/example.php delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/example.xml delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/xmlschema.dtd delete mode 100644 lib/adodb/adodb-xmlschema-0.0.1-snap20030511/xmlschema.html delete mode 100644 lib/adodb/crypt.inc.php delete mode 100644 lib/adodb/docs-adodb.htm delete mode 100644 lib/adodb/docs-datadict.htm delete mode 100644 lib/adodb/docs-perf.htm delete mode 100644 lib/adodb/docs-session.htm delete mode 100644 lib/adodb/pear/Auth/Container/ADOdb.php delete mode 100644 lib/adodb/pear/readme.Auth.txt delete mode 100644 lib/adodb/readme.htm delete mode 100644 lib/adodb/tips_portable_sql.htm delete mode 100644 lib/adodb/tute.htm delete mode 100755 lib/db/migrate2utf8.php delete mode 100755 lib/db/migrate2utf8.xml delete mode 100755 mod/assignment/db/migrate2utf8.php delete mode 100755 mod/assignment/db/migrate2utf8.xml delete mode 100755 mod/chat/db/migrate2utf8.php delete mode 100755 mod/chat/db/migrate2utf8.xml delete mode 100755 mod/choice/db/migrate2utf8.php delete mode 100755 mod/choice/db/migrate2utf8.xml delete mode 100755 mod/data/db/migrate2utf8.php delete mode 100755 mod/data/db/migrate2utf8.xml delete mode 100755 mod/exercise/db/migrate2utf8.php delete mode 100755 mod/exercise/db/migrate2utf8.xml delete mode 100755 mod/forum/db/migrate2utf8.php delete mode 100755 mod/forum/db/migrate2utf8.xml delete mode 100755 mod/glossary/db/migrate2utf8.php delete mode 100755 mod/glossary/db/migrate2utf8.xml delete mode 100755 mod/hotpot/db/migrate2utf8.php delete mode 100755 mod/hotpot/db/migrate2utf8.xml delete mode 100755 mod/journal/db/migrate2utf8.php delete mode 100755 mod/journal/db/migrate2utf8.xml delete mode 100755 mod/label/db/migrate2utf8.php delete mode 100755 mod/label/db/migrate2utf8.xml delete mode 100755 mod/lams/db/migrate2utf8.php delete mode 100755 mod/lams/db/migrate2utf8.xml delete mode 100755 mod/lesson/db/migrate2utf8.php delete mode 100755 mod/lesson/db/migrate2utf8.xml delete mode 100755 mod/quiz/db/migrate2utf8.php delete mode 100755 mod/quiz/db/migrate2utf8.xml delete mode 100755 mod/resource/db/migrate2utf8.php delete mode 100755 mod/resource/db/migrate2utf8.xml delete mode 100755 mod/scorm/db/migrate2utf8.php delete mode 100755 mod/scorm/db/migrate2utf8.xml delete mode 100755 mod/survey/db/migrate2utf8.php delete mode 100755 mod/survey/db/migrate2utf8.xml delete mode 100755 mod/wiki/db/migrate2utf8.php delete mode 100755 mod/wiki/db/migrate2utf8.xml delete mode 100755 mod/workshop/db/migrate2utf8.php delete mode 100755 mod/workshop/db/migrate2utf8.xml diff --git a/admin/config.php b/admin/config.php deleted file mode 100644 index fd1694b239..0000000000 --- a/admin/config.php +++ /dev/null @@ -1,185 +0,0 @@ -id)) { // Additional identity check - if (!confirm_sesskey()) { - error(get_string('confirmsesskeybad', 'error')); - } - } - - validate_form($config, $err); - - if (count($err) == 0) { - foreach ($config as $name => $value) { - if ($name == "sessioncookie") { - $value = eregi_replace("[^a-zA-Z0-9_]", "", $value); - } - if ($name == "defaultallowedmodules") { - $value = implode(',',$value); - } - if ($name == 'hiddenuserfields') { - if (in_array('none', $value)) { - $value = ''; - } else { - $value = implode(',',$value); - } - } - if ($name == "locale") { - $value = trim($value); - } - $conf = new object(); - $conf->name = $name; - $conf->value = $value; - if ($current = get_record('config', 'name', $name)) { - $conf->id = $current->id; - if (! update_record('config', $conf)) { - error("Error: Could not update $name to $value"); - } - } else { - if (! insert_record('config', $conf)) { - error("Error: could not add new variable $name !"); - } - } - } - redirect('index.php'); - exit; - - } else { - foreach ($err as $key => $value) { - $focus = "form.$key"; - } - } - } - -/// Otherwise fill and print the form. - - if (empty($config)) { - $config = $CFG; - } - - $sesskey = !empty($USER->id) ? $USER->sesskey : ''; - - - $stradmin = get_string('administration'); - $strconfiguration = get_string('configuration'); - $strconfigvariables = get_string('configvariables', 'admin'); - - if ($site) { - print_header("$site->shortname: $strconfigvariables", $site->fullname, - "$stradmin -> ". - "$strconfiguration -> $strconfigvariables", $focus); - print_heading($strconfigvariables); - } else { - print_header(); - print_heading($strconfigvariables); - print_simple_box(get_string('configintro', 'admin'), 'center', "50%"); - echo '
'; - } - - - -/// Get all the configuration fields and helptext - require('configvars.php'); - -/// Cycle through the sections to get the sectionnames - $linktext = ''; - foreach($configvars as $sectionname=>$section) { - if ($linktext !== '') { - $linktext .= ' | '; - } - $linktext .= ''.get_string('configsection'.$sectionname, 'admin').''; - } - - echo "
$linktext
\n"; - - - echo '
'; - echo '
'; - -/// Cycle through each section of the configuration - foreach ($configvars as $sectionname=>$section) { - - print_heading(''.get_string('configsection'.$sectionname, 'admin')); - - $table = NULL; - $table->data = array(); - foreach ($section as $configvariable=>$configobject) { - $table->data[] = array ( $configvariable.': ', - $configobject->field - ); - if ($configobject->display_warning()) { - $table->data[] = array ( ' ', - ''.$configobject->warning.'' - ); - } - $table->data[] = array ( ' ', - ''.$configobject->help.'' - ); - $table->align = array ('right', 'left'); - } - print_table($table); - - } - echo '
'; - echo ''; - echo ''; - echo '
'; - - echo '
'; - - - - - - /// Lock some options - - $httpsurl = str_replace('http://', 'https://', $CFG->wwwroot); - if ($httpsurl != $CFG->wwwroot) { - if (ini_get('allow_url_fopen')) { - if ((($fh = @fopen($httpsurl, 'r')) == false) and ($config->loginhttps == 0)) { - echo ''."\n"; - } - } - } - - - if ($site) { - print_footer(); - } - - exit; - -/// Functions ///////////////////////////////////////////////////////////////// - -function validate_form(&$form, &$err) { - - // Currently no checks are needed ... - - return true; -} - -?> diff --git a/admin/configvars.php b/admin/configvars.php deleted file mode 100644 index b7fb49fcbe..0000000000 --- a/admin/configvars.php +++ /dev/null @@ -1,660 +0,0 @@ -help = $help; - $this->field = $field; - $this->warning = $warning; - } - - function display_warning() { - return false; - } -} - - - - - -//////////////////////////////////////////////////////////////////// -/// Miscellaneous config variables -//////////////////////////////////////////////////////////////////// - $misc = array(); - - -/// maxeditingtime - unset($options); - $options[3600] = get_string('numminutes', '', 60); - $options[2700] = get_string('numminutes', '', 45); - $options[1800] = get_string('numminutes', '', 30); - $options[900] = get_string('numminutes', '', 15); - $options[300] = get_string('numminutes', '', 5); - $options[60] = get_string('numminutes', '', 1); - - $misc['maxeditingtime'] = new configvar (get_string('configmaxeditingtime', 'admin'), - choose_from_menu ($options, 'maxeditingtime', $config->maxeditingtime, '', '', '', true) ); - -/// debug - unset($options); - $options[5] = $strno; - $options[15] = $stryes; - - $misc['debug'] = new configvar (get_string('configdebug', 'admin'), - choose_from_menu ($options, 'debug', $config->debug, '', '', '', true) ); - - $misc['perfdebug'] = new configvar (get_string('configperfdebug', 'admin'), - choose_from_menu ($options, 'perfdebug', $config->perfdebug, '', '', '', true) ); - -/// enablerssfeeds -class configvarrss extends configvar { - function display_warning() { - return (!function_exists('utf8_encode')); - } -} - - $misc['enablerssfeeds'] = new configvarrss (get_string('configenablerssfeeds', 'admin'), - choose_from_menu ($noyesoptions, 'enablerssfeeds', $config->enablerssfeeds, '', '', '', true), - ' You need to add XML support to your PHP installation.' ); - - $misc['mymoodleredirect'] = new configvar (get_string('configmymoodleredirect','admin'), - choose_from_menu($noyesoptions,'mymoodleredirect',$config->mymoodleredirect,'','','',true)); - - unset($options); - $options[5] = get_string('worldblogs','blog'); - $options[4] = get_string('siteblogs','blog'); - $options[3] = get_string('courseblogs','blog'); - $options[2] = get_string('groupblogs','blog'); - $options[1] = get_string('personalblogs','blog'); - $options[0] = get_string('disableblogs','blog'); - - $misc['bloglevel'] = new configvar (get_string('configbloglevel', 'admin'), - choose_from_menu ($options, 'bloglevel', $config->bloglevel,'','','',true)); - -//////////////////////////////////////////////////////////////////// -/// OPERATING SYSTEM config variables -//////////////////////////////////////////////////////////////////// - $operatingsystem = array(); - -/// gdversion - unset($options); - $options[0] = get_string('gdnot'); - $options[1] = get_string('gd1'); - $options[2] = get_string('gd2'); - - $installed = check_gd_version(); - - $operatingsystem['gdversion'] = new configvar (get_string('configgdversion', 'admin'), - choose_from_menu ($options, 'gdversion', $installed, '', '', '', true) ); - -/// dbsessions - $operatingsystem['dbsessions'] = new configvar (get_string('configdbsessions', 'admin'), - choose_from_menu ($noyesoptions, 'dbsessions', $config->dbsessions, '', '', '', true) ); - -/// sessiontimeout - unset($options); - $options[14400] = get_string('numhours', '', 4); - $options[10800] = get_string('numhours', '', 3); - $options[7200] = get_string('numhours', '', 2); - $options[5400] = get_string('numhours', '', '1.5'); - $options[3600] = get_string('numminutes', '', 60); - $options[2700] = get_string('numminutes', '', 45); - $options[1800] = get_string('numminutes', '', 30); - $options[900] = get_string('numminutes', '', 15); - $options[300] = get_string('numminutes', '', 5); - - $operatingsystem['sessiontimeout'] = new configvar (get_string('configsessiontimeout', 'admin'), - choose_from_menu ($options, 'sessiontimeout', $config->sessiontimeout, '', '', '', true) ); - -/// sessioncookie - $operatingsystem['sessioncookie'] = new configvar (get_string('configsessioncookie', 'admin'), - '' ); - $operatingsystem['sessioncookiepath'] = new configvar (get_string('configsessioncookiepath', 'admin'), - '' ); - -/// zip - $operatingsystem['zip'] = new configvar (get_string('configzip', 'admin'), - '' ); - -/// unzip - $operatingsystem['unzip'] = new configvar (get_string('configunzip', 'admin'), - '' ); - - $operatingsystem['pathtodu'] = new configvar(get_string('configpathtodu', 'admin'), - ''); - -/// slasharguments - unset($options); - $options[0] = "file.php?file=/1/pic.jpg"; - $options[1] = "file.php/1/pic.jpg"; - - $operatingsystem['slasharguments'] = new configvar (get_string('configslasharguments', 'admin'), - choose_from_menu ($options, 'slasharguments', $config->slasharguments, '', '', '', true) ); - -/// proxyhost - $operatingsystem['proxyhost'] = new configvar (get_string('configproxyhost', 'admin'), - '' ); - -/// proxyport - $operatingsystem['proxyport'] = new configvar ('', - '' ); - - - -//////////////////////////////////////////////////////////////////// -/// PERMISSIONS config variables -//////////////////////////////////////////////////////////////////// - $permissions = array(); - -/// teacherassignteachers - $permissions['teacherassignteachers'] = new configvar (get_string('configteacherassignteachers', 'admin'), - choose_from_menu ($noyesoptions, 'teacherassignteachers', $config->teacherassignteachers, '', '', '', true) ); - -/// allowunenroll - $permissions['allowunenroll'] = new configvar (get_string('configallowunenroll', 'admin'), - choose_from_menu ($noyesoptions, 'allowunenroll', $config->allowunenroll, '', '', '', true) ); - -/// allusersaresitestudents - $permissions['allusersaresitestudents'] = new configvar (get_string('configallusersaresitestudents', 'admin'), - choose_from_menu ($noyesoptions, 'allusersaresitestudents', $config->allusersaresitestudents, '', '', '', true) ); - -/// showsiteparticipantslist - unset($options); - $options[0] = get_string('siteteachers'); - $options[1] = get_string('allteachers'); - $options[2] = get_string('studentsandteachers'); - - $permissions['showsiteparticipantslist'] = new configvar (get_string('configshowsiteparticipantslist', 'admin'), - choose_from_menu ($options, 'showsiteparticipantslist', $config->showsiteparticipantslist, '', '', '', true) ); - -/// forcelogin - $permissions['forcelogin'] = new configvar (get_string('configforcelogin', 'admin'), - choose_from_menu ($noyesoptions, 'forcelogin', $config->forcelogin, '', '', '', true) ); - -/// forceloginforprofiles - $permissions['forceloginforprofiles'] = new configvar (get_string('configforceloginforprofiles', 'admin'), - choose_from_menu ($noyesoptions, 'forceloginforprofiles', $config->forceloginforprofiles, '', '', '', true) ); - -/// opentogoogle - $permissions['opentogoogle'] = new configvar (get_string('configopentogoogle', 'admin'), - choose_from_menu ($noyesoptions, 'opentogoogle', $config->opentogoogle, '', '', '', true) ); - -/// maxbytes - $options = get_max_upload_sizes(); - - $permissions['maxbytes'] = new configvar (get_string('configmaxbytes', 'admin'), - choose_from_menu ($options, 'maxbytes', $config->maxbytes, '', '', 0, true) ); - -/// messaging - $permissions['messaging'] = new configvar (get_string('configmessaging', 'admin'), - choose_from_menu ($noyesoptions, 'messaging', $config->messaging, '', '', '', true) ); - -/// allowobjectembed - $permissions['allowobjectembed'] = new configvar (get_string('configallowobjectembed', 'admin'), - choose_from_menu ($noyesoptions, 'allowobjectembed', $config->allowobjectembed, '', '', '', true) ); - -/// enabletrusttext - $permissions['enabletrusttext'] = new configvar (get_string('configenabletrusttext', 'admin'), - choose_from_menu ($noyesoptions, 'enabletrusttext', $config->enabletrusttext, '', '', '', true) ); - - unset($options); - $options['none'] = 'No courses'; - $options['all'] = 'All courses'; - $options['requested'] = 'Requested courses'; - - $permissions['restrictmodulesfor'] = new configvar (get_string('configrestrictmodulesfor','admin'), - ' '. - choose_from_menu($options,'restrictmodulesfor',$config->restrictmodulesfor,'','togglemodules(this.selectedIndex);','',true) ); - - $permissions['restrictbydefault'] = new configvar (get_string('configrestrictbydefault','admin'), - choose_from_menu($noyesoptions, 'restrictbydefault',$config->restrictbydefault,'','','',true) ); - - $allowstr = ''; - - $permissions['defaultallowedmodules'] = new configvar (get_string('configdefaultallowedmodules','admin'),$allowstr); - - -/// course requests - $reqcourse['enablecourserequests'] = new configvar (get_string('configenablecourserequests', 'admin'), - choose_from_menu ($noyesoptions,'enablecourserequests',$config->enablecourserequests,'','','',true) ); - -/// default category for course requests - require_once($CFG->dirroot.'/course/lib.php'); - $reqcourse['defaultrequestedcategory'] = new configvar (get_string('configdefaultrequestedcategory', 'admin'), - choose_from_menu (make_categories_options(), 'defaultrequestedcategory',$config->defaultrequestedcategory,'','','',true) ); - - $reqcourse['requestedteachername'] = new configvar (get_string('configrequestedteachername','admin'), - ''); - - $reqcourse['requestedteachersname'] = new configvar (get_string('configrequestedteachersname','admin'), - ''); - - $reqcourse['requestedstudentname'] = new configvar (get_string('configrequestedstudentname','admin'), - ''); - - $reqcourse['requestedstudentsname'] = new configvar (get_string('configrequestedstudentsname','admin'), - ''); - -//////////////////////////////////////////////////////////////////// -/// INTERFACE config variables -//////////////////////////////////////////////////////////////////// - $interface = array(); - -/// language settings - $interface['lang'] = new configvar ( get_string('configlang', 'admin'), - choose_from_menu(get_list_of_languages(), 'lang', $config->lang, '', '', '', true) ); - -/// language menu - $interface['langmenu'] = new configvar ( get_string('configlangmenu', 'admin'), - choose_from_menu($noyesoptions, 'langmenu', $config->langmenu, '', '', '', true) ); - -/// language list - $interface['langlist'] = new configvar ( get_string('configlanglist', 'admin'), - '' ); - -/// language menu - $interface['langcache'] = new configvar ( get_string('configlangcache', 'admin'), - choose_from_menu($noyesoptions, 'langcache', $config->langcache, '', '', '', true) ); - -/// locale - $interface['locale'] = new configvar ( get_string('configlocale', 'admin'), - '' ); - -/// docroot - $interface['docroot'] = new configvar ( get_string('configdocroot', 'admin'), - '' ); - -/// doctonewwindow - $interface['doctonewwindow'] = new configvar ( get_string('configdoctonewwindow', 'admin'), - choose_from_menu($noyesoptions, 'doctonewwindow', $config->doctonewwindow, '', '', '', true) ); - -/// timezone - $interface['timezone'] = new configvar ( get_string('configtimezone', 'admin'), - choose_from_menu (get_list_of_timezones(), 'timezone', $config->timezone, get_string('serverlocaltime'), '', '99', true ) ); - -/// country - $interface['country'] = new configvar ( get_string('configcountry', 'admin'), - choose_from_menu (get_list_of_countries(), 'country', $config->country, get_string('selectacountry'), '', 0, true) ); - -/// framename - if (empty($config->framename)) { - $config->framename = "_top"; - } - - $interface['framename'] = new configvar (get_string('configframename', 'admin'), - '' ); - -/// language list - $interface['themelist'] = new configvar ( get_string('configthemelist', 'admin'), - '' ); - -/// user themes - $interface['allowuserthemes'] = new configvar (get_string('configallowuserthemes', 'admin'), - choose_from_menu ($noyesoptions, 'allowuserthemes', $config->allowuserthemes, '', '', '', true) ); - -/// course themes - $interface['allowcoursethemes'] = new configvar (get_string('configallowcoursethemes', 'admin'), - choose_from_menu ($noyesoptions, 'allowcoursethemes', $config->allowcoursethemes, '', '', '', true) ); - -/// allowuserblockhiding - $interface['allowuserblockhiding'] = new configvar (get_string('configallowuserblockhiding', 'admin'), - choose_from_menu ($noyesoptions, 'allowuserblockhiding', $config->allowuserblockhiding, '', '', '', true) ); - -/// showblocksonmodpages - $interface['showblocksonmodpages'] = new configvar (get_string('configshowblocksonmodpages', 'admin'), - choose_from_menu ($noyesoptions, 'showblocksonmodpages', $config->showblocksonmodpages, '', '', '', true) ); - - -/// tabselectedtofront - $interface['tabselectedtofront'] = new configvar (get_string('tabselectedtofront', 'admin'), - choose_from_menu ($noyesoptions, 'tabselectedtofront', $config->tabselectedtofront, '', '', '', true) ); - - - -//////////////////////////////////////////////////////////////////// -/// USER config variables -//////////////////////////////////////////////////////////////////// - $user = array(); - -/// sitepolicy - $user['sitepolicy'] = new configvar (get_string('configsitepolicy', 'admin'), - '' ); - - -/// fullnamedisplay - unset($options); - $options['language'] = get_string('language'); - $options['firstname lastname'] = get_string('firstname') . ' + ' . get_string('lastname'); - $options['lastname firstname'] = get_string('lastname') . ' + ' . get_string('firstname'); - $options['firstname'] = get_string('firstname'); - - $user['fullnamedisplay'] = new configvar (get_string('configfullnamedisplay', 'admin'), - choose_from_menu ($options, 'fullnamedisplay', $config->fullnamedisplay, '', '', '', true) ); - -/// extendedusernamechars - $user['extendedusernamechars'] = new configvar (get_string('configextendedusernamechars', 'admin'), - choose_from_menu ($noyesoptions, 'extendedusernamechars', $config->extendedusernamechars, '', '', '', true) ); - -/// autologinguests - $user['autologinguests'] = new configvar (get_string('configautologinguests', 'admin'), - choose_from_menu ($noyesoptions, 'autologinguests', $config->autologinguests, '', '', '', true) ); - -/// hiddenuserfields - $fields = array('none', 'description', 'city', 'country', 'webpage', 'icqnumber', 'skypeid', 'yahooid', 'aimid', 'msnid', 'lastaccess'); - if (empty($config->hiddenuserfields)) { - $config->hiddenuserfields = 'none'; - } - $configfields = array_flip(explode(',', $config->hiddenuserfields)); - $fieldoptions = ''; - foreach ($fields as $value) { - $fieldoptions .= '