From 08103c9364b58ec9ca43eafad29d9f81e1a22b60 Mon Sep 17 00:00:00 2001 From: Martin Langhoff Date: Sat, 7 Jul 2007 14:18:30 +1200 Subject: [PATCH] cvsimport fixups --- admin/index.php | 14 +- auth/README2 | 91 - auth/cas/auth_ldap_sync_users.php | 48 - auth/cas/forbidden.html | 8 - auth/cas/forbidden.php | 18 - auth/cas/index_form.html | 85 - auth/cas/login.php | 313 --- auth/cas/logout.php | 15 - auth/nologin/auth.php | 32 +- backup/db/mysql.sql | 75 - backup/db/postgres7.sql | 67 - blocks/blog_tags/block_blog_tags.php | 2 +- blocks/db/mysql.sql | 45 - blocks/db/postgres7.sql | 41 - blocks/news_items/block_news_items.php | 39 +- blocks/online_users/block_online_users.php | 4 +- blocks/rss_client/db/mysql.sql | 23 - blocks/rss_client/db/postgres7.sql | 20 - course/grades.php | 8 +- course/group-edit.html | 63 - course/group.php | 85 - course/groups-edit.html | 182 -- course/groups.php | 230 -- course/moodleform_mod.php | 1 + enrol/authorize/db/mysql.sql | 31 - enrol/authorize/db/postgres7.sql | 32 - enrol/paypal/db/mysql.sql | 23 - enrol/paypal/db/postgres7.sql | 22 - group/db/mysql.sql | 117 - group/db/postgres7.sql | 65 - group/edit.php | 24 +- group/edit_form.php | 11 +- group/grouping.php | 5 + group/groupui/addgroupstogrouping-form.html | 9 - group/groupui/addgroupstogrouping-form.js | 73 - group/groupui/addgroupstogrouping-xml.php | 37 - group/groupui/addmembers-form.html | 9 - group/groupui/addmembers-form.js | 79 - group/groupui/addmembers-xml.php | 33 - group/groupui/ajax.js | 77 - group/groupui/connection.js | 775 ------- .../groupui/createautomaticgrouping-form.html | 54 - group/groupui/createautomaticgrouping-form.js | 79 - group/groupui/createautomaticgrouping-xml.php | 46 - group/groupui/creategroup-form.html | 31 - group/groupui/creategroup-form.js | 61 - group/groupui/creategroup-xml.php | 55 - group/groupui/creategrouping-form.html | 11 - group/groupui/creategrouping-form.js | 56 - group/groupui/creategrouping-xml.php | 31 - group/groupui/deletegroup-xml.php | 27 - group/groupui/deletegroup.js | 35 - group/groupui/deletegrouping-xml.php | 26 - group/groupui/deletegrouping.js | 37 - .../groupui/editgroupingpermissions-form.html | 13 - group/groupui/editgroupingpermissions-form.js | 66 - group/groupui/editgroupingpermissions-xml.php | 30 - group/groupui/editgroupingsettings-form.html | 11 - group/groupui/editgroupingsettings-form.js | 72 - group/groupui/editgroupingsettings-xml.php | 26 - group/groupui/editgroupsettings-form.html | 22 - group/groupui/editgroupsettings-form.js | 78 - group/groupui/editgroupsettings-xml.php | 49 - group/groupui/form.css | 52 - group/groupui/form.html | 42 - group/groupui/getgroupingpermissions-xml.php | 62 - group/groupui/getgroupings-xml.php | 41 - group/groupui/getgroupingsettings-xml.php | 27 - group/groupui/getgroupsettings-xml.php | 36 - group/groupui/getgroupsingrouping-xml.php | 40 - group/groupui/getgroupsnotingrouping-xml.php | 40 - group/groupui/getmembers-xml.php | 43 - group/groupui/getnonmembers-xml.php | 49 - group/groupui/index.php | 64 - group/groupui/main-buttons-form.js | 66 - group/groupui/main-form.html | 41 - group/groupui/main-init-form.js | 71 - group/groupui/main-selects-form.js | 238 -- group/groupui/printgrouping.php | 88 - group/groupui/removegroupfromgrouping-xml.php | 28 - group/groupui/removegroupfromgrouping.js | 34 - group/groupui/removemembers-xml.php | 38 - group/groupui/removemembers.js | 33 - group/groupui/util-form.js | 358 --- group/groupui/yahoo.js | 84 - group/index.php | 35 +- group/lib/legacylib.php | 90 +- lib/cas/CAS.php | 1182 ---------- lib/cas/PGTStorage/pgt-db.php | 190 -- lib/cas/PGTStorage/pgt-file.php | 237 -- lib/cas/PGTStorage/pgt-main.php | 188 -- lib/cas/client.php | 1950 ----------------- lib/cas/domxml-php4-php5.php | 277 --- lib/cas/languages/english.php | 27 - lib/cas/languages/french.php | 28 - lib/cas/languages/greek.php | 27 - lib/cas/languages/languages.php | 24 - lib/db/mysql.sql | 1009 --------- lib/db/postgres7.sql | 789 ------- lib/db/upgrade.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/moodlelib.php | 28 + lib/pear/HTML/QuickForm/Rule/Compare.php | 2 +- lib/soap/nusoap.php | 2 +- login/index.php | 14 +- mod/assignment/db/mysql.sql | 63 - mod/assignment/db/postgres7.sql | 66 - mod/chat/db/mysql.sql | 70 - mod/chat/db/postgres7.sql | 73 - mod/chat/gui_header_js/index.php | 2 +- mod/chat/view.php | 50 +- mod/choice/db/mysql.sql | 85 - mod/choice/db/postgres7.sql | 79 - mod/choice/lib.php | 48 +- mod/data/db/mysql.sql | 118 - mod/data/db/postgres7.sql | 100 - mod/exercise/db/mysql.sql | 128 -- mod/exercise/db/postgres7.sql | 127 -- mod/forum/db/mysql.sql | 170 -- mod/forum/db/postgres7.sql | 182 -- mod/glossary/db/mysql.sql | 165 -- mod/glossary/db/postgres7.sql | 180 -- mod/hotpot/db/mysql.sql | 103 - mod/hotpot/db/postgres7.sql | 118 - mod/journal/db/mysql.sql | 59 - mod/journal/db/postgres7.sql | 60 - mod/label/db/mysql.sql | 12 - mod/label/db/postgres7.sql | 12 - mod/lams/db/mysql.sql | 17 - mod/lams/db/postgres7.sql | 17 - mod/lesson/db/mysql.sql | 192 -- mod/lesson/db/postgres7.sql | 172 -- mod/quiz/db/mysql.sql | 251 --- mod/quiz/db/postgres7.sql | 236 -- mod/quiz/report/analysis/report.php | 23 +- mod/quiz/tabs.php | 7 +- mod/resource/db/mysql.sql | 40 - mod/resource/db/postgres7.sql | 38 - mod/resource/fetch.php | 31 - mod/resource/mod.html | 13 - mod/resource/type/common.html | 33 - mod/resource/type/common_end.html | 6 - mod/resource/type/directory/directory.html | 16 - mod/resource/type/file/file.html | 215 -- mod/resource/type/file/localfile.php | 6 +- mod/resource/type/html/html.html | 143 -- mod/resource/type/ims/ims.html | 264 --- mod/resource/type/repository/repository.html | 226 -- mod/resource/type/text/text.html | 160 -- mod/scorm/db/mysql.sql | 188 -- mod/scorm/db/postgres7.sql | 75 - mod/survey/db/mysql.sql | 193 -- mod/survey/db/postgres7.sql | 202 -- mod/wiki/db/mysql.sql | 67 - mod/wiki/db/postgres7.sql | 66 - mod/workshop/db/mysql.sql | 188 -- mod/workshop/db/postgres7.sql | 177 -- question/showbank.php | 189 -- question/tabs.php | 2 +- question/type/calculated/db/mysql.sql | 18 - question/type/calculated/db/postgres7.sql | 19 - .../categorydatasetdefinitions.php | 102 - question/type/match/db/mysql.sql | 32 - question/type/match/db/postgres7.sql | 30 - question/type/multianswer/db/mysql.sql | 15 - question/type/multianswer/db/postgres7.sql | 14 - question/type/multichoice/db/mysql.sql | 21 - question/type/multichoice/db/postgres7.sql | 21 - question/type/numerical/db/mysql.sql | 17 - question/type/numerical/db/postgres7.sql | 16 - question/type/randomsamatch/db/mysql.sql | 13 - question/type/randomsamatch/db/postgres7.sql | 14 - question/type/rqp/db/install.xml | 57 - question/type/rqp/db/mysql.php | 18 - question/type/rqp/db/mysql.sql | 60 - question/type/rqp/db/postgres7.php | 18 - question/type/rqp/db/postgres7.sql | 50 - question/type/rqp/db/upgrade.php | 38 - question/type/rqp/editquestion.html | 60 - question/type/rqp/editquestion.php | 24 - question/type/rqp/lib.php | 129 -- question/type/rqp/questiontype.php | 553 ----- question/type/rqp/remote.php | 163 -- question/type/rqp/rqp.php | 236 -- question/type/rqp/types.php | 172 -- question/type/rqp/version.php | 6 - question/type/shortanswer/db/mysql.sql | 16 - question/type/shortanswer/db/postgres7.sql | 14 - question/type/truefalse/db/mysql.sql | 13 - question/type/truefalse/db/postgres7.sql | 13 - question/upgrade.php | 18 + theme/cornflower/styles_color.css | 787 ------- theme/cornflower/styles_fonts.css | 500 ----- theme/cornflower/styles_layout.css | 1252 ----------- theme/cornflower/styles_moz.css | 331 --- version.php | 2 +- 205 files changed, 306 insertions(+), 21666 deletions(-) delete mode 100644 auth/README2 delete mode 100644 auth/cas/auth_ldap_sync_users.php delete mode 100644 auth/cas/forbidden.html delete mode 100644 auth/cas/forbidden.php delete mode 100644 auth/cas/index_form.html delete mode 100644 auth/cas/login.php delete mode 100644 auth/cas/logout.php delete mode 100644 backup/db/mysql.sql delete mode 100644 backup/db/postgres7.sql delete mode 100644 blocks/db/mysql.sql delete mode 100644 blocks/db/postgres7.sql delete mode 100644 blocks/rss_client/db/mysql.sql delete mode 100644 blocks/rss_client/db/postgres7.sql delete mode 100644 course/group-edit.html delete mode 100644 course/group.php delete mode 100755 course/groups-edit.html delete mode 100644 course/groups.php delete mode 100755 enrol/authorize/db/mysql.sql delete mode 100644 enrol/authorize/db/postgres7.sql delete mode 100644 enrol/paypal/db/mysql.sql delete mode 100644 enrol/paypal/db/postgres7.sql delete mode 100644 group/db/mysql.sql delete mode 100644 group/db/postgres7.sql delete mode 100644 group/groupui/addgroupstogrouping-form.html delete mode 100644 group/groupui/addgroupstogrouping-form.js delete mode 100644 group/groupui/addgroupstogrouping-xml.php delete mode 100644 group/groupui/addmembers-form.html delete mode 100644 group/groupui/addmembers-form.js delete mode 100644 group/groupui/addmembers-xml.php delete mode 100644 group/groupui/ajax.js delete mode 100644 group/groupui/connection.js delete mode 100644 group/groupui/createautomaticgrouping-form.html delete mode 100644 group/groupui/createautomaticgrouping-form.js delete mode 100644 group/groupui/createautomaticgrouping-xml.php delete mode 100644 group/groupui/creategroup-form.html delete mode 100644 group/groupui/creategroup-form.js delete mode 100644 group/groupui/creategroup-xml.php delete mode 100644 group/groupui/creategrouping-form.html delete mode 100644 group/groupui/creategrouping-form.js delete mode 100644 group/groupui/creategrouping-xml.php delete mode 100644 group/groupui/deletegroup-xml.php delete mode 100644 group/groupui/deletegroup.js delete mode 100644 group/groupui/deletegrouping-xml.php delete mode 100644 group/groupui/deletegrouping.js delete mode 100644 group/groupui/editgroupingpermissions-form.html delete mode 100644 group/groupui/editgroupingpermissions-form.js delete mode 100644 group/groupui/editgroupingpermissions-xml.php delete mode 100644 group/groupui/editgroupingsettings-form.html delete mode 100644 group/groupui/editgroupingsettings-form.js delete mode 100644 group/groupui/editgroupingsettings-xml.php delete mode 100644 group/groupui/editgroupsettings-form.html delete mode 100644 group/groupui/editgroupsettings-form.js delete mode 100644 group/groupui/editgroupsettings-xml.php delete mode 100644 group/groupui/form.css delete mode 100644 group/groupui/form.html delete mode 100644 group/groupui/getgroupingpermissions-xml.php delete mode 100644 group/groupui/getgroupings-xml.php delete mode 100644 group/groupui/getgroupingsettings-xml.php delete mode 100644 group/groupui/getgroupsettings-xml.php delete mode 100644 group/groupui/getgroupsingrouping-xml.php delete mode 100644 group/groupui/getgroupsnotingrouping-xml.php delete mode 100644 group/groupui/getmembers-xml.php delete mode 100644 group/groupui/getnonmembers-xml.php delete mode 100644 group/groupui/index.php delete mode 100644 group/groupui/main-buttons-form.js delete mode 100644 group/groupui/main-form.html delete mode 100644 group/groupui/main-init-form.js delete mode 100644 group/groupui/main-selects-form.js delete mode 100644 group/groupui/printgrouping.php delete mode 100644 group/groupui/removegroupfromgrouping-xml.php delete mode 100644 group/groupui/removegroupfromgrouping.js delete mode 100644 group/groupui/removemembers-xml.php delete mode 100644 group/groupui/removemembers.js delete mode 100644 group/groupui/util-form.js delete mode 100644 group/groupui/yahoo.js delete mode 100644 lib/cas/CAS.php delete mode 100644 lib/cas/PGTStorage/pgt-db.php delete mode 100644 lib/cas/PGTStorage/pgt-file.php delete mode 100644 lib/cas/PGTStorage/pgt-main.php delete mode 100644 lib/cas/client.php delete mode 100644 lib/cas/domxml-php4-php5.php delete mode 100644 lib/cas/languages/english.php delete mode 100644 lib/cas/languages/french.php delete mode 100644 lib/cas/languages/greek.php delete mode 100644 lib/cas/languages/languages.php delete mode 100644 lib/db/mysql.sql delete mode 100644 lib/db/postgres7.sql delete mode 100644 mod/assignment/db/mysql.sql delete mode 100644 mod/assignment/db/postgres7.sql delete mode 100644 mod/chat/db/mysql.sql delete mode 100644 mod/chat/db/postgres7.sql delete mode 100755 mod/choice/db/mysql.sql delete mode 100755 mod/choice/db/postgres7.sql delete mode 100755 mod/data/db/mysql.sql delete mode 100755 mod/data/db/postgres7.sql delete mode 100644 mod/exercise/db/mysql.sql delete mode 100644 mod/exercise/db/postgres7.sql delete mode 100644 mod/forum/db/mysql.sql delete mode 100644 mod/forum/db/postgres7.sql delete mode 100644 mod/glossary/db/mysql.sql delete mode 100644 mod/glossary/db/postgres7.sql delete mode 100644 mod/hotpot/db/mysql.sql delete mode 100644 mod/hotpot/db/postgres7.sql delete mode 100755 mod/journal/db/mysql.sql delete mode 100755 mod/journal/db/postgres7.sql delete mode 100644 mod/label/db/mysql.sql delete mode 100644 mod/label/db/postgres7.sql delete mode 100644 mod/lams/db/mysql.sql delete mode 100644 mod/lams/db/postgres7.sql delete mode 100644 mod/lesson/db/mysql.sql delete mode 100644 mod/lesson/db/postgres7.sql delete mode 100644 mod/quiz/db/mysql.sql delete mode 100644 mod/quiz/db/postgres7.sql delete mode 100755 mod/resource/db/mysql.sql delete mode 100644 mod/resource/db/postgres7.sql delete mode 100644 mod/resource/fetch.php delete mode 100644 mod/resource/mod.html delete mode 100644 mod/resource/type/common.html delete mode 100644 mod/resource/type/common_end.html delete mode 100644 mod/resource/type/directory/directory.html delete mode 100644 mod/resource/type/file/file.html delete mode 100644 mod/resource/type/html/html.html delete mode 100644 mod/resource/type/ims/ims.html delete mode 100644 mod/resource/type/repository/repository.html delete mode 100644 mod/resource/type/text/text.html delete mode 100755 mod/scorm/db/mysql.sql delete mode 100755 mod/scorm/db/postgres7.sql delete mode 100755 mod/survey/db/mysql.sql delete mode 100755 mod/survey/db/postgres7.sql delete mode 100644 mod/wiki/db/mysql.sql delete mode 100644 mod/wiki/db/postgres7.sql delete mode 100644 mod/workshop/db/mysql.sql delete mode 100644 mod/workshop/db/postgres7.sql delete mode 100644 question/showbank.php delete mode 100644 question/type/calculated/db/mysql.sql delete mode 100644 question/type/calculated/db/postgres7.sql delete mode 100644 question/type/datasetdependent/categorydatasetdefinitions.php delete mode 100644 question/type/match/db/mysql.sql delete mode 100644 question/type/match/db/postgres7.sql delete mode 100644 question/type/multianswer/db/mysql.sql delete mode 100644 question/type/multianswer/db/postgres7.sql delete mode 100644 question/type/multichoice/db/mysql.sql delete mode 100644 question/type/multichoice/db/postgres7.sql delete mode 100644 question/type/numerical/db/mysql.sql delete mode 100644 question/type/numerical/db/postgres7.sql delete mode 100644 question/type/randomsamatch/db/mysql.sql delete mode 100644 question/type/randomsamatch/db/postgres7.sql delete mode 100644 question/type/rqp/db/install.xml delete mode 100644 question/type/rqp/db/mysql.php delete mode 100644 question/type/rqp/db/mysql.sql delete mode 100644 question/type/rqp/db/postgres7.php delete mode 100644 question/type/rqp/db/postgres7.sql delete mode 100644 question/type/rqp/db/upgrade.php delete mode 100644 question/type/rqp/editquestion.html delete mode 100644 question/type/rqp/editquestion.php delete mode 100644 question/type/rqp/lib.php delete mode 100644 question/type/rqp/questiontype.php delete mode 100644 question/type/rqp/remote.php delete mode 100644 question/type/rqp/rqp.php delete mode 100644 question/type/rqp/types.php delete mode 100644 question/type/rqp/version.php delete mode 100644 question/type/shortanswer/db/mysql.sql delete mode 100644 question/type/shortanswer/db/postgres7.sql delete mode 100644 question/type/truefalse/db/mysql.sql delete mode 100644 question/type/truefalse/db/postgres7.sql delete mode 100644 theme/cornflower/styles_color.css delete mode 100644 theme/cornflower/styles_fonts.css delete mode 100644 theme/cornflower/styles_layout.css delete mode 100644 theme/cornflower/styles_moz.css diff --git a/admin/index.php b/admin/index.php index af41e667551..6bfba862b88 100644 --- a/admin/index.php +++ b/admin/index.php @@ -501,19 +501,7 @@ /// Check if the guest user exists. If not, create one. if (! record_exists("user", "username", "guest")) { - $guest->auth = "manual"; - $guest->username = "guest"; - $guest->password = md5("guest"); - $guest->firstname = addslashes(get_string("guestuser")); - $guest->lastname = " "; - $guest->email = "root@localhost"; - $guest->description = addslashes(get_string("guestuserinfo")); - $guest->mnethostid = $CFG->mnet_localhost_id; - $guest->confirmed = 1; - $guest->lang = $CFG->lang; - $guest->timemodified= time(); - - if (! $guest->id = insert_record("user", $guest)) { + if (! $guest = create_guest_record()) { notify("Could not create guest user record !!!"); } } diff --git a/auth/README2 b/auth/README2 deleted file mode 100644 index 2934800fa14..00000000000 --- a/auth/README2 +++ /dev/null @@ -1,91 +0,0 @@ -AUTHENTICATION PLUGINS ----------------------- -Each authentication plugin is now contained in a subfolder as a class definition -in the auth.php file. For instance, the LDAP authentication plugin is the class -called auth_plugin_ldap defined in: - - /auth/ldap/auth.php - -To instantiate the class, there is a function in lib/moodlelib called -get_auth_plugin() that does the work for you: - - $ldapauth = get_auth_plugin('ldap'); - -Auth plugin classes are pretty basic. They contain the same functions that were -previously in each plugin's lib.php file, but refactored to become class -methods, and tweaked to reference the plugin's instantiated config to get at the -settings, rather than the global $CFG variable. - -Configuration ------------------ - -All auth plugins must have a config property that contains the name value pairs -from the config_plugins table. This is populated using the get_config() function -in the constructor. The settings keys have also had the "auth_" prefix, as well -as the auth plugin name, trimmed. For instance, what used to be - - echo $CFG->auth_ldapversion; - -is now accessed as - - echo $ldapauth->config->version; - -Authentication settings have been moved to the config_plugins database table, -with the plugin field set to "auth/foo" (for instance, "auth/ldap"). - -Method Names ------------------ - -When the functions from lib.php were ported to methods in auth.php, the "auth_" -prefix was dropped. For instance, calls to - - auth_user_login($user, $pass); - -now become - - $ldapauth->user_login($user, $pass); - -this also avoids having to worry about which auth/lib file to include since -Moodle takes care of it for you when you create an instance with -get_auth_plugin(). - -Code Use ------------------ - -Code calling auth plugins can use method_exists() to determine plugin -functionality, much in the same way that function_exists() was used until now. -In addition, auth plugins provide some methods by default that can be called: - -user_login($username, $password) - This is the primary method that is used by the authenticate_user_login() - function in moodlelib.php. This method should return a boolean indicating - whether or not the username and password authenticate successfully. - Both parameter must have magic quotes applied. - -is_internal() - Returns true if this authentication plugin is "internal" (which means that - Moodle stores the users' passwords and other details in the local Moodle - database). - -can_change_password() - Returns true if the plugin can change the users' passwords. - -change_password_url() - Returns the URL for changing the users' passwords, or false if the default - URL can be used. - -Other Methods ------------------ - -get_userinfo($username) - This method should return an array of fields from the authentication source - for the given username. Username parameter must have magic quotes applied. - The returned array does not have magic quotes applied. - -Upgrading from Moodle 1.7 ------------------------------ - -Moodle will upgrade the old auth settings (in $CFG->auth_foobar where foo is the -auth plugin and bar is the setting) to the new style in the config_plugin -database table. - diff --git a/auth/cas/auth_ldap_sync_users.php b/auth/cas/auth_ldap_sync_users.php deleted file mode 100644 index e4caec4b45d..00000000000 --- a/auth/cas/auth_ldap_sync_users.php +++ /dev/null @@ -1,48 +0,0 @@ -dirroot.'/course/lib.php'); -require_once($CFG->dirroot.'/lib/blocklib.php'); -require_once($CFG->dirroot.'/mod/resource/lib.php'); -require_once($CFG->dirroot.'/mod/forum/lib.php'); -require_once($CFG->dirroot.'/lib/moodlelib.php'); - -if (!is_enabled_auth('cas')) { - echo "Plugin not enabled!"; - die; -} - -$casauth = get_auth_plugin('cas'); -$casauth->sync_users(1000, true); - -?> \ No newline at end of file diff --git a/auth/cas/forbidden.html b/auth/cas/forbidden.html deleted file mode 100644 index fb4674bef68..00000000000 --- a/auth/cas/forbidden.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - -
-

-
- diff --git a/auth/cas/forbidden.php b/auth/cas/forbidden.php deleted file mode 100644 index 918261ecf65..00000000000 --- a/auth/cas/forbidden.php +++ /dev/null @@ -1,18 +0,0 @@ -fullname: $loginsite", $site->fullname, $loginsite); - include("forbidden.html"); - print_footer(); - exit; -?> - diff --git a/auth/cas/index_form.html b/auth/cas/index_form.html deleted file mode 100644 index 5a1c85e2e39..00000000000 --- a/auth/cas/index_form.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - -
-

-
-

-
-

:
- () -
-

-
-
- - - - -
- - - " /> -
-
-
-guestloginbutton) { ?> -
-

:

-
-
- - - " /> -
-
- - - -
-

-
-
-
- - -
-auth) { - case "email": - print_string("loginsteps", "", "signup.php"); -?> -
-
" />
-
-auth); - echo format_text($CFG->auth_instructions); - if (!empty($authplugin->config->user_create) and method_exists($authplugin, 'user_create')) { -?> - -
-
" />
-
- - -
- diff --git a/auth/cas/login.php b/auth/cas/login.php deleted file mode 100644 index 7551bc88c40..00000000000 --- a/auth/cas/login.php +++ /dev/null @@ -1,313 +0,0 @@ -langmenu)) { - $langmenu = ""; - } else { - $currlang = current_language(); - $langs = get_list_of_languages(); - if (empty($CFG->loginhttps)) { - $wwwroot = $CFG->wwwroot; - } else { - $wwwroot = str_replace('http:','https:',$CFG->wwwroot); - } - $langmenu = popup_form ("$wwwroot/login/index.php?lang=", $langs, "chooselang", $currlang, "", "", "", true); - } - - $loginsite = get_string("loginsite"); - $casauth = get_auth_plugin('cas'); - $ldapauth = get_auth_plugin('ldap'); - - - $frm = false; - $user = false; - if ((!empty($SESSION->wantsurl) and strstr($SESSION->wantsurl,'username=guest')) or $loginguest) { - /// Log in as guest automatically (idea from Zbigniew Fiedorowicz) - $frm->username = 'guest'; - $frm->password = 'guest'; - } else if (!empty($SESSION->wantsurl) && file_exists($CFG->dirroot.'/login/weblinkauth.php')) { - // Handles the case of another Moodle site linking into a page on this site - include($CFG->dirroot.'/login/weblinkauth.php'); - if (function_exists(weblink_auth)) { - $user = weblink_auth($SESSION->wantsurl); - } - if ($user) { - $frm->username = $user->username; - } else { - $frm = data_submitted(); - } - } else { - $frm = data_submitted(); - } - - if ($frm and (get_moodle_cookie() == '')) { // Login without cookie - - $errormsg = get_string("cookiesnotenabled"); - - } else if ($frm) { // Login WITH cookies - - $frm->username = trim(moodle_strtolower($frm->username)); - - if (($frm->username == 'guest') and empty($CFG->guestloginbutton)) { - $user = false; /// Can't log in as guest if guest button is disabled - $frm = false; - } else if (!$user) { - if ($CFG->auth == "cas" && $frm->username != 'guest') { /// Cas SSO case - $user = $casauth->authenticate_user_login($frm->username, $frm->password); - }else{ - $user = authenticate_user_login($frm->username, $frm->password); - } - } - update_login_count(); - - if ($user) { - if (! $user->confirmed ) { // they never confirmed via email - print_header(get_string("mustconfirm"), get_string("mustconfirm") ); - print_heading(get_string("mustconfirm")); - print_simple_box(get_string("emailconfirmsent", "", $user->email), "center"); - print_footer(); - die; - } - - $USER = $user; - if (!empty($USER->description)) { - $USER->description = true; // No need to cart all of it around - } - $USER->loggedin = true; - $USER->site = $CFG->wwwroot; // for added security, store the site in the session - sesskey(); // for added security, used to check script parameters - - if ($USER->username == "guest") { - $USER->lang = $CFG->lang; // Guest language always same as site - $USER->firstname = get_string("guestuser"); // Name always in current language - $USER->lastname = " "; - } - - if (!update_user_login_times()) { - error("Wierd error: could not update login records"); - } - - set_moodle_cookie($USER->username); - - unset($SESSION->lang); - $SESSION->justloggedin = true; - - // Restore the calendar filters, if saved - if (intval(get_user_preferences('calendar_persistflt', 0))) { - include_once($CFG->dirroot.'/calendar/lib.php'); - calendar_set_filters_status(get_user_preferences('calendar_savedflt', 0xff)); - } - - //Select password change url - $userauth = get_auth_plugin($USER->auth); - if (method_exists($userauth, 'can_change_password') and $userauth->can_change_password()) { - $passwordchangeurl=$CFG->wwwroot.'/login/change_password.php'; - } - - // check whether the user should be changing password - if (get_user_preferences('auth_forcepasswordchange', false)) { - if (isset($passwordchangeurl)) { - redirect($passwordchangeurl); - } else { - print_error('auth_cas_broken_password','auth'); - } - } - - - add_to_log(SITEID, "user", "login", "view.php?id=$user->id&course=".SITEID, $user->id, 0, $user->id); - - if (user_not_fully_set_up($USER)) { - $urltogo = $CFG->wwwroot.'/user/edit.php?id='.$USER->id.'&course='.SITEID; - // We don't delete $SESSION->wantsurl yet, so we get there later - - } else if (isset($SESSION->wantsurl) and (strpos($SESSION->wantsurl, $CFG->wwwroot) === 0)) { - $urltogo = $SESSION->wantsurl; /// Because it's an address in this site - unset($SESSION->wantsurl); - - } else { - $urltogo = $CFG->wwwroot.'/'; /// Go to the standard home page - unset($SESSION->wantsurl); /// Just in case - } - - // check if user password has expired - // Currently supported only for ldap-authentication module - if ($ldapauth->config->expiration == 1) { - $days2expire = $ldapauth->password_expire($USER->username); - if (intval($days2expire) > 0 && intval($days2expire) < intval($CFG->{$USER->auth.'_expiration_warning'})) { - print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, "", true, "
$langmenu
"); - notice_yesno(get_string('auth_passwordwillexpire', 'auth', $days2expire), $passwordchangeurl, $urltogo); - print_footer(); - exit; - } elseif (intval($days2expire) < 0 ) { - print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, "", true, "
$langmenu
"); - notice_yesno(get_string('auth_passwordisexpired', 'auth'), $passwordchangeurl, $urltogo); - print_footer(); - exit; - } - } - - reset_login_count(); - - load_all_capabilities(); /// This is what lets the user do anything on the site :-) - - redirect($urltogo); - - exit; - - } else { - if ($CFG->auth == "cas" ) { /// CAS error login - $errormsg = get_string("invalidcaslogin"); - phpCAS::logout("$CFG->wwwroot/auth/cas/forbidden.php"); - }else{ - $errormsg = get_string("invalidlogin"); - } - } - } - $user = $casauth->automatic_authenticate($user); - if ($user) { - if (! $user->confirmed ) { // they never confirmed via email - print_header(get_string("mustconfirm"), get_string("mustconfirm") ); - print_heading(get_string("mustconfirm")); - print_simple_box(get_string("emailconfirmsent", "", $user->email), "center"); - print_footer(); - die; - } - - $USER = $user; - if (!empty($USER->description)) { - $USER->description = true; // No need to cart all of it around - } - $USER->loggedin = true; - $USER->site = $CFG->wwwroot; // for added security, store the site in the session - sesskey(); // for added security, used to check script parameters - - if ($USER->username == "guest") { - $USER->lang = $CFG->lang; // Guest language always same as site - $USER->firstname = get_string("guestuser"); // Name always in current language - $USER->lastname = " "; - } - - if (!update_user_login_times()) { - error("Wierd error: could not update login records"); - } - - set_moodle_cookie($USER->username); - - unset($SESSION->lang); - $SESSION->justloggedin = true; - - // Restore the calendar filters, if saved - if (intval(get_user_preferences('calendar_persistflt', 0))) { - include_once($CFG->dirroot.'/calendar/lib.php'); - calendar_set_filters_status(get_user_preferences('calendar_savedflt', 0xff)); - } - - //Select password change url - $userauth = get_auth_plugin($USER->auth); - if (method_exists($userauth, 'can_change_password') and $userauth->can_change_password()) { - $passwordchangeurl=$CFG->wwwroot.'/login/change_password.php'; - } - - // check whether the user should be changing password - if (get_user_preferences('auth_forcepasswordchange', false)) { - if (isset($passwordchangeurl)) { - redirect($passwordchangeurl); - } else { - print_error('auth_cas_broken_password','auth'); - } - } - - - add_to_log(SITEID, "user", "login", "view.php?id=$user->id&course=".SITEID, $user->id, 0, $user->id); - - if (user_not_fully_set_up($USER)) { - $urltogo = $CFG->wwwroot.'/user/edit.php?id='.$USER->id.'&course='.SITEID; - // We don't delete $SESSION->wantsurl yet, so we get there later - - } else if (isset($SESSION->wantsurl) and (strpos($SESSION->wantsurl, $CFG->wwwroot) === 0)) { - $urltogo = $SESSION->wantsurl; /// Because it's an address in this site - unset($SESSION->wantsurl); - - } else { - $urltogo = $CFG->wwwroot.'/'; /// Go to the standard home page - unset($SESSION->wantsurl); /// Just in case - } - - // check if user password has expired - // Currently supported only for ldap-authentication module - if ($ldapauth->config->expiration == 1) { - $days2expire = $ldapauth->password_expire($USER->username); - if (intval($days2expire) > 0 && intval($days2expire) < intval($CFG->{$USER->auth.'_expiration_warning'})) { - print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, "", true, "
$langmenu
"); - notice_yesno(get_string('auth_passwordwillexpire', 'auth', $days2expire), $passwordchangeurl, $urltogo); - print_footer(); - exit; - } elseif (intval($days2expire) < 0 ) { - print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, "", true, "
$langmenu
"); - notice_yesno(get_string('auth_passwordisexpired', 'auth'), $passwordchangeurl, $urltogo); - print_footer(); - exit; - } - } - - reset_login_count(); - - load_all_capabilities(); /// This is what lets the user do anything on the site :-) - - redirect($urltogo); - - exit; - } else { - if (!$CFG->guestloginbutton) { - $errormsg = get_string("invalidcaslogin"); - phpCAS::logout("$CFG->wwwroot/auth/cas/forbidden.php"); - } - } - - if (empty($errormsg)) { - $errormsg = ""; - } - - if (empty($SESSION->wantsurl)) { - $SESSION->wantsurl = array_key_exists('HTTP_REFERER',$_SERVER) ? $_SERVER["HTTP_REFERER"] : $CFG->wwwroot.'/'; - } - - if (get_moodle_cookie() == '') { - set_moodle_cookie('nobody'); // To help search for cookies - } - - if (empty($frm->username)) { - $frm->username = get_moodle_cookie() === 'nobody' ? '' : get_moodle_cookie(); - $frm->password = ""; - } - - if (!empty($frm->username)) { - $focus = "login.password"; - } else { - $focus = "login.username"; - } - - if ($CFG->auth == "email" or $CFG->auth == "none" or chop($CFG->auth_instructions) <> "" ) { - $show_instructions = true; - } else { - $show_instructions = false; - } - - print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, "", true, "
$langmenu
"); - include($CFG->dirroot.'/auth/cas/index_form.html'); - print_footer(); - - exit; - - // No footer on this page - -?> diff --git a/auth/cas/logout.php b/auth/cas/logout.php deleted file mode 100644 index 5f0a5cc87ad..00000000000 --- a/auth/cas/logout.php +++ /dev/null @@ -1,15 +0,0 @@ -cas_logout) { - require_once($CFG->dirroot.'/config.php'); - include_once($CFG->dirroot.'/lib/cas/CAS.php'); - phpCAS::client($CFG->cas_version,$CFG->cas_hostname,(int)$CFG->cas_port,$CFG->cas_baseuri); - $backurl = $CFG->wwwroot; - phpCAS::logout($backurl); - } - -?> \ No newline at end of file diff --git a/auth/nologin/auth.php b/auth/nologin/auth.php index f91ec9c8a7f..91070593673 100644 --- a/auth/nologin/auth.php +++ b/auth/nologin/auth.php @@ -1,7 +1,7 @@ libdir.'/authlib.php'); /** - * Plugin for no authentication. + * Plugin for no authentication - disabled user. */ class auth_plugin_nologin extends auth_plugin_base { @@ -32,10 +32,10 @@ class auth_plugin_nologin extends auth_plugin_base { } /** - * Do not allow any login + * Do not allow any login. * */ - function user_login ($username, $password) { + function user_login($username, $password) { return false; } @@ -47,18 +47,17 @@ class auth_plugin_nologin extends auth_plugin_base { } /** - * Returns true if this authentication plugin is 'internal'. + * No external data sync. * * @return bool */ function is_internal() { //we do not know if it was internal or external originally - return false; + return true; } /** - * Returns true if this authentication plugin can change the user's - * password. + * No changing of password. * * @return bool */ @@ -67,21 +66,10 @@ class auth_plugin_nologin extends auth_plugin_base { } /** - * Prints a form for configuring this authentication plugin. - * - * This function is called from admin/auth.php, and outputs a full page with - * a form for configuring this plugin. - * - * @param array $page An object containing all the data for this page. + * No password resetting. */ - function config_form($config, $err, $user_fields) { - } - - /** - * Processes and stores configuration data for this authentication plugin. - */ - function process_config($config) { - return true; + function can_reset_password() { + return false; } } diff --git a/backup/db/mysql.sql b/backup/db/mysql.sql deleted file mode 100644 index 66c9359a7b4..00000000000 --- a/backup/db/mysql.sql +++ /dev/null @@ -1,75 +0,0 @@ -# -# Table structure for table `prefix_backup_files` -# - -CREATE TABLE `prefix_backup_files` ( - `id` int(10) unsigned NOT NULL auto_increment, - `backup_code` int(10) unsigned NOT NULL default '0', - `file_type` varchar(10) NOT NULL default '', - `path` varchar(255) NOT NULL default '', - `old_id` int(10) unsigned NOT NULL default '0', - `new_id` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `backup_files_uk` (`backup_code`,`file_type`,`path`) -) TYPE=MyISAM COMMENT='To store and recode ids to user and course files.'; -# -------------------------------------------------------- - -# -# Table structure for table `prefix_backup_ids` -# - -CREATE TABLE `prefix_backup_ids` ( - `id` int(10) unsigned NOT NULL auto_increment, - `backup_code` int(12) unsigned NOT NULL default '0', - `table_name` varchar(30) NOT NULL default '', - `old_id` int(10) unsigned NOT NULL default '0', - `new_id` int(10) unsigned NOT NULL default '0', - `info` mediumtext NOT NULL default '', - PRIMARY KEY (`id`), - UNIQUE KEY `backup_ids_uk` (`backup_code` ,`table_name`,`old_id`) -) TYPE=MyISAM COMMENT='To store and convert ids in backup/restore'; -# -------------------------------------------------------- - -# -# Table structure for table `prefix_backup_config` -# - -CREATE TABLE `prefix_backup_config` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(255) NOT NULL default '', - `value` varchar(255) NOT NULL default '', - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`) -) TYPE=MyISAM COMMENT='To store backup configuration variables'; -# -------------------------------------------------------- - -# -# Table structure for table `prefix_backup_courses` -# - -CREATE TABLE `prefix_backup_courses` ( - `id` int(10) unsigned NOT NULL auto_increment, - `courseid` int(10) unsigned NOT NULL default '0', - `laststarttime` int(10) unsigned NOT NULL default '0', - `lastendtime` int(10) unsigned NOT NULL default '0', - `laststatus` varchar(1) NOT NULL default '0', - `nextstarttime` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `courseid` (`courseid`) -) TYPE=MyISAM COMMENT='To store every course backup status'; - -# -------------------------------------------------------- - -# -# Table structure for table `prefix_backup_log` -# - -CREATE TABLE `prefix_backup_log` ( - `id` int(10) unsigned NOT NULL auto_increment, - `courseid` int(10) unsigned NOT NULL default '0', - `time` int(10) unsigned NOT NULL default '0', - `laststarttime` int(10) unsigned NOT NULL default '0', - `info` varchar(255) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM COMMENT='To store every course backup log info'; -# -------------------------------------------------------- diff --git a/backup/db/postgres7.sql b/backup/db/postgres7.sql deleted file mode 100644 index d39f76402db..00000000000 --- a/backup/db/postgres7.sql +++ /dev/null @@ -1,67 +0,0 @@ -# -# Table structure for table prefix_backup_files -# - -CREATE TABLE prefix_backup_files ( - id SERIAL PRIMARY KEY, - backup_code integer NOT NULL default '0', - file_type varchar(10) NOT NULL default '', - path varchar(255) NOT NULL default '', - old_id integer default NULL, - new_id integer default NULL, - CONSTRAINT prefix_backup_files_uk UNIQUE (backup_code, file_type, path) -); - - -# -# Table structure for table prefix_backup_ids -# - -CREATE TABLE prefix_backup_ids ( - id SERIAL PRIMARY KEY, - backup_code integer NOT NULL default '0', - table_name varchar(30) NOT NULL default '', - old_id integer NOT NULL default '0', - new_id integer default NULL, - info text, - CONSTRAINT prefix_backup_ids_uk UNIQUE (backup_code, table_name, old_id) -); - - -# -# Table structure for table prefix_backup_config -# - -CREATE TABLE prefix_backup_config ( - id SERIAL PRIMARY KEY, - name varchar(255) UNIQUE NOT NULL default '', - value varchar(255) NOT NULL default '' -); - - -# -# Table structure for table prefix_backup_courses -# - -CREATE TABLE prefix_backup_courses ( - id SERIAL PRIMARY KEY, - courseid integer UNIQUE NOT NULL default '0', - laststarttime integer NOT NULL default '0', - lastendtime integer NOT NULL default '0', - laststatus varchar(1) NOT NULL default '0', - nextstarttime integer NOT NULL default '0' -); - - - -# -# Table structure for table prefix_backup_log -# - -CREATE TABLE prefix_backup_log ( - id SERIAL PRIMARY KEY, - courseid integer NOT NULL default '0', - time integer NOT NULL default '0', - laststarttime integer NOT NULL default '0', - info varchar(255) NOT NULL default '' -); diff --git a/blocks/blog_tags/block_blog_tags.php b/blocks/blog_tags/block_blog_tags.php index f69aa8bc55b..c257e104e53 100644 --- a/blocks/blog_tags/block_blog_tags.php +++ b/blocks/blog_tags/block_blog_tags.php @@ -132,7 +132,7 @@ class block_blog_tags extends block_base { case BLOG_GROUP_LEVEL: $filtertype = 'group'; - $filterselect = get_current_group($this->instance->pageid); + $filterselect = get_and_set_current_group($COURSE, groupmode($COURSE)); break; case BLOG_COURSE_LEVEL: diff --git a/blocks/db/mysql.sql b/blocks/db/mysql.sql deleted file mode 100644 index 8aafe1b6fda..00000000000 --- a/blocks/db/mysql.sql +++ /dev/null @@ -1,45 +0,0 @@ -# $Id$ -# -# Table structure for table `blocks` -# - -CREATE TABLE `prefix_block` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(40) NOT NULL default '', - `version` int(10) NOT NULL default '0', - `cron` int(10) unsigned NOT NULL default '0', - `lastcron` int(10) unsigned NOT NULL default '0', - `visible` tinyint(1) NOT NULL default '1', - `multiple` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - -CREATE TABLE `prefix_block_instance` ( - `id` int(10) not null auto_increment, - `blockid` int(10) not null default '0', - `pageid` int(10) not null default '0', - `pagetype` varchar(20) not null default '', - `position` varchar(10) not null default '', - `weight` tinyint(3) not null default '0', - `visible` tinyint(1) not null default '0', - `configdata` text not null default '', - PRIMARY KEY(`id`), - INDEX pageid(`pageid`), - INDEX pagetype(`pagetype`) -) TYPE=MyISAM; - -CREATE TABLE `prefix_block_pinned` ( - `id` int(10) not null auto_increment, - `blockid` int(10) not null default '0', - `pagetype` varchar(20) not null default '', - `position` varchar(10) not null default '', - `weight` tinyint(3) not null default '0', - `visible` tinyint(1) not null default '0', - `configdata` text not null default '', - PRIMARY KEY(`id`), - INDEX pagetype(`pagetype`) -) TYPE=MyISAM; - - - -# -------------------------------------------------------- diff --git a/blocks/db/postgres7.sql b/blocks/db/postgres7.sql deleted file mode 100644 index 352774cd2a9..00000000000 --- a/blocks/db/postgres7.sql +++ /dev/null @@ -1,41 +0,0 @@ -# $Id$ -# -# Table structure for table blocks -# - -CREATE TABLE prefix_block ( - id SERIAL8 PRIMARY KEY, - name varchar(40) NOT NULL default '', - version INT8 NOT NULL default '0', - cron INT8 NOT NULL default '0', - lastcron INT8 NOT NULL default '0', - visible int NOT NULL default '1', - multiple int NOT NULL default '0' -) ; - -CREATE TABLE prefix_block_instance ( - id SERIAL8 PRIMARY KEY, - blockid INT8 not null default '0', - pageid INT8 not null default '0', - pagetype varchar(20) not null default '', - position varchar(10) not null default '', - weight int not null default '0', - visible int not null default '0', - configdata text not null default '' -) ; -CREATE INDEX prefix_block_instance_pageid_idx ON prefix_block_instance (pageid); -CREATE INDEX prefix_block_instance_pagetype_idx ON prefix_block_instance (pagetype); - -CREATE TABLE prefix_block_pinned ( - id SERIAL8 PRIMARY KEY, - blockid INT8 NOT NULL default 0, - pagetype varchar(20) NOT NULL default '', - position varchar(10) NOT NULL default '', - weight INT NOT NULL default 0, - visible INT NOT NULL default 0, - configdata text NOT NULL default 0 -) ; - -CREATE INDEX prefix_block_pinned_pagetype_idx ON prefix_block_pinned (pagetype); - -# -------------------------------------------------------- diff --git a/blocks/news_items/block_news_items.php b/blocks/news_items/block_news_items.php index 8f46dfadebf..a4d7f3e2fd3 100644 --- a/blocks/news_items/block_news_items.php +++ b/blocks/news_items/block_news_items.php @@ -29,46 +29,29 @@ class block_news_items extends block_base { $text = ''; if (!$forum = forum_get_course_forum($COURSE->id, 'news')) { - return $this->content; + return ''; } + if (!$cm = get_coursemodule_from_instance('forum', $forum->id, $COURSE->id)) { + return ''; + } + + $context = get_context_instance(CONTEXT_MODULE, $cm->id); /// First work out whether we can post to this group and if so, include a link + $groupmode = groupmode($COURSE, $cm); + $currentgroup = get_and_set_current_group($COURSE, $groupmode); + - if (has_capability('moodle/site:accessallgroups', get_context_instance(CONTEXT_COURSE, $COURSE->id))) { /// Teachers can always post - $visiblegroups = -1; - + if (forum_user_can_post_discussion($forum, $currentgroup, $groupmode, $cm, $context)) { $text .= ''; - - } else { /// Check the group situation - $currentgroup = get_current_group($COURSE->id); - - if (forum_user_can_post_discussion($forum, $currentgroup)) { - $text .= ''; - } - - if (!$cm = get_coursemodule_from_instance('forum', $forum->id, $COURSE->id)) { - $this->content->text = $text; - return $this->content; - } - - $groupmode = groupmode($COURSE, $cm); - - /// Decides if current user is allowed to see ALL the current discussions or not - - if (!$currentgroup and ($groupmode != SEPARATEGROUPS) ) { - $visiblegroups = -1; - } else { - $visiblegroups = $currentgroup; - } } /// Get all the recent discussions we're allowed to see if (! $discussions = forum_get_discussions($forum->id, 'p.modified DESC', 0, false, - $visiblegroups, $COURSE->newsitems) ) { + $currentgroup, $COURSE->newsitems) ) { $text .= '('.get_string('nonews', 'forum').')'; $this->content->text = $text; return $this->content; diff --git a/blocks/online_users/block_online_users.php b/blocks/online_users/block_online_users.php index 389c900ae38..fc019867bb4 100644 --- a/blocks/online_users/block_online_users.php +++ b/blocks/online_users/block_online_users.php @@ -43,7 +43,7 @@ class block_online_users extends block_base { && !has_capability('moodle/site:accessallgroups', $context)); //Get the user current group - $currentgroup = $isseparategroups ? get_current_group($COURSE->id) : NULL; + $currentgroup = $isseparategroups ? get_and_set_current_group($COURSE, groupmode($COURSE)) : NULL; $groupmembers = ""; $groupselect = ""; @@ -51,7 +51,7 @@ class block_online_users extends block_base { //Add this to the SQL to show only group users if ($currentgroup !== NULL) { $groupmembers = ', '.groups_members_from_sql(); //TODO: ", {$CFG->prefix}groups_members gm "; - $groupselect .= groups_members_where_sql($currentgroup, 'u.id'); //" AND u.id = gm.userid AND gm.groupid = '$currentgroup'"; + $groupselect = ' AND '.groups_members_where_sql($currentgroup, 'u.id'); //" AND u.id = gm.userid AND gm.groupid = '$currentgroup'"; } if ($COURSE->id == SITEID) { // Site-level diff --git a/blocks/rss_client/db/mysql.sql b/blocks/rss_client/db/mysql.sql deleted file mode 100644 index fd41951d1ed..00000000000 --- a/blocks/rss_client/db/mysql.sql +++ /dev/null @@ -1,23 +0,0 @@ -# $Id$ -# This file contains a complete database schema for all the -# tables used by this module, written in SQL - -# It may also contain INSERT statements for particular data -# that may be used, especially new entries in the table log_display - -# -------------------------------------------------------- - -# -# Table structure for table `prefix_block_rss_client` -# - -CREATE TABLE prefix_block_rss_client ( - `id` int(11) NOT NULL auto_increment, - `userid` int(11) NOT NULL default '0', - `title` text NOT NULL default '', - `preferredtitle` varchar(64) NOT NULL default '', - `description` text NOT NULL default '', - `shared` int(2) NOT NULL default '0', - `url` varchar(255) NOT NULL default '', -PRIMARY KEY (`id`) -) TYPE=MyISAM COMMENT='Remote news feed information. Contains the news feed id, the userid of the user who added the feed, the title of the feed itself and a description of the feed contents along with the url used to access the remote feed. Preferredtitle is a field for future use - intended to allow for custom titles rather than those found in the feed.'; \ No newline at end of file diff --git a/blocks/rss_client/db/postgres7.sql b/blocks/rss_client/db/postgres7.sql deleted file mode 100644 index 7cd0a8793e7..00000000000 --- a/blocks/rss_client/db/postgres7.sql +++ /dev/null @@ -1,20 +0,0 @@ -# $Id$ -# This file contains a complete database schema for all the -# tables used by this module, written in SQL - -# It may also contain INSERT statements for particular data -# that may be used, especially new entries in the table log_display - -# -# Table structure for table `block_rss_client` -# - -CREATE TABLE prefix_block_rss_client ( - id SERIAL PRIMARY KEY, - userid INTEGER NOT NULL default '0', - title text NOT NULL default '', - preferredtitle varchar(64) NOT NULL default '', - description text NOT NULL default '', - shared INTEGER NOT NULL default '0', - url varchar(255) NOT NULL default '' -); diff --git a/course/grades.php b/course/grades.php index 64c93076456..33928b17dd9 100644 --- a/course/grades.php +++ b/course/grades.php @@ -22,11 +22,8 @@ $stractivityreport = get_string("activityreport"); /// Check to see if groups are being used in this course - if ($groupmode = groupmode($course)) { // Groups are being used - $currentgroup = get_and_set_current_group($course, $groupmode, $changegroup); - } else { - $currentgroup = false; - } + $groupmode = groupmode($course); + $currentgroup = get_and_set_current_group($course, $groupmode, $changegroup); /// Get a list of all students if ($currentgroup) { @@ -308,7 +305,6 @@ $options["download"] = "xls"; print_single_button("grades.php", $options, get_string("downloadexcel")); echo ""; - $options = array(); $options["download"] = "txt"; print_single_button("grades.php", $options, get_string("downloadtext")); echo ""; diff --git a/course/group-edit.html b/course/group-edit.html deleted file mode 100644 index 2c3cd954e20..00000000000 --- a/course/group-edit.html +++ /dev/null @@ -1,63 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - -maxbytes, $course->maxbytes); - if (!empty($CFG->gdversion) and $maxbytes) { -?> - - - - - - - - -
: - -
:
- -
description); - if (isset($err["description"])) formerr($err["description"]); - ?> -
:
:hidepicture, ""); - ?> -
:
(
- dirroot.'/lib/uploadlib.php'); - upload_print_form_fragment(1,array('imagefile'),null,false,null,0,0,false); - if (isset($err["imagefile"])) formerr($err["imagefile"]); - ?> -
" />
- - - - -
diff --git a/course/group.php b/course/group.php deleted file mode 100644 index 96e14e4713e..00000000000 --- a/course/group.php +++ /dev/null @@ -1,85 +0,0 @@ -id); - - if (! $group = get_record("groups", "id", $group, "courseid", $course->id)) { - notice('Specified group could not be found!', "#"); - close_window_button(); - } - - // this is fine since group inherits course settings, this allows 1) teacher to edit all groups - // 2 someone with a role with a cap to modify a specific group - $context = get_context_instance(CONTEXT_GROUP, $group->id); - - // this is really weird - if (!has_capability('moodle/course:managegroups', $context)) { - close_window(); - } - -/// Print the headers of the page - - print_header(get_string('groupinfoedit').' : '.$group->name); - - -/// If data submitted, then process and store. - - if ($form = data_submitted() and confirm_sesskey()) { - - if (empty($form->name)) { - $err['name'] = get_string("missingname"); - - } else { - require_once($CFG->dirroot.'/lib/uploadlib.php'); - - $um = new upload_manager('imagefile',false,false,null,false,0,true,true); - if ($um->preprocess_files()) { - require_once("$CFG->libdir/gdlib.php"); - - if (save_profile_image($group->id, $um, 'groups')) { - $group->picture = 1; - } - } - - // Setting a new object in order to avoid updating other columns for the record, - // which could lead to SQL injection vulnerabilities. - - // Be VERY sure to sanitize all parameters that go into $dataobj! - - $dataobj = new stdClass; - $dataobj->id = $group->id; - $dataobj->name = clean_text($form->name); - $dataobj->description = clean_text($form->description); - $dataobj->hidepicture = empty($form->hidepicture) ? 0 : 1; - $dataobj->password = required_param('password', PARAM_ALPHANUM); - $dataobj->picture = $group->picture; - if (!update_record('groups', $dataobj)) { - notify("A strange error occurred while trying to save"); - } else { - notify(get_string('changessaved')); - } - close_window(3); - } - } - - - $usehtmleditor = false; - - include('group-edit.html'); - - echo ""; -?> diff --git a/course/groups-edit.html b/course/groups-edit.html deleted file mode 100755 index 6d43f92e534..00000000000 --- a/course/groups-edit.html +++ /dev/null @@ -1,182 +0,0 @@ - - -
- -
: - -
- - - - - - - - - -
- -
- - - - - - -
- -
- - -
-
- -
- - - - -
- -
- -
- - - -
-
- -
- - - - - -
- -
- -
-
diff --git a/course/groups.php b/course/groups.php deleted file mode 100644 index 30bd4d00ab1..00000000000 --- a/course/groups.php +++ /dev/null @@ -1,230 +0,0 @@ -id); - $context = get_context_instance(CONTEXT_COURSE, $course->id); - - if (!has_capability('moodle/course:managegroups', $context)) { - redirect("group.php?id=$course->id"); // Not allowed to see all groups - } - -/// Get the current list of groups and check the selection is valid - - $groups = get_groups($course->id); - - if ($selectedgroup and !isset($groups[$selectedgroup])) { - $selectedgroup = NULL; - } - - -/// Print the header of the page - - $strgroup = get_string('group'); - $strgroups = get_string('groups'); - $streditgroupprofile = get_string('editgroupprofile'); - $strgroupmembers = get_string('groupmembers'); - $strgroupmemberssee = get_string('groupmemberssee'); - $strparticipants = get_string('participants'); - - print_header("$course->shortname: $strgroups", $course->fullname, - "wwwroot/course/view.php?id=$course->id\">$course->shortname ". - "-> wwwroot/user/index.php?id=$course->id\">$strparticipants ". - "-> $strgroups", "", "", true, '', user_login_string($course, $USER)); - - -/// First, process any inputs there may be. - - if ($data = data_submitted() and confirm_sesskey()) { - - // Clean ALL incoming parameters which go in SQL queries here for good measure - $data->id = required_param('id', PARAM_INT); - $data->groups = optional_param('groups', 0, PARAM_INT); - $data->groupid = optional_param('groupid', 0, PARAM_INT); - $data->members = optional_param('members', array(), PARAM_INT); - - if (!empty($data->nonmembersadd)) { /// Add people to a group - if (!empty($data->nonmembers) and !empty($data->groupid)) { - $groupmodified = false; - foreach ($data->nonmembers as $userid) { - //since we allow people to be in more than 1 group, this has to go. - if (!ismember($data->groupid,$userid)) {// Just to make sure (another teacher could be editing) - $record->groupid = $data->groupid; - $record->userid = $userid; - $record->timeadded = time(); - if (!insert_record('groups_members', $record)) { - notify("Error occurred while adding user $userid to group $data->groupid"); - } - $groupmodified = true; - } - } - if ($groupmodified) { - set_field('groups', 'timemodified', time(), 'id', $data->groupid); - } - } - $selectedgroup = $data->groupid; - - - } else if (!empty($data->nonmembersrandom)) { /// Add all non members to groups - notify("Random adding of people into groups is not functional yet."); - - } else if (!empty($data->nonmembersinfo)) { /// Return info about the selected users - notify("You must turn Javascript on"); - - } else if (!empty($data->groupsremove)) { /// Remove a group, all members become nonmembers - if (!empty($data->groups)) { - if(!isset($groups[$data->groups])) { - error("This is not a valid group to remove"); - } - delete_records("groups", "id", $data->groups); - delete_records("groups_members", "groupid", $data->groups); - unset($groups[$data->groups]); - } - - - } else if (!empty($data->groupsinfo)) { /// Display full info for a group - notify("You must turn Javascript on"); - - } else if (!empty($data->groupsadd)) { /// Create a new group - if (!empty($data->newgroupname)) { - $newgroup->name = $data->newgroupname; - $newgroup->courseid = $course->id; - $newgroup->lang = current_language(); - $newgroup->timecreated = time(); - $newgroup->description = ''; // can not be null MDL-7300 - if (!insert_record("groups", $newgroup)) { - notify("Could not insert the new group '$newgroup->name'"); - } - $groups = get_groups($course->id); - } - - } else if (!empty($data->membersremove)) { /// Remove selected people from a particular group - - if (!empty($data->members) and !empty($data->groupid)) { - foreach ($data->members as $userid) { - delete_records('groups_members', 'userid', $userid, "groupid", $data->groupid); - } - set_field('groups', 'timemodified', time(), 'id', $data->groupid); - } - $selectedgroup = $data->groupid; - - } else if (!empty($data->membersinfo)) { /// Return info about the selected users - notify("You must turn Javascript on"); - - } - } - - -/// Calculate data ready to create the editing interface - - $strmemberincourse = get_string('memberincourse'); - $strgroupnonmembers = get_string('groupnonmembers'); - $strgroupmembersselected = get_string('groupmembersselected'); - $strgroupremovemembers = get_string('groupremovemembers'); - $strgroupinfomembers = get_string('groupinfomembers'); - $strgroupadd = get_string('groupadd'); - $strgroupremove = get_string('groupremove'); - $strgroupinfo = get_string('groupinfo'); - $strgroupinfoedit = get_string('groupinfoedit'); - $strgroupinfopeople = get_string('groupinfopeople'); - $strgrouprandomassign = get_string('grouprandomassign'); - $strgroupaddusers = get_string('groupaddusers'); - $courseid = $course->id; - $listgroups = array(); - $listmembers = array(); - $nonmembers = array(); - $groupcount = count($groups); - - -/// First, get everyone into the nonmembers array - - if ($contextusers = get_role_users($roleid, $context)) { - foreach ($contextusers as $contextuser) { - $nonmembers[$contextuser->id] = fullname($contextuser, true); - } - } - unset($contextusers); - -/// Pull out all the members into little arrays - - if ($groups) { - foreach ($groups as $group) { - $countusers = 0; - $listmembers[$group->id] = array(); - if ($groupusers = get_group_users($group->id, 'u.lastname ASC, u.firstname ASC')) { - foreach ($groupusers as $key=>$groupuser) { - if (!array_key_exists($groupuser->id, $nonmembers)) { - // group member with another role - unset($groupusers[$key]); - } else { - $listmembers[$group->id][$groupuser->id] = $nonmembers[$groupuser->id]; - //we do not remove people from $nonmembers, everyone is displayed - //this is to enable people to be registered in multiple groups - //unset($nonmembers[$groupuser->id]); - $countusers++; - } - } - } - $listgroups[$group->id] = $group->name." ($countusers)"; - } - natcasesort($listgroups); - } - - if (empty($selectedgroup)) { // Choose the first group by default - if ($selectedgroup = array_shift($temparr = array_keys($listgroups))) { - $members = $listmembers[$selectedgroup]; - } - } else { - $members = $listmembers[$selectedgroup]; - } - - $sesskey = !empty($USER->id) ? $USER->sesskey : ''; - -//TODO: -if (debugging()) { - echo '

[ New groups - debugging. ]

'; -} - -/// Print out the complete form - - print_heading(get_string('groups')); - - include('groups-edit.html'); - - print_footer($course); - -?> \ No newline at end of file diff --git a/course/moodleform_mod.php b/course/moodleform_mod.php index a73494aa66a..a0869614cb2 100644 --- a/course/moodleform_mod.php +++ b/course/moodleform_mod.php @@ -65,6 +65,7 @@ class moodleform_mod extends moodleform { $mform =& $this->_form; $mform->addElement('header', 'modstandardelshdr', get_string('modstandardels', 'form')); if ($supportsgroups){ + // TODO: we must define this as mod property! $mform->addElement('modgroupmode', 'groupmode', get_string('groupmode')); } $mform->addElement('modvisible', 'visible', get_string('visible')); diff --git a/enrol/authorize/db/mysql.sql b/enrol/authorize/db/mysql.sql deleted file mode 100755 index e0bd8c1d37c..00000000000 --- a/enrol/authorize/db/mysql.sql +++ /dev/null @@ -1,31 +0,0 @@ -CREATE TABLE `prefix_enrol_authorize` ( - `id` int(10) unsigned NOT NULL auto_increment, - `paymentmethod` enum('cc', 'echeck') NOT NULL default 'cc', - `cclastfour` int(4) unsigned NOT NULL default '0', - `ccname` varchar(255) NOT NULL default '', - `courseid` int(10) unsigned NOT NULL default '0', - `userid` int(10) unsigned NOT NULL default '0', - `transid` int(10) unsigned NOT NULL default '0', - `status` int(10) unsigned NOT NULL default '0', - `timecreated` int(10) unsigned NOT NULL default '0', - `settletime` int(10) unsigned NOT NULL default '0', - `amount` varchar(10) NOT NULL default '', - `currency` varchar(3) NOT NULL default 'USD', - PRIMARY KEY (`id`), - KEY `courseid` (`courseid`), - KEY `userid` (`userid`), - KEY `status` (`status`), - KEY `transid` (`transid`) -) TYPE=MyISAM COMMENT='Holds all known information about authorize.net transactions'; - -CREATE TABLE `prefix_enrol_authorize_refunds` ( - `id` int(10) unsigned NOT NULL auto_increment, - `orderid` int(10) unsigned NOT NULL default '0', - `status` int(1) unsigned NOT NULL default '0', - `amount` varchar(10) NOT NULL default '', - `transid` int(10) unsigned default '0', - `settletime` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `orderid` (`orderid`), - KEY `transid` (`transid`) -) TYPE=MyISAM COMMENT='Authorize.net refunds'; diff --git a/enrol/authorize/db/postgres7.sql b/enrol/authorize/db/postgres7.sql deleted file mode 100644 index 8f789e7aec8..00000000000 --- a/enrol/authorize/db/postgres7.sql +++ /dev/null @@ -1,32 +0,0 @@ -CREATE TABLE prefix_enrol_authorize ( - id SERIAL PRIMARY KEY, - paymentmethod varchar(6) default 'cc' NOT NULL, - cclastfour integer DEFAULT 0 NOT NULL, - ccname varchar(255) DEFAULT '', - courseid integer DEFAULT 0 NOT NULL, - userid integer DEFAULT 0 NOT NULL, - transid integer DEFAULT 0 NOT NULL, - status integer DEFAULT 0 NOT NULL, - timecreated integer DEFAULT 0 NOT NULL, - settletime integer DEFAULT 0 NOT NULL, - amount varchar(10) DEFAULT '0' NOT NULL, - currency varchar(3) DEFAULT 'USD' NOT NULL, - CONSTRAINT enroauth_pay_ck CHECK (paymentmethod IN ('cc', 'echeck')) -); - -CREATE INDEX prefix_enrol_authorize_courseid_idx ON prefix_enrol_authorize(courseid); -CREATE INDEX prefix_enrol_authorize_userid_idx ON prefix_enrol_authorize(userid); -CREATE INDEX prefix_enrol_authorize_status_idx ON prefix_enrol_authorize(status); -CREATE INDEX prefix_enrol_authorize_transid_idx ON prefix_enrol_authorize(transid); - -CREATE TABLE prefix_enrol_authorize_refunds ( - id SERIAL PRIMARY KEY, - orderid integer DEFAULT 0 NOT NULL, - status integer DEFAULT 0 NOT NULL, - amount varchar(10) DEFAULT '' NOT NULL, - transid integer DEFAULT 0, - settletime integer DEFAULT 0 NOT NULL -); - -CREATE INDEX prefix_enrol_authorize_refunds_orderid_idx ON prefix_enrol_authorize_refunds(orderid); -CREATE INDEX prefix_enrol_authorize_refunds_transid_idx ON prefix_enrol_authorize_refunds(transid); diff --git a/enrol/paypal/db/mysql.sql b/enrol/paypal/db/mysql.sql deleted file mode 100644 index b43cb7522dd..00000000000 --- a/enrol/paypal/db/mysql.sql +++ /dev/null @@ -1,23 +0,0 @@ -CREATE TABLE `prefix_enrol_paypal` ( - `id` int(10) unsigned NOT NULL auto_increment, - `business` varchar(255) NOT NULL default '', - `receiver_email` varchar(255) NOT NULL default '', - `receiver_id` varchar(255) NOT NULL default '', - `item_name` varchar(255) NOT NULL default '', - `courseid` int(10) unsigned NOT NULL default '0', - `userid` int(10) unsigned NOT NULL default '0', - `memo` varchar(255) NOT NULL default '', - `tax` varchar(255) NOT NULL default '', - `option_name1` varchar(255) NOT NULL default '', - `option_selection1_x` varchar(255) NOT NULL default '', - `option_name2` varchar(255) NOT NULL default '', - `option_selection2_x` varchar(255) NOT NULL default '', - `payment_status` varchar(255) NOT NULL default '', - `pending_reason` varchar(255) NOT NULL default '', - `reason_code` varchar(30) NOT NULL default '', - `txn_id` varchar(255) NOT NULL default '', - `parent_txn_id` varchar(255) NOT NULL default '', - `payment_type` varchar(30) NOT NULL default '', - `timeupdated` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM COMMENT='Holds all known information about PayPal transactions' ; diff --git a/enrol/paypal/db/postgres7.sql b/enrol/paypal/db/postgres7.sql deleted file mode 100644 index dc3073b1c00..00000000000 --- a/enrol/paypal/db/postgres7.sql +++ /dev/null @@ -1,22 +0,0 @@ -CREATE TABLE prefix_enrol_paypal ( - id SERIAL PRIMARY KEY, - business varchar(255) NOT NULL default '', - receiver_email varchar(255) NOT NULL default '', - receiver_id varchar(255) NOT NULL default '', - item_name varchar(255) NOT NULL default '', - courseid integer NOT NULL default '0', - userid integer NOT NULL default '0', - memo varchar(255) NOT NULL default '', - tax varchar(255) NOT NULL default '', - option_name1 varchar(255) NOT NULL default '', - option_selection1_x varchar(255) NOT NULL default '', - option_name2 varchar(255) NOT NULL default '', - option_selection2_x varchar(255) NOT NULL default '', - payment_status varchar(255) NOT NULL default '', - pending_reason varchar(255) NOT NULL default '', - reason_code varchar(30) NOT NULL default '', - txn_id varchar(255) NOT NULL default '', - parent_txn_id varchar(255) NOT NULL default '', - payment_type varchar(30) NOT NULL default '', - timeupdated integer NOT NULL default '0' -); diff --git a/group/db/mysql.sql b/group/db/mysql.sql deleted file mode 100644 index bf9b69147ce..00000000000 --- a/group/db/mysql.sql +++ /dev/null @@ -1,117 +0,0 @@ -# phpMyAdmin SQL Dump -# version 2.8.1 -# http://www.phpmyadmin.net -# -# Host: localhost -# Generation Time: Oct 24, 2006 at 05:23 PM -# Server version: 5.0.21 -# PHP Version: 4.4.2-pl1 -# -# Database: `moodle` -# - -# -------------------------------------------------------- - -# -# Table structure for table `mdl_groups_courses_groupings` -# - -CREATE TABLE `prefix_groups_courses_groupings` ( - `id` int(10) unsigned NOT NULL auto_increment, - `courseid` int(10) unsigned NOT NULL default '0', - `groupingid` mediumint(9) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `id` (`id`), - KEY `courseid` (`courseid`) -) ENGINE=MyISAM ; - -# -------------------------------------------------------- - -# -# Table structure for table `prefix_groups_courses_groups` -# - -CREATE TABLE `prefix_groups_courses_groups` ( - `id` int(10) unsigned NOT NULL auto_increment, - `courseid` int(10) unsigned NOT NULL default '0', - `groupid` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `id` (`id`), - KEY `courseid` (`courseid`) -) ENGINE=MyISAM ; - -# -------------------------------------------------------- - -# -# Table structure for table `prefix_groups_groupings` -# - -CREATE TABLE `prefix_groups_groupings` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(254) NOT NULL, - `description` text NOT NULL default '', - `timecreated` int(10) unsigned NOT NULL default '0', - `viewowngroup` tinyint(1) NOT NULL default 1, - `viewallgroupsmembers` tinyint(1) NOT NULL default 0, - `viewallgroupsactivities` tinyint(1) NOT NULL default 0, - `teachersgroupmark` tinyint(1) NOT NULL default 0, - `teachersgroupview` binary(1) NOT NULL default 0, - `teachersoverride` binary(1) NOT NULL default 0, - `teacherdeletable` binary(1) NOT NULL default 0, - PRIMARY KEY (`id`), - UNIQUE KEY `id` (`id`) -) ENGINE=MyISAM ; - -# -------------------------------------------------------- - -# -# Table structure for table `prefix_groups_groupings_groups` -# - -CREATE TABLE `prefix_groups_groupings_groups` ( - `id` int(10) unsigned NOT NULL auto_increment, - `groupingid` int(10) unsigned default '0', - `groupid` int(10) NOT NULL default '0', - `timeadded` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `id` (`id`), - KEY `courseid` (`groupingid`) -) ENGINE=MyISAM AUTO_INCREMENT=67 ; - -# -------------------------------------------------------- - -# -# Table structure for table `prefix_groups` -# - -CREATE TABLE `prefix_groups` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(255) NOT NULL, - `description` text NOT NULL default '', - `enrolmentkey` varchar(50) NOT NULL default '', - `lang` varchar(10) NOT NULL default 'en', - `theme` varchar(50) NOT NULL default '', - `picture` int(10) unsigned NOT NULL default '0', - `hidepicture` int(1) unsigned NOT NULL default '0', - `timecreated` int(10) unsigned NOT NULL default '0', - `timemodified` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `id` (`id`) -) ENGINE=MyISAM ; - -# -------------------------------------------------------- - -# -# Table structure for table `prefix_groups_members` -# - -CREATE TABLE `prefix_groups_members` ( - `id` int(10) unsigned NOT NULL auto_increment, - `groupid` int(10) unsigned NOT NULL default '0', - `userid` int(10) unsigned NOT NULL default '0', - `timeadded` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `id` (`id`), - KEY `groupid` (`groupid`), - KEY `userid` (`userid`) -) ENGINE=MyISAM ; diff --git a/group/db/postgres7.sql b/group/db/postgres7.sql deleted file mode 100644 index a21609b3527..00000000000 --- a/group/db/postgres7.sql +++ /dev/null @@ -1,65 +0,0 @@ - - -CREATE TABLE prefix_groups_courses_groupings ( - id SERIAL PRIMARY KEY, - courseid integer NOT NULL default 0, - groupingid integer NOT NULL default 0 -); -CREATE INDEX prefix_groups_courses_groupings_courseid_idx ON prefix_groups_courses_groupings (courseid); -COMMENT ON TABLE prefix_groups_courses_groupings IS 'New groupings (OU).'; - - -CREATE TABLE prefix_groups_courses_groups ( - id SERIAL PRIMARY KEY, - courseid integer NOT NULL default '0', - groupid integer NOT NULL default '0' -); -CREATE INDEX prefix_groups_courses_groups_courseid_idx ON prefix_groups_courses_groups (courseid); - - -CREATE TABLE prefix_groups_groupings ( - id SERIAL PRIMARY KEY, - name varchar(254) NOT NULL, - description text NOT NULL default '', - timecreated integer NOT NULL default 0, - viewowngroup integer NOT NULL default 1, - viewallgroupsmembers integer NOT NULL default 0, - viewallgroupsactivities integer NOT NULL default 0, - teachersgroupmark integer NOT NULL default 0, - teachersgroupview integer NOT NULL default 0, - teachersoverride integer NOT NULL default 0 -); - - -CREATE TABLE prefix_groups_groupings_groups ( - id SERIAL PRIMARY KEY, - groupingid integer NOT NULL default 0, - groupid integer NOT NULL default 0, - timeadded integer NOT NULL default 0 -); -CREATE INDEX prefix_groups_groupings_groups_groupingid_idx ON prefix_groups_groupings_groups (groupingid); - - -CREATE TABLE prefix_groups ( - id SERIAL PRIMARY KEY, - name varchar(255) NOT NULL, - description text NOT NULL default '', - enrolmentkey varchar(50) NOT NULL default '', - lang varchar(10) NOT NULL default 'en', - theme varchar(50) NOT NULL default '', - picture integer NOT NULL default '0', - hidepicture integer NOT NULL default '0', - timecreated integer NOT NULL default '0', - timemodified integer NOT NULL default '0' -); - - -CREATE TABLE prefix_groups_members ( - id SERIAL PRIMARY KEY, - groupid integer NOT NULL default '0', - userid integer NOT NULL default '0', - timeadded integer NOT NULL default '0' -); -CREATE INDEX prefix_groups_members_groupid_idx ON prefix_groups_members (groupid); -CREATE INDEX prefix_groups_members_userid_idx ON prefix_groups_members (userid); -COMMENT ON TABLE prefix_groups_members IS 'New groupings (OU).'; diff --git a/group/edit.php b/group/edit.php index cacbb5bf78e..af358da0005 100755 --- a/group/edit.php +++ b/group/edit.php @@ -16,12 +16,17 @@ require_once('lib.php'); require_once('edit_form.php'); /// get url variables +$courseid = required_param('courseid', PARAM_INT); $id = optional_param('id', false, PARAM_INT); $groupingid = optional_param('grouping', false, PARAM_INT); $newgrouping = optional_param('newgrouping', false, PARAM_INT); -$courseid = required_param('courseid', PARAM_INT); +$delete = optional_param('delete', 0, PARAM_BOOL); +$confirm = optional_param('confirm', 0, PARAM_BOOL); -$delete = optional_param('delete', false, PARAM_BOOL); +if (empty($CFG->enablegroupings)) { + // NO GROUPINGS YET! + $groupingid = GROUP_NOT_IN_GROUPING; +} /// Course must be valid if (!$course = get_record('course', 'id', $courseid)) { @@ -33,6 +38,18 @@ if ($delete && !$id) { error(get_string('errorinvalidgroup')); } +if ($delete && !$confirm) { + print_header(get_string('deleteselectedgroup', 'group'), get_string('deleteselectedgroup', 'group')); + $optionsyes = array('id'=>$id, 'delete'=>1, 'courseid'=>$courseid, 'sesskey'=>sesskey(), 'confirm'=>1); + $optionsno = array('id'=>$courseid); + if (!$group = get_record('groups', 'id', $id)) { + error('Group ID was incorrect'); + } + notice_yesno(get_string('deletegroupconfirm', 'group', $group->name), 'edit.php', 'index.php', $optionsyes, $optionsno, 'post', 'get'); + print_footer(); + die; +} + /// basic access control checks if ($id) { if (!$group = get_record('groups', 'id', $id)) { @@ -62,6 +79,9 @@ if (!empty($group)) { // Process delete action if ($delete) { + if (!confirm_sesskey()) { + error('Sesskey error'); + } if (groups_delete_group($id)) { redirect(groups_home_url($course->id, null, $groupingid, false)); } else { diff --git a/group/edit_form.php b/group/edit_form.php index 8e1a5a2e14a..f1d9a335059 100644 --- a/group/edit_form.php +++ b/group/edit_form.php @@ -47,12 +47,16 @@ class group_edit_form extends moodleform { $mform->setHelpButton('imagefile', array ('picture', get_string('helppicture')), true); } - + if ($group) { $buttonstr = get_string('save', 'group'); $mform->addElement('hidden','id', null); $mform->setType('id', PARAM_INT); - +if (empty($CFG->enablegroupings)) { + // NO GROUPINGS YET! + $mform->addElement('hidden', 'newgrouping', GROUP_NOT_IN_GROUPING); + $mform->setType('newgrouping', PARAM_INT); +} else { // Options to move group to another grouping $groupingids = groups_get_groupings($courseid); @@ -67,8 +71,9 @@ class group_edit_form extends moodleform { $mform->addElement('select', 'newgrouping', get_string('addgroupstogrouping', 'group'), $listgroupings); $mform->setDefault('newgrouping', $groupingid); } +} } - + if($groupingid) { $mform->addElement('hidden', 'grouping', $groupingid); $mform->setType('grouping', PARAM_INT); diff --git a/group/grouping.php b/group/grouping.php index 4bdcd8bb632..04324eb882a 100644 --- a/group/grouping.php +++ b/group/grouping.php @@ -18,6 +18,11 @@ $id = optional_param('id', false, PARAM_INT); $delete = optional_param('delete', false, PARAM_BOOL); +if (empty($CFG->enablegroupings)) { + // NO GROUPIGS YET! + error('No groupings yet'); +} + // Get the course information so we can print the header and // check the course id is valid $course = groups_get_course_info($courseid); diff --git a/group/groupui/addgroupstogrouping-form.html b/group/groupui/addgroupstogrouping-form.html deleted file mode 100644 index cc998c8bbb1..00000000000 --- a/group/groupui/addgroupstogrouping-form.html +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/group/groupui/addgroupstogrouping-form.js b/group/groupui/addgroupstogrouping-form.js deleted file mode 100644 index 9a9e90accf0..00000000000 --- a/group/groupui/addgroupstogrouping-form.js +++ /dev/null @@ -1,73 +0,0 @@ - - -function onAddGroupsToGrouping() { - hideAllForms(); - showElement("groupeditform"); - addGroupsToGrouping(); - setText('selectedgroupingforaddinggroups', ""); - return false; -} - - -/* - * Adds the selected groups to the selected groupings - */ -function addGroupsToGrouping() { - //alert("Called addGroupsToGrouping"); - selectedgroups = getMultipleSelect("groupsnotingrouping"); - if (selectedgroups != '') { - var url = "addgroupstogrouping-xml.php"; - var requeststring = "groupingid="+selectedgroupingid - +"&groups="+selectedgroups; - sendPostRequest(request, url, requeststring, addGroupsToGroupingResponse); - } -} - - -/** - * The callback for the response to the request sent in addGroupsToGrouping() - */ -function addGroupsToGroupingResponse() { - if (checkAjaxResponse(request)) { - //alert("addGroupsToGrouping called"); - //alert(request.responseText); - // Need XML sent back with groupingid - // Really want to set this to be the grouping before - error = getFromXML(request.responseXML, 'error'); - if (error != null) { - alert(error); - } - updateGroupings(); - hideElement("addgroupstogroupingform"); - } -} - - -/** - * Updates the groups not in the selected grouping for the form for adding groups to a grouping - */ -function updateGroupsNotInGrouping() { - //alert("updateNonMembers called"); - var url="getgroupsnotingrouping-xml.php"; - var requeststring = "groupingid="+selectedgroupingid; - sendPostRequest(request, url, requeststring, updateGroupsNotInGroupingResponse); -} - - -/** - * The callback for the response to the request sent in updateGroupsNotInGrouping() - */ -function updateGroupsNotInGroupingResponse() { - if (checkAjaxResponse(request)) { - //alert("updateGroupsNotInGroupingResponse"); - var xmlDoc = request.responseXML; - //alert(request.responseText); - error = getFromXML(request.responseXML, 'error'); - if (error != null) { - alert(error); - } - addOptionsFromXML("groupsnotingrouping", xmlDoc); - } -} - - diff --git a/group/groupui/addgroupstogrouping-xml.php b/group/groupui/addgroupstogrouping-xml.php deleted file mode 100644 index 9e3850f737b..00000000000 --- a/group/groupui/addgroupstogrouping-xml.php +++ /dev/null @@ -1,37 +0,0 @@ -'; -echo ''; - -$courseid = required_param('courseid', PARAM_INT); -$groupingid = required_param('groupingid', PARAM_INT); -$groups = required_param('groups', PARAM_SEQUENCE); //TODO: check. - -require_login($courseid); - -if (confirm_sesskey() and isteacheredit($courseid)) { - $groupids = explode(',', $groups); - - if ($groupids != false) { - foreach($groupids as $groupid) { - $groupadded = groups_add_group_to_grouping($groupid, $groupingid); - if (!$groupadded) { - echo 'Failed to add group $groupid to grouping'; - } - } - } -} - -echo ''; -?> diff --git a/group/groupui/addmembers-form.html b/group/groupui/addmembers-form.html deleted file mode 100644 index 54847fcf670..00000000000 --- a/group/groupui/addmembers-form.html +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/group/groupui/addmembers-form.js b/group/groupui/addmembers-form.js deleted file mode 100644 index 9aa54bb728c..00000000000 --- a/group/groupui/addmembers-form.js +++ /dev/null @@ -1,79 +0,0 @@ -function onAddMembers() { - hideAllForms(); - showElement("groupeditform"); - addMembers(); - return false; -} - -function onShowAll() { - updateNonMembers(); - return false; -} - - - -/* - * Adds the selected users to the selected group - */ -function addMembers() { - //alert("Called addMembers"); - users = getMultipleSelect("nonmembers"); - if (users != '') { - var url = "addmembers-xml.php"; - var requeststring = "groupid="+selectedgroupid+"&users="+users; - sendPostRequest(request, url, requeststring, addMembersResponse); - } -} - -/** - * The callback for the response to the request sent in addMembers() - */ -function addMembersResponse() { - if (checkAjaxResponse(request)) { - //alert("addMembersResponse called"); - //alert(request.responseText); - // Need XML sent back with groupingid - // Really want to set this to be the grouping before - error = getFromXML(request.responseXML, 'error'); - if (error != null) { - alert(error); - } - updateSelectedGrouping(); - hideElement("addmembersform"); - } -} - - -/** - * Updates the list of non members of a group in the form for adding members to a group - */ -function updateNonMembers() { - //alert("updateNonMembers called"); - var url="getnonmembers-xml.php"; - // showall indicates if we should show users already in groups in the grouping - // we have to turn it into a variable that we can put in a post - var showall = getCheckBoxValue('showall');; - var requeststring = "groupid="+selectedgroupid - +"&groupingid="+selectedgroupingid - +"&showall="+showall; - - sendPostRequest(request, url, requeststring, updateNonMembersResponse); -} - -/** - * The callback for the response to the request sent in updateNonMembers() - */ -function updateNonMembersResponse() { - if (checkAjaxResponse(request)) { - //alert("updateNonMembersResponse"); - var xmlDoc = request.responseXML; - // alert(request.responseText); - error = getFromXML(request.responseXML, 'error'); - if (error != null) { - alert(error); - } - addOptionsFromXML("nonmembers", xmlDoc); - } -} - - diff --git a/group/groupui/addmembers-xml.php b/group/groupui/addmembers-xml.php deleted file mode 100644 index b31478d019a..00000000000 --- a/group/groupui/addmembers-xml.php +++ /dev/null @@ -1,33 +0,0 @@ -'; -echo ''; - -$courseid = required_param('courseid', PARAM_INT); -$groupid = required_param('groupid', PARAM_INT); -$users = required_param('users', PARAM_SEQUENCE); - -require_login($courseid); - -if (confirm_sesskey() and isteacheredit($courseid)) { - $userids = explode(',', $users); - - if ($userids != false) { - foreach($userids as $userid) { - $useradded = groups_add_member($groupid, $userid); - if (!$useradded) { - echo 'Failed to add user $userid to group'; - } - } - } -} - -echo ''; -?> diff --git a/group/groupui/ajax.js b/group/groupui/ajax.js deleted file mode 100644 index eab802eb7e3..00000000000 --- a/group/groupui/ajax.js +++ /dev/null @@ -1,77 +0,0 @@ -/*********************************************************************************************************** - * Contains functions for creating and sending Ajax requests. - * This code needs to be a bit more careful about creating separate requests for different events - if - * somebody presses a button several times in quick succession (such as the delete grouping button) then - * we get an error. - * There also seems to a problem with IE - need to check this out - ***********************************************************************************************************/ - - - - -/* - * Creates an XMLHttpRequest object - * @return The XMLHttpRequest object created. - */ -function createRequest() { - var newrequest = null; - try { - newrequest = new XMLHttpRequest(); - } catch (trymicrosoft) { - // Deal with Microsoft browsers - try { - newrequest = new ActiveXObject("Msxml2.XMLHTTP"); - } catch (othermicrosoft) { - try { - newrequest = new ActiveXObject("Microsoft.XMLHTTP"); - } catch (failed) { - newrequest = null; - } - } - } - - if (newrequest == null) { - alert("Error creating request object!"); - } else { - return newrequest; - } -} - -/* - * Sends an Ajax post request - * @param request - The XMLHttpRequest object - * @param url - The URL to send the request to - * @param requeststring - The string containing the variables to send in the post request - the format - * is basically the same as a GET string - * @callbackfunction - The function to call when the response to the request is received -*/ -function sendPostRequest(postrequest, url, requeststring, callbackfunction) { - // Add on the date and time to get round caching problem - url = url + "?dummy=" + new Date().getTime(); - // Add the course id and sesskey so we can check these on the server - requeststring = 'courseid='+courseid+'&'+'sesskey='+sesskey+'&'+requeststring; - postrequest.abort(); - postrequest.open('post', url, true); - postrequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - postrequest.onreadystatechange = callbackfunction; - postrequest.send(requeststring); -} - -function checkAjaxResponse(request) { - process = false; - - if (request.readyState == 4 && request.status == 200) { - process = true; - } - if (request.readyState == 4 && request.status != 200) { - alert('An error has occurred - the page returned a '+ request.status + ' error'); - } - return process; -} - -var responseFailure = function(o){ - alert("Failure callback"); -} diff --git a/group/groupui/connection.js b/group/groupui/connection.js deleted file mode 100644 index 670a10600d6..00000000000 --- a/group/groupui/connection.js +++ /dev/null @@ -1,775 +0,0 @@ -/* -Copyright (c) 2006, Yahoo! Inc. All rights reserved. -Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 0.11.0 -*/ - -/** - * The Connection Manager provides a simplified interface to the XMLHttpRequest - * object. It handles cross-browser instantiantion of XMLHttpRequest, negotiates the - * interactive states and server response, returning the results to a pre-defined - * callback you create. - * @ class - */ -YAHOO.util.Connect = -{ -/** - * Array of MSFT ActiveX ids for XMLHttpRequest. - * @private - * @type array - */ - _msxml_progid:[ - 'MSXML2.XMLHTTP.3.0', - 'MSXML2.XMLHTTP', - 'Microsoft.XMLHTTP' - ], - - /** - * Object literal of HTTP header(s) - * @private - * @type object - */ - _http_header:{}, - - /** - * Determines if HTTP headers are set. - * @private - * @type boolean - */ - _has_http_headers:false, - - /** - * Determines if a default header of - * Content-Type of 'application/x-www-form-urlencoded' - * will be added to any client HTTP headers sent for POST - * transactions. - * @private - * @type boolean - */ - _default_post_header:true, - - /** - * Property modified by setForm() to determine if the data - * should be submitted as an HTML form. - * @private - * @type boolean - */ - _isFormSubmit:false, - - /** - * Property modified by setForm() to determine if a file(s) - * upload is expected. - * @private - * @type boolean - */ - _isFileUpload:false, - - /** - * Property modified by setForm() to set a reference to the HTML - * form node if the desired action is file upload. - * @private - * @type object - */ - _formNode:null, - - /** - * Property modified by setForm() to set the HTML form data - * for each transaction. - * @private - * @type string - */ - _sFormData:null, - - /** - * Collection of polling references to the polling mechanism in handleReadyState. - * @private - * @type string - */ - _poll:[], - - /** - * Queue of timeout values for each transaction callback with a defined timeout value. - * @private - * @type string - */ - _timeOut:[], - - /** - * The polling frequency, in milliseconds, for HandleReadyState. - * when attempting to determine a transaction's XHR readyState. - * The default is 50 milliseconds. - * @private - * @type int - */ - _polling_interval:50, - - /** - * A transaction counter that increments the transaction id for each transaction. - * @private - * @type int - */ - _transaction_id:0, - - /** - * Member to add an ActiveX id to the existing xml_progid array. - * In the event(unlikely) a new ActiveX id is introduced, it can be added - * without internal code modifications. - * @public - * @param string id The ActiveX id to be added to initialize the XHR object. - * @return void - */ - setProgId:function(id) - { - this._msxml_progid.unshift(id); - }, - - /** - * Member to enable or disable the default POST header. - * @public - * @param boolean b Set and use default header - true or false . - * @return void - */ - setDefaultPostHeader:function(b) - { - this._default_post_header = b; - }, - - /** - * Member to modify the default polling interval. - * @public - * @param {int} i The polling interval in milliseconds. - * @return void - */ - setPollingInterval:function(i) - { - if(typeof i == 'number' && isFinite(i)){ - this._polling_interval = i; - } - }, - - /** - * Instantiates a XMLHttpRequest object and returns an object with two properties: - * the XMLHttpRequest instance and the transaction id. - * @private - * @param {int} transactionId Property containing the transaction id for this transaction. - * @return connection object - */ - createXhrObject:function(transactionId) - { - var obj,http; - try - { - // Instantiates XMLHttpRequest in non-IE browsers and assigns to http. - http = new XMLHttpRequest(); - // Object literal with http and tId properties - obj = { conn:http, tId:transactionId }; - } - catch(e) - { - for(var i=0; i= 200 && httpStatus < 300){ - responseObject = this.createResponseObject(o, callback.argument); - if(callback.success){ - if(!callback.scope){ - callback.success(responseObject); - } - else{ - // If a scope property is defined, the callback will be fired from - // the context of the object. - callback.success.apply(callback.scope, [responseObject]); - } - } - } - else{ - switch(httpStatus){ - // The following case labels are wininet.dll error codes that may be encountered. - // Server timeout - case 12002: - // 12029 to 12031 correspond to dropped connections. - case 12029: - case 12030: - case 12031: - // Connection closed by server. - case 12152: - // See above comments for variable status. - case 13030: - responseObject = this.createExceptionObject(o.tId, callback.argument, isAbort); - if(callback.failure){ - if(!callback.scope){ - callback.failure(responseObject); - } - else{ - callback.failure.apply(callback.scope, [responseObject]); - } - } - break; - default: - responseObject = this.createResponseObject(o, callback.argument); - if(callback.failure){ - if(!callback.scope){ - callback.failure(responseObject); - } - else{ - callback.failure.apply(callback.scope, [responseObject]); - } - } - } - } - - this.releaseObject(o); - }, - - /** - * This method evaluates the server response, creates and returns the results via - * its properties. Success and failure cases will differ in the response - * object's property values. - * @private - * @param {object} o The connection object - * @param {} callbackArg User-defined argument or arguments to be passed to the callback - * @return object - */ - createResponseObject:function(o, callbackArg) - { - var obj = {}; - var headerObj = {}; - - try - { - var headerStr = o.conn.getAllResponseHeaders(); - var header = headerStr.split('\n'); - for(var i=0; i < header.length; i++){ - var delimitPos = header[i].indexOf(':'); - if(delimitPos != -1){ - headerObj[header[i].substring(0,delimitPos)] = header[i].substring(delimitPos+1); - } - } - } - catch(e){} - - obj.tId = o.tId; - obj.status = o.conn.status; - obj.statusText = o.conn.statusText; - obj.getResponseHeader = headerObj; - obj.getAllResponseHeaders = headerStr; - obj.responseText = o.conn.responseText; - obj.responseXML = o.conn.responseXML; - - if(typeof callbackArg !== undefined){ - obj.argument = callbackArg; - } - - return obj; - }, - - /** - * If a transaction cannot be completed due to dropped or closed connections, - * there may be not be enough information to build a full response object. - * The failure callback will be fired and this specific condition can be identified - * by a status property value of 0. - * - * If an abort was successful, the status property will report a value of -1. - * - * @private - * @param {int} tId Transaction Id - * @param callbackArg The user-defined arguments - * @param isAbort Determines if the exception is an abort. - * @return object - */ - createExceptionObject:function(tId, callbackArg, isAbort) - { - var COMM_CODE = 0; - var COMM_ERROR = 'communication failure'; - var ABORT_CODE = -1; - var ABORT_ERROR = 'transaction aborted'; - - var obj = {}; - - obj.tId = tId; - if(isAbort){ - obj.status = ABORT_CODE; - obj.statusText = ABORT_ERROR; - } - else{ - obj.status = COMM_CODE; - obj.statusText = COMM_ERROR; - } - - if(callbackArg){ - obj.argument = callbackArg; - } - - return obj; - }, - - /** - * Public method that stores the custom HTTP headers for each transaction. - * @public - * @param {string} label The HTTP header label - * @param {string} value The HTTP header value - * @return void - */ - initHeader:function(label,value) - { - if(this._http_header[label] === undefined){ - this._http_header[label] = value; - } - else{ - this._http_header[label] = value + "," + this._http_header[label]; - } - - this._has_http_headers = true; - }, - - /** - * Accessor that sets the HTTP headers for each transaction. - * @private - * @param {object} o The connection object for the transaction. - * @return void - */ - setHeader:function(o) - { - for(var prop in this._http_header){ - if(this._http_header.propertyIsEnumerable){ - o.conn.setRequestHeader(prop, this._http_header[prop]); - } - } - delete this._http_header; - - this._http_header = {}; - this._has_http_headers = false; - }, - - /** - * This method assembles the form label and value pairs and - * constructs an encoded string. - * asyncRequest() will automatically initialize the - * transaction with a HTTP header Content-Type of - * application/x-www-form-urlencoded. - * @public - * @param {string || object} form id or name attribute, or form object. - * @param {string} optional boolean to indicate SSL environment. - * @param {string} optional qualified path of iframe resource for SSL in IE. - * @return void - */ - setForm:function(formId, isUpload, secureUri) - { - this._sFormData = ''; - if(typeof formId == 'string'){ - // Determine if the argument is a form id or a form name. - // Note form name usage is deprecated by supported - // here for legacy reasons. - var oForm = (document.getElementById(formId) || document.forms[formId]); - } - else if(typeof formId == 'object'){ - var oForm = formId; - } - else{ - return; - } - - // If the isUpload argument is true, setForm will call createFrame to initialize - // an iframe as the form target. - // - // The argument secureURI is also required by IE in SSL environments - // where the secureURI string is a fully qualified HTTP path, used to set the source - // of the iframe, to a stub resource in the same domain. - if(isUpload){ - (typeof secureUri == 'string')?this.createFrame(secureUri):this.createFrame(); - this._isFormSubmit = true; - this._isFileUpload = true; - this._formNode = oForm; - - return; - } - - var oElement, oName, oValue, oDisabled; - var hasSubmit = false; - - // Iterate over the form elements collection to construct the - // label-value pairs. - for (var i=0; i'); - if(secureUri){ - // IE will throw a security exception in an SSL environment if the - // iframe source isn't set to a valid resource. - io.src = secureUri; - } - } - else{ - var io = document.createElement('IFRAME'); - io.id = 'ioFrame'; - io.name = 'ioFrame'; - } - - io.style.position = 'absolute'; - io.style.top = '-1000px'; - io.style.left = '-1000px'; - - document.body.appendChild(io); - }, - - /** - * Uploads HTML form, including files/attachments, targeting the - * iframe created in createFrame. - * - * @private - * @param {int} id The transaction id. - * @param {object} callback - User-defined callback object. - * @param {string} uri Fully qualified path of resource. - * @return void - */ - uploadFile:function(id, callback, uri){ - // Initialize the HTML form properties in case they are - // not defined in the HTML form. - this._formNode.action = uri; - this._formNode.enctype = 'multipart/form-data'; - this._formNode.method = 'POST'; - this._formNode.target = 'ioFrame'; - this._formNode.submit(); - - // Reset form status properties. - this._formNode = null; - this._isFileUpload = false; - this._isFormSubmit = false; - - // Create the upload callback handler that fires when the iframe - // receives the load event. Subsequently, the event handler is detached - // and the iframe removed from the document. - - var uploadCallback = function() - { - var oResponse = - { - tId: id, - responseText: document.getElementById("ioFrame").contentWindow.document.body.innerHTML, - argument: callback.argument - } - - if(callback.upload && !callback.scope){ - callback.upload(oResponse); - } - else{ - callback.upload.apply(callback.scope, [oResponse]); - } - - YAHOO.util.Event.removeListener("ioFrame", "load", uploadCallback); - window.ioFrame.location.replace('#'); - setTimeout("document.body.removeChild(document.getElementById('ioFrame'))",100); - }; - - // Bind the onload handler to the iframe to detect the file upload response. - YAHOO.util.Event.addListener("ioFrame", "load", uploadCallback); - }, - - /** - * Public method to terminate a transaction, if it has not reached readyState 4. - * @public - * @param {object} o The connection object returned by asyncRequest. - * @param {object} callback User-defined callback object. - * @param {string} isTimeout boolean to indicate if abort was a timeout. - * @return void - */ - abort:function(o, callback, isTimeout) - { - if(this.isCallInProgress(o)){ - window.clearInterval(this._poll[o.tId]); - this._poll.splice(o.tId); - if(isTimeout){ - this._timeOut.splice(o.tId); - } - o.conn.abort(); - this.handleTransactionResponse(o, callback, true); - - return true; - } - else{ - return false; - } - }, - - /** - * Public method to check if the transaction is still being processed. - * @public - * @param {object} o The connection object returned by asyncRequest - * @return boolean - */ - isCallInProgress:function(o) - { - // if the XHR object assigned to the transaction has not been dereferenced, - // then check its readyState status. Otherwise, return false. - if(o.conn){ - return o.conn.readyState != 4 && o.conn.readyState != 0; - } - else{ - //The XHR object has been destroyed. - return false; - } - }, - - /** - * Dereference the XHR instance and the connection object after the transaction is completed. - * @private - * @param {object} o The connection object - * @return void - */ - releaseObject:function(o) - { - //dereference the XHR instance. - o.conn = null; - //dereference the connection object. - o = null; - } -}; diff --git a/group/groupui/createautomaticgrouping-form.html b/group/groupui/createautomaticgrouping-form.html deleted file mode 100644 index 282fe1c7acf..00000000000 --- a/group/groupui/createautomaticgrouping-form.html +++ /dev/null @@ -1,54 +0,0 @@ -
-

-
- - - - - - -
-

-

-

-

-

-

-

-

-
-

- - - - - - - - - -
- -
  -

-

-
- - - - - - - - - - -
  -

-
- -

  -

-
-
-
diff --git a/group/groupui/createautomaticgrouping-form.js b/group/groupui/createautomaticgrouping-form.js deleted file mode 100644 index 9a0020d4528..00000000000 --- a/group/groupui/createautomaticgrouping-form.js +++ /dev/null @@ -1,79 +0,0 @@ -function onCreateAutomaticGrouping() { - valid = validateAutomaticGroupingForm(); - if (valid) { - hideAllForms(); - showElement("groupeditform"); - createAutomaticGrouping(); - } - - return false; -} - - -/** - * Adds an automatically generated grouping with the details as specified in the form - */ -function createAutomaticGrouping() { - //alert("Called createAutomaticGrouping"); - var url = "createautomaticgrouping-xml.php"; - var requeststring = "noofstudents="+getTextInputValue('noofstudents') - +"&noofgroups="+getTextInputValue('noofgroups') - +"&distribevenly="+getCheckBoxValue('distribevenly') - +"&alphabetical="+getCheckBoxValue('alphabetical') - +"&generationtype="+getRadioValue(document.automaticgroupingform.generationtype) - +"&name="+getTextInputValue('automaticgroupingname') - +"&description="+getTextInputValue('edit-automaticgroupingdescription') - +"&prefix="+getTextInputValue('groupprefix') - +"&defaultgroupdescription="+getTextInputValue('edit-defaultgroupdescription'); - - // alert(requeststring); - sendPostRequest(request, url, requeststring, createAutomaticGroupingResponse); -} - - - - /** - * The callback for the response to the request sent in createAutomaticGrouping() - * It sets the new grouping to be selected in the form. - */ - function createAutomaticGroupingResponse() { - if (checkAjaxResponse(request)) { - //alert("createAutomaticGroupingResponse"); - //alert(request.responseText); - error = getFromXML(request.responseXML, 'error'); - if (error != null) { - alert(error); - } - selectedgroupingid = getFromXML(request.responseXML, 'groupingid'); - selectedgroupid = null; - updateGroupings(); - hideElement("createautomaticgroupingform"); - } - } - -function validateAutomaticGroupingForm() { - valid = true; - generationtype = getRadioValue(document.automaticgroupingform.generationtype); - noofstudents = getTextInputValue('noofstudents'); - noofgroups = getTextInputValue('noofgroups'); - groupingname = getTextInputValue('automaticgroupingname'); - - if (generationtype == 'nostudents') { - if (!isPositiveInt(noofstudents)) { - alert('The number of students is not valid.'); - valid = false; - } - } else { - if (!isPositiveInt(noofgroups)) { - alert('The number of groups is not valid.'); - valid = false; - } - } - - if (groupingname == '') { - alert('You must enter a name for the new grouping'); - valid = false; - } - - return valid; -} diff --git a/group/groupui/createautomaticgrouping-xml.php b/group/groupui/createautomaticgrouping-xml.php deleted file mode 100644 index 14e00ec235b..00000000000 --- a/group/groupui/createautomaticgrouping-xml.php +++ /dev/null @@ -1,46 +0,0 @@ -'; -echo ''; - -require_login($courseid); - -groups_seed_random_number_generator(); - -$courseid = required_param('courseid', PARAM_INT); - -$noofstudents = required_param('noofstudents', PARAM_INT); -$noofgroups = required_param('noofgroups', PARAM_INT); -$distribevenly = required_param('distribevenly', PARAM_INT); //TODO: PARAM_BOOL ? -$alphabetical = required_param('alphabetical', PARAM_INT); -$generationtype = required_param('generationtype', PARAM_ALPHA); - -$groupingsettings->name = required_param('name', PARAM_ALPHANUM); -$groupingsettings->description = required_param('description', PARAM_ALPHANUM); -$groupingsettings->prefix = required_param('prefix'); -$groupingsettings->defaultgroupdescription = required_param('defaultgroupdescription'); - - -if (confirm_sesskey() and isteacheredit($courseid)) { - if ($generationtype == 'nogroups') { - $noofstudents = false; - } - - $groupingid = groups_create_automatic_grouping($courseid, $noofstudents, $noofgroups, - $distribevenly, $groupingsettings, false, $alphabetical); - if (!$groupingid) { - echo 'Failed to create grouping'; - } else { - echo ''.$groupingid.''; - } -} - -echo ''; -?> diff --git a/group/groupui/creategroup-form.html b/group/groupui/creategroup-form.html deleted file mode 100644 index a1066fd93db..00000000000 --- a/group/groupui/creategroup-form.html +++ /dev/null @@ -1,31 +0,0 @@ - diff --git a/group/groupui/creategroup-form.js b/group/groupui/creategroup-form.js deleted file mode 100644 index 36fcdae938d..00000000000 --- a/group/groupui/creategroup-form.js +++ /dev/null @@ -1,61 +0,0 @@ - -function onCreateGroup() { - valid = validateCreateGroupForm(); - - if (valid) { - hideAllForms(); - showElement("groupeditform"); - createGroup(); - replaceText('selectedgroupingforcreatinggroup', ""); - } - - return false; -} - -/* - * Adds a group with the name specified in the form to the selected grouping. - */ -function createGroup() { - //alert("Called createGroup"); - var url = "creategroup-xml.php"; - var requeststring = "groupname="+getTextInputValue('newgroupname') - +"&groupingid="+selectedgroupingid - +"&description="+getTextInputValue('edit-newgroupdescription') - +"&enrolmentkey="+getTextInputValue('newgroupenrolmentkey'); - // The picture fields aren't displayed if the right library isn't present - if (document.getElementById('menunewgrouphidepicture')) { - requeststring = requeststring+"&hidepicture="+getTextInputValue('menunewgrouphidepicture'); - } - sendPostRequest(request, url, requeststring, createGroupResponse); -} - -/** - * The callback for the response to the request sent in createGroup() - * The function sets the new group as selected in the form. - */ -function createGroupResponse() { - if (checkAjaxResponse(request)) { - //alert("createGroupResponse called"); - //alert(request.responseText); - error = getFromXML(request.responseXML, 'error'); - if (error != null) { - alert(error); - } - selectedgroupid = getFromXML(request.responseXML, 'groupid'); - updateGroupings(); - hideElement("creategroupform"); - } -} - - -function validateCreateGroupForm() { - valid = true; - groupname = getTextInputValue('newgroupname'); - - if (groupname == '') { - alert('You must enter a name for the new group'); - valid = false; - } - return valid; -} - diff --git a/group/groupui/creategroup-xml.php b/group/groupui/creategroup-xml.php deleted file mode 100644 index e69ed69f63d..00000000000 --- a/group/groupui/creategroup-xml.php +++ /dev/null @@ -1,55 +0,0 @@ -'; -echo ''; - -$courseid = required_param('courseid', PARAM_INT); -$groupingid = required_param('groupingid', PARAM_INT); - -$groupsettings->name = required_param('groupname', PARAM_ALPHANUM); -$groupsettings->description = required_param('description', PARAM_ALPHANUM); -$groupsettings->enrolmentkey= required_param('enrolmentkey', PARAM_ALPHANUM); -$groupsettings->hidepicture = optional_param('hidepicture', PARAM_INT); - - -require_login($courseid); - -if (confirm_sesskey() and isteacheredit($courseid)) { - $groupid = groups_create_group($courseid, $groupsettings); - - if (!$groupid) { - echo 'Failed to create group'; - } else { - $groupadded = groups_add_group_to_grouping($groupid, $groupingid); - - if (!$groupadded) { - echo 'Failed to add group to grouping'; - } else { - // Upload a picture file if there was one - note that we don't remove any previous icons - require_once($CFG->libdir.'/uploadlib.php'); - $um = new upload_manager('newgroupicon', false, false, null, false, 0, true, true); - if ($um->preprocess_files()) { - require_once("$CFG->libdir/gdlib.php"); - if (save_profile_image($groupid, $um, 'groups')) { - $groupsettings->picture = 1; - $infoset = groups_set_group_settings($groupid, $groupsettings); - if (!$infoset) { - echo 'Failed to save the fact that the group image was uploaded'; - } - } - } - - echo ''.$groupid.''; - } - } -} - -echo ''; -?> diff --git a/group/groupui/creategrouping-form.html b/group/groupui/creategrouping-form.html deleted file mode 100644 index 0343b5a7f01..00000000000 --- a/group/groupui/creategrouping-form.html +++ /dev/null @@ -1,11 +0,0 @@ - diff --git a/group/groupui/creategrouping-form.js b/group/groupui/creategrouping-form.js deleted file mode 100644 index 2fb72ac8995..00000000000 --- a/group/groupui/creategrouping-form.js +++ /dev/null @@ -1,56 +0,0 @@ - - -function onCreateGrouping() { - valid = validateCreateGroupingForm(); - if (valid) { - hideAllForms(); - showElement("groupeditform"); - createGrouping(); - } - - return false; -} - -/** - * Creates a new grouping for the course. - */ -function createGrouping() { - // alert("Called createGrouping"); - var url = "creategrouping-xml.php"; - var requeststring = "groupingname="+getTextInputValue('newgroupingname') - +"&description="+getTextInputValue('edit-newgroupingdescription'); - sendPostRequest(request, url, requeststring, createGroupingResponse); - } - - /** - * The callback for the response to the request sent in createGrouping() - * It sets the new grouping as selected in the form. - */ - function createGroupingResponse() { - if (checkAjaxResponse(request)) { - // alert("createGroupingResponse"); - // alert(request.responseText); - error = getFromXML(request.responseXML, 'error'); - if (error != null) { - alert(error); - } - selectedgroupingid = getFromXML(request.responseXML, 'groupingid'); - selectedgroupid = null; - updateGroupings(); - hideElement("creategroupingform"); - } - } - -function validateCreateGroupingForm() { - valid = true; - groupingname = getTextInputValue('newgroupingname'); - - if (groupingname == '') { - alert('You must enter a name for the new grouping'); - valid = false; - } - return valid; -} - - - diff --git a/group/groupui/creategrouping-xml.php b/group/groupui/creategrouping-xml.php deleted file mode 100644 index f22eba4be8c..00000000000 --- a/group/groupui/creategrouping-xml.php +++ /dev/null @@ -1,31 +0,0 @@ -'; -echo ''; - -$courseid = required_param('courseid', PARAM_INT); - -$groupingsettings->name = required_param('groupingname', PARAM_ALPHANUM); -$groupingsettings->description= required_param('description', PARAM_ALPHANUM); - -require_login($courseid); - -if (confirm_sesskey() and isteacheredit($courseid)) { - $groupingid = groups_create_grouping($courseid, $groupingsettings); - - if (!$groupingid) { - echo 'Failed to create grouping'; - } else { - echo ''.$groupingid.''; - } -} - -echo ''; -?> diff --git a/group/groupui/deletegroup-xml.php b/group/groupui/deletegroup-xml.php deleted file mode 100644 index 2e22f9fc306..00000000000 --- a/group/groupui/deletegroup-xml.php +++ /dev/null @@ -1,27 +0,0 @@ -'; -echo ''; - -$groupid = required_param('groupid', PARAM_INT); -$courseid = required_param('courseid', PARAM_INT); - -require_login($courseid); - -if (confirm_sesskey() and isteacheredit($courseid)) { - $groupremoved = groups_delete_group($groupid); - - if ($groupremoved == false) { - echo "Could not delete group $groupid"; - } -} - -echo ''; -?> diff --git a/group/groupui/deletegroup.js b/group/groupui/deletegroup.js deleted file mode 100644 index 541a21ca190..00000000000 --- a/group/groupui/deletegroup.js +++ /dev/null @@ -1,35 +0,0 @@ -function onDeleteGroup() { - hideAllForms() - showElement("groupeditform"); - deleteGroup(); - return false; -} - - -/** - * Deletes the selected group - */ -function deleteGroup() { - //alert("Called deleteGroup"); - var url = "deletegroup-xml.php"; - var requeststring = "groupid="+selectedgroupid; - sendPostRequest(request, url, requeststring, deleteGroupResponse); -} - -/** - * The callback for the response to the request sent in updateSelectedGrouping() - */ -function deleteGroupResponse() { - if (checkAjaxResponse(request)) { - //alert("deleteGroupResponse called"); - // alert(request.responseText); - error = getFromXML(request.responseXML, 'error'); - if (error != null) { - alert(error); - } - // Need XML sent back with groupingid - // Really want to set this to be the grouping before - selectedgroupid = null; - updateGroupings(); - } -} diff --git a/group/groupui/deletegrouping-xml.php b/group/groupui/deletegrouping-xml.php deleted file mode 100644 index 8a901d69d03..00000000000 --- a/group/groupui/deletegrouping-xml.php +++ /dev/null @@ -1,26 +0,0 @@ -'; -echo ''; - -$groupingid = required_param('groupingid', PARAM_INT); -$courseid = required_param('courseid', PARAM_INT); - -require_login($courseid); - -if (confirm_sesskey() and isteacheredit($courseid)) { - $groupingremoved = groups_delete_grouping($groupingid); - if (!$groupingremoved) { - echo 'Failed to delete grouping'; - } -} - -echo ''; -?> diff --git a/group/groupui/deletegrouping.js b/group/groupui/deletegrouping.js deleted file mode 100644 index 2e9898583be..00000000000 --- a/group/groupui/deletegrouping.js +++ /dev/null @@ -1,37 +0,0 @@ - -function onDeleteGrouping() { - hideAllForms() - showElement("groupeditform"); - deleteGrouping(); - return false; -} - - -/* - * Deletes the selected grouping - */ -function deleteGrouping() { - //alert("Called deleteGrouping"); - var url = "deletegrouping-xml.php"; - var requeststring = "groupingid="+selectedgroupingid; - confirm('Are you sure you want to delete this grouping and the groups that it contains?'); - sendPostRequest(request, url, requeststring, deleteGroupingResponse); - } - - /** - * The callback for the response to the request sent in deleteGrouping() - */ - function deleteGroupingResponse() { - if (checkAjaxResponse(request)) { - //alert("deleteGroupingResponse called"); - //alert(request.responseText); - error = getFromXML(request.responseXML, 'error'); - if (error != null) { - alert(error); - } - selectedgroupingid = null; - selectedgroupid = null; - updateGroupings(); - } -} - diff --git a/group/groupui/editgroupingpermissions-form.html b/group/groupui/editgroupingpermissions-form.html deleted file mode 100644 index cb5435c6205..00000000000 --- a/group/groupui/editgroupingpermissions-form.html +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/group/groupui/editgroupingpermissions-form.js b/group/groupui/editgroupingpermissions-form.js deleted file mode 100644 index c678d436f8c..00000000000 --- a/group/groupui/editgroupingpermissions-form.js +++ /dev/null @@ -1,66 +0,0 @@ - -function onEditGroupingPermissionsSave() { - hideAllForms(); - showElement("groupeditform"); - editGroupingPermissions() ; - return false; -} - - -/** - * Creates a new grouping for the course. - */ -function editGroupingPermissions() { - var url = "editgroupingpermissions-xml.php"; - var requeststring = "groupingid=" + selectedgroupingid - +"&viewowngroup=" + getCheckBoxValue('edit-viewowngroup') - +"&viewallgroupsmembers=" + getCheckBoxValue('edit-viewallgroupsmembers') - +"&viewallgroupsactivities=" + getCheckBoxValue('edit-viewallgroupsactivities') - +"&teachersgroupmark=" + getCheckBoxValue('edit-teachersgroupmark') - +"&teachersgroupview=" + getCheckBoxValue('edit-teachersgroupview') - +"&teachersoverride=" + getCheckBoxValue('edit-teachersoverride'); - sendPostRequest(request, url, requeststring, editGroupingPermissionsResponse); -} - - /** - * The callback for the response to the request sent in editgroupingpermissions() - * It sets the new grouping as selected in the form. - */ - function editGroupingPermissionsResponse() { - if (checkAjaxResponse(request)) { - //alert("editGroupingPermissionsResponse called"); - //alert(request.responseText); - error = getFromXML(request.responseXML, 'error'); - if (error != null) { - alert(error); - } - updateGroupings(); - hideElement("editgroupingpermissionsform"); - } - } - -function getGroupingPermissions() { - //alert("Called getgroupingpermissions"); - var url = "getgroupingpermissions-xml.php"; - var requeststring = "groupingid="+selectedgroupingid; - sendPostRequest(request, url, requeststring, getGroupingPermissionsResponse); -} - -function getGroupingPermissionsResponse() { - if (checkAjaxResponse(request)) { - //alert("getgroupingpermissionsResponse"); - //alert(request.responseText); - error = getFromXML(request.responseXML, 'error'); - if (error != null) { - alert(error); - } - xml = request.responseXML; - replaceText('editperm-groupingname', getFromXML(xml, 'name')); - setCheckBoxValue('edit-viewowngroup', boolStringToBool(getFromXML(xml, 'viewowngroup'))); - setCheckBoxValue('edit-viewallgroupsmembers', boolStringToBool(getFromXML(xml, 'viewallgroupsmembers'))); - setCheckBoxValue('edit-viewallgroupsactivities', boolStringToBool(getFromXML(xml, 'viewallgroupsactivities'))); - setCheckBoxValue('edit-teachersgroupmark', boolStringToBool(getFromXML(xml, 'teachersgroupmark'))); - setCheckBoxValue('edit-teachersgroupview', boolStringToBool(getFromXML(xml, 'teachersgroupview'))); - setCheckBoxValue('edit-teachersoverride', boolStringToBool(getFromXML(xml, 'teachersoverride'))); - } -} diff --git a/group/groupui/editgroupingpermissions-xml.php b/group/groupui/editgroupingpermissions-xml.php deleted file mode 100644 index d4d4f2a05a9..00000000000 --- a/group/groupui/editgroupingpermissions-xml.php +++ /dev/null @@ -1,30 +0,0 @@ -'; -echo ''; - -$groupingid = required_param('groupingid', PARAM_INT); -$courseid = required_param('courseid', PARAM_INT); - -$groupingsettings->viewowngroup = required_param('viewowngroup', PARAM_INT); //TODO: PARAM_BOOL ?? -$groupingsettings->viewallgroupsmembers = required_param('viewallgroupsmembers', PARAM_INT); -$groupingsettings->viewallgroupsactivities = required_param('viewallgroupsactivities', PARAM_INT); -$groupingsettings->teachersgroupmark = required_param('teachersgroupmark', PARAM_INT); -$groupingsettings->teachersgroupview = required_param('teachersgroupview', PARAM_INT); -$groupingsettings->teachersoverride = required_param('teachersoverride', PARAM_INT); - -require_login($courseid); - -if (confirm_sesskey() and isteacheredit($courseid)) { - $groupingid = groups_set_grouping_settings($groupingid, $groupingsettings); -} - -echo ''; -?> diff --git a/group/groupui/editgroupingsettings-form.html b/group/groupui/editgroupingsettings-form.html deleted file mode 100644 index 3500d8ca73c..00000000000 --- a/group/groupui/editgroupingsettings-form.html +++ /dev/null @@ -1,11 +0,0 @@ - diff --git a/group/groupui/editgroupingsettings-form.js b/group/groupui/editgroupingsettings-form.js deleted file mode 100644 index f8ecf5280c3..00000000000 --- a/group/groupui/editgroupingsettings-form.js +++ /dev/null @@ -1,72 +0,0 @@ - -function onEditGroupingSettingsSave() { - valid = validateEditGroupingSettingsForm(); - if (valid) { - hideAllForms(); - showElement("groupeditform"); - editGroupingSettings() ; - return false; - } -} - - -/** - * Creates a new grouping for the course. - */ -function editGroupingSettings() { - var url = "editgroupingsettings-xml.php"; - var requeststring = "groupingid="+selectedgroupingid - +"&groupingname="+getTextInputValue('edit-groupingname') - +"&description="+getTextInputValue('edit-edit-groupingdescription'); - sendPostRequest(request, url, requeststring, editGroupingSettingsResponse); -} - - /** - * The callback for the response to the request sent in editgroupingsettings() - * It sets the new grouping as selected in the form. - */ - function editGroupingSettingsResponse() { - if (checkAjaxResponse(request)) { - //alert("editGroupingSettingsResponse called"); - //alert(request.responseText); - error = getFromXML(request.responseXML, 'error'); - if (error != null) { - alert(error); - } - updateGroupings(); - hideElement("editgroupingsettingsform"); - } - } - -function getGroupingSettings() { - //alert("Called getgroupingsettings"); - var url = "getgroupingsettings-xml.php"; - var requeststring = "groupingid="+selectedgroupingid; - sendPostRequest(request, url, requeststring, getGroupingSettingsResponse); -} - -function getGroupingSettingsResponse() { - if (checkAjaxResponse(request)) { - //alert("getgroupingsettingsResponse"); - //alert(request.responseText); - error = getFromXML(request.responseXML, 'error'); - if (error != null) { - alert(error); - } - xml = request.responseXML; - setTextInputValue('edit-groupingname', getFromXML(xml, 'name')); - setTextInputValue('edit-edit-groupingdescription', getFromXML(xml, 'description')); - } -} - - -function validateEditGroupingSettingsForm() { - valid = true; - groupingname = getTextInputValue('edit-groupingname'); - - if (groupingname == '') { - alert('You must enter a name for the new grouping'); - valid = false; - } - return valid; -} diff --git a/group/groupui/editgroupingsettings-xml.php b/group/groupui/editgroupingsettings-xml.php deleted file mode 100644 index 5aa6255b65f..00000000000 --- a/group/groupui/editgroupingsettings-xml.php +++ /dev/null @@ -1,26 +0,0 @@ -'; -echo ''; - -$groupingid = required_param('groupingid', PARAM_INT); -$courseid = required_param('courseid', PARAM_INT); - -$groupingsettings->name = required_param('groupingname', PARAM_ALPHANUM); -$groupingsettings->description= required_param('description', PARAM_ALPHANUM); - -require_login($courseid); - -if (confirm_sesskey() and isteacheredit($courseid)) { - $groupingid = groups_set_grouping_settings($groupingid, $groupingsettings); -} - -echo ''; -?> diff --git a/group/groupui/editgroupsettings-form.html b/group/groupui/editgroupsettings-form.html deleted file mode 100644 index 015def1fc87..00000000000 --- a/group/groupui/editgroupsettings-form.html +++ /dev/null @@ -1,22 +0,0 @@ - diff --git a/group/groupui/editgroupsettings-form.js b/group/groupui/editgroupsettings-form.js deleted file mode 100644 index f862c535788..00000000000 --- a/group/groupui/editgroupsettings-form.js +++ /dev/null @@ -1,78 +0,0 @@ - -function onEditGroupSettingsSave() { - valid = validateEditgroupsettingsForm(); - if (valid) { - editgroupsettings() ; - hideAllForms(); - showElement("groupeditform"); - } - return false; -} - -/** - * Creates a new group for the course. - */ -function editGroupSettings() { - // alert("Called editgroupsettings"); - var url = "editgroupsettings-xml.php"; - var requeststring = "groupid="+selectedgroupid - +"&groupname="+getTextInputValue('groupname') - +"&description="+getTextInputValue('edit-groupdescription') - +"&enrolmentkey="+getTextInputValue('enrolmentkey') - +"&hidepicture="+hidepicture; - // The picture fields aren't displayed if the right library isn't present - if (document.getElementById('menuhidepicture')) { - requeststring = requeststring+"&hidepicture="+getTextInputValue('menuhidepicture'); - } - sendPostRequest(request, url, requeststring, editGroupSettingsResponse); - } - - /** - * The callback for the response to the request sent in editgroupsettings(() - */ - function editGroupSettingsResponse() { - if (checkAjaxResponse(request)) { - // alert("editgroupsettingsResponse"); - // alert(request.responseText); - error = getFromXML(request.responseXML, 'error'); - if (error != null) { - alert(error); - } - updateSelectedGrouping(); - hideElement("editgroupsettingsform"); - } - } - -function getGroupSettings() { - // alert("Called getgroupsettings"); - groupid = getSelectedGroup(); - var url = "getgroupsettings-xml.php"; - var requeststring = "groupid="+groupid; - sendPostRequest(request, url, requeststring, getGroupSettingsResponse); -} - -function getGroupSettingsResponse() { - if (checkAjaxResponse(request)) { - // alert("getgroupsettingsResponse"); - // alert(request.responseText); - error = getFromXML(request.responseXML, 'error'); - if (error != null) { - alert(error); - } - xml = request.responseXML; - setTextInputValue('groupname', getFromXML(xml, 'name')); - setTextInputValue('edit-groupdescription', getFromXML(xml, 'description')); - setTextInputValue('enrolmentkey', getFromXML(xml, 'enrolmentkey')); - } -} - -function validateEditgroupsettingsForm() { - valid = true; - groupname = getTextInputValue('groupname'); - - if (groupname == '') { - alert('You must enter a name for the new group'); - valid = false; - } - return valid; -} diff --git a/group/groupui/editgroupsettings-xml.php b/group/groupui/editgroupsettings-xml.php deleted file mode 100644 index b4fcb70abef..00000000000 --- a/group/groupui/editgroupsettings-xml.php +++ /dev/null @@ -1,49 +0,0 @@ -'; -echo ''; - -$groupid = required_param('groupid', PARAM_INT); -$groupname = required_param('groupname', PARAM_ALPHANUM); -$description = required_param('description', PARAM_ALPHANUM); -$enrolmentkey= required_param('enrolmentkey', PARAM_ALPHANUM); -$hidepicture = required_param('hidepicture', PARAM_INT); //TODO: PARAM_BOOL ?? -$courseid = required_param('courseid', PARAM_INT); - -require_login($courseid); - -if (confirm_sesskey() and isteacheredit($courseid)) { - $groupsettings->name = $groupname; - $groupsettings->description = $description; - $groupsettings->enrolmentkey = $enrolmentkey; - $groupsettings->hidepicture = $hidepicture; - - // Upload the group icon if there is one - note that we don't remove any previous icons - require_once($CFG->libdir.'/uploadlib.php'); - $um = new upload_manager('groupicon', false, false, null, false, 0, true, true); - if ($um->preprocess_files()) { - require_once("$CFG->libdir/gdlib.php"); - if (save_profile_image($groupid, $um, 'groups')) { - $groupsettings->picture = 1; - } else { - echo 'Failed to save group image'; - } - } else { - $groupsettings->picture = 0; - } - - $infoset = groups_set_group_settings($groupid, $groupsettings); - if (!$infoset) { - echo "Failed to set new group settings"; - } -} - -echo ''; -?> diff --git a/group/groupui/form.css b/group/groupui/form.css deleted file mode 100644 index c778b2b0516..00000000000 --- a/group/groupui/form.css +++ /dev/null @@ -1,52 +0,0 @@ -.popup -{ - position:absolute; - left:300px; - top:80px; - width:550px; - border-style:solid; - border-color: grey; - border-width: 1px; - background-color: white; - padding:10px; - z-index:1; - visibility: hidden; -} - -.popupwide -{ - position:absolute; - left:200px; - top:80px; - width:900px; - border-style:solid; - border-color: grey; - border-width: 1px; - background-color: white; - padding:10px; - z-index:1; - visibility: hidden; -} - -.select -{ - overflow: visible; - clip: auto; - width:200px; -} - -.groupmanagementtable -{ - padding: 10px; - margin-left: auto; - margin-right: auto; - text-align: center; -} - -.groupmanagementtableheader -{ - width: 300px; -} - - - diff --git a/group/groupui/form.html b/group/groupui/form.html deleted file mode 100644 index db18de96afd..00000000000 --- a/group/groupui/form.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/group/groupui/getgroupingpermissions-xml.php b/group/groupui/getgroupingpermissions-xml.php deleted file mode 100644 index c2335b76c1f..00000000000 --- a/group/groupui/getgroupingpermissions-xml.php +++ /dev/null @@ -1,62 +0,0 @@ -'; -echo ''; - -$courseid = required_param('courseid', PARAM_INT); -$groupingid = required_param('groupingid', PARAM_INT); - -require_login($courseid); - -if (confirm_sesskey() and isteacheredit($courseid)) { - $groupingsettings = groups_get_grouping_settings($groupingid); - echo ''.$groupingsettings->name.''; - - if ($groupingsettings->viewowngroup) { - echo 'true'; - } else { - echo 'false'; - } - - if ($groupingsettings->viewallgroupsmembers) { - echo 'true'; - } else { - echo 'false'; - } - - if ($groupingsettings->viewallgroupsactivities) { - echo 'true'; - } else { - echo 'false'; - } - - if ($groupingsettings->teachersgroupmark) { - echo 'true'; - } else { - echo 'false'; - } - - if ($groupingsettings->teachersgroupview) { - echo 'true'; - } else { - echo 'false'; - } - - if ($groupingsettings->teachersoverride) { - echo 'true'; - } else { - echo 'false'; - } - -} - -echo ''; -?> diff --git a/group/groupui/getgroupings-xml.php b/group/groupui/getgroupings-xml.php deleted file mode 100644 index 44821aa6217..00000000000 --- a/group/groupui/getgroupings-xml.php +++ /dev/null @@ -1,41 +0,0 @@ -'; -echo ''; - -$courseid = required_param('courseid', PARAM_INT); - -require_login($courseid); - -if (confirm_sesskey() and isteacheredit($courseid)) { - $groupingids = groups_get_groupings($courseid); - if ($groupingids != false) { - // Put the groupings into a hash and sort them - foreach($groupingids as $groupingid) { - $listgroupings[$groupingid] = groups_get_grouping_displayname($groupingid); - } - natcasesort($listgroupings); - - // Print out the XML - echo ''; - } -} - -echo ''; -?> - - - diff --git a/group/groupui/getgroupingsettings-xml.php b/group/groupui/getgroupingsettings-xml.php deleted file mode 100644 index 5327d80ada3..00000000000 --- a/group/groupui/getgroupingsettings-xml.php +++ /dev/null @@ -1,27 +0,0 @@ -'; -echo ''; - -$courseid = required_param('courseid', PARAM_INT); -$groupingid = required_param('groupingid', PARAM_INT); - -require_login($courseid); - -if (confirm_sesskey() and isteacheredit($courseid)) { - $groupingsettings = groups_get_grouping_settings($groupingid); - echo ''.$groupingsettings->name.''; - echo ''.$groupingsettings->description.''; - -} - -echo ''; -?> diff --git a/group/groupui/getgroupsettings-xml.php b/group/groupui/getgroupsettings-xml.php deleted file mode 100644 index 79f63f5f252..00000000000 --- a/group/groupui/getgroupsettings-xml.php +++ /dev/null @@ -1,36 +0,0 @@ -'; -echo ''; - -$courseid = required_param('courseid', PARAM_INT); -$groupid = required_param('groupid', PARAM_INT); - -require_login($courseid); - -if (confirm_sesskey() and isteacheredit($courseid)) { - - $groupsettings = groups_get_group_settings($groupid); - if (!$groupsettings) { - echo 'Failed to get group details'; - } else { - echo ''.$groupsettings->name.''; - echo ''.$groupsettings->description.''; - echo ''.$groupsettings->enrolmentkey.''; - echo ''.$groupsettings->hidepicture.''; - echo ''.$groupsettings->picture.''; - echo ''.$groupinkfo->lang.''; - echo ''.$groupsettings->theme.''; - } -} - -echo ''; -?> diff --git a/group/groupui/getgroupsingrouping-xml.php b/group/groupui/getgroupsingrouping-xml.php deleted file mode 100644 index bcec2802737..00000000000 --- a/group/groupui/getgroupsingrouping-xml.php +++ /dev/null @@ -1,40 +0,0 @@ -'; -echo ''; - -$groupingid = required_param('groupingid', PARAM_INT); -$courseid = required_param('courseid', PARAM_INT); - -require_login($courseid); - -if (confirm_sesskey() and isteacheredit($courseid)) { - $groupids = groups_get_groups_in_grouping($groupingid); - - if ($groupids != false) { - // Put the groupings into a hash and sort them - foreach($groupids as $groupid) { - $listgroups[$groupid] = groups_get_group_displayname($groupid); - } - - natcasesort($listgroups); - - // Print out the XML - echo ""; - } -} - -echo ''; -?> diff --git a/group/groupui/getgroupsnotingrouping-xml.php b/group/groupui/getgroupsnotingrouping-xml.php deleted file mode 100644 index 48531f610a0..00000000000 --- a/group/groupui/getgroupsnotingrouping-xml.php +++ /dev/null @@ -1,40 +0,0 @@ -'; -echo ''; - -$groupingid = required_param('groupingid', PARAM_INT); -$courseid = required_param('courseid', PARAM_INT); - -require_login($courseid); - -if (confirm_sesskey() and isteacheredit($courseid)) { - $groupids = groups_get_groups_not_in_grouping($groupingid, $courseid); - if ($groupids != false) { - // Put the groupings into a hash and sort them - foreach($groupids as $groupid) { - $listgroups[$groupid] = groups_get_group_displayname($groupid); - } - - natcasesort($listgroups); - - // Print out the XML - echo ""; - } -} - -echo ''; -?> diff --git a/group/groupui/getmembers-xml.php b/group/groupui/getmembers-xml.php deleted file mode 100644 index d738037d3c3..00000000000 --- a/group/groupui/getmembers-xml.php +++ /dev/null @@ -1,43 +0,0 @@ -'; -echo ''; - -$groupid = required_param('groupid', PARAM_INT); -$courseid = required_param('courseid', PARAM_INT); - -require_login($courseid); - -if (confirm_sesskey() and isteacheredit($courseid)) { - - $userids = groups_get_members($groupid); - - if ($userids != false) { - // Put the groupings into a hash and sort them - foreach($userids as $userid) { - $listmembers[$userid] = groups_get_user_displayname($userid, $courseid); - } - natcasesort($listmembers); - - - // Print out the XML - - echo ""; - } -} - -echo ''; -?> diff --git a/group/groupui/getnonmembers-xml.php b/group/groupui/getnonmembers-xml.php deleted file mode 100644 index 3fc6d241135..00000000000 --- a/group/groupui/getnonmembers-xml.php +++ /dev/null @@ -1,49 +0,0 @@ -'; -echo ''; - -$groupid = required_param('groupid', PARAM_INT); -$groupingid = required_param('groupingid', PARAM_INT); -$courseid = required_param('courseid', PARAM_INT); -$showall = required_param('showall', PARAM_INT); - -require_login($courseid); - -if (confirm_sesskey() and isteacheredit($courseid)) { - echo "$groupingid $groupid"; - if ($showall == 0) { - $userids = groups_get_users_not_in_any_group_in_grouping($courseid,$groupingid, $groupid); - } else { - $userids = groups_get_users_not_in_group($courseid, $groupid); - } - - if ($userids != false) { - // Put the groupings into a hash and sorts them - foreach($userids as $userid) { - $listmembers[$userid] = groups_get_user_displayname($userid, $courseid); - } - natcasesort($listmembers); - - - // Print out the XML - echo ""; - } -} - -echo ''; -?> diff --git a/group/groupui/index.php b/group/groupui/index.php deleted file mode 100644 index 1210e779c31..00000000000 --- a/group/groupui/index.php +++ /dev/null @@ -1,64 +0,0 @@ -libdir.'/moodlelib.php'); -require_once($CFG->libdir.'/uploadlib.php'); - -$error = false; - -$courseid = required_param('id', PARAM_INTEGER); - -// Get the course information so we can print the header and check the course id -// is valid -$course = groups_get_course_info($courseid); -if (!$course) { - $error = true; - print_error('The course id is invalid'); -} - - -if (!$error) { - // Make sure that the user is a teacher with edit permission for this course - require_login($courseid); - if (!isteacheredit($courseid)) { - redirect(); - } - - // Set the session key so we can check this later - $sesskey = !empty($USER->id) ? $USER->sesskey : ''; - - if (!empty($CFG->gdversion)) { //TODO: and $maxbytes) - $printuploadpicture = true; - } else { - $printuploadpicture = false; - } - - - $maxbytes = get_max_upload_file_size($CFG->maxbytes, $course->maxbytes); - $strgroups = get_string('groups'); - $strparticipants = get_string('participants'); - // Print the page and form - print_header("$course->shortname: $strgroups", - $course->fullname, - "wwwroot/course/view.php?id=$courseid\">$course->shortname ". - "-> wwwroot/user/index.php?id=$courseid\">$strparticipants ". - "-> $strgroups", "", "", true, '', user_login_string($course, $USER)); - - //TODO: set to false in /course/group.php - $usehtmleditor = false; - - require_once('form.html'); - - print_footer($course); -} - -?> diff --git a/group/groupui/main-buttons-form.js b/group/groupui/main-buttons-form.js deleted file mode 100644 index 887fac20717..00000000000 --- a/group/groupui/main-buttons-form.js +++ /dev/null @@ -1,66 +0,0 @@ - - -function onShowAddMembersForm() { - hideAllForms(); - showElement("addmembersform"); - updateNonMembers(); - groupname = getSelectedGroupName(); - replaceText('selectedgroup', groupname); - return false; -} - -function onShowAddGroupsToGroupingForm() { - hideAllForms(); - showElement("addgroupstogroupingform"); - updateGroupsNotInGrouping(); - groupingname = getSelectedGroupingName(); - replaceText('selectedgroupingforaddinggroups', groupingname); - return false; -} - -function onShowCreateGroupingForm() { - hideAllForms(); - showElement("creategroupingform"); - return false; -} - -function onShowCreateGroupForm() { - hideAllForms(); - showElement("creategroupform"); - groupingname = getSelectedGroupingName(); - replaceText('selectedgroupingforcreatinggroup', groupingname); - return false; -} - -function onShowEditGroupSettingsForm() { - hideAllForms(); - showElement("editgroupsettingsform"); - getGroupSettings(); - return false; -} - -function onShowEditGroupingPermissionsForm() { - hideAllForms(); - showElement("editgroupingpermissionsform"); - getGroupingPermissions(); - return false; -} - -function onShowEditGroupingSettingsForm() { - hideAllForms(); - showElement("editgroupingsettingsform"); - getGroupingSettings(); - return false; -} - - -function onShowAutomaticGroupingForm() { - hideAllForms(); - showElement("createautomaticgroupingform"); - return false; -} - -function onPrinterFriendly() { - document.location.href = "printgrouping.php?courseid="+courseid+"&groupingid="+selectedgroupingid; - return false; -} diff --git a/group/groupui/main-form.html b/group/groupui/main-form.html deleted file mode 100644 index 54c4789737d..00000000000 --- a/group/groupui/main-form.html +++ /dev/null @@ -1,41 +0,0 @@ -
- - - - - - - - - - - - - - - - -
- - - - - -
-

-

-

-

-

-

-
-

-

-

-

-

-
-

-

-
-
diff --git a/group/groupui/main-init-form.js b/group/groupui/main-init-form.js deleted file mode 100644 index 6b4679f843b..00000000000 --- a/group/groupui/main-init-form.js +++ /dev/null @@ -1,71 +0,0 @@ -/* - * This file contains all the functions called when the pages loads and also all the functions that are called - * on events such as clicking buttons in the forms for the form.html page. - * - * This script requires functions from ajax.js and form-access.js - * - * This code also assumes you have a basic understanding of how Ajax works - if - * you don't, it won't make much sense! -*/ - - - -// Create XMLHttpRequest objects to use -var request = createRequest(); -var updategroupingsrequest = createRequest(); -var updateselectedgroupingsrequest = createRequest(); -var updateselectedgrouprequest = createRequest(); - -// The selectedgroupingid should always be set to the current selected groupingid and the -// selectedgroupid should always be set to the current selected groupid. We initialise them to -// be null at the start, but they'll get set when the page loads. -var selectedgroupingid = null; -var selectedgroupid = null; - -// When the page has loaded called the initPage function -window.onload = initPage; - -/** - * The initPage function updates the groupings, groups and members in all the selects appropriately - *and adds the right javascript events to all the buttons etc. - */ -function initPage() { - // Check that we're using a recent enough version of javascript - if (!document.getElementById) { - return false; - } - updateGroupings(); - - addEvent('groupings', 'change', onGroupingChange); - addEvent('groups', 'change', onGroupChange); - addEvent('deletegrouping', 'click', onDeleteGrouping); - addEvent('deletegroup', 'click', onDeleteGroup); - addEvent('removegroup', 'click', onRemoveGroup); - addEvent('removemembers', 'click', onRemoveMembers); - addEvent('showaddmembersform', 'click', onShowAddMembersForm); - addEvent('showaddgroupstogroupingform', 'click', onShowAddGroupsToGroupingForm); - addEvent('showcreategroupingform', 'click', onShowCreateGroupingForm); - addEvent('showcreategroupform', 'click', onShowCreateGroupForm); - addEvent('showeditgroupsettingsform', 'click', onShowEditGroupSettingsForm); - addEvent('showeditgroupingsettingsform', 'click', onShowEditGroupingSettingsForm); - addEvent('showeditgroupingpermissionsform', 'click', onShowEditGroupingPermissionsForm); - addEvent('showcreateautomaticgroupingform', 'click', onShowAutomaticGroupingForm); - addEvent('printerfriendly', 'click', onPrinterFriendly); - addEvent('createautomaticgrouping', 'click', onCreateAutomaticGrouping); - addEvent('cancelcreateautomaticgrouping', 'click', onCancel); - addEvent('addgroupstogrouping', 'click', onAddGroupsToGrouping); - addEvent('canceladdgroupstogrouping', 'click', onCancel); - addEvent('creategroup', 'click', onCreateGroup); - addEvent('cancelcreategroup', 'click', onCancel); - addEvent('creategrouping', 'click', onCreateGrouping); - addEvent('cancelcreategrouping', 'click', onCancel); - addEvent('addmembers', 'click', onAddMembers); - addEvent('canceladdmembers', 'click', onCancel); - addEvent('showall', 'change', onShowAll); - addEvent('editgroupsettings', 'click', onEditGroupSettingsSave); - addEvent('canceleditgroupsettings', 'click', onCancel); - addEvent('editgroupingsettings', 'click', onEditGroupingSettingsSave); - addEvent('canceleditgroupingsettings', 'click', onCancel); - addEvent('editgroupingpermissions', 'click', onEditGroupingPermissionsSave); - addEvent('canceleditgroupingpermissions', 'click', onCancel); -} diff --git a/group/groupui/main-selects-form.js b/group/groupui/main-selects-form.js deleted file mode 100644 index 78dab510f25..00000000000 --- a/group/groupui/main-selects-form.js +++ /dev/null @@ -1,238 +0,0 @@ -/** - * This file contains various utility functions, primarily to get and set information on form.html - * and to take information from XML documents and either return information from them or modifiy the - * form appropriately. - */ - - -function onGroupingChange() { - hideAllForms(); - showElement("groupeditform"); - if (!document.getElementById('groupings')) { - alert('No groupings id element'); - } else { - groupingselect = document.getElementById('groupings'); - selectedgroupingid = groupingselect.value; - selectedgroupid = null; - updateSelectedGrouping(); - } - return false; -} - -function onGroupChange() { - hideAllForms(); - showElement("groupeditform"); - selectedgroupid = getSelectedGroup(); - updateSelectedGroup(); - return false; -} - - -function getSelectedGroupingName() { - if (!document.getElementById('groupings')) { - alert('No groupings id element'); - value = null; - } else { - groupingselect = document.getElementById('groupings'); - value = groupingselect.options[groupingselect.selectedIndex].firstChild.nodeValue; - } - return value; -} - -function getSelectedGroupName() { - if (!document.getElementById('groups')) { - alert('No groups id element'); - value = null; - } else { - groupselect = document.getElementById('groups'); - value = groupselect.options[groupselect.selectedIndex].firstChild.nodeValue; - } - return value; -} - -/* - * Set the selected grouping on the form to the grouping whose id is selectedgroupingid - */ -function setSelectedGrouping() { - if (selectedgroupingid == null) { - selectedgroupingid = getFirstOption("groupings"); - } - - if (selectedgroupingid != null) { - if (!document.getElementById('groupings')) { - alert('No groupings id element'); - } else { - groupingselect = document.getElementById('groupings'); - groupingselect.value = selectedgroupingid - } - } -} - -/* - * Get the id of the group that is currently selected - */ -function getSelectedGroup() { - if (!document.getElementById('groups')) { - alert('No groups id element'); - value = null; - } else { - groupselect = document.getElementById('groups'); - value = groupselect.value; - } - return value; -} - -/* - * Set the selected group on the form to the group whose id is selectedgroupid - */ -function setSelectedGroup() { - if (selectedgroupid == null) { - selectedgroupid = getFirstOption("groups"); - } - - if (selectedgroupid != null) { - if (!document.getElementById('groups')) { - alert('No groups id element'); - } else { - groupselect = document.getElementById('groups'); - groupselect.value = selectedgroupid; - } - } -} - - -/* - * Get the selected users to delete - */ -function getSelectedUsers() { - return getMultipleSelect("members") -} - - - -/*************************************************************** - * Functions that just display information (and don't change the data in the database) - **********************************************/ - -/** - * Updates the list of groupings, setting either a specified grouping as selected or - * the first grouping as selected. - */ -function updateGroupings() { - alert("updateGroupings called"); - var url = "getgroupings-xml.php"; - requeststring = 'courseid='+courseid+'&'+'sesskey='+sesskey; - var transaction = YAHOO.util.Connect.asyncRequest('POST', url, - updateGroupingsResponseCallback, requeststring); - //sendPostRequest(updategroupingsrequest, url, requeststring, updateGroupingsResponse); -} - -var updateGroupingsResponseCallback = -{ - success:function(o) { - - // alert("updateGroupingsResponse called"); - var xmlDoc = o.responseXML; - error = getFromXML(o.responseXML, 'error'); - if (error != null) { - alert(error); - } - // alert(o.responseXML); - var noofoptions = addOptionsFromXML("groupings", xmlDoc); - - // If the selected grouping is not set, set it to the first grouping in the list - if(selectedgroupingid == null) { - selectedgroupingid = getFirstOption("groupings"); - selectedgroupid = null; - } - - // If there are no groupings, make sure the rest of the form is set up appropriately - // i.e. there should be any groups or members shown and various buttons should be disabled - // If there are groupings, update the one that is selected and enable any buttons that - // might have been disabled. - if (noofoptions == 0) { - removeOptions("groups"); - removeOptions("members"); - disableButton("showaddmembersform"); - disableButton("showcreategroupform"); - disableButton("showaddgroupstogroupingform"); - } else { - updateSelectedGrouping(); - enableButton("showaddmembersform"); - enableButton("showcreategroupform"); - enableButton("showaddgroupstogroupingform"); - } -}, - failure:responseFailure, -}; - - - - -/** - * Updates the list of groups when groupingid is marked as selected - * groupid can be null or a specified group - this is the group that gets marked as - * selectedgroupingid cannot be null. - */ -function updateSelectedGrouping() { - //alert("UpdateSelectedGrouping called"); - setSelectedGrouping(); - var url = "getgroupsingrouping-xml.php"; - requeststring = "groupingid="+selectedgroupingid; - sendPostRequest(updateselectedgroupingsrequest, url, requeststring, updateSelectedGroupingResponse); -} - -/** - * The callback for the response to the request sent in updateSelectedGrouping() - */ -function updateSelectedGroupingResponse() { - if (checkAjaxResponse(updateselectedgroupingsrequest)) { - //alert("updateSelectedGroupingResponse called"); - var xmlDoc = updateselectedgroupingsrequest.responseXML; - error = getFromXML(updateselectedgroupingsrequest.responseXML, 'error'); - if (error != null) { - alert(error); - } - // alert(updateselectedgroupingsrequest.responseText); - var noofoptions = addOptionsFromXML("groups", xmlDoc); - if (selectedgroupid == null) { - selectedgroupid = getFirstOption("groups"); - } - - if (noofoptions == 0) { - removeOptions("members"); - disableButton("showaddmembersform"); - } else { - updateSelectedGroup(selectedgroupid); - enableButton("showaddmembersform"); - } - } -} - -/** - * Updates the members for the selected group - currently none marked as selected - */ -function updateSelectedGroup() { - //alert("updateSelectedGroup"); - setSelectedGroup(); - var url = "getmembers-xml.php"; - var requeststring = "groupid="+selectedgroupid; - sendPostRequest(updateselectedgrouprequest, url, requeststring, updateSelectedGroupResponse); -} - -/** - * The callback for the response to the request sent in updateSelectedGroup() - */ -function updateSelectedGroupResponse() { - if (checkAjaxResponse(updateselectedgrouprequest)) { - var xmlDoc = updateselectedgrouprequest.responseXML; - //alert("updateSelectedGroupResponse"); - error = getFromXML(xmlDoc, 'error'); - if (error != null) { - alert(error); - } - - //alert(request.responseText); - var noofoptions = addOptionsFromXML("members", xmlDoc); - } -} diff --git a/group/groupui/printgrouping.php b/group/groupui/printgrouping.php deleted file mode 100644 index 010585c9eaa..00000000000 --- a/group/groupui/printgrouping.php +++ /dev/null @@ -1,88 +0,0 @@ -shortname: $strgroups", $course->fullname, - "wwwroot/course/view.php?id=$courseid\">$course->shortname ". - "-> wwwroot/user/index.php?id=$courseid\">$strparticipants ". - "-> wwwroot/group/groupui/index.php?id=$courseid\">$strgroups". - "-> Display grouping", "", "", true, '', user_login_string($course, $USER)); - - $groupingname = groups_get_grouping_name($groupingid); - if (! $groupingname) { - print_error('errorinvalidgrouping', 'group', groups_home_url($courseid)); - } else { - // Print the name of the grouping - echo "

$groupingname

\n"; - } - - // Get the groups and group members for the grouping. - if (GROUP_NOT_IN_GROUPING == $groupingid) { - $groupids = groups_get_groups_not_in_any_grouping($courseid); - } else { - $groupids = groups_get_groups_in_grouping($groupingid); - } - - if ($groupids) { - // Make sure the groups are in the right order - $group_names = groups_groupids_to_group_names($groupids); - - // Go through each group in turn and print the group name and then the members - foreach ($group_names as $group) { - - echo "

{$group->name}

\n"; - $userids = groups_get_members($group->id); - if ($userids != false) { - // Make sure the users are in the right order - $user_names = groups_userids_to_user_names($userids, $courseid); - - echo "
    \n"; - foreach ($user_names as $user) { - - echo "
  1. {$user->name}
  2. \n"; - } - echo "
\n"; - } - } - } - - print_footer($course); -} - -?> diff --git a/group/groupui/removegroupfromgrouping-xml.php b/group/groupui/removegroupfromgrouping-xml.php deleted file mode 100644 index 5e94f122c12..00000000000 --- a/group/groupui/removegroupfromgrouping-xml.php +++ /dev/null @@ -1,28 +0,0 @@ -'; -echo ''; - -$groupid = required_param('groupid', PARAM_INT); -$groupingid = required_param('groupingid', PARAM_INT); -$courseid = required_param('courseid', PARAM_INT); - -require_login($courseid); - -if (confirm_sesskey() and isteacheredit($courseid)) { - $groupingremoved = groups_remove_group_from_grouping($groupid, $groupingid); - if (!$groupingremoved) { - echo 'Failed to remove group from grouping'; - } -} - -echo ''; -?> diff --git a/group/groupui/removegroupfromgrouping.js b/group/groupui/removegroupfromgrouping.js deleted file mode 100644 index dca1caae95f..00000000000 --- a/group/groupui/removegroupfromgrouping.js +++ /dev/null @@ -1,34 +0,0 @@ - -function onRemoveGroup() { - hideAllForms(); - showElement("groupeditform"); - removeGroupFromGrouping(); - return false; -} - -/** - * Removes the selected group from the selected grouping, does not delete the group (so it can e.g. be added to - * another grouping - */ -function removeGroupFromGrouping() { - //alert("Called removeGroupFromGrouping"); - var url = "removegroupfromgrouping-xml.php"; - var requeststring = "groupid="+selectedgroupid+"&groupingid="+selectedgroupingid; - sendPostRequest(request, url, requeststring, removeGroupFromGroupingResponse); -} - -/** - * The callback for the response to the request sent in removeGroupFromGrouping() - */ -function removeGroupFromGroupingResponse() { - if (checkAjaxResponse(request)) { - //alert("removeGroupFromGroupingResponse called"); - var xmlDoc= request.responseXML; - // Need XML sent back with groupingid - // Really want to set this to be the grouping before - selectedgroupid = null; - updateGroupings(); - } -} - - diff --git a/group/groupui/removemembers-xml.php b/group/groupui/removemembers-xml.php deleted file mode 100644 index a585f28eea3..00000000000 --- a/group/groupui/removemembers-xml.php +++ /dev/null @@ -1,38 +0,0 @@ -'; -echo ''; - -$groupid = required_param('groupid', PARAM_INT); -$users = required_param('users', PARAM_SEQUENCE); -$courseid = required_param('courseid', PARAM_INT); - -require_login($courseid); - -if (confirm_sesskey() and isteacheredit($courseid)) { - // Change the comma-separated string of the userids into an array of the userids - $userids = explode(',', $users); - if ($userids != false) { - // Remove each user in turn from the group. - foreach($userids as $userid) { - $useradded = groups_remove_member($groupid, $userid); - if (!$useradded) { - echo "Failed to adduser $userid"; - } - } - } -} - - -echo ''; - -?> diff --git a/group/groupui/removemembers.js b/group/groupui/removemembers.js deleted file mode 100644 index 8fe86de6731..00000000000 --- a/group/groupui/removemembers.js +++ /dev/null @@ -1,33 +0,0 @@ - - - -function onRemoveMembers() { - hideAllForms(); - showElement("groupeditform"); - removeMembers(); - return false; -} - - - -/** - * Removes the selected members from the selected group - */ -function removeMembers() { - //alert("Called removeMembers"); - users = getSelectedUsers(); - var url = "removemembers-xml.php"; - var requeststring = "groupid="+selectedgroupid+"&users="+users; - sendPostRequest(request, url, requeststring, removeMembersResponse); -} - -/** - * The callback for the response to the request sent in removeMembers() - */ -function removeMembersResponse() { - if (checkAjaxResponse(request)) { - //alert("removeMembersResponse called"); - //alert(request.responseText); - updateSelectedGroup(); - } -} diff --git a/group/groupui/util-form.js b/group/groupui/util-form.js deleted file mode 100644 index af7b1c8e29e..00000000000 --- a/group/groupui/util-form.js +++ /dev/null @@ -1,358 +0,0 @@ -/** - * This file contains various utility functions, primarily to get and set information on form.html - * and to take information from XML documents and either return information from them or modifiy the - * form appropriately. - */ - -/* - * Disable the button with the specified id - */ -function disableButton(id) { - if (!document.getElementById(id)) { - showNoElementError(id) - } else { - var node = document.getElementById(id); - node.disabled = true; - } -} - -/** - * Enable the button with the specified id - */ -function enableButton(id) { - if (!document.getElementById(id)) { - showNoElementError(id) - } else { - var node = document.getElementById(id); - node.disabled = false; - } -} - -/** - * Show the form with the specified id - */ -function showElement(id) { - if (!document.getElementById(id)) { - showNoElementError(id) - } else { - document.getElementById(id).style.visibility = "visible"; - } -} - -/** - * Hide the form with the specified id - */ -function hideElement(id) { - if (!document.getElementById(id)) { - showNoElementError(id) - } else { - var node = document.getElementById(id); - node.style.visibility = "hidden"; - } -} - - -/** - * Hides all the extra forms in form.html - */ -function hideAllForms() { - hideElement("addmembersform"); - hideElement("addgroupstogroupingform"); - hideElement("creategroupingform"); - hideElement("createautomaticgroupingform"); - hideElement("creategroupform"); - hideElement("editgroupingsettingsform"); - hideElement("editgroupingpermissionsform"); - hideElement("editgroupsettingsform"); - hideElement("groupeditform"); -} - -function onCancel() { - hideAllForms(); - showElement("groupeditform"); - return false; -} - - -function addEvent(id, eventtype, fn){ - if (!document.getElementById(id)) { - alert('No ' + id + ' element'); - return false; - } else { - obj = document.getElementById(id); - } - - if (obj.addEventListener) { - obj.addEventListener(eventtype, fn, false ); - } else if (obj.attachEvent) { - obj["e"+ eventtype +fn] = fn; - obj[eventtype+fn] = function() { obj["e"+ eventtype +fn]( window.event ); } - obj.attachEvent( "on"+ eventtype , obj[eventtype+fn] ); - } else { - obj["on"+type] = obj["e"+ eventtype +fn]; - } -} - -/** - * Gets the value of the first option in a select - */ -function getFirstOption(id) { - if (document.getElementById(id)) { - var node = document.getElementById(id); - if (node.hasChildNodes()) { - var children - firstoption = node.firstChild; - if (firstoption.value) { - value = firstoption.value; - } else { - value = null; - } - } else { - value = null; - } - } else { - value = null; - } - return value; -} - -/* - *Turn the values from a multiple select to a comma-separated list -*/ -function getMultipleSelect(id) { - if (!document.getElementById(id)) { - showNoElementError(id) - } else { - node = document.getElementById(id); - } - var selected = "" - - for (var i = 0; i < node.options.length; i++) { - if (node.options[i].selected) { - selected = selected + node.options[ i ].value + ","; - } - } - // Remove the last comma - there must be a nicer way of doing this! - // Maybe easier with regular expressions? - var length = selected.length; - if (selected.charAt(length - 1) == ',') { - selected = selected.substring(0, length -1); - } - - return selected; -} - -/* - * Creates an option in a select element with the specified id with the given name and value. -*/ -function createOption(id, value, name) { - var node = document.getElementById(id); - var option = document.createElement("option"); - option.setAttribute("value", value); - node.appendChild(option); - var namenode = document.createTextNode(name); - option.appendChild(namenode); -} - -/* - * Removes all the options from a select with a given id -*/ -function removeOptions(id) { - var node = document.getElementById(id); - - while (node.hasChildNodes()) - { - node.removeChild(node.firstChild); - } -} - -/* - * Takes an XML doc of the form - * And adds an option to the selected with the specified id - * @param id The id of the select - * @param xmlDoc The XML document - * @return The number of options added - */ -function addOptionsFromXML(id, xmlDoc) { - // Clear any options that are already there. - removeOptions(id); - - var optionelements = xmlDoc.getElementsByTagName('option'); - var nameelements = xmlDoc.getElementsByTagName('name'); - var valueelements = xmlDoc.getElementsByTagName('value'); - - if (nameelements != null) { - for (var i = 0; i < nameelements.length; i++) { - var name = nameelements[i].firstChild.nodeValue; - var value = valueelements[i].firstChild.nodeValue; - createOption(id, value, name); - } - noofoptions = nameelements.length; - } else { - noofoptions = 0; - } - return noofoptions; -} - -/* - * Gets an error from an XML doc contain a tag of the form - * If it contains more than one such tag, it only return the value from the first one. - */ -function getErrorFromXML(xmlDoc) { - alert(xmlDoc.getElementsByTagName('error')); - if (!xmlDoc.getElementsByTagName('error')) { - value = null; - } else { - var errorelement = xmlDoc.getElementsByTagName('error')[0]; - var value = errorelement.firstChild.nodeValue; - } - return value; -} - - -function addChildrenFromXML(parentnode, xmlparentnode) { - xmlChildNodes = xmlparentnode.childNodes; - length = xmlChildNodes.length; - for (i = 0; i < length; i++) { - child = parentnode.appendChild(parentnode, xmlChildNodes[i]); - addChildrenFromXML(child, xmlChildNodes[i]) - } -} - -function getTextInputValue(id) { - if (!document.getElementById(id)) { - showNoElementError(id) - value = null; - } else { - textinput = document.getElementById(id); - value = textinput.value; - } - return value; -} - -function setTextInputValue(id, value) { - if (!document.getElementById(id)) { - showNoElementError(id); - value = null; - } else { - textinput = document.getElementById(id); - textinput.value = value; - } -} - -function getCheckBoxValue(id) { - if (!document.getElementById(id)) { - showNoElementError(id); - value= null; - } else { - checkbox = document.getElementById(id); - value = checkbox.checked; - } - return boolToInt(value); -} - -function boolStringToBool(boolstring) { - if (boolstring == 'true') { - return true; - } else { - return false; - } -} - -function boolToInt(boolean) { - if (boolean) { - return '1'; - } else if (boolean == false) { - return '0'; - } else { - return boolean; - } -} - -function setCheckBoxValue(id, checked) { - if (!document.getElementById(id)) { - showNoElementError(id); - } else { - checkbox = document.getElementById(id); - checkbox.checked = checked; - } -} - -function replaceText(id, text) { - if (!document.getElementById(id)) { - showNoElementError(id) - value = null; - } else { - element = document.getElementById(id); - if (element.childNodes) { - for (var i = 0; i < element.childNodes.length; i++) { - var childNode = element.childNodes[i]; - element.removeChild(childNode); - } - } - var textnode = document.createTextNode(text); - element.appendChild(textnode); - } -} - - -function getRadioValue(radioelement) { - value = ""; - if (!radioelement) { - value = ""; - } - - - for(var i = 0; i < radioelement.length; i++) { - if(radioelement[i].checked) { - value = radioelement[i].value; - } - } - return value; -} - -/* - * Gets the groupid from an XML doc contain a tag of the form - * If it contains more than one such tag, it only return the value from the first one. - */ -function getFromXML(xmlDoc, id) { - if (!xmlDoc.getElementsByTagName(id)) { - var value = null; - } else if (xmlDoc.getElementsByTagName(id).length == 0) { - var value = null; - } else { - var element = xmlDoc.getElementsByTagName(id)[0]; - if (!element.firstChild) { - var value = ''; - } else { - var value = element.firstChild.nodeValue; - } - } - - return value; -} - -function showNoElementError(id) { - alert('Error: No ' + id +' element'); -} - -function isPositiveInt(str) { - isPosInt = true; - - var i = parseInt (str); - - if (isNaN (i)) { - isPosInt = false; - } - - if (i < 0) { - isPosInt = false; - // Check not characters at the end of the number - } - - if (i.toString() != str) { - isPosInt = false; - } - return isPosInt ; -} - diff --git a/group/groupui/yahoo.js b/group/groupui/yahoo.js deleted file mode 100644 index e285bc39a22..00000000000 --- a/group/groupui/yahoo.js +++ /dev/null @@ -1,84 +0,0 @@ -/* -Copyright (c) 2006, Yahoo! Inc. All rights reserved. -Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 0.11.0 -*/ - -/** - * The Yahoo global namespace - * @constructor - */ -var YAHOO = window.YAHOO || {}; - -/** - * Returns the namespace specified and creates it if it doesn't exist - * - * YAHOO.namespace("property.package"); - * YAHOO.namespace("YAHOO.property.package"); - * - * Either of the above would create YAHOO.property, then - * YAHOO.property.package - * - * @param {String} ns The name of the namespace - * @return {Object} A reference to the namespace object - */ -YAHOO.namespace = function(ns) { - - if (!ns || !ns.length) { - return null; - } - - var levels = ns.split("."); - var nsobj = YAHOO; - - // YAHOO is implied, so it is ignored if it is included - for (var i=(levels[0] == "YAHOO") ? 1 : 0; ienablegroupings)) { + // NO GROUPINGS YET! + $groupingid = GROUP_NOT_IN_GROUPING; +} + if ($groupid) { $groupingsforgroup = groups_get_groupings_for_group($groupid); if ($groupingsforgroup) { @@ -100,7 +105,7 @@ if ($success) { redirect(groups_grouping_edit_url($courseid, null, false)); break; case 'printerfriendly': - redirect('groupui/printgrouping.php?courseid='. $courseid .'&groupingid='. $groupingid); + redirect('printgrouping.php?courseid='. $courseid .'&groupingid='. $groupingid); break; case 'showgroupsettingsform': @@ -201,6 +206,11 @@ if ($success) { */ echo ''."\n"; echo ''."\n"; + +if (empty($CFG->enablegroupings)) { +// NO GROUPIGS YET! + $sel_groupingid = -1; +} else { echo '\n\n"; +} + echo "'."\n"; echo ' - - - - - - - - diff --git a/mod/resource/type/file/file.html b/mod/resource/type/file/file.html deleted file mode 100644 index 8f74f955ffc..00000000000 --- a/mod/resource/type/file/file.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/mod/resource/type/file/localfile.php b/mod/resource/type/file/localfile.php index 8f412e1a5ce..576e7db020c 100644 --- a/mod/resource/type/file/localfile.php +++ b/mod/resource/type/file/localfile.php @@ -3,7 +3,7 @@ require('../../../../config.php'); require('../../lib.php'); - $choose = required_param('choose'); + $choose = required_param('choose', PARAM_FILE); require_login(); @@ -15,8 +15,6 @@ print_simple_box(get_string('localfileinfo', 'resource'), 'center'); - $chooseparts = explode('.', $choose); - ?> - - - :
-
-
-
- - - - - - - - - - - - - diff --git a/mod/resource/type/ims/ims.html b/mod/resource/type/ims/ims.html deleted file mode 100644 index 22f1493f3e1..00000000000 --- a/mod/resource/type/ims/ims.html +++ /dev/null @@ -1,264 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/mod/resource/type/repository/repository.html b/mod/resource/type/repository/repository.html deleted file mode 100644 index 2f7dcfd3072..00000000000 --- a/mod/resource/type/repository/repository.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mod/resource/type/text/text.html b/mod/resource/type/text/text.html deleted file mode 100644 index b4b71cff4b6..00000000000 --- a/mod/resource/type/text/text.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mod/scorm/db/mysql.sql b/mod/scorm/db/mysql.sql deleted file mode 100755 index fa5b02cfbac..00000000000 --- a/mod/scorm/db/mysql.sql +++ /dev/null @@ -1,188 +0,0 @@ -# -# Table structure for table `scorm` -# - -CREATE TABLE prefix_scorm ( - id int(10) unsigned NOT NULL auto_increment, - course int(10) unsigned NOT NULL default '0', - name varchar(255) NOT NULL default '', - summary text NOT NULL default '', - reference varchar(255) NOT NULL default '', - version varchar(9) NOT NULL default '', - maxgrade float(3) NOT NULL default '0', - grademethod tinyint(2) NOT NULL default '0', - maxattempt int(10) NOT NULL default '1', - launch int(10) unsigned NOT NULL default '0', - skipview tinyint(1) unsigned NOT NULL default '1', - hidebrowse tinyint(1) NOT NULL default '0', - hideexit tinyint(1) NOT NULL default '0', - hideabandon tinyint(1) NOT NULL default '0', - hidetoc tinyint(1) NOT NULL default '0', - hidenav tinyint(1) NOT NULL default '0', - auto tinyint(1) unsigned NOT NULL default '0', - popup tinyint(1) unsigned NOT NULL default '0', - options varchar(255) NOT NULL default '', - width int(10) unsigned NOT NULL default '100', - height int(10) unsigned NOT NULL default '600', - timemodified int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id), - KEY course (course) -) TYPE=MyISAM; - -CREATE TABLE prefix_scorm_scoes ( - id int(10) unsigned NOT NULL auto_increment, - scorm int(10) unsigned NOT NULL default '0', - manifest varchar(255) NOT NULL default '', - organization varchar(255) NOT NULL default '', - parent varchar(255) NOT NULL default '', - identifier varchar(255) NOT NULL default '', -/* launch varchar(255) NOT NULL default '', */ - launch int(10) NOT NULL default '0', - scormtype varchar(5) NOT NULL default '', - title varchar(255) NOT NULL default '', -/* parameters varchar(255) NOT NULL default '', - prerequisites varchar(200) NOT NULL default '', - maxtimeallowed varchar(19) NOT NULL default '', - timelimitaction varchar(19) NOT NULL default '', - datafromlms varchar(255) NOT NULL default '', - masteryscore varchar(200) NOT NULL default '', - next tinyint(1) unsigned NOT NULL default '0', - previous tinyint(1) unsigned NOT NULL default '0', */ - PRIMARY KEY (id), - KEY scorm (scorm) -) TYPE=MyISAM; - -CREATE TABLE prefix_scorm_scoes_data ( - id int(10) unsigned NOT NULL auto_increment, - scoid int(10) unsigned NOT NULL default '0', - name varchar(255) NOT NULL default '', - value text NOT NULL default '', - PRIMARY KEY (id), - KEY scoid (scoid) -) TYPE=MyISAM; - -CREATE TABLE prefix_scorm_scoes_track ( - id int(10) unsigned NOT NULL auto_increment, - userid int(10) unsigned NOT NULL default '0', - scormid int(10) NOT NULL default '0', - scoid int(10) unsigned NOT NULL default '0', - attempt int(10) unsigned NOT NULL default '1', - element varchar(255) NOT NULL default '', - value longtext NOT NULL default '', - timemodified int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id), - KEY userid (userid), - KEY scormid (scormid), - KEY scoid (scoid), - KEY element (element), - UNIQUE track (userid, scormid, scoid, attempt, element) -) TYPE=MyISAM; - -CREATE TABLE prefix_scorm_sequencing_ruleconditions ( - id int(10) unsigned NOT NULL auto_increment, - scormid int(10) unsigned NOT NULL default '0', - scoid int(10) unsigned NOT NULL default '0', - conditioncombination varchar(3) NOT NULL default 'all', - ruletype tinyint(2) unsigned NOT NULL default '0', - action varchar(25) NOT NULL default '', - PRIMARY KEY (id), - UNIQUE (scormid, scoid,id), - KEY scormid (scormid), - KEY scoid (scoid) -) TYPE=MyISAM; - -CREATE TABLE prefix_scorm_sequencing_rulecondition ( - id int(10) unsigned NOT NULL auto_increment, - scormid int(10) unsigned NOT NULL default '0', - scoid int(10) unsigned NOT NULL default '0', - ruleconditionsid int(10) unsigned NOT NULL default '0', - refrencedobjective varchar(255) NOT NULL default '', - measurethreshold float(11,4) NOT NULL default '0.0000', - operator varchar(5) NOT NULL default 'noOp', - condition varchar(30) NOT NULL default 'always', - PRIMARY KEY (id), - UNIQUE (scormid, scoid,id,ruleconditionsid), - KEY ruleconditionsid (ruleconditionsid), - KEY scormid (scormid), - KEY scoid (scoid) -) TYPE=MyISAM; - -CREATE TABLE prefix_scorm_sequencing_rolluprules ( - id int(10) unsigned NOT NULL auto_increment, - scormid int(10) unsigned NOT NULL default '0', - scoid int(10) unsigned NOT NULL default '0', - rollupobjectivesatisfied TINYINT(1) unsigned NOT NULL default '1', - rollupprogresscompletion TINYINT(1) unsigned NOT NULL default '1', - objectivemeasureweight float(11,4) NOT NULL default '1.0000', - PRIMARY KEY (id), - KEY scormid (scormid), - KEY scoid (scoid) -) TYPE=MyISAM; - -CREATE TABLE prefix_scorm_sequencing_rolluprule ( - id int(10) unsigned NOT NULL auto_increment, - scormid int(10) unsigned NOT NULL default '0', - scoid int(10) unsigned NOT NULL default '0', - rolluprulesid int(10) unsigned NOT NULL default '0', - childactivityset varchar(15) NOT NULL default '', - minimumcount int(10) unsigned NOT NULL default '0', - minimumpercent float(11,4) unsigned NOT NULL default '0.0000', - conditioncombination varchar(3) NOT NULL default 'all', - action varchar(15) NOT NULL default '', - PRIMARY KEY (id), - UNIQUE (scormid, scoid, rolluprulesid, id), - KEY scormid (scormid), - KEY scoid (scoid) -) TYPE=MyISAM; - -CREATE TABLE prefix_scorm_sequencing_rolluprulecondition ( - id int(10) unsigned NOT NULL auto_increment, - scormid int(10) unsigned NOT NULL default '0', - scoid int(10) unsigned NOT NULL default '0', - rollupruleid int(10) unsigned NOT NULL default '0', - operator varchar(5) NOT NULL default 'noOp', - condition varchar(25) NOT NULL default '', - PRIMARY KEY (id), - UNIQUE (scormid, scoid, rollupruleid, id), - KEY scormid (scormid), - KEY scoid (scoid) -) TYPE=MyISAM; - -CREATE TABLE prefix_scorm_sequencing_objectives ( - id int(10) unsigned NOT NULL auto_increment, - scormid int(10) unsigned NOT NULL default '0', - scoid int(10) unsigned NOT NULL default '0', - primary tinyint(1) NOT NULL default '0', - objectiveid int(10) unsigned NOT NULL default '0', - satisfiedbymeasure tinyint(1) NOT NULL default '1', - minnormalizedmeasure float(11,4) unsigned NOT NULL default '1.0', - PRIMARY KEY (id), - UNIQUE (scormid, scoid, id), - KEY scormid (scormid), - KEY scoid (scoid) -) TYPE=MyISAM; - -CREATE TABLE prefix_scorm_sequencing_objective ( - id int(10) unsigned NOT NULL auto_increment, - scormid int(10) unsigned NOT NULL default '0', - scoid int(10) unsigned NOT NULL default '0', - objectiveid int(10) unsigned NOT NULL default '0', - targetobjectiveid int(10) unsigned NOT NULL default '0', - readsatisfiedstatus tinyint(1) NOT NULL default '1', - readnormalizedmeasure tinyint(1) NOT NULL default '1', - writesatisfiedstatus tinyint(1) NOT NULL default '0', - writenormalizedmeasure tinyint(1) NOT NULL default '0', - PRIMARY KEY (id), - UNIQUE (scormid, scoid, id, objectiveid), - KEY scormid (scormid), - KEY scoid (scoid) -) TYPE=MyISAM; - -# -# Dumping data for table log_display -# - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('scorm', 'view', 'scorm', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('scorm', 'review', 'scorm', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('scorm', 'update', 'scorm', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('scorm', 'add', 'scorm', 'name'); diff --git a/mod/scorm/db/postgres7.sql b/mod/scorm/db/postgres7.sql deleted file mode 100755 index 9b3bc1c754a..00000000000 --- a/mod/scorm/db/postgres7.sql +++ /dev/null @@ -1,75 +0,0 @@ -# -# Table structure for table `scorm` -# - -CREATE TABLE prefix_scorm ( - id SERIAL PRIMARY KEY, - course integer NOT NULL default '0', - name varchar(255) NOT NULL default '', - reference varchar(255) NOT NULL default '', - maxgrade real NOT NULL default '0', - grademethod integer NOT NULL default '0', - maxattempt integer NOT NULL default '1', - launch integer NOT NULL default '0', - skipview integer NOT NULL default '1', - summary text NOT NULL default '', - hidebrowse integer NOT NULL default '0', - hidetoc integer NOT NULL default '0', - hidenav integer NOT NULL default '0', - auto integer NOT NULL default '0', - popup integer NOT NULL default '0', - options varchar(255) NOT NULL default '', - width integer NOT NULL default '100', - height integer NOT NULL default '500', - timemodified integer NOT NULL default '0' -); - -CREATE INDEX prefix_scorm_course_idx ON prefix_scorm (course); - -CREATE TABLE prefix_scorm_scoes ( - id SERIAL PRIMARY KEY, - scorm integer NOT NULL default '0', - manifest varchar(255) NOT NULL default '', - organization varchar(255) NOT NULL default '', - parent varchar(255) NOT NULL default '', - identifier varchar(255) NOT NULL default '', - launch varchar(255) NOT NULL default '', - parameters varchar(255) NOT NULL default '', - scormtype varchar(5) NOT NULL default '', - title varchar(255) NOT NULL default '', - prerequisites varchar(200) NOT NULL default '', - maxtimeallowed varchar(19) NOT NULL default '', - timelimitaction varchar(19) NOT NULL default '', - datafromlms varchar(255) NOT NULL default '', - masteryscore varchar(200) NOT NULL default '', - next integer NOT NULL default '0', - previous integer NOT NULL default '0' -); - -CREATE INDEX prefix_scorm_scoes_scorm_idx ON prefix_scorm_scoes (scorm); - -CREATE TABLE prefix_scorm_scoes_track ( - id SERIAL PRIMARY KEY, - userid integer NOT NULL default '0', - scormid integer NOT NULL default '0', - scoid integer NOT NULL default '0', - attempt integer NOT NULL default '1', - element varchar(255) NOT NULL default '', - value text NOT NULL default '', - timemodified integer NOT NULL default '0', - UNIQUE (userid, scormid, scoid, attempt, element) -); - -CREATE INDEX prefix_scorm_scoes_track_user_idx ON prefix_scorm_scoes_track (userid); -CREATE INDEX prefix_scorm_scoes_track_scorm_idx ON prefix_scorm_scoes_track (scormid); -CREATE INDEX prefix_scorm_scoes_track_sco_idx ON prefix_scorm_scoes_track (scoid); -CREATE INDEX prefix_scorm_scoes_track_element_idx ON prefix_scorm_scoes_track (element); - -# -# Dumping data for table `log_display` -# - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('scorm', 'view', 'scorm', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('scorm', 'review', 'scorm', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('scorm', 'update', 'scorm', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('scorm', 'add', 'scorm', 'name'); diff --git a/mod/survey/db/mysql.sql b/mod/survey/db/mysql.sql deleted file mode 100755 index a618c9bfc8d..00000000000 --- a/mod/survey/db/mysql.sql +++ /dev/null @@ -1,193 +0,0 @@ -# phpMyAdmin MySQL-Dump -# version 2.2.1 -# http://phpwizard.net/phpMyAdmin/ -# http://phpmyadmin.sourceforge.net/ (download page) -# -# Host: localhost -# Generation Time: Nov 14, 2001 at 04:39 PM -# Server version: 3.23.36 -# PHP Version: 4.0.6 -# Database : `moodle` -# -------------------------------------------------------- - -# -# Table structure for table `survey` -# - -CREATE TABLE prefix_survey ( - id int(10) unsigned NOT NULL auto_increment, - course int(10) unsigned NOT NULL default '0', - template int(10) unsigned NOT NULL default '0', - days smallint(6) NOT NULL default '0', - timecreated int(10) unsigned NOT NULL default '0', - timemodified int(10) unsigned NOT NULL default '0', - name varchar(255) NOT NULL default '', - intro text NOT NULL default '', - questions varchar(255) NOT NULL default '', - PRIMARY KEY (id), - KEY `course` (`course`) -) TYPE=MyISAM COMMENT='all surveys'; - -# -# Dumping data for table `survey` -# - -INSERT INTO `prefix_survey` (`id`, `course`, `template`, `days`, `timecreated`, `timemodified`, `name`, `intro`, `questions`) VALUES (1, 0, 0, 0, 985017600, 985017600, 'collesaname', 'collesaintro', '25,26,27,28,29,30,43,44'); -INSERT INTO `prefix_survey` (`id`, `course`, `template`, `days`, `timecreated`, `timemodified`, `name`, `intro`, `questions`) VALUES (2, 0, 0, 0, 985017600, 985017600, 'collespname', 'collespintro', '31,32,33,34,35,36,43,44'); -INSERT INTO `prefix_survey` (`id`, `course`, `template`, `days`, `timecreated`, `timemodified`, `name`, `intro`, `questions`) VALUES (3, 0, 0, 0, 985017600, 985017600, 'collesapname', 'collesapintro', '37,38,39,40,41,42,43,44'); -INSERT INTO `prefix_survey` (`id`, `course`, `template`, `days`, `timecreated`, `timemodified`, `name`, `intro`, `questions`) VALUES (4, 0, 0, 0, 985017600, 985017600, 'attlsname', 'attlsintro', '65,67,68'); -INSERT INTO `prefix_survey` (`id`, `course`, `template`, `days`, `timecreated`, `timemodified`, `name`, `intro`, `questions`) VALUES (5, 0, 0, 0, 985017600, 985017600, 'ciqname', 'ciqintro', '69,70,71,72,73'); - - - -# -# Table structure for table `survey_analysis` -# - -CREATE TABLE prefix_survey_analysis ( - id int(10) unsigned NOT NULL auto_increment, - survey int(10) unsigned NOT NULL default '0', - userid int(10) unsigned NOT NULL default '0', - notes text NOT NULL default '', - PRIMARY KEY (id), - UNIQUE KEY id (id), - KEY survey (survey), - KEY userid (userid) -) TYPE=MyISAM; - -# -# Dumping data for table `survey_analysis` -# - -# -------------------------------------------------------- - -# -# Table structure for table `survey_answers` -# - -CREATE TABLE prefix_survey_answers ( - id int(10) unsigned NOT NULL auto_increment, - userid int(10) unsigned NOT NULL default '0', - survey int(10) unsigned NOT NULL default '0', - question int(10) unsigned NOT NULL default '0', - time int(10) unsigned NOT NULL default '0', - answer1 text NOT NULL default '', - answer2 text NOT NULL default '', - PRIMARY KEY (id), - UNIQUE KEY id (id), - KEY userid (userid), - KEY survey (survey), - KEY question (question) -) TYPE=MyISAM; - -# -# Dumping data for table `survey_answers` -# - -# -------------------------------------------------------- - -# -# Table structure for table `survey_questions` -# - -CREATE TABLE `prefix_survey_questions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `text` varchar(255) NOT NULL default '', - `shorttext` varchar(30) NOT NULL default '', - `multi` varchar(100) NOT NULL default '', - `intro` varchar(50) NOT NULL default '', - `type` tinyint(3) NOT NULL default '0', - `options` text, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - -# -# Dumping data for table `survey_questions` -# - -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (1, 'colles1', 'colles1short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (2, 'colles2', 'colles2short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (3, 'colles3', 'colles3short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (4, 'colles4', 'colles4short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (5, 'colles5', 'colles5short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (6, 'colles6', 'colles6short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (7, 'colles7', 'colles7short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (8, 'colles8', 'colles8short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (9, 'colles9', 'colles9short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (10, 'colles10', 'colles10short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (11, 'colles11', 'colles11short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (12, 'colles12', 'colles12short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (13, 'colles13', 'colles13short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (14, 'colles14', 'colles14short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (15, 'colles15', 'colles15short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (16, 'colles16', 'colles16short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (17, 'colles17', 'colles17short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (18, 'colles18', 'colles18short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (19, 'colles19', 'colles19short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (20, 'colles20', 'colles20short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (21, 'colles21', 'colles21short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (22, 'colles22', 'colles22short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (23, 'colles23', 'colles23short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (24, 'colles24', 'colles24short', '', '', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (25, 'collesm1', 'collesm1short', '1,2,3,4', 'collesmintro', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (26, 'collesm2', 'collesm2short', '5,6,7,8', 'collesmintro', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (27, 'collesm3', 'collesm3short', '9,10,11,12', 'collesmintro', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (28, 'collesm4', 'collesm4short', '13,14,15,16', 'collesmintro', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (29, 'collesm5', 'collesm5short', '17,18,19,20', 'collesmintro', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (30, 'collesm6', 'collesm6short', '21,22,23,24', 'collesmintro', 1, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (31, 'collesm1', 'collesm1short', '1,2,3,4', 'collesmintro', 2, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (32, 'collesm2', 'collesm2short', '5,6,7,8', 'collesmintro', 2, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (33, 'collesm3', 'collesm3short', '9,10,11,12', 'collesmintro', 2, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (34, 'collesm4', 'collesm4short', '13,14,15,16', 'collesmintro', 2, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (35, 'collesm5', 'collesm5short', '17,18,19,20', 'collesmintro', 2, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (36, 'collesm6', 'collesm6short', '21,22,23,24', 'collesmintro', 2, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (37, 'collesm1', 'collesm1short', '1,2,3,4', 'collesmintro', 3, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (38, 'collesm2', 'collesm2short', '5,6,7,8', 'collesmintro', 3, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (39, 'collesm3', 'collesm3short', '9,10,11,12', 'collesmintro', 3, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (40, 'collesm4', 'collesm4short', '13,14,15,16', 'collesmintro', 3, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (41, 'collesm5', 'collesm5short', '17,18,19,20', 'collesmintro', 3, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (42, 'collesm6', 'collesm6short', '21,22,23,24', 'collesmintro', 3, 'scaletimes5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (43, 'howlong', '', '', '', 1, 'howlongoptions'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (44, 'othercomments', '', '', '', 0, ''); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (64, 'attls20', 'attls20short', '', '', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (58, 'attls14', 'attls14short', '', '', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (59, 'attls15', 'attls15short', '', '', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (60, 'attls16', 'attls16short', '', '', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (61, 'attls17', 'attls17short', '', '', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (62, 'attls18', 'attls18short', '', '', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (63, 'attls19', 'attls19short', '', '', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (56, 'attls12', 'attls12short', '', '', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (57, 'attls13', 'attls13short', '', '', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (55, 'attls11', 'attls11short', '', '', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (54, 'attls10', 'attls10short', '', '', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (53, 'attls9', 'attls9short', '', '', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (52, 'attls8', 'attls8short', '', '', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (51, 'attls7', 'attls7short', '', '', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (50, 'attls6', 'attls6short', '', '', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (49, 'attls5', 'attls5short', '', '', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (48, 'attls4', 'attls4short', '', '', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (47, 'attls3', 'attls3short', '', '', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (45, 'attls1', 'attls1short', '', '', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (46, 'attls2', 'attls2short', '', '', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (65, 'attlsm1', 'attlsm1', '45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64', 'attlsmintro', 1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (67, 'attlsm2', 'attlsm2', '63,62,59,57,55,49,52,50,48,47', 'attlsmintro', -1, 'scaleagree5'); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (68, 'attlsm3', 'attlsm3', '46,54,45,51,60,53,56,58,61,64', 'attlsmintro', -1, 'scaleagree5'); - -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (69, 'ciq1', 'ciq1short', '', '', 0, ''); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (70, 'ciq2', 'ciq2short', '', '', 0, ''); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (71, 'ciq3', 'ciq3short', '', '', 0, ''); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (72, 'ciq4', 'ciq4short', '', '', 0, ''); -INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (73, 'ciq5', 'ciq5short', '', '', 0, ''); - - -# -# Dumping data for table `log_display` -# - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('survey', 'add', 'survey', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('survey', 'update', 'survey', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('survey', 'download', 'survey', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('survey', 'view form', 'survey', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('survey', 'view graph', 'survey', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('survey', 'view report', 'survey', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('survey', 'submit', 'survey', 'name'); diff --git a/mod/survey/db/postgres7.sql b/mod/survey/db/postgres7.sql deleted file mode 100755 index 899c5df7485..00000000000 --- a/mod/survey/db/postgres7.sql +++ /dev/null @@ -1,202 +0,0 @@ -# phpMyAdmin MySQL-Dump -# version 2.2.1 -# http://phpwizard.net/phpMyAdmin/ -# http://phpmyadmin.sourceforge.net/ (download page) -# -# Host: localhost -# Generation Time: Nov 14, 2001 at 04:39 PM -# Server version: 3.23.36 -# PHP Version: 4.0.6 -# Database : moodle -# -------------------------------------------------------- - -# -# Table structure for table survey -# - -CREATE TABLE prefix_survey ( - id SERIAL PRIMARY KEY, - course integer NOT NULL default '0', - template integer NOT NULL default '0', - days integer NOT NULL default '0', - timecreated integer NOT NULL default '0', - timemodified integer NOT NULL default '0', - name varchar(255) NOT NULL default '', - intro text, - questions varchar(255) default NULL -); - -CREATE INDEX prefix_survey_course_idx ON prefix_survey (course); - -# -# Dumping data for table survey -# - -INSERT INTO prefix_survey (id, course, template, days, timecreated, timemodified, name, intro, questions) VALUES (1, 0, 0, 0, 985017600, 985017600, 'collesaname', 'collesaintro', '25,26,27,28,29,30,43,44'); -INSERT INTO prefix_survey (id, course, template, days, timecreated, timemodified, name, intro, questions) VALUES (2, 0, 0, 0, 985017600, 985017600, 'collespname', 'collespintro', '31,32,33,34,35,36,43,44'); -INSERT INTO prefix_survey (id, course, template, days, timecreated, timemodified, name, intro, questions) VALUES (3, 0, 0, 0, 985017600, 985017600, 'collesapname', 'collesapintro', '37,38,39,40,41,42,43,44'); -INSERT INTO prefix_survey (id, course, template, days, timecreated, timemodified, name, intro, questions) VALUES (4, 0, 0, 0, 985017600, 985017600, 'attlsname', 'attlsintro', '65,67,68'); -INSERT INTO prefix_survey (id, course, template, days, timecreated, timemodified, name, intro, questions) VALUES (5, 0, 0, 0, 985017600, 985017600, 'ciqname', 'ciqintro', '69,70,71,72,73'); - - -# Reset the sequence. doing it this way rather than simply taking out -# id from the preceeding sql to avoid missing fks. -SELECT setval('prefix_survey_id_seq', (select max(id) from prefix_survey)); - - - - -# -# Table structure for table survey_analysis -# - -CREATE TABLE prefix_survey_analysis ( - id SERIAL PRIMARY KEY, - survey integer NOT NULL default '0', - userid integer NOT NULL default '0', - notes text NOT NULL default '' -); - -CREATE INDEX prefix_survey_analysis_survey_idx ON prefix_survey_analysis (survey); -CREATE INDEX prefix_survey_analysis_userid_idx ON prefix_survey_analysis (userid); - -# -# Dumping data for table survey_analysis -# - -# -------------------------------------------------------- - -# -# Table structure for table survey_answers -# - -CREATE TABLE prefix_survey_answers ( - id SERIAL PRIMARY KEY, - userid integer NOT NULL default '0', - survey integer NOT NULL default '0', - question integer NOT NULL default '0', - time integer default NULL, - answer1 text default NULL, - answer2 text default NULL -); - -CREATE INDEX prefix_survey_answers_userid_idx ON prefix_survey_answers (userid); -CREATE INDEX prefix_survey_answers_survey_idx ON prefix_survey_answers (survey); -CREATE INDEX prefix_survey_answers_question_idx ON prefix_survey_answers (question); - -# -# Dumping data for table survey_answers -# - -# -------------------------------------------------------- - -# -# Table structure for table survey_questions -# - -CREATE TABLE prefix_survey_questions ( - id SERIAL PRIMARY KEY, - text varchar(255) NOT NULL default '', - shorttext varchar(30) NOT NULL default '', - multi varchar(100) NOT NULL default '', - intro varchar(50) default NULL, - type integer NOT NULL default '0', - options text -); - -# -# Dumping data for table survey_questions -# - -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (1, 'colles1', 'colles1short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (2, 'colles2', 'colles2short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (3, 'colles3', 'colles3short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (4, 'colles4', 'colles4short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (5, 'colles5', 'colles5short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (6, 'colles6', 'colles6short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (7, 'colles7', 'colles7short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (8, 'colles8', 'colles8short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (9, 'colles9', 'colles9short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (10, 'colles10', 'colles10short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (11, 'colles11', 'colles11short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (12, 'colles12', 'colles12short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (13, 'colles13', 'colles13short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (14, 'colles14', 'colles14short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (15, 'colles15', 'colles15short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (16, 'colles16', 'colles16short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (17, 'colles17', 'colles17short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (18, 'colles18', 'colles18short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (19, 'colles19', 'colles19short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (20, 'colles20', 'colles20short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (21, 'colles21', 'colles21short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (22, 'colles22', 'colles22short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (23, 'colles23', 'colles23short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (24, 'colles24', 'colles24short', '', '', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (25, 'collesm1', 'collesm1short', '1,2,3,4', 'collesmintro', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (26, 'collesm2', 'collesm2short', '5,6,7,8', 'collesmintro', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (27, 'collesm3', 'collesm3short', '9,10,11,12', 'collesmintro', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (28, 'collesm4', 'collesm4short', '13,14,15,16', 'collesmintro', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (29, 'collesm5', 'collesm5short', '17,18,19,20', 'collesmintro', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (30, 'collesm6', 'collesm6short', '21,22,23,24', 'collesmintro', 1, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (31, 'collesm1', 'collesm1short', '1,2,3,4', 'collesmintro', 2, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (32, 'collesm2', 'collesm2short', '5,6,7,8', 'collesmintro', 2, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (33, 'collesm3', 'collesm3short', '9,10,11,12', 'collesmintro', 2, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (34, 'collesm4', 'collesm4short', '13,14,15,16', 'collesmintro', 2, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (35, 'collesm5', 'collesm5short', '17,18,19,20', 'collesmintro', 2, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (36, 'collesm6', 'collesm6short', '21,22,23,24', 'collesmintro', 2, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (37, 'collesm1', 'collesm1short', '1,2,3,4', 'collesmintro', 3, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (38, 'collesm2', 'collesm2short', '5,6,7,8', 'collesmintro', 3, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (39, 'collesm3', 'collesm3short', '9,10,11,12', 'collesmintro', 3, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (40, 'collesm4', 'collesm4short', '13,14,15,16', 'collesmintro', 3, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (41, 'collesm5', 'collesm5short', '17,18,19,20', 'collesmintro', 3, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (42, 'collesm6', 'collesm6short', '21,22,23,24', 'collesmintro', 3, 'scaletimes5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (43, 'howlong', '', '', '', 1, 'howlongoptions'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (44, 'othercomments', '', '', '', 0, ''); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (64, 'attls20', 'attls20short', '', '', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (58, 'attls14', 'attls14short', '', '', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (59, 'attls15', 'attls15short', '', '', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (60, 'attls16', 'attls16short', '', '', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (61, 'attls17', 'attls17short', '', '', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (62, 'attls18', 'attls18short', '', '', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (63, 'attls19', 'attls19short', '', '', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (56, 'attls12', 'attls12short', '', '', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (57, 'attls13', 'attls13short', '', '', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (55, 'attls11', 'attls11short', '', '', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (54, 'attls10', 'attls10short', '', '', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (53, 'attls9', 'attls9short', '', '', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (52, 'attls8', 'attls8short', '', '', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (51, 'attls7', 'attls7short', '', '', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (50, 'attls6', 'attls6short', '', '', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (49, 'attls5', 'attls5short', '', '', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (48, 'attls4', 'attls4short', '', '', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (47, 'attls3', 'attls3short', '', '', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (45, 'attls1', 'attls1short', '', '', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (46, 'attls2', 'attls2short', '', '', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (65, 'attlsm1', 'attlsm1', '45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64', 'attlsmintro', 1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (67, 'attlsm2', 'attlsm2', '63,62,59,57,55,49,52,50,48,47', 'attlsmintro', -1, 'scaleagree5'); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (68, 'attlsm3', 'attlsm3', '46,54,45,51,60,53,56,58,61,64', 'attlsmintro', -1, 'scaleagree5'); - - -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (69, 'ciq1', 'ciq1short', '', '', 0, ''); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (70, 'ciq2', 'ciq2short', '', '', 0, ''); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (71, 'ciq3', 'ciq3short', '', '', 0, ''); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (72, 'ciq4', 'ciq4short', '', '', 0, ''); -INSERT INTO prefix_survey_questions (id, text, shorttext, multi, intro, type, options) VALUES (73, 'ciq5', 'ciq5short', '', '', 0, ''); - -# Reset the sequence. doing it this way rather than simply taking out -# id from the preceeding sql to avoid missing fks. -SELECT setval('prefix_survey_questions_id_seq', (select max(id) from prefix_survey_questions)); - - - -# -# Dumping data for table log_display -# - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('survey', 'add', 'survey', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('survey', 'update', 'survey', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('survey', 'download', 'survey', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('survey', 'view form', 'survey', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('survey', 'view graph', 'survey', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('survey', 'view report', 'survey', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('survey', 'submit', 'survey', 'name'); diff --git a/mod/wiki/db/mysql.sql b/mod/wiki/db/mysql.sql deleted file mode 100644 index f69b494a566..00000000000 --- a/mod/wiki/db/mysql.sql +++ /dev/null @@ -1,67 +0,0 @@ -# This file contains a complete database schema for all the -# tables used by this module, written in SQL - -# It may also contain INSERT statements for particular data -# that may be used, especially new entries in the table log_display - - -CREATE TABLE `prefix_wiki` ( - `id` int(10) unsigned NOT NULL auto_increment, - `course` int(10) unsigned NOT NULL default '0', - `name` varchar(255) NOT NULL default '', - `summary` text NOT NULL default '', - `pagename` varchar(255) NOT NULL default '', - `wtype` enum('teacher','group','student') NOT NULL default 'group', - `ewikiprinttitle` tinyint(4) NOT NULL default '1', - `htmlmode` tinyint(4) NOT NULL default '0', - `ewikiacceptbinary` tinyint(4) NOT NULL default '0', - `disablecamelcase` tinyint(4) NOT NULL default '0', - `setpageflags` tinyint(4) NOT NULL default '1', - `strippages` tinyint(4) NOT NULL default '1', - `removepages` tinyint(4) NOT NULL default '1', - `revertchanges` tinyint(4) NOT NULL default '1', - `initialcontent` varchar(255) NOT NULL default '', - `timemodified` int(10) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `course` (`course`) -) TYPE=MyISAM COMMENT='Main wiki table'; - - -# -# Table structure for table `mdl_wiki_entries` -# - -CREATE TABLE `prefix_wiki_entries` ( - `id` int(10) NOT NULL auto_increment, - `wikiid` int(10) NOT NULL default '0', - `course` int(10) NOT NULL default '0', - `groupid` int(10) NOT NULL default '0', - `userid` int(10) NOT NULL default '0', - `pagename` varchar(255) NOT NULL default '', - `timemodified` int(10) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `wikiid` (`wikiid`), - KEY `course` (`course`), - KEY `gropuid` (`groupid`), - KEY `userid` (`userid`), - KEY `pagename` (`pagename`) -) TYPE=MyISAM COMMENT='Holds entries for each wiki start instance.'; - - -CREATE TABLE `prefix_wiki_pages` ( - `id` int(10) unsigned NOT NULL auto_increment, - `pagename` VARCHAR(160) NOT NULL, - `version` INTEGER UNSIGNED NOT NULL DEFAULT 0, - `flags` INTEGER UNSIGNED DEFAULT 0, - `content` MEDIUMTEXT default '', - `author` VARCHAR(100) DEFAULT 'ewiki', - `userid` INTEGER UNSIGNED NOT NULL DEFAULT 0, - `created` INTEGER UNSIGNED DEFAULT 0, - `lastmodified` INTEGER UNSIGNED DEFAULT 0, - `refs` MEDIUMTEXT default '', - `meta` MEDIUMTEXT default '', - `hits` INTEGER UNSIGNED DEFAULT 0, - `wiki` int(10) unsigned NOT NULL default 0, - PRIMARY KEY `id` (`id`), - UNIQUE KEY `wiki_pages_uk` (`pagename`, `version`, `wiki`) -) TYPE=MyISAM COMMENT='Holds the Wiki-Pages'; diff --git a/mod/wiki/db/postgres7.sql b/mod/wiki/db/postgres7.sql deleted file mode 100644 index 800a234aa1f..00000000000 --- a/mod/wiki/db/postgres7.sql +++ /dev/null @@ -1,66 +0,0 @@ -# This file contains a complete database schema for all the -# tables used by this module, written in SQL - -# It may also contain INSERT statements for particular data -# that may be used, especially new entries in the table log_display - - -CREATE TABLE prefix_wiki ( - id SERIAL8 PRIMARY KEY, - course INT8 NOT NULL default '0', - name varchar(255) NOT NULL default '', - summary text NOT NULL, - pagename varchar(255) , - wtype VARCHAR default 'group' CHECK( wtype IN('teacher', 'group', 'student')), - ewikiprinttitle INT NOT NULL default '1', - htmlmode INT NOT NULL default '0', - ewikiacceptbinary INT NOT NULL default '0', - disablecamelcase INT NOT NULL default '0', - setpageflags INT NOT NULL default '1', - strippages INT NOT NULL default '1', - removepages INT NOT NULL default '1', - revertchanges INT NOT NULL default '1', - initialcontent varchar(255) , - timemodified INT8 NOT NULL default '0' -) ; - -CREATE INDEX prefix_wiki_course_idx ON prefix_wiki (course); - -# -# Table structure for table mdl_wiki_entries -# - -CREATE TABLE prefix_wiki_entries ( - id SERIAL8 PRIMARY KEY, - wikiid INT8 NOT NULL default '0', - course INT8 NOT NULL default '0', - groupid INT8 NOT NULL default '0', - userid INT8 NOT NULL default '0', - pagename varchar(255) NOT NULL default '', - timemodified INT8 NOT NULL default '0' -) ; - -CREATE INDEX prefix_wiki_entries_wikiid_idx ON prefix_wiki_entries (wikiid); -CREATE INDEX prefix_wiki_entries_userid_idx ON prefix_wiki_entries (userid); -CREATE INDEX prefix_wiki_entries_groupid_idx ON prefix_wiki_entries (groupid); -CREATE INDEX prefix_wiki_entries_course_idx ON prefix_wiki_entries (course); -CREATE INDEX prefix_wiki_entries_pagename_idx ON prefix_wiki_entries (pagename); - - -CREATE TABLE prefix_wiki_pages ( - id SERIAL8 PRIMARY KEY, - pagename VARCHAR(160) NOT NULL, - version INTEGER NOT NULL DEFAULT 0, - flags INTEGER DEFAULT 0, - content bytea DEFAULT '', - author VARCHAR(100) DEFAULT 'ewiki', - userid INTEGER NOT NULL DEFAULT 0, - created INTEGER DEFAULT 0, - lastmodified INTEGER DEFAULT 0, - refs bytea DEFAULT '', - meta TEXT, - hits INTEGER DEFAULT 0, - wiki INT8 NOT NULL -) ; - -CREATE UNIQUE INDEX prefix_wiki_pages_pagename_version_wiki_uk ON prefix_wiki_pages (pagename, version, wiki) ; diff --git a/mod/workshop/db/mysql.sql b/mod/workshop/db/mysql.sql deleted file mode 100644 index 51c63867dc3..00000000000 --- a/mod/workshop/db/mysql.sql +++ /dev/null @@ -1,188 +0,0 @@ -# -# Table structure for table `workshop` -# - -CREATE TABLE `prefix_workshop` ( - `id` int(10) unsigned NOT NULL auto_increment, - `course` int(10) unsigned NOT NULL default '0', - `name` varchar(255) NOT NULL default '', - `description` text NOT NULL default '', - `wtype` tinyint(3) unsigned NOT NULL default '0', - `nelements` tinyint(3) unsigned NOT NULL default '1', - `nattachments` tinyint(3) unsigned NOT NULL default '0', - `phase` tinyint(2) unsigned NOT NULL default '0', - `format` tinyint(2) unsigned NOT NULL default '0', - `gradingstrategy` tinyint(2) unsigned NOT NULL default '1', - `resubmit` tinyint(2) unsigned NOT NULL default '0', - `agreeassessments` tinyint(2) unsigned NOT NULL default '0', - `hidegrades` tinyint(2) unsigned NOT NULL default '0', - `anonymous` tinyint(2) unsigned NOT NULL default '0', - `includeself` tinyint(2) unsigned NOT NULL default '0', - `maxbytes` int(10) unsigned NOT NULL default '100000', - `submissionstart` int(10) unsigned NOT NULL default '0', - `assessmentstart` int(10) unsigned NOT NULL default '0', - `submissionend` int(10) unsigned NOT NULL default '0', - `assessmentend` int(10) unsigned NOT NULL default '0', - `releasegrades` int(10) unsigned NOT NULL default '0', - `grade` tinyint(3) NOT NULL default '0', - `gradinggrade` tinyint(3) NOT NULL default '0', - `ntassessments` tinyint(3) unsigned NOT NULL default '0', - `assessmentcomps` tinyint(3) unsigned NOT NULL default '2', - `nsassessments` tinyint(3) unsigned NOT NULL default '0', - `overallocation` tinyint(3) unsigned NOT NULL default '0', - `timemodified` int(10) unsigned NOT NULL default '0', - `teacherweight` tinyint(3) unsigned NOT NULL default '1', - `showleaguetable` tinyint(3) unsigned NOT NULL default '0', - `usepassword` tinyint(3) unsigned NOT NULL default '0', - `password` varchar(32) NOT NULL default '', - PRIMARY KEY (`id`), - KEY `course` (`course`) -) COMMENT='Defines workshop'; -# -------------------------------------------------------- - -# -# Table structure for table `workshop_submissions` -# - -CREATE TABLE `prefix_workshop_submissions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `workshopid` int(10) unsigned NOT NULL default '0', - `userid` int(10) unsigned NOT NULL default '0', - `title` varchar(100) NOT NULL default '', - `timecreated` int(10) unsigned NOT NULL default '0', - `mailed` tinyint(2) unsigned NOT NULL default '0', - `description` text NOT NULL default '', - `gradinggrade` int(3) unsigned NOT NULL default '0', - `finalgrade` int(3) unsigned NOT NULL default '0', - `late` int(3) unsigned NOT NULL default '0', - `nassessments` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - INDEX `userid` (`userid`), - INDEX `workshopid` (`workshopid`), - INDEX `mailed` (`mailed`) -) COMMENT='Info about submitted work from teacher and students'; -# -------------------------------------------------------- - -# -# Table structure for table `workshop_assessments` -# - -CREATE TABLE `prefix_workshop_assessments` ( - `id` int(10) unsigned NOT NULL auto_increment, - `workshopid` int(10) unsigned NOT NULL default '0', - `submissionid` int(10) unsigned NOT NULL default '0', - `userid` int(10) unsigned NOT NULL default '0', - `timecreated` int(10) unsigned NOT NULL default '0', - `timegraded` int(10) unsigned NOT NULL default '0', - `timeagreed` int(10) unsigned NOT NULL default '0', - `grade` float NOT NULL default '0', - `gradinggrade` int(3) NOT NULL default '0', - `teachergraded` int(3) NOT NULL default '0', - `mailed` tinyint(3) unsigned NOT NULL default '0', - `resubmission` tinyint(3) unsigned NOT NULL default '0', - `donotuse` tinyint(3) unsigned NOT NULL default '0', - `generalcomment` text NOT NULL default '', - `teachercomment` text NOT NULL default '', - PRIMARY KEY (`id`), - INDEX (`submissionid`), - INDEX (`userid`), - INDEX `workshopid` (`workshopid`), - INDEX `mailed` (`mailed`) - ) COMMENT='Info about assessments by teacher and students'; -# -------------------------------------------------------- - -# -# Table structure for table `workshop_elements` -# - -CREATE TABLE `prefix_workshop_elements` ( - `id` int(10) unsigned NOT NULL auto_increment, - `workshopid` int(10) unsigned NOT NULL default '0', - `elementno` tinyint(3) unsigned NOT NULL default '0', - `description` text NOT NULL default '', - `scale` tinyint(3) unsigned NOT NULL default '0', - `maxscore` tinyint(3) unsigned NOT NULL default '1', - `weight` tinyint(3) unsigned NOT NULL default '11', - `stddev` float NOT NULL default '0.0', - `totalassessments` int(10) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `workshopid` (`workshopid`) -) COMMENT='Info about marking scheme of assignment'; -# -------------------------------------------------------- - - -# -# Table structure for table `workshop_rubrics` -# - -CREATE TABLE `prefix_workshop_rubrics` ( - `id` int(10) unsigned NOT NULL auto_increment, - `workshopid` int(10) unsigned NOT NULL default '0', - `elementno` int(10) unsigned NOT NULL default '0', - `rubricno` tinyint(3) unsigned NOT NULL default '0', - `description` text NOT NULL default '', - PRIMARY KEY (`id`) -) COMMENT='Info about the rubrics marking scheme'; -# -------------------------------------------------------- - -# -# Table structure for table `workshop_grades` -# - -CREATE TABLE `prefix_workshop_grades` ( - `id` int(10) unsigned NOT NULL auto_increment, - `workshopid` int(10) unsigned NOT NULL default '0', - `assessmentid` int(10) unsigned NOT NULL default '0', - `elementno` int(10) unsigned NOT NULL default '0', - `feedback` text NOT NULL default '', - `grade` tinyint(3) NOT NULL default '0', - PRIMARY KEY (`id`), - INDEX (`assessmentid`), - INDEX `workshopid` (`workshopid`) -) COMMENT='Info about individual grades given to each element'; -# -------------------------------------------------------- - - -# -# Table structure for table `workshop_stockcomments` -# - -CREATE TABLE `prefix_workshop_stockcomments` ( - `id` int(10) unsigned NOT NULL auto_increment, - `workshopid` int(10) unsigned NOT NULL default '0', - `elementno` int(10) unsigned NOT NULL default '0', - `comments` text NOT NULL default '', - PRIMARY KEY (`id`) -) COMMENT='Info about the teacher comment bank'; -# -------------------------------------------------------- - -# -# Table structure for table `workshop_comments` -# - -CREATE TABLE `prefix_workshop_comments` ( - `id` int(10) unsigned NOT NULL auto_increment, - `workshopid` int(10) unsigned NOT NULL default '0', - `assessmentid` int(10) unsigned NOT NULL default '0', - `userid` int(10) unsigned NOT NULL default '0', - `timecreated` int(10) unsigned NOT NULL default '0', - `mailed` tinyint(2) unsigned NOT NULL default '0', - `comments` text NOT NULL default '', - PRIMARY KEY (`id`), - KEY `workshopid` (`workshopid`), - KEY `assessmentid` (`assessmentid`), - KEY `userid` (`userid`), - KEY `mailed` (`mailed`) -) COMMENT='Defines comments'; -# -------------------------------------------------------- - - - -INSERT INTO `prefix_log_display` (module, action, mtable, field) VALUES ('workshop', 'assessments', 'workshop', 'name'); -INSERT INTO `prefix_log_display` (module, action, mtable, field) VALUES ('workshop', 'close', 'workshop', 'name'); -INSERT INTO `prefix_log_display` (module, action, mtable, field) VALUES ('workshop', 'display', 'workshop', 'name'); -INSERT INTO `prefix_log_display` (module, action, mtable, field) VALUES ('workshop', 'resubmit', 'workshop', 'name'); -INSERT INTO `prefix_log_display` (module, action, mtable, field) VALUES ('workshop', 'set up', 'workshop', 'name'); -INSERT INTO `prefix_log_display` (module, action, mtable, field) VALUES ('workshop', 'submissions', 'workshop', 'name'); -INSERT INTO `prefix_log_display` (module, action, mtable, field) VALUES ('workshop', 'view', 'workshop', 'name'); -INSERT INTO `prefix_log_display` (module, action, mtable, field) VALUES ('workshop', 'update', 'workshop', 'name'); diff --git a/mod/workshop/db/postgres7.sql b/mod/workshop/db/postgres7.sql deleted file mode 100644 index 6b6300f3743..00000000000 --- a/mod/workshop/db/postgres7.sql +++ /dev/null @@ -1,177 +0,0 @@ -# -# Table structure for table workshop -# -BEGIN; -CREATE TABLE prefix_workshop ( - id SERIAL PRIMARY KEY, - course INT8 NOT NULL default '0', - name varchar(255) NOT NULL default '', - description text NOT NULL default '', - wtype INT NOT NULL DEFAULT '0', - nelements INT NOT NULL default '10', - nattachments INT NOT NULL DEFAULT '0', - phase INT2 NOT NULL default '0', - format INT2 NOT NULL default '0', - gradingstrategy INT2 NOT NULL default '1', - resubmit INT2 NOT NULL default '0', - agreeassessments INT2 NOT NULL default '0', - hidegrades INT2 NOT NULL default '0', - anonymous INT2 NOT NULL default '0', - includeself INT2 NOT NULL default '0', - maxbytes INT8 NOT NULL default '100000', - submissionstart INT8 NOT NULL default '0', - assessmentstart INT8 NOT NULL default '0', - submissionend INT8 NOT NULL default '0', - assessmentend INT8 NOT NULL default '0', - releasegrades INT8 NOT NULL default'0', - grade INT8 NOT NULL default '0', - gradinggrade INT4 NOT NULL default '0', - ntassessments INT NOT NULL default '0', - assessmentcomps int4 NOT NULL default '2', - nsassessments INT NOT NULL default '0', - overallocation INT NOT NULL default '0', - timemodified INT8 NOT NULL default '0', - teacherweight INT NOT NULL default '1', - showleaguetable INT4 NOT NULL default '0', - usepassword INT NOT NULL DEFAULT '0', - password VARCHAR(32) NOT NULL DEFAULT '' -); - -CREATE INDEX prefix_workshop_course_idx ON prefix_workshop (course); - -# -------------------------------------------------------- - -# -# Table structure for table workshop_submissions -# - -CREATE TABLE prefix_workshop_submissions ( - id SERIAL PRIMARY KEY, - workshopid INT8 NOT NULL default '0', - userid INT8 NOT NULL default '0', - title varchar(100) NOT NULL default '', - timecreated INT8 NOT NULL default '0', - mailed INT2 NOT NULL default '0', - description TEXT, - gradinggrade INT NOT NULL default '0', - late INT NOT NULL DEFAULT '0', - finalgrade INT NOT NULL default '0', - nassessments INT8 NOT NULL default '0' - -); -CREATE INDEX prefix_workshop_submissions_title_idx on prefix_workshop_submissions (title); -CREATE INDEX prefix_workshop_submissions_userid_idx ON prefix_workshop_submissions (userid); -CREATE INDEX prefix_workshop_submissions_workshopid_idx ON prefix_workshop_submissions (workshopid); -CREATE INDEX prefix_workshop_submissions_mailed_idx ON prefix_workshop_submissions (mailed); - -# -------------------------------------------------------- - -# -# Table structure for table workshop_assessments -# - -CREATE TABLE prefix_workshop_assessments ( - id SERIAL PRIMARY KEY, - workshopid INT8 NOT NULL default '0', - submissionid INT8 NOT NULL default '0', - userid INT8 NOT NULL default '0', - timecreated INT8 NOT NULL default '0', - timegraded INT8 NOT NULL default '0', - timeagreed INT8 NOT NULL default '0', - grade float NOT NULL default '0', - gradinggrade INT NOT NULL default '0', - teachergraded INT4 NOT NULL default '0', - mailed INT2 NOT NULL default '0', - resubmission INT2 NOT NULL default '0', - donotuse int4 NOT NULL default '0', - generalcomment text NOT NULL default '', - teachercomment text NOT NULL default '' - - ); - -CREATE INDEX prefix_workshop_assessments_workshopid_idx ON prefix_workshop_assessments (workshopid); -CREATE INDEX prefix_workshop_assessments_submissionid_idx ON prefix_workshop_assessments (submissionid); -CREATE INDEX prefix_workshop_assessments_userid_idx ON prefix_workshop_assessments (userid); -CREATE INDEX prefix_workshop_assessments_mailed_idx ON prefix_workshop_assessments (mailed); - -# -------------------------------------------------------- - -# -# Table structure for table workshop_elements -# - -CREATE TABLE prefix_workshop_elements ( - id SERIAL PRIMARY KEY, - workshopid INT8 NOT NULL default '0', - elementno INT NOT NULL default '0', - description text NOT NULL default '', - scale INT NOT NULL default '0', - maxscore INT NOT NULL default '1', - weight INT4 NOT NULL default '11', - stddev FLOAT NOT NULL default '0', - totalassessments INT8 NOT NULL DEFAULT '0' -); - -CREATE INDEX prefix_workshop_elements_workshopid_idx ON prefix_workshop_elements (workshopid); - -# -------------------------------------------------------- -CREATE TABLE prefix_workshop_rubrics ( - id SERIAL PRIMARY KEY, - workshopid int8 NOT NULL default '0', - elementno int8 NOT NULL default '0', - rubricno int4 NOT NULL default '0', - description text NOT NULL -) ; -# -------------------------------------------------------- - - -# -# Table structure for table workshop_grades -# - -CREATE TABLE prefix_workshop_grades ( - id SERIAL PRIMARY KEY, - workshopid INT8 NOT NULL default '0', - assessmentid INT8 NOT NULL default '0', - elementno INT8 NOT NULL default '0', - feedback text NOT NULL default '', - grade INT NOT NULL default '0' -); - -CREATE INDEX prefix_workshop_grades_workshopid_idx ON prefix_workshop_grades (workshopid); -CREATE INDEX prefix_workshop_grades_assessmentid_idx ON prefix_workshop_grades (assessmentid); - -# -------------------------------------------------------- -CREATE TABLE prefix_workshop_comments ( - id SERIAL PRIMARY KEY, - workshopid int8 NOT NULL default '0', - assessmentid int8 NOT NULL default '0', - userid int8 NOT NULL default '0', - timecreated int8 NOT NULL default '0', - mailed int2 NOT NULL default '0', - comments text NOT NULL default '' -); - -CREATE INDEX prefix_workshop_comments_workshopid_idx ON prefix_workshop_comments (workshopid); -CREATE INDEX prefix_workshop_comments_assessmentid_idx ON prefix_workshop_comments (assessmentid); -CREATE INDEX prefix_workshop_comments_userid_idx ON prefix_workshop_comments (userid); -CREATE INDEX prefix_workshop_comments_mailed_idx ON prefix_workshop_comments (mailed); - -#--------------------------------------------------------- -CREATE TABLE prefix_workshop_stockcomments ( - id SERIAL PRIMARY KEY, - workshopid INT8 NOT NULL default '0', - elementno INT8 NOT NULL default '0', - comments text NOT NULL -); - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('workshop', 'assessments', 'workshop', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('workshop', 'close', 'workshop', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('workshop', 'display', 'workshop', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('workshop', 'resubmit', 'workshop', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('workshop', 'set up', 'workshop', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('workshop', 'submissions', 'workshop', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('workshop', 'view', 'workshop', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('workshop', 'update', 'workshop', 'name'); - -COMMIT; diff --git a/question/showbank.php b/question/showbank.php deleted file mode 100644 index ede2540a4db..00000000000 --- a/question/showbank.php +++ /dev/null @@ -1,189 +0,0 @@ -dirroot.'/question/editlib.php'); - - $page = optional_param('page', -1, PARAM_INT); - $perpage = optional_param('perpage', -1, PARAM_INT); - $sortorder = optional_param('sortorder', ''); - if (preg_match("/[';]/", $sortorder)) { - error("Incorrect use of the parameter 'sortorder'"); - } - - if ($page > -1) { - $SESSION->questionpage = $page; - } else { - $page = isset($SESSION->questionpage) ? $SESSION->questionpage : 0; - } - - if ($perpage > -1) { - $SESSION->questionperpage = $perpage; - } else { - $perpage = isset($SESSION->questionperpage) ? $SESSION->questionperpage : DEFAULT_QUESTIONS_PER_PAGE; - } - - if ($sortorder) { - $SESSION->questionsortorder = $sortorder; - } else { - $sortorder = isset($SESSION->questionsortorder) ? $SESSION->questionsortorder : 'qtype, name ASC'; - } - $SESSION->fromurl = $FULLME; - -/// Now, check for commands on this page and modify variables as necessary - if (isset($_REQUEST['move']) and confirm_sesskey()) { /// Move selected questions to new category - $tocategoryid = required_param('category', PARAM_INT); - if (!$tocategory = get_record('question_categories', 'id', $tocategoryid)) { - error('Invalid category'); - } - if (!has_capability('moodle/question:managecategory', get_context_instance(CONTEXT_COURSE, $tocategory->course))){ - error(get_string('categorynoedit', 'quiz', $tocategory->name), 'edit.php?courseid=$course->id'); - } - foreach ($_POST as $key => $value) { // Parse input for question ids - if (substr($key, 0, 1) == "q") { - $key = substr($key,1); - if (!set_field('question', 'category', $tocategory->id, 'id', $key)) { - error('Could not update category field'); - } - } - } - } - - if (isset($_REQUEST['deleteselected'])) { // delete selected questions from the category - - if (isset($_REQUEST['confirm']) and confirm_sesskey()) { // teacher has already confirmed the action - $deleteselected = required_param('deleteselected'); - if ($_REQUEST['confirm'] == md5($deleteselected)) { - if ($questionlist = explode(',', $deleteselected)) { - // for each question either hide it if it is in use or delete it - foreach ($questionlist as $questionid) { - if (record_exists('quiz_question_instances', 'question', $questionid) or - record_exists('question_states', 'originalquestion', $questionid)) { - if (!set_field('question', 'hidden', 1, 'id', $questionid)) { - error('Was not able to hide question'); - } - } else { - delete_question($questionid); - } - } - } - echo ''; - echo '
'."\n"; echo '

'."\n"; echo '

'."\n"; - echo "
\n"; + echo "\n"; +if (empty($CFG->enablegroupings)) { + // NO GROUPINGS YET! + echo '

'."\n"; +} else { echo '

'."\n"; +} echo '

'."\n"; } - + +if (empty($CFG->enablegroupings)) { +// NO GROUPIGS YET! + echo '

'."\n"; + echo '

'."\n"; +} else { echo '

'."\n"; @@ -318,10 +342,11 @@ if ($success) { echo '

'."\n"; } - +} + echo '
'."\n"; - echo '

'."\n"; + echo '

'."\n"; //NOTE: the SELECT was, multiple="multiple" name="user[]" - not used and breaks onclick. echo '
'; if (!empty($THEME->customcorners)) print_custom_corners_start(); - - if ($chat->studentlogs or has_capability('mod/chat:readlog',$context)) { - echo ''; - } - - print_heading(format_string($chat->name)); /// Check to see if groups are being used here - if ($groupmode = groupmode($course, $cm)) { // Groups are being used - $currentgroup = setup_and_print_groups($course, $groupmode, "view.php?id=$cm->id"); - } else { - $currentgroup = 0; - } - + $groupmode = groupmode($course, $cm); + $currentgroup = setup_and_print_groups($course, $groupmode, "view.php?id=$cm->id"); + if ($currentgroup) { $groupselect = " AND groupid = '$currentgroup'"; $groupparam = "&groupid=$currentgroup"; @@ -107,10 +95,20 @@ $groupparam = ""; } + if ($chat->studentlogs or has_capability('mod/chat:readlog',$context)) { + echo ''; + } + + + print_heading(format_string($chat->name)); + /// Print the main part of the page if (has_capability('mod/chat:chat',$context)) { - print_simple_box_start('center'); + print_box_start('generalbox', 'enterlink'); // users with screenreader set, will only see 1 link, to the manual refresh page // for better accessibility if (!empty($USER->screenreader)) { @@ -120,30 +118,32 @@ } link_to_popup_window ($chattarget, - "chat$course->id$chat->id$groupparam", "$strenterchat", 500, 700, get_string('modulename', 'chat')); - print_simple_box_end(); + "chat$course->id$chat->id$groupparam", "

$strenterchat

", 500, 700, get_string('modulename', 'chat')); // if user is using screen reader, then there is no need to display this link again if ($CFG->chat_method == 'header_js' && empty($USER->screenreader)) { // show frame/js-less alternative - print_simple_box_start('center'); link_to_popup_window ("/mod/chat/gui_basic/index.php?id=$chat->id$groupparam", - "chat$course->id$chat->id$groupparam", '('.get_string('noframesjs', 'message').')', 500, 700, get_string('modulename', 'chat')); - print_simple_box_end(); + "chat$course->id$chat->id$groupparam", '

('.get_string('noframesjs', 'message').')

', 500, 700, get_string('modulename', 'chat')); } - } else { -/* XXX TODO + + print_box_end(); + + } else if (isguestuser()) { $wwwroot = $CFG->wwwroot.'/login/index.php'; if (!empty($CFG->loginhttps)) { $wwwroot = str_replace('http:','https:', $wwwroot); } notice_yesno(get_string('noguests', 'chat').'

'.get_string('liketologin'), - $wwwroot, $_SERVER['HTTP_REFERER']); + $wwwroot, $CFG->wwwroot.'/course/view.php?id='.$course->id); print_footer($course); exit; -*/ + + } else { + // show some error message + require_capability('mod/chat:chat', $context); } diff --git a/mod/choice/db/mysql.sql b/mod/choice/db/mysql.sql deleted file mode 100755 index da0e6448efb..00000000000 --- a/mod/choice/db/mysql.sql +++ /dev/null @@ -1,85 +0,0 @@ -# phpMyAdmin MySQL-Dump -# version 2.2.1 -# http://phpwizard.net/phpMyAdmin/ -# http://phpmyadmin.sourceforge.net/ (download page) -# -# Host: localhost -# Generation Time: Nov 14, 2001 at 04:44 PM -# Server version: 3.23.36 -# PHP Version: 4.0.6 -# Database : `moodle` -# -------------------------------------------------------- - -# -# Table structure for table `choice` -# - -CREATE TABLE prefix_choice ( - id int(10) unsigned NOT NULL auto_increment, - course int(10) unsigned NOT NULL default '0', - name varchar(255) NOT NULL default '', - text text NOT NULL default '', - format tinyint(2) unsigned NOT NULL default '0', - publish tinyint(2) unsigned NOT NULL default '0', - showresults tinyint(2) unsigned NOT NULL default '0', - display tinyint(4) unsigned NOT NULL default '0', - allowupdate tinyint(2) unsigned NOT NULL default '0', - showunanswered tinyint(2) unsigned NOT NULL default '0', - limitanswers tinyint(2) unsigned NOT NULL default '0', - timeopen int(10) unsigned NOT NULL default '0', - timeclose int(10) unsigned NOT NULL default '0', - timemodified int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id), - UNIQUE KEY id (id), - KEY course (course) -) TYPE=MyISAM COMMENT='Available choices are stored here.'; - - -# -------------------------------------------------------- - -# -# Table structure for table `choice_answers` -# - -CREATE TABLE prefix_choice_answers ( - id int(10) unsigned NOT NULL auto_increment, - choiceid int(10) unsigned NOT NULL default '0', - userid int(10) unsigned NOT NULL default '0', - optionid int(10) NOT NULL default '0', - timemodified int(10) NOT NULL default '0', - PRIMARY KEY (id), - UNIQUE KEY id (id), - KEY userid (userid), - KEY choiceid (choiceid) -) TYPE=MyISAM; - - -# -------------------------------------------------------- - -# -# Table structure for table `choice_options` -# - -CREATE TABLE prefix_choice_options ( - id int(10) unsigned NOT NULL auto_increment, - choiceid int(10) unsigned NOT NULL default '0', - `text` text default '', - maxanswers int(10) unsigned NULL default '0', - timemodified int(10) NOT NULL default '0', - PRIMARY KEY (id), - UNIQUE KEY id (id), - KEY choiceid (choiceid) -) TYPE=MyISAM; - -# -# Dumping data for table `log_display` -# - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('choice', 'view', 'choice', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('choice', 'update', 'choice', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('choice', 'add', 'choice', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('choice', 'report', 'choice', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('choice', 'choose', 'choice', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('choice', 'choose again', 'choice', 'name'); - - diff --git a/mod/choice/db/postgres7.sql b/mod/choice/db/postgres7.sql deleted file mode 100755 index fa226d723e4..00000000000 --- a/mod/choice/db/postgres7.sql +++ /dev/null @@ -1,79 +0,0 @@ -# phpMyAdmin MySQL-Dump -# version 2.2.1 -# http://phpwizard.net/phpMyAdmin/ -# http://phpmyadmin.sourceforge.net/ (download page) -# -# Host: localhost -# Generation Time: Nov 14, 2001 at 04:44 PM -# Server version: 3.23.36 -# PHP Version: 4.0.6 -# Database : `moodle` -# -------------------------------------------------------- - -# -# Table structure for table `choice` -# - -CREATE TABLE prefix_choice ( - id SERIAL PRIMARY KEY, - course integer NOT NULL default '0', - name varchar(255) NOT NULL default '', - text text NOT NULL default '', - format integer NOT NULL default '0', - showunanswered integer NOT NULL default '0', - limitanswers integer NOT NULL default '0', - publish integer NOT NULL default '0', - showresults integer NOT NULL default '0', - display integer NOT NULL default '0', - allowupdate integer NOT NULL default '0', - timeopen integer NOT NULL default '0', - timeclose integer NOT NULL default '0', - timemodified integer NOT NULL default '0' -); - -CREATE INDEX prefix_choice_course_idx ON prefix_choice (course); - -# -------------------------------------------------------- - -# -# Table structure for table `choice_answers` -# - -CREATE TABLE prefix_choice_answers ( - id SERIAL PRIMARY KEY, - choiceid integer NOT NULL default '0', - userid integer NOT NULL default '0', - optionid integer NOT NULL default '0', - timemodified integer NOT NULL default '0' -); - -CREATE INDEX prefix_choice_answers_choice_idx ON prefix_choice_answers (choiceid); -CREATE INDEX prefix_choice_answers_userid_idx ON prefix_choice_answers (userid); - -# -------------------------------------------------------- - -# -# Table structure for table `choice_options` -# - -CREATE TABLE prefix_choice_options ( - id SERIAL PRIMARY KEY, - choiceid integer NOT NULL default '0', - text TEXT, - maxanswers integer NULL default '0', - timemodified integer NOT NULL default '0' -); - -CREATE INDEX prefix_choice_options_choice_idx ON prefix_choice_options (choiceid); - -# -# Dumping data for table `log_display` -# - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('choice', 'view', 'choice', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('choice', 'update', 'choice', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('choice', 'add', 'choice', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('choice', 'report', 'choice', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('choice', 'choose', 'choice', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('choice', 'choose again', 'choice', 'name'); - diff --git a/mod/choice/lib.php b/mod/choice/lib.php index b0217f4493b..75a4d5cd658 100644 --- a/mod/choice/lib.php +++ b/mod/choice/lib.php @@ -283,12 +283,17 @@ function choice_user_submit_response($formanswer, $choice, $userid, $courseid, $ } -function choice_show_reportlink($choice, $courseid, $cmid) { - $context = get_context_instance(CONTEXT_MODULE, $cmid); - if ( $allanswers = get_records("choice_answers", "choiceid", $choice->id)) { +function choice_show_reportlink($choice, $courseid, $cmid, $groupmode) { + //TODO: rewrite with SQL + $currentgroup = get_current_group($courseid); + if ($allanswers = get_records("choice_answers", "choiceid", $choice->id)) { $responsecount = 0; foreach ($allanswers as $aa) { - if (has_capability('mod/choice:readresponses', $context)) { + if ($groupmode and $currentgroup) { + if (ismember($currentgroup, $aa->userid)) { + $responsecount++; + } + } else { $responsecount++; } } @@ -304,34 +309,34 @@ function choice_show_results($choice, $course, $cm, $forcepublish='') { global $CFG, $COLUMN_HEIGHT, $USER; $context = get_context_instance(CONTEXT_MODULE, $cm->id); + print_heading(get_string("responses", "choice")); + if (empty($forcepublish)) { //alow the publish setting to be overridden $forcepublish = $choice->publish; } - /// Check to see if groups are being used in this choice - if ($groupmode = groupmode($course, $cm)) { // Groups are being used - $currentgroup = setup_and_print_groups($course, $groupmode, $_SERVER['PHP_SELF']."?id=$cm->id"); - } else { - $currentgroup = false; - } + $groupmode = groupmode($course, $cm); + $currentgroup = get_current_group($course->id); - if ($currentgroup) { - $users = get_group_users($currentgroup, "u.firstname ASC", '', 'u.id, u.picture, u.firstname, u.lastname, u.idnumber'); - } else { - $users = get_users_by_capability($context, 'mod/choice:choose', 'u.id, u.picture, u.firstname, u.lastname, u.idnumber', 'u.firstname ASC'); - } + $users = get_users_by_capability($context, 'mod/choice:choose', 'u.id, u.picture, u.firstname, u.lastname, u.idnumber', 'u.firstname ASC', '', '', $currentgroup, '', false); if (!$users) { print_heading(get_string("nousersyet")); } + $answers = array () ; if ($allresponses = get_records("choice_answers", "choiceid", $choice->id)) { foreach ($allresponses as $aa) { - $answers[$aa->userid] = $aa; + //TODO: rewrite with SQL + if ($groupmode and $currentgroup) { + if (ismember($currentgroup, $aa->userid)) { + $answers[$aa->userid] = $aa; + } + } else { + $answers[$aa->userid] = $aa; + } } - } else { - $answers = array () ; } $timenow = time(); @@ -401,10 +406,7 @@ function choice_show_results($choice, $course, $cm, $forcepublish='') { // MDL-7861 echo ""; foreach ($userlist as $user) { - // this needs to be fixed - // hide admin/editting teacher (users with editting privilages) - // show users without? I could be wrong. - if (!($optionid==0 && has_capability('mod/choice:readresponses', $context, $user->id))) { // make sure admins and hidden teachers are not shown in not answered yet column. + if ($optionid!=0 or has_capability('mod/choice:choose', $context, $user->id, false)) { $columncount[$optionid] += 1; echo ""; if (has_capability('mod/choice:readresponses', $context) && $optionid!=0) { @@ -494,7 +496,7 @@ function choice_show_results($choice, $course, $cm, $forcepublish='') { } $column[$optionid] = 0; foreach ($userlist as $user) { - if (!($optionid==0 && has_capability('mod/choice:readresponses', $context, $user->id))) { //make sure admins and hidden teachers are not shown in not answered yet column. + if ($optionid!=0 or has_capability('mod/choice:choose', $context, $user->id, false)) { $column[$optionid]++; } } diff --git a/mod/data/db/mysql.sql b/mod/data/db/mysql.sql deleted file mode 100755 index 13cbf8b81c4..00000000000 --- a/mod/data/db/mysql.sql +++ /dev/null @@ -1,118 +0,0 @@ -# -- phpMyAdmin SQL Dump -# -- version 2.6.2 -# -- http://www.phpmyadmin.net -# -- -# -- Host: localhost -# -- Generation Time: Aug 25, 2005 at 03:52 PM -# -- Server version: 3.23.54 -# -- PHP Version: 4.2.2 -# -- - -# -- -------------------------------------------------------- - -CREATE TABLE prefix_data ( - id int(10) unsigned NOT NULL auto_increment, - course int(10) unsigned NOT NULL default '0', - name varchar(255) NOT NULL default '', - intro text NOT NULL default '', - comments int(4) unsigned NOT NULL default '0', - timeavailablefrom int(10) unsigned NOT NULL default '0', - timeavailableto int(10) unsigned NOT NULL default '0', - timeviewfrom int(10) unsigned NOT NULL default '0', - timeviewto int(10) unsigned NOT NULL default '0', - requiredentries int(8) unsigned NOT NULL default '0', - requiredentriestoview int(8) unsigned NOT NULL default '0', - maxentries int(8) unsigned NOT NULL default '0', - rssarticles int(4) unsigned NOT NULL default '0', - singletemplate text, - listtemplate text, - listtemplateheader text, - listtemplatefooter text, - addtemplate text, - rsstemplate text, - rsstitletemplate text, - csstemplate text, - jstemplate text, - approval tinyint(4) unsigned NOT NULL default '0', - scale int(10) NOT NULL default '0', - assessed int(10) unsigned NOT NULL default '0', - defaultsort int(10) unsigned NOT NULL default '0', - defaultsortdir tinyint(4) unsigned NOT NULL default '0', - editany tinyint(4) unsigned NOT NULL default '0', - PRIMARY KEY (id) -) TYPE=MyISAM COMMENT='Defines settings for each Database activity'; - - -CREATE TABLE prefix_data_content ( - id int(10) unsigned NOT NULL auto_increment, - fieldid int(10) unsigned NOT NULL default '0', - recordid int(10) unsigned NOT NULL default '0', - content longtext, - content1 longtext, - content2 longtext, - content3 longtext, - content4 longtext, - PRIMARY KEY (id) -) TYPE=MyISAM; - - -CREATE TABLE prefix_data_fields ( - id int(10) unsigned NOT NULL auto_increment, - dataid int(10) unsigned NOT NULL default '0', - type varchar(255) NOT NULL default '', - name varchar(255) NOT NULL default '', - description text NOT NULL default '', - param1 text, - param2 text, - param3 text, - param4 text, - param5 text, - param6 text, - param7 text, - param8 text, - param9 text, - param10 text, - PRIMARY KEY (id) -) TYPE=MyISAM; - - -CREATE TABLE prefix_data_records ( - id int(10) unsigned NOT NULL auto_increment, - userid int(10) unsigned NOT NULL default '0', - groupid int(10) unsigned NOT NULL default '0', - dataid int(10) unsigned NOT NULL default '0', - timecreated int(10) unsigned NOT NULL default '0', - timemodified int(10) unsigned NOT NULL default '0', - approved tinyint(4) unsigned NOT NULL default '0', - PRIMARY KEY (id) -) TYPE=MyISAM; - - -CREATE TABLE prefix_data_comments ( - id int(10) unsigned NOT NULL auto_increment, - userid int(10) unsigned NOT NULL default '0', - recordid int(10) unsigned NOT NULL default '0', - content text NOT NULL default '', - created int(10) unsigned NOT NULL default '0', - modified int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id) -) TYPE=MyISAM; - - -CREATE TABLE prefix_data_ratings ( - id int(10) unsigned NOT NULL auto_increment, - userid int(10) unsigned NOT NULL default '0', - recordid int(10) unsigned NOT NULL default '0', - rating int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id) -) TYPE=MyISAM; - - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'view', 'data', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'add', 'data', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'update', 'data', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'record delete', 'data', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'fields add', 'data_fields', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'fields update', 'data_fields', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'templates saved', 'data', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'templates def', 'data', 'name'); diff --git a/mod/data/db/postgres7.sql b/mod/data/db/postgres7.sql deleted file mode 100755 index e5413dca8d7..00000000000 --- a/mod/data/db/postgres7.sql +++ /dev/null @@ -1,100 +0,0 @@ - -CREATE TABLE prefix_data ( - id SERIAL PRIMARY KEY, - course integer NOT NULL default '0', - name varchar(255) NOT NULL default '', - intro text NOT NULL default '', - comments integer NOT NULL default '0', - timeavailablefrom integer NOT NULL default '0', - timeavailableto integer NOT NULL default '0', - timeviewfrom integer NOT NULL default '0', - timeviewto integer NOT NULL default '0', - requiredentries integer NOT NULL default '0', - requiredentriestoview integer NOT NULL default '0', - maxentries integer NOT NULL default '0', - rssarticles integer NOT NULL default '0', - singletemplate text, - listtemplate text, - listtemplateheader text, - listtemplatefooter text, - addtemplate text, - rsstemplate text, - rsstitletemplate text, - csstemplate text, - jstemplate text, - approval integer NOT NULL default '0', - scale integer NOT NULL default '0', - assessed integer NOT NULL default '0', - defaultsort integer NOT NULL default '0', - defaultsortdir integer NOT NULL default '0', - editany integer NOT NULL default '0' -); - - - -CREATE TABLE prefix_data_content ( - id SERIAL PRIMARY KEY, - fieldid integer NOT NULL default '0', - recordid integer NOT NULL default '0', - content text, - content1 text, - content2 text, - content3 text, - content text4 -); - - -CREATE TABLE prefix_data_fields ( - id SERIAL PRIMARY KEY, - dataid integer NOT NULL default '0', - type varchar(255) NOT NULL default '', - name varchar(255) NOT NULL default '', - description text NOT NULL default '', - param1 text, - param2 text, - param3 text, - param4 text, - param5 text, - param6 text, - param7 text, - param8 text, - param9 text, - param10 text -); - -CREATE TABLE prefix_data_records ( - id SERIAL PRIMARY KEY, - userid integer NOT NULL default '0', - groupid integer NOT NULL default '0', - dataid integer NOT NULL default '0', - timecreated integer NOT NULL default '0', - timemodified integer NOT NULL default '0', - approved integer NOT NULL default '0' -); - - -CREATE TABLE prefix_data_comments ( - id SERIAL PRIMARY KEY, - userid integer NOT NULL default '0', - recordid integer NOT NULL default '0', - content text NOT NULL default '', - created integer NOT NULL default '0', - modified integer NOT NULL default '0' -); - - -CREATE TABLE prefix_data_ratings ( - id SERIAL PRIMARY KEY, - userid integer NOT NULL default '0', - recordid integer NOT NULL default '0', - rating integer NOT NULL default '0' -); - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'view', 'data', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'add', 'data', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'update', 'data', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'record delete', 'data', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'fields add', 'data_fields', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'fields update', 'data_fields', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'templates saved', 'data', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'templates def', 'data', 'name'); diff --git a/mod/exercise/db/mysql.sql b/mod/exercise/db/mysql.sql deleted file mode 100644 index b6f40b58bd0..00000000000 --- a/mod/exercise/db/mysql.sql +++ /dev/null @@ -1,128 +0,0 @@ -# -# Table structure for table `exercise` -# - -CREATE TABLE `prefix_exercise` ( - `id` int(10) unsigned NOT NULL auto_increment, - `course` int(10) unsigned NOT NULL default '0', - `name` varchar(255) NOT NULL default '', - `nelements` tinyint(3) unsigned NOT NULL default '1', - `phase` tinyint(3) unsigned NOT NULL default '0', - `gradingstrategy` tinyint(3) unsigned NOT NULL default '1', - `usemaximum` tinyint(3) unsigned NOT NULL default '0', - `assessmentcomps` tinyint(3) unsigned NOT NULL default '2', - `anonymous` tinyint(3) unsigned NOT NULL default '1', - `maxbytes` int(10) unsigned NOT NULL default '100000', - `deadline` int(10) unsigned NOT NULL default '0', - `timemodified` int(10) unsigned NOT NULL default '0', - `grade` tinyint(3) NOT NULL default '0', - `gradinggrade` tinyint(3) NOT NULL default '0', - `showleaguetable` tinyint(3) unsigned NOT NULL default '0', - `usepassword` tinyint(3) unsigned NOT NULL default '0', - `password` varchar(32) NOT NULL default '', - PRIMARY KEY (`id`), - KEY `course` (`course`) -) COMMENT='Defines exercise'; -# -------------------------------------------------------- - -# -# Table structure for table `exercise_submissions` -# - -CREATE TABLE `prefix_exercise_submissions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `exerciseid` int(10) unsigned NOT NULL default '0', - `userid` int(10) unsigned NOT NULL default '0', - `title` varchar(100) NOT NULL default '', - `timecreated` int(10) unsigned NOT NULL default '0', - `resubmit` tinyint(3) unsigned NOT NULL default '0', - `mailed` tinyint(3) unsigned NOT NULL default '0', - `isexercise` tinyint(3) unsigned NOT NULL default '0', - `late` tinyint(3) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - INDEX `userid` (`userid`), - INDEX `exerciseid` (`exerciseid`) -) COMMENT='Info about submitted work from teacher and students'; -# -------------------------------------------------------- - -# -# Table structure for table `exercise_assessments` -# - -CREATE TABLE `prefix_exercise_assessments` ( - `id` int(10) unsigned NOT NULL auto_increment, - `exerciseid` int(10) unsigned NOT NULL default '0', - `submissionid` int(10) unsigned NOT NULL default '0', - `userid` int(10) unsigned NOT NULL default '0', - `timecreated` int(10) unsigned NOT NULL default '0', - `timegraded` int(10) unsigned NOT NULL default '0', - `grade` float NOT NULL default '0', - `gradinggrade` int(3) NOT NULL default '0', - `mailed` tinyint(2) unsigned NOT NULL default '0', - `generalcomment` text NOT NULL default '', - `teachercomment` text NOT NULL default '', - PRIMARY KEY (`id`), - INDEX (`submissionid`), - INDEX (`userid`), - INDEX (`exerciseid`) - ) COMMENT='Info about assessments by teacher and students'; -# -------------------------------------------------------- - -# -# Table structure for table `exercise_elements` -# - -CREATE TABLE `prefix_exercise_elements` ( - `id` int(10) unsigned NOT NULL auto_increment, - `exerciseid` int(10) unsigned NOT NULL default '0', - `elementno` tinyint(3) unsigned NOT NULL default '0', - `description` text NOT NULL default '', - `scale` tinyint(3) unsigned NOT NULL default '0', - `maxscore` tinyint(3) unsigned NOT NULL default '1', - `weight` tinyint(3) unsigned NOT NULL default '11', - PRIMARY KEY (`id`), - KEY `exerciseid` (`exerciseid`) -) COMMENT='Info about marking scheme of assignment'; -# -------------------------------------------------------- - - -# -# Table structure for table `exercise_rubrics` -# - -CREATE TABLE `prefix_exercise_rubrics` ( - `id` int(10) unsigned NOT NULL auto_increment, - `exerciseid` int(10) unsigned NOT NULL default '0', - `elementno` int(10) unsigned NOT NULL default '0', - `rubricno` tinyint(3) unsigned NOT NULL default '0', - `description` text NOT NULL default '', - PRIMARY KEY (`id`), - KEY `exerciseid` (`exerciseid`) -) COMMENT='Info about the rubrics marking scheme'; -# -------------------------------------------------------- - -# -# Table structure for table `exercise_grades` -# - -CREATE TABLE `prefix_exercise_grades` ( - `id` int(10) unsigned NOT NULL auto_increment, - `exerciseid` int(10) unsigned NOT NULL default '0', - `assessmentid` int(10) unsigned NOT NULL default '0', - `elementno` int(10) unsigned NOT NULL default '0', - `feedback` text NOT NULL default '', - `grade` tinyint(3) NOT NULL default '0', - PRIMARY KEY (`id`), - INDEX (`assessmentid`), - INDEX `exerciseid` (`exerciseid`) -) COMMENT='Info about individual grades given to each element'; -# -------------------------------------------------------- - - - -INSERT INTO `prefix_log_display` (module, action, mtable, field) VALUES ('exercise', 'close', 'exercise', 'name'); -INSERT INTO `prefix_log_display` (module, action, mtable, field) VALUES ('exercise', 'open', 'exercise', 'name'); -INSERT INTO `prefix_log_display` (module, action, mtable, field) VALUES ('exercise', 'submit', 'exercise', 'name'); -INSERT INTO `prefix_log_display` (module, action, mtable, field) VALUES ('exercise', 'view', 'exercise', 'name'); -INSERT INTO `prefix_log_display` (module, action, mtable, field) VALUES ('exercise', 'update', 'exercise', 'name'); - diff --git a/mod/exercise/db/postgres7.sql b/mod/exercise/db/postgres7.sql deleted file mode 100644 index 112a78bbfb0..00000000000 --- a/mod/exercise/db/postgres7.sql +++ /dev/null @@ -1,127 +0,0 @@ -# -# Table structure for table exercise -# - -CREATE TABLE prefix_exercise ( - id SERIAL8 PRIMARY KEY, - course INT8 NOT NULL default '0', - name varchar(255) NOT NULL default '', - nelements INT NOT NULL default '1', - phase INT NOT NULL default '0', - gradingstrategy INT NOT NULL default '1', - usemaximum INT NOT NULL default '0', - assessmentcomps INT NOT NULL default '2', - anonymous INT NOT NULL default '0', - maxbytes INT8 NOT NULL default '100000', - deadline INT8 NOT NULL default '0', - timemodified INT8 NOT NULL default '0', - grade INT NOT NULL default '0', - gradinggrade INT NOT NULL default '0', - showleaguetable INT NOT NULL default '0', - usepassword INT4 NOT NULL default '0', - password VARCHAR(32) NOT NULL default '' - -); - -CREATE INDEX prefix_exercise_course_idx ON prefix_exercise (course); - -# -------------------------------------------------------- - -# -# Table structure for table exercise_submissions -# - -CREATE TABLE prefix_exercise_submissions ( - id SERIAL8 PRIMARY KEY, - exerciseid INT8 NOT NULL default '0', - userid INT8 NOT NULL default '0', - title varchar(100) NOT NULL default '', - timecreated INT8 NOT NULL default '0', - resubmit INT NOT NULL default '0', - mailed INT NOT NULL default '0', - isexercise INT NOT NULL default '0' -); -CREATE INDEX prefix_exercise_submissions_userid_idx ON prefix_exercise_submissions (userid); -CREATE INDEX prefix_exercise_submissions_exerciseid_idx ON prefix_exercise_submissions (exerciseid); - -# -------------------------------------------------------- - -# -# Table structure for table exercise_assessments -# - -CREATE TABLE prefix_exercise_assessments ( - id SERIAL8 PRIMARY KEY, - exerciseid INT8 NOT NULL default '0', - submissionid INT8 NOT NULL default '0', - userid INT8 NOT NULL default '0', - timecreated INT8 NOT NULL default '0', - timegraded INT8 NOT NULL default '0', - grade float NOT NULL default '0', - gradinggrade INT NOT NULL default '0', - mailed INT2 NOT NULL default '0', - generalcomment text NOT NULL default '', - teachercomment text NOT NULL default '' - ); -# -------------------------------------------------------- -CREATE INDEX prefix_exercise_assessments_submissionid_idx ON prefix_exercise_assessments (submissionid); -CREATE INDEX prefix_exercise_assessments_userid_idx ON prefix_exercise_assessments (userid); -CREATE INDEX prefix_exercise_assessments_exerciseid_idx ON prefix_exercise_assessments (exerciseid); - -# Table structure for table exercise_elements -# - -CREATE TABLE prefix_exercise_elements ( - id SERIAL8 PRIMARY KEY, - exerciseid INT8 NOT NULL default '0', - elementno INT NOT NULL default '0', - description text NOT NULL, - scale INT NOT NULL default '0', - maxscore INT NOT NULL default '1', - weight INT NOT NULL default '11' -); -# -------------------------------------------------------- - - -# -# Table structure for table exercise_rubrics -# - -CREATE TABLE prefix_exercise_rubrics ( - id SERIAL8 PRIMARY KEY, - exerciseid INT8 NOT NULL default '0', - elementno INT8 NOT NULL default '0', - rubricno INT NOT NULL default '0', - description text NOT NULL -); - -CREATE INDEX prefix_exercise_rubrics_exerciseid_idx ON prefix_exercise_rubrics (exerciseid); - -# -------------------------------------------------------- - -# -# Table structure for table exercise_grades -# - -CREATE TABLE prefix_exercise_grades ( - id SERIAL8 PRIMARY KEY, - exerciseid INT8 NOT NULL default '0', - assessmentid INT8 NOT NULL default '0', - elementno INT8 NOT NULL default '0', - feedback text NOT NULL default '', - grade INT NOT NULL default '0' -); - -CREATE INDEX prefix_exercise_grades_assessmentid_idx ON prefix_exercise_grades (assessmentid); -CREATE INDEX prefix_exercise_grades_exerciseid_idx ON prefix_exercise_grades (exerciseid); - -# -------------------------------------------------------- - - - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('exercise', 'close', 'exercise', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('exercise', 'open', 'exercise', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('exercise', 'submit', 'exercise', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('exercise', 'view', 'exercise', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('exercise', 'update', 'exercise', 'name'); - diff --git a/mod/forum/db/mysql.sql b/mod/forum/db/mysql.sql deleted file mode 100644 index 549a6cb06b6..00000000000 --- a/mod/forum/db/mysql.sql +++ /dev/null @@ -1,170 +0,0 @@ -# -# Table structure for table `forum` -# - -CREATE TABLE prefix_forum ( - id int(10) unsigned NOT NULL auto_increment, - course int(10) unsigned NOT NULL default '0', - type enum('single','news','general','social','eachuser','teacher','qanda') NOT NULL default 'general', - name varchar(255) NOT NULL default '', - intro text NOT NULL default '', - assessed int(10) unsigned NOT NULL default '0', - assesstimestart int(10) unsigned NOT NULL default '0', - assesstimefinish int(10) unsigned NOT NULL default '0', - scale int(10) NOT NULL default '0', - maxbytes int(10) unsigned NOT NULL default '0', - forcesubscribe tinyint(1) unsigned NOT NULL default '0', - trackingtype tinyint(2) unsigned NOT NULL default '1', - rsstype tinyint(2) unsigned NOT NULL default '0', - rssarticles tinyint(2) unsigned NOT NULL default '0', - timemodified int(10) unsigned NOT NULL default '0', - warnafter int(10) unsigned NOT NULL default '0', - blockafter int(10) unsigned NOT NULL default '0', - blockperiod int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id), - UNIQUE KEY id (id), - KEY course (course) -) COMMENT='Forums contain and structure discussion'; -# -------------------------------------------------------- - -# -# Table structure for table `forum_discussions` -# - -CREATE TABLE prefix_forum_discussions ( - id int(10) unsigned NOT NULL auto_increment, - course int(10) unsigned NOT NULL default '0', - forum int(10) unsigned NOT NULL default '0', - name varchar(255) NOT NULL default '', - firstpost int(10) unsigned NOT NULL default '0', - userid int(10) unsigned NOT NULL default '0', - groupid int(10) NOT NULL default '-1', - assessed tinyint(1) NOT NULL default '1', - timemodified int(10) unsigned NOT NULL default '0', - usermodified int(10) unsigned NOT NULL default '0', - timestart int(10) unsigned NOT NULL default '0', - timeend int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id), - KEY prefix_forum_discussions_forum_idx (forum), - KEY prefix_forum_discussions_userid_idx (userid) -) COMMENT='Forums are composed of discussions'; -# -------------------------------------------------------- - -# -# Table structure for table `forum_posts` -# - -CREATE TABLE prefix_forum_posts ( - id int(10) unsigned NOT NULL auto_increment, - discussion int(10) unsigned NOT NULL default '0', - parent int(10) unsigned NOT NULL default '0', - userid int(10) unsigned NOT NULL default '0', - created int(10) unsigned NOT NULL default '0', - modified int(10) unsigned NOT NULL default '0', - mailed tinyint(2) unsigned NOT NULL default '0', - subject varchar(255) NOT NULL default '', - message text NOT NULL default '', - format tinyint(2) NOT NULL default '0', - attachment VARCHAR(100) NOT NULL default '', - totalscore tinyint(4) NOT NULL default '0', - mailnow int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id), - KEY prefix_forum_posts_parent_idx (parent), - KEY prefix_forum_posts_discussion_idx (discussion), - KEY prefix_forum_posts_userid_idx (userid), - KEY prefix_forum_posts_created_idx (created), - KEY prefix_forum_posts_mailed_idx (mailed) -) COMMENT='All posts are stored in this table'; -# -------------------------------------------------------- - -# -# Table structure for table `forum_queue` -# - -CREATE TABLE prefix_forum_queue ( - id int(10) unsigned NOT NULL auto_increment, - userid int(10) unsigned NOT NULL default 0, - discussionid int(10) unsigned NOT NULL default 0, - postid int(10) unsigned NOT NULL default 0, - PRIMARY KEY (id), - KEY user (userid), - KEY post (postid) -) COMMENT='For keeping track of posts that will be mailed in digest form'; -# -------------------------------------------------------- - -# -# Table structure for table `forum_ratings` -# - -CREATE TABLE prefix_forum_ratings ( - id int(10) unsigned NOT NULL auto_increment, - userid int(10) unsigned NOT NULL default '0', - post int(10) unsigned NOT NULL default '0', - time int(10) unsigned NOT NULL default '0', - rating tinyint(4) NOT NULL default '0', - PRIMARY KEY (id), - KEY userid (userid), - KEY post (post) -) COMMENT='Contains user ratings for individual posts'; -# -------------------------------------------------------- - -# -# Table structure for table `forum_subscriptions` -# - -CREATE TABLE prefix_forum_subscriptions ( - id int(10) unsigned NOT NULL auto_increment, - userid int(10) unsigned NOT NULL default '0', - forum int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id), - UNIQUE KEY id (id), - KEY userid (userid), - KEY forum (forum) -) COMMENT='Keeps track of who is subscribed to what forum'; -# -------------------------------------------------------- - -# -# Table structure for table `forum_read` -# - -CREATE TABLE prefix_forum_read ( - `id` int(10) unsigned NOT NULL auto_increment, - `userid` int(10) NOT NULL default '0', - `forumid` int(10) NOT NULL default '0', - `discussionid` int(10) NOT NULL default '0', - `postid` int(10) NOT NULL default '0', - `firstread` int(10) NOT NULL default '0', - `lastread` int(10) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `prefix_forum_user_forum_idx` (`userid`,`forumid`), - KEY `prefix_forum_user_discussion_idx` (`userid`,`discussionid`), - KEY `prefix_forum_user_post_idx` (`userid`,`postid`) -) COMMENT='Tracks each users read posts'; - -# -# Table structure for table `forum_track_prefs` -# -CREATE TABLE prefix_forum_track_prefs ( - `id` int(10) unsigned NOT NULL auto_increment, - `userid` int(10) NOT NULL default '0', - `forumid` int(10) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `user_forum_idx` (`userid`,`forumid`) -) COMMENT='Tracks each users untracked forums.'; - -# -# Dumping data for table `log_display` -# - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'add', 'forum', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'update', 'forum', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'add discussion', 'forum_discussions', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'add post', 'forum_posts', 'subject'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'update post', 'forum_posts', 'subject'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'user report', 'user', 'CONCAT(firstname,\' \',lastname)'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'move discussion', 'forum_discussions', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'view subscribers', 'forum', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'view discussion', 'forum_discussions', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'view forum', 'forum', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'subscribe', 'forum', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'unsubscribe', 'forum', 'name'); diff --git a/mod/forum/db/postgres7.sql b/mod/forum/db/postgres7.sql deleted file mode 100644 index 37fbe17d215..00000000000 --- a/mod/forum/db/postgres7.sql +++ /dev/null @@ -1,182 +0,0 @@ -# -# Table structure for table `forum` -# - -CREATE TABLE prefix_forum ( - id SERIAL PRIMARY KEY, - course integer NOT NULL default '0', - type varchar(10) CHECK (type IN ('single','news','general','social','eachuser','teacher','qanda')) NOT NULL default 'general', - name varchar(255) NOT NULL default '', - intro text NOT NULL default '', - assessed integer NOT NULL default '0', - assesstimestart integer NOT NULL default '0', - assesstimefinish integer NOT NULL default '0', - scale integer NOT NULL default '0', - maxbytes integer NOT NULL default '0', - forcesubscribe integer NOT NULL default '0', - trackingtype integer NOT NULL default '1', - rsstype integer NOT NULL default '0', - rssarticles integer NOT NULL default '0', - timemodified integer NOT NULL default '0', - warnafter integer NOT NULL default '0', - blockafter integer NOT NULL default '0', - blockperiod integer NOT NULL default '0' -); - -CREATE INDEX prefix_forum_course_idx ON prefix_forum (course); -# -------------------------------------------------------- - -# -# Table structure for table `forum_discussions` -# - -CREATE TABLE prefix_forum_discussions ( - id SERIAL PRIMARY KEY, - course integer NOT NULL default '0', - forum integer NOT NULL default '0', - name varchar(255) NOT NULL default '', - firstpost integer NOT NULL default '0', - userid integer NOT NULL default '0', - groupid integer NOT NULL default '0', - assessed integer NOT NULL default '1', - timemodified integer NOT NULL default '0', - usermodified integer NOT NULL default '0', - timestart integer NOT NULL default '0', - timeend integer NOT NULL default '0' -); - -CREATE INDEX prefix_forum_discussions_forum_idx ON prefix_forum_discussions (forum); -CREATE INDEX prefix_forum_discussions_userid_idx ON prefix_forum_discussions (userid); - -# -------------------------------------------------------- - -# -# Table structure for table `forum_posts` -# - -CREATE TABLE prefix_forum_posts ( - id SERIAL PRIMARY KEY, - discussion integer NOT NULL default '0', - parent integer NOT NULL default '0', - userid integer NOT NULL default '0', - created integer NOT NULL default '0', - modified integer NOT NULL default '0', - mailed integer NOT NULL default '0', - subject varchar(255) NOT NULL default '', - message text NOT NULL default '', - format integer NOT NULL default '0', - attachment VARCHAR(100) NOT NULL default '', - totalscore integer NOT NULL default '0', - mailnow integer NOT NULL default '0' -); - -CREATE INDEX prefix_forum_posts_discussion_idx ON prefix_forum_posts (discussion); -CREATE INDEX prefix_forum_posts_parent_idx ON prefix_forum_posts (parent); -CREATE INDEX prefix_forum_posts_userid_idx ON prefix_forum_posts (userid); -CREATE INDEX prefix_forum_posts_created_idx ON prefix_forum_posts (created); -CREATE INDEX prefix_forum_posts_mailed_idx ON prefix_forum_posts (mailed); - -# -------------------------------------------------------- - -# -# Table structure for table `forum_queue` -# - -CREATE TABLE prefix_forum_queue ( - id SERIAL PRIMARY KEY, - userid integer default 0 NOT NULL, - discussionid integer default 0 NOT NULL, - postid integer default 0 NOT NULL -); - -CREATE INDEX prefix_forum_queue_userid_idx ON prefix_forum_queue (userid); -CREATE INDEX prefix_forum_queue_discussion_idx ON prefix_forum_queue (discussionid); -CREATE INDEX prefix_forum_queue_postid_idx ON prefix_forum_queue (postid); - -# -------------------------------------------------------- - -# -# Table structure for table `forum_ratings` -# - -CREATE TABLE prefix_forum_ratings ( - id SERIAL PRIMARY KEY, - userid integer NOT NULL default '0', - post integer NOT NULL default '0', - time integer NOT NULL default '0', - rating integer NOT NULL default '0' -); - -CREATE INDEX prefix_forum_ratings_userid_idx ON prefix_forum_ratings (userid); -CREATE INDEX prefix_forum_ratings_post_idx ON prefix_forum_ratings (post); - -# -------------------------------------------------------- - -# -# Table structure for table `forum_subscriptions` -# - -CREATE TABLE prefix_forum_subscriptions ( - id SERIAL PRIMARY KEY, - userid integer NOT NULL default '0', - forum integer NOT NULL default '0' -); - -CREATE INDEX prefix_forum_subscriptions_userid_idx ON prefix_forum_subscriptions (userid); -CREATE INDEX prefix_forum_subscriptions_forum_idx ON prefix_forum_subscriptions (forum); - -# -------------------------------------------------------- - - -# -# Table structure for table `forum_read` -# - -CREATE TABLE prefix_forum_read ( - id SERIAL PRIMARY KEY, - userid integer NOT NULL default '0', - forumid integer NOT NULL default '0', - discussionid integer NOT NULL default '0', - postid integer NOT NULL default '0', - firstread integer NOT NULL default '0', - lastread integer NOT NULL default '0' -); - -CREATE INDEX prefix_forum_user_forum_idx ON prefix_forum_read (userid, forumid); -CREATE INDEX prefix_forum_user_discussion_idx ON prefix_forum_read (userid, discussionid); -CREATE INDEX prefix_forum_user_post_idx ON prefix_forum_read (userid, postid); - - -# -------------------------------------------------------- - - -# -# Table structure for table `forum_track_prefs` -# - -CREATE TABLE prefix_forum_track_prefs ( - id SERIAL PRIMARY KEY, - userid integer NOT NULL default '0', - forumid integer NOT NULL default '0' -); - -CREATE INDEX prefix_forum_track_user_forum_idx ON prefix_forum_track_prefs (userid, forumid); - - -# -------------------------------------------------------- -# -# Dumping data for table `log_display` -# - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'add', 'forum', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'update', 'forum', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'add discussion', 'forum_discussions', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'add post', 'forum_posts', 'subject'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'update post', 'forum_posts', 'subject'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'user report', 'user', 'firstname||\' \'||lastname'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'move discussion', 'forum_discussions', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'view subscribers', 'forum', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'view discussion', 'forum_discussions', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'view forum', 'forum', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'subscribe', 'forum', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'unsubscribe', 'forum', 'name'); diff --git a/mod/glossary/db/mysql.sql b/mod/glossary/db/mysql.sql deleted file mode 100644 index a4c7bbf53a1..00000000000 --- a/mod/glossary/db/mysql.sql +++ /dev/null @@ -1,165 +0,0 @@ -# This file contains a complete database schema for all the -# tables used by this module, written in SQL - -# It may also contain INSERT statements for particular data -# that may be used, especially new entries in the table log_display - -# -# Table structure for table `glossary` -# - -CREATE TABLE prefix_glossary ( - id int(10) unsigned NOT NULL auto_increment, - course int(10) unsigned NOT NULL default '0', - name varchar(255) NOT NULL default '', - intro text NOT NULL default '', - studentcanpost tinyint(2) unsigned NOT NULL default '0', - allowduplicatedentries tinyint(2) unsigned NOT NULL default '0', - displayformat varchar(50) NOT NULL default 'dictionary', - mainglossary tinyint(2) unsigned NOT NULL default '0', - showspecial tinyint(2) unsigned NOT NULL default '1', - showalphabet tinyint(2) unsigned NOT NULL default '1', - showall tinyint(2) unsigned NOT NULL default '1', - allowcomments tinyint(2) unsigned NOT NULL default '0', - allowprintview tinyint(2) unsigned NOT NULL default '1', - usedynalink tinyint(2) unsigned NOT NULL default '1', - defaultapproval tinyint(2) unsigned NOT NULL default '1', - globalglossary tinyint(2) unsigned NOT NULL default '0', - entbypage tinyint(3) unsigned NOT NULL default '10', - editalways tinyint(2) unsigned NOT NULL default '0', - rsstype tinyint(2) unsigned NOT NULL default '0', - rssarticles tinyint(2) unsigned NOT NULL default '0', - assessed int(10) unsigned NOT NULL default '0', - assesstimestart int(10) unsigned NOT NULL default '0', - assesstimefinish int(10) unsigned NOT NULL default '0', - scale int(10) NOT NULL default '0', - timecreated int(10) unsigned NOT NULL default '0', - timemodified int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id), - KEY course (course) -) TYPE=MyISAM COMMENT='all glossaries'; - -# -# Table structure for table `glossary_entries` -# - -CREATE TABLE prefix_glossary_entries ( - id int(10) unsigned NOT NULL auto_increment, - glossaryid int(10) unsigned NOT NULL default '0', - userid int(10) unsigned NOT NULL default '0', - concept varchar(255) NOT NULL default '', - definition text NOT NULL default '', - format tinyint(2) unsigned NOT NULL default '0', - attachment VARCHAR(100) NOT NULL default '', - timecreated int(10) unsigned NOT NULL default '0', - timemodified int(10) unsigned NOT NULL default '0', - teacherentry tinyint(2) unsigned NOT NULL default '0', - sourceglossaryid int(10) unsigned NOT NULL default '0', - usedynalink tinyint(2) unsigned NOT NULL default '1', - casesensitive tinyint(2) unsigned NOT NULL default '0', - fullmatch tinyint(2) unsigned NOT NULL default '1', - approved tinyint(2) unsigned NOT NULL default '1', - PRIMARY KEY (id), - KEY glossaryid (glossaryid), - KEY userid (userid), - KEY concept (concept) -) TYPE=MyISAM COMMENT='all glossary entries'; - -# -# Table structure for table `glossary_alias` -# - -CREATE TABLE prefix_glossary_alias ( - id int(10) unsigned NOT NULL auto_increment, - entryid int(10) unsigned NOT NULL default '0', - alias varchar(255) NOT NULL default '', - PRIMARY KEY (id), - KEY entryid (entryid) -) TYPE=MyISAM COMMENT='entries alias'; - -# -# Table structure for table `glossary_cageories` -# - -CREATE TABLE prefix_glossary_categories ( - id int(10) unsigned NOT NULL auto_increment, - glossaryid int(10) unsigned NOT NULL default '0', - name varchar(255) NOT NULL default '', - usedynalink tinyint(2) unsigned NOT NULL default '1', - PRIMARY KEY (id), - KEY glossaryid (glossaryid) -) TYPE=MyISAM COMMENT='all categories for glossary entries'; - -# -# Table structure for table `glossary_entries_category` -# - -CREATE TABLE prefix_glossary_entries_categories ( - id int(10) unsigned NOT NULL auto_increment, - categoryid int(10) unsigned NOT NULL default '0', - entryid int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id), - KEY entryid (entryid), - KEY categoryid (categoryid) -) TYPE=MyISAM COMMENT='categories of each glossary entry'; - -CREATE TABLE prefix_glossary_comments ( - id int(10) unsigned NOT NULL auto_increment, - entryid int(10) unsigned NOT NULL default '0', - userid int(10) unsigned NOT NULL default '0', - entrycomment text NOT NULL default '', - format tinyint(2) unsigned NOT NULL default '0', - timemodified int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id), - KEY userid (userid), - KEY entryid (entryid) -) TYPE=MyISAM COMMENT='comments on glossary entries'; - -CREATE TABLE prefix_glossary_formats ( - id int(10) unsigned NOT NULL auto_increment, - name varchar(50) NOT NULL default '', - popupformatname varchar(50) NOT NULL default '', - visible tinyint(2) unsigned NOT NULL default '1', - showgroup tinyint(2) unsigned NOT NULL default '1', - defaultmode varchar(50) NOT NULL default '', - defaulthook varchar(50) NOT NULL default '', - sortkey varchar(50) NOT NULL default '', - sortorder varchar(50) NOT NULL default '', - PRIMARY KEY (id) -) TYPE=MyISAM COMMENT='Setting of the display formats'; - -# -# Table structure for table `forum_ratings` -# - -CREATE TABLE prefix_glossary_ratings ( - id int(10) unsigned NOT NULL auto_increment, - userid int(10) unsigned NOT NULL default '0', - entryid int(10) unsigned NOT NULL default '0', - time int(10) unsigned NOT NULL default '0', - rating tinyint(4) NOT NULL default '0', - PRIMARY KEY (id), - KEY userid (userid), - KEY entryid (entryid) -) COMMENT='Contains user ratings for entries'; -# -------------------------------------------------------- - -# -# Dumping data for table `log_display` -# - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'add', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'update', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'view', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'view all', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'add entry', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'update entry', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'add category', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'update category', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'delete category', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'add comment', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'update comment', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'delete comment', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'approve entry', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'view entry', 'glossary_entries', 'concept'); - diff --git a/mod/glossary/db/postgres7.sql b/mod/glossary/db/postgres7.sql deleted file mode 100644 index 2ae6bbd26ab..00000000000 --- a/mod/glossary/db/postgres7.sql +++ /dev/null @@ -1,180 +0,0 @@ -# This file contains a complete database schema for all the -# tables used by this module, written in SQL - -# It may also contain INSERT statements for particular data -# that may be used, especially new entries in the table log_display - -# -# Table structure for table `glossary` -# - -CREATE TABLE prefix_glossary ( - id SERIAL, - course int4 NOT NULL default '0', - name varchar(255) NOT NULL default '', - intro text NOT NULL default '', - studentcanpost int2 NOT NULL default '0', - allowduplicatedentries int2 NOT NULL default '0', - displayformat varchar(50) NOT NULL default 'dictionary', - mainglossary int2 NOT NULL default '0', - showspecial int2 NOT NULL default '1', - showalphabet int2 NOT NULL default '1', - showall int2 NOT NULL default '1', - allowcomments int2 NOT NULL default '0', - allowprintview int2 NOT NULL default '1', - usedynalink int2 NOT NULL default '1', - defaultapproval int2 NOT NULL default '1', - globalglossary int2 NOT NULL default '0', - entbypage int NOT NULL default '10', - editalways integer NOT NULL default '0', - rsstype integer NOT NULL default '0', - rssarticles integer NOT NULL default '0', - assessed int4 NOT NULL default '0', - assesstimestart int4 NOT NULL default '0', - assesstimefinish int4 NOT NULL default '0', - scale int4 NOT NULL default '0', - timecreated int4 NOT NULL default '0', - timemodified int4 NOT NULL default '0', - PRIMARY KEY (id) -); - -CREATE INDEX prefix_glossary_course_idx ON prefix_glossary (course); - - -# -# Table structure for table `glossary_entries` -# - -CREATE TABLE prefix_glossary_entries ( - id SERIAL, - glossaryid int4 NOT NULL default '0', - userid int4 NOT NULL default '0', - concept varchar(255) NOT NULL default '', - definition text NOT NULL, - format int2 NOT NULL default '0', - attachment VARCHAR(100) NOT NULL default '', - timecreated int4 NOT NULL default '0', - timemodified int4 NOT NULL default '0', - teacherentry int2 NOT NULL default '0', - sourceglossaryid int4 NOT NULL default '0', - usedynalink int2 NOT NULL default '1', - casesensitive int2 NOT NULL default '0', - fullmatch int2 NOT NULL default '1', - approved int2 NOT NULL default '1', - PRIMARY KEY(id) -); - -CREATE INDEX prefix_glossary_entries_glossaryid_idx ON prefix_glossary_entries (glossaryid); -CREATE INDEX prefix_glossary_entries_userid_idx ON prefix_glossary_entries (userid); -CREATE INDEX prefix_glossary_entries_concept_idx ON prefix_glossary_entries (concept); - -# -# Table structure for table `glossary_cageories` -# - -CREATE TABLE prefix_glossary_categories ( - id SERIAL, - glossaryid int4 NOT NULL default '0', - name varchar(255) NOT NULL default '', - usedynalink int2 NOT NULL default '1', - PRIMARY KEY (id) -); - -CREATE INDEX prefix_glossary_categories_glossaryid_idx ON prefix_glossary_categories (glossaryid); - -# -# Table structure for table `glossary_alias` -# - -CREATE TABLE prefix_glossary_alias ( - id SERIAL, - entryid int4 NOT NULL default '0', - alias varchar(255) NOT NULL, - PRIMARY KEY (id) -); - -CREATE INDEX prefix_glossary_alias_entryid_idx ON prefix_glossary_alias (entryid); - -# -# Table structure for table `glossary_entries_category` -# - -CREATE TABLE prefix_glossary_entries_categories ( - id SERIAL, - categoryid int4 NOT NULL default '0', - entryid int4 NOT NULL default '0', - PRIMARY KEY (id) -); - -CREATE INDEX prefix_glossary_entries_categories_category_idx ON prefix_glossary_entries_categories (categoryid); -CREATE INDEX prefix_glossary_entries_categories_entryid_idx ON prefix_glossary_entries_categories (entryid); - -# -# Table structure for table `glossary_comments` -# - -CREATE TABLE prefix_glossary_comments ( - id SERIAL, - entryid int4 NOT NULL default '0', - userid int4 NOT NULL default '0', - entrycomment text NOT NULL, - format int2 NOT NULL default '0', - timemodified int4 NOT NULL default '0', - PRIMARY KEY (id) -); - -CREATE INDEX prefix_glossary_comments_entryid_idx ON prefix_glossary_comments (entryid); -CREATE INDEX prefix_glossary_comments_userid_idx ON prefix_glossary_comments (userid); - -# -# Table structure for table `glossary_formats` -# - -CREATE TABLE prefix_glossary_formats ( - id SERIAL, - name varchar(50) NOT NULL, - popupformatname varchar(50) NOT NULL, - visible int2 NOT NULL default '1', - showgroup int2 NOT NULL default '1', - defaultmode varchar(50) NOT NULL default '', - defaulthook varchar(50) NOT NULL default '', - sortkey varchar(50) NOT NULL default '', - sortorder varchar(50) NOT NULL default '', - PRIMARY KEY (id) -); - - -# -# Table structure for table `glossary_ratings` -# - -CREATE TABLE prefix_glossary_ratings ( - id SERIAL, - userid int4 NOT NULL default '0', - entryid int4 NOT NULL default '0', - time int4 NOT NULL default '0', - rating int4 NOT NULL default '0', - PRIMARY KEY (id) -); - -CREATE INDEX prefix_glossary_ratings_userid_idx ON prefix_glossary_ratings (userid); -CREATE INDEX prefix_glossary_ratings_entryid_idx ON prefix_glossary_ratings (entryid); - -# -# Dumping data for table `log_display` -# - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'add', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'update', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'view', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'view all', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'add entry', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'update entry', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'add category', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'update category', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'delete category', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'add comment', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'update comment', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'delete comment', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'approve entry', 'glossary', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('glossary', 'view entry', 'glossary_entries', 'concept'); diff --git a/mod/hotpot/db/mysql.sql b/mod/hotpot/db/mysql.sql deleted file mode 100644 index eb2725b6c43..00000000000 --- a/mod/hotpot/db/mysql.sql +++ /dev/null @@ -1,103 +0,0 @@ -# -# Table structure for table `hotpot` -# -CREATE TABLE prefix_hotpot ( - id int(10) unsigned NOT NULL auto_increment, - course int(10) unsigned NOT NULL default '0', - name varchar(255) NOT NULL default '', - summary text NOT NULL default '', - timeopen int(10) unsigned NOT NULL default '0', - timeclose int(10) unsigned NOT NULL default '0', - location int(4) unsigned NOT NULL default '0', - reference varchar(255) NOT NULL default '', - outputformat int(4) unsigned NOT NULL default '1', - navigation int(4) unsigned NOT NULL default '1', - studentfeedback tinyint(4) unsigned NOT NULL default '0', - studentfeedbackurl varchar(255) NOT NULL default '', - forceplugins int(4) unsigned NOT NULL default '0', - shownextquiz int(4) unsigned NOT NULL default '0', - review tinyint(4) NOT NULL default '0', - grade int(10) NOT NULL default '0', - grademethod tinyint(4) NOT NULL default '1', - attempts smallint(6) NOT NULL default '0', - password varchar(255) NOT NULL default '', - subnet varchar(255) NOT NULL default '', - clickreporting tinyint(4) unsigned NOT NULL default '0', - timecreated int(10) unsigned NOT NULL default '0', - timemodified int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id) -) TYPE=MyISAM COMMENT='details about Hot Potatoes quizzes'; -# -# Table structure for table `hotpot_attempts` -# -CREATE TABLE prefix_hotpot_attempts ( - id int(10) unsigned NOT NULL auto_increment, - hotpot int(10) unsigned NOT NULL default '0', - userid int(10) unsigned NOT NULL default '0', - starttime int(10) unsigned NOT NULL default '0', - endtime int(10) unsigned NOT NULL default '0', - score int(6) unsigned NOT NULL default '0', - penalties int(6) unsigned NOT NULL default '0', - attempt int(6) unsigned NOT NULL default '0', - timestart int(10) unsigned NOT NULL default '0', - timefinish int(10) unsigned NOT NULL default '0', - status tinyint(4) unsigned NOT NULL default '1', - clickreportid int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id), - KEY hotpot_attempts_hotpot_idx (hotpot), - KEY hotpot_attempts_userid_idx (userid) -) TYPE=MyISAM COMMENT='details about Hot Potatoes quiz attempts'; -# -# Table structure for table `hotpot_details` -# -CREATE TABLE prefix_hotpot_details ( - id int(10) unsigned NOT NULL auto_increment, - attempt int(10) unsigned NOT NULL default '0', - details text default '', - PRIMARY KEY (id), - KEY hotpot_details_attempt_idx (attempt) -) TYPE=MyISAM COMMENT='raw details (as XML) of Hot Potatoes quiz attempts'; -# -# Table structure for table `hotpot_questions` -# -CREATE TABLE prefix_hotpot_questions ( - id int(10) unsigned NOT NULL auto_increment, - name text NOT NULL default '', - type tinyint(4) unsigned NOT NULL default '0', - text int(10) unsigned NOT NULL default '0', - hotpot int(10) unsigned NOT NULL default '0', - md5key varchar(32) NOT NULL default '', - PRIMARY KEY (id), - KEY hotpot_questions_hotpot_idx (hotpot), - KEY hotpot_questions_md5key_idx (md5key) -) TYPE=MyISAM COMMENT='details about questions in Hot Potatoes quiz attempts'; -# -# Table structure for table `hotpot_responses` -# -CREATE TABLE prefix_hotpot_responses ( - id int(10) unsigned NOT NULL auto_increment, - attempt int(10) unsigned NOT NULL default '0', - question int(10) unsigned NOT NULL default '0', - score smallint(6) NOT NULL default '0', - weighting smallint(6) NOT NULL default '0', - correct varchar(255) NOT NULL default '', - wrong varchar(255) NOT NULL default '', - ignored varchar(255) NOT NULL default '', - hints smallint(6) unsigned NOT NULL default '0', - clues smallint(6) unsigned NOT NULL default '0', - checks smallint(6) unsigned NOT NULL default '0', - PRIMARY KEY (id), - KEY hotpot_responses_attempt_idx (attempt), - KEY hotpot_responses_question_idx (question) -) TYPE=MyISAM COMMENT='details about responses in Hot Potatoes quiz attempts'; -# -# Table structure for table `hotpot_strings` -# -CREATE TABLE prefix_hotpot_strings ( - id int(10) unsigned NOT NULL auto_increment, - string text NOT NULL default '', - md5key varchar(32) NOT NULL default '', - PRIMARY KEY (id), - KEY hotpot_strings_md5key_idx (md5key) -) TYPE=MyISAM COMMENT='strings used in Hot Potatoes questions and responses'; - diff --git a/mod/hotpot/db/postgres7.sql b/mod/hotpot/db/postgres7.sql deleted file mode 100644 index b2fbffd96ea..00000000000 --- a/mod/hotpot/db/postgres7.sql +++ /dev/null @@ -1,118 +0,0 @@ -# -# Table structure for table `hotpot` -# - -CREATE TABLE prefix_hotpot ( - id SERIAL PRIMARY KEY, - course INT4 NOT NULL default '0', - name VARCHAR(255) NOT NULL default '', - summary TEXT, - timeopen INT4 NOT NULL default '0', - timeclose INT4 NOT NULL default '0', - location INT2 NOT NULL default '0', - reference VARCHAR(255) NOT NULL default '', - outputformat INT2 NOT NULL default '1', - navigation INT2 NOT NULL default '1', - studentfeedback INT2 NOT NULL default '0', - studentfeedbackurl VARCHAR(255) NOT NULL default '', - forceplugins INT2 NOT NULL default '0', - shownextquiz INT2 NOT NULL default '0', - review INT2 NOT NULL default '0', - grade INT4 NOT NULL default '0', - grademethod INT2 NOT NULL default '1', - attempts INT2 NOT NULL default '0', - password VARCHAR(255) NOT NULL default '', - subnet VARCHAR(255) NOT NULL default '', - clickreporting INT2 NOT NULL default '0', - timecreated INT4 NOT NULL default '0', - timemodified INT4 NOT NULL default '0' -); -COMMENT ON TABLE prefix_hotpot IS 'details about Hot Potatoes quizzes'; - -# -# Table structure for table `hotpot_attempts` -# - -CREATE TABLE prefix_hotpot_attempts ( - id SERIAL PRIMARY KEY, - hotpot INT4 NOT NULL default '0', - userid INT4 NOT NULL default '0', - starttime INT4 NOT NULL default '0', - endtime INT4 NOT NULL default '0', - score INT2 NOT NULL default '0', - penalties INT2 NOT NULL default '0', - attempt INT2 NOT NULL default '0', - timestart INT4 NOT NULL default '0', - timefinish INT4 NOT NULL default '0', - status INT2 NOT NULL default '1', - clickreportid INT4 NOT NULL default '0' -); -COMMENT ON TABLE prefix_hotpot IS 'details about Hot Potatoes quiz attempts'; - -CREATE INDEX prefix_hotpot_attempts_hotpot_idx ON prefix_hotpot_attempts (hotpot); -CREATE INDEX prefix_hotpot_attempts_userid_idx ON prefix_hotpot_attempts (userid); - -# -# Table structure for table `prefix_hotpot_details` -# - -CREATE TABLE prefix_hotpot_details ( - id SERIAL PRIMARY KEY, - attempt INT4 NOT NULL default '0', - details TEXT NOT NULL default '' -); -COMMENT ON TABLE prefix_hotpot_details IS 'raw details (as XML) of Hot Potatoes quiz attempts'; - -CREATE INDEX prefix_hotpot_details_attempt_idx ON prefix_hotpot_details (attempt); - -# -# Table structure for table `hotpot_questions` -# - -CREATE TABLE prefix_hotpot_questions ( - id SERIAL PRIMARY KEY, - name TEXT NOT NULL default '', - type INT2 NOT NULL default '0', - text INT4 NOT NULL default '0', - hotpot INT4 NOT NULL default '0', - md5key VARCHAR(32) NOT NULL default '' -); -COMMENT ON TABLE prefix_hotpot_questions IS 'details about questions in Hot Potatoes quiz attempts'; - -CREATE INDEX prefix_hotpot_questions_hotpot_idx ON prefix_hotpot_questions (hotpot); -CREATE INDEX prefix_hotpot_questions_md5key_idx ON prefix_hotpot_questions (md5key); - -# -# Table structure for table `hotpot_responses` -# - -CREATE TABLE prefix_hotpot_responses ( - id SERIAL PRIMARY KEY, - attempt INT4 NOT NULL default '0', - question INT4 NOT NULL default '0', - score INT2 NOT NULL default '0', - weighting INT2 NOT NULL default '0', - correct VARCHAR(255) NOT NULL default '', - wrong VARCHAR(255) NOT NULL default '', - ignored VARCHAR(255) NOT NULL default '', - hints INT2 NOT NULL default '0', - clues INT2 NOT NULL default '0', - checks INT2 NOT NULL default '0' -); -COMMENT ON TABLE prefix_hotpot_responses IS 'details about responses in Hot Potatoes quiz attempts'; - -CREATE INDEX prefix_hotpot_responses_attempt_idx ON prefix_hotpot_responses (attempt); -CREATE INDEX prefix_hotpot_responses_question_idx ON prefix_hotpot_responses (question); - -# -# Table structure for table `hotpot_strings` -# - -CREATE TABLE prefix_hotpot_strings ( - id SERIAL PRIMARY KEY, - string TEXT NOT NULL default '', - md5key VARCHAR(32) NOT NULL default '' -); -COMMENT ON TABLE prefix_hotpot_strings IS 'strings used in Hot Potatoes questions and responses'; - -CREATE INDEX prefix_hotpot_strings_md5key_idx ON prefix_hotpot_strings (md5key); diff --git a/mod/journal/db/mysql.sql b/mod/journal/db/mysql.sql deleted file mode 100755 index af95f2149e0..00000000000 --- a/mod/journal/db/mysql.sql +++ /dev/null @@ -1,59 +0,0 @@ -# phpMyAdmin MySQL-Dump -# version 2.2.1 -# http://phpwizard.net/phpMyAdmin/ -# http://phpmyadmin.sourceforge.net/ (download page) -# -# Host: localhost -# Generation Time: Nov 14, 2001 at 04:44 PM -# Server version: 3.23.36 -# PHP Version: 4.0.6 -# Database : `moodle` -# -------------------------------------------------------- - -# -# Table structure for table `journal` -# - -CREATE TABLE prefix_journal ( - id int(10) unsigned NOT NULL auto_increment, - course int(10) unsigned NOT NULL default '0', - name varchar(255) NOT NULL default '', - intro text NOT NULL default '', - introformat tinyint(2) NOT NULL default '0', - days smallint(5) unsigned NOT NULL default '7', - assessed int(10) NOT NULL default '0', - timemodified int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id), - KEY course (course) -) TYPE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `journal_entries` -# - -CREATE TABLE prefix_journal_entries ( - id int(10) unsigned NOT NULL auto_increment, - journal int(10) unsigned NOT NULL default '0', - userid int(10) unsigned NOT NULL default '0', - modified int(10) unsigned NOT NULL default '0', - text text NOT NULL default '', - format tinyint(2) NOT NULL default '0', - rating int(10) default '0', - entrycomment text default '', - teacher int(10) unsigned NOT NULL default '0', - timemarked int(10) unsigned NOT NULL default '0', - mailed int(1) unsigned NOT NULL default '0', - PRIMARY KEY (id), - KEY journal (journal), - KEY userid (userid) -) TYPE=MyISAM COMMENT='All the journal entries of all people'; - -# -# Dumping data for table `log_display` -# - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('journal', 'view', 'journal', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('journal', 'add entry', 'journal', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('journal', 'update entry', 'journal', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('journal', 'view responses', 'journal', 'name'); diff --git a/mod/journal/db/postgres7.sql b/mod/journal/db/postgres7.sql deleted file mode 100755 index 5eeb51baf5b..00000000000 --- a/mod/journal/db/postgres7.sql +++ /dev/null @@ -1,60 +0,0 @@ -# phpMyAdmin MySQL-Dump -# version 2.2.1 -# http://phpwizard.net/phpMyAdmin/ -# http://phpmyadmin.sourceforge.net/ (download page) -# -# Host: localhost -# Generation Time: Nov 14, 2001 at 04:44 PM -# Server version: 3.23.36 -# PHP Version: 4.0.6 -# Database : `moodle` -# -------------------------------------------------------- - -# -# Table structure for table `journal` -# - -CREATE TABLE prefix_journal ( - id SERIAL PRIMARY KEY, - course integer NOT NULL default '0', - name varchar(255) default NULL, - intro text, - introformat integer NOT NULL default '0', - days integer NOT NULL default '7', - assessed integer NOT NULL default '0', - timemodified integer NOT NULL default '0' -); - -CREATE INDEX prefix_journal_course_idx ON prefix_journal (course); - -# -------------------------------------------------------- - -# -# Table structure for table `journal_entries` -# - -CREATE TABLE prefix_journal_entries ( - id SERIAL PRIMARY KEY, - journal integer NOT NULL default '0', - userid integer NOT NULL default '0', - modified integer NOT NULL default '0', - text text NOT NULL default '', - format integer NOT NULL default '0', - rating integer default '0', - entrycomment text, - teacher integer NOT NULL default '0', - timemarked integer NOT NULL default '0', - mailed integer NOT NULL default '0' -); - -CREATE INDEX prefix_journal_entries_journal_idx ON prefix_journal_entries (journal); -CREATE INDEX prefix_journal_entries_userid_idx ON prefix_journal_entries (userid); - -# -# Dumping data for table `log_display` -# - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('journal', 'view', 'journal', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('journal', 'add entry', 'journal', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('journal', 'update entry', 'journal', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('journal', 'view responses', 'journal', 'name'); diff --git a/mod/label/db/mysql.sql b/mod/label/db/mysql.sql deleted file mode 100644 index cbbce05e3c9..00000000000 --- a/mod/label/db/mysql.sql +++ /dev/null @@ -1,12 +0,0 @@ -CREATE TABLE `prefix_label` ( - `id` int(10) unsigned NOT NULL auto_increment, - `course` int(10) unsigned NOT NULL default '0', - `name` varchar(255) NOT NULL default '', - `content` text NOT NULL default '', - `timemodified` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - KEY course (course) -) COMMENT='Defines labels'; - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('label', 'add', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('label', 'update', 'quiz', 'name'); diff --git a/mod/label/db/postgres7.sql b/mod/label/db/postgres7.sql deleted file mode 100644 index e01f359300d..00000000000 --- a/mod/label/db/postgres7.sql +++ /dev/null @@ -1,12 +0,0 @@ -CREATE TABLE prefix_label ( - id SERIAL PRIMARY KEY, - course integer NOT NULL default '0', - name varchar(255) default NULL, - content text, - timemodified integer NOT NULL default '0' -); - -CREATE INDEX prefix_label_course_idx ON prefix_label (course); - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('label', 'add', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('label', 'update', 'quiz', 'name'); diff --git a/mod/lams/db/mysql.sql b/mod/lams/db/mysql.sql deleted file mode 100644 index 1514bd4e844..00000000000 --- a/mod/lams/db/mysql.sql +++ /dev/null @@ -1,17 +0,0 @@ -# This file contains a complete database schema for all the -# tables used by this module, written in SQL - -# It may also contain INSERT statements for particular data -# that may be used, especially new entries in the table log_display - -CREATE TABLE prefix_lams ( - id int(10) unsigned NOT NULL auto_increment, - course int(10) unsigned NOT NULL default '0', - name varchar(255) NOT NULL default '', - introduction text NOT NULL default '', - learning_session_id bigint(20) default '0', - timemodified int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id), - KEY course (course) -)COMMENT='LAMS activity'; - diff --git a/mod/lams/db/postgres7.sql b/mod/lams/db/postgres7.sql deleted file mode 100644 index 15bba367cb1..00000000000 --- a/mod/lams/db/postgres7.sql +++ /dev/null @@ -1,17 +0,0 @@ -# This file contains a complete database schema for all the -# tables used by this module, written in SQL - -# It may also contain INSERT statements for particular data -# that may be used, especially new entries in the table log_display - -CREATE TABLE prefix_lams ( - id SERIAL PRIMARY KEY, - course integer NOT NULL default '0', - name varchar(255) NOT NULL default '', - introduction text NOT NULL default '', - learning_session_id integer NOT NULL default '0', - timemodified integer NOT NULL default '0' -); - -CREATE INDEX prefix_lams_course_idx ON prefix_lams (course); - diff --git a/mod/lesson/db/mysql.sql b/mod/lesson/db/mysql.sql deleted file mode 100644 index 81b026c450f..00000000000 --- a/mod/lesson/db/mysql.sql +++ /dev/null @@ -1,192 +0,0 @@ -# This file contains a complete database schema for all the -# tables used by the mlesson module, written in SQL - -# It may also contain INSERT statements for particular data -# that may be used, especially new entries in the table log_display - -CREATE TABLE `prefix_lesson` ( - `id` int(10) unsigned NOT NULL auto_increment, - `course` int(10) unsigned NOT NULL default '0', - `name` varchar(255) NOT NULL default '', - `practice` TINYINT(3) UNSIGNED NOT NULL default '0', - `modattempts` TINYINT(3) UNSIGNED NOT NULL default '0', - `usepassword` TINYINT(3) UNSIGNED NOT NULL default '0', - `password` VARCHAR(32) NOT NULL default '', - `dependency` int(10) unsigned NOT NULL default '0', - `conditions` text NOT NULL default '', - `grade` tinyint(3) NOT NULL default '0', - `custom` TINYINT(3) UNSIGNED NOT NULL default '0', - `ongoing` TINYINT(3) UNSIGNED NOT NULL default '0', - `usemaxgrade` tinyint(3) NOT NULL default '0', - `maxanswers` int(3) unsigned NOT NULL default '4', - `maxattempts` int(3) unsigned NOT NULL default '5', - `review` TINYINT(3) UNSIGNED NOT NULL default '0', - `nextpagedefault` int(3) unsigned NOT NULL default '0', - `feedback` int(3) unsigned NOT NULL default '1', - `minquestions` int(3) unsigned NOT NULL default '0', - `maxpages` int(3) unsigned NOT NULL default '0', - `timed` TINYINT(3) UNSIGNED NOT NULL default '0', - `maxtime` INT(10) UNSIGNED NOT NULL default '0', - `retake` int(3) unsigned NOT NULL default '1', - `activitylink` INT(10) UNSIGNED NOT NULL default '0', - `mediafile` varchar(255) NOT NULL default '', - `mediaheight` INT(10) UNSIGNED NOT NULL DEFAULT '100', - `mediawidth` INT(10) UNSIGNED NOT NULL DEFAULT '650', - `mediaclose` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', - `slideshow` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', - `width` INT(10) UNSIGNED NOT NULL DEFAULT '640', - `height` INT(10) UNSIGNED NOT NULL DEFAULT '480', - `bgcolor` CHAR(7) NOT NULL DEFAULT '#FFFFFF', - `displayleft` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', - `displayleftif` INT(3) UNSIGNED NOT NULL DEFAULT '0', - `progressbar` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', - `highscores` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', - `maxhighscores` INT(10) UNSIGNED NOT NULL DEFAULT '0', - `available` int(10) unsigned NOT NULL default '0', - `deadline` int(10) unsigned NOT NULL default '0', - `timemodified` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `course` (`course`) -) COMMENT='Defines lesson'; -# -------------------------------------------------------- - -CREATE TABLE `prefix_lesson_pages` ( - `id` int(10) unsigned NOT NULL auto_increment, - `lessonid` int(10) unsigned NOT NULL default '0', - `prevpageid` int(10) unsigned NOT NULL default '0', - `nextpageid` int(10) unsigned NOT NULL default '0', - `qtype` tinyint(3) unsigned NOT NULL default '0', - `qoption` tinyint(3) unsigned NOT NULL default '0', - `layout` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1', - `display` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1', - `timecreated` int(10) unsigned NOT NULL default '0', - `timemodified` int(10) unsigned NOT NULL default '0', - `title` varchar(255) NOT NULL default '', - `contents` text NOT NULL default '', - PRIMARY KEY (`id`), - KEY `lessonid` (`lessonid`) -) COMMENT='Defines lesson_pages'; -# -------------------------------------------------------- - -CREATE TABLE `prefix_lesson_answers` ( - `id` int(10) unsigned NOT NULL auto_increment, - `lessonid` int(10) unsigned NOT NULL default '0', - `pageid` int(10) unsigned NOT NULL default '0', - `jumpto` int(11) NOT NULL default '0', - `grade` tinyint(3) unsigned NOT NULL default '0', - `score` INT(10) NOT NULL DEFAULT '0', - `flags` tinyint(3) unsigned NOT NULL default '0', - `timecreated` int(10) unsigned NOT NULL default '0', - `timemodified` int(10) unsigned NOT NULL default '0', - `answer` text NOT NULL default '', - `response` text NOT NULL default '', - PRIMARY KEY (`id`), - KEY (`pageid`), - KEY `lessonid` (`lessonid`) -) COMMENT='Defines lesson_answers'; -# -------------------------------------------------------- - -CREATE TABLE `prefix_lesson_attempts` ( - `id` int(10) unsigned NOT NULL auto_increment, - `lessonid` int(10) unsigned NOT NULL default '0', - `pageid` int(10) unsigned NOT NULL default '0', - `userid` int(10) unsigned NOT NULL default '0', - `answerid` int(10) unsigned NOT NULL default '0', - `retry` int(3) unsigned NOT NULL default '0', - `correct` int(10) unsigned NOT NULL default '0', - `useranswer` text NOT NULL default '', - `timeseen` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - KEY (`userid`), - KEY `lessonid` (`lessonid`), - KEY `pageid` (`pageid`) -) COMMENT='Defines lesson_attempts'; -# -------------------------------------------------------- - -CREATE TABLE `prefix_lesson_grades` ( - `id` int(10) unsigned NOT NULL auto_increment, - `lessonid` int(10) unsigned NOT NULL default '0', - `userid` int(10) unsigned NOT NULL default '0', - `grade` float unsigned NOT NULL default '0', - `late` int(3) unsigned NOT NULL default '0', - `completed` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `lessonid` (`lessonid`), - KEY `userid` (`userid`) -) COMMENT='Defines lesson_grades'; -# -------------------------------------------------------- - -CREATE TABLE `prefix_lesson_default` - ( `id` int(10) unsigned NOT NULL auto_increment, - `course` int(10) unsigned NOT NULL default '0', - `practice` tinyint(3) unsigned NOT NULL default '0', - `modattempts` tinyint(3) unsigned NOT NULL default '0', - `usepassword` int(3) unsigned NOT NULL default '0', - `password` varchar(32) NOT NULL default '', - `conditions` text NOT NULL default '', - `grade` tinyint(3) NOT NULL default '0', - `custom` int(3) unsigned NOT NULL default '0', - `ongoing` int(3) unsigned NOT NULL default '0', - `usemaxgrade` tinyint(3) unsigned NOT NULL default '0', - `maxanswers` int(3) unsigned NOT NULL default '4', - `maxattempts` int(3) unsigned NOT NULL default '5', - `review` tinyint(3) unsigned NOT NULL default '0', - `nextpagedefault` int(3) unsigned NOT NULL default '0', - `feedback` int(3) unsigned NOT NULL default '1', - `minquestions` tinyint(3) unsigned NOT NULL default '0', - `maxpages` int(3) unsigned NOT NULL default '0', - `timed` int(3) unsigned NOT NULL default '0', - `maxtime` int(10) unsigned NOT NULL default '0', - `retake` int(3) unsigned NOT NULL default '1', - `mediaheight` INT(10) UNSIGNED NOT NULL DEFAULT '100', - `mediawidth` INT(10) UNSIGNED NOT NULL DEFAULT '650', - `mediaclose` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', - `slideshow` int(3) unsigned NOT NULL default '0', - `width` int(10) unsigned NOT NULL default '640', - `height` int(10) unsigned NOT NULL default '480', - `bgcolor` varchar(7) default '#FFFFFF', - `displayleft` int(3) unsigned NOT NULL default '0', - `displayleftif` INT(3) UNSIGNED NOT NULL DEFAULT '0', - `progressbar` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', - `highscores` int(3) unsigned NOT NULL default '0', - `maxhighscores` int(10) NOT NULL default '0', - PRIMARY KEY (`id`) - ) COMMENT = 'Defines lesson_default'; -# -------------------------------------------------------- - -CREATE TABLE `prefix_lesson_timer` - ( `id` int(10) unsigned NOT NULL auto_increment, - `lessonid` int(10) unsigned not null default '0', - `userid` int(10) unsigned not null default '0', - `starttime` int(10) unsigned not null default '0', - `lessontime` int(10) unsigned not null default '0', - PRIMARY KEY (`id`) - ); -# -------------------------------------------------------- - -CREATE TABLE `prefix_lesson_branch` - ( `id` int(10) unsigned not null auto_increment, - `lessonid` int(10) unsigned not null default '0', - `userid` int(10) unsigned not null default '0', - `pageid` int(10) unsigned not null default '0', - `retry` int(10) unsigned not null default '0', - `flag` tinyint(3) unsigned not null default '0', - `timeseen` int(10) unsigned not null default '0', - PRIMARY KEY (`id`) - ); -# -------------------------------------------------------- - -CREATE TABLE `prefix_lesson_high_scores` - ( `id` int(10) unsigned not null auto_increment, - `lessonid` int(10) unsigned not null default '0', - `userid` int(10) unsigned not null default '0', - `gradeid` int(10) unsigned not null default '0', - `nickname` varchar(5) not null default '', - PRIMARY KEY (`id`) - ); -# -------------------------------------------------------- - - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('lesson', 'start', 'lesson', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('lesson', 'end', 'lesson', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('lesson', 'view', 'lesson_pages', 'title'); diff --git a/mod/lesson/db/postgres7.sql b/mod/lesson/db/postgres7.sql deleted file mode 100644 index 8e2963aa77b..00000000000 --- a/mod/lesson/db/postgres7.sql +++ /dev/null @@ -1,172 +0,0 @@ -CREATE TABLE prefix_lesson ( - id SERIAL8 PRIMARY KEY, - course INT8 NOT NULL default '0', - name varchar(255) NOT NULL default '', - practice INT NOT NULL DEFAULT '0', - modattempts INT4 NOT NULL DEFAULT '0', - usepassword INT NOT NULL DEFAULT '0', - password VARCHAR(32) NOT NULL default '', - dependency INT8 NOT NULL DEFAULT '0', - conditions text NOT NULL DEFAULT '', - grade INT NOT NULL default '0', - custom INT NOT NULL DEFAULT '0', - ongoing INT NOT NULL DEFAULT '0', - usemaxgrade INT NOT NULL default '0', - maxanswers INT NOT NULL default '4', - maxattempts INT NOT NULL default '5', - review INT NOT NULL DEFAULT '0', - nextpagedefault INT NOT NULL default '0', - feedback INT NOT NULL default '1', - minquestions INT NOT NULL default '0', - maxpages INT NOT NULL default '0', - timed INT NOT NULL DEFAULT '0', - maxtime INT8 NOT NULL DEFAULT '0', - retake INT NOT NULL default '1', - activitylink INT8 NOT NULL default '0', - mediafile varchar(255) NOT NULL default '', - mediaheight INT NOT NULL DEFAULT '100', - mediawidth INT NOT NULL DEFAULT '650', - mediaclose INT NOT NULL DEFAULT '0', - slideshow INT NOT NULL DEFAULT '0', - width INT8 NOT NULL DEFAULT '640', - height INT8 NOT NULL DEFAULT '480', - bgcolor VARCHAR(7) NOT NULL DEFAULT '#FFFFFF', - displayleft INT NOT NULL DEFAULT '0', - displayleftif INT NOT NULL DEFAULT '0', - progressbar INT NOT NULL DEFAULT '0', - highscores INT NOT NULL DEFAULT '0', - maxhighscores INT8 NOT NULL DEFAULT '0', - available INT8 NOT NULL default '0', - deadline INT8 NOT NULL default '0', - timemodified INT8 NOT NULL default '0' -); - -CREATE INDEX prefix_lesson_course_idx ON prefix_lesson (course); - -CREATE TABLE prefix_lesson_pages ( - id SERIAL8 PRIMARY KEY, - lessonid INT8 NOT NULL default '0', - prevpageid INT8 NOT NULL default '0', - nextpageid INT8 NOT NULL default '0', - qtype INT NOT NULL default '0', - qoption INT NOT NULL default '0', - layout INT NOT NULL DEFAULT '1', - display INT NOT NULL DEFAULT '1', - timecreated INT8 NOT NULL default '0', - timemodified INT8 NOT NULL default '0', - title varchar(255) NOT NULL default '', - contents text NOT NULL default '' -) ; - -CREATE INDEX prefix_lesson_pages_lessonid_idx ON prefix_lesson_pages (lessonid); - -CREATE TABLE prefix_lesson_answers ( - id SERIAL8 PRIMARY KEY, - lessonid INT8 NOT NULL default '0', - pageid INT8 NOT NULL default '0', - jumpto int8 NOT NULL default '0', - grade INT NOT NULL default '0', - score INT8 NOT NULL DEFAULT '0', - flags INT NOT NULL default '0', - timecreated INT8 NOT NULL default '0', - timemodified INT8 NOT NULL default '0', - answer text NOT NULL default '', - response text NOT NULL default '' -) ; - -CREATE INDEX prefix_lesson_answers_pageid_idx ON prefix_lesson_answers (pageid); -CREATE INDEX prefix_lesson_answers_lessonid_idx ON prefix_lesson_answers (lessonid); - -CREATE TABLE prefix_lesson_attempts ( - id SERIAL8 PRIMARY KEY, - lessonid INT8 NOT NULL default '0', - pageid INT8 NOT NULL default '0', - userid INT8 NOT NULL default '0', - answerid INT8 NOT NULL default '0', - retry INT NOT NULL default '0', - correct INT8 NOT NULL default '0', - useranswer text NOT NULL default '', - timeseen INT8 NOT NULL default '0' -) ; -CREATE INDEX prefix_lesson_attempts_lessonid_idx ON prefix_lesson_attempts (lessonid); -CREATE INDEX prefix_lesson_attempts_pageid_idx ON prefix_lesson_attempts (pageid); -CREATE INDEX prefix_lesson_attempts_userid_idx ON prefix_lesson_attempts (userid); - -CREATE TABLE prefix_lesson_grades ( - id SERIAL8 PRIMARY KEY, - lessonid INT8 NOT NULL default '0', - userid INT8 NOT NULL default '0', - grade real NOT NULL default '0', - late INT NOT NULL default '0', - completed INT8 NOT NULL default '0' -) ; - -CREATE INDEX prefix_lesson_grades_lessonid_idx ON prefix_lesson_grades (lessonid); -CREATE INDEX prefix_lesson_grades_userid_idx ON prefix_lesson_grades (userid); - -CREATE TABLE prefix_lesson_default - ( id SERIAL8 PRIMARY KEY, - course INT8 NOT NULL default '0', - practice INT NOT NULL default '0', - modattempts INT4 NOT NULL default '0', - usepassword INT NOT NULL default '0', - password varchar(32) NOT NULL default '', - conditions text NOT NULL DEFAULT '', - grade INT NOT NULL default '0', - custom INT NOT NULL default '0', - ongoing INT NOT NULL default '0', - usemaxgrade INT NOT NULL default '0', - maxanswers INT NOT NULL default '4', - maxattempts INT NOT NULL default '5', - review INT NOT NULL default '0', - nextpagedefault INT NOT NULL default '0', - feedback INT NOT NULL default '1', - minquestions INT NOT NULL default '0', - maxpages INT NOT NULL default '0', - timed INT NOT NULL default '0', - maxtime INT8 NOT NULL default '0', - retake INT NOT NULL default '1', - mediaheight INT NOT NULL DEFAULT '100', - mediawidth INT NOT NULL DEFAULT '650', - mediaclose INT NOT NULL DEFAULT '0', - slideshow INT NOT NULL default '0', - width INT8 NOT NULL default '640', - height INT8 NOT NULL default '480', - bgcolor varchar(7) default '#FFFFFF', - displayleft INT NOT NULL default '0', - displayleftif INT NOT NULL DEFAULT '0', - progressbar INT NOT NULL DEFAULT '0', - highscores INT NOT NULL default '0', - maxhighscores INT8 NOT NULL default '0' - ) ; - -CREATE TABLE prefix_lesson_timer - ( id SERIAL8 PRIMARY KEY, - lessonid INT8 not null default '0', - userid INT8 not null default '0', - starttime INT8 not null default '0', - lessontime INT8 not null default '0' - ); - -CREATE TABLE prefix_lesson_branch - ( id SERIAL8 PRIMARY KEY, - lessonid INT8 not null default '0', - userid INT8 not null default '0', - pageid INT8 not null default '0', - retry INT8 not null default '0', - flag INT not null default '0', - timeseen INT8 not null default '0' - ); - -CREATE TABLE prefix_lesson_high_scores - ( id SERIAL8 PRIMARY KEY, - lessonid INT8 not null default '0', - userid INT8 not null default '0', - gradeid INT8 not null default '0', - nickname varchar(5) not null default '' - ); - - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('lesson', 'start', 'lesson', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('lesson', 'end', 'lesson', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('lesson', 'view', 'lesson_pages', 'title'); diff --git a/mod/quiz/db/mysql.sql b/mod/quiz/db/mysql.sql deleted file mode 100644 index bac5c73c7e0..00000000000 --- a/mod/quiz/db/mysql.sql +++ /dev/null @@ -1,251 +0,0 @@ --- -------------------------------------------------------- --- Quiz module and question bank table definitions. --- --- The tables are grouped divided by: --- quiz/questionbank and definition/runtime. --- -------------------------------------------------------- - --- -------------------------------------------------------- --- Quiz module, quiz definition data. --- -------------------------------------------------------- - -CREATE TABLE prefix_quiz ( - id int(10) unsigned NOT NULL auto_increment, - course int(10) unsigned NOT NULL default '0', - name varchar(255) NOT NULL default '', - intro text NOT NULL default '', - timeopen int(10) unsigned NOT NULL default '0', - timeclose int(10) unsigned NOT NULL default '0', - optionflags int(10) unsigned NOT NULL default '0', - penaltyscheme int(4) unsigned NOT NULL default '0', - attempts smallint(6) NOT NULL default '0', - attemptonlast tinyint(4) NOT NULL default '0', - grademethod tinyint(4) NOT NULL default '1', - decimalpoints int(4) NOT NULL default '2', - review int(10) unsigned NOT NULL default '0', - questionsperpage int(10) NOT NULL default '0', - shufflequestions tinyint(4) NOT NULL default '0', - shuffleanswers tinyint(4) NOT NULL default '0', - questions text NOT NULL default '', - sumgrades int(10) NOT NULL default '0', - grade int(10) NOT NULL default '0', - timecreated int(10) unsigned NOT NULL default '0', - timemodified int(10) unsigned NOT NULL default '0', - timelimit int(2) unsigned NOT NULL default '0', - password varchar(255) NOT NULL default '', - subnet varchar(255) NOT NULL default '', - popup tinyint(4) NOT NULL default '0', - delay1 int(10) NOT NULL default '0', - delay2 int(10) NOT NULL default '0', - PRIMARY KEY (id), - KEY course (course) -) TYPE=MyISAM COMMENT='Main information about each quiz'; - -CREATE TABLE prefix_quiz_question_instances ( - id int(10) unsigned NOT NULL auto_increment, - quiz int(10) unsigned NOT NULL default '0', - question int(10) unsigned NOT NULL default '0', - grade smallint(6) NOT NULL default '0', - PRIMARY KEY (id), - KEY quiz (quiz), - KEY question (question) -) TYPE=MyISAM COMMENT='The grade for a question in a quiz'; - -CREATE TABLE prefix_quiz_question_versions ( - id int(10) unsigned NOT NULL auto_increment, - quiz int(10) unsigned NOT NULL default '0', - oldquestion int(10) unsigned NOT NULL default '0', - newquestion int(10) unsigned NOT NULL default '0', - originalquestion int(10) unsigned NOT NULL default '0', - userid int(10) unsigned NOT NULL default '0', - timestamp int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id) -) TYPE=MyISAM COMMENT='The mapping between old and new versions of a question'; - -CREATE TABLE prefix_quiz_feedback ( - id int(10) unsigned NOT NULL auto_increment, - quizid int(10) unsigned NOT NULL default '0', - feedbacktext text NOT NULL default '', - mingrade double NOT NULL default '0', - maxgrade double NOT NULL default '0', - PRIMARY KEY (id), - KEY quizid (quizid) -) TYPE=MyISAM COMMENT='Feedback given to students based on their overall score on the test'; - --- -------------------------------------------------------- --- Quiz module, quiz runtime data. --- -------------------------------------------------------- - -CREATE TABLE prefix_quiz_attempts ( - id int(10) unsigned NOT NULL auto_increment, - uniqueid int(10) unsigned NOT NULL default '0', - quiz int(10) unsigned NOT NULL default '0', - userid int(10) unsigned NOT NULL default '0', - attempt smallint(6) NOT NULL default '0', - sumgrades float NOT NULL default '0', - timestart int(10) unsigned NOT NULL default '0', - timefinish int(10) unsigned NOT NULL default '0', - timemodified int(10) unsigned NOT NULL default '0', - layout text NOT NULL default '', - preview tinyint(3) unsigned NOT NULL default '0', - PRIMARY KEY (id), - UNIQUE KEY `uniqueid` (`uniqueid`), - KEY quiz (quiz), - KEY userid (userid) -) TYPE=MyISAM COMMENT='Stores various attempts on a quiz'; - -CREATE TABLE prefix_quiz_grades ( - id int(10) unsigned NOT NULL auto_increment, - quiz int(10) unsigned NOT NULL default '0', - userid int(10) unsigned NOT NULL default '0', - grade double NOT NULL default '0', - timemodified int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id), - KEY quiz (quiz), - KEY userid (userid) -) TYPE=MyISAM COMMENT='Final quiz grade (may be best of several attempts)'; - --- -------------------------------------------------------- --- Questionbank definition data. --- --- TODO, these tables no longer belong to the quiz module. --- They should be moved elsewhere when a good home for them --- is found. --- -------------------------------------------------------- - -CREATE TABLE prefix_question_categories ( - id int(10) unsigned NOT NULL auto_increment, - course int(10) unsigned NOT NULL default '0', - name varchar(255) NOT NULL default '', - info text NOT NULL default '', - publish tinyint(4) NOT NULL default '0', - stamp varchar(255) NOT NULL default '', - parent int(10) unsigned NOT NULL default '0', - sortorder int(10) unsigned NOT NULL default '999', - PRIMARY KEY (id), - KEY course (course) -) TYPE=MyISAM COMMENT='Categories are for grouping questions'; - -CREATE TABLE prefix_question ( - id int(10) NOT NULL auto_increment, - category int(10) NOT NULL default '0', - parent int(10) unsigned NOT NULL default '0', - name varchar(255) NOT NULL default '', - questiontext text NOT NULL, - questiontextformat tinyint(2) NOT NULL default '0', - image varchar(255) NOT NULL default '', - generalfeedback text NOT NULL, - defaultgrade int(10) unsigned NOT NULL default '1', - penalty float NOT NULL default '0.1', - qtype varchar(20) NOT NULL default '', - length int(10) unsigned NOT NULL default '1', - stamp varchar(255) NOT NULL default '', - version varchar(255) NOT NULL default '', - hidden int(1) unsigned NOT NULL default '0', - PRIMARY KEY (id), - KEY category (category) -) TYPE=MyISAM COMMENT='The quiz questions themselves'; - -CREATE TABLE prefix_question_answers ( - id int(10) unsigned NOT NULL auto_increment, - question int(10) unsigned NOT NULL default '0', - answer text NOT NULL default '', - fraction float NOT NULL default '0', - feedback text NOT NULL default '', - PRIMARY KEY (id), - KEY question (question) -) TYPE=MyISAM COMMENT='Answers, with a fractional grade (0-1) and feedback'; - -CREATE TABLE prefix_question_numerical_units ( - id int(10) unsigned NOT NULL auto_increment, - question int(10) unsigned NOT NULL default '0', - multiplier decimal(40,20) NOT NULL default '1.00000000000000000000', - unit varchar(50) NOT NULL default '', - PRIMARY KEY (id), - KEY question (question) -) TYPE=MyISAM COMMENT='Optional unit options for numerical questions'; - -CREATE TABLE prefix_question_datasets ( - id int(10) unsigned NOT NULL auto_increment, - question int(10) unsigned NOT NULL default '0', - datasetdefinition int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id), - KEY question (question,datasetdefinition) -) TYPE=MyISAM COMMENT='Many-many relation between questions and dataset definitions'; - -CREATE TABLE prefix_question_dataset_definitions ( - id int(10) unsigned NOT NULL auto_increment, - category int(10) unsigned NOT NULL default '0', - name varchar(255) NOT NULL default '', - type int(10) NOT NULL default '0', - options varchar(255) NOT NULL default '', - itemcount int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id), - KEY category (category) -) TYPE=MyISAM COMMENT='Organises and stores properties for dataset items'; - -CREATE TABLE prefix_question_dataset_items ( - id int(10) unsigned NOT NULL auto_increment, - definition int(10) unsigned NOT NULL default '0', - itemnumber int(10) unsigned NOT NULL default '0', - value varchar(255) NOT NULL default '', - PRIMARY KEY (id), - KEY definition (definition) -) TYPE=MyISAM COMMENT='Individual dataset items'; - --- -------------------------------------------------------- --- Questionbank runtime data. --- See above TODO. --- -------------------------------------------------------- - -CREATE TABLE prefix_question_attempts ( - id int(10) unsigned NOT NULL auto_increment, - modulename varchar(20) NOT NULL default 'quiz', - PRIMARY KEY (id) -) TYPE=MyISAM COMMENT='Student attempts. This table gets extended by the modules'; - -CREATE TABLE prefix_question_sessions ( - id int(10) unsigned NOT NULL auto_increment, - attemptid int(10) unsigned NOT NULL default '0', - questionid int(10) unsigned NOT NULL default '0', - newest int(10) unsigned NOT NULL default '0', - newgraded int(10) unsigned NOT NULL default '0', - sumpenalty float NOT NULL default '0', - manualcomment text NOT NULL default '', - PRIMARY KEY (id), - UNIQUE KEY attemptid (attemptid,questionid) -) TYPE=MyISAM COMMENT='Gives ids of the newest open and newest graded states'; - -CREATE TABLE prefix_question_states ( - id int(10) unsigned NOT NULL auto_increment, - attempt int(10) unsigned NOT NULL default '0', - question int(10) unsigned NOT NULL default '0', - originalquestion int(10) unsigned NOT NULL default '0', - seq_number int(6) unsigned NOT NULL default '0', - answer text NOT NULL default '', - timestamp int(10) unsigned NOT NULL default '0', - event int(4) unsigned NOT NULL default '0', - grade float NOT NULL default '0', - raw_grade float NOT NULL default '0', - penalty float NOT NULL default '0', - PRIMARY KEY (id), - KEY attempt (attempt), - KEY question (question) -) TYPE=MyISAM COMMENT='Stores user responses to a quiz, and percentage grades'; - --- -------------------------------------------------------- --- Quiz log actions. --- -------------------------------------------------------- - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'add', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'update', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'view', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'report', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'attempt', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'submit', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'review', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'editquestions', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'preview', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'start attempt', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'close attempt', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'continue attempt', 'quiz', 'name'); diff --git a/mod/quiz/db/postgres7.sql b/mod/quiz/db/postgres7.sql deleted file mode 100644 index 143f6d1e7c4..00000000000 --- a/mod/quiz/db/postgres7.sql +++ /dev/null @@ -1,236 +0,0 @@ --- -------------------------------------------------------- --- Quiz module and question bank table definitions. --- --- The tables are grouped divided by: --- quiz/questionbank and definition/runtime. --- -------------------------------------------------------- - --- -------------------------------------------------------- --- Quiz module, quiz definition data. --- -------------------------------------------------------- - -CREATE TABLE prefix_quiz ( - id SERIAL PRIMARY KEY, - course integer NOT NULL default '0', - name varchar(255) NOT NULL default '', - intro text NOT NULL default '', - timeopen integer NOT NULL default '0', - timeclose integer NOT NULL default '0', - optionflags integer NOT NULL default '0', - penaltyscheme integer NOT NULL default '0', - attempts integer NOT NULL default '0', - attemptonlast integer NOT NULL default '0', - grademethod integer NOT NULL default '1', - decimalpoints integer NOT NULL default '2', - review integer NOT NULL default '0', - questionsperpage integer NOT NULL default '0', - shufflequestions integer NOT NULL default '0', - shuffleanswers integer NOT NULL default '0', - questions text NOT NULL default '', - sumgrades integer NOT NULL default '0', - grade integer NOT NULL default '0', - timecreated integer NOT NULL default '0', - timemodified integer NOT NULL default '0', - timelimit integer NOT NULL default '0', - password varchar(255) NOT NULL default '', - subnet varchar(255) NOT NULL default '', - popup integer NOT NULL default '0', - delay1 integer NOT NULL default '0', - delay2 integer NOT NULL default '0' -); -CREATE INDEX prefix_quiz_course_idx ON prefix_quiz (course); - -CREATE TABLE prefix_quiz_question_instances ( - id SERIAL PRIMARY KEY, - quiz integer NOT NULL default '0', - question integer NOT NULL default '0', - grade integer NOT NULL default '0' -); -CREATE INDEX prefix_quiz_question_instances_quiz_idx ON prefix_quiz_question_instances (quiz); -CREATE INDEX prefix_quiz_question_instances_question_idx ON prefix_quiz_question_instances (question); - -CREATE TABLE prefix_quiz_question_versions ( - id SERIAL PRIMARY KEY, - quiz integer NOT NULL default '0', - oldquestion integer NOT NULL default '0', - newquestion integer NOT NULL default '0', - originalquestion integer NOT NULL default '0', - userid integer NOT NULL default '0', - timestamp integer NOT NULL default '0' -); - -CREATE TABLE prefix_quiz_feedback ( - id SERIAL PRIMARY KEY, - quizid integer NOT NULL default '0', - feedbacktext text NOT NULL default '', - mingrade real NOT NULL default '0', - maxgrade real NOT NULL default '0' -); -CREATE INDEX prefix_quiz_feedback_quizid_idx ON prefix_quiz_feedback (quizid); - --- -------------------------------------------------------- --- Quiz module, quiz runtime data. --- -------------------------------------------------------- - -CREATE TABLE prefix_quiz_attempts ( - id SERIAL PRIMARY KEY, - uniqueid integer NOT NULL default '0', - quiz integer NOT NULL default '0', - userid integer NOT NULL default '0', - attempt integer NOT NULL default '0', - sumgrades real NOT NULL default '0', - timestart integer NOT NULL default '0', - timefinish integer NOT NULL default '0', - timemodified integer NOT NULL default '0', - layout text NOT NULL default '', - preview integer NOT NULL default '0' -); -CREATE INDEX prefix_quiz_attempts_quiz_idx ON prefix_quiz_attempts (quiz); -CREATE INDEX prefix_quiz_attempts_userid_idx ON prefix_quiz_attempts (userid); -CREATE UNIQUE INDEX prefix_quiz_attempts_uniqueid_uk ON prefix_quiz_attempts (uniqueid); - -CREATE TABLE prefix_quiz_grades ( - id SERIAL PRIMARY KEY, - quiz integer NOT NULL default '0', - userid integer NOT NULL default '0', - grade real NOT NULL default '0', - timemodified integer NOT NULL default '0' -); - -CREATE INDEX prefix_quiz_grades_quiz_idx ON prefix_quiz_grades (quiz); -CREATE INDEX prefix_quiz_grades_userid_idx ON prefix_quiz_grades (userid); - --- -------------------------------------------------------- --- Questionbank definition data. --- --- TODO, these tables no longer belong to the quiz module. --- They should be moved elsewhere when a good home for them --- is found. --- -------------------------------------------------------- - -CREATE TABLE prefix_question_categories ( - id SERIAL PRIMARY KEY, - course integer NOT NULL default '0', - name varchar(255) NOT NULL default '', - info text NOT NULL default '', - publish integer NOT NULL default '0', - stamp varchar(255) NOT NULL default '', - parent integer NOT NULL default '0', - sortorder integer NOT NULL default '999' -); -CREATE INDEX prefix_question_categories_course_idx ON prefix_question_categories (course); - -CREATE TABLE prefix_question ( - id SERIAL PRIMARY KEY, - category integer NOT NULL default '0', - parent integer NOT NULL default '0', - name varchar(255) NOT NULL default '', - questiontext text NOT NULL default '', - questiontextformat integer NOT NULL default '0', - image varchar(255) NOT NULL default '', - generalfeedback text NOT NULL default '', - defaultgrade integer NOT NULL default '1', - penalty real NOT NULL default '0.1', - qtype varchar(20) NOT NULL default '0', - length integer NOT NULL DEFAULT '1', - stamp varchar(255) NOT NULL default '', - version varchar(255) NOT NULL default '', - hidden integer NOT NULL default '0' -); -CREATE INDEX prefix_question_category_idx ON prefix_question (category); - -CREATE TABLE prefix_question_answers ( - id SERIAL PRIMARY KEY, - question integer NOT NULL default '0', - answer text NOT NULL default '', - fraction real NOT NULL default '0', - feedback text NOT NULL default '' -); -CREATE INDEX prefix_question_answers_question_idx ON prefix_question_answers (question); - -CREATE TABLE prefix_question_numerical_units ( - id SERIAL8 PRIMARY KEY, - question INT8 NOT NULL default '0', - multiplier decimal(40,20) NOT NULL default '1.00000000000000000000', - unit varchar(50) NOT NULL default '' -); -CREATE INDEX prefix_question_numerical_units_question_idx ON prefix_question_numerical_units (question); - -CREATE TABLE prefix_question_datasets ( - id SERIAL8 PRIMARY KEY, - question INT8 NOT NULL default '0', - datasetdefinition INT8 NOT NULL default '0' -); -CREATE INDEX prefix_question_datasets_question_datasetdefinition_idx ON prefix_question_datasets (question,datasetdefinition); - -CREATE TABLE prefix_question_dataset_definitions ( - id SERIAL8 PRIMARY KEY, - category INT8 NOT NULL default '0', - name varchar(255) NOT NULL default '', - type INT8 NOT NULL default '0', - options varchar(255) NOT NULL default '', - itemcount INT8 NOT NULL default '0' -); -CREATE INDEX prefix_question_dataset_definitions_category_idx ON prefix_question_dataset_definitions (category); - -CREATE TABLE prefix_question_dataset_items ( - id SERIAL8 PRIMARY KEY, - definition INT8 NOT NULL default '0', - itemnumber INT8 NOT NULL default '0', - value varchar(255) NOT NULL default '' -); -CREATE INDEX prefix_question_dataset_items_definition_idx ON prefix_question_dataset_items (definition); - --- -------------------------------------------------------- --- Questionbank runtime data. --- See above TODO. --- -------------------------------------------------------- - -CREATE TABLE prefix_question_attempts ( - id SERIAL PRIMARY KEY, - modulename varchar(20) NOT NULL default 'quiz' -); - -CREATE TABLE prefix_question_sessions ( - id SERIAL PRIMARY KEY, - attemptid integer NOT NULL default '0', - questionid integer NOT NULL default '0', - newest integer NOT NULL default '0', - newgraded integer NOT NULL default '0', - sumpenalty real NOT NULL default '0', - manualcomment text NOT NULL default '' -); -CREATE UNIQUE INDEX prefix_question_sessions_attempt_idx ON prefix_question_sessions (attemptid,questionid); - -CREATE TABLE prefix_question_states ( - id SERIAL PRIMARY KEY, - attempt integer NOT NULL default '0', - question integer NOT NULL default '0', - originalquestion integer NOT NULL default '0', - seq_number integer NOT NULL default '0', - answer text NOT NULL default '', - timestamp integer NOT NULL default '0', - event integer NOT NULL default '0', - grade real NOT NULL default '0', - raw_grade real NOT NULL default '0', - penalty real NOT NULL default '0' -); -CREATE INDEX prefix_question_states_attempt_idx ON prefix_question_states (attempt); -CREATE INDEX prefix_question_states_question_idx ON prefix_question_states (question); - --- -------------------------------------------------------- --- Quiz log actions. --- -------------------------------------------------------- - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'add', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'update', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'view', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'report', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'attempt', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'submit', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'review', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'editquestions', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'preview', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'start attempt', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'close attempt', 'quiz', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('quiz', 'continue attempt', 'quiz', 'name'); diff --git a/mod/quiz/report/analysis/report.php b/mod/quiz/report/analysis/report.php index e77f03a5320..5d52978b83e 100644 --- a/mod/quiz/report/analysis/report.php +++ b/mod/quiz/report/analysis/report.php @@ -26,12 +26,10 @@ class quiz_report extends quiz_default_report { if (!$download) { $currentgroup = setup_and_print_groups($course, $groupmode, "report.php?id=$cm->id&mode=analysis"); } else { - $changegroup = optional_param('group', -1, PARAM_INT); - - $currentgroup = get_and_set_current_group($course, $groupmode, $changegroup); + $currentgroup = get_and_set_current_group($course, $groupmode); } } else { - $currentgroup = false; + $currentgroup = get_and_set_current_group($course, $groupmode); } // set Table and Analysis stats options @@ -76,13 +74,18 @@ class quiz_report extends quiz_default_report { $usermax = get_records_sql_menu($sql); } - $sql = 'SELECT qa.* FROM '.$CFG->prefix.'user u '. - 'JOIN '.$CFG->prefix.'quiz_attempts qa ON u.id = qa.userid '; - if (!empty($currentgroup)) { - $sql .= groups_members_join_sql($currentgroup); + $groupmembers = ''; + $groupwhere = ''; + + //Add this to the SQL to show only group users + if ($currentgroup) { + $groupmembers = ', '.groups_members_from_sql(); + $groupwhere = ' AND '.groups_members_where_sql($currentgroup, 'u.id'); } - $sql .= ' WHERE qa.quiz = '.$quiz->id. // ULPGC ecastro - ' AND ( qa.sumgrades >= '.$scorelimit.' ) '; + + $sql = 'SELECT qa.* FROM '.$CFG->prefix.'quiz_attempts qa, '.$CFG->prefix.'user u '.$groupmembers. + 'WHERE u.id = qa.userid AND qa.quiz = '.$quiz->id.' AND ( qa.sumgrades >= '.$scorelimit.' ) '.$groupwhere; + // ^^^^^^ es posible seleccionar aqu� TODOS los quizzes, como quiere Jussi, // pero habr�a que llevar la cuenta ed cada quiz para restaura las preguntas (quizquestions, states) diff --git a/mod/quiz/tabs.php b/mod/quiz/tabs.php index bd46d6a5ec4..059e435941e 100644 --- a/mod/quiz/tabs.php +++ b/mod/quiz/tabs.php @@ -37,7 +37,7 @@ if (has_capability('mod/quiz:preview', $context)) { $row[] = new tabobject('preview', "$CFG->wwwroot/mod/quiz/attempt.php?q=$quiz->id", get_string('preview', 'quiz')); } if (has_capability('mod/quiz:manage', $context)) { - $row[] = new tabobject('edit', "$CFG->wwwroot/mod/quiz/edit.php?quizid=$quiz->id", get_string('edit')); + $row[] = new tabobject('edit', "$CFG->wwwroot/mod/quiz/edit.php?cmid=$cm->id", get_string('edit')); } if ($currenttab == 'info' && count($row) == 1) { @@ -82,8 +82,9 @@ if ($currenttab == 'edit' and isset($mode)) { $strquiz = get_string('modulename', 'quiz'); $streditingquiz = get_string("editinga", "moodle", $strquiz); $strupdate = get_string('updatethis', 'moodle', $strquiz); - $row[] = new tabobject('editq', "$CFG->wwwroot/mod/quiz/edit.php?quizid=$quiz->id", $strquiz, $streditingquiz); - questionbank_navigation_tabs($row, $context, $course->id); + + $row[] = new tabobject('editq', "$CFG->wwwroot/mod/quiz/edit.php?".$thispageurl->get_query_string(), $strquiz, $streditingquiz); + questionbank_navigation_tabs($row, $context, $thispageurl->get_query_string()); $tabs[] = $row; } diff --git a/mod/resource/db/mysql.sql b/mod/resource/db/mysql.sql deleted file mode 100755 index dbd61a1d3a6..00000000000 --- a/mod/resource/db/mysql.sql +++ /dev/null @@ -1,40 +0,0 @@ -# phpMyAdmin MySQL-Dump -# version 2.2.1 -# http://phpwizard.net/phpMyAdmin/ -# http://phpmyadmin.sourceforge.net/ (download page) -# -# Host: localhost -# Generation Time: Nov 14, 2001 at 04:43 PM -# Server version: 3.23.36 -# PHP Version: 4.0.6 -# Database : `moodle` -# -------------------------------------------------------- - -# -# Table structure for table `resource` -# - -CREATE TABLE prefix_resource ( - id int(10) unsigned NOT NULL auto_increment, - course int(10) unsigned NOT NULL default '0', - name varchar(255) NOT NULL default '', - type varchar(30) NOT NULL default '', - reference varchar(255) NOT NULL default '', - summary text NOT NULL default '', - alltext text NOT NULL default '', - popup text NOT NULL default '', - options varchar(255) NOT NULL default '', - timemodified int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id), - UNIQUE KEY id (id), - KEY `course` (`course`) -) TYPE=MyISAM; - - -# -# Dumping data for table `log_display` -# - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('resource', 'view', 'resource', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('resource', 'update', 'resource', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('resource', 'add', 'resource', 'name'); diff --git a/mod/resource/db/postgres7.sql b/mod/resource/db/postgres7.sql deleted file mode 100644 index 8660faf5cb5..00000000000 --- a/mod/resource/db/postgres7.sql +++ /dev/null @@ -1,38 +0,0 @@ -# phpMyAdmin MySQL-Dump -# version 2.2.1 -# http://phpwizard.net/phpMyAdmin/ -# http://phpmyadmin.sourceforge.net/ (download page) -# -# Host: localhost -# Generation Time: Nov 14, 2001 at 04:43 PM -# Server version: 3.23.36 -# PHP Version: 4.0.6 -# Database : `moodle` -# -------------------------------------------------------- - -# -# Table structure for table `resource` -# - -CREATE TABLE prefix_resource ( - id SERIAL PRIMARY KEY, - course integer NOT NULL default '0', - name varchar(255) NOT NULL default '', - type varchar(30) NOT NULL default '', - reference varchar(255) default NULL, - summary text NOT NULL default '', - alltext text NOT NULL default '', - popup text NOT NULL default '', - options varchar(255) NOT NULL default '', - timemodified integer NOT NULL default '0' -); - -CREATE INDEX prefix_resource_course_idx ON prefix_resource (course); - -# -# Dumping data for table `log_display` -# - -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('resource', 'view', 'resource', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('resource', 'update', 'resource', 'name'); -INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('resource', 'add', 'resource', 'name'); diff --git a/mod/resource/fetch.php b/mod/resource/fetch.php deleted file mode 100644 index 7c85b14dcfb..00000000000 --- a/mod/resource/fetch.php +++ /dev/null @@ -1,31 +0,0 @@ -course)) { - error("Course is misconfigured"); - } - - require_course_login($course, true, $cm); - - if (! $resource = get_record("resource", "id", $cm->instance)) { - error("Resource ID was incorrect"); - } - - $content = resource_fetch_remote_file($cm, $url); - - $formatoptions->noclean = true; - echo format_text($content->results, FORMAT_HTML, $formatoptions, $course->id); - -?> diff --git a/mod/resource/mod.html b/mod/resource/mod.html deleted file mode 100644 index 47e759115b8..00000000000 --- a/mod/resource/mod.html +++ /dev/null @@ -1,13 +0,0 @@ -dirroot/mod/resource/lib.php"); -require_once("$CFG->dirroot/mod/resource/type/$form->type/resource.class.php"); - -$resourceclass = "resource_$form->type"; -$resource = new $resourceclass(); - -$resource->setup($form); - -?> diff --git a/mod/resource/type/common.html b/mod/resource/type/common.html deleted file mode 100644 index 8cacf6303b4..00000000000 --- a/mod/resource/type/common.html +++ /dev/null @@ -1,33 +0,0 @@ -wwwroot/course/mod.php" ?>"> -
- - - - - - - - - - - -
- - - - - - - - - diff --git a/mod/resource/type/common_end.html b/mod/resource/type/common_end.html deleted file mode 100644 index 4e90c2d4c03..00000000000 --- a/mod/resource/type/common_end.html +++ /dev/null @@ -1,6 +0,0 @@ -
: - " /> -
:
- -
-
- summary); ?> -
-
-
-" /> -
- - diff --git a/mod/resource/type/directory/directory.html b/mod/resource/type/directory/directory.html deleted file mode 100644 index 76205331541..00000000000 --- a/mod/resource/type/directory/directory.html +++ /dev/null @@ -1,16 +0,0 @@ -
- : - - reference, get_string("maindirectory", "resource"), '', '') ?> -
  - -

-
- - - - - - : - - reference\" alt=\"reference\" />
"; - button_to_popup_window ("/files/index.php?id=$form->course&choose=form.reference", "coursefiles", $strchooseafile, 500, 750, $strchooseafile); - echo "resource_websearch', 'websearch', 'menubar=1,location=1,directories=1,toolbar=1,scrollbars,resizable,width=800,height=600');\" />\n"; - if ($CFG->resource_allowlocalfiles) { - button_to_popup_window ("/mod/resource/type/file/localfile.php?choose=form.reference", - "localfiles", get_string('localfilechoose', 'resource'), 400, 600, - get_string('localfilechoose', 'resource')); - } - ?> -

: - - - -
- -
- - - - - - - - - - - - - - -
- - - onclick="lockoptions('form', 'windowpopup[0]', frameitem); - return lockoptions('form', 'windowpopup[1]', popupitems);" /> - "> -
-
- - options == "frame") ? "checked=\"checked\"" : "" ?> alt="" /> - -
-
-
- - onclick="lockoptions('form', 'windowpopup[0]', frameitem); - return lockoptions('form', 'windowpopup[1]', popupitems);" /> - -
-
- $value) { - if ($name == "height" or $name == "width") { - continue; - } - echo ""; - echo "$name." alt=\"$name\" />"; - $stringname = "str$name"; - echo $$stringname."
"; - } - ?> - - - -
- - - -
- "; - echo "\n//\n"; - echo ""; - } else { - echo ""; - } - ?> -
-
-
- -
- -
: - - - -
- -
- - - - - - - - -maxparameters; $i++) { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -} - -?> - - -
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
- -
- - - - - -
- alltext); ?> -

: - - - -
- -
- - - - - - - - - - - - - - -
- - - onclick="lockoptions('form', 'windowpopup[0]', blockitem); - return lockoptions('form', 'windowpopup[1]', popupitems);" /> - -
-
- - options == "showblocks") ? "checked=\"checked\"" : "" ?> alt="" /> - -
-
- -
- - onclick="lockoptions('form', 'windowpopup[0]', blockitem); - return lockoptions('form', 'windowpopup[1]', popupitems);" /> - -
-
- $value) { - if ($name == "height" or $name == "width") { - continue; - } - $stringname = "str$name"; - echo ""; - echo "$name." />"; - echo $$stringname."
"; - } - ?> - - - -
- - - -
- \n//\n"; - } - ?> -
-
-
- -
- - - - - -
- - - - - - : - - reference\" alt=\"reference\" />
"; - button_to_popup_window ("/files/index.php?id=$form->course&choose=form.reference", "coursefiles", $strchooseafile, 500, 750, $strchooseafile); - if ($CFG->repositoryactivate) button_to_popup_window ("/mod/resource/type/ims/finder.php?directory=", "", $strbrowserepository, 500, 750, "Browse repository"); - - ?> -

: - - - -
- -
- - - - - - - - - - - - - - -
- - - onclick="lockoptions('form', 'windowpopup[1]', popupitems);" /> - "> -
-
- -
-
-
- - onclick="lockoptions('form', 'windowpopup[1]', popupitems);" /> - -
-
- $value) { - if ($name == "height" or $name == "width") { - continue; - } - echo ""; - echo "$name." alt=\"$name\" />"; - $stringname = "str$name"; - echo $$stringname."
"; - } - ?> - - - -
- - - -
- \n//\n"; - } - ?> -
-
-
- -
- -
: - - - -
- -
- - - -\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - -?> - - -
\n"; - echo get_string('navigationmenu','resource').': '; - echo "\n"; - choose_from_menu($yesno, "param_navigationmenu", $form->param_navigationmenu, "", "optiondeselector();"); - echo "
\n"; - echo get_string('tableofcontents','resource').': '; - echo "\n"; - choose_from_menu($yesno, "param_tableofcontents", $form->param_tableofcontents, ""); - echo "
\n"; - echo get_string('navigationbuttons','resource').': '; - echo "\n"; - choose_from_menu($yesno, "param_navigationbuttons", $form->param_navigationbuttons, "", "optiondeselector();"); - echo "
\n"; - echo get_string('skipsubmenus','resource').': '; - echo "\n"; - choose_from_menu($yesno, "param_skipsubmenus", $form->param_skipsubmenus, ""); - echo "
\n"; - echo get_string('navigationup','resource').': '; - echo "\n"; - choose_from_menu($yesno, "param_navigationupbutton", $form->param_navigationupbutton, ""); - echo "
- -
- - - - -
- - - - - - : - - reference\" alt=\"reference\" />
"; - ?> -
- - - -

: - - - -
- -
- - - - - - - - - - - - - - -
- - - onclick="lockoptions('form', 'windowpopup[0]', frameitem); - return lockoptions('form', 'windowpopup[1]', popupitems);" /> - "> -
-
- - options == "frame") ? "checked=\"checked\"" : "" ?> alt="" /> - -
-
-
- - onclick="lockoptions('form', 'windowpopup[0]', frameitem); - return lockoptions('form', 'windowpopup[1]', popupitems);" /> - -
-
- $value) { - if ($name == "height" or $name == "width") { - continue; - } - echo ""; - echo "$name." alt=\"$name\" />"; - $stringname = "str$name"; - echo $$stringname."
"; - } - ?> - - - -
- - - -
- \n//\n"; - } else { - echo ""; - } - ?> -
-
-
- -
- -
: - - - -
- -
- - - - - - - - -maxparameters; $i++) { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -} - -?> - - -
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
- -
- - - - - -
- -
- - - :
-
-
-
- alltext); ?> -
- :
-
- options, ''); - helpbutton("textformat", get_string("formattexttype")); - ?> -

: - - - -
- -
- - - - - - - - - - - - - - -
- - - " - onclick="lockoptions('form', 'windowpopup[0]', blockitem); - return lockoptions('form', 'windowpopup[1]', popupitems);" /> - "> - -
-
- - options == "showblocks") ? "checked=\"checked\"" : "" ?> alt="" /> - -
-
- -
- - onclick="lockoptions('form', 'windowpopup[0]', blockitem); - return lockoptions('form', 'windowpopup[1]', popupitems);" /> - - -
-
- $value) { - if ($name == "height" or $name == "width") { - continue; - } - echo ''; - echo '$name.' />'; - $stringname = "str$name"; - echo $$stringname."
"; - } - ?> - - - -
- - - -
- \n//\n"; - } - ?> -
-
-
- -
- - - - - -
'; - echo ''; - redirect("edit.php?courseid=$course->id"); - } else { - error("Confirmation string was incorrect"); - } - - } else { // teacher still has to confirm - // make a list of all the questions that are selected - $rawquestions = $_REQUEST; - $questionlist = ''; // comma separated list of ids of questions to be deleted - $questionnames = ''; // string with names of questions separated by
with - // an asterix in front of those that are in use - $inuse = false; // set to true if at least one of the questions is in use - foreach ($rawquestions as $key => $value) { // Parse input for question ids - if (substr($key, 0, 1) == "q") { - $key = substr($key,1); - $questionlist .= $key.','; - if (record_exists('quiz_question_instances', 'question', $key) or - record_exists('question_states', 'originalquestion', $key)) { - $questionnames .= '* '; - $inuse = true; - } - $questionnames .= get_field('question', 'name', 'id', $key).'
'; - } - } - if (!$questionlist) { // no questions were selected - redirect("edit.php?courseid=$course->id"); - } - $questionlist = rtrim($questionlist, ','); - - // Add an explanation about questions in use - if ($inuse) { - $questionnames .= '
'.get_string('questionsinuse', 'quiz'); - } - notice_yesno(get_string("deletequestionscheck", "quiz", $questionnames), - "edit.php?courseid=$course->id&sesskey=$USER->sesskey&deleteselected=$questionlist&confirm=".md5($questionlist), "edit.php?courseid=$course->id"); - - echo ''; - echo ''; - print_footer($course); - exit; - } - } - - // Unhide a question - if(isset($_REQUEST['unhide']) && confirm_sesskey()) { - $unhide = required_param('unhide', PARAM_INT); - if(!set_field('question', 'hidden', 0, 'id', $unhide)) { - error("Failed to unhide the question."); - } - redirect("edit.php?courseid=$course->id"); - } - - if ($categoryid = optional_param('cat', 0, PARAM_INT)) { /// coming from category selection drop-down menu - $SESSION->questioncat = $categoryid; - $page = 0; - $SESSION->questionpage = 0; - } - - if (empty($SESSION->questioncat) or !count_records_select("question_categories", "id = '{$SESSION->questioncat}' AND (course = '{$course->id}' OR publish = '1')")) { - $category = get_default_question_category($course->id); - $SESSION->questioncat = $category->id; - } - - if(($recurse = optional_param('recurse', -1, PARAM_BOOL)) != -1) { - $SESSION->questionrecurse = $recurse; - } - if (!isset($SESSION->questionrecurse)) { - $SESSION->questionrecurse = 1; - } - - if(($showhidden = optional_param('showhidden', -1, PARAM_BOOL)) != -1) { - $SESSION->questionshowhidden = $showhidden; - } - if (!isset($SESSION->questionshowhidden)) { - $SESSION->questionshowhidden = 0; - } - - if(($showquestiontext = optional_param('showquestiontext', -1, PARAM_BOOL)) != -1) { - $SESSION->questionshowquestiontext = $showquestiontext; - } - if (!isset($SESSION->questionshowquestiontext)) { - $SESSION->questionshowquestiontext = 0; - } - - // starts with category selection form - print_box_start('generalbox questionbank'); - print_heading(get_string('questionbank', 'question'), '', 2); - question_category_form($course, $SESSION->questioncat, $SESSION->questionrecurse, - $SESSION->questionshowhidden, $SESSION->questionshowquestiontext); - - // continues with list of questions - question_list($course, $SESSION->questioncat, isset($modform->instance) ? $modform->instance : 0, - $SESSION->questionrecurse, $page, $perpage, $SESSION->questionshowhidden, $sortorder, - $SESSION->questionshowquestiontext); - - print_box_end(); - -?> diff --git a/question/tabs.php b/question/tabs.php index 7aafe850bf7..da5847a38b6 100644 --- a/question/tabs.php +++ b/question/tabs.php @@ -18,7 +18,7 @@ $tabs = array(); $inactive = array(); $row = array(); - questionbank_navigation_tabs($row, $context, $course->id); + questionbank_navigation_tabs($row, $context, 'courseid='.$course->id); $tabs[] = $row; print_tabs($tabs, $currenttab, array()); diff --git a/question/type/calculated/db/mysql.sql b/question/type/calculated/db/mysql.sql deleted file mode 100644 index 70a633c27e7..00000000000 --- a/question/type/calculated/db/mysql.sql +++ /dev/null @@ -1,18 +0,0 @@ --- --- Table structure for table `prefix_question_calculated` --- - -CREATE TABLE prefix_question_calculated ( - id int(10) unsigned NOT NULL auto_increment, - question int(10) unsigned NOT NULL default '0', - answer int(10) unsigned NOT NULL default '0', - tolerance varchar(20) NOT NULL default '0.0', - tolerancetype int(10) NOT NULL default '1', - correctanswerlength int(10) NOT NULL default '2', - correctanswerformat int(10) NOT NULL default '2', - PRIMARY KEY (id), - KEY question (question), - KEY answer (answer) -) TYPE=MyISAM COMMENT='Options for questions of type calculated'; - --- -------------------------------------------------------- \ No newline at end of file diff --git a/question/type/calculated/db/postgres7.sql b/question/type/calculated/db/postgres7.sql deleted file mode 100644 index bc6d6e986b4..00000000000 --- a/question/type/calculated/db/postgres7.sql +++ /dev/null @@ -1,19 +0,0 @@ - -# -------------------------------------------------------- -# -# Table structure for table prefix_question_calculated -# - -CREATE TABLE prefix_question_calculated ( - id SERIAL8 PRIMARY KEY, - question INT8 NOT NULL default '0', - answer INT8 NOT NULL default '0', - tolerance varchar(20) NOT NULL default '0.0', - tolerancetype INT8 NOT NULL default '1', - correctanswerlength INT8 NOT NULL default '2', - correctanswerformat INT8 NOT NULL default '2' -); - -CREATE INDEX prefix_question_calculated_question_idx ON prefix_question_calculated (question); -CREATE INDEX prefix_question_calculated_answer_idx ON prefix_question_calculated (answer); - diff --git a/question/type/datasetdependent/categorydatasetdefinitions.php b/question/type/datasetdependent/categorydatasetdefinitions.php deleted file mode 100644 index 47a69237c4a..00000000000 --- a/question/type/datasetdependent/categorydatasetdefinitions.php +++ /dev/null @@ -1,102 +0,0 @@ -course)) { - error("This category doesn't belong to a valid course!"); - } - - require_login($course->id, false); - require_capability('moodle/question:import', get_context_instance(CONTEXT_COURSE, $course->id)); - - $DATASET_TYPES = array('1' => get_string('literal', 'quiz'), - '2' => get_string('file', 'quiz'), - '3' => get_string('link', 'quiz')); - - $streditingquiz = get_string("editingquiz", "quiz"); - $strdefinedataset = get_string("datasetdefinitions", "quiz", $category->name); - $strquestions = get_string("questions", "quiz"); - - print_header_simple("$strdefinedataset", "$strdefinedataset", - "$streditingquiz -> $strdefinedataset"); - - if ($form = data_submitted()) { /// Filename - - $definition->category = $category->id; - foreach ($form->name as $key => $name) { - $definition->name = $name; - $definition->id = $form->id[$key]; - $definition->type = $form->type[$key]; - - if ($definition->id) { - if (!update_record('question_dataset_definitions', $definition)) { - notify("Could not update dataset item definition"); - } - - } else if ($definition->name) { - if (!insert_record('question_dataset_definitions', $definition)) { - notify("Could not insert dataset item defintion"); - } - - } else { - // No action - } - } - if ($form->question) { - redirect("../../question.php?id=$question"); - } else { - redirect("../../edit.php"); - } - } - - /// Print form - - print_heading_with_help($strdefinedataset, "datasets", "quiz"); - - print_simple_box_start("center"); - echo "
"; - echo "id\" />"; - if ($question) { - echo ""; - } - - echo ""; - - $definitions = get_records('question_dataset_definitions', - 'category', - $category->id); - for ($idef = 1, $total = max(5, count($definitions)) ; $idef <= $total ; ++$idef) { - if ($definitions) { - $definition = array_shift($definitions); - } else { - $definition = NULL; - } - - echo "\n"; - } - - echo ""; - echo "
"; - print_string("itemdefinition", "quiz"); - echo ":"; - echo "name\" />"; - echo "id\" />"; - echo " "; - choose_from_menu($DATASET_TYPES, 'type[]', $definition->type, ''); - echo "
"; - echo "
"; - print_simple_box_end(); - - print_footer($course); -?> diff --git a/question/type/match/db/mysql.sql b/question/type/match/db/mysql.sql deleted file mode 100644 index ebeb9e0bca4..00000000000 --- a/question/type/match/db/mysql.sql +++ /dev/null @@ -1,32 +0,0 @@ - - --- --- Table structure for table `prefix_question_match` --- - -CREATE TABLE prefix_question_match ( - id int(10) unsigned NOT NULL auto_increment, - question int(10) unsigned NOT NULL default '0', - subquestions varchar(255) NOT NULL default '', - shuffleanswers tinyint(4) NOT NULL default '1', - PRIMARY KEY (id), - KEY question (question) -) TYPE=MyISAM COMMENT='Defines fixed matching questions'; - --- -------------------------------------------------------- - --- --- Table structure for table `prefix_question_match_sub` --- - -CREATE TABLE prefix_question_match_sub ( - id int(10) unsigned NOT NULL auto_increment, - code int(10) unsigned NOT NULL default '0', - question int(10) unsigned NOT NULL default '0', - questiontext text NOT NULL default '', - answertext varchar(255) NOT NULL default '', - PRIMARY KEY (id), - KEY question (question) -) TYPE=MyISAM COMMENT='Defines the subquestions that make up a matching question'; - --- -------------------------------------------------------- \ No newline at end of file diff --git a/question/type/match/db/postgres7.sql b/question/type/match/db/postgres7.sql deleted file mode 100644 index 8bb5efe4575..00000000000 --- a/question/type/match/db/postgres7.sql +++ /dev/null @@ -1,30 +0,0 @@ - -# -------------------------------------------------------- - -# -# Table structure for table prefix_question_match -# - -CREATE TABLE prefix_question_match ( - id SERIAL PRIMARY KEY, - question integer NOT NULL default '0', - subquestions varchar(255) NOT NULL default '', - shuffleanswers integer NOT NULL default '1' -); - -CREATE INDEX prefix_question_match_question_idx ON prefix_question_match (question); - -# -------------------------------------------------------- - -# -# Table structure for table prefix_question_match_sub -# - -CREATE TABLE prefix_question_match_sub ( - id SERIAL PRIMARY KEY, - code integer NOT NULL default '0', - question integer NOT NULL default '0', - questiontext text NOT NULL default '', - answertext varchar(255) NOT NULL default '' -); -CREATE INDEX prefix_question_match_sub_question_idx ON prefix_question_match_sub (question); diff --git a/question/type/multianswer/db/mysql.sql b/question/type/multianswer/db/mysql.sql deleted file mode 100644 index e90d6977723..00000000000 --- a/question/type/multianswer/db/mysql.sql +++ /dev/null @@ -1,15 +0,0 @@ - - --- --- Table structure for table `prefix_question_multianswer` --- - -CREATE TABLE prefix_question_multianswer ( - id int(10) unsigned NOT NULL auto_increment, - question int(10) unsigned NOT NULL default '0', - sequence text NOT NULL default '', - PRIMARY KEY (id), - KEY question (question) -) TYPE=MyISAM COMMENT='Options for multianswer questions'; - --- -------------------------------------------------------- \ No newline at end of file diff --git a/question/type/multianswer/db/postgres7.sql b/question/type/multianswer/db/postgres7.sql deleted file mode 100644 index 626d0568677..00000000000 --- a/question/type/multianswer/db/postgres7.sql +++ /dev/null @@ -1,14 +0,0 @@ - -# -------------------------------------------------------- - -# -# Table structure for table prefix_question_multianswer -# - -CREATE TABLE prefix_question_multianswer ( - id SERIAL PRIMARY KEY, - question integer NOT NULL default '0', - sequence text NOT NULL default '' -); - -CREATE INDEX prefix_question_multianswer_question_idx ON prefix_question_multianswer (question); diff --git a/question/type/multichoice/db/mysql.sql b/question/type/multichoice/db/mysql.sql deleted file mode 100644 index 33016d3cfb6..00000000000 --- a/question/type/multichoice/db/mysql.sql +++ /dev/null @@ -1,21 +0,0 @@ - - --- --- Table structure for table `prefix_question_multichoice` --- - -CREATE TABLE prefix_question_multichoice ( - id int(10) unsigned NOT NULL auto_increment, - question int(10) unsigned NOT NULL default '0', - layout tinyint(4) NOT NULL default '0', - answers varchar(255) NOT NULL default '', - single tinyint(4) NOT NULL default '0', - shuffleanswers tinyint(4) NOT NULL default '1', - correctfeedback text NOT NULL default '', - partiallycorrectfeedback text NOT NULL default '', - incorrectfeedback text NOT NULL default '', - PRIMARY KEY (id), - KEY question (question) -) TYPE=MyISAM COMMENT='Options for multiple choice questions'; - --- -------------------------------------------------------- \ No newline at end of file diff --git a/question/type/multichoice/db/postgres7.sql b/question/type/multichoice/db/postgres7.sql deleted file mode 100644 index 44a425afb2f..00000000000 --- a/question/type/multichoice/db/postgres7.sql +++ /dev/null @@ -1,21 +0,0 @@ - -# -------------------------------------------------------- - -# -# Table structure for table prefix_question_multichoice -# - -CREATE TABLE prefix_question_multichoice ( - id SERIAL PRIMARY KEY, - question integer NOT NULL default '0', - layout integer NOT NULL default '0', - answers varchar(255) NOT NULL default '', - single integer NOT NULL default '0', - shuffleanswers integer NOT NULL default '1', - correctfeedback text NOT NULL default '', - partiallycorrectfeedback text NOT NULL default '', - incorrectfeedback text NOT NULL default '' -); - -CREATE INDEX prefix_question_multichoice_question_idx ON prefix_question_multichoice (question); - diff --git a/question/type/numerical/db/mysql.sql b/question/type/numerical/db/mysql.sql deleted file mode 100644 index c234b0bcd42..00000000000 --- a/question/type/numerical/db/mysql.sql +++ /dev/null @@ -1,17 +0,0 @@ - - --- --- Table structure for table `prefix_question_numerical` --- - -CREATE TABLE prefix_question_numerical ( - id int(10) unsigned NOT NULL auto_increment, - question int(10) unsigned NOT NULL default '0', - answer int(10) unsigned NOT NULL default '0', - tolerance varchar(255) NOT NULL default '0.0', - PRIMARY KEY (id), - KEY answer (answer), - KEY question (question) -) TYPE=MyISAM COMMENT='Options for numerical questions'; - --- -------------------------------------------------------- \ No newline at end of file diff --git a/question/type/numerical/db/postgres7.sql b/question/type/numerical/db/postgres7.sql deleted file mode 100644 index 4e3b53d834c..00000000000 --- a/question/type/numerical/db/postgres7.sql +++ /dev/null @@ -1,16 +0,0 @@ - -# -------------------------------------------------------- - -# -# Table structure for table prefix_question_numerical -# - -CREATE TABLE prefix_question_numerical ( - id SERIAL PRIMARY KEY, - question integer NOT NULL default '0', - answer integer NOT NULL default '0', - tolerance varchar(255) NOT NULL default '0.0' -); - -CREATE INDEX prefix_question_numerical_answer_idx ON prefix_question_numerical (answer); -CREATE INDEX prefix_question_numerical_question_idx ON prefix_question_numerical (question); diff --git a/question/type/randomsamatch/db/mysql.sql b/question/type/randomsamatch/db/mysql.sql deleted file mode 100644 index 79d8b4d45c9..00000000000 --- a/question/type/randomsamatch/db/mysql.sql +++ /dev/null @@ -1,13 +0,0 @@ --- --- Table structure for table `prefix_question_randomsamatch` --- - -CREATE TABLE prefix_question_randomsamatch ( - id int(10) unsigned NOT NULL auto_increment, - question int(10) unsigned NOT NULL default '0', - choose int(10) unsigned NOT NULL default '4', - PRIMARY KEY (id), - KEY question (question) -) TYPE=MyISAM COMMENT='Info about a random short-answer matching question'; - --- -------------------------------------------------------- \ No newline at end of file diff --git a/question/type/randomsamatch/db/postgres7.sql b/question/type/randomsamatch/db/postgres7.sql deleted file mode 100644 index 0afa172c87a..00000000000 --- a/question/type/randomsamatch/db/postgres7.sql +++ /dev/null @@ -1,14 +0,0 @@ - -# -------------------------------------------------------- - -# -# Table structure for table prefix_question_randomsamatch -# - -CREATE TABLE prefix_question_randomsamatch ( - id SERIAL PRIMARY KEY, - question integer NOT NULL default '0', - choose integer NOT NULL default '4' -); - -CREATE INDEX prefix_question_randomsamatch_question_idx ON prefix_question_randomsamatch (question); diff --git a/question/type/rqp/db/install.xml b/question/type/rqp/db/install.xml deleted file mode 100644 index 0eb69a09361..00000000000 --- a/question/type/rqp/db/install.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - -
- - - - - - - - - - - - -
- - - - - - - - - - - -
-
-
\ No newline at end of file diff --git a/question/type/rqp/db/mysql.php b/question/type/rqp/db/mysql.php deleted file mode 100644 index c77dcd94977..00000000000 --- a/question/type/rqp/db/mysql.php +++ /dev/null @@ -1,18 +0,0 @@ - diff --git a/question/type/rqp/db/mysql.sql b/question/type/rqp/db/mysql.sql deleted file mode 100644 index 65b1f5b8611..00000000000 --- a/question/type/rqp/db/mysql.sql +++ /dev/null @@ -1,60 +0,0 @@ --- --- Table structure for table `prefix_question_rqp` --- - -CREATE TABLE prefix_question_rqp ( - id int(10) unsigned NOT NULL auto_increment, - question int(10) unsigned NOT NULL default '0', - type int(10) unsigned NOT NULL default '0', - source longblob NOT NULL default '', - format varchar(255) NOT NULL default '', - flags tinyint(3) unsigned NOT NULL default '0', - maxscore int(10) unsigned NOT NULL default '1', - PRIMARY KEY (id), - KEY question (question) -) TYPE=MyISAM COMMENT='Options for RQP questions'; - --- -------------------------------------------------------- - --- --- Table structure for table `prefix_question_rqp_servers` --- - -CREATE TABLE prefix_question_rqp_servers ( - id int(10) unsigned NOT NULL auto_increment, - typeid int(10) unsigned NOT NULL default '0', - url varchar(255) NOT NULL default '', - can_render tinyint(2) unsigned NOT NULL default '0', - can_author tinyint(2) unsigned NOT NULL default '0', - PRIMARY KEY (id) -) TYPE=MyISAM COMMENT='Information about RQP servers'; - --- -------------------------------------------------------- - --- --- Table structure for table `prefix_question_rqp_states` --- - -CREATE TABLE prefix_question_rqp_states ( - id int(10) unsigned NOT NULL auto_increment, - stateid int(10) unsigned NOT NULL default '0', - responses text NOT NULL default '', - persistent_data text NOT NULL default '', - template_vars text NOT NULL default '', - PRIMARY KEY (id) -) TYPE=MyISAM COMMENT='RQP question type specific state information'; - --- -------------------------------------------------------- - --- --- Table structure for table `prefix_question_rqp_types` --- - -CREATE TABLE prefix_question_rqp_types ( - id int(10) unsigned NOT NULL auto_increment, - name varchar(255) NOT NULL default '', - PRIMARY KEY (id), - UNIQUE KEY name (name) -) TYPE=MyISAM COMMENT='RQP question types'; - --- -------------------------------------------------------- \ No newline at end of file diff --git a/question/type/rqp/db/postgres7.php b/question/type/rqp/db/postgres7.php deleted file mode 100644 index 23ea199bc5e..00000000000 --- a/question/type/rqp/db/postgres7.php +++ /dev/null @@ -1,18 +0,0 @@ - diff --git a/question/type/rqp/db/postgres7.sql b/question/type/rqp/db/postgres7.sql deleted file mode 100644 index 63ff3451cf3..00000000000 --- a/question/type/rqp/db/postgres7.sql +++ /dev/null @@ -1,50 +0,0 @@ - -# -------------------------------------------------------- - -# -# Table structure for table prefix_question_rqp -# - -CREATE TABLE prefix_question_rqp ( - id SERIAL PRIMARY KEY, - question integer NOT NULL default '0', - type integer NOT NULL default '0', - source text NOT NULL, - format varchar(255) NOT NULL default '', - flags integer NOT NULL default '0', - maxscore integer NOT NULL default '1' -); - -CREATE INDEX prefix_question_rqp_question_idx ON prefix_question_rqp (question); - - -# -------------------------------------------------------- - -# -# Table structure for table prefix_question_rqp_states -# - -CREATE TABLE prefix_question_rqp_states ( - id SERIAL PRIMARY KEY, - stateid integer NOT NULL default '0', - responses text NOT NULL, - persistent_data text NOT NULL, - template_vars text NOT NULL -); - -# -------------------------------------------------------- - -# -# Table structure for table prefix_question_rqp_type -# - -CREATE TABLE prefix_question_rqp_types ( - id SERIAL PRIMARY KEY, - name varchar(255) NOT NULL default '', - rendering_server varchar(255) NOT NULL default '', - cloning_server varchar(255) NOT NULL default '', - flags integer NOT NULL default '0' -); - -CREATE UNIQUE INDEX prefix_question_rqp_types_name_uk ON prefix_question_rqp_types (name); - diff --git a/question/type/rqp/db/upgrade.php b/question/type/rqp/db/upgrade.php deleted file mode 100644 index 394d98222fd..00000000000 --- a/question/type/rqp/db/upgrade.php +++ /dev/null @@ -1,38 +0,0 @@ - diff --git a/question/type/rqp/editquestion.html b/question/type/rqp/editquestion.html deleted file mode 100644 index 9c1cac82fea..00000000000 --- a/question/type/rqp/editquestion.html +++ /dev/null @@ -1,60 +0,0 @@ -
-
- - - - - - - - - - - - - - - - - -qtype]->print_replacement_options($question, $course, $contextquiz); - $QTYPES[$question->qtype]->print_question_form_end($question); -?> -
: - id, true, true, $question->category); ?> -
: - - - - - -
: - - options->source); - echo "
\n"; - if (isset($err['source'])) { - formerr($err['source']); - } - ?> -
- -
-
diff --git a/question/type/rqp/editquestion.php b/question/type/rqp/editquestion.php deleted file mode 100644 index c9e70a99824..00000000000 --- a/question/type/rqp/editquestion.php +++ /dev/null @@ -1,24 +0,0 @@ -dirroot . '/question/type/rqp/lib.php'); - - if (empty($question->id)) { - if (!isset($typeid)) { - error('No remote question type specified'); - } - $question->options->type = $typeid; - $question->options->source = ''; - $question->options->format = ''; - } - else if (!$QTYPES[$question->qtype]->get_question_options($question)) { - error("Could not load the options for this question"); - } - - if (!$type = get_record('question_rqp_types', 'id', $question->options->type)) { - error("Invalid remote question type"); - } - - print_heading_with_help(get_string('editingrqp', 'quiz', $type->name), 'rqp', 'quiz'); - require('editquestion.html'); - -?> diff --git a/question/type/rqp/lib.php b/question/type/rqp/lib.php deleted file mode 100644 index f94b66f7c0f..00000000000 --- a/question/type/rqp/lib.php +++ /dev/null @@ -1,129 +0,0 @@ -id)) { - return insert_record('question_rqp_types', $type, false); - } - return update_record('question_rqp_types', $type); -} - -function question_rqp_delete_type($id) { - return delete_records('question_rqp_type', 'id', $id); -} - -/** -* Creates a colon separated list of space separated values from an associative -* array of arrays -* -* An associative array of values or an associative array of arrays is imploded -* to a string by creating a colon separated list of space separated values. The -* key is treated as the first value. The {@link question_rqp_explode} function can -* restore the array from this string representation. -* @return string The string representation of the array. This is a colon -* separated list of space separated values. -* @param array $array An associative array of single values or an associative -* array of arrays to be imploded. -*/ -function question_rqp_implode($array) { - if (count($array) < 1) { - return ''; - } - $str = ''; - foreach ($array as $key => $val) { - $str .= $key . ' '; - if (is_array($val)) { - if (count($val) > 0) { - foreach ($val as $subval) { - $str .= $subval . ' '; - } - // Remove the trailing space - $str = substr($str, 0, -1); - } - } else { - $str .= $val; - } - $str .= ':'; - } - // Remove the trailing semi-colon - return substr($str, 0, -1); -} - -/** -* Recreates an associative array or an associative array of arrays from the -* string representation -* -* Takes a colon separated list of space separated values as produced by -* {@link question_rqp_implode} and recreates the array. If an array of single values -* is expected then an error results if an element has more than one value. -* Otherwise every value is an array. -* @return array The associative array restored from the string. Every -* element is a single value if $multi is false or an array -* if $multi is true. -* @param string $str The string to explode. This is a colon separated list of -* space separated values. -* @param boolean $multi Flag indicating if the values in the array are expected -* to be of multiple cardinality (i.e. an array of arrays -* is expected) or single values (i.e. an array of values). -* The default is false indicating an array of single -* values is expected. -*/ -function question_rqp_explode($str, $multi=false) { - // Explode by colon - if ($str === '') { - return array(); - } - $array = explode(':', $str); - $n = count($array); - $return = array(); - for ($i = 0; $i < $n; $i++) { - // Explode by space - $array[$i] = explode(' ', $array[$i]); - // Get the key - $key = array_shift($array[$i]); - if (array_key_exists($key, $return)) { - // Element appears twice! - return false; - } - // Save the element - if ($multi) { - $return[$key] = $array[$i]; - } else if (count($array[$i]) > 1) { - return false; - } else { - $return[$key] = $array[$i][0]; - } - } - return $return; -} - -function question_rqp_print_serverinfo($serverinfo) { - $info->align = array('right', 'left'); - $info->data = array(); // will hold the data for the info table - $info->data[] = array(''.get_string('url', 'quiz').':',$serverinfo->url); - $info->data[] = array(''.get_string('name').':',$serverinfo->name); - $info->data[] = array(''.get_string('serveridentifier', 'quiz').':',$serverinfo->identifier); - $info->data[] = array(''.get_string('description').':',$serverinfo->description); - print_table($info); -} - -function question_rqp_debug_soap($item) { - global $CFG; - if (debugging()) { - echo 'Here is the dump of the soap fault:
';
-        var_dump($item);
-        echo '
';
-    }
-}
-?>
diff --git a/question/type/rqp/questiontype.php b/question/type/rqp/questiontype.php
deleted file mode 100644
index cc4a878acf4..00000000000
--- a/question/type/rqp/questiontype.php
+++ /dev/null
@@ -1,553 +0,0 @@
-dirroot . '/question/type/rqp/lib.php');
-require_once($CFG->dirroot . '/question/type/rqp/remote.php');
-
-/**
-* RQP question type class
-*/
-class question_rqp_qtype extends default_questiontype {
-
-    function name() {
-        return 'rqp';
-    }
-
-    function menu_name() {
-        // Does not currently work, so don't include in the menu.
-        return false;
-    }
-
-    /**
-    * Save the type-specific options
-    *
-    * This also saves additional information that it receives from
-    * an RQP_itemInformation call to the RQP server
-    */
-    function save_question_options($form) {
-        global $CFG;
-
-        // Check source type
-        if (!$type = get_record('question_rqp_types', 'id', $form->type)) {
-            $result->notice = get_string('invalidsourcetype', 'quiz');
-            return $result;
-        }
-
-        // Create the object to be stored in question_rqp table
-        $options = new object;
-        $options->question = $form->id;
-        $options->type = $form->type;
-        $options->type_name = $type->name;
-        $options->source = $form->source;
-        $options->format = isset($form->format) ? $form->format : '';
-
-        // Check source file
-        if (!$item = remote_item_info($options)) {
-            // We have not been able to obtain item information from any server
-            $result->notice = get_string('noconnection', 'quiz', $options);
-            return $result;
-        }
-        if (is_soap_fault($item)) {
-            $result->notice = get_string('invalidsource', 'quiz', $item);
-            question_rqp_debug_soap($item);
-            return $result;
-        }
-        if ($item->error) {
-            $result->notice = $item->error;
-            return $result;
-        }
-        if ($item->warning) {
-            $result->notice = $item->warning;
-            return $result;
-        }
-        // Time dependent items are not supported yet
-        if ($item->timeDependent) {
-            $result->noticeyesno = get_string('notimedependentitems', 'quiz');
-            return $result;
-        }
-
-        // Set the format and item specific flags
-        $options->format = $item->format;
-        $options->maxscore = $item->maxScore;
-        $options->flags = 0;
-        $options->flags |= $item->template ? REMOTE_TEMPLATE : 0;
-        $options->flags |= $item->adaptive ? REMOTE_ADAPTIVE : 0;
-
-        // Save the options
-        if ($old = get_record('question_rqp', 'question', $form->id)) {
-            $old->type   = $options->type;
-            $old->source = $options->source;
-            $old->format = $options->format;
-            $old->flags  = $options->flags;
-            $old->maxscore  = $options->maxscore;
-            if (!update_record('question_rqp', $old)) {
-                $result->error = "Could not update quiz rqp options! (id=$old->id)";
-                return $result;
-            }
-        } else {
-            if (!insert_record('question_rqp', $options)) {
-                $result->error = 'Could not insert quiz rqp options!';
-                return $result;
-            }
-        }
-        return true;
-    }
-
-    /**
-    * Loads the question type specific options for the question.
-    *
-    * This function loads all question type specific options for the
-    * question from the database into the $question->options field.
-    * @return bool            Indicates success or failure.
-    * @param object $question The question object for the question.
-    */
-    function get_question_options(&$question) {
-
-        $options =& $question->options;
-        if (! ($options = get_record('question_rqp', 'question', $question->id))) {
-            return false;
-        }
-        if (!$type = get_record('question_rqp_types', 'id', $options->type)) {
-            return false;
-        }
-        $options->type_name = $type->name;
-        return true;
-    }
-
-    /**
-    * Deletes states from the question-type specific tables
-    *
-    * @param string $stateslist  Comma separated list of state ids to be deleted
-    */
-    function delete_states($stateslist) {
-        delete_records_select("question_rqp_states", "stateid IN ($stateslist)");
-        return true;
-    }
-
-    /**
-    * Deletes question from the question-type specific tables
-    *
-    * @return boolean Success/Failure
-    * @param object $question  The question being deleted
-    */
-    function delete_question($questionid) {
-        delete_records("question_rqp", "question", $questionid);
-        return true;
-    }
-
-    /**
-    * Return a value or array of values which will give full marks if graded as
-    * the $state->responses field
-    *
-    * The correct answers are obtained from the RQP server via the
-    * RQP_SessionInformation operation
-    * @return mixed           An array of values giving the responses corresponding
-    *                         to the (or a) correct answer to the question.
-    * @param object $question The question for which the correct answer is to
-    *                         be retrieved.
-    * @param object $state    The state object that corresponds to the question,
-    *                         for which a correct answer is needed.
-    */
-    function get_correct_responses(&$question, &$state) {
-        $info = remote_session_info($question, $state);
-        if (false === $info || is_soap_fault($info)) {
-            return null;
-        }
-        return $info->correctResponses;
-    }
-
-    /**
-    * Creates empty session and response information for the question
-    *
-    * This function is called to start a question session. Empty question type
-    * specific session data and empty response data is added to the state object.
-    * @return bool            Indicates success or failure.
-    * @param object $question The question for which the session is to be created.
-    * @param object $state    The state to create the session for. This is passed by
-    *                         reference and will be updated.
-    * @param object $cmoptions (not used)
-    * @param object $attempt  The attempt for which the session is to be
-    *                         started. (not used)
-    */
-    function create_session_and_responses(&$question, &$state, $cmoptions, $attempt) {
-        $state->responses = array('' => '');
-        $state->options->persistent_data = '';
-        $state->options->template_vars = array();
-        return true;
-    }
-
-    /**
-    * Restores the session data and most recent responses for the given state
-    *
-    * This function loads any session data associated with the question session
-    * in the given state from the question_rqp_states table into the state object.
-    * @return bool            Indicates success or failure.
-    * @param object $question The question object for the question including any
-    *                         question type specific information.
-    * @param object $state    The saved state to load the session for. This
-    *                         object is updated to include the question
-    *                         type specific session information and responses
-    *                         (it is passed by reference).
-    */
-    function restore_session_and_responses(&$question, &$state) {
-        if (!$options = get_record('question_rqp_states', 'stateid', $state->id)) {
-            return false;
-        }
-        $state->responses = question_rqp_explode($options->responses);
-        $state->options->persistent_data = $options->persistent_data;
-        $state->options->template_vars =
-         question_rqp_explode($options->template_vars, true);
-        return true;
-    }
-
-    /**
-    * Saves the session data and responses for the question in a new state
-    *
-    * This function saves all session data from the state object into the
-    * question_rqp_states table
-    * @return bool            Indicates success or failure.
-    * @param object $question The question object for the question including
-    *                         the question type specific information.
-    * @param object $state    The state for which the question type specific
-    *                         data and responses should be saved.
-    */
-    function save_session_and_responses(&$question, &$state) {
-        $options->stateid = $state->id;
-        $options->responses = question_rqp_implode($state->responses);
-        $options->persistent_data = $state->options->persistent_data;
-        $options->template_vars =
-         question_rqp_implode($state->options->template_vars);
-        if ($state->update) {
-            if (!$options->id = get_field('question_rqp_states', 'id', 'stateid', $state->id)) {
-                return false;
-            }
-            if (!update_record('question_rqp_states', $options)) {
-                return false;
-            }
-        } else {
-            if (!insert_record('question_rqp_states', $options)) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-    * Prints the main content of the question including any interactions
-    *
-    * This function prints the main content of the question which it obtains
-    * from the RQP server via the Render operation. It also updates
-    * $state->options->persistent_data and $state->options->template_vars
-    * with the values returned by the RQP server.
-    * @param object $question The question to be rendered.
-    * @param object $state    The state to render the question in. The grading
-    *                         information is in ->grade, ->raw_grade and
-    *                         ->penalty. The current responses are in
-    *                         ->responses. The last graded state is in
-    *                         ->last_graded (hence the most recently graded
-    *                         responses are in ->last_graded->responses).
-    * @param object $cmoptions
-    * @param object $options  An object describing the rendering options.
-    */
-    function print_question_formulation_and_controls(&$question, &$state,
-     $cmoptions, $options) {
-
-        // Use the render output created during grading if it exists
-        if (isset($state->options->renderoutput)) {
-            $output =& $state->options->renderoutput;
-        } else {
-            // Otherwise perform a render operation
-            if (!$output = remote_render($question, $state, false,
-             $options->readonly ? 'readonly' : 'normal')) {
-                notify(get_string('noconnection', 'quiz'));
-                exit;
-            }
-            if (is_soap_fault($output)) {
-                notify(get_string('errorrendering', 'quiz'));
-                question_rqp_debug_soap($output);
-                unset($output);
-                exit;
-            }
-        }
-        $state->options->persistent_data = $output->persistentData;
-        $state->options->template_vars = $output->templateVars;
-        // Print the head (this may not work, really it should be in the head
-        // section of the html document but moodle doesn't allow question types
-        // to put things there)
-        if (isset($output->output[RQP_URI_COMPONENT . 'head'])) {
-            echo $output->output[RQP_URI_COMPONENT . 'head']->output;
-        }
-        // Print the title
-        if (isset($output->output[RQP_URI_COMPONENT . 'title'])) {
-            echo '

' . $output->output[RQP_URI_COMPONENT . 'title']->output - . "

\n"; - } - // Print the stem - if (isset($output->output[RQP_URI_COMPONENT . 'stem'])) { - echo '
'; - echo $output->output[RQP_URI_COMPONENT . 'stem']->output; - echo '
'; - } - // Print the interactions - if (isset($output->output[RQP_URI_COMPONENT . 'interactions'])) { - echo '
'; - echo $output->output[RQP_URI_COMPONENT . 'interactions']->output; - echo '
'; - } - // Print the last answer - if (isset($output->output[RQP_URI_COMPONENT . 'lastAnswer'])) { - echo '
'; - echo $output->output[RQP_URI_COMPONENT . 'lastAnswer']->output; - echo '
'; - } - // Print the validation when required - if ($options->validation) { - if (isset($output->output[RQP_URI_COMPONENT . 'validation'])) { - echo '
'; - echo $output->output[RQP_URI_COMPONENT . 'validation']->output; - echo '
'; - } - } - // Print the feedback when required - if ($options->feedback) { - if (isset($output->output[RQP_URI_COMPONENT . 'feedback'])) { - echo '
'; - echo $output->output[RQP_URI_COMPONENT . 'feedback']->output; - echo '
'; - } - } - // Print the solution when required - if ($options->correct_responses) { - if (isset($output->output[RQP_URI_COMPONENT . 'solution'])) { - echo $output->output[RQP_URI_COMPONENT . 'solution']->output; - echo ''; - } - } - // Note: hint(s) and modal feedback are ignored; moodle does not support - // them yet. - // Remove the render output created during grading (if any) - unset($state->options->renderoutput); - $this->print_question_submit_buttons($question, $state, $cmoptions, $options); - } - - /** - * Prints the submit and validate buttons - * @param object $question The question for which the buttons are to be printed - * @param object $state The state the question is in (not used) - * @param object $cmoptions - * @param object $options An object describing the rendering options. - * (not used. This function should only have been called - * if the options were such that the buttons are required) - */ - function print_question_submit_buttons(&$question, &$state, $cmoptions, $options) { - echo ' '; - if ($cmoptions->optionflags & QUESTION_ADAPTIVE) { - echo ''; - } - } - - /** - * Performs response processing and grading - * - * This function calls RQP_Render to perform response processing and grading - * and updates the state accordingly. It also caches the rendering output in case - * it is needed later. - * TODO: set $state->event appropriately - * @return boolean Indicates success or failure. - * @param object $question The question to be graded. - * @param object $state The state of the question to grade. The current - * responses are in ->responses. The last graded state - * is in ->last_graded (hence the most recently graded - * responses are in ->last_graded->responses). The - * question type specific information is also - * included. The ->raw_grade and ->penalty fields - * must be updated. The method is able to - * close the question session (preventing any further - * attempts at this question) by setting - * $state->event to QUESTION_EVENTCLOSE. - * @param object $cmoptions - */ - function grade_responses(&$question, &$state, $cmoptions) { - // Perform the grading and rendering - $output = remote_render($question, $state, QUESTION_EVENTGRADE == $state->event - || QUESTION_EVENTCLOSE == $state->event, 'normal'); - if (false === $output || is_soap_fault($output)) { - unset($output); - return false; - } - $state->options->persistent_data = $output->persistentData; - $state->options->template_vars = $output->templateVars; - // Save the rendering results for later - $state->options->renderoutput = $output; - if (isset($output->outcomeVars[RQP_URI_OUTCOME . 'rawScore'])) { - $state->raw_grade = (float) $output->outcomeVars[RQP_URI_OUTCOME . - 'rawScore'][0]; - if (isset($output->outcomeVars[RQP_URI_OUTCOME . 'penalty'])) { - $state->penalty = (float) $output->outcomeVars[RQP_URI_OUTCOME . - 'penalty'][0] * $question->maxgrade; - } else { - $state->penalty = 0; - } - } else if (isset($output->outcomeVars[RQP_URI_OUTCOME . 'grade'])) { - // This won't work quite as we would like but it is the best we can - // do given that the server won't tell us the information we need - $state->raw_grade = (float) $output->outcomeVars[RQP_URI_OUTCOME . - 'grade'][0]; - $state->penalty = 0; - } else { - $state->raw_grade = 0; - $state->penalty = 0; - } - $state->raw_grade = ($state->raw_grade * ((float) $question->maxgrade)) - / ((float) $question->options->maxscore); - return true; - } - - /** - * Includes configuration settings for the question type on the quiz admin - * page - * - * Returns an array of objects describing the options for the question type - * to be included on the quiz module admin page. - * This is currently only a link to the server setup page types.php - * @return array Array of objects describing the configuration options to - * be included on the quiz module admin page. - */ - function get_config_options() { - - // for the time being disable rqp unless we have php 5 - if(!check_php_version('5.0.0')) { - return false; - } - - $link->name = 'managetypes'; - $link->link = 'types.php'; - return array($link); - } - -/// BACKUP FUNCTIONS //////////////////////////// - - /* - * Backup the data in the question - * - * This is used in question/backuplib.php - */ - function backup($bf,$preferences,$question,$level=6) { - - $status = true; - - $rqps = get_records("question_rqp","question",$question,"id"); - //If there are rqps - if ($rqps) { - //Iterate over each rqp - foreach ($rqps as $rqp) { - $status = fwrite ($bf,start_tag("RQP",$level,true)); - //Print rqp contents - fwrite ($bf,full_tag("TYPE",$level+1,false,$rqp->type)); - fwrite ($bf,full_tag("SOURCE",$level+1,false,$rqp->source)); - fwrite ($bf,full_tag("FORMAT",$level+1,false,$rqp->format)); - fwrite ($bf,full_tag("FLAGS",$level+1,false,$rqp->flags)); - fwrite ($bf,full_tag("MAXSCORE",$level+1,false,$rqp->maxscore)); - $status = fwrite ($bf,end_tag("RQP",$level,true)); - } - } - return $status; - } - -/// RESTORE FUNCTIONS ///////////////// - - /* - * Restores the data in the question - * - * This is used in question/restorelib.php - */ - function restore($old_question_id,$new_question_id,$info,$restore) { - - $status = true; - - //Get the truefalse array - $rqps = $info['#']['RQP']; - - //Iterate over rqp - for($i = 0; $i < sizeof($rqps); $i++) { - $tru_info = $rqps[$i]; - - //Now, build the question_rqp record structure - $rqp->question = $new_question_id; - $rqp->type = backup_todb($tru_info['#']['TYPE']['0']['#']); - $rqp->source = backup_todb($tru_info['#']['SOURCE']['0']['#']); - $rqp->format = backup_todb($tru_info['#']['FORMAT']['0']['#']); - $rqp->flags = backup_todb($tru_info['#']['FLAGS']['0']['#']); - $rqp->maxscore = backup_todb($tru_info['#']['MAXSCORE']['0']['#']); - - //The structure is equal to the db, so insert the question_rqp - $newid = insert_record ("question_rqp",$rqp); - - //Do some output - if (($i+1) % 50 == 0) { - if (!defined('RESTORE_SILENTLY')) { - echo "."; - if (($i+1) % 1000 == 0) { - echo "
"; - } - } - backup_flush(300); - } - - if (!$newid) { - $status = false; - } - } - - return $status; - } - - - //This function restores the question_rqp_state - function restore_state($state_id,$info,$restore) { - - $status = true; - - //Get the question_rqp_state - $rqp_state = $info['#']['RQP_STATE']['0']; - if ($rqp_state) { - - //Now, build the RQP_STATES record structure - $state->stateid = $state_id; - $state->responses = backup_todb($rqp_state['#']['RESPONSES']['0']['#']); - $state->persistent_data = backup_todb($rqp_state['#']['PERSISTENT_DATA']['0']['#']); - $state->template_vars = backup_todb($rqp_state['#']['TEMPLATE_VARS']['0']['#']); - - //The structure is equal to the db, so insert the question_states - $newid = insert_record ("question_rqp_states",$state); - } - - return $status; - } - - -} -////////////////////////////////////////////////////////////////////////// -//// INITIATION - Without this line the question type is not in use... /// -////////////////////////////////////////////////////////////////////////// -question_register_questiontype(new question_rqp_qtype()); - -?> diff --git a/question/type/rqp/remote.php b/question/type/rqp/remote.php deleted file mode 100644 index 9b968df47ed..00000000000 --- a/question/type/rqp/remote.php +++ /dev/null @@ -1,163 +0,0 @@ -dirroot . '/question/type/rqp/rqp.php'); - -// Remote item processing flags (cached from server) -define('REMOTE_TEMPLATE', 4); -define('REMOTE_ADAPTIVE', 8); - -// Global connection variable -global $remote_connections; -$remote_connections = array(); - - -/** -* Create connection to an RQP server of required type if it does not already exist -* -* If the global array $remote_connections does not already have an entry for this -* server type then it randomly goes through the existing servers and tries to connect -* using rqp_connect(). The connection is then added to the $remote_connections array. -* If the function fails to connect to any server it returns false. -* @param string $typeid The type of the RQP server -* @return boolean Indicates success or failure -* -* @todo flag dead servers -*/ -function remote_connect($typeid) { - global $remote_connections; - - if (!array_key_exists($typeid, $remote_connections)) { - // get the available servers - if (!$servers = get_records('question_rqp_servers', 'typeid', $typeid)) { - // we don't have a server for this question type - return false; - } - // put them in a random order - shuffle($servers); - // go through them and try to connect to each until we are successful - foreach ($servers as $server) { - if ($remote_connections[$typeid] = rqp_connect($server->url)) { - break; // we have a connection - } else { - // We have a dead server here, should somehow flag that - } - } - } - // check that we did get a connection - if (!$remote_connections[$typeid]) { - unset($remote_connections[$typeid]); - return false; - } - return true; -} - -/** -* Create connection to an RQP server and requests server information -* -* @param string $url The url of the RQP server -* @return object An object holding the results of the ServerInformation call -* plus the server url. Returns false in the case of failure -*/ -function remote_server_info($url) { - - if (!$connection = rqp_connect($url)) { - return false; - } - $return = rqp_server_info($connection); - if (is_soap_fault($return)) { - $return = false; - } - $return->url = $url; - return $return; -} - -/** -* Create connection to an RQP server and requests server information -* -* @param object $options The RQP question options as stored in the question_rqp table -* @return object An object holding the results of the ItemInformation call -* Returns false in the case of failure -*/ -function remote_item_info(&$options) { - global $remote_connections; - - if (!remote_connect($options->type)) { - return false; - } - - return rqp_item_info($remote_connections[$options->type], - $options->source, $options->format, 0); -} - -/** - * Perform a remote rendering operation on the RQP question - * - * @param object $question - * @param object $state - * @param boolean $advanceState - * @param string $output One of 'normal', 'readonly' or 'print'. - */ -function remote_render(&$question, &$state, $advanceState=false, $output='normal') { - global $remote_connections; - - // Make the code more readable - $options =& $question->options; - - // Add prefix to response variable names - $responses = array(); - foreach ($state->responses as $key => $resp) { - $responses[$question->name_prefix . $key] = $resp; - } - - // Prepare the render format - if ('print' === $output) { - $renderFormat = RQP_URI_FORMAT . 'latex-2e'; - } else if ('readonly' === $output) { - $renderFormat = RQP_URI_FORMAT . 'xhtml-1.0-print'; - } else { - $renderFormat = RQP_URI_FORMAT . 'xhtml-1.0-web'; - } - // Perform the RQP operation - if (!remote_connect($options->type)) { - return false; - } - return rqp_render($remote_connections[$options->type], - $options->source, $options->format, $state->options->persistent_data, - $question->name_prefix, $responses, $advanceState, - $renderFormat, $state->options->template_vars, 0); -} - -/** - * Perform a remote SessionInformation call - * - * @param object $question - * @param object $state - */ -function remote_session_info(&$question, &$state) { - global $remote_connections; - - // Make the code more readable - $options =& $question->options; - - // Perform the RQP operation - if (!remote_connect($options->type)) { - return false; - } - return rqp_session_info($remote_connections[$options->type], - $options->source, $options->format, $state->options->persistent_data, - $state->options->template_vars); -} - - -?> diff --git a/question/type/rqp/rqp.php b/question/type/rqp/rqp.php deleted file mode 100644 index d566122502a..00000000000 --- a/question/type/rqp/rqp.php +++ /dev/null @@ -1,236 +0,0 @@ -dirroot . '/lib/soaplib.php'); - -/** -* Base RQP URI for RQP-defined identifiers -* -* RQP defines standard URIs for common values of the parameters. Currently -* there is no RQP domain so we define a base URI here so that it can be -* changed later. -*/ -define('RQP_URI_BASE', 'http://rqp.org/'); - -/** -* RQP parameter URIs -* -* RQP defines standard URIs for common values of the parameters. These are -* defined in several categories under different directories under the base -* URI. -*/ -define('RQP_URI_ERROR', RQP_URI_BASE . 'errors/'); -define('RQP_URI_FORMAT', RQP_URI_BASE . 'formats/'); -define('RQP_URI_OUTCOME', RQP_URI_BASE . 'outcomes/'); -define('RQP_URI_COMPONENT', RQP_URI_BASE . 'components/'); - - -/** -* Start a SOAP connection -* -* @param string $server The URL of the RQP server that we want to connect to -* @return mixed Returns a SoapClient object if connection is successful -* or false in the case of a soap fault. -*/ -function rqp_connect($server) { - $connection = soap_connect($server . '?wsdl'); - if (is_soap_fault($connection)) { - return false; - } - return $connection; -} - -/** -* Get server information using the RQP_ServerInformation operation -* -* @param SoapClient $connection The URL of the RQP server that we want to connect to -* @return object Object holding the return parameters or a SoapFault. -*/ -function rqp_server_info($connection) { - return soap_call($connection, 'RQP_ServerInformation', array()); -} - -/** -* Get item information using the RQP_ItemInformation operation -* -* @param SoapClient $connection The URL of the RQP server that we want to connect to -* @param string $source Item source -* @param anyURI $format Item format -* @return object Object holding the return parameters or a SoapFault. -*/ -function rqp_item_info($connection, $source, $format='') { - $itemInfo = soap_call($connection, 'RQP_ItemInformation', - array('source'=>$source, 'format'=>$format)); - if (is_soap_fault($itemInfo)) { - return $itemInfo; - } - return $itemInfo; -} - -/** -* Process an item template to produce template variables using the RQP_ProcessTemplate operation -* -* @param SoapClient $connection The URL of the RQP server that we want to connect to -* @param string $source Item source -* @param anyURI $format Item format -* @param array $options Options array -* @return object Object holding the return parameters or a SoapFault. -*/ -function rqp_process_template($connection, $source, $format='', $options=array()) { - $return = soap_call($connection, 'RQP_ProcessTemplate', - array('source'=>$source, 'format'=>$format, 'options'=>$options)); - if (is_soap_fault($return)) { - return $return; - } - return $return; -} - -/** -* Clone an item template using the RQP_ProcessTemplate operation -* -* @param SoapClient $connection The URL of the RQP server that we want to connect to -* @param string $source Item source -* @param anyURI $format Item format -* @return object Object holding the return parameters or a SoapFault. -*/ -function rqp_clone($connection, $source, $format='') { - - $return = soap_call($connection, 'RQP_Clone', array('source'=>$source, - 'format'=>$format)); - if (is_soap_fault($return)) { - return $return; - } - return $return; -} - -/** -* Get runtime information about the item in the given state using the -* RQP_SessionInformation operation -* -* @param SoapClient $connection The URL of the RQP server that we want to connect to -* @param string $source Item source -* @param anyURI $format Item format -* @param array $options Options array -* @param string $persistentData String giving the state of the item session -* @return object Object holding the return parameters or a SoapFault. -*/ -function rqp_session_info($connection, $source, $format='', $options=array(), $persistentData='') { - // make an array of key-value pairs from the template variables array - array_walk($options, create_function('&$val, $key', - '$val = (object) array(\'identifier\'=>$key, \'values\'=>$val);')); - - $return = soap_call($connection, 'RQP_SessionInformation', - array('source'=>$source, 'format'=>$format, 'options'=>$options, - 'persistentData'=>$persistentData)); - if (is_soap_fault($return)) { - return $return; - } - $responses = array(); - if (!empty($return->correctResponses)) { - foreach ($return->correctResponses as $var) { - $responses[$var->name] = $var->value; - } - } - $return->correctResponses = $responses; - return $return; -} - -/** -* Process and render the item in the given state using the RQP_Render operation -* -* @param SoapClient $connection The URL of the RQP server that we want to connect to -* @param string $source Item source -* @param anyURI $format Item format -* @param array $options Options array -* @param string $persistentData String giving the state of the item session -* @param array $inputData Array of responses -* @param array $directives Array of directives -* @param array $mimetypes Array of mime types orederd by preference -* @param string $namePrefix -* @param anyURI $itemBase -* @param anyURI $resourceBase -* @param anyURI tempfileBase -* @return object Object holding the return parameters or a SoapFault. -*/ -function rqp_render($connection, $source, $format='', $options=array(), $persistentData='', - $inputData=array(), $directives=array(), $mimetypes=array(), $namePrefix='', - $itemBase='', $resourceBase='', $tempfileBase='') { - - // make an array of name-value pairs from the responses array - array_walk($responses, create_function('&$val, $key', - '$val = (object) array(\'name\'=>$key, \'value\'=>$val);')); - - $return = soap_call($connection, 'RQP_Render', array('source'=>$source, - 'format'=>$format, 'index'=>$index, 'templateVars'=>array_values($templateVars), - 'persistentData'=>$persistentData, 'responses'=>$responses, - 'advanceState'=>$advanceState, 'embedPrefix'=>$embedPrefix, - 'appletBase'=>$appletBase, 'mediaBase'=>$mediaBase, - 'renderFormat'=>$renderFormat, 'modalFormat'=>$modalFormat)); - if (is_soap_fault($return)) { - return $return; - } - $outcomeVars = array(); - if (!empty($return->outcomeVars)) { - foreach ($return->outcomeVars as $var) { - $outcomeVars[$var->identifier] = $var->values; - } - } - $return->outcomeVars = $outcomeVars; - - $templateVars = array(); - if (!empty($return->templateVars)) { - foreach ($return->templateVars as $var) { - $templateVars[$var->identifier] = $var->values; - } - } - $return->templateVars = $templateVars; - - $output = array(); - if (!empty($return->output)) { - foreach ($return->output as $out) { - $id = $out->identifier; - unset($out->identifier); - $output[$id] = $out; - } - } - $return->output = $output; - - return $return; -} - -/** -* Call to the RQP_Author operation -* -* @param SoapClient $connection The URL of the RQP server -* @param string $source Item source -* @param anyURI $format Item format -* @param string $persistentData String giving the state of the authoring session -* @param string $embedPrefix -* @param array $responses Teacher responses from the form elements -* @param anyURI $renderFormat -* @return object Object holding the return parameters or a SoapFault. -*/ -function rqp_author($connection, $source, $format='', $persistentData='', - $embedPrefix='', $responses=array(), $renderFormat='') { - - // make an array of name-value pairs from the responses array - array_walk($responses, create_function('&$val, $key', - '$val = (object) array(\'name\'=>$key, \'value\'=>$val);')); - - return soap_call($connection, 'RQP_Author', array('source'=>$source, - 'format'=>$format, 'persistentData'=>$persistentData, 'responses'=>$responses, - 'embedPrefix'=>$embedPrefix, 'renderFormat'=>$renderFormat)); -} - -?> diff --git a/question/type/rqp/types.php b/question/type/rqp/types.php deleted file mode 100644 index 2b6d157179c..00000000000 --- a/question/type/rqp/types.php +++ /dev/null @@ -1,172 +0,0 @@ -libdir.'/tablelib.php'); - require_once($CFG->dirroot . '/question/type/rqp/lib.php'); - require_once($CFG->dirroot . '/question/type/rqp/remote.php'); - - $info = optional_param('info', 0, PARAM_INT); // id of server for which to show info - $delete = optional_param('delete', 0, PARAM_INT); // id of server to delete - $confirm = optional_param('confirm', false, PARAM_BOOL); // has the teacher confirmed the delete request? - - // Check user admin - require_login(); - require_capability('moodle/question:manage', get_context_instance(CONTEXT_SYSTEM, SITEID)); - - if (!$site = get_site()) { - error('Site isn\'t defined!'); - } - - // Print the header - $strmodulename = get_string('modulename', 'quiz'); - $stritemtypes = get_string('itemtypes', 'quiz'); - $navigation = '' . get_string('admin') . ' -> ' . - '' . get_string('configuration') . ' -> ' . - '' . get_string('managemodules') . ' -> ' . - '' . - get_string('modulename', 'quiz') . ' -> ' . $stritemtypes; - print_header($site->shortname . ': ' . $strmodulename . ': ' . $stritemtypes, $site->fullname, $navigation, '', '', true, '', ''); - - $straddtypeurl = 'http://'; - $straddtypename = ''; - -/// Process submitted data - if ($form = data_submitted() and confirm_sesskey()) { - - while (isset($form->add)) { // using like if but with support for break - // check name was given - if (empty($form->name)) { - notify(get_string('missingitemtypename', 'quiz')); - break; - } - // check url was given - if (empty($form->url)) { - notify(get_string('missingitemtypeurl', 'quiz')); - break; - } - // Check server exists and works - if (!$serverinfo = remote_server_info($form->url)) { - notify(get_string('renderingserverconnectfailed', 'quiz', $form->url)); - break; - } - // add new type to database unless it exists already - if (!$type = get_record('question_rqp_types', 'name', $form->name)) { - $type->name = $form->name; - if (!$type->id = insert_record('question_rqp_types', $type)) { - error("Could not save type $type"); - } - } - // add new server to database unless it exists already - if (!$server = get_record('question_rqp_servers', 'url', $form->url)) { - $server->typeid = $type->id; - $server->url = $form->url; - $server->can_render = $serverinfo->rendering ? 1 : 0; - if (!insert_record('question_rqp_servers', $server)) { - error("Could not save server $form->url"); - } - } - // print info about new server - print_heading(get_string('serveradded', 'quiz')); - question_rqp_print_serverinfo($serverinfo); - - break; - - } - } - - if ($delete and confirm_sesskey()) { // delete server - if ($confirm) { - delete_records('question_rqp_servers', 'id', $delete); - } else { - if (!$server = get_record('question_rqp_servers', 'id', $delete)) { - error('Invalid server id'); - } - if ((count_records('question_rqp_servers', 'typeid', $server->typeid) == 1) // this is the last server of its type - and record_exists('question_rqp', 'type', $server->typeid)) { // and there are questions using it - $type = get_record('question_rqp_types', 'id', $server->typeid); - notify(get_string('serverinuse', 'quiz', $type->name)); - } - notice_yesno(get_string('confirmserverdelete', 'quiz', $server->url), 'types.php?delete='.$delete.'&sesskey='.sesskey().'&confirm=true', 'types.php'); - } - } - - if ($info) { // show info for server - if (!$server = get_record('question_rqp_servers', 'id', $info)) { - error('Invalid server id'); - } - // Check server exists and works - if (!$serverinfo = remote_server_info($server->url)) { - notify(get_string('renderingserverconnectfailed', 'quiz', $server->url)); - } else { - // print the info - print_heading(get_string('serverinfo', 'quiz')); - question_rqp_print_serverinfo($serverinfo); - } - } - - -/// Set up the table - - $table = new flexible_table('mod-quiz-questiontypes-rqp-types'); - - $table->define_columns(array('name', 'url', 'action')); - $table->define_headers(array(get_string('name'), get_string('serverurl', 'quiz'), get_string('action'))); - $table->define_baseurl($CFG->wwwroot.'/question/type/rqp/types.php'); - - //$table->sortable(true); - - $table->column_suppress('name'); - - $table->set_attribute('cellspacing', '15'); - $table->set_attribute('id', 'types'); - $table->set_attribute('class', 'generaltable generalbox'); - - // Start working -- this is necessary as soon as the niceties are over - $table->setup(); - -/// Create table rows - // Get list of types - $types = get_records('question_rqp_types', '', '', 'name ASC'); - - $strinfo = get_string('info'); - $strdelete = get_string('delete'); - $stradd = get_string('add'); - - if ($types) { - foreach ($types as $type) { - if (!$servers = get_records('question_rqp_servers', 'typeid', $type->id, 'id ASC')) { - delete_records('question_rqp_types', 'id', $type->id); - } else { - foreach ($servers as $server) { - $actions = ''.$strinfo.' '.$strdelete.''; - $serverurl = ($info == $server->id) ? ''.$server->url.'' : $server->url; - $table->add_data(array($type->name, $serverurl, $actions)); - } - $table->add_data(array('','','')); - } - } - } - - // add input fields for adding new server - $typeinput = ''; - $urlinput = ''; - $addbutton = ''; - $table->data[] = array($typeinput, $urlinput, $addbutton); - -/// Print the table - print_heading_with_help($stritemtypes, 'rqp', 'quiz'); - echo '
'; - echo '
'; - echo ''; - echo '
'; - $table->print_html(); - echo '
'; - echo '
'; - echo '
'; - -/// Finish the page - print_footer(); - -?> diff --git a/question/type/rqp/version.php b/question/type/rqp/version.php deleted file mode 100644 index 2d2a8d9fa7f..00000000000 --- a/question/type/rqp/version.php +++ /dev/null @@ -1,6 +0,0 @@ -version = 2006032200; -$plugin->requires = 2006032200; - -?> diff --git a/question/type/shortanswer/db/mysql.sql b/question/type/shortanswer/db/mysql.sql deleted file mode 100644 index 5ce8966bcb7..00000000000 --- a/question/type/shortanswer/db/mysql.sql +++ /dev/null @@ -1,16 +0,0 @@ - - --- --- Table structure for table `prefix_question_shortanswer` --- - -CREATE TABLE prefix_question_shortanswer ( - id int(10) unsigned NOT NULL auto_increment, - question int(10) unsigned NOT NULL default '0', - answers varchar(255) NOT NULL default '', - usecase tinyint(2) NOT NULL default '0', - PRIMARY KEY (id), - KEY question (question) -) TYPE=MyISAM COMMENT='Options for short answer questions'; - --- -------------------------------------------------------- \ No newline at end of file diff --git a/question/type/shortanswer/db/postgres7.sql b/question/type/shortanswer/db/postgres7.sql deleted file mode 100644 index ff58a0b0f1a..00000000000 --- a/question/type/shortanswer/db/postgres7.sql +++ /dev/null @@ -1,14 +0,0 @@ - -# -------------------------------------------------------- - -# -# Table structure for table prefix_question_shortanswer -# - -CREATE TABLE prefix_question_shortanswer ( - id SERIAL PRIMARY KEY, - question integer NOT NULL default '0', - answers varchar(255) NOT NULL default '', - usecase integer NOT NULL default '0' -); -CREATE INDEX prefix_question_shortanswer_question_idx ON prefix_question_shortanswer (question); diff --git a/question/type/truefalse/db/mysql.sql b/question/type/truefalse/db/mysql.sql deleted file mode 100644 index 675df73f3bc..00000000000 --- a/question/type/truefalse/db/mysql.sql +++ /dev/null @@ -1,13 +0,0 @@ - --- --- Table structure for table `prefix_question_truefalse` --- - -CREATE TABLE prefix_question_truefalse ( - id int(10) unsigned NOT NULL auto_increment, - question int(10) unsigned NOT NULL default '0', - trueanswer int(10) unsigned NOT NULL default '0', - falseanswer int(10) unsigned NOT NULL default '0', - PRIMARY KEY (id), - KEY question (question) -) TYPE=MyISAM COMMENT='Options for True-False questions'; \ No newline at end of file diff --git a/question/type/truefalse/db/postgres7.sql b/question/type/truefalse/db/postgres7.sql deleted file mode 100644 index 07cb9eb5edd..00000000000 --- a/question/type/truefalse/db/postgres7.sql +++ /dev/null @@ -1,13 +0,0 @@ - -# -------------------------------------------------------- -# -# Table structure for table prefix_question_truefalse -# - -CREATE TABLE prefix_question_truefalse ( - id SERIAL PRIMARY KEY, - question integer NOT NULL default '0', - trueanswer integer NOT NULL default '0', - falseanswer integer NOT NULL default '0' -); -CREATE INDEX prefix_question_truefalse_question_idx ON prefix_question_truefalse (question); diff --git a/question/upgrade.php b/question/upgrade.php index ddf329c9675..12701a02e8c 100644 --- a/question/upgrade.php +++ b/question/upgrade.php @@ -32,4 +32,22 @@ function question_check_no_rqp_questions($result) { } return $result; } + +function question_remove_rqp_qtype() { + $result = true; + + $table = new XMLDBTable('question_rqp_states'); + $result = $result && drop_table($table); + + $table = new XMLDBTable('question_rqp'); + $result = $result && drop_table($table); + + $table = new XMLDBTable('question_rqp_types'); + $result = $result && drop_table($table); + + $table = new XMLDBTable('question_rqp_servers'); + $result = $result && drop_table($table); + + return $result; +} ?> diff --git a/theme/cornflower/styles_color.css b/theme/cornflower/styles_color.css deleted file mode 100644 index 1989e934a27..00000000000 --- a/theme/cornflower/styles_color.css +++ /dev/null @@ -1,787 +0,0 @@ -/******************************************************************* - styles_color.css - - This CSS file contains all color definitions like - background-color, font-color, border-color etc. - - Styles are organised into the following sections: - - core - header - footer - - admin - blocks - calendar - course - doc - login - message - tabs - user - - various modules - -*******************************************************************/ - -/*** - *** Core - ***/ - -a:link, -a:visited { - color:#4A677F; -} - -a.dimmed:link, -a.dimmed:visited { - color:#AAAAAA; -} - -a:hover { - color:#ffffff; - background-color: #4A677F; -} - -a.autolink:link, -a.autolink:visited { - color:#000000; - background: #DDDDDD; -} - -a.autolink.glossary:hover { - cursor: help; -} - -body { - background-color:#739FC4; - border-color:#F7F7F7; -} - -th.header, -td.header, -div.header { - background-color: #739FC4; -} - -.navbar { - background-color:#D0E2EE; - border-color:#D0E2EE; - -} - -table.formtable tbody th { - background: none; -} - -.highlight { - background-color:#AAFFAA; -} - -.highlight2 { - color:#AA0000; /* highlight missing terms in forum search */ -} - -/* Alternate rows even */ -.r0 { -} - -/* Alternate rows odd */ -.r1 { -} - -/* notification messages (can be good or bad) */ -.notifyproblem { - color:#660000; -} -.notifysuccess { - color:#006600; -} - -.required { - background-color:#DDDDDD; -} - -.generalbox { - border-color:#739FC4; -} -.informationbox { - border-color:#739FC4; -} -.feedbackbox { - border-color: #739FC4; -} -.feedbackby { - background-color:#BBBBBB; -} - -.noticebox { - border-color:#739FC4; -} - -.errorbox { - color:#ffffff; - border-color:#739FC4; - background-color:#990000; -} - -.tabledivider { - border-color:#739FC4; -} - -.sitetopic { -} - -.sitetopiccontent { - border-color:#739FC4; - background-color:#FFFFFF; -} - -.dimmed_text { - color:#AAAAAA; -} - -.teacheronly { - color:#990000; -} - -.unread { - background: #78A2CD; -} - -.censoredtext { - color:#000000; - background:#000000; -} - - -/* kept for backward compatibility with some non-standard modules - which use these classes for various things */ -.generaltab, .generaltabinactive { - background-color:#BBBBBB; -} -.generaltabselected { - background-color:#DDDDDD; -} -.generaltabinactive { - color:#CCCCCC; -} - - - -/*** - *** Header - ***/ - -/*** - *** Footer - ***/ - -.homelink a:link, -.homelink a:visited, -.homelink a:hover { - background-color: #739FC4; - color: #000; - text-decoration: none; -} -.homelink a:link, -.homelink a:visited { - border-top: 1px solid #cecece; - border-bottom: 2px solid #4a4a4a; - border-left: 1px solid #cecece; - border-right: 2px solid #4a4a4a; -} -.homelink a:hover { - border-bottom: 1px solid #cecece; - border-top: 2px solid #4a4a4a; - border-right: 1px solid #cecece; - border-left: 2px solid #4a4a4a; -} - - -/*** - *** Admin - ***/ - -.admin .generalboxcontent { - background-color:#EEEEEE; -} - -.admin .generalbox { - border-color:#739FC4; -} - -.admin .informationbox { - border-color:#739FC4; - background-color:#FFFFFF; -} - -body#admin-index .c0 { - background-color: #FAFAFA; -} - - - -/*** - *** Blocks - ***/ - -.sideblock { - border-top: 1px solid #739FC4; - border-right: 1px solid #4A677F; - border-bottom: 2px groove #4A677F; - border-left: 1px solid #4A677F; -} - - - -.sideblock .header { - background-color: #739FC4; - border-bottom: 2px groove #739FC4; -} - -.sideblock .content { - background-color:#FFFFFF; -} - -.sideblock .content hr { -} - -.sideblock .list { -} -.sideblock .header .hide-show img.hide-show-image { - background: url('../../pix/t/switch_minus.gif') no-repeat bottom; -} - -.sideblock.hidden .header .hide-show img.hide-show-image { - background: url('../../pix/t/switch_plus.gif') no-repeat bottom; -} - - - -/*** - *** Calendar - ***/ - -#calendar .maincalendar, -#calendar .sidecalendar { - border-color: #739FC4; -} - -#calendar .maincalendar table.calendarmonth th { - border-color: #000000; -} - -table.minicalendar { - border-color:#739FC4; -} - -#calendar .maincalendar .eventlist .event { - border-color:#739FC4; -} - -#calendar .maincalendar .eventlist .event .topic, -#calendar .maincalendar .eventlist .event .picture, -#calendar .maincalendar .eventlist .event .side { - background-color:#FFFFFF; -} - -#calendar .maincalendar table.calendarmonth ul.events-underway { - color:#739FC4; -} - -#calendar .event_global, -.minicalendar .event_global, -.block_calendar_month .event_global { - border-color:#2EBA0E !important; - background-color:#2EBA0E; -} - -#calendar .event_course, -.minicalendar .event_course, -.block_calendar_month .event_course { - border-color:#FF9966 !important; - background-color:#FF9966; -} - -#calendar .event_group, -.minicalendar .event_group, -.block_calendar_month .event_group { - border-color:#FBBB23 !important; - background-color:#FBBB23; -} - -#calendar .event_user, -.minicalendar .event_user, -.block_calendar_month .event_user { - border-color:#A1BECB !important; - background-color:#A1BECB; -} - -#calendar .duration_global, -.minicalendar .duration_global { - border-top-color:#2EBA0E !important; - border-bottom-color:#2EBA0E !important; -} - -#calendar .duration_course, -.minicalendar .duration_course { - border-top-color:#FF9966 !important; - border-bottom-color:#FF9966 !important; -} - -#calendar .duration_group, -.minicalendar .duration_group { - border-top-color:#FBBB23 !important; - border-bottom-color:#FBBB23 !important; -} - -#calendar .duration_user, -.minicalendar .duration_user { - border-top-color:#A1BECB !important; - border-bottom-color:#A1BECB !important; -} - -#calendar .weekend, -.minicalendar .weekend { - color:#FF0000; -} - -#calendar .today, -.minicalendar .today { - border-color:#000000 !important; -} - -.cal_popup_fg { - background-color:#FFFFFF; -} - -.cal_popup_bg { - border-color:#000000; - background-color:#FFFFFF; -} - -#calendar .maincalendar .filters table, -#calendar .sidecalendar .filters table, -.block_calendar_month .filters table { - background-color: #FFFFFF; -} - - - -/*** - *** Course - ***/ - -/* course, entry-page, login */ -.headingblock { - border-top: 1px solid #739FC4; - border-right: 1px solid #4A677F; - border-bottom: 2px groove #4A677F; - border-left: 1px solid #4A677F; -} - -/* course */ -.headingblock .outline { - border-color:#739FC4; -} - - -#course-view .section td { - border-color:#739FC4; -} - -#course-view .section .content { - background-color:#FFFFFF; -} - -#course-view .section .side { - background: #739FC4; -} - -#course-view .section .left { - background: #739FC4; -} - -#course-view .section .right { - -} - -#course-view .current .side{ - background: #A2BED8; -} - -#course-view .topics { -} - -#course-view .weeks { -} - -#course-view .section .spacer { -} - -#course-view .section .weekdates { - color:#4A677F; -} - -.categoryboxcontent, -.courseboxcontent { - border-top: 1px solid #739FC4; - border-right: 1px solid #4A677F; - border-bottom: 2px groove #4A677F; - border-left: 1px solid #4A677F; - background: #FFFFFF; -} -body#course-user .section { - border-color:#AAAAAA; -} - - - -/*** - *** Doc - ***/ - -/*** - *** Login - ***/ - -.loginbox, -.loginbox.twocolumns .loginpanel, -.loginbox .subcontent { - border-color:#739FC4; -} - - -/*** - *** Message - ***/ - -table.message_search_results td { - border-color:#739FC4; -} - -.message .author { - color: #739FC4; -} - -.message .time { - color: #739FC4; -} - -.message .content { -} - - -/*** - *** Tabs - ***/ - -.tablink a:link, -.tablink a:visited { - color:#4A677F; -} - -.tablink a:hover{ - background-color:#4A677F; - color:#FFFFFF; -} - -.selected .tablink a:link, -.selected .tablink a:visited { - color:#4A677F; -} - -.selected .tablink a:hover { - color:#FFFFFF; - background-color:#4A677F; -} - -.tabs .side { - border-color: #AAAAAA; -} -.tabrow td { - background:url(pix/tab/left.gif) top left no-repeat; -} -.tabrow td .tablink { - background:url(pix/tab/right.gif) top right no-repeat; -} -.tabrow td:hover { - background-image:url(pix/tab/left_hover.gif); -} -.tabrow td:hover .tablink { - background-image:url(pix/tab/right_hover.gif); -} -.tabrow .last span { - background:url(pix/tab/right_end.gif) top right no-repeat; -} -.tabrow .selected { - background:url(pix/tab/left_active.gif) top left no-repeat; -} -.tabrow .selected .tablink { - background:url(pix/tab/right_active.gif) top right no-repeat; -} -.tabrow td.selected:hover { - background-image:url(pix/tab/left_active_hover.gif); -} -.tabrow td.selected:hover .tablink { - background-image:url(pix/tab/right_active_hover.gif); -} - - -/*** - *** User - ***/ - -.userpicture { - background:#EEEEEE; -} - -.userinfobox { - border-color: #739FC4; - background-color: #F7F7F7; -} -.groupinfobox { - border-color: #739FC4; - background-color: #FCFCFC; -} - - -/*** - *** Modules: Assignment - ***/ - -.assignmentsubmission { -} - -.assignmentnew .assignmentfeedback{ - background-color:#DDDDDD; -} - -.assignmentold .assignmentfeedback{ - background-color:#BBBBBB; -} - -.assignmentheading { - background-color:#BBBBBB; -} - - -/*** - *** Modules: Chat - ***/ - -/*** - *** Modules: Choice - ***/ - -/*** - *** Modules: Forum - ***/ - -.forumheaderlist, -.forumpost { - border-color:#1D5083; -} - -.forumpost .content { - background: #FFFFFF; -} - -.forumpost .left { - background:#739FC4; -} - -.forumpost .topic { - border-bottom-color: #739FC4; - background:#D0E2EE; - -} - -.forumpost .starter { - background:#739FC4; -} - -.forumheaderlist .discussion .starter { - background:#D0E2EE; -} - -.forumheaderlist td { - border-color: #739FC4; -} - -.sideblock .post .head { - color:#555555; -} - -.forumthread .unread { - background: #78A2CD; -} -#mod-forum-discuss .forumpost { - background: none; -} - -#mod-forum-discuss .unread .forumpost .message { - border-color: #78A2CD; -} -#mod-forum-discuss .forumthread .unread { -} - -#mod-forum-index .unread { -} - - -/*** - *** Modules: Glossary - ***/ - -.entryboxheader { - border-color: #BBBBBB; -} - -.entrybox { - border-color: #BBBBBB; -} - -.entry { -} - -.glossarypost { - border-color: #739FC4; -} - -.glossarypost .entryheader, -.glossarypost .entryapproval, -.glossarypost .picture, -.glossarypost .entryattachment, -.glossarypost .left { - background-color: #F0F0F0; -} - -.glossarycomment { - border-color: #739FC4; -} - -.glossarycomment .entryheader, -.glossarycomment .picture, -.glossarycomment .left { - background-color: #F0F0F0; - -} - -#mod-glossary-report .generalbox .teacher { - background: #F0F0F0; -} - -.glosarycategoryheader { - background-color: #739FC4; -} - -.glossaryformatheader { - background-color: #739FC4; -} - - -/*** - *** Modules: Journal - ***/ - -#mod-journal-view .feedbackbox .left, -#mod-journal-view .feedbackbox .entryheader { - background-color: #739FC4; -} - -/*** - *** Modules: Label - ***/ - -/*** - *** Modules: Lesson - ***/ - -/*** - *** Modules: Quiz - ***/ - -body#mod-quiz-report table#attempts td { - border-color: #739FC4; -} -body#mod-quiz-report table#attempts .r1 { - background-color: #eeeeee; -} - - -/*** - *** Modules: Resource - ***/ - -/*** - *** Modules: Scorm - ***/ - -/*** - *** Modules: Survey - ***/ - -#mod-survey-view .r0 { - background-color: #EEEEEE; -} -#mod-survey-view .r1 { - background-color: #DDDDDD; -} - - -/*** - *** Modules: Wiki - ***/ - -/*** - *** Modules: Workshop - ***/ - -.workshoppostpicture { - background-color:#FEE6B9; -} - -.workshopassessmentheading { - background-color:#DDDDDD; -} - -.headermenu a:link { - text-decoration: none; - color: #ffffff; -} -.headermenu a:visited { - text-decoration: none; - color: #ffffff; -} -.headermenu a:hover { - text-decoration: underline; - color: #ffffff; -} - -.headerhomemain { - font-size: x-large; - font-weight: bold; -} - -.headerhomemenu a:link { - text-decoration: none; - color: #ffffff; -} -.headerhomemenu a:visited { - text-decoration: none; - color: #ffffff; -} -.headerhomemenu a:hover { - text-decoration: underline; - color: #ffffff; -} - -.cornflowersurround { - background: #D0E2EE; -} - -#header-home { - background: #739FC4; -} diff --git a/theme/cornflower/styles_fonts.css b/theme/cornflower/styles_fonts.css deleted file mode 100644 index d2d79978966..00000000000 --- a/theme/cornflower/styles_fonts.css +++ /dev/null @@ -1,500 +0,0 @@ -/******************************************************************* - styles_color.css - - This CSS file contains all font definitions like family, size, - weight, text-align, letter-spacing etc. - - Styles are organised into the following sections: - core - header - footer - - admin - blocks - calendar - course - doc - login - message - tabs - user - - various modules - -*******************************************************************/ - - -/*** - *** Core - ***/ - -.clearer { - font-size:1px; -} - -body, td, th, li { - font-family:"Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; - font-size:0.95em; -} - -th { - font-weight: bold; -} - -a:link, -a:visited { - text-decoration:none; -} - -a:hover { - text-decoration: underline; -} - -h1.main, -h2.main, -h3.main, -h4.main, -h5.main, -h6.main { - font-weight:bold; -} - -h1 { - font-size:1.7em; -} - -h2 { - font-size:1.4em; -} -h3 { - font-size:1.1em; -} -h4 { - font-size:1.0em; -} - -.bold { - font-weight:bold; -} - -.warning { - font-weight: bold; - font-style: italic; -} - -.errorbox .title { - font-weight: bold; - font-size: 1.2em; - text-align: center; -} - -.pagingbar .title { - font-weight: bold; -} -.pagingbar .thispage { - font-weight: bold; -} - -.categorybox .category { - font-size:1.2em; - font-weight:bold; -} - -.helplink { - font-size:0.8em; -} - -.headingblock { - font-weight: normal; -} - -.headingblock .header .title { -font-weight:normal; - float: left; -} - -.headingblock .link { - font-size: 0.9em; -} - -.files .file { - font-size: 0.9em; -} - -.files .folder { - font-size: 0.9em; -} - -.files .folder .size { - font-weight: bold; -} - - -/*** - *** Header - ***/ - -.headermain { - font-weight:bold; -} - -#header-home .headermain { - font-size:1.5em; -} - -#header .headermain { - font-size:1.3em; -} - -.breadcrumb { - font-size:0.9em; - font-weight:bold; -} - -.logininfo, -#header-home .headermenu font { - font-size:x-small; -} - - -/*** - *** Footer - ***/ - -.homelink { -} - - - -/*** - *** Admin - ***/ - -table.formtable tbody th { - font-weight: normal; - text-align: right; -} - - -/*** - *** Blocks - ***/ - -.sideblock .content h3, -.sideblock .content h2 { - font-size:1.0em; -} -.sideblock .header .commands { - font-size: 0.75em; -} - -.sideblock .header .title { -font-weight:normal; -} - -.sideblock .footer { - font-size:0.75em; -} - -.sideblock .head, -.sideblock .info { - font-size: 0.85em; -} - -.sideblock .date { - font-style: italic; -} - - - -/*** - *** Calendar - ***/ - -#calendar .maincalendar .eventlist .event .referer { - font-weight:bold; -} - -#calendar .maincalendar .eventlist .event .course { - font-size:0.8em; -} - -#calendar .maincalendar .eventlist .event .description .commands { - text-align: right; -} - -#calendar .maincalendar table.calendarmonth td { - font-size:0.8em; -} - -#calendar div.header -{ - font-weight:bold; -} - -#calendar .sidecalendar .filters { - font-size:0.75em; -} - -#calendar .maincalendar .controls { - font-size:1.2em; -} - -#calendar .maincalendar .day { - font-weight: bold; -} - -table.minicalendar { - font-size:0.85em; -} - -.cal_popup_caption { - font-family:sans-serif; - font-size:0.8em; - font-weight:bold; -} - -.cal_popup_close { - font-family:sans-serif; - font-size:0.8em; - font-weight:bold; -} -#calendar .maincalendar .calendar-controls .current { - font-weight: bold; -} - - -/*** - *** Course - ***/ - -.activitydate, .activityhead { - font-size:0.7em; -} - -.weeklydatetext { - font-size:0.9em; - font-weight:bold; -} - -.coursebox .info { - font-size:1em; -} - -.coursebox .teachers, -.coursebox .cost { - font-size:0.8em; -} - -.coursebox .summary { - font-size:0.7em; -} - - -#course-view .section .left { - font-weight:bold; -} - - - -/*** - *** Doc - ***/ -body#doc-contents h1 { - font-size: 1em; -} -body#doc-contents ul { - font-size: 0.8em; -} - - - -/*** - *** Login - ***/ - - -/*** - *** Message - ***/ - -.message_summary_link { - font-size:small; -} - -.message_link { - font-size:x-small; -} - -.message_form { - font-size:0.78em; -} - -.message_heading { - font-size:medium; - font-weight:bold; -} - -.message_date, -.message_contact, -.message_summary { - font-size:small; -} - -.message_small_note, -.message_pix { - font-size:x-small; -} - -.message .author { - font-weight: bold; -} - -.message .time { - font-style: italic; -} - -.message .content { -} - - -/*** - *** Tabs - ***/ -.tablink a:hover { - text-decoration: none; -} - - -/*** - *** User - ***/ - -.userinfobox .username { - font-weight: bold; -} - -.userinfobox .links { - font-size: 0.7em; -} - - -/*** - *** Modules: Assignment - ***/ - -/*** - *** Modules: Chat - ***/ - -/*** - *** Modules: Choice - ***/ - -/*** - *** Modules: Forum - ***/ - -.forumnodiscuss{ - font-weight:bold; -} -.forumpost .topic .subject { - font-weight: bold; -} -.forumpost .topic .author { - font-size: 0.8em; -} -.forumheaderlist .discussion .lastpost { - font-size: 0.7em; -} -body#mod-forum-search .introcontent { - font-weight:bold; -} - - - -/*** - *** Modules: Glossary - ***/ - -.glossarypost .commands { - font-size: 0.7em; -} -.glossarypost .entryheader .author { - font-size: 0.7em; - font-style: italic; -} -.concept { - font-weight: bold; -} -.glossarycomment .time { - font-size: 0.7em; - font-style: italic; -} -.entrylowersection .aliases { - font-size: 0.8em; -} -.entrylowersection .icons, -.entrylowersection .ratings { - font-size: 0.8em; -} - - - -/*** - *** Modules: Journal - ***/ -#mod-journal-view .lastedit, -#mod-journal-view .editend { - font-size: 0.7em; -} -#mod-journal-view .author { - font-size: 1em; - font-weight: bold; -} -#mod-journal-view .time { - font-size: 0.7em; - font-style: italic; -} -#mod-journal-view .grade { - font-weight: bold; - font-style: italic; -} - -/*** - *** Modules: Label - ***/ - -/*** - *** Modules: Lesson - ***/ - -/*** - *** Modules: Quiz - ***/ - -.editorhelptext { - font-size:x-small; -} - - -/*** - *** Modules: Resource - ***/ - -/*** - *** Modules: Scorm - ***/ - -/*** - *** Modules: Survey - ***/ - -/*** - *** Modules: Wiki - ***/ - -/*** - *** Modules: Workshop - ***/ - diff --git a/theme/cornflower/styles_layout.css b/theme/cornflower/styles_layout.css deleted file mode 100644 index 309b5ef79fe..00000000000 --- a/theme/cornflower/styles_layout.css +++ /dev/null @@ -1,1252 +0,0 @@ -/******************************************************************* - styles_layout.css - - This CSS file contains all layout definitions like positioning, - floats, margins, padding, borders etc. - - Styles are organised into the following sections: - core - header - footer - - admin - blocks - calendar - course - doc - login - message - tabs - user - - various modules - -*******************************************************************/ - - -/*** - *** Core - ***/ - -h1.main, -h2.main, -h3.main, -h4.main, -h5.main, -h6.main { - text-align: center; -} - -#layout-table { - width:100%; - border-collapse:separate; - margin-top: 8px; -} - -#layout-table #left-column, -#layout-table #middle-column, -#layout-table #right-column -{ - vertical-align:top; -} - -#layout-table #middle-column { - padding-left:12px; - padding-right:12px; -} - -#layout-table #left-column { - padding-left:10px; -} - -#layout-table #right-column { - padding-right:10px; -} - -.clearer { - clear:both; - margin:0px; - padding:0px; - height:1px; - border:none; - background:transparent; -} - -.continuebutton { - text-align: center; -} - -form { - margin-bottom:0px; -} - -table { - border-spacing: 0px; - border-collapse: collapse; -} - -a img { - border:none; -} -.notifyproblem { - text-align: center; - padding: 10px; -} - -.notifysuccess { - text-align:center; - padding: 10px; -} - -.generalbox { - border-width:1px; - border-style:solid; -} - -.generalbox#intro { - text-align:center; -} - -.noticebox { - border-width:1px; - border-style:solid; -} -.errorbox { - border-width:1px; - border-style:solid; - margin: 1em 15%; - width: 70%; -} -.errorbox .title { - padding: 5px; -} -.informationbox { - border-width:1px; - border-style:solid; -} -.feedbackbox { - border-width:1px; - border-style:solid; -} -.feedbackby { -} -.feedback { -} -.initialbar { - text-align: center; -} - -#help .indent { - margin-left:3em; -} - -.tabledivider { - border-width:1px; - border-style:solid; - border-left:0px; - border-right:0px; - border-top:0px; -} - -.sitetopic { - margin-bottom:20px; -} - -.sitetopiccontent { - border-width:1px; - border-style:solid; -} - -.pagingbar { - text-align:center; -} -.pagingbar a { - padding-left: 10px; -} -.pagingbar .thispage { - padding-left: 10px; -} - -table.formtable { - margin: auto; -} - -table.formtable tbody th { - vertical-align: top; -} - -table.formtable tbody td, -table.formtable tbody th -{ - padding: 5px; -} - -.paging { - text-align: center; - margin: 10px 0px 10px 0px; -} - -.unread { - padding-right:2px; -} - -.cell { - vertical-align: top; -} - - -/*** - *** Header - ***/ - -#header-home { - padding:1em 0.5em; - height:2em; -} - -#header { - padding:0.1em 0.5em; -} - -.headermain { - float:left; -} - -#header .headermain { - margin:0.2em 0em; -} - -.headermenu { - float:right; - text-align:right; -} - -.navbar { - padding:3px 0.5em; - height:1.3em; - -} - -.navbar .breadcrumb { - float:left; - margin:0.2em 0em; -} - -.navbar .navbutton, -.navbar .menu { - float:right; -} - -#footer .navbar { - margin-top: 4em; -} - - -/*** - *** Footer - ***/ - -#footer { - text-align:center; -} - -.homelink { - margin: 1em 0; -} - -.homelink a { - padding-left:1em; - padding-right:1em; -} - - - -/*** - *** Admin - ***/ - -body#admin-index .c0 { - vertical-align: top; -} - -body#admin-modules table.generaltable td.cell, -body#admin-modules .generaltablecell { - padding-top: 2px; - padding-bottom: 2px; -} - -body#admin-blocks table.generaltable td.cell, -body#admin-blocks .generaltablecell { - padding-top: 1px; - padding-bottom: 1px; -} - -body#admin-config .confighelp { - display: block; - padding-bottom: 20px; -} - - -/*** - *** Blocks - ***/ - -.sideblock .content h3, -.sideblock .content h2 { - text-align: left; -} - -.sideblock { - width: 100%; - margin-bottom:1em; -} - -.sideblock .header { - background-image:url(images/sideblock.jpg); - text-align: left; - padding:4px; -} - -.sideblock .header .hide-show { - -} - -.sideblock .header .hide-show img.hide-show-image { - height:11px; - width:11px; - margin-top:0.25em; -} - -.sideblock .header .commands { - float: right; - margin-top: 0.3em; -} - -.sideblock .header .title { - -} - -.sideblock .header .commands a { - margin: 0px 2px; -} - -.sideblock .content { - padding:4px; -} - -.sideblock .content hr { - height:1px; - margin-top:4px; - margin-bottom:4px; - border:none; - border-top:1px solid; -} -.sideblock.hidden .content { - display: none; -} - -.sideblock .list { - width: 100%; -} - -.sideblock .list .c0{ - padding: 2px; -} - -.sideblock .footer { - margin-top:4px; - text-align:center; -} -.sideblock .header .icon.hide, -.sideblock .header .icon.edit { - margin-right: 6px; -} - -.sideblock .head { - margin-top: 5px; -} - - - - -/*** - *** Calendar - ***/ - -#calendar { - width: 100%; - border-spacing: 5px; - border-collapse: separate; -} - -#calendar .maincalendar, -#calendar .sidecalendar -{ - vertical-align: top; - border: 1px solid; -} - -#calendar .sidecalendar { - width: 25%; -} - -#calendar .maincalendar table.calendarmonth { - border-collapse: separate; - margin: 0px auto; - width: 98%; -} - -#calendar .maincalendar table.calendarmonth th { - padding:10px; - border-bottom:2px solid; -} - -#calendar .maincalendar table.calendarmonth td { - height: 5em; - padding-left: 4px; - padding-top: 4px; - line-height:1.2em; -} - -#calendar .maincalendar table.calendarmonth td, -table.minicalendar td, -table.minicalendar th { - width:14%; - vertical-align:top; -} -table.minicalendar td { - text-align: center; -} -#calendar .maincalendar table.calendarmonth td table td { - height: auto; -} - -#calendar div.header -{ - padding: 5px; -} - -#calendar .maincalendar .buttons { - float: right; -} - -#calendar .maincalendar .filters table, -#calendar .sidecalendar .filters table -{ - border-collapse:separate; - border-spacing: 2px; - padding: 2px; - width: 100%; -} - -#calendar .maincalendar .filters { - padding: 0px 10px; -} - -#calendar .sidecalendar .filters { - padding: 5px; -} - -#calendar .maincalendar .controls { - clear:both; - padding:10px; -} - -#calendar .maincalendar table.calendarmonth ul.events-new, -#calendar .maincalendar table.calendarmonth ul.events-underway -{ - padding:0px; - margin:0px; - list-style-type:none; -} - -#calendar .maincalendar table.calendarmonth ul li { - margin-top: 4px; -} - -table.minicalendar { - width: 100%; - margin:10px auto; - padding:2px; - border-width:1px; - border-style:solid; - border-collapse:separate; - border-spacing:1px !important; -} - -table.minicalendar th { - padding: 0px 2px; -} - -#calendar .maincalendar .eventlist { - padding: 10px; -} - -#calendar .maincalendar .eventlist .topic { - padding: 5px; - border-style:solid; - border-width: 0px; - border-bottom-color: #EEEEEE; - border-bottom-width: 1px; -} - -#calendar .maincalendar .eventlist .event { - width:100%; - margin-bottom:10px; - border-spacing:0px; - border-collapse:separate; - border-width:1px; - border-style:solid; -} - -#calendar .maincalendar .eventlist .event .name { - float:left; -} - -#calendar .maincalendar .eventlist .event .course { - float:left; - clear:left; -} - -#calendar .maincalendar .eventlist .event .date { - float:right; -} - -#calendar .maincalendar .eventlist .event .description .commands { - width:100%; -} - -#calendar .maincalendar .eventlist .event .description { - padding:5px; -} - -#calendar .maincalendar .eventlist .event .picture { - padding:8px; -} - -#calendar .maincalendar .eventlist .event .side { - width:32px; -} - -#calendar #selecteventtype table { - margin:auto; -} - -#calendar .event_global, -#calendar .event_course, -#calendar .event_group, -#calendar .event_user, -.minicalendar .event_global, -.minicalendar .event_course, -.minicalendar .event_group, -.minicalendar .event_user { - border:2px solid !important; -} - -#calendar .duration_global, -#calendar .duration_course, -#calendar .duration_group, -#calendar .duration_user, -.minicalendar .duration_global, -.minicalendar .duration_course, -.minicalendar .duration_group, -.minicalendar .duration_user -{ - border-top:2px solid !important; - border-bottom:2px solid !important; -} - -#calendar .today, -.minicalendar .today { - border:2px solid !important; -} - -.cal_popup_bg { - padding:0px; - margin:0px; - border:1px solid; -} - -.cal_popup_close { - margin-right:5px; -} - -.cal_popup_caption { - border-width:0px 0px 1px 0px; - border-style:solid; - padding-bottom:2px; -} - -table.calendar-controls { - width: 100%; -} - -table.calendar-controls .previous, -table.calendar-controls .next -{ - width: 12%; -} -table.calendar-controls .previous { - text-align: left; -} -table.calendar-controls .current { - text-align: center; -} -table.calendar-controls .next { - text-align: right; -} - -#calendar .maincalendar .calendar-controls .previous, -#calendar .maincalendar .calendar-controls .next -{ - width: 30%; -} - - -/*** - *** Course - ***/ -.activitydate, .activityhead { - text-align:center; -} - -#course-view .section td { - vertical-align:top; -} - -#course-view .section .content { - padding:5px; - border-style:solid; - border-width:1px; - border-left:0px; - border-right:0px; -} - -#course-view .section .side { - padding:5px; - border-style:solid; - border-width:1px; -} - -#course-view .section .left { - border-right:0px; - text-align:center; - width: 1.5em; -} - -#course-view .section .right { - border-left:0px; - text-align:center; - width: 1.5em; -} - -#course-view .current .side { -} - -#course-view .topics { - margin-top: 9px; -} - -#course-view .weeks { - margin-top: 9px; -} - -#course-view .section .spacer { - height:0.5em; -} - -#course-view .section .weekdates { -} - -.section .activity img.activityicon { - vertical-align:middle; - height:16px; - width:16px; -} - -.section img.movetarget { - height:16px; - width:80px; -} - -body#course-view .unread { - margin-left: 3em; -} - -body#course-enrol .generalbox { - margin-top: 20px; -} -body#course-enrol .coursebox { - margin-top: 20px; -} - -body#course-user .graph { - text-align: center; -} - -body#course-user .section, -body#course-user .content { - margin-left: 30px; - margin-right: 30px; -} - -body#course-user .section { - border-width:1px; - border-style:solid; - padding:10px; - margin-bottom: 20px; -} - -body#course-user .section h2 { - margin-top: 0px; -} - - -.headingblock { - padding:5px; -} - -.headingblock header{ - -} - -.headingblock .link { - text-align:right; -} - -body#site-index .headingblock { - margin-bottom: 8px; -} - -.coursebox { - margin-bottom: 8px; -} - -.categoryboxcontent, -.courseboxcontent { - border-width:1px; - border-style:solid; -} - - - -/*** - *** Doc - ***/ - -body#doc-contents h1 { - margin: 1em 0px 0px 0px; -} - -body#doc-contents ul { - list-style-type: none; - margin: 0px; - padding: 0px; - width: 90%; -} - - -/*** - *** Login - ***/ - -.loginbox .content { - border-width:1px; - border-style:solid; - padding:15px; -} - - -/*** - *** Message - ***/ - -.message_link { - vertical-align:middle; -} - -.message_search_results { - border-collapse:collapse; - border-spacing:0px; -} - -table.message_search_results td { - padding:5px; - border-width:1px; - border-style:solid; -} -.message_summary_link { - text-align:right; -} -.message_heading { - text-align:center; -} - - -/*** - *** Tabs - ***/ - -.tabs { - width: auto; - margin-bottom: 15px; -} -.tabs .side { - border-style: solid; - border-width: 0px 0px 1px 0px; - width: 50%; -} - -.tabrow { - border-collapse:collapse; - width:100%; - margin:0; -} -.tabrow td { - height:34px; - padding:0 0 0 14px; -} -.tabrow th { - display:none; -} -.tabrow td .tablink { - display:block; - height:34px; - line-height:38px; - padding:0 14px 0 0; - text-align:center; - white-space:nowrap; - text-decoration:none; -} -.tabrow .last span { - display:block; - padding:0px 1px 0px 0px; -} - -.tabrow .selected .tablink { - line-height:38px; -} - - -/*** - *** User - ***/ - -.userinfobox { - margin-bottom:5px; - border-width: 1px; - border-style: solid; - border-collapse: separate; -} - -.userinfobox .left { - padding: 10px; - width: 100px; - vertical-align: top; -} - -.userinfobox .content { - padding: 10px; - vertical-align: top; -} - -.userinfobox .links { - width: 100px; - padding: 5px; - vertical-align: bottom; -} - -.userinfobox .list td { - padding: 3px; -} - -.userinfobox .username { - padding-bottom: 20px; -} - - -table.userinfobox { - width: 80%; - margin-left: 10%; - margin-right: 10%; -} - -table.groupinfobox { - width: 60%; - margin-left: 20%; - margin-right: 20%; - border-width:1px; - border-style:solid; - margin-bottom: 20px; -} - -.groupinfobox .left { - padding: 10px; - width: 100px; - vertical-align: top; -} -body#user-index #longtimenosee { - text-align:center; -} - - -/*** - *** Modules: Assignment - ***/ - -/*** - *** Modules: Chat - ***/ - -/*** - *** Modules: Choice - ***/ - -/*** - *** Modules: Forum - ***/ - -.forumheaderlist, -.forumpost { - border-width:1px; - border-style:solid; - border-collapse:separate; -} - -.forumpost { - margin-top: 15px; -} - -.forumpost .topic { - padding: 4px; - border-style:solid; - border-width: 0px; - border-bottom-width: 1px; -} - -.forumpost .commands { - padding-top: 0.5em; - text-align:right; -} - -.forumpost .ratings { - padding-top: 1em; - text-align:right; -} - -.forumpost .content { - padding: 4px; -} - -.forumpost .footer { - padding-top: 0.5em; - text-align:right; -} - -.forumpost .link { - padding-top: 0.5em; - text-align:right; -} - -.forumpost .left { - width: 35px; - padding: 4px; - text-align: center; - vertical-align: top; -} - -.mod-forum .indent { - margin-left: 30px; -} - -body#user-view .forumpost, -.course .forumpost { - width: 100%; -} - -body#mod-forum-search .c0 { - text-align: right; -} - -body#mod-forum-search .introcontent { - padding: 15px; -} - -.forumolddiscuss { - text-align: right; -} - -.forumheaderlist { - width: 100%; -} - -.forumheaderlist td { - border-width:1px 0px 0px 1px; - border-style:solid; -} - -.forumheaderlist .replies { - text-align: center; -} - -.forumheaderlist .picture { - width: 35px; -} - -.forumheaderlist .discussion .starter { - vertical-align: middle; -} - -.forumheaderlist .discussion .lastpost { - white-space: nowrap; -} - -.forumheaderlist .discussion .author { - white-space: nowrap; -} -.forumolddiscuss { - text-align:right; -} -.forumaddnew, -.forumnodiscuss, -.noticeboxcontent { - text-align:center; -} -#mod-forum-view .unread { - padding-left: 3px; - padding-right: 3px; -} -#mod-forum-discuss .unread .forumpost .message { - border-style: solid; - border-width: 2px; -} - - -/*** - *** Modules: Glossary - ***/ - -.glossarypost .commands { - width: 200px; - white-space: nowrap; -} - -.entryboxheader { - border-width: 1px 1px 0px 1px; - border-style: solid; -} - -.entrybox { - border-width: 0px 1px 1px 1px; - border-style: solid; -} - -.glossarypost { - width: 95%; - border-width:1px; - border-style:solid; - border-collapse:separate; - margin-bottom: 5px; - text-align: left; -} - - -.entrylist { - border-width:0px; -} - -.entrylowersection { - padding-top: 10px; -} -.entrylowersection table{ - width: 100%; -} -.entrylowersection .aliases { - text-align:center; -} -.entrylowersection .icons, -.entrylowersection .ratings { - text-align:right; - padding-right: 5px; -} -.entrylowersection .ratings { - padding-bottom: 2px; -} -.glossarycategoryheader { - width: 95%; -} -.glossaryformatheader { - width: 90%; -} - -.glossarypost .entry { - padding: 3px; -} - -.glossarypost .picture { - width: 35px; -} - -.glossarycomment { - border-width:1px; - border-style:solid; - border-collapse:separate; - margin-bottom: 5px; - text-align: left; -} - - -.glossarycomment .entry { - padding: 3px; -} - -.glossarycomment .picture { - width: 35px; -} - -.glossarycomment .icons { - text-align: right; -} - -.glossarydisplay { - width: 70%; -} - -.glossarydisplay .tabs { - width: 100%; -} - -.glossarydisplay .separator { - width: 4px; -} - -.glossarydisplay .tabs .selected, -.glossarydisplay .tabs .inactive, -.glossarydisplay .tabs .general { -} - -.glossarypopup { - width: 95%; -} - -.glossaryapproval { - width: 100%; -} - -.mod-glossary .tabs { - margin-bottom: 0px; -} -.mod-glossary .tabs .side { - border-style: none; - border-width: 0px; - width: auto; -} - - -/*** - *** Modules: Journal - ***/ -#mod-journal-view .lastedit, -#mod-journal-view .editend { - margin: 5px; - text-align: center; -} -#mod-journal-view .feedbackbox { - width: 75%; - border-collapse: separate; -} -#mod-journal-view .entrycontent { - padding: 3px; -} -#mod-journal-view .picture { - width: 35px; -} -#mod-journal-view .grade { - text-align: right; -} -#mod-journal-view .info { - margin-bottom: 5px; - text-align: right; -} - - -/*** - *** Modules: Label - ***/ - -/*** - *** Modules: Lesson - ***/ - -/*** - *** Modules: Quiz - ***/ - -.feedbacktext { - display:block; -} - -body#mod-quiz-report table#attempts, -body#mod-quiz-report table#commands -{ - width: 80%; - margin: auto; -} -body#mod-quiz-report table#attempts { - margin: 20px auto; -} -body#mod-quiz-report table#attempts .header, -body#mod-quiz-report table#attempts .cell -{ - padding: 4px; -} -body#mod-quiz-report table#attempts .header .commands { - display: inline; -} -body#mod-quiz-report table#attempts .picture { - width: 40px; -} -body#mod-quiz-report table#attempts td { - border-left-width: 1px; - border-right-width: 1px; - border-left-style: solid; - border-right-style: solid; -} -.feedbacktext { - text-align:right; -} -body#mod-quiz-report table#attempts .header { - text-align: left; -} -body#mod-quiz-report table#attempts .picture { - text-align: center !important; -} -body#mod-quiz-report .controls { - text-align: center; -} - - - -/*** - *** Modules: Resource - ***/ - -/*** - *** Modules: Scorm - ***/ - -/*** - *** Modules: Survey - ***/ - -/*** - *** Modules: Wiki - ***/ - -/*** - *** Modules: Workshop - ***/ - -#header-home { - height:112px; -} diff --git a/theme/cornflower/styles_moz.css b/theme/cornflower/styles_moz.css deleted file mode 100644 index d757febb281..00000000000 --- a/theme/cornflower/styles_moz.css +++ /dev/null @@ -1,331 +0,0 @@ -/******************************************************************* - styles_moz.css - - This CSS file uses the non-standard Mozilla CSS extensions - to add round corners to the current theme. - - Styles are organised into the following sections: - core - header - footer - - admin - blocks - calendar - course - doc - login - message - tabs - user - - various modules - -*******************************************************************/ - - - -/*** - *** Core - ***/ - -.headingblock { - -moz-border-radius:3px; -} - -.notifyproblem { - -moz-border-radius:10px; -} - -.notifysuccess { - -moz-border-radius:10px; -} -.generalbox { - -moz-border-radius-topleft:3px; - -moz-border-radius-topright:3px; - -moz-border-radius-bottomleft:15px; - -moz-border-radius-bottomright:15px; -} - -.generalboxcontent { - -moz-border-radius-topleft:3px; - -moz-border-radius-topright:3px; - -moz-border-radius-bottomleft:15px; - -moz-border-radius-bottomright:15px; -} - -.noticebox { - -moz-border-radius:5px; -} - -.informationbox { - -moz-border-radius-topleft:3px; - -moz-border-radius-topright:3px; - -moz-border-radius-bottomleft:15px; - -moz-border-radius-bottomright:15px; -} - -.informationboxcontent { - -moz-border-radius-topleft:3px; - -moz-border-radius-topright:3px; - -moz-border-radius-bottomleft:15px; - -moz-border-radius-bottomright:15px; -} - -.sitetopiccontent { - -moz-border-radius:15px; -} - -.headingblock { - -moz-border-radius:3px; -} - -.categorybox, .categoryboxcontent, -.coursebox, .courseboxcontent { - -moz-border-radius:20px; -} - - - - -/* kept for backward compatibility with some non-standard modules - which use these classes for various things */ -.generaltab, .generaltabinactive{ - -moz-border-radius-topleft:15px; - -moz-border-radius-topright:15px; -} - -.generaltabselected { - -moz-border-radius-topleft:15px; - -moz-border-radius-topright:15px; -} - - -/*** - *** Header - ***/ - -/*** - *** Footer - ***/ - -/*** - *** Admin - ***/ - -/*** - *** Blocks - ***/ -.sideblock { - -moz-border-radius-bottomleft:20px; - -moz-border-radius-bottomright:20px; -} - -.sideblock.hidden { - -moz-border-radius: 0px; -} - -.sideblock { - -moz-border-radius-bottomleft:20px; - -moz-border-radius-bottomright:20px; -} - -.sideblock .content { - -moz-border-radius-bottomleft:20px; - -moz-border-radius-bottomright:20px; -} - - -.block_course_summary, .block_course_summary .content { - -moz-border-radius:20px; -} - - - -/*** - *** Calendar - ***/ - -#calendar .eventlist .event { - -moz-border-radius-bottomleft:15px; - -moz-border-radius-bottomright:15px; -} - -#calendar .eventlist .event .side { - -moz-border-radius-bottomleft:15px; -} - -#calendar .eventlist .event .description { - -moz-border-radius-bottomright:15px; -} - -#calendar .maincalendar, -#calendar .sidecalendar -{ - -moz-border-radius-bottomright:20px; - -moz-border-radius-bottomleft:20px; -} - -#calendar .maincalendar .filters table, -#calendar .sidecalendar .filters table, -.sideblock.block_calendar_month .filters table -{ - -moz-border-radius:4px; -} - -table.minicalendar { - -moz-border-radius:10px; -} - -table.minicalendar td { - -moz-border-radius:4px; -} - -/*** - *** Course - ***/ -body#course-user .section { - -moz-border-radius:20px; -} - - -/*** - *** Doc - ***/ - -/*** - *** Login - ***/ -.loginbox { - -moz-border-radius-bottomleft:20px; - -moz-border-radius-bottomright:20px; -} - -.loginbox .content.left { - -moz-border-radius-bottomleft:20px; -} -.loginbox .content.right { - -moz-border-radius-bottomright:20px; -} - -/*** - *** Message - ***/ - -/*** - *** Tabs - ***/ - -/*** - *** User - ***/ -.userinfobox { - -moz-border-radius-bottomleft:20px; - -moz-border-radius-bottomright:20px; -} - -.groupinfobox { - -moz-border-radius-bottomleft:20px; - -moz-border-radius-bottomright:20px; -} -#user-view .left { - -moz-border-radius-bottomleft:20px; -} - -/*** - *** Modules: Assignment - ***/ - -/*** - *** Modules: Chat - ***/ - -/*** - *** Modules: Choice - ***/ - -/*** - *** Modules: Forum - ***/ -.forumpost { - -moz-border-radius-bottomleft:20px; - -moz-border-radius-bottomright:20px; -} - -.forumpost .side { - -moz-border-radius-bottomleft:20px; -} - -.forumpost .content { - -moz-border-radius-bottomright:20px; -} - -.forumpost .message { - -moz-border-radius-bottomright:20px; -} - - -/*** - *** Modules: Glossary - ***/ -.glossarycategoryheader { - -moz-border-radius-topleft:15px; - -moz-border-radius-topright:15px; -} - -.glossaryformatheader { - -moz-border-radius-topleft:15px; - -moz-border-radius-topright:15px; -} - -.entryboxheader { - -moz-border-radius-topleft:10px; - -moz-border-radius-topright:10px; -} - -.entrybox { - -moz-border-radius-bottomleft:10px; - -moz-border-radius-bottomright:10px; -} - -.glossarypost { - -moz-border-radius-bottomleft:15px; - -moz-border-radius-bottomright:15px; -} - -.glossarypost .side { - -moz-border-radius-bottomleft:15px; -} - -.encyclopedia .entrylowersection { - -moz-border-radius-bottomright:15px; -} -.glossarycomment { - -moz-border-radius-bottomleft:20px; - -moz-border-radius-bottomright:20px; -} - -.glossarycomment .side { - -moz-border-radius-bottomleft:20px; -} - -.glossarycomment .entry { - -moz-border-radius-bottomright:20px; -} - - -/*** - *** Modules: Journal - ***/ - -#mod-journal-view .feedbackbox { - -moz-border-radius-bottomleft:15px; - -moz-border-radius-bottomright:15px; -} -#mod-journal-view .feedbackbox .side { - -moz-border-radius-bottomleft:15px; -} -#mod-journal-view .feedbackbox .entrycontent { - -moz-border-radius-bottomright:15px; -} - diff --git a/version.php b/version.php index 352dc5468f7..1896cc8aa2e 100644 --- a/version.php +++ b/version.php @@ -6,7 +6,7 @@ // This is compared against the values stored in the database to determine // whether upgrades should be performed (see lib/db/*.php) - $version = 2007070602; // YYYYMMDD = date + $version = 2007070603; // YYYYMMDD = date // XY = increments within a single day $release = '1.9 dev'; // Human-friendly version name