Compare commits

...

2095 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) b15cd07d4b Moodle release 2.1.2 2011-10-09 00:49:42 +02:00
Eloy Lafuente (stronk7) ecbd8716f6 weekly release 2.1.1+ 2011-10-07 00:11:22 +02:00
Eloy Lafuente (stronk7) 7820e5047d fix permissions 2011-10-07 00:06:23 +02:00
Eloy Lafuente (stronk7) c4101db016 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2011-10-07 00:05:07 +02:00
AMOS bot d1582f14d5 Automatically generated installer lang files 2011-10-06 00:55:37 +00:00
Aparup Banerjee e153abc018 Merge branch 'wip-MDL-28615-m21-squashed' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2011-10-05 14:52:45 +08:00
Eloy Lafuente (stronk7) f1ae261bc9 Merge branch 'MDL-28469_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-10-05 01:14:47 +02:00
Eloy Lafuente (stronk7) 19fcc09ac7 Merge branch 'wip-MDL-25697-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2011-10-05 01:10:24 +02:00
Sam Hemelryk 82bd683018 MDL-28615 forum: Fixed up a couple of minor regressions 2011-10-05 11:09:28 +13:00
Eloy Lafuente (stronk7) 19c8fd9e8b Merge branch 'MDL-29644_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-10-04 23:40:23 +02:00
Tim Hunt 0bfc2dde8f MDL-29644 qtype multianswer, hints lost doing Moodle XML export.
This commit also includes a lot of useful tidying up of some of the unit
test helper code. I turned out that I could not use all the helper code
in my new tests, but despite that it will be useful in the future, so I
am committing it here.
2011-10-04 22:28:35 +01:00
Eloy Lafuente (stronk7) 807f806ed7 Merge branch 'MDL-27857-assignment-portfolio_21_STABLE' of git://github.com/mudrd8mz/moodle into MOODLE_21_STABLE 2011-10-04 12:46:24 +02:00
Eloy Lafuente (stronk7) 85dd2a674a Merge branch 'MDL-29548_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-10-04 12:37:45 +02:00
Tim Hunt fa8843c424 MDL-29548 allow message plugins to control message
defaults.

At the moment, each message_provider can specify defaults for
each message output, to say whether that message output should be
used for this type of message:
http://docs.moodle.org/dev/Messaging_2.0#Adding_new_message_type.

If the message provider does not set a default, this change allows
the message output to set the default.
2011-10-04 11:24:43 +01:00
Eloy Lafuente (stronk7) fdca6e8321 Merge branch 'MDL-19575-m21' of git://github.com/ankitagarwal/moodle into MOODLE_21_STABLE 2011-10-04 12:12:33 +02:00
Tim Hunt ae3056cb00 MDL-29520 question engine: work-around bad MySQL delete performance.
This is a temporary fix, until the new API from MDL-29589 is available.

(amended to fix comments)
2011-10-04 12:05:04 +02:00
Tim Hunt 74969d8866 MDL-29571 questions: improve class=accesshide screen-reader hints.
This changes the hint that comes before the question text. There are
unit tests to verify the new behaviour.

(amended to fix comments)
2011-10-04 11:53:07 +02:00
Tim Hunt 5e69fe4971 MDL-29571 qtype description refactor unit test code a bit. 2011-10-04 11:52:20 +02:00
Sam Hemelryk 133173e213 Merge branch 'MDL-29621_21_wip' of git://github.com/grabs/moodle into MOODLE_21_STABLE 2011-10-04 17:56:39 +13:00
Sam Hemelryk 747d6b5aac MDL-28615 forum: Fixed missing context regression 2011-10-04 16:37:04 +13:00
Sam Hemelryk 91a7a788aa Merge branch 'MDL-28725_wiki_section2_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2011-10-04 16:21:33 +13:00
Eloy Lafuente (stronk7) c3a4009a56 Merge branch 'MDL-29511_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-10-04 01:11:48 +02:00
Eloy Lafuente (stronk7) f0837f65d8 Merge branch 'MDL-29216_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-10-03 22:55:56 +02:00
Eloy Lafuente (stronk7) a70eda6cc8 Merge branch 'MDL-29341_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-10-03 22:50:30 +02:00
Eloy Lafuente (stronk7) c5c9be022d Merge branch 'MDL-29570_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-10-03 21:42:55 +02:00
Andreas Grabs 96909b1597 MDL-29621 - XHTML not welformed when creating Feedback questions 2011-10-03 18:44:55 +02:00
Tim Hunt 8f40d27954 MDL-28469 quiz settings pages should be pagelayout admin. 2011-10-03 16:38:59 +01:00
David Mudrak 59c8be2362 MDL-27857 Export to portfolio support in the assignment module improved
Portfolio API code in the assignment module expected that the current
user is the author of the submission. Therefore the "Export to
portfolio" button did not work when the submission was viewed by a
teacher (eg at the page with the list of all submissions in the Advanced
upload assignment).

This patch introduces a new callback argument 'submissionid' that holds
explicit ID of the submission the export deals with. With it available,
we do not need to expect the current user is the author of the
submission.

The patch also cleans some strings used for portfolio callback
exceptions.
2011-10-03 10:13:11 +02:00
David Mudrak f289c698a9 MDL-27857 Typo in the phpDocs fixed 2011-10-03 10:13:11 +02:00
David Mudrak daf4471a40 MDL-27857 Assignment does not use form tag to render portfolio export control widget
When this code was used as a part of the grading screen, the default
PORTFOLIO_ADD_FULL_FORM widget led to nested form elements. This patch replaces
the form widget with a plain text link that can be embedded safely.
2011-10-03 10:13:10 +02:00
Aparup Banerjee b056fee5ba MDL-26486 Lesson : fixed whitespace 2011-10-03 16:01:36 +08:00
Aparup Banerjee c6e321ccaf Merge branch 'MDL-26486_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2011-10-03 16:01:00 +08:00
Andrew Davis (andyjdavis) f6705d681a MDL-27640 rating: altered the return url provided by mod_data to ratings 2011-10-03 15:25:00 +08:00
Aparup Banerjee 30ed26a576 Merge branch 'wip-MDL-27867-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2011-10-03 14:29:46 +08:00
Aparup Banerjee 1e6c738c6c MDL-29541 Administration : fixed whitespace 2011-10-03 14:04:08 +08:00
Aparup Banerjee 4cb89f4df4 Merge branch 'wip-mdl-29244-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2011-10-03 13:54:09 +08:00
Rajesh Taneja 1f2d15dc62 MDL-29244 Users: Fixed filter for selecting users who never logged in and course roles dropdown show all revelent roles 2011-10-03 13:46:39 +08:00
Sam Hemelryk 7d9cb204be Merge branch 'MDL-29296_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2011-10-03 17:08:51 +13:00
Sam Hemelryk e6f5ebe25b Merge branch 'MDL-29605-M21' of git://github.com/lazydaisy/moodle into MOODLE_21_STABLE 2011-10-03 16:43:09 +13:00
Sam Hemelryk 6eeb293e04 Merge branch 'wip-mdl-29539-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2011-10-03 15:09:53 +13:00
Sam Hemelryk 124414cc5e MDL-28566 theme_base: removed MDL comment 2011-10-03 15:01:06 +13:00
Sam Hemelryk 69a62c2646 Merge branch 'MDL-28566-M21' of git://github.com/lazydaisy/moodle into MOODLE_21_STABLE 2011-10-03 14:37:54 +13:00
Sam Hemelryk add033dafe Merge branch 'MDL-29323-M21' of git://github.com/lazydaisy/moodle into MOODLE_21_STABLE 2011-10-03 14:30:12 +13:00
Sam Hemelryk 90e44b5068 Merge branch 'wip-MDL-25454-MOODLE_21_STABLE' of git://github.com/marinaglancy/moodle into MOODLE_21_STABLE 2011-10-03 14:24:18 +13:00
Sam Hemelryk bf49e4404c Merge branch 'MDL-29558_2_1' of git://github.com/jamiepratt/moodle into MOODLE_21_STABLE 2011-10-03 14:04:47 +13:00
AMOS bot e4346a63ba Automatically generated installer lang files 2011-10-03 00:55:29 +00:00
Eloy Lafuente (stronk7) e438ff9942 MDL-29552 themes - show the name of the picked theme when working with device detection enabled 2011-10-03 13:30:09 +13:00
Sam Hemelryk ddf0d0dcd7 Merge branch 'MDL-29567_21' of git://github.com/stronk7/moodle into MOODLE_21_STABLE 2011-10-03 13:23:24 +13:00
Sam Hemelryk d85d6ccd3e Merge branch 'MDL-29566_21' of git://github.com/stronk7/moodle into MOODLE_21_STABLE 2011-10-03 12:49:54 +13:00
Sam Hemelryk bd90c5891f Merge branch 'MDL-29618_21' of git://github.com/stronk7/moodle into MOODLE_21_STABLE 2011-10-03 12:28:05 +13:00
Dan Poltawski e58c72d050 MDL-27295 Course Category View - Only display count when more than 0 courses 2011-10-03 11:52:09 +13:00
Eloy Lafuente (stronk7) 77be201a0f MDL-29618 backup - back to handling enrolments properly. Regession of MDL-26841, my fault, grrr 2011-10-03 00:47:28 +02:00
Sam Hemelryk 73a48291b3 MDL-28615 forum: Revised enrol_sharing_course to use the new enrol_get_shared_courses and fixed permission checking in forum_user_can_see_post 2011-10-03 11:23:56 +13:00
Mary Evans cb7699c3a9 MDL-29605-modify Afterburner menu to allow auto format 2011-10-01 23:20:29 +01:00
Tim Hunt 22ba72591c MDL-29216 multianswer qtype needs intereactive elements on the form. 2011-10-01 00:09:27 +01:00
Tim Hunt 41be2f3587 MDL-29341 qtype numerical/calc: display of mc units badly laid out. 2011-09-30 23:42:27 +01:00
Kordan 7bbad2e268 MDL-29403 fix for M21 2011-09-30 11:15:52 +02:00
Jamie Pratt fc15f0837a MDL-29558 question preview: limit variants drop-down to the first 100
In situations when question has many variants.
2011-09-30 09:43:26 +07:00
Mary Evans 9d0cc2cb4c MDL-29323-FIX invalid border style 2011-09-30 03:16:32 +01:00
AMOS bot f058ea24c9 Automatically generated installer lang files 2011-09-30 00:55:21 +00:00
Tim Hunt b99d21aaa9 MDL-29511 cannot review previous steps of a question attempt since MDL-28679. 2011-09-29 21:53:41 +01:00
Tim Hunt 778854eef5 MDL-29511 Fix problems on the quiz review questions page found while investigating this bug. 2011-09-29 21:53:40 +01:00
Marina Glancy 5c6377900a MDL-25454: using the faster way to check if record exists in db 2011-09-29 17:06:37 +08:00
Andrew Davis (andyjdavis) a00b84e864 MDL-28725 wiki: added urlencode around the section variable when it is being used to construct URLs 2011-09-29 16:49:52 +08:00
Andrew Davis (andyjdavis) 667ffef155 MDL-28725 wiki: added missing string
AMOS BEGIN
 CPY [invalidsection,core_admin],[invalidsection,mod_wiki]
AMOS END
2011-09-29 16:49:43 +08:00
Tim Hunt 8258ddff3b MDL-29570 Quiz editing page displays the wrong time in the status line sometimes. 2011-09-29 09:06:41 +01:00
Rossiani Wijaya 03fb10da20 MDL-26486 lesson mod: fixed grade report error on matching and shortanswers questions. 2011-09-29 13:05:50 +08:00
Ankit Kumar Agarwal 342f224f03 MDL-19575 Global Search Adding capability checks to the search and stat pages 2011-09-29 09:09:54 +05:30
Marina Glancy 0623443356 MDL-25454 before skipping course backup make sure that there are no change entries in it's log during the last month. Store the nextstarttime even for courses that were not backed up 2011-09-29 10:02:08 +08:00
Rajesh Taneja 4a313905bc MDL-29539 HTML Editor: Fixed XHTML formatting for editor 2011-09-29 09:36:22 +08:00
Sam Hemelryk 9c36051feb MDL-28615 mod_forum: Fixed the users page that shows all of the users posts 2011-09-29 14:21:15 +13:00
Sam Hemelryk fa447a513e MDL-25697 theme_base: Improved the alignment of the activity editing icons on the course frontpage 2011-09-29 14:15:24 +13:00
AMOS bot 037afad8c3 Automatically generated installer lang files 2011-09-29 00:55:41 +00:00
Eloy Lafuente (stronk7) 72a32ea968 MDL-29567 postgresql - handle negative defaults in numerical cols properly 2011-09-29 01:22:31 +02:00
Eloy Lafuente (stronk7) 21973a92a4 MDL-29567 unit tests - add some tests to cover negative defaults in numerical cols 2011-09-29 01:22:21 +02:00
Eloy Lafuente (stronk7) af9a00d398 MDL-29566 mysql - length / decimal specs in float columns are optional 2011-09-29 00:33:18 +02:00
Eloy Lafuente (stronk7) 3264974513 MDL-29566 unit tests - add some tests to cover get_columns() with number/float columns 2011-09-29 00:33:15 +02:00
Sam Hemelryk 214784a4af MDL-27867 course: Course and category theme selectors no longer show theme's that should be hidden from the selector 2011-09-29 10:47:52 +13:00
Mary Evans b15ab7630c MDL-28566 - Fix for participants user details 2011-09-28 15:45:20 +01:00
Eloy Lafuente (stronk7) 3973662145 weekly release 2.1.1+ 2011-09-28 11:08:00 +02:00
Eloy Lafuente (stronk7) f7bb84df23 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2011-09-28 11:04:28 +02:00
AMOS bot fc316236f5 Automatically generated installer lang files 2011-09-28 00:55:21 +00:00
Aparup Banerjee e9be98eed2 Merge branch 'MDL-29230_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2011-09-27 15:00:49 +08:00
Aparup Banerjee ca92a99a2e Merge branch 'MDL-25241_forum_search_ratings_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2011-09-27 11:35:44 +08:00
Sam Hemelryk d021250bf0 Merge branch 'm21_MDL-29519' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2011-09-27 14:09:50 +13:00
Eloy Lafuente (stronk7) 2b4dcfdcbd Merge branch 'MDL-28686-21' of git://github.com/bostelm/moodle into MOODLE_21_STABLE 2011-09-27 00:54:49 +02:00
Sam Hemelryk fe245b725b Merge branch 'MDL-28424_21' of git://github.com/timhunt/moodle.git with changes 2011-09-27 11:26:37 +13:00
Eloy Lafuente (stronk7) 3dba01a40f Merge branch 'w38_MDL-29535_m21_filters' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-09-26 23:57:30 +02:00
Petr Skoda 5cac28fb2b MDL-29535 fix support for custom filter settings in contrib filters 2011-09-26 23:49:58 +02:00
Eloy Lafuente (stronk7) dc110687c8 Merge branch 'MDL-29462_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-09-26 22:42:09 +02:00
Eloy Lafuente (stronk7) 0518140c31 Merge branch 'MDL-28202_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-09-26 22:28:47 +02:00
Eloy Lafuente (stronk7) 4d7a9cd8f5 Merge branch 'MDL-29427_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-09-26 22:01:35 +02:00
Eloy Lafuente (stronk7) ba1afa0d95 Merge branch 'MDL-29528_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-09-26 21:44:49 +02:00
Tim Hunt f8431a1933 MDL-29528 qtype multichoice and caclulated combined feedback format overwritten during upgrade. 2011-09-26 13:39:11 +01:00
Aparup Banerjee 3cef27bf9f Merge branch 'MDL-29270-question-grade_21_STABLE' of git://github.com/mudrd8mz/moodle into MOODLE_21_STABLE 2011-09-26 17:04:28 +08:00
Rossiani Wijaya 9551f03606 MDL-29296 lesson mod: fixed regression for continue button on last lesson page. 2011-09-26 16:40:39 +08:00
Aparup Banerjee 8daff43635 Merge branch 'wip-MDL-29487-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2011-09-26 16:01:11 +08:00
Aparup Banerjee e90206aaa4 Merge branch 'MDL-29464_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-09-26 14:49:21 +08:00
Aparup Banerjee b967bf6005 Merge branch 'MDL-29333_rating_ajax_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2011-09-26 14:07:25 +08:00
Sam Hemelryk ded9134e03 Merge branch 'MDL-29428_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-09-26 14:04:15 +13:00
AMOS bot 9d7b02bec0 Merge branch 'MOODLE_21_STABLE' into install_21_STABLE 2011-09-26 00:55:32 +00:00
Sam Hemelryk d496829c61 Merge branch 'MDL-29484_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-09-26 13:55:27 +13:00
Sam Hemelryk 9c43f8f7e1 Merge branch 'MDL-29493_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-09-26 13:48:11 +13:00
Dan Marsden 7af777217d MDL-29519 move plagiarism cron to after event queue 2011-09-26 13:16:28 +13:00
Sam Hemelryk 585bd02479 Merge branch 'MDL-29336-numerrors-mapping-21_STABLE' of git://github.com/mudrd8mz/moodle into MOODLE_21_STABLE 2011-09-26 12:36:46 +13:00
Sam Hemelryk d7749a10a6 Merge branch 'MDL-29478_21' of git://github.com/stronk7/moodle into MOODLE_21_STABLE 2011-09-26 10:53:10 +13:00
Sam Hemelryk 65072bfdc2 Merge branch 'MDL-29139_m21' of git://github.com/nebgor/moodle into MOODLE_21_STABLE 2011-09-26 10:45:40 +13:00
Sam Hemelryk 9f05075c61 Merge branch 'MDL-29190_21_wip' of git://github.com/grabs/moodle into MOODLE_21_STABLE 2011-09-26 10:39:26 +13:00
Jean-Michel Vedrine ef4cf39174 MDL-29270 Fixed question bank backup converter (field rename) 2011-09-25 23:30:40 +02:00
Eloy Lafuente (stronk7) 7294a0649b weekly release 2.1.1+ (emergency) 2011-09-25 17:26:40 +02:00
Eloy Lafuente (stronk7) 9c49600397 MDL-29512 Revert "MDL-25937 Froms Library: Added server side validation for filepicker and filemanager"
This reverts commit b19539bf44.
2011-09-25 17:14:47 +02:00
Eloy Lafuente (stronk7) 0a5afc0583 MDL-29512 Revert "MDL-25937 Forms Library: Added Javascript validation for filepicker and filemanager. Also fixed disbledif rule check for both"
This reverts commit 1f552b4c48.
2011-09-25 17:14:33 +02:00
AMOS bot 2de4e3872c Automatically generated installer lang files 2011-09-25 00:55:21 +00:00
AMOS bot d73581da42 Automatically generated installer lang files 2011-09-24 00:55:24 +00:00
Andreas Grabs dbd388acef MDL-29190 - XHTML not well formed in show_nonrespondents.php 2011-09-23 18:54:18 +02:00
Tim Hunt 51fd4dd261 MDL-29493 questions should be createable with defaultmark a float. 2011-09-23 12:52:39 +01:00
Tim Hunt dddcaf6b6b MDL-29484 qformat xml tests failing. 2011-09-23 12:09:31 +01:00
Sam Hemelryk 8710d49bec MDL-29487 enrol: Fixed typo in enrol_sharing_course 2011-09-23 18:18:10 +12:00
Rossiani Wijaya a672bd8ad5 MDL-29230 lesson_module: fixed question's answer to have 0 value. 2011-09-23 14:10:12 +08:00
Eloy Lafuente (stronk7) 4d1e35d8c0 MDL-29478 unittest - fix rating tests so they can be executed with accesslib caches cleaned 2011-09-23 01:48:09 +02:00
Eloy Lafuente (stronk7) 7bfc279ffb MDL-29478 unittest - explicity include blog/lib.php. Was causing "random" errors 2011-09-23 01:37:58 +02:00
Eloy Lafuente (stronk7) cb59f50fb8 MDL-29478 blog - fixed some recent regressions introduced by MDL-29186 2011-09-23 00:06:10 +02:00
Tim Hunt 5d81093e3c MDL-29427 quiz nav: information items should should have a state tooltip 2011-09-22 18:13:11 +01:00
Tim Hunt a9384ab0d0 MDL-29428 quiz navigation panel should use 'This page' (accessibility improvement) 2011-09-22 17:56:35 +01:00
Kyle Temkin 18d81bdb3c MDL-28202 qtype_calculated fix edge case in the rounding code. 2011-09-22 12:14:44 +01:00
Andrew Davis (andyjdavis) 4b5c0b461c MDL-25241 forum: reimplemented the display of ratings on the forum search page 2011-09-22 15:30:05 +08:00
Aparup Banerjee 0047a8f47d MDL-29139 Forms Library : fixed missing require_once 2011-09-22 14:56:40 +08:00
David Mudrak a39eb49fc2 MDL-29336 Saving grade mapping table in the Workshop
The Workshop module using the "Number of errors" grading strategy did
not save all items in the grade mapping table. If some assessment form
fields have weight > 1, the number of possible errors is greater that
the number of the assessment form fields. The previous code deleted all
mappings where the number of errors was greater than the number of
fields.

In this patch, the maximum number of possible errors is calculated as a
sum of weights of all fields. Only mappings over this maximum are
deleted now.
2011-09-22 05:17:44 +02:00
Andrew Davis (andyjdavis) cfb909d013 MDL-29333 rating: prevent the ratings JS from being intialized multiple times 2011-09-22 10:23:26 +08:00
Andrew Davis (andyjdavis) 81fa243ea4 MDL-29333 rating: refactored the ratings ajax 2011-09-22 10:23:15 +08:00
AMOS bot 747d4d3e25 Automatically generated installer lang files 2011-09-22 00:55:33 +00:00
Tim Hunt 74ca90e5fb MDL-29464 quiz add random question popup does not update sumgrades. 2011-09-21 16:43:05 +01:00
Tim Hunt 4e92a71fb3 MDL-29462 html_to_text('0') gives '', not '0'. 2011-09-21 16:42:33 +01:00
Tim Hunt e6674da8ff MDL-28424 Reviewing a quiz in 'secure mode' gives a fatal error.
The problem was when output was being started in relation to when the fake block was added.

Took the opportunity to clean up the quiz renderer API a bit.
2011-09-21 16:41:36 +01:00
Eloy Lafuente (stronk7) 136fa79e34 weekly release 2.1.1+ 2011-09-21 17:11:46 +02:00
Eloy Lafuente (stronk7) 06a22aecb7 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2011-09-21 17:04:43 +02:00
AMOS bot f7cf17a853 Automatically generated installer lang files 2011-09-21 00:55:20 +00:00
Eloy Lafuente (stronk7) e63827ad98 Merge branch 'MDL-26567_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-09-21 00:11:14 +02:00
Tim Hunt 84de2336fb MDL-26567 no grade category option on the quiz settings form.
Also, refine the standard_grading_coursemodule_elements method to add a
help string.

AMOS BEGIN
 CPY [gradecategory,grades],[gradecategoryonmodform,grades]
AMOS END
2011-09-20 12:15:07 +01:00
Eloy Lafuente (stronk7) 7f0d91d546 Merge branch 'wip-mdl-29079-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2011-09-20 09:51:18 +02:00
Aparup Banerjee 14312ebc6a Merge branch 'MDL-26890-m21' of git://github.com/ankitagarwal/moodle into MOODLE_21_STABLE 2011-09-20 13:17:00 +08:00
Ankit Kumar Agarwal 292faa4f7d Forums check on filesize if the file is added to the forum from private area 2011-09-20 10:05:36 +05:30
Rajesh Taneja e93bb0ca52 MDL-29079 Administration: Added space on both sides of locked checkbox and for rtl language space will be applied accordingly 2011-09-20 11:50:46 +08:00
Aparup Banerjee a886ad10ea Merge branch 'wip-mdl-28726-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2011-09-20 10:20:38 +08:00
Sam Hemelryk c4b234ec54 Merge branch 'MDL-26841_21' of git://github.com/stronk7/moodle into MOODLE_21_STABLE 2011-09-20 12:13:48 +12:00
Sam Hemelryk 6831c9ff36 Merge branch 'MDL-29392_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-09-20 11:58:23 +12:00
Colin Chambers 6a49c01825 MDL-29394 form editor - Use hidden field when only 1 format option is available #947 2011-09-20 00:36:35 +02:00
Eloy Lafuente (stronk7) 0ff54e134f Merge branch 'wip-mdl-29079-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2011-09-20 00:17:42 +02:00
Eloy Lafuente (stronk7) 5af8bbf854 Merge branch 'MDL-28679_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-09-20 00:04:17 +02:00
Eloy Lafuente (stronk7) 75ebacb1ec Merge branch 'MDL-29126_export_separator_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2011-09-19 23:37:49 +02:00
M Kassaei 1859247e0c MDL-29392 grade/report/index.php should use $CFG->grade_profilereport 2011-09-19 11:32:18 +01:00
Eloy Lafuente (stronk7) f199117f05 MDL-26841 backup - prevent any enrolments info to be handled in IMPORT/HUB operations 2011-09-19 11:24:24 +02:00
Aparup Banerjee bc24c20388 Merge branch 's13_MDL-29036_ws_upload_21' of git://github.com/dongsheng/moodle into MOODLE_21_STABLE 2011-09-19 16:13:31 +08:00
Dongsheng Cai 4e970a5335 MDL-29036 WEBSERVICE : webservice upload script should respect maxbytes and userquota settings 2011-09-19 15:29:13 +08:00
Sam Hemelryk 955f15a71f Merge branch 'MDL-29366_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-09-19 19:20:17 +12:00
Sam Hemelryk 5585910ea7 Merge branch 'MDL-28329_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-09-19 18:36:55 +12:00
Rajesh Taneja 1b17be9050 MDL-29079 Administration: Added space between checkboxes on general backup setting page 2011-09-19 13:35:56 +08:00
Sam Hemelryk 26c28d0821 Merge branch 'wip-mdl-25937-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2011-09-19 17:00:40 +12:00
Aparup Banerjee 8104e0f2df Merge branch 's13_MDL-28509_youtube_21' of github.com:dongsheng/moodle into MOODLE_21_STABLE 2011-09-19 12:15:00 +08:00
Dongsheng Cai 4ded0afd16 MDL-28509 repository : fixed youtube repository search keyword 2011-09-19 11:57:14 +08:00
Mark Johnson 2e348a6643 MDL-28509 repository_youtube Enable selection of sort order 2011-09-19 11:57:01 +08:00
Petr Skoda 84cae7bef8 MDL-29406 fix greedy config settings cleanup 2011-09-19 13:33:08 +12:00
Sam Hemelryk 3d2029f3d4 Merge branch 'MDL-29360_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-09-19 11:57:58 +12:00
KNDeepa 9acc5736a8 MDL-28329 local_qeupgradehelper make cron work. 2011-09-16 18:44:06 +01:00
Tim Hunt 08d1ba7106 MDL-28679 question response history displays states incorrectly. 2011-09-16 16:05:59 +01:00
Tim Hunt e9197a3711 MDL-29366 qtype_essay import/export as Moodle XML loses files from graderinfo 2011-09-16 12:00:40 +01:00
Tim Hunt 4394f91b26 MDL-29360 quiz comment.php has broken JS for the Cancel button.
This swtichest it to more modern YUI3 approach.
2011-09-16 12:00:03 +01:00
Tim Hunt 25aa44ea97 MDL-28259 Individual answers Feedback not shown in Cloze questions 2011-09-16 11:59:02 +01:00
Rajesh Taneja f9d4ab44e0 MDL-28726 wiki-2.0: Fixed XSS in wiki comments 2011-09-16 11:10:27 +08:00
Rajesh Taneja 1f552b4c48 MDL-25937 Forms Library: Added Javascript validation for filepicker and filemanager. Also fixed disbledif rule check for both 2011-09-16 09:18:23 +08:00
Rajesh Taneja b19539bf44 MDL-25937 Froms Library: Added server side validation for filepicker and filemanager 2011-09-16 09:18:23 +08:00
Eloy Lafuente (stronk7) ce0cb2451b weekly release 2.1.1+ 2011-09-16 01:38:33 +02:00
Eloy Lafuente (stronk7) 929c1e4a8b Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2011-09-16 01:34:34 +02:00
Eloy Lafuente (stronk7) 7923d63b16 MDL-29093 auth - help string now specifies MNet exception. Thanks Helen! 2011-09-14 11:37:31 +02:00
Eloy Lafuente (stronk7) efb0aacf37 MDL-29093 auth - help string changed to VBFET suggestion
(very best favourite english translator, aka. Helen :-P)
2011-09-14 10:12:17 +02:00
Sam Hemelryk 9e312ed269 MDL-29188 course_formats Fixed up formatting of section name within navigation 2011-09-14 11:41:36 +12:00
Sam Hemelryk 6aa9352f66 MDL-29093 - Authentication improved new setting name and strings 2011-09-14 00:30:26 +02:00
Iñaki Arenaza 2023ca1f0f MDL-29093 - Authentication for authentication only, not for user creation
There are cases when a moodle installation needs to only deal
user authentication and not user creation (this is especially
interesting when using external authentication sources such as LDAP,
CAS, etc.)

Add an option to prevent automatic user creation if the administrator
does't want users to be automatically created.

Signed-off-by: Iñaki Arenaza <iarenaza@mondragon.edu>
2011-09-14 00:30:17 +02:00
Petr Skoda 6f1156a6c2 MDL-29295 do not use strtok in dml and ddl layers
This prevents clobbering of internal pointer when code calling DML
uses strtok too. Unit test added to prevent future uses.
2011-09-14 00:21:33 +02:00
Aparup Banerjee a7cb1e62f4 MDL-26257 Authentication : whitespace/style fixes 2011-09-13 19:15:48 +08:00
Aparup Banerjee edb8077e7b Merge branch 'MDL-26257-21' of git://github.com/bostelm/moodle into MOODLE_21_STABLE 2011-09-13 19:11:49 +08:00
Aparup Banerjee d8f2500f46 Merge branch MDL-29186-m21 of git://github.com/samhemelryk/moodle
- resolved conflicts, minor whitespace and fixed quote.
    - note: textlib_get_instance() is already deprecated
2011-09-13 16:19:47 +08:00
Aparup Banerjee 6519a7769d Merge branch MDL-29187-m21 of git://github.com/samhemelryk/moodle
- resolved conflict.
2011-09-13 13:54:43 +08:00
Aparup Banerjee 995b4d16cd Merge branch 'wip-MDL-29188-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2011-09-13 13:33:56 +08:00
Aparup Banerjee 717c3395be Merge branch 'wip-MDL-29189-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2011-09-13 11:45:51 +08:00
Sam Hemelryk 6bc526319e Merged branch '28595_m22_installcontinue' of git://github.com/skodak/moodle with changes 2011-09-13 15:35:27 +12:00
Sam Hemelryk b3c64930ff MDL-29189 course Minor fixups after code review 2011-09-13 11:19:17 +12:00
Andrew Davis (andyjdavis) a6f388c664 MDL-22232 messaging: added the ability to temporarily disable notifications to a particular user 2011-09-12 20:24:08 +12:00
Sam Hemelryk 90d14d089c Merge branch 'MDL-29211_M21' of git://github.com/kordan/moodle into MOODLE_21_STABLE 2011-09-12 19:49:26 +12:00
kordan 9d8dbe645c MDL-29211 fox for MOODLE_21_STABLE 2011-09-12 09:40:08 +02:00
Sun Zhigang 937e0a23d9 MDL-29112 trigger event mod_deleted after deleting mod through AJAX 2011-09-12 17:36:10 +12:00
Aparup Banerjee 910671644c MDL-28724 wiki : Fixed bugs in wiki forms 2011-09-12 17:27:56 +12:00
Petr Skoda 9e6ef6ccc2 MDL-29131 fix multiple groups issues on the recent activity report 2011-09-12 17:08:58 +12:00
Sam Hemelryk 4a277f4f4e Merge branch 'w36_MDL-29306_m21_dbenrolroles' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-09-12 15:30:33 +12:00
Sam Hemelryk 786a905607 Merge branch 'w36_MDL-29292_m21_featuretypo' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-09-12 15:17:25 +12:00
Sam Hemelryk 20ff7e3279 Merge branch 'MDL-27635_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2011-09-12 14:39:22 +12:00
Sam Hemelryk 2513a2b24f Merge branch 'w36_MDL-29312_m21_cookieless' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-09-12 14:25:02 +12:00
Rossiani Wijaya 4966b0ee71 MDL-27635 hub component: fixed default value for 'secret' field in 'registration_hubs' table 2011-09-12 10:21:45 +08:00
Sam Hemelryk 18fc309097 Merge branch 'MDL-28488_21' of git://github.com/stronk7/moodle into MOODLE_21_STABLE 2011-09-12 13:20:47 +12:00
kordan 3bfe7ce57a MDL-29056 theme-formal_white fix for the report pagelayout that was preventing horizontal scroll 2011-09-12 13:03:02 +12:00
Eloy Lafuente (stronk7) 366c19fabd MDL-28488 backup - conditionaly apply defaults based on mode
Some modes of backup cannot be preloaded with general backup
settings because they may conflict with the definitions required/set
by the mode (for example, import backups are, by definition, without
users always, so we cannot apply one default in the opposite direction).

So, after the patch, current general_backup setting will be only applied
to general backups, import/hub modes won't be using any default and
automated backup defaults should be loaded here (TODO)
2011-09-11 21:57:00 +02:00
Eloy Lafuente (stronk7) 56a1642c5b MDL-28488 backup - '[backup|restore]:configure cap does not control import mode anymore 2011-09-11 21:56:45 +02:00
Eloy Lafuente (stronk7) 9d74bab3bc MDL-28488 backup - fixup some strings and delete legacy ones 2011-09-11 21:56:31 +02:00
Eloy Lafuente (stronk7) 993261dcff MDL-28488 backup - make backup and import capabilities independent
Before this change, in order to perform one course import it was
necessary to have both the backupcourse and the backuptargetimport
capabilities. After agreement now each one will control its own
backup mode. Same applies for restore.
2011-09-11 21:56:13 +02:00
Eloy Lafuente (stronk7) 4b5233f9c4 MDL-28488 backup - activity duplication requires 2 capabilities in ctx 2011-09-11 21:55:43 +02:00
Petr Skoda 0cf269c1fc MDL-29292 fix feature typo
Credit goes to Raminder Singh.
2011-09-11 12:49:16 +02:00
Petr Skoda e1e082a809 MDL-29312 prevent cookieless mode for security reasons 2011-09-11 10:07:27 +02:00
AMOS bot 8cd0f221b6 Automatically generated installer lang files 2011-09-11 00:55:40 +00:00
Petr Skoda 94a720f287 MDL-28595 explain the need to install into new db if something fails during the initial install 2011-09-11 00:08:23 +02:00
Petr Skoda f6090a3531 MDL-28595 do not print continue link if install fails 2011-09-11 00:08:20 +02:00
Petr Skoda 3dfac46e97 MDL-29306 support multiple roles in ext enrol db 2011-09-10 23:34:06 +02:00
AMOS bot 3119ba9a2a Automatically generated installer lang files 2011-09-10 00:55:20 +00:00
AMOS bot 74743b5e48 Automatically generated installer lang files 2011-09-09 00:55:20 +00:00
Henning Bostelmann 033a066e4f MDL-26257 Shibboleth auth: run logout handler only if logged in via Shibboleth 2011-09-08 11:53:44 +01:00
AMOS bot 8ede1d5121 Automatically generated installer lang files 2011-09-08 00:55:31 +00:00
Sam Hemelryk 0347dd4d70 MDL-29186 multilang Reviewed the uses of course fullname and ensured things were being formatted consistently 2011-09-08 09:39:00 +12:00
Sam Hemelryk 5da6f4eeb6 MDL-29187 multilang Reviewed the uses of category name and ensured things are being formatted correctly 2011-09-08 09:36:55 +12:00
Sam Hemelryk 34c46428f1 MDL-29189 mutlilang Reviewed the uses of course shortname and ensured things are being formatted consistently 2011-09-08 09:30:10 +12:00
Sam Hemelryk 9ec4220c84 MDL-29188 multilang Reviewed the uses of section name and ensured things were being formatted consistently 2011-09-08 09:27:55 +12:00
Eloy Lafuente (stronk7) 22e8ad6134 weekly release 2.1.1+ 2011-09-07 17:55:05 +02:00
Eloy Lafuente (stronk7) 0780ba7ca7 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2011-09-07 17:49:21 +02:00
Eloy Lafuente (stronk7) 06b66d530b Merge branch 'wip-MDL-28043-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2011-09-06 13:56:08 +02:00
Eloy Lafuente (stronk7) 57d30b5276 Merge branch 'wip-mdl-28987-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2011-09-06 01:59:49 +02:00
Sam Hemelryk a640301b81 MDL-28043 user Fixed context hack in pluginfile for user pics leading to init of page, theme and output for redirect 2011-09-06 11:29:44 +12:00
Eloy Lafuente (stronk7) 593b4518ad Merge branch 'wip-mdl-23520-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2011-09-06 01:27:51 +02:00
Eloy Lafuente (stronk7) abaff947c6 Merge branch 'wip-MDL-29006-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2011-09-06 00:38:38 +02:00
Eloy Lafuente (stronk7) ae115cf229 Merge branch 'w35_MDL-29145_m21_imscpregression' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-09-05 21:52:08 +02:00
Eloy Lafuente (stronk7) 152ee16812 MDL-29072 Import course - whitespace fixes 2011-09-05 10:42:55 +02:00
Petr Skoda ed2448a342 MDL-29145 fix regression caused by MDL-27448 2011-09-05 09:47:09 +02:00
Rajesh Taneja 48f6a80092 MDL-28987 Forms Library: Removed onBlur validation. Now the validation will occur on form submit only 2011-09-05 14:26:19 +08:00
Iñaki Arenaza 85f5ab3145 MDL-27689 Vague README-LDAP file in auth/ldap
README-LDAP referes to a file that was renamed (to auth.php) in Moodle
1.8 and no longer exists. Make clear what file we are referring to.
2011-09-05 13:31:41 +08:00
Aparup Banerjee 26cfc10584 Merge branch 'wip-MDL-26811-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2011-09-05 13:18:52 +08:00
Aparup Banerjee 5f856fdfe9 Merge branch 'MDL-29198_21' of git://github.com/stronk7/moodle into MOODLE_21_STABLE 2011-09-05 12:52:15 +08:00
Rajesh Taneja 0d7dcbf1ae MDL-28987 Forms Library: Added tinyMCE onblur event callback for required tinymce fields 2011-09-05 12:21:55 +08:00
Rajesh Taneja 6786f79ab4 MDL-28987 Forms Library: Added tinyMCE save for tinymce editor validation 2011-09-05 12:21:49 +08:00
Adam Olley a010bfe63d MDL-28987: Affix [text] to editor element in JS validation and add blur event 2011-09-05 12:21:43 +08:00
Sam Hemelryk 3cabe2de8c Merge branch 'MDL-29018_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2011-09-05 16:08:07 +12:00
Sam Hemelryk 7ecabfdce4 Merge branch 'MDL-28689_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2011-09-05 16:03:08 +12:00
Rossiani Wijaya c8fa99de72 MDL-29018 lesson module statistics: fixed statistics diplay for whole the class 2011-09-05 11:16:33 +08:00
Henning Bostelmann 02aac22ff8 MDL-29072 Import course: Use correct capability for course selection 2011-09-05 13:41:34 +12:00
Sam Hemelryk 05956888d7 Merge branch 'MDL-27975_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2011-09-05 13:37:33 +12:00
Sam Hemelryk caff2aa640 Merge branch 's13_MDL-29170_risklevel_21' of git://github.com/dongsheng/moodle into MOODLE_21_STABLE 2011-09-05 11:13:17 +12:00
AMOS bot 5031249d84 Automatically generated installer lang files 2011-09-03 00:55:20 +00:00
Eloy Lafuente (stronk7) 3c7a83744e MDL-28080 DML unit tests - cover tweak_param_names() and the new 30 chars limit exception 2011-09-01 19:59:13 +02:00
Eloy Lafuente (stronk7) 436135f52a MDL-28080 oracle - avoid tweak_param_names() tweaking too much :-P
Sometimes the (oracle only) tweak_param_names() method was causing
placeholders having > 28 chars length to exceed the 30 chars limit
imposed by Oracle. With this commit the tweak is performed by
replacement for such long placeholders and, at the same time, the
tweak has been commented out from insert/update because it is not
necessary there (placeholders are safe column name always)
2011-09-01 19:59:13 +02:00
Tim Hunt 41f17b384f MDL-28080 coding_exception for over-long placeholder names. 2011-09-01 19:59:12 +02:00
Rossiani Wijaya 47b9f44c6f MDL-27975 community block: fixed string typo 2011-09-01 17:10:29 +08:00
Eloy Lafuente (stronk7) 7a8a938077 MDL-29198 DB - make delete_records transactional safe when needed 2011-09-01 11:08:09 +02:00
Rossiani Wijaya e3a6a3878e MDL-28689 chat module: add input.png file. This is a simple fix by copying the file from bubbles themes. Proper fix should be done in the future 2011-09-01 16:27:13 +08:00
Andrew Davis (andyjdavis) 35dd29564b MDL-29126 gradebook: made text export with tabs as separator work 2011-09-01 15:32:27 +08:00
Dongsheng Cai 5c71cfca6a WEBSERVICE MDL-29170 reduce createmobiletoken capability risk level 2011-09-01 11:03:47 +08:00
AMOS bot e5df0e3e17 Automatically generated installer lang files 2011-09-01 00:55:25 +00:00
Rajesh Taneja 6b94a62ff8 MDL-23520 mod-wiki-2.0: Added delete page and version feature as it was in 1.9 2011-08-31 13:54:16 +08:00
Sam Hemelryk e9a574454c MDL-29006 block_html Added formatted to title printed on editing form when a hard freeze is in effect 2011-08-31 11:46:44 +12:00
Eloy Lafuente (stronk7) ddf322586e weekly release 2.1.1+ 2011-08-31 01:33:29 +02:00
Sam Hemelryk ed9041c9ce MDL-26811 upgrade Fixed up default handling causing exception on upgrade of used site in MSSQL 2011-08-31 11:33:29 +12:00
Eloy Lafuente (stronk7) 3853dc585c Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2011-08-31 01:29:39 +02:00
Aparup Banerjee 132c116509 MDL-29005 blocks : clarified comment 2011-08-30 11:20:38 +08:00
Aparup Banerjee 97dd4ec539 Merge branch 'MDL-29005_MOODLE_21_STABLE' of git://github.com/mouneyrac/moodle into MOODLE_21_STABLE 2011-08-30 11:19:57 +08:00
Eloy Lafuente (stronk7) 5266e929da MDL-28489 site news forum - support multilang filter 2011-08-30 11:06:57 +12:00
Eloy Lafuente (stronk7) 9c89f307f8 Merge branch 'MDL-29141_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-29 13:01:57 +02:00
Eloy Lafuente (stronk7) 4524a47a0a Merge branch 'wip-MDL-24202-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2011-08-29 10:30:59 +02:00
Aparup Banerjee 7816f5acb0 Merge branch 'MDL-29144_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-29 12:01:41 +08:00
Sam Hemelryk ce4285c883 Merge branch 'MDL-28564_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-29 13:59:26 +12:00
Sam Hemelryk 208b9e2a50 MDL-24202 navigation Fixed bug caused by navigation overriding a CFG setting 2011-08-29 13:45:36 +12:00
Eloy Lafuente (stronk7) 5a8f177c73 Merge branch 'MDL-28943_manage_message_name_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2011-08-29 03:26:41 +02:00
Eloy Lafuente (stronk7) fa3dff1318 Merge branch 'MDL-26302_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-29 03:23:28 +02:00
Sam Hemelryk a4ad64950b Merge branch 'MDL-26819_21' of git://github.com/stronk7/moodle into MOODLE_21_STABLE 2011-08-29 13:05:22 +12:00
Sam Hemelryk 6870b5dcbb Merge branch 'dev_MDL-27289_boxnet_21' of git://github.com/dongsheng/moodle into MOODLE_21_STABLE 2011-08-29 12:54:40 +12:00
Eloy Lafuente (stronk7) 6e582f1632 Merge branch 'MDL-29064_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-29 02:52:55 +02:00
Eloy Lafuente (stronk7) 3bdb9bfd54 Merge branch 'MOODLE_21_STABLE' of git.moodle.org:/git/integration into MOODLE_21_STABLE 2011-08-29 02:41:27 +02:00
Eloy Lafuente (stronk7) 1dd41f0eb1 Merge branch 'MDL-29062_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-29 02:40:08 +02:00
Sam Hemelryk 78b19caf0a Merge branch 'MDL-29135-mnet-login_21_STABLE' of git://github.com/mudrd8mz/moodle into MOODLE_21_STABLE 2011-08-29 12:24:57 +12:00
Eloy Lafuente (stronk7) 4984e712e6 Merge branch 'MDL-29111_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-29 02:02:55 +02:00
David Mudrak 174245497e MDL-29148 MNet - improved handling of a verification function return code 2011-08-29 01:48:41 +02:00
Eloy Lafuente (stronk7) 119b895133 Merge branch 'wip_MDL-16168_2.1_CAS_crash_if_no_LDAP' of https://github.com/iarenaza/moodle into MOODLE_21_STABLE 2011-08-29 01:33:03 +02:00
Eloy Lafuente (stronk7) 04dc7f877b Merge branch 'MDL-25872-21' of git://github.com/bostelm/moodle into MOODLE_21_STABLE 2011-08-29 01:22:42 +02:00
Iñaki Arenaza 5e7d9e3e36 MDL-28402 LDAP configuration values being stored in lower case, causing misconfiguration
It looks like array_change_key_case() does not work recursively, so we
were not actually lowercasing the expiration attribute key. As the
configuration setting is always lowercase they didn't match.
2011-08-29 01:08:42 +02:00
Eloy Lafuente (stronk7) c24ccde07f MDL-26819 quiz statistics - use cross-db GROUP BY expression 2011-08-28 22:16:11 +02:00
Iñaki Arenaza b38bcc3a1d MDL-16168 auth/cas CAS crashes if no LDAP is set up
Fix was pending for Moodle 2.1. Credit goes to Ivan Dackiewicz.
2011-08-28 15:32:32 +02:00
David Mudrak 9b81b37eb9 MDL-27107 auth_mnet - consider all incoming roaming users as confirmed
The 'confirmed' field can't be optional. If the identity provider did
not export it, the new remote user would be created with 'confirmed' set
to default zero and as such could be a subject of scheduled deletion.
2011-08-28 02:36:38 +02:00
David Mudrak 2f2cf818c2 MDL-29135 Reworded login prompt with SSO over MNet enabled 2011-08-27 18:24:55 +02:00
AMOS bot ed32596d3a Automatically generated installer lang files 2011-08-27 00:55:41 +00:00
M Kassaei 9651053bb4 MDL-29144 quiz navigation: Screen-readers speak question state twice 2011-08-26 19:10:54 +01:00
Tim Hunt 15e6246359 MDL-29111 quiz was passing 0 to ->review_url when it should have been null. 2011-08-26 18:16:57 +01:00
Henning Bostelmann b1a24c1eb0 MDL-25872 View assignment submissions: show only students, not teachers
Fixing incorrect capability reference mod/assignment:view to ...:submit
2011-08-26 17:34:35 +01:00
Tim Hunt 362d5c1ed1 MDL-29141 question bank show question text checkbox does not match state. 2011-08-26 17:01:52 +01:00
Henning Bostelmann d5ae2ed112 MDL-28686 QE2 upgrade: recognize manually graded, deleted questions 2011-08-26 14:37:49 +01:00
Eloy Lafuente (stronk7) e4527c5497 weekly release 2.1.1+ 2011-08-26 15:09:00 +02:00
Eloy Lafuente (stronk7) 200cb06bfc Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2011-08-26 14:56:52 +02:00
Eloy Lafuente (stronk7) 97e4e3953a MDL-28684 QE2 upgrade: fix undefined $a regression. Thanks Henning! 2011-08-25 15:54:41 +02:00
Eloy Lafuente (stronk7) ee4dee99e8 Merge branch 'MDL-27823_bulk_messaging_2_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2011-08-25 10:46:11 +02:00
AMOS bot 7adfd55ec2 Automatically generated installer lang files 2011-08-25 00:55:21 +00:00
Eloy Lafuente (stronk7) efc2de0e97 Merge branch 'MDL-28650-MOODLE-21-STABLE' of https://github.com/mouneyrac/moodle into MOODLE_21_STABLE 2011-08-25 01:15:49 +02:00
Eloy Lafuente (stronk7) ddec658859 Merge branch 'MDL-28684_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-24 17:12:18 +02:00
Tim Hunt e9f707d38a MDL-28684 fix failing unit test - which means fix the acutal code.
Sorry for the noise.
2011-08-24 16:02:40 +01:00
Eloy Lafuente (stronk7) 7faa5b4e9c Merge branch 'MDL-28976_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-24 12:57:51 +02:00
Jerome Mouneyrac 2eb3bb390f MDL-29005 display enrollable courses total and downloadable courses total instead of courses/sites total 2011-08-24 14:49:54 +08:00
Aparup Banerjee 2134aa6129 Revert "MDL-28509 repository_youtube Enable selection of sort order"
This reverts commit 0638e55b14.
2011-08-24 14:43:05 +08:00
Eloy Lafuente (stronk7) adc0d74ac9 Merge branch 'w33_MDL-29022_m21_idnumber' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-08-24 03:51:51 +02:00
Aaron Barnes b5013dc868 MDL-28248 completion: Incorrect SQL for finding enrol start date 2011-08-24 12:07:18 +12:00
Eloy Lafuente (stronk7) b61fd419e8 Merge branch 'MDL-28979_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-24 01:56:06 +02:00
Tim Hunt 8c412f122c MDL-28942 qtype multichoice, multi-response. Avoid computing the wrong random guess score.
It is effectively impossible to compute the right random guess score, so we should not compute anything, rather than computing a number that we know is wrong.

This patch also fixes a multianswer unit test error that was shown up by this fix.
2011-08-24 01:53:26 +02:00
Eloy Lafuente (stronk7) 7a4a1f14ca Merge branch 'MDL-28975_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-24 01:45:23 +02:00
Sun Zhigang fad5ec9b5a MDL-29019 enrol - fix a typo 2011-08-24 01:31:29 +02:00
Petr Skoda 93e8c6c422 MDL-19380 fix redirect when virus found in JS-less mode 2011-08-24 01:21:08 +02:00
Petr Skoda 16dc846eb1 MDL-19380 reimplement antivir scanning in repositories 2011-08-24 01:21:00 +02:00
Petr Skoda c7c1a8cf14 MDL-29000 multiple password reset issues
* stop abusing get_complete_user_data()
* fix case-sensitiveness in password reset for PG
* do not allow reset of disabled accounts
* propose a solution for non-unique emails
2011-08-24 01:08:10 +02:00
Petr Skoda b13eda7e8d MDL-28981 fix forum_user_can_post() call params 2011-08-24 00:53:29 +02:00
Tony Levi a3ad8fd883 MDL-27228: Fix label 'eye' does not match show/hide setting 2011-08-23 23:36:29 +02:00
Eloy Lafuente (stronk7) 4ffedd8b0e Merge branch 'w33_MDL-28708_m21_f304' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-08-23 23:32:36 +02:00
Eloy Lafuente (stronk7) 71cf843ad2 Merge branch 'w33_MDL-28709_m21_h304' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-08-23 23:23:15 +02:00
Eloy Lafuente (stronk7) fd7bdf278c Merge branch 'w33_MDL-29011_m21_nomanualenrol' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-08-23 23:13:28 +02:00
Eloy Lafuente (stronk7) 80fc30b7bd MDL-28684 QE2 upgrade: whitespace fix 2011-08-23 22:53:26 +02:00
Eloy Lafuente (stronk7) 251037cefd Merge branch 'MDL-28684b-21' of git://github.com/bostelm/moodle into MOODLE_21_STABLE 2011-08-23 22:53:11 +02:00
Eloy Lafuente (stronk7) 3d95259d7e Merge branch 'MDL-28444-21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-23 22:48:06 +02:00
Aparup Banerjee 1b502dff19 Merge branch 'w33_MDL-28982_m21_sqlfullname' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-08-24 02:59:56 +08:00
Aparup Banerjee e9f8af2a1b Merge branch 'MDL-28687_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-24 02:28:21 +08:00
Eloy Lafuente (stronk7) 35dd038144 MDL-28962 enrol imsenterprise - whitespace fix 2011-08-23 18:43:37 +02:00
Eloy Lafuente (stronk7) f403941133 Merge branch 'm21_MDL-28962' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2011-08-23 18:43:21 +02:00
Eloy Lafuente (stronk7) a1eeb0185a Merge branch 'MDL-28957_21' of git://github.com/colchambers/moodle into MOODLE_21_STABLE 2011-08-23 18:01:16 +02:00
Eloy Lafuente (stronk7) dc70aa7378 Merge branch 'MDL-28397-21' of https://github.com/totara/moodle into MOODLE_21_STABLE 2011-08-23 17:31:12 +02:00
Sam Hemelryk bb37aab093 MDL-25636 block_html Fixed up missing format config if block restored from early 2.0 backup 2011-08-23 18:41:48 +08:00
Eloy Lafuente (stronk7) 72bd83e0f1 Merge branch 'w33_MDL-28381_m21_cliphpver' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-08-23 11:03:42 +02:00
Eloy Lafuente (stronk7) 1b69c111cc Merge branch 'MDL-28996_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-23 10:42:52 +02:00
Petr Skoda 23eccfcd77 MDL-28935 use weekdays as calendar table headings 2011-08-23 10:05:14 +02:00
Jason Ilicic 68cfdb72f9 MDL-28935 Add days of week to monthly calendar view 2011-08-23 10:05:04 +02:00
Tim Hunt 0570e81ecb MDL-29062 qtype multianswer refers to old name for the question_delete_questions function. 2011-08-23 08:54:15 +01:00
Tim Hunt 5ce736caa8 MDL-29064 qtype multianswer, question text should be a required field. 2011-08-23 08:41:00 +01:00
Aparup Banerjee 8145290d43 Merge branch 'MDL-28509_21_STABLE' of git://github.com/marxjohnson/moodle into MOODLE_21_STABLE 2011-08-23 14:55:11 +08:00
Eloy Lafuente (stronk7) d94b4b327d Merge branch 'm21_MDL-28999' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2011-08-23 02:49:59 +02:00
Petr Skoda c896d5c54d MDL-29016 allow distributions to set dataroot permissions 2011-08-23 02:43:10 +02:00
Eloy Lafuente (stronk7) 5cfb119475 Merge branch 'MDL-28990-MOODLE_21_STABLE' of git://github.com/mouneyrac/moodle into MOODLE_21_STABLE 2011-08-23 02:37:01 +02:00
Eloy Lafuente (stronk7) 092c6089c9 Merge branch 'w33_MDL-29031_m21_oldblock' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-08-23 02:05:08 +02:00
Eloy Lafuente (stronk7) 8fb3542126 Merge branch 'MDL-28226_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-23 01:42:25 +02:00
Adam Olley 4b0fbfcbd9 MDL-28481: Send headers before any possible output 2011-08-23 01:37:16 +02:00
Eloy Lafuente (stronk7) b1ea3fb2c6 Merge branch 'w33_MDL-28936_m21_msgstrlen' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-08-23 01:20:24 +02:00
Eloy Lafuente (stronk7) 94aa0fbe8c Merge branch 'MDL-28241_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-23 01:17:17 +02:00
Tom Cubanski 6be8a680e2 MDL-26302 quiz editing: top move button on the order and paging tab does not work.
It is strange that processes the submission already handles the submitted data from this change to the HTML.
2011-08-22 23:56:51 +01:00
Tim Hunt 6310adb3f4 MDL-28564 question type importing, improve Jamie's fix. 2011-08-22 23:32:48 +01:00
Jamie Pratt 80fa621c50 MDL-28564 "implement support for extra answer fields in question export and
import" implemented support for extra answer fields in questiontype base
export and import functions.
2011-08-22 23:32:47 +01:00
Tim Hunt 60854b669a MDL-28241 editing multianswer questions broken since the fix for MDL-24594. 2011-08-22 22:36:37 +01:00
Aparup Banerjee 8db14e344b Merge branch 'wip-mdl-28580-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2011-08-23 01:49:51 +08:00
Andrew Davis (andyjdavis) a47827691a MDL-27823 messaging: preventing html tags from being output to the UI 2011-08-22 15:28:30 +08:00
Aaron Barnes 3b9bf6a949 MDL-28397 completion: Activity completion criteria not showing grading
requirement

Credit goes to Evan Irving-Pease for the patch
2011-08-22 14:57:13 +12:00
Petr Skoda 5eb8c77850 MDL-29011 do not require manual enrol cap on the enrolled users page 2011-08-21 18:18:35 +02:00
Petr Skoda 51606ad2d8 MDL-29031 remove blocks cleanup todo 2011-08-21 17:45:52 +02:00
Petr Skoda 812e3294be MDL-27248 remove forgotten unique sortorder index from the course table 2011-08-21 17:33:19 +02:00
Petr Skoda 181b0dc545 MDL-28982 fix DML use 2011-08-21 15:39:34 +02:00
Petr Skoda 6b3d645e9b MDL-28381 always verify PHP version in CLI scripts
The problem is that people may use different php binary for web and CLI.
2011-08-21 12:22:14 +02:00
Tim Hunt 3d233b9dab MDL-28444 unit test to verify the fix. 2011-08-20 13:18:05 +01:00
Henning Bostelmann 5c364504a6 MDL-28444 synchronized datasets: fix typo in get_variants_selection_seed() 2011-08-20 11:45:41 +01:00
Petr Skoda 0864c8a59d MDL-29022 do not require idnumber in ext courses - backport from MDL-29020 2011-08-20 11:34:58 +02:00
AMOS bot c498bf796b Automatically generated installer lang files 2011-08-20 00:55:28 +00:00
Petr Skoda a32da065ae MDL-28936 fix invalid >200 comparison and utf-8 incompatibility
Credit for discovery goes to Jason Ilicic.
2011-08-19 18:44:33 +02:00
Tony Levi 68d9daa187 MDL-28708: Send 304 Not Modified response when browser If-Modified-Since header is after file mtime 2011-08-19 17:27:20 +02:00
Petr Skoda 4bdcd23e19 MDL-28709 adding HTTP_IF_MODIFIED_SINCE and minor style tweaks 2011-08-19 16:50:16 +02:00
Tony Levi 716f93efdb MDL-28709: Performance: Send cache/contenttype headers with 304 responses 2011-08-19 16:50:16 +02:00
Henning Bostelmann ec5f40b1a9 MDL-28684 QE2 upgrade: recognize empty answer in multichoice questions 2011-08-19 10:33:55 +01:00
Rajesh Taneja 01f9bc7948 MDL-28580 Administration: Added sanity check to grab wrong usage of upgrade_main_savepoint 2011-08-19 07:41:13 +00:00
Jerome Mouneyrac fc218ba9e2 MDL-28990 add web service mobile overview 2011-08-19 11:47:17 +08:00
Dan Marsden f3e0eac04f MDL-28999 SCORM add missing yui2 require 2011-08-19 10:21:11 +12:00
Tim Hunt da45306da5 MDL-28996 Quiz view page list of attempts table is sometimes missing a cell. 2011-08-18 19:27:19 +01:00
Tim Hunt 96bab3e01d MDL-28979 qtype match: correct answer formatted badly. 2011-08-18 13:51:18 +01:00
Tim Hunt cb5a7bba89 MDL-28976 quiz was passing 0 to ->attempt_url when it should have been null.
There was also one other incorrect call that is fixed in this commit.
2011-08-18 13:50:51 +01:00
Tim Hunt 0a20ddbe7d MDL-28975 question engine, JavaScript error in IE. 2011-08-18 13:50:24 +01:00
Tim Hunt 3575052f81 MDL-28687 questions avoid fatal errors when reviewing attempts at deleted questions. 2011-08-18 13:49:33 +01:00
Tim Hunt 6d9ae2adf0 MDL-28226 quiz locallib. Fix PHPdoc comment and code to make the API clearer. 2011-08-18 13:44:01 +01:00
Jerome Mouneyrac f76dc0ff65 MDL-28650 add a page in the administration to the full web service API (API documentation). 2011-08-18 12:08:38 +08:00
Dan Marsden 1b64c78d36 MDL-28962 enrol imsenterprise - incorrect conversion of new dml syntax - thanks to Patrick Gagnon for report and fix. 2011-08-18 13:40:17 +12:00
Eloy Lafuente (stronk7) 24654d977b weekly release 2.1.1+ 2011-08-18 02:42:40 +02:00
Eloy Lafuente (stronk7) cd91adc715 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2011-08-18 02:38:43 +02:00
Colin Chambers e5ba71b479 #MDL-28957 outputrequirementslib reduced excessive js console logging 2011-08-17 14:58:15 +01:00
Eloy Lafuente (stronk7) ad307c7121 Merge branch 'MDL-28349_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-17 15:40:00 +02:00
Dongsheng Cai 1c64c52951 MDL-27289, upgrade box.net repository plugin to use new box.net authentication process 2011-08-17 11:45:32 +08:00
Eloy Lafuente (stronk7) 74475bd5d5 Merge branch 'wip-mdl-27219-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2011-08-17 02:59:38 +02:00
Eloy Lafuente (stronk7) c30dadce6f Merge branch 'MDL-28737_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-17 02:51:57 +02:00
Eloy Lafuente (stronk7) f45cf8cb2c Revert "MDL-25757 SCORM fix issue with duplicate cmi values being saved"
This reverts commit 2c7cc519d8.
2011-08-17 02:28:49 +02:00
Eloy Lafuente (stronk7) 4239318be9 Merge branch 'MDL-21934_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-17 01:29:20 +02:00
Eloy Lafuente (stronk7) 33868528bb Merge branch 'MDL-27752_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2011-08-17 01:02:21 +02:00
Eloy Lafuente (stronk7) e3af6a00ba Merge branch 'MDL-28643-m21' of git://github.com/sammarshallou/moodle into MOODLE_21_STABLE 2011-08-17 00:45:25 +02:00
Eloy Lafuente (stronk7) 95caac3cc8 Merge branch 'm21_MDL-28649' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2011-08-17 00:33:07 +02:00
Eloy Lafuente (stronk7) c89c390759 Merge branch 'MDL-28652_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-17 00:29:23 +02:00
Eloy Lafuente (stronk7) 25bde46869 Merge branch 'MDL-28653_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-17 00:25:46 +02:00
Tim Hunt 269c653560 MDL-28654 fix path for TinyMCE in lib/thirdpartylibs.xml. 2011-08-17 00:10:09 +02:00
Eloy Lafuente (stronk7) 88b340161b Merge branch 'MDL-28655-21' of git://github.com/bostelm/moodle into MOODLE_21_STABLE 2011-08-17 00:07:44 +02:00
Eloy Lafuente (stronk7) 5b18861bf0 Merge branch 'm21_MDL-28721' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2011-08-16 23:44:12 +02:00
Eloy Lafuente (stronk7) 84e093e143 Merge branch 'wip-MDL-26754-MOODLE_21_STABLE' of github.com:marinaglancy/moodle into MOODLE_21_STABLE 2011-08-16 13:11:16 +02:00
Eloy Lafuente (stronk7) 02b36f79d2 Merge branch 'MDL-28365_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-16 13:03:59 +02:00
Eloy Lafuente (stronk7) a6f18c98f4 Merge branch 'MDL-23872_m21' of git://github.com/nebgor/moodle into MOODLE_21_STABLE 2011-08-16 11:51:53 +02:00
Rajesh Taneja 273ac54baa MDL-27219 chat: Beep will not display user fullname if user is not in chat 2011-08-16 16:35:33 +08:00
Andrew Davis (andyjdavis) 549af292b6 MDL-28943 messaging: made messaging admin page use a string instead of the plugin name 2011-08-16 14:33:57 +08:00
Eloy Lafuente (stronk7) 28f9b39287 Merge branch 'MDL-28931_m21' of git://github.com/stronk7/moodle into MOODLE_21_STABLE 2011-08-16 03:06:07 +02:00
Eloy Lafuente (stronk7) e42213ab72 Merge branch 'wip-mdl-27728-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2011-08-16 02:14:49 +02:00
Eloy Lafuente (stronk7) 68d998c6cf Merge branch 'MDL-27030_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-16 02:07:37 +02:00
Eloy Lafuente (stronk7) bf22dc969c MDL-27896 filters/editor - fix whitespace 2011-08-16 02:01:20 +02:00
Eloy Lafuente (stronk7) 0031600453 Merge branch 'wip-mdl-27896-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2011-08-16 02:00:36 +02:00
Eloy Lafuente (stronk7) 3bcd0781f1 Merge branch 'm21_MDL-25757' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2011-08-16 00:39:18 +02:00
Petr Skoda 26e3dce466 Merge branch 'MDL-27845_rating_aggregation_21' into MOODLE_21_STABLE 2011-08-15 20:41:12 +02:00
Tim Hunt 5e54da0a69 MDL-21934 Removing all questions from the quiz should not delet overall feedback.
Overall feedback was being wiped because the quiz max grade was being set to zero when sumgrades was set to 0. The correct logic is to only set maxgrade to 0 if there are questions in the quiz and sumgrades is 0.
2011-08-15 19:10:47 +01:00
Eloy Lafuente (stronk7) a4f85cc579 Merge branch 'm21_MDL-28603' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2011-08-15 20:02:33 +02:00
Dan Poltawski bf1b681560 MDL-28605 repsitory/local - Prevent server running out of memory
Removing useless code..
2011-08-15 19:58:27 +02:00
Eloy Lafuente (stronk7) 2ce0d40694 Merge branch 'MDL-28939_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-15 19:34:59 +02:00
Tim Hunt 7f10fbbf5f MDL-28349 error when GIFT-importing essay questions. 2011-08-15 16:18:03 +01:00
Tim Hunt e67a234c98 MDL-28365 Move question lang string to the right file
All the references to this sring were already referring to it in the new
place.

AMOS BEGIN
 MOV [cannotread,mod_quiz],[cannotread,question]
AMOS END
2011-08-15 15:20:15 +01:00
Tim Hunt 80e3f00091 MDL-28939 Bad lang string reference in grade/import/csv. 2011-08-15 15:12:19 +01:00
Tim Hunt d3fd75d21d MDL-28639 question import should set timemodified and modified by.
Thanks to Jean-Michel Vedrine for the fix.
2011-08-15 14:56:45 +01:00
Tim Hunt 8ad92a30f1 MDL-28438 Aiken question import broken since MDL-24594. 2011-08-15 14:47:16 +01:00
Eloy Lafuente (stronk7) bee0152fda MDL-28931 timezone - update to 2011h (2200 rules) 2011-08-14 18:06:10 +02:00
Dan Marsden 2c7cc519d8 MDL-25757 SCORM fix issue with duplicate cmi values being saved 2011-08-13 13:24:22 +12:00
Tim Hunt 643e2728df MDL-28737 advcheckboxes toggle state every submit if checkbox_controller present. 2011-08-12 19:13:20 +01:00
Rajesh Taneja 3a7de25755 MDL-27896 course - Rectified wrong use of itemid for preparing draft file area 2011-08-12 16:49:29 +08:00
Rajesh Taneja 56d57a9a4e MDL-27896 editor - parent context will be respected by editor in case context is not created. 2011-08-12 16:49:05 +08:00
Rajesh Taneja 1449e4faa2 MDL-27896 editor - added sanity check to pick wrong context passed to editor creation 2011-08-12 16:48:47 +08:00
Rajesh Taneja b51aac313f MDL-27896 context - Fixed editor context to observe filter status 2011-08-12 16:48:22 +08:00
Dan Marsden ee124f531b MDL-28603 SCORM fix regression with ADL scorm 1.2 tests 2011-08-12 17:24:48 +12:00
Rajesh Taneja 63ff326835 MDL-27728 Moodleforms: Added validation for element before checking element values 2011-08-12 10:54:33 +08:00
AMOS bot 5ce30862f2 Automatically generated installer lang files 2011-08-12 00:55:30 +00:00
Dan Marsden dbc61bc225 MDL-28649 SCORM start new attempt if set when skipview used. 2011-08-12 12:53:53 +12:00
Dan Marsden f08cc8276c MDL-28721 SCORM respect hidenav setting 2011-08-12 11:07:28 +12:00
Eloy Lafuente (stronk7) 3a5778ec5a weekly release 2.1.1+ 2011-08-12 00:19:27 +02:00
Eloy Lafuente (stronk7) d0aeb0abfa Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2011-08-12 00:13:16 +02:00
Marina Glancy f364d3f91d MDL-26754: Removed unnecessary include 2011-08-11 13:40:24 +08:00
AMOS bot 07b5fbb9ca Automatically generated installer lang files 2011-08-11 00:55:47 +00:00
Eloy Lafuente (stronk7) 7637e2e5e4 Merge branch 'MDL-27491-m21' of git://github.com/sammarshallou/moodle into MOODLE_21_STABLE 2011-08-10 23:04:13 +02:00
Eloy Lafuente (stronk7) d980c1d746 Merge branch 'm21_MDL-28295' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2011-08-10 22:58:04 +02:00
Daren Chandisingh 339c198ade MDL-23872 Forms Library : Updated MoodleQuickForm to honour setConstant(), prevents injection. 2011-08-10 15:22:07 +08:00
Sam Hemelryk 4f4cbbad8f Merge branch 'MDL-20501_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2011-08-10 14:10:12 +08:00
Dan Marsden 6a211fb52d MDL-28295 SCORM change mangement of pop-up windows, load full SCORM API in existing window - this fixes an issue with IE 7 and httpreq communication 2011-08-10 14:33:39 +12:00
Eloy Lafuente (stronk7) 9271414522 Merge branch 'MDL-27631_21' of git://github.com/mkassaei/moodle into MOODLE_21_STABLE 2011-08-10 03:06:52 +02:00
AMOS bot f715589ee5 Automatically generated installer lang files 2011-08-10 00:55:22 +00:00
Eloy Lafuente (stronk7) 6c506c9a07 Merge branch 'MDL-27550-workshop-feedback_21_STABLE' of git://github.com/mudrd8mz/moodle into MOODLE_21_STABLE 2011-08-10 02:49:03 +02:00
Eloy Lafuente (stronk7) a28b6620d6 Merge branch 'w31_MDL-27597_m21_catlike' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-08-10 02:37:07 +02:00
Dan Poltawski c0d30fbb75 MDL-23967 admin/cron.php - warn about use on CLI
Admins now need to use the explicit CLI script
2011-08-10 02:06:12 +02:00
Dan Poltawski 3b97dedfbd MDL-28059 weblib - don't strip mailto: anchors 2011-08-10 01:59:16 +02:00
Eloy Lafuente (stronk7) d04b3d580e Merge branch 'wip-MDL-28407-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2011-08-10 01:11:51 +02:00
Eloy Lafuente (stronk7) 0f61d7f97c Merge branch 'w31_MDL-28533_m21_columnperf' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-08-09 19:33:09 +02:00
sam marshall 37f5c92302 MDL-28643 Fix debugging message when deleting activity with grade completion 2011-08-09 12:47:26 +01:00
Tim Hunt dc4bff71a2 MDL-28653 question output. Add a class to the main div based on question state.
This makes it possible themes do cool things. For example change more of the display depending on whether the answer was correct or not.
2011-08-09 11:32:18 +01:00
Eloy Lafuente (stronk7) fd6a17ecfb Merge branch 'MDL-28565_m21' of git://github.com/nebgor/moodle into MOODLE_21_STABLE 2011-08-09 10:15:48 +02:00
Henning Bostelmann fe34282df6 MDL-28655 qtype_calculated question engine upgrade: fix return value 2011-08-09 09:15:33 +01:00
Eloy Lafuente (stronk7) 6b4422a086 Merge branch 'MDL-28604_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-09 09:42:59 +02:00
AMOS bot 9dba637233 Automatically generated installer lang files 2011-08-09 00:55:22 +00:00
Tony Levi 5c5cb085c0 MDL-27030: Fix quiz overview report showing incorrect grades on regraded attempts
Conflicts:

	mod/quiz/report/overview/report.php
2011-08-08 23:46:19 +01:00
Petr Skoda 1c106106fd Merge branch 'MDL-28620_21' of git://github.com/jbrisland/moodle into MOODLE_21_STABLE 2011-08-08 15:35:05 +02:00
Tim Hunt 65be66e4d4 MDL-28652 qtype calculated, bad display of placeholder names on the editing form. 2011-08-08 13:14:20 +01:00
Aparup Banerjee 006776fc71 MDL-28565 General - updated lang files License link to docs.moodle.org/dev/License 2011-08-08 17:14:06 +08:00
Aparup Banerjee 6f80b9b3e9 MDL-28565 General - updated License and Credits links
to docs.moodle.org/dev/License and docs.moodle.org/dev/Credits
2011-08-08 17:13:36 +08:00
Sagie Maoz 56f2ab3335 MDL-26721 automated backups - Fix typo
Causing the 'role assignment' backup inclusion to be tied to the users

Signed-off-by: Dan Poltawski <dan.poltawski@luns.net.uk>
2011-08-08 15:39:12 +08:00
Sam Hemelryk 5553dcba67 Merge branch 'mdl-28517_2.1' of git://github.com/colchambers/moodle into MOODLE_21_STABLE 2011-08-08 14:22:41 +08:00
Sam Hemelryk 806e82b7fc Merge branch 'MDL-28569' of git://git.luns.net.uk/moodle into MOODLE_21_STABLE 2011-08-08 14:09:53 +08:00
Sam Hemelryk 172007a066 Merged branch 'MDL-28575_MOODLE_21_STABLE' of git://github.com/kordan/moodle.git with conflict resolution 2011-08-08 13:59:08 +08:00
Sam Hemelryk 9a2e30d8bc Merge branch 'MDL-28587_MOODLE_21_STABLE' of git://github.com/kordan/moodle into MOODLE_21_STABLE 2011-08-08 13:44:52 +08:00
Rossiani Wijaya 272d804840 MDL-27752 Calendar export: fixed typo in url parameter 2011-08-08 12:16:59 +08:00
Sam Hemelryk 40b4296d07 Merge branch 'MDL-28406_block_duplicate_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2011-08-08 11:18:54 +08:00
Sam Hemelryk f24eca0c6b Merge branch 'MDL-28602_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-08 11:08:08 +08:00
Sam Hemelryk 9d660d5f0e Merge branch 'MDL-28593_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-08 11:04:38 +08:00
Sam Hemelryk cf7daeae7e Merge branch 'MDL-28612_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-08 11:02:11 +08:00
Sam Hemelryk 62bdb79c26 Merge branch 'MDL-28618_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-08 10:57:31 +08:00
Sam Hemelryk 6f7c43c7de Merge branch 'w31_MDL-27586_m21_browser' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-08-08 10:47:33 +08:00
Sam Hemelryk cf8cc1bab1 Merge branch 'w31_MDL-27685_m21_pglike' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-08-08 10:25:47 +08:00
Sam Hemelryk 6b9c6cc54e Merge branch 'w31_MDL-28382_m21_iis' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-08-08 10:20:57 +08:00
Sam Hemelryk 31b4fdabbf Merge branch 'w31_MDL-28450_m21_defgroup' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-08-08 10:09:46 +08:00
Sam Hemelryk a9fbf9fb87 Merge branch 'w31_MDL-28468_m21_cohortassign' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-08-08 10:06:21 +08:00
Sam Hemelryk 2e81c307d0 Merge branch 'w31_MDL-28473_m21_blocksupgrade' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-08-08 10:03:07 +08:00
Petr Skoda c2edea7cbd MDL-28382 work around or detect REQUEST_URI IIS bug 2011-08-07 14:45:53 +02:00
Petr Skoda f6589dd72d MDL-27685 fix pg LIKE escape trouble 2011-08-07 13:22:36 +02:00
Petr Skoda 29a27d3ca4 MDL-28450 prefer member group for default 2011-08-07 13:07:54 +02:00
Petr Skoda e24225351c MDL-28634 fix forgotten references to Moodle 2.0 and old PHP version requirements 2011-08-06 22:57:47 +02:00
Petr Skoda 520f687cde MDL-27586 fix file_browser access control 2011-08-06 16:24:04 +02:00
Petr Skoda e25df8c464 MDL-28473 fix $instanceids troubles in blocks upgrade
Credit goes to Mateusz Wójcik.
2011-08-05 22:09:49 +02:00
Petr Skoda a5410db4e3 MDL-28468 fix cohort assign check 2011-08-05 21:47:41 +02:00
Petr Skoda d84336c27d verify where_clause() only in debug mode 2011-08-05 21:34:09 +02:00
Petr Skoda cbe6399300 MDL-27597 fix invalid results of get_categories when shallow is false 2011-08-05 20:14:59 +02:00
Tim Hunt c5fe3d7490 MDL-28618 question combined feedback: inconsistency in file areas.
The (partially|in)?correct feedback fields acutally store their files in a file area with component 'question'. Some code, however, was written as if they were stored in the qtype_whatever area.
2011-08-05 17:38:22 +01:00
James Brisland c04c6e6b8a MDL-28620 - Removed admin/generator.php include as it causes issues if this script is included from any other script that is running in the command line 2011-08-05 16:11:44 +01:00
M Kassaei 6f90ec4703 MDL-27631 question bank Show question text in the question list when top level category is used 2011-08-05 15:00:29 +01:00
Tim Hunt e3b8930087 MDL-28593 Missing include breaks editing quiz grade item. 2011-08-05 08:53:16 +01:00
Andrew Davis (andyjdavis) 70ade8e8d7 MDL-28406 blocks: added JS to prevent the addition of duplicate blocks 2011-08-05 11:33:42 +08:00
Andrew Davis (andyjdavis) b312305ccc MDL-27845 rating: altered the get_ratings() query to avoid possible future duplicate key problems 2011-08-05 11:19:11 +08:00
Sam Hemelryk 1ad4fb6f12 MDL-28407 Fixed up calendar preferences form handling 2011-08-05 09:34:43 +08:00
AMOS bot 056a53e81f Automatically generated installer lang files 2011-08-05 00:55:17 +00:00
Tim Hunt 788e2b30a5 MDL-28612 Quiz statistics report does not always show the 'Actual response' column when it should 2011-08-04 18:15:34 +01:00
Colin Chambers 005900fd2a MDL-28517 question editing fixed duplicate id in hint header field 2011-08-04 14:54:11 +01:00
Tim Hunt f97a14ba27 MDL-28602 Quiz review reports the wrong duration. 2011-08-04 14:20:02 +01:00
Tim Hunt 3e1d47f2cc MDL-28604 Question bank display forgets sort order 2011-08-04 13:55:38 +01:00
Marina Glancy ad66263bc1 MDL-26754 Display blocks in 'manage blocks' alphabetically sorted 2011-08-04 14:12:08 +08:00
AMOS bot 64d8fed91c Automatically generated installer lang files 2011-08-04 00:55:33 +00:00
Petr Skoda 80eb52c415 weekly release 2.1.1+ 2011-08-03 18:04:44 +02:00
Petr Skoda c0852d9a0c Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2011-08-03 18:02:52 +02:00
kordan 5dd9ee192e MDL-28587 fix for MOODLE_21_STABLE 2011-08-03 15:25:08 +02:00
sam marshall e1bb4741f1 MDL-27491 Add 'complete on view' support to wiki, survey 2011-08-03 11:22:10 +01:00
Sam Hemelryk 4a45ddbae2 Revert "MDL-28284 don't load filepicker module for every page"
This reverts commit 279a874108.
2011-08-03 18:20:30 +08:00
kordan aa34ca4309 MDL-28575 fix for MOODLE_21_STABLE 2011-08-02 23:41:45 +02:00
David Mudrak 11351de2d3 MDL-27550 workshop: fixed XHTML strictness of H3 and A combo
H3 is block level element while A is in-line element in XHTML.
Credit goes to Sam Hemelryk for spotting this during the peer-review.
2011-08-02 23:32:46 +02:00
David Mudrak 08282ec16c MDL-27550 workshop: rendering links to the submission and the assessment page
This usability improvement helps to provide feedback quickly during the
grading evaluation phase.
2011-08-02 23:32:25 +02:00
David Mudrak 8981b64a41 MDL-27550 workshop: students do not see peer-assessment that are not graded yet 2011-08-02 23:32:25 +02:00
David Mudrak c6b8bbfa9b MDL-27550 workshop: display the feedback for the submission reviewer when the workshop is closed 2011-08-02 23:32:24 +02:00
David Mudrak 275a6f59d7 MDL-27550 workshop: assessments are now displayed via proper rendering subsystem
AMOS BEGIN
 MOV [assessmentbyknown,mod_workshop],[assessmentbyfullname,mod_workshop]
AMOS END
2011-08-02 23:32:24 +02:00
David Mudrak 308e4280e3 MDL-27550 workshop: display the feedback for the submission author when the workshop is closed
The method user_picture::fields() was not available when these SQL
statements were originally written. Now instead of hard-coding the list
of returned fields, the user_picture is asked for the list.

Together with this change, methods workshop::get_submission_by_id()
and workshop::get_submission_by_author() now return the information
about the user who provided the feedback and overwrote the grade.
2011-08-02 23:32:24 +02:00
Petr Skoda 5d08b03e5b Merge branch 'wip-mdl-27658-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2011-08-02 15:12:54 +02:00
Petr Skoda e4e3b12325 Merge branch 'MDL-28338_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-02 15:08:48 +02:00
Dan Marsden 97247fdadd MDL-28410 Choice - allow single answer choice to be created 2011-08-02 15:05:01 +02:00
Petr Skoda fb563a9949 Merge branch 'MDL-28507_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-02 14:51:30 +02:00
Dan Marsden f166ab0bec MDL-28535 SCORM remove old IE 6 related warning about zlib 2011-08-02 14:40:41 +02:00
Tim Hunt bae927bebd MDL-28507 fix bad lang string uses, and remove two obsolete strings. 2011-08-02 13:38:39 +01:00
Dan Poltawski 7f62477a87 MDL-28569 blocks/rss_client - RSS feed autodiscovery fails with ampersands
Simpliepie is quoting urls and we need the url to be unescaped
2011-08-02 13:19:01 +01:00
Sam Hemelryk 5a5e7bb3b1 Merge branch 'MDL-28490_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-02 17:56:14 +08:00
Sam Hemelryk 6f2723ae83 Merge branch 'MDL-28508_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-02 17:47:42 +08:00
Sam Hemelryk 365ed23695 Merge branch 'MDL-28051_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-08-02 17:14:33 +08:00
Andrew Robert Nicols c0c2b3dc1a MDL-28515 Add cli install options for fullname and shortname 2011-08-02 17:07:44 +08:00
Sam Hemelryk 26dcfcb542 Merge branch 'MDL-28340_advanced_search_other_users_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2011-08-02 16:59:36 +08:00
Sam Hemelryk 34eee090a7 Merge branch 'wip-mdl-28504-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2011-08-02 16:51:57 +08:00
Sam Hemelryk 9a1f42da6d Merge branch 'wip-MDL-19907-MOODLE_21_STABLE' of git://github.com/marinaglancy/moodle into MOODLE_21_STABLE 2011-08-02 16:46:07 +08:00
Sam Hemelryk 5be31c5bf2 MDL-27122 admin Improved block protection help string 2011-08-02 16:32:13 +08:00
Sam Hemelryk 3e2569f70d Merge branch 'wip-MDL-27122-MOODLE_21_STABLE' of git://github.com/marinaglancy/moodle into MOODLE_21_STABLE 2011-08-02 16:27:49 +08:00
Sam Hemelryk fa0f970835 Merge branch 'wip-MDL-27754-MOODLE_21_STABLE' of git://github.com/marinaglancy/moodle into MOODLE_21_STABLE 2011-08-02 14:09:30 +08:00
Sam Hemelryk f89a34fb77 Merge branch 's11_MDL-28284_filepicker_module_21' of git://github.com/dongsheng/moodle into MOODLE_21_STABLE 2011-08-02 13:42:12 +08:00
Sam Hemelryk 09e7c66714 Merge branch 'MDL-28510_21_STABLE' of git://github.com/marxjohnson/moodle into MOODLE_21_STABLE 2011-08-02 13:37:17 +08:00
unknown c4eea3e21a Merge branch 'm21_MDL-27876' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2011-08-02 13:26:25 +08:00
Piers Harding 189bdcf125 MDL-27876 SCORM auto-adjust the stage height 2011-08-02 17:13:37 +12:00
Sam Hemelryk b587abd989 Merge branch 'MDL-28487-typo_21_STABLE' of git://github.com/mudrd8mz/moodle into MOODLE_21_STABLE 2011-08-02 12:23:14 +08:00
Sam Hemelryk 9cacdc07d7 Merged branch 'm21_MDL-28548' of git://github.com/danmarsden/moodle.git with comment changes 2011-08-02 11:46:11 +08:00
AMOS bot e054707e9a Automatically generated installer lang files 2011-08-02 00:55:21 +00:00
Marina Glancy 9cd9d86640 MDL-27754 fixed typo in language string 2011-08-02 08:52:10 +08:00
Marina Glancy 919fcc6f12 MDL-27122 Allow admin to change CFG->undeletableblocktypes on 'Manage blocks' settings page. Instances of protected block types will be undeletable only from site context 2011-08-02 08:52:03 +08:00
Marina Glancy f9694db2cb MDL-19907 rewrote validation for required fields in forms, including support for editor field. Added parameter to use strict (no spaces) required fields validation 2011-08-02 08:51:40 +08:00
Rossiani Wijaya 2154de3b3c MDL-20501 survey module: fix text alignment for right to left language. Change undefined string to 2011-08-01 17:40:04 +08:00
Sam Hemelryk 0c566ce339 Moodle 2.1.1 release 2011-08-01 16:57:23 +08:00
Rajesh Taneja 5bda1372a1 MDL-27658 javascript: Typo fixed for toUpperCase 2011-08-01 12:53:51 +08:00
Rajesh Taneja 877f061325 MDL-28504 filter: Typo in css fixed 2011-08-01 10:22:57 +08:00
Dan Marsden 263f258ae2 MDL-28548 allow backup to contain info from multiple plagiarism plugins. 2011-08-01 10:28:59 +12:00
Sam Hemelryk 06b04e5c62 weekly release 2.1+ (emergency) 2011-07-29 12:21:57 +08:00
Andrew Davis (andyjdavis) d0752d358e MDL-28340 messaging: fixed a display issue when you search for and tried to view a conversation between two other users 2011-07-29 11:50:51 +08:00
Sam Hemelryk c7f69afe4a Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2011-07-29 10:13:43 +08:00
Sam Hemelryk 2fa0daefca MDL-28503 comment-caps Slight improvement to allow frontpage and guest users to view comments by default 2011-07-29 09:44:10 +08:00
AMOS bot 89c13e32a0 Automatically generated installer lang files 2011-07-29 00:55:17 +00:00
Wale Olujide 235a394e04 MDL-28051 Question numbers on the question edit page shoud be the same as during the quiz attempt. 2011-07-28 18:03:55 +01:00
Mark Johnson a10ec7f66a MDL-28510 repository_youtube Use smaller thumbnails in search results 2011-07-28 13:46:04 +01:00
Mark Johnson 0638e55b14 MDL-28509 repository_youtube Enable selection of sort order 2011-07-28 13:15:25 +01:00
Tim Hunt a637417d78 MDL-28508 bad string trunction in Aiken format. 2011-07-28 11:52:27 +01:00
Sam Hemelryk 9da3c2efad MDL-28503 Removed the ability for plugins to override comment capabilities and the defaults associated with it 2011-07-28 13:40:06 +08:00
AMOS bot 16e382f8c5 Automatically generated installer lang files 2011-07-28 00:55:17 +00:00
Tim Hunt e12ec6169a MDL-28490 Better class names in the statistics report to help themes. 2011-07-27 19:26:32 +01:00
Tim Hunt 01528075a2 MDL-28338 fix stupid '\n's in the quiz renderer 2011-07-27 19:25:49 +01:00
David Mudrak 3cddd60db7 MDL-28487 Fixed typo in media filter help string 2011-07-27 14:44:17 +02:00
AMOS bot 216113139f Automatically generated installer lang files 2011-07-27 00:55:30 +00:00
Petr Skoda f664cb7c29 weekly release 2.1+ 2011-07-26 11:10:56 +02:00
Petr Skoda 4ac669f1e8 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2011-07-26 11:09:49 +02:00
AMOS bot 99b0cba0ec Automatically generated installer lang files 2011-07-26 00:55:24 +00:00
Tim Hunt 526d69522d MDL-28218 allow testclient.php to find the necessary form for services defined in plugins. 2011-07-25 20:05:01 +02:00
Petr Skoda a24681a87a Merge branch 'MDL-28437_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-07-25 19:54:07 +02:00
Petr Skoda e1ad3c38bc Merge branch 'MDL-28369_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-07-25 19:52:26 +02:00
Petr Skoda 7ff71aca59 Merge branch 'MDL-28377_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2011-07-25 19:50:18 +02:00
Petr Skoda e205686397 Merge branch 'wip-MDL-28421-MOODLE_21_STABLE' of https://github.com/Beedell/moodle into MOODLE_21_STABLE 2011-07-25 17:03:18 +02:00
Petr Skoda ba295bba29 Merge branch 'wip-MDL-28191-m21' into MOODLE_21_STABLE 2011-07-25 16:46:42 +02:00
Petr Skoda 25f9dae427 Merge branch 'MDL-28453_MOODLE_21_STABLE' into MOODLE_21_STABLE 2011-07-25 16:25:40 +02:00
Tim Hunt d8f77afbb8 MDL-28369 Question hints not being restored. 2011-07-25 10:06:27 +01:00
John Beedell aa4292ad22 MDL-28421 admin config improve class
admin_setting_configmultiselect_modules to include a default
2011-07-25 09:56:55 +01:00
Aparup Banerjee 2d4c4b65d4 MDL-28453 backup - made temporary restoration courses hidden by default. 2011-07-25 16:44:50 +08:00
Tim Hunt ce9423eaa7 MDL-28377 Call to mod_quiz_renderer is screwed up. 2011-07-25 09:16:11 +01:00
Tim Hunt 26a4f319a8 MDL-28437 Question bank pages should all use General type: admin. 2011-07-25 08:52:22 +01:00
Sam Hemelryk 93c5c05423 Merge branch 'MDL-28107_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2011-07-25 15:14:27 +08:00
Andrew Davis (andyjdavis) 2f74865eef MDL-27845 rating: split the get_ratings() query into two to reduce query complexity 2011-07-25 14:21:17 +08:00
Andrew Davis (andyjdavis) fc391624f0 MDL-27845 rating: updated rating unit tests 2011-07-25 14:18:38 +08:00
Eloy Lafuente (stronk7) a5224e1f83 rating/lib.php unit tests 1st cut 2011-07-25 14:18:29 +08:00
Sam Hemelryk 30bfe73981 Merge branch 'MDL-28228' of git://git.luns.net.uk/moodle into MOODLE_21_STABLE 2011-07-25 13:04:19 +08:00
Sam Hemelryk b835eebad9 Merge branch 'MDL-28232' of git://git.luns.net.uk/moodle into MOODLE_21_STABLE 2011-07-25 12:57:01 +08:00
Michael Aherne 3152ccf0a4 MDL-27538 Added deprecation details to functions now in $DB 2011-07-25 11:31:39 +08:00
Sam Hemelryk 38a6a195a4 Merge branch 'w29_MDL-22584_m21_monsterpaths' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-07-25 11:18:37 +08:00
Sam Hemelryk 18c2fcf8f1 Merge branch 'w29_MDL-27464_m21_continue' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-07-25 11:03:52 +08:00
Sam Hemelryk dbb6d73c8c Merge branch 'w29_MDL-27653_m21_usercasting' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-07-25 10:59:21 +08:00
Sam Hemelryk ae5375722e Merge branch 'w29_MDL-27796_m21_httphost' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-07-25 10:55:04 +08:00
Sam Hemelryk 274d9cf950 Merge branch 'w29_MDL-27994_m21_creatorcaps' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-07-25 10:45:42 +08:00
Sam Hemelryk 7b205e100b Merge branch 'w29_MDL-28145_m21_renderer' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-07-25 10:39:47 +08:00
Sam Hemelryk 39a84a780b Merge branch 'w29_MDL-28182_m21_userdel' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-07-25 10:36:55 +08:00
Sam Hemelryk c782b4bb58 Merge branch 'w29_MDL-28337_m21_urlparams' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-07-25 10:30:00 +08:00
Sam Hemelryk b1591c6568 Merge branch 'w29_MDL-28384_m21_nullurl' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-07-25 10:14:47 +08:00
Sam Hemelryk 6e48852633 Merge branch 'w29_MDL-28432_m21_cohortconfig' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-07-25 09:52:49 +08:00
Sam Hemelryk 88b014092d Merge branch 'w29_MDL-28440_m21_jssemicol' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-07-25 09:45:42 +08:00
Mary Evans 7d8b8d1abe fix for MDL-27768 removed reference to gradient-sb image 2011-07-25 09:40:12 +08:00
Petr Skoda 13d0cc41eb MDL-27653 fix incorrect int | object detection 2011-07-24 15:05:16 +02:00
Petr Skoda f76942869c MDL-27994 course creator role is for creating courses only!
The course creator role is designed to be used to create courses, nothing else - that is create new course, create new course from backup + view hidden courses and categories.
2011-07-24 14:19:21 +02:00
Petr Skoda 50ecbad305 MDL-28384 convert empty log urls to ''
The problem is that the log table does not allow nulls, credit goes to Troy Williams.
2011-07-24 14:08:27 +02:00
Petr Skoda 1e075c08a0 MDL-27464 continuation link sometimes links off-site
This code was manually merged from MOODLE_19_STABLE, credit goes to Matt Meisberger.
2011-07-23 13:34:43 +02:00
Petr Skoda 4cbc500d1f MDL-28440 add missing semicolon causing JS issues
Credit goes to Mark Nielsen.
2011-07-23 11:49:39 +02:00
Petr Skoda 4e6464937c MDL-22584 deal with oversized dir and file names during upgrade 2011-07-23 11:40:21 +02:00
Petr Skoda cb52b340d3 MDL-28145 fix renderer typo in comments 2011-07-22 23:43:30 +02:00
Petr Skoda f1073b930b MDL-27796 ignore missing HTTP_HOST header 2011-07-22 23:18:13 +02:00
Petr Skoda 4133a3cd5b MDL-28182 always use full user object when deleting users 2011-07-22 22:48:16 +02:00
Petr Skoda bdbb48efe9 MDL-28337 add parameters explanation in URL resource configuration 2011-07-22 22:18:29 +02:00
Petr Skoda 965c9b97ab MDL-28432 use enrol/cohort and enrol/manual capabilities correctly in cohort enrol UI and fix input validation in ajax 2011-07-22 10:14:29 +02:00
Sam Hemelryk 22cf3b24a5 MDL-28191 Continue button after selecting a theme now redirects back to the theme selector 2011-07-22 14:58:06 +08:00
Rossiani Wijaya d19983fac1 MDL-28107 course enrolment icon: Fixed logged in user enrolment icons 2011-07-22 13:22:26 +08:00
AMOS bot 283ccdc71f Automatically generated installer lang files 2011-07-22 00:55:19 +00:00
Dongsheng Cai 279a874108 MDL-28284 don't load filepicker module for every page 2011-07-21 17:27:51 +08:00
AMOS bot e0d9ebc1f2 Automatically generated installer lang files 2011-07-20 00:55:26 +00:00
Petr Skoda aede1fe6a7 weekly release 2.1+ 2011-07-19 15:23:42 +02:00
Petr Skoda f21656d5d0 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2011-07-19 15:16:46 +02:00
Petr Skoda feccdaa0ff MDL-27696 initialise arrays
Credit goes to David Mudrak.
2011-07-19 15:04:38 +02:00
Petr Skoda fc7224bac7 MDL-27696 do not use placeholders in GROUP BY because pg does no like that 2011-07-19 10:54:04 +02:00
Petr Skoda 27b4936fcf MDL-27889 use new recaptcha google urls in lang packs 2011-07-19 10:26:30 +02:00
AMOS bot cdf9c89416 Automatically generated installer lang files 2011-07-19 00:55:36 +00:00
Dan Poltawski bf953fe670 MDL-28228 pagelib - incorrect DEBUG constant used 2011-07-19 00:02:56 +01:00
Dan Poltawski 677ee6dee7 MDL-28232 - Course log text export is missing a new line 2011-07-18 23:46:08 +01:00
Petr Skoda 8fa38242d0 Merge branch 'wip-MDL-28040-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2011-07-18 15:34:09 +02:00
Petr Skoda aa3097da63 Merge branch 'wip-MDL-28184-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2011-07-18 15:28:54 +02:00
Petr Skoda 719368f8cf Merge branch 'wip-MDL-28205-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2011-07-18 15:25:31 +02:00
Petr Skoda dd70519ab4 Merge branch 'wip-MDL-28137-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2011-07-18 15:22:57 +02:00
Petr Skoda 38a1040957 Merge branch 'wip-MDL-27771-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2011-07-18 15:20:01 +02:00
Petr Skoda ea3317e782 Merge branch 'wip-MDL-27696-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2011-07-18 15:17:55 +02:00
Petr Skoda f871cc1b8a Merge branch 'wip-MDL-27305-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2011-07-18 15:14:42 +02:00
Petr Skoda 29d4f2eeb3 Merge branch 'wip-MDL-25870-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2011-07-18 14:57:59 +02:00
Sam Hemelryk a699cbcdbc Merge branch 'wip-MDL-27756-MOODLE_21_STABLE' of github.com:marinaglancy/moodle into MOODLE_21_STABLE 2011-07-18 22:18:52 +10:00
Sam Hemelryk 8910a2d15a Merge branch 'MDL-27555_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2011-07-18 21:51:11 +10:00
Sam Hemelryk 0d9cdacf89 Merge branch 'wip-mdl-27837-MOODLE_21_STABLE' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2011-07-18 21:08:41 +10:00
Sam Hemelryk 982ea16909 Merge branch 'w28_MDL-23344_m21_loginfocus2' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-07-18 20:26:19 +10:00
Sam Hemelryk 39b10270a1 Merge branch 'w28_MDL-27804_m21_csvauth' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-07-18 20:19:20 +10:00
Sam Hemelryk 4e579f6067 Merge branch 'w28_MDL-28253_m21_managerupgrade' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-07-18 20:10:01 +10:00
Sam Hemelryk f6c2b4fc13 Merge branch 'w28_MDL-28313_m21_enroldb' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-07-18 20:04:01 +10:00
Sam Hemelryk 056c04c9b4 Merge branch 'w28_MDL-28348_m21_meta' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-07-18 19:39:28 +10:00
Sam Hemelryk 03368c0b2e Merge branch 'w28_MDL-28350_m21_wsra' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-07-18 19:28:27 +10:00
Petr Skoda 4bc43436b9 Merge branch 'wip-MDL-25125-MOODLE_21_STABLE' of github.com:marinaglancy/moodle into MOODLE_21_STABLE 2011-07-18 09:34:18 +02:00
Sam Hemelryk 5dd5e31616 Merge branch 'w28_MDL-28363_m21_dimmed' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2011-07-19 00:45:35 +10:00
Sam Hemelryk bd202c1531 Merge branch 'MDL-28298-workshop-constant_21_STABLE' of git://github.com/mudrd8mz/moodle into MOODLE_21_STABLE 2011-07-19 00:39:36 +10:00
Sam Hemelryk 9190787dff Merge branch 'MDL-28325-enrol-help_21_STABLE' of git://github.com/mudrd8mz/moodle into MOODLE_21_STABLE 2011-07-19 00:34:58 +10:00
Sam Hemelryk 3753033ef6 MDL-26482 minor whitespace fix 2011-07-19 00:28:15 +10:00
Sam Hemelryk 0a02548c23 Merge branch 'm21_MDL-26482' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2011-07-19 00:27:04 +10:00
Petr Skoda 8399f5a230 MDL-28348 fix spelling and some whitespace issues 2011-07-17 20:40:48 +02:00
Petr Skoda ffbde27300 MDL-28348 fix fatal error caused by unenrolling of incorrect enrol instance 2011-07-17 20:40:47 +02:00
Petr Skoda dd6142b7d2 MDL-28348 prevent circular references in meta handler for enrolments 2011-07-17 20:40:47 +02:00
Petr Skoda d5cb69e9ba MDL-28348 fix meta sync when unassigning roles 2011-07-17 20:40:47 +02:00
Petr Skoda 285e578ed7 MDL-28363 make dimmed selectors more specific to prevent overriding from other themes 2011-07-16 21:04:53 +02:00
AMOS bot e7250e5bd0 Automatically generated installer lang files 2011-07-16 00:55:20 +00:00
Petr Skoda f2b1a6c2ad MDL-28350 prevent bogus role assignment via externallib 2011-07-15 12:24:10 +02:00
Petr Skoda 52bdbe7617 MDL-27804 allow changing of only auth in csv user uploads 2011-07-15 11:08:19 +02:00
David Mudrak bf225ac4c8 MDL-28325 Enrolment: added help to the duration, start date and end date setting
The patch also fixes one typo in enrol_manual detected while working on
this.
2011-07-15 08:53:43 +02:00
AMOS bot 697c3ab6b6 Automatically generated installer lang files 2011-07-15 00:55:18 +00:00
Petr Skoda 0954c43f81 MDL-28313 fix incorrect enrol database settings upgrade 2011-07-14 22:34:03 +02:00
Petr Skoda 536ac72d51 MDL-23344 new option to autofocus username or password on the login form
Nearly everybody else does this login page autofocus. Once we switch to HMTL 5 we should use the new autofocus input option. I believe the admin setting should be enabled by default but it would not be possible to get it through the reviews.
2011-07-14 15:59:21 +02:00
Petr Skoda 1024510a4a MDL-28253 use unique name for new manager role 2011-07-14 13:37:31 +02:00
Marina Glancy 659d31bf25 MDL-27756 Improving move_course() performance 2011-07-14 11:02:43 +08:00
Rajesh Taneja 3012b215f6 MDL-27837 enrol - Fixed checkboxes for multiple self enrolment 2011-07-14 10:04:33 +08:00
Marina Glancy 7a97eccc48 MDL-25125 fix YUI bug with overriding styles 2011-07-14 10:00:52 +08:00
AMOS bot b8dd2bb73c Automatically generated installer lang files 2011-07-14 00:55:18 +00:00
Dan Marsden 2987d698b4 MDL-26482 SCORM add option to disable TOC completely - thanks to Clark Burns for some help! 2011-07-14 11:07:41 +12:00
Dan Marsden 082325c271 MDL-28300 SCORM Fix check for SCORM 2004 thanks to Silvia Bastos for report/patch 2011-07-14 11:02:05 +12:00
Sam Hemelryk 93d82f4601 weekly release 2.1+ 2011-07-13 20:23:04 +08:00
Sam Hemelryk 3a9e75e464 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2011-07-13 20:08:56 +08:00
Sam Hemelryk accc55da27 Revert "MDL-23344 fix login form focus"
This reverts commit 2d28584695.
2011-07-13 20:03:56 +08:00
David Mudrak d1c368e050 MDL-28298 workshop: do not use a constant without explicit inclusion of the library
Instead of including whole formslib just to get the constant defined, I
decided to hard-code the value and put the reference to the comment so
that eventual grep would spot it. Of course that is is not nice at all
but it's lesser of two evils imho.
2011-07-13 10:28:04 +02:00
Rossiani Wijaya 35ef97232c MDL-27555 assignment module: remove 'submitted' option from optional setting for offline assignment type. 2011-07-13 15:32:21 +08:00
Sam Hemelryk f3e47fc8d2 MDL-28184 navigation: Tidied up handling of coursenode when adding course essentials 2011-07-13 14:59:31 +08:00
Sam Hemelryk 4479a18d52 MDL-27771 filter-text: Fixed typo contninue 2011-07-13 14:53:12 +08:00
Chris Follin 7869e36193 MDL-27305 forum: Added missing item to forum_get_view_actions 2011-07-13 14:23:08 +08:00
Sam Hemelryk aa132e3f9b MDL-25870 enrol-manual: Fixed pagination of AJAX search results for users when changing search 2011-07-13 14:02:53 +08:00
Sam Hemelryk 34ee79470f MDL-28137 unit tests: Fixed up problem with block manager tests when running unit tests after turning editing on 2011-07-13 13:45:15 +08:00
Sam Hemelryk 9b1ffd0159 MDL-28205 RSS: Fixed up notice and set better pagelayout type on manage feeds page 2011-07-13 10:32:15 +08:00
Sam Hemelryk 9741999e77 MDL-27696 datalib Fixed up misused params in get_logs_usercourse 2011-07-13 10:29:56 +08:00
Sam Hemelryk 3274dc1461 MDL-28040 navigation: Fixed up error with navigation when dealing with categories that have a lower sort order than the parent. 2011-07-13 10:00:16 +08:00
Eloy Lafuente (stronk7) fe97a3dc7a Merge branch 'MDL-28221-resource-conversion_21_STABLE' of git://github.com/mudrd8mz/moodle into MOODLE_21_STABLE 2011-07-12 19:05:04 +02:00
Eloy Lafuente (stronk7) 6f09ed8643 Merge branch 'm21_MDL-28017' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2011-07-12 16:30:33 +02:00
Eloy Lafuente (stronk7) e0dfb65718 MDL-28210 messaging: all includes but config.php must use $CFG-based abosolute paths 2011-07-12 12:21:16 +02:00
Andrew Davis (andyjdavis) 9cf58aba08 MDL-28210 messaging: Fixed requires problems in /message/discussion.php 2011-07-12 12:21:07 +02:00
Petr Skoda c43a4beda8 MDL-28273 waring that removing user from cohorts may unenrol from courses 2011-07-12 16:27:18 +08:00
AMOS bot 64149328dd Automatically generated installer lang files 2011-07-12 00:55:23 +00:00
Dan Marsden 15bec9a365 MDL-28017 SCORM add unset_config for old config var 2011-07-12 09:48:28 +12:00
David Mudrak 665120d4e6 MDL-28221 Legacy resource URL pointing to the course itself are migrated as File module
This patch replays the logic of resource_20_migrate() function. If a
file is referred via URL to the course files of the course being
backed up, then such a resource is converted to the File module
(mod/resource) rather than URL module.
2011-07-11 22:37:34 +02:00
Petr Skoda 74275cf6e5 MDL-22404 add cohort ID to user filters
We are using only ID because there might be hundreds of cohorts in the system at different contexts. There is no special access control because filtering is supposed to be used by admins only.
2011-07-11 20:24:11 +02:00
Eloy Lafuente (stronk7) 1187c38d6d Merge branch 'm21_MDL-26942' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2011-07-11 19:48:10 +02:00
Eloy Lafuente (stronk7) a19c77bd24 Merge branch 'MDL-27755_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2011-07-11 19:43:53 +02:00
Eloy Lafuente (stronk7) b8cde34b06 Merge branch 'MDL-27741_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2011-07-11 19:36:01 +02:00
Petr Skoda 2d28584695 MDL-23344 fix login form focus 2011-07-11 17:23:28 +02:00
Dan Poltawski c261b351cf MDL-23580 course overview - remove debugging junk 2011-07-11 16:47:28 +02:00
Tim Hunt 934c878eaa MDL-26165 quiz submit are-you-sure is potentially confusing. 2011-07-11 16:33:10 +02:00
Tim Hunt b11d374122 MDL-27483 make quiz repagination more robust. 2011-07-11 16:26:36 +02:00
Rossiani Wijaya 337284688d MDL-27931 admin bulk user upload: convert city as required field. Credit goes to Charles Fulton for supplying the patch. 2011-07-11 15:57:45 +02:00
Ruslan Kabalin 661dd2cf61 MDL-28186 messaging: Fix "Enable messagning setting" infuence on the menus
"Enable messaging system" (Site administration > Advanced features) is
supposed to control messaging between site users only, thus it should not
remove user messging preferences menu item. However, it may remove instant
messging preferences from providers list for the user.

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-07-11 15:24:15 +02:00
David Mudrak b0e79df977 MDL-28221 resource: improved file not found handling
When the referenced file is not found, do not rely on the record in
resource_old as the resource can be actually restored from a 1.9 backup.
2011-07-11 12:12:38 +02:00
David Mudrak 6ca0ba0104 MDL-28221 resource: fixed a typo in variable names 2011-07-11 12:04:18 +02:00
Rossiani Wijaya 153694ed0a MDL-27741 forum subscribe link: Removed 'no' string in social course format to display a subscribe link if user is not enrolled 2011-07-11 17:04:05 +08:00
Sam Hemelryk 1541d1a36b Merge branch 'wip-mdl-27954-MOODLE_21_STABLE' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2011-07-11 16:02:18 +08:00
Tim Hunt c159d8e872 MDL-28195 confirm_action should allow the button labels to be customised 2011-07-11 15:03:39 +08:00
Sam Hemelryk a8361fc214 Merge branch 'wip-MDL-27429-m21' of git://github.com/Beedell/moodle into MOODLE_21_STABLE 2011-07-11 13:56:39 +08:00
Jamie Pratt 96c7aa3fe5 MDL-28268 Missing ORDER BY when using extra answer table.
From OU bug #921 "Order of answer fields in Variable numeric keeps changing" Cannot
reproduce this bug on my system but hopefully this will fix the problem. I added
an ORDER BY clause to the sql for fetching answers with extra answer fields.
2011-07-11 13:26:39 +08:00
Tim Hunt a3b71db63b MDL-28192 local_qeupgradehelper fix typo. 2011-07-11 13:18:37 +08:00
Dan Marsden 66c36644d3 MDL-28017 SCORM - remove admin setting incorrectly added as it was never used. 2011-07-11 15:44:50 +12:00
Sam Hemelryk 903c12c74b Merge branch 'm21_MDL-27947' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2011-07-11 11:31:48 +08:00
Sam Hemelryk 73d78d8de4 Merge branch 'MDL-27890_m21' of git://github.com/stronk7/moodle into MOODLE_21_STABLE 2011-07-11 11:25:56 +08:00
Sam Hemelryk bbdd6f2dc1 Merge branch 'glossary_multilang_m21' of git://github.com/stronk7/moodle into MOODLE_21_STABLE 2011-07-11 11:15:17 +08:00
Sam Hemelryk f738eb06e7 Merge branch 'mod_url_decode_m21' of git://github.com/stronk7/moodle into MOODLE_21_STABLE 2011-07-11 11:04:18 +08:00
Sam Hemelryk 6f30a86bc7 Merge branch 'backup_groups_m21' of git://github.com/stronk7/moodle into MOODLE_21_STABLE 2011-07-11 10:57:15 +08:00
Rajesh Taneja 4db5d94af5 MDL-27954 mod_database - fixed search navigation link 2011-07-11 10:28:47 +08:00
Eloy Lafuente (stronk7) 5299507674 MDL-28048 glossary - fix double ampersand & missing string 2011-07-11 01:40:27 +02:00
Eloy Lafuente (stronk7) d5a8ec5ccd MDL-28048 glossary - add multilang support to categories 2011-07-11 01:03:58 +02:00
Eloy Lafuente (stronk7) 4daa20bb5b MDL-28156 restore - fix some notices restoring empty courses 2011-07-10 13:12:49 +02:00
Eloy Lafuente (stronk7) 3a32daedb5 MDL-28156 restore - support restoring files without grade items 2011-07-10 00:53:29 +02:00
Eloy Lafuente (stronk7) 130fcbd649 MDL-27438 backup - on course backups add course gropus and groupings 2011-07-09 19:28:50 +02:00
Eloy Lafuente (stronk7) 96ab22afc8 MDL-27018 restore - decode links missing url->externalurl support 2011-07-09 13:35:51 +02:00
AMOS bot b88f5de7ec Automatically generated installer lang files 2011-07-09 00:55:20 +00:00
Dan Marsden 0ae4c47c76 MDL-27947 - fix TOC display on skipview - use correct org in TOC title 2011-07-09 11:48:22 +12:00
Dan Marsden 60201a66e0 SCORM MDL-26942 - merge scorm_get_toc into a single global function 2011-07-09 11:12:18 +12:00
John Beedell 5a062fcd8f MDL-27429 Adding tabindex and on keypress to the blocks show/hide icon. 2011-07-08 12:31:49 +01:00
AMOS bot 4481d845e1 Automatically generated installer lang files 2011-07-08 12:34:51 +02:00
Rossiani Wijaya fefd37d864 MDL-27755 course search: Add course id and shortname to search fields 2011-07-08 17:24:26 +08:00
Eloy Lafuente (stronk7) a938306457 weekly release 2.1+ 2011-07-08 11:22:28 +02:00
Eloy Lafuente (stronk7) 8718d91313 fix permissions 2011-07-08 11:12:55 +02:00
Eloy Lafuente (stronk7) 24813d35f7 Merge branch 'MDL-28015-workshop-sql_21_STABLE' of git://github.com/mudrd8mz/moodle into MOODLE_21_STABLE 2011-07-08 01:18:44 +02:00
Eloy Lafuente (stronk7) 8437ce030d Merge branch 'MDL-28168-custommenu_21_STABLE' of git://github.com/mudrd8mz/moodle into MOODLE_21_STABLE 2011-07-08 00:58:08 +02:00
Tim Hunt 583e6a6992 MDL-27890 tinymce - enable 30 as min height within moodle 2011-07-07 19:59:35 +02:00
Eloy Lafuente (stronk7) f738546c8f MDL-NOBUG tinymce - updated instructions to cover local modifications and other minor changes 2011-07-07 18:21:15 +02:00
Eloy Lafuente (stronk7) 0e24cfb800 MDL-27890 tinymce - allow it to be smaller 2011-07-07 17:36:59 +02:00
David Mudrak cabce0e259 MDL-28015 workshop - fixed unique list of columns in ORDER BY clause
MSSQL requires that the columns in the ORDER BY clause list must be
unique. The patch populates the list of fields by combining an array of
explicit sort definition with an array of implicit (default) sort
definition.
2011-07-07 15:16:29 +02:00
Sun Zhigang fbe00fbec7 MDL-27833 Backup - Fix can't search courses with non-latin characters during importing
PARAM_ALPHANUMEXT filter out all non-latin characters, including
Chinese, Japanese and etc. Use PARAM_NOTAGS instead.
2011-07-07 10:39:24 +02:00
Aparup Banerjee 2fa78e85e9 MDL-28169 Installation Added 2.1 upgrade (idiot proof) lines to upgrade scripts. 2011-07-07 10:24:38 +02:00
Petr Skoda dd402d1fa3 MDL-28163 custom site frontpage support 2011-07-07 10:15:34 +02:00
Eloy Lafuente (stronk7) 14cf05a2cf Merge branch 'm21_MDL-28110' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2011-07-07 03:01:30 +02:00
Eloy Lafuente (stronk7) acfa08a69f MDL-27989 whitespace fix 2011-07-07 02:22:54 +02:00
Eloy Lafuente (stronk7) e986a24a9d Merge branch 'MDL-27989_MOODLE_21_STABLE' of git://github.com/kordan/moodle into MOODLE_21_STABLE 2011-07-07 02:22:22 +02:00
Dan Poltawski 7a0374f6e7 MDL-26285 block_rss_client - do not disable with enablerssfeeds
This setting was used in 1.9 and below to control feed generation only, not
for RSS consumption.
2011-07-07 02:11:44 +02:00
Petr Skoda 78087ddfa5 MDL-27375 add missing lowercasing of external column names
Credit goes to Gail Preuninger.
2011-07-07 01:40:35 +02:00
Petr Skoda bde4f81335 MDL-28117 include repo lib when hacking file_picker renderer 2011-07-07 01:34:12 +02:00
Dan Poltawski 334b4f6301 MDL-27329 course report - correct use of wrong fullname
We are refering to users in this column of the course report not
course full name.
2011-07-07 00:25:11 +02:00
Dan Poltawski e4318be030 MDL-28100 - page resource was not using context for text filtering 2011-07-07 00:12:46 +02:00
Dan Poltawski 4c26ea1713 MDL-27279 lang/en/xmldb - Fix Typo in confirmcheckforeignkeys 2011-07-07 00:01:45 +02:00
Tim Hunt 40ff08d84f MDL-28222 quiz reports missing context in call to quiz_report_feedback_for_grade. 2011-07-06 20:29:20 +02:00
Tim Hunt 9a1da08340 MDL-27040 get_users_by_capability generates u.id IN () when no uesrs have accessallgroups 2011-07-06 19:26:30 +02:00
Tim Hunt eeb78f323a MDL-28166 fix some more instances of my favourite becuase typo. 2011-07-06 19:21:02 +02:00
Tim Hunt 54bf1cf7dc MDL-28166 send quiz event notifications asynchronously.
This avoids the problem that you cannot send messages in transactions.

It also means that the quiz submission will not be prevented, and the
message will still be sent eventually, if any part of the messaging
system is giving intermittent errors when the student wants to submit
their quiz.
2011-07-06 19:20:50 +02:00
Sun Zhigang 376d87ca03 MDL-27934 Upload Assignment - Remove useless code 2011-07-06 13:26:21 +08:00
Dan Poltawski fbb580c38a MDL-27855 navigation - only display participants link with permissions 2011-07-06 13:20:46 +08:00
Dan Poltawski 35a39e35e2 MDL-27168 completionstatus block - Use localized strings 2011-07-06 12:04:16 +08:00
Dan Poltawski 84a05572c9 MDL-26626 course competion block - fix hardcoded string 2011-07-06 11:21:35 +08:00
Dan Poltawski c01d7b4d79 MDL-26611 Roles Language - remove reference to 'legacy role type' 2011-07-06 11:10:08 +08:00
Sam Hemelryk baa97ed623 Merge branch 'MDL-28135_MOODLE_21_STABLE' of git://github.com/nebgor/moodle into MOODLE_21_STABLE 2011-07-06 11:02:55 +08:00
Petr Skoda 05f4555422 MDL-28147 do not double cache theme css/js 2011-07-06 03:15:03 +02:00
Tim Hunt a5dd15e921 MDL-28160 question preview window uses wrong pagelayout in activity contexts 2011-07-06 03:08:41 +02:00
Petr Skoda 05299908b4 MDL-28161 precreate htmlpurifier dir when resetting caches
Includes sloppy whitespace fix.
2011-07-06 02:55:00 +02:00
Petr Skoda 9a49e6004b MDL-28167 fix missing new
And sloppy whitespace.
2011-07-06 02:09:54 +02:00
Sam Hemelryk a3fd215cb8 MDL-28172 forum: Fixed up overzealous check for portfolio enabled. 2011-07-06 02:02:02 +02:00
Tim Hunt 6ff0bacee1 MDL-28179 make failed event hander error message much more useful. 2011-07-06 01:49:02 +02:00
Andrew Robert Nicols 757ca142ca MDL-28193 Add $external arg to get_driver_instance
Signed-off-by: Andrew Robert Nicols <andrew.nicols@luns.net.uk>
2011-07-06 01:40:35 +02:00
Eloy Lafuente (stronk7) 98e86d8b27 MDL-28196 quiz calls get_in_or_equal (fixing missing $DB) 2011-07-05 22:00:51 +02:00
Tim Hunt 69b88de0df MDL-28196 quiz calls get_in_or_equal (not DB->get_in_or_equal) in two places
Also, another minor error in one method call.
2011-07-05 21:56:37 +02:00
Tim Hunt 17b8d59a0a MDL-27821 backup_exception should not throw away debug info. 2011-07-05 19:43:54 +02:00
Eloy Lafuente (stronk7) d396a03bac Merge branch 'MDL-28185_m21' of git://github.com/stronk7/moodle into MOODLE_21_STABLE 2011-07-05 17:59:57 +02:00
Tim Hunt f404343487 MDL-26618 Moving sticky blocks on other pages does not work in Oracle.
This was due to some missing $DB->sql_empty() in a query affecting the
block_positions table.
2011-07-05 17:47:37 +02:00
Eloy Lafuente (stronk7) f8632149ad MDL-28185 upgrade - fix oracle problem upgrading blocks 2011-07-05 15:38:09 +02:00
David Mudrak a056d4fa9e MDL-28168 Multi-language support for custom_menu reimplemented
This is a reimplementation of the multi-language support for the
custom_menu class. The menu items now accept the forth optional
parameter with the explicit list of languages the item is valid for. If
no languages are listed, the item is valid for any language. The caller
of the custom_menu constructor must provide the user's current language
or null if the multi-language should not be supported (all items are
valid for any language then, regardless the definition).

See the attached unit tests for the examples of usage.
2011-07-05 12:22:26 +02:00
Kordan 3c9cd14006 addition to previous fix for MDL-27989 in MOODLE_21_STABLE 2011-07-05 11:30:50 +02:00
Tim Hunt d5670c612b MDL-25357 Allow maximum number of sections to be set by the admin. Also allow 0 sections at an choice.
Also fix one bad <br/> in another lang string.
2011-07-05 16:59:57 +08:00
David Mudrak 88d9d9fba5 MDL-28168 Improved custom_menu constructor
This improves custom_menu constructor by dropping support for useless
$text parameter and replacing it with the menu definition. This makes
custom_menu instance independent on the place where the menu is defined
($CFG->custommenuitems) and can be unit-tested. Also, multiple instances
of custom_menu can be instantiated now which can be interesting in the
future.
2011-07-05 10:26:01 +02:00
Kordan cc3e8c536c MDL-27989 fix for MOODLE_21_STABLE 2011-07-05 10:21:13 +02:00
Aparup Banerjee a43b8cf330 MDL-28135 general Updated broken and typo docs links 2011-07-05 15:17:23 +08:00
Aparup Banerjee 028fba6878 MDL-28135 general Updated the Copyright notice to point to docs.moodle.org/dev/Releases instead of en/Release 2011-07-05 15:17:15 +08:00
Aparup Banerjee 8f32d623c5 MDL-28135 general Updated doc links related to Release notes to docs.moodle.org/dev/Releases now 2011-07-05 15:17:06 +08:00
Aparup Banerjee 63e8936bb1 MDL-28135 general Updating all hardcoded "docs.moodle.org/en/Development:" type doc links to "docs.moodle.org/dev/" 2011-07-05 15:16:55 +08:00
David Mudrak 5b806d1524 MDL-28168 Revert "MDL-27073 Support multi-language content in custom menu"
This reverts commit 87e0230d0a.
2011-07-05 09:08:49 +02:00
Iñaki Arenaza 7679e8d256 MDL-24666 sync_users.php can throw db exception on sites upgraded from 1.x
From 2.0 on we lowercase all the settings related to LDAP attributes
to cope with differences in LDAP servers when returning attribute
names as array indices (some lowercase them, some leave them as
specified in the query, some normalize them, etc.).

But we only lowercase them when saving the settings page. So on sites
that have been migrated from 1.x, it may happen that we still have
mixed-case attribute names. And this is fatal for the user_attribute
setting, as we might not detect it in the returned array from LDAP and
it will be empty (and the db layer throws and exception).

So we just make sure the attribute name is lowercased (and trimmed,
in case it's got some white space around it).

Signed-off-by: Iñaki Arenaza <iarenaza@mondragon.edu>
2011-07-04 21:46:44 +02:00
Dan Marsden e1a1827b59 SCORM MDL-28110 fix string name 2011-07-03 12:54:41 +12:00
Dan Marsden 9f098ef0ec SCORM MDL-28110 set default for forcejavascript to yes - add string explaining what it does. 2011-07-03 12:54:31 +12:00
Eloy Lafuente (stronk7) d64baeceb2 release 2.1 2011-07-01 23:47:23 +02:00
Eloy Lafuente (stronk7) f4f835b739 fix permissions 2011-07-01 23:39:00 +02:00
Eloy Lafuente (stronk7) c5b0344b62 Merge branch 'MDL-28152-course-grade-category' of git://github.com/mudrd8mz/moodle 2011-07-01 22:33:04 +02:00
Eloy Lafuente (stronk7) 0e2901443c Merge branch 'MDL-28103' of git://github.com/timhunt/moodle 2011-07-01 22:17:16 +02:00
Tim Hunt aa5257ce7e MDL-28103 one more problem. 2011-07-01 21:17:06 +01:00
David Mudrak 41f21f92cf MDL-28152 Improved detection of the course grade_category on course restore 2011-07-01 22:12:30 +02:00
Tim Hunt 1645ad22d8 MDL-28103 code to deal with missing question_attempts was buggy. 2011-07-01 21:07:49 +01:00
Tim Hunt e7933796a8 MDL-28103 make the upgrade more robust in the presence of old garbage data in the DB. 2011-07-01 20:54:42 +01:00
Eloy Lafuente (stronk7) 715a5bb732 MDL-27829 blocks - lang string fixes. Credit goes to Helen! 2011-07-01 20:38:06 +02:00
Eloy Lafuente (stronk7) 3e16a2ca66 MDL-27829 blocks - clean dupe comments 2011-07-01 20:38:06 +02:00
Eloy Lafuente (stronk7) ddaa914789 MDL-27829 block creation - ensure correct pagetypepattern in mod/ pages 2011-07-01 20:38:06 +02:00
Eloy Lafuente (stronk7) e5a863e55c MDL-27829 course report - fix name of "Course completion report". Credit goes to Helen! 2011-07-01 20:38:06 +02:00
Tim Hunt dfcbecd487 MDL-28103 when handling questions that have been deleted from the question bank, find the right updater class. 2011-07-01 17:13:47 +01:00
Tim Hunt 4a6ac0ceb1 MDL-28103 fix silly error in quiz_upgrade_very_old_question_sessions. 2011-07-01 17:13:45 +01:00
Eloy Lafuente (stronk7) ec48e283b0 Merge branch 'MDL-27960' of git://github.com/nebgor/moodle 2011-07-01 16:13:51 +02:00
Eloy Lafuente (stronk7) 264d81eee3 Merge branch 's11_MDL-27976_undefined_variable_master' of github.com:dongsheng/moodle 2011-07-01 13:43:05 +02:00
Aparup Banerjee b74b347aba MDL-27960 assignment subplugin moodle1 conversion handling and handlers added 2011-07-01 19:11:29 +08:00
Eloy Lafuente (stronk7) 67fcc9989a Merge branch 'MDL-27829_block_pagetype_master' of git://github.com/andyjdavis/moodle 2011-07-01 11:51:26 +02:00
Andrew Davis (andyjdavis) 2f9bdadfd2 MDL-27829 blocks: made the ability to add a block to all site administration pages work 2011-07-01 17:11:10 +08:00
Eloy Lafuente (stronk7) 3bd43d3d5c Merge branch 'MDL-27418' of git://github.com/timhunt/moodle 2011-07-01 11:05:17 +02:00
Sam Hemelryk 90e9d09b5f Merge branch 'MDL-28138' of git://github.com/timhunt/moodle 2011-07-01 17:01:57 +08:00
Tim Hunt e42646b167 MDL-27418 fix minor regression found by Rajesh. 2011-07-01 09:44:31 +01:00
Eloy Lafuente (stronk7) 49752ecb59 Merge branch 'MDL-28022-glossary-export' of git://github.com/mudrd8mz/moodle 2011-07-01 10:40:15 +02:00
Tim Hunt 01533e9cce MDL-28138 fix calculated-specific format float function
Sadly this has to be done in question.php and in two places in the ugprade code :-(.
2011-07-01 09:14:56 +01:00
Andrew Davis (andyjdavis) 346a32a75b MDL-27829 blocks: added some more page types to some _page_type_list() functions 2011-07-01 15:43:26 +08:00
Sam Hemelryk 4c9e9e09ea Merge branch 's11_MDL-28121_split_master' of github.com:dongsheng/moodle 2011-07-01 15:07:21 +08:00
Andrew Davis (andyjdavis) 1fe0ecabf1 MDL-27829 blocks: altered some strings so page type strings match the names of the course reports in the UI 2011-07-01 10:01:38 +08:00
David Mudrak c9b3efd20c MDL-28022 glossary entry without attachment can be exported to Mahara as Leap2A content
The problem here was that the manifest file was written into the
'./files/leap2a.xml' instead of the './leap2a.xml' in the ZIP package.
I believe there was a bug in the write_new_file() using the 3rd parameter
incorrectly. A detailed review of all other modules using the same
method must happen soon.
2011-07-01 02:34:00 +02:00
Eloy Lafuente (stronk7) a80d6ab536 Merge branch 'MDL-28128' of git://github.com/timhunt/moodle 2011-07-01 01:49:59 +02:00
Eloy Lafuente (stronk7) 70debd7391 Merge branch 'MDL-28129' of git://github.com/timhunt/moodle 2011-07-01 01:41:38 +02:00
Eloy Lafuente (stronk7) 4411596c27 Merge branch 'MDL-28132' of git://github.com/timhunt/moodle 2011-07-01 01:37:43 +02:00
Eloy Lafuente (stronk7) d72129829f Merge branch 'MDL-28133' of git://github.com/timhunt/moodle 2011-07-01 01:10:06 +02:00
Eloy Lafuente (stronk7) f9d2eb4f20 Merge branch 'MDL-28099_wip' of git://github.com/jamiepratt/moodle 2011-07-01 00:54:35 +02:00
Eloy Lafuente (stronk7) 7ace3a2199 Merge branch 'MDL-28006-convert-gradebook' of git://github.com/mudrd8mz/moodle 2011-07-01 00:09:50 +02:00
Eloy Lafuente (stronk7) b1273d09dd Merge branch 'MDL-28116-master' of git://github.com/sammarshallou/moodle 2011-06-30 23:56:53 +02:00
David Mudrak d46badb176 MDL-28006 restore - improved handling of gradebook 1.9 backups
On contrary from a backup created in 2.0, the file gradebook.xml in the
converted MBZ can contain the course grade_item without the
corresponding grade_category record which is something restore_stepslib
did not expect. This patch fixes two places:

1) the gradebook restore does not use mapped itemid but calls
grade_category::fetch_course_category() to get the actual category to
link the course_item with

2) after_execute makes sure that the mapping actually exists before
trying to move the activities from the default root category
2011-06-30 22:40:54 +02:00
Tim Hunt baf706b503 MDL-28132 truncate very long category names before using them in random question names. 2011-06-30 19:35:35 +01:00
Jamie Pratt 1e257a3a54 NOBUG if we are going to reuse the functions used within the evalmath code then
the calling api should not be weird with reversed parameters etc.
2011-06-30 17:50:05 +01:00
Jamie Pratt 9085134ed7 MDL-27659 "have evalmath accept numbers expressed with scientific
notation"
2011-06-30 17:49:49 +01:00
Jamie Pratt 4733133533 NOBUG fixed some coding style deviations in unit test code. Mostly
white space changes and added scope declarations to unit test
functions.
2011-06-30 17:49:31 +01:00
jamiepratt e2beee5880 NOBUG move pattern for func and var names into a static var and make a function to test a string to see if it is a valid func or var name. 2011-06-30 17:49:01 +01:00
sam marshall c02b60bccc MDL-28116 Fix issue restoring old backups with duplicate completion rows 2011-06-30 17:33:12 +01:00
Jamie Pratt e5060e2209 MDL-28129 two issues with loading and saving questions
1. Missing order by could randomise the order of the hints.

2. the extraanswerfields big had some SQL errros.
2011-06-30 17:21:37 +01:00
Eloy Lafuente (stronk7) 0bd8f4c665 Merge branch 'MDL-28115' of git://github.com/rwijaya/moodle 2011-06-30 17:09:42 +02:00
Tim Hunt ceb4d2ed0b MDL-28128 finish the fix for MDL-28035.
There was one place where I had only fixed the backup code to work-around bad data from Moodle 2.0. I needed to make the equivalent change in the upgrade code.

The bad data is that the seq_number fields can be wrong (not unique). Se already have data ordered by (seq_number, id) and the array keys of the array we are building are not used for anything, so this fix deals with the problem.
2011-06-30 16:00:15 +01:00
Eloy Lafuente (stronk7) 91dc377b74 Merge branch 'MDL-27829_block_pagetype_master' of git://github.com/andyjdavis/moodle 2011-06-30 16:39:45 +02:00
Eloy Lafuente (stronk7) db0fe3b295 Merge branch 'MDL-28061' of git://github.com/rwijaya/moodle 2011-06-30 16:22:20 +02:00
Tim Hunt 69384c1939 MDL-28127 incorrect lang string placeholder in question engine upgrade. 2011-06-30 15:20:42 +01:00
David Mudrak 3343677e0a MDL-28006 Fixed grades subpath handling
Registering the grades subpath even if we do not process the grades yet.
This is to prevent from incorrect considering the wrapper as an empty tag.
2011-06-30 15:17:03 +02:00
Rossiani Wijaya 0c8d3939bc MDL-28061 mediaplugins filter: add aac audio node to filetypes.mm, fixed string mistype within the admin setting page (acc -> aac) and add mediaplugin_html5audio css class to align the player/link like the rest. 2011-06-30 19:29:07 +08:00
Rossiani Wijaya 54fd7cd9ee MDL-28115 lesson module: fixed undefined variable for multiple answer, disabled numberical input text during review and fixed bug for essay answer during review process. 2011-06-30 18:43:25 +08:00
Dongsheng Cai 1e539f647d MDL-27976, Fixed undefined variable 2011-06-30 17:46:44 +08:00
Andrew Davis (andyjdavis) d097ad564d MDL-27829 blocks: added a warning to the block settings page that displays when the block was using a block type we dont let users select anymore 2011-06-30 17:44:50 +08:00
Dongsheng Cai 8819c47b64 MDL-28121, fixed deprecated split() function 2011-06-30 17:34:36 +08:00
Andrew Davis (andyjdavis) 096928c79e MDL-27829 blocks: improved backwards compatibility for blocks set to display on page types we dont allow the user to select anymore 2011-06-30 16:42:28 +08:00
Jamie Pratt 5b5206e1cb MDL-28099 Fixed regression as outlined in tracker. 2011-06-30 14:34:10 +07:00
Andrew Davis (andyjdavis) 800688bd1e MDL-27829 blocks: added code to make the page type restrictions for blocks on admin setting pages make sense 2011-06-30 15:32:34 +08:00
Sam Hemelryk 54ae8ed032 Merge branch 'MDL-24684_master' of git://github.com/stronk7/moodle 2011-06-30 10:49:29 +08:00
Eloy Lafuente (stronk7) b7a45fa782 MDL-24684 backup - basic protection against time/memory limits 2011-06-30 03:37:30 +02:00
Eloy Lafuente (stronk7) 4ea6ce7e39 Merge branch 'MDL-28044' of git://github.com/nebgor/moodle 2011-06-30 01:59:49 +02:00
Eloy Lafuente (stronk7) 9829fa8261 Merge branch 'MDL-15587-head' of git://github.com/grabs/moodle 2011-06-30 01:54:19 +02:00
Eloy Lafuente (stronk7) 06a7f952cb Merge branch 'MDL-19864_database_excel_export' of git://github.com/andyjdavis/moodle 2011-06-30 01:16:57 +02:00
Eloy Lafuente (stronk7) 0bde123fa8 Merge branch 'wip-MDL-27431-master' of git://github.com/Beedell/moodle 2011-06-30 01:13:34 +02:00
Eloy Lafuente (stronk7) ca2b89d5df Merge branch 'master_MDL-28016' of git://github.com/danmarsden/moodle 2011-06-30 01:10:51 +02:00
Eloy Lafuente (stronk7) a092e9bc42 Merge branch 'wip-MDL-25249-master-r1' of git://github.com/samhemelryk/moodle 2011-06-30 00:55:20 +02:00
Eloy Lafuente (stronk7) 586fecb80b Merge branch 'MDL-27149' of git://github.com/timhunt/moodle 2011-06-30 00:20:43 +02:00
Eloy Lafuente (stronk7) 497ad94adb Merge branch 'MDL-28055' of git://github.com/timhunt/moodle 2011-06-30 00:02:51 +02:00
Eloy Lafuente (stronk7) f684dce013 Merge branch 'MDL-28108' of git://github.com/timhunt/moodle 2011-06-30 00:00:12 +02:00
Eloy Lafuente (stronk7) 6e344148c1 MDL-27418 qtype numerical - minor whitespace fix 2011-06-29 23:57:08 +02:00
Eloy Lafuente (stronk7) 88933f08cb Merge branch 'MDL-27418' of git://github.com/timhunt/moodle 2011-06-29 23:51:33 +02:00
Eloy Lafuente (stronk7) 0f744d2ca4 Merge branch 'MDL-27430' of git://github.com/timhunt/moodle 2011-06-29 23:33:01 +02:00
Eloy Lafuente (stronk7) be13d37a02 Merge branch 'MDL-28074' of git://github.com/timhunt/moodle 2011-06-29 23:09:13 +02:00
Tim Hunt 05a5c2f9a2 MDL-28108 oops! I got the cut-off percentage wrong. 2011-06-29 22:02:59 +01:00
Tim Hunt 56a4ae4673 MDL-28074 question preview should set context/course/cm properly.
1. We need this so that, for example, when previewing a question from
the quiz editing page, the preview uses the filter settings, theme and
language set for that quiz and course.
2011-06-29 21:25:56 +01:00
Eloy Lafuente (stronk7) f4eeee5bd5 Merge branch 'pagelib_single' of git://github.com/marxjohnson/moodle 2011-06-29 21:00:06 +02:00
Eloy Lafuente (stronk7) 76feb947b6 Merge branch 'MDL-28028' of git://github.com/timhunt/moodle 2011-06-29 20:58:27 +02:00
Eloy Lafuente (stronk7) f0548d18bf Merge branch 'MDL-28035' of git://github.com/timhunt/moodle 2011-06-29 20:47:16 +02:00
Eloy Lafuente (stronk7) fae9cd077c Merge branch 'MDL-28037' of git://github.com/timhunt/moodle 2011-06-29 20:44:49 +02:00
Eloy Lafuente (stronk7) 282a0a713e Merge branch 'MDL-28087_friendly_jabber' of git://github.com/andyjdavis/moodle 2011-06-29 20:11:17 +02:00
Eloy Lafuente (stronk7) 1333c05ebe Merge branch 's11_MDL-27936_send_message_master' of github.com:dongsheng/moodle
Conflicts:
	lib/db/services.php
	version.php
2011-06-29 20:00:49 +02:00
Eloy Lafuente (stronk7) 3a4c390c53 Merge branch 's11_MDL-27976_get_users_by_courseid_master' of github.com:dongsheng/moodle 2011-06-29 19:50:39 +02:00
Eloy Lafuente (stronk7) 9cdff2b2a5 Merge branch 'wip-MDL-27988-master' of git://github.com/samhemelryk/moodle 2011-06-29 18:12:18 +02:00
Tim Hunt 3a6eb8efdf MDL-27418 qtype numerical correct grading of 'right value, wrong unit' reponses.
Probably easiest to explain by example: If the right answer is 1.23 m with alternate
unit 100 cm = 1m then the completely right answers are 1.23 m and 123 cm.
Right answer, wrong unit responses include 1.23, 1.23 frogs and 1.23 cm.
123 m is not considered to have the correct numerical value.

We may well re-consider the way this works in a future version of Moodle.

Unit grading was not implemented before Moodle 2.0. In Moodle 2.0, the unit grading
was more permissive than here, for example 123 m would have been graded correctly in
2.0. However, I'm not sure I follow the rationale for that.
2011-06-29 15:41:56 +01:00
Eloy Lafuente (stronk7) ae5b0cde4d Merge branch 'MDL-27955_HEAD' of git://github.com/rwijaya/moodle 2011-06-29 15:42:26 +02:00
Eloy Lafuente (stronk7) 0822174adc Merge branch 'MDL-27812_front_page_blocks' of git://github.com/andyjdavis/moodle 2011-06-29 15:29:14 +02:00
Eloy Lafuente (stronk7) b28c4c22f3 Merge branch 'wip-mdl-27964-master' of git://github.com/rajeshtaneja/moodle 2011-06-29 15:07:07 +02:00
Eloy Lafuente (stronk7) c5401e743d Merge branch 'MDL-28072_coursereport_undefined_function' of git://github.com/andyjdavis/moodle 2011-06-29 15:01:50 +02:00
Jamie Pratt b1eca34453 MDL-28099 fixes issue with filepicker and element names with index not passing
value for draftitemid.
2011-06-29 18:39:15 +07:00
Rossiani Wijaya abd5c24e28 MDL-27955 lesson module: fixed error for reviewing lesson and update string to continue or finish reviewing 2011-06-29 18:18:52 +08:00
Sam Hemelryk f86e19b1ee Merge branch 'MDL-27829_block_pagetype_master' of git://github.com/andyjdavis/moodle 2011-06-29 17:04:13 +08:00
Dan Marsden 444ff001a1 SCORM MDL-28016 - fix redirect call to use proper moodle_url 2011-06-29 20:31:19 +12:00
Dongsheng Cai 014792901d MDL-27976 webservice moodle_user_get_users_by_courseid webservice 2011-06-29 15:41:31 +08:00
Sam Hemelryk 7bbf41661b MDL-27988 backup grade: Calculated grade items calculation references now corrected and idnumber restore improved 2011-06-29 15:26:48 +08:00
Sam Hemelryk 364f43b0b4 MDL-25249 calendar: Fixed regression in set.php 2011-06-29 15:08:27 +08:00
David Mudrak af66e7fea3 MDL-28006 code cleanup - there is nothing to do for grade_settings 2011-06-29 09:08:25 +02:00
David Mudrak ddefec8d14 MDL-28006 moodle1 converter supports outcomes 2011-06-29 08:55:43 +02:00
Sam Hemelryk 797cedc7cf MDL-25249 Tidied up calendar variable passing and removed session abuse 2011-06-29 14:50:38 +08:00
Tim Hunt c5aaf41739 MDL-27418 add unit tests for the problem case identified by Pierre. 2011-06-29 06:55:45 +01:00
Rajesh Taneja 912ea4bc84 MDL-27964 lesson - Quick fix added for importing question files in lesson module 2011-06-29 13:52:52 +08:00
Andrew Davis (andyjdavis) 26a0af08e0 MDL-28072 coursereport: added a missing require_once() 2011-06-29 12:59:44 +08:00
Andrew Davis (andyjdavis) 5daa7279d4 MDL-28087 assignment: made the jabber notification of assignment grading better 2011-06-29 11:29:11 +08:00
Dongsheng Cai 4de00da791 MDL-27936, send_message webservice should respect contact settings, improve readability, rename it to moodle_message_send_instantmessages 2011-06-29 11:26:16 +08:00
Aparup Banerjee eea3341dfc MDL-28044 general - updated print_error() link to point to new versioned docs link. 2011-06-29 10:55:02 +08:00
Andrew Davis (andyjdavis) 3d942d5054 MDL-19864 database: temporarily commenting out the excel export option as its broken and cannot be quickly fixed. Use Open Office option for the time being. 2011-06-29 10:35:31 +08:00
David Mudrak d98100e407 MDL-28006 moodle1 converter supports grade letters 2011-06-29 01:06:59 +02:00
David Mudrak cfab209904 MDL-28006 moodle1 converter supports grade categories and non-module grade items 2011-06-29 01:06:10 +02:00
David Mudrak 544e0d5972 MDL-28006 moodle1 converter supports activity module grade items 2011-06-29 00:11:05 +02:00
David Mudrak acc9a7b9e2 MDL-28006 moodle1 converter provides new get_stash_or_default() method 2011-06-29 00:11:05 +02:00
David Mudrak 477f1d2b78 MDLQA-1147 Fixed a typo in the exception class name
Thanks Steve Turley for spotting and reporting this during the QA.
2011-06-29 00:10:59 +02:00
Eloy Lafuente (stronk7) cddb428722 Merge branch 'MDL-27990_assignment_notifications' of git://github.com/andyjdavis/moodle 2011-06-28 22:14:54 +02:00
Tim Hunt f040d4b046 MDL-27418 add validation to stop students intering a thosands sep.
If it might be confused by a decimal point from another locale.
2011-06-28 18:26:34 +01:00
Tim Hunt 1a1353a5ce MDL-27418 qtype numeric go back to the very permissive number parsing from Moodle 2.0.
I hope my unit tests are good enough to make this change safe.
2011-06-28 18:13:44 +01:00
Tim Hunt eef75d4b31 MDL-27418 qtype_numeric correct output of numbers in locales that use , for decimal point. 2011-06-28 17:37:09 +01:00
Tim Hunt 9048940701 MDL-27418 correct validation of numerical answers in qtype numeric.
This mostly affects locales that use , as decimal point.
2011-06-28 17:36:24 +01:00
Tim Hunt 3aa159706c MDL-27418 fix typo
I really should refactor to eliminate this duplicated code.
2011-06-28 17:34:24 +01:00
Tim Hunt 8566369f63 MDL-27430 qtype numerical put multiple-choice units back to radio buttons
It seems that people want to be able to use <sup> and <sub> here, which
makes sense, so we need to keep radio buttons for questions upgraded
from 2.0. The dropdown menu, however, is also nice, so keep that option
too for new questions.
2011-06-28 16:33:01 +01:00
John Beedell cab2c7ea6e MDL-27431 adjust help icon alt to be same as title for accessibility 2011-06-28 15:54:14 +01:00
Andrew Davis (andyjdavis) d863aecb92 MDL-27812 blocks: fixed the ability to add a block and have it display on all pages 2011-06-28 18:50:03 +08:00
Tim Hunt 8818c826ea MDL-28055 quiz_upgrade_very_old_question_sessions bit does not work because of missing includes. 2011-06-28 10:57:50 +01:00
Sam Hemelryk 5163ac94b0 Merge branch 'MDL-28023_assignment_jabber' of git://github.com/andyjdavis/moodle 2011-06-28 17:04:55 +08:00
Rajesh Taneja b89bf55f84 MDL-27964 lesson - Old file picker is replaced with new filepicker, currently all imported questions will be saved in /temp/questionimport/ where questionbank files are saved. 2011-06-28 12:10:56 +08:00
Andrew Davis (andyjdavis) 83dfca3fa3 MDL-27990 assignment: removed a redundant retrieval of a user preference 2011-06-28 11:08:59 +08:00
Sam Hemelryk e2542e1faf Merge branch 's11_MDL-27866_pix_url_master' of git://github.com/dongsheng/moodle 2011-06-28 10:16:57 +08:00
Rossiani Wijaya 57a4bd032b MDL-27955 lesson module: fixed error for reviewing lesson and update string to continue or finish reviewing 2011-06-28 10:14:55 +08:00
Sam Hemelryk 256383c07d Merge branch 'MDL-28014_head' of git://github.com/grabs/moodle 2011-06-28 10:12:39 +08:00
Tim Hunt 50de6ad083 MDL-28037 Make restoring quiz_attempts more robust.
Don't assume that 0 is unique (even temporarily).
2011-06-27 18:27:12 +01:00
Tim Hunt f997f0fc46 MDL-28028 prevent orphaned question_attempt data from breaking upgrade. 2011-06-27 17:27:40 +01:00
Tim Hunt 0366ef262a MDL-28035 problems with upgrade/restore of ataptive quizzes from 2.0
There were two main problems:

1. The unit tests for upgrading adaptive quiz attempts had slighly the
wrong $expectedqa, and so matching that the upgrade was doing the wrong
thing in certain situations. The main issue was that it was setting
-_try = 1 on the first step, which broke the penalty calculation when
the quiz was regraded. There were also some other subtleties with
incrementing -_try that were not right before.

2. It was possible in 2.0 and earlier for two question_states to get the
same seq_number, and restoring 2.0 backups was rashly assuming that that
was unique.
2011-06-27 17:10:02 +01:00
Eloy Lafuente (stronk7) 7fde489dae on-demand release 2.1beta 2011-06-27 17:32:54 +02:00
Eloy Lafuente (stronk7) 34ff02bff0 Merge branch 'install_master' of git://github.com/amosbot/moodle 2011-06-27 17:31:42 +02:00
Eloy Lafuente (stronk7) 32038aaccc Merge branch 'MDL-28033' of git://github.com/timhunt/moodle 2011-06-27 17:12:40 +02:00
Eloy Lafuente (stronk7) 3bdc10150c Merge branch 'MDL-28049' of git://github.com/timhunt/moodle 2011-06-27 15:56:03 +02:00
sam marshall a854bca3cf MDL-28021 Completion system can create inconsistent database rows
This change includes:

(1) update deletes older versions of inconsistent rows
(2) update drops one index and replaces it with a new unique index
(3) fixed to ensure that when it decides whether to insert or update
    it uses current database state and not cached info
(4) unit tests updated to test #3

Conflicts:

	lib/db/upgrade.php
	version.php
2011-06-27 15:25:13 +02:00
Tim Hunt 19f7bb5b7e MDL-28049 conditional include so xml question format can work for both lesson and 3rd party qtypes.
This is a regression caused by MDL-27956.
2011-06-27 13:59:57 +01:00
Tim Hunt 2779cc7d89 MDL-28033 Fatal error upgrading form 1.9 to 2.1 due to missing include. 2011-06-27 13:43:16 +01:00
Eloy Lafuente (stronk7) 8e0733f4d8 Merge branch 'unsigned_fixes' of git://github.com/stronk7/moodle 2011-06-27 14:06:13 +02:00
Eloy Lafuente (stronk7) f4fd96a848 MDL-28032 database - finally question->defaultmark goes signed. Changing prev commit. 2011-06-27 11:37:34 +02:00
Eloy Lafuente (stronk7) f83776f2ec Merge branch 'wip-MDL-27809-master-r7' of git://github.com/samhemelryk/moodle 2011-06-27 10:11:02 +02:00
Sam Hemelryk 29e2d0a820 Merge branch 'MDL-26199' of git://github.com/timhunt/moodle 2011-06-27 16:03:48 +08:00
Sam Hemelryk 35d4d85dc4 Merge branch 'unsigned_fixes' of git://github.com/stronk7/moodle 2011-06-27 15:45:41 +08:00
Sam Hemelryk a3f8860d6c Merge branch 'quizreport_langstrings' of git://github.com/stronk7/moodle 2011-06-27 15:30:11 +08:00
Sam Hemelryk da17baf76a Merge branch 'backup_bump' of git://github.com/stronk7/moodle 2011-06-27 15:28:49 +08:00
Mark Johnson c78f8443e6 MDL-28025 pagelib improve error message when $PAGE->context isn't set 2011-06-27 08:22:43 +01:00
Sam Hemelryk 3992a46e89 MDL-27809 navigation: Fixed up a couple of minor issues after peer-review 2011-06-27 15:11:28 +08:00
Andrew Davis (andyjdavis) b38e2e28a1 MDL-27829 blocks: altered the algorithm used to find plugin page types 2011-06-27 12:27:41 +08:00
Andrew Davis (andyjdavis) 0f1751b01b MDL-28023_assignment_jabber assignment: added context url to improve the jabber notifications 2011-06-27 11:08:21 +08:00
AMOS bot c31745211a Automatically generated installer lang files 2011-06-27 00:55:10 +00:00
Eloy Lafuente (stronk7) a8e6c39e9f Merge branch 'MDL-28024' of git://github.com/timhunt/moodle 2011-06-27 01:44:40 +02:00
Eloy Lafuente (stronk7) f1231efec4 MDL-28038 backup - bump 2011-06-26 19:15:06 +02:00
Eloy Lafuente (stronk7) 8b95f430b5 MDL-28036 quiz - add some missing (reports) lang strings 2011-06-26 18:22:23 +02:00
Eloy Lafuente (stronk7) a0628c68de MDL-28032 database - fix some sign inconsistencies 2011-06-26 13:12:42 +02:00
Eloy Lafuente (stronk7) d466e23c38 MDL-28032 database - retrofit signed info for decimal/float (improves diffs detection) 2011-06-26 12:54:16 +02:00
Andrew Davis (andyjdavis) fa09b5a9a3 MDL-28023 assignment: assignment wasnt supplying all the data necessary to produce a meaningful jabber notification 2011-06-25 13:12:48 +08:00
Andreas Grabs da457a944d MDL-15587 - Course Participation report for a feedback activity 2011-06-24 23:13:00 +02:00
Tim Hunt 5cc532e8e9 MDL-28024 adaptive qbehaviour. Displayed penalties not rounded correctly. 2011-06-24 14:26:49 +01:00
Rossiani Wijaya 560f549593 MDL-27922 lesson mod: fixed string for activity link 2011-06-24 16:50:31 +08:00
Sam Hemelryk e26507b361 MDL-27809 navigation: Reworked the caching within navigation and improved the ordering of events in order to reduce the use of session without serious impact on serverload 2011-06-24 16:42:41 +08:00
Andrew Davis (andyjdavis) be34802d23 MDL-27990 assignment: Some small modifications to the assignment notification code
AMOS BEGIN
 MOV [enableemailnotification,mod_assignment],[enablenotification,mod_assignment]
 MOV [enableemailnotification_help,mod_assignment],[enablenotification_help,mod_assignment]
AMOS END
2011-06-24 14:19:40 +08:00
Eloy Lafuente (stronk7) 50d32a2baf on-demand release 2.1beta 2011-06-24 00:48:51 +02:00
Eloy Lafuente (stronk7) 2e27e2d64a Merge branch 'MDL-28012' of git://github.com/timhunt/moodle 2011-06-24 00:31:53 +02:00
Eloy Lafuente (stronk7) 89ad7c078e Merge branch 'MDL-27827_head' of git://github.com/grabs/moodle 2011-06-24 00:21:58 +02:00
Eloy Lafuente (stronk7) 4965f02087 Merge branch 's11_MDL-27999_wiki_preview_master' of github.com:dongsheng/moodle 2011-06-24 00:13:48 +02:00
Eloy Lafuente (stronk7) 06c8cef4c2 Merge branch 'wip-MDL-27962-master' of git://github.com/samhemelryk/moodle 2011-06-24 00:02:20 +02:00
Eloy Lafuente (stronk7) fcb36b65ec Merge branch 'wip-MDL-27958-master' of git://github.com/samhemelryk/moodle 2011-06-23 23:57:55 +02:00
Eloy Lafuente (stronk7) adecb9de9a Merge branch 'wip-MDL-27940-master' of git://github.com/samhemelryk/moodle 2011-06-23 23:54:32 +02:00
Andreas Grabs b7030c3def MDL-28014 - unpropitious use of bcmod() 2011-06-23 21:22:38 +02:00
Andreas Grabs 65ee5d7dad MDL-27827 - Missing messageprovider:message language string 2011-06-23 20:33:12 +02:00
Tim Hunt c5da295b85 MDL-28012 Quiz editing status line can display screwy dates. 2011-06-23 18:53:07 +01:00
Eloy Lafuente (stronk7) 9867711fd7 on-demand release 2.1beta 2011-06-23 18:24:57 +02:00
stabijoh 5fc36f559f MDL-27998 canvas theme - fix font sizes 2011-06-23 17:28:29 +02:00
Jamie Pratt f271a66776 NOBUG added floor, ceil and round to evalmath.class.php and added
tests.
2011-06-23 12:33:40 +01:00
Jamie Pratt 950dc9145b NOBUG implemented seeding of 'random' functions. 2011-06-23 12:33:38 +01:00
jamiepratt 6efaec1e15 NOBUG move function definition is_valid_var_or_func_name above 'HERE
BE INTERNAL METHODS' line.
2011-06-23 12:33:36 +01:00
jamiepratt 06329db453 NOBUG updated readme file with changes made to code 2011-06-23 12:33:34 +01:00
jamiepratt 13264f3505 MDL-27162 "localize strings in mathslib" needed to add mathslib file
to list of core language files in moodlelib.
2011-06-23 12:33:32 +01:00
jamiepratt 94a67b3992 Make changes in functionality, originally implemented by Petr to make
maths class suitable for use in grade book, dependent on boolean
switches in constructor which default to having the changes 'on'.
2011-06-23 12:33:30 +01:00
jamiepratt c4f7eecfc5 MDL-27139 "mathslib used by gradebook incorrectly evaluating
expressions" simple fix needed to prevent problem with operator
following expression with no operands such as pi().
2011-06-23 12:33:28 +01:00
Eloy Lafuente (stronk7) b4bb80b7d6 weekly release 2.1beta 2011-06-23 11:25:48 +02:00
Eloy Lafuente (stronk7) 916cbea67f Merge branch 'install_master' of git://github.com/amosbot/moodle 2011-06-23 11:24:03 +02:00
Eloy Lafuente (stronk7) 5088275347 Merge branch 's10_MDL-27341_flickr_plugin_master' of git://github.com/dongsheng/moodle 2011-06-23 11:16:00 +02:00
Dongsheng Cai 14b2d8d865 MDL-26677 flickr repo - fix undefined index usewatermarks 2011-06-23 17:13:46 +08:00
Eloy Lafuente (stronk7) 618d2ecf48 Merge branch 'MDL-27920_grade_export' of git://github.com/andyjdavis/moodle 2011-06-23 10:15:07 +02:00
Andrew Davis (andyjdavis) 8de7c8a7ff MDL-27920 gradebook: fixes following integration review 2011-06-23 15:58:44 +08:00
Tim Hunt f19ed874ee MDL-26199 further changes needed to make the question bank navigation behave. 2011-06-23 07:18:49 +01:00
Tim Hunt 8356e6cff8 MDL-26199 keep track of the current category when switching pages in the question bank. 2011-06-23 07:18:49 +01:00
Dongsheng Cai 7cacd29fac MDL-27999 mod wiki, fixed broken image in preview 2011-06-23 13:52:14 +08:00
Sam Hemelryk 8b05c5e2bd MDL-27962 Fixed typo in tablelib preventing columns from being collapsed 2011-06-23 13:33:28 +08:00
Sam Hemelryk 7313ac6c7a MDL-27958 Added missing set_context call which would cause errors for all contexts below course 2011-06-23 12:16:09 +08:00
Sam Hemelryk d38a4849b7 MDL-27940 navigaiton: Fixed an ordering problem so that when a parent was set for a node the nodes activity was accounted for 2011-06-23 11:29:26 +08:00
Sam Hemelryk 58c724a613 Merge branch 'MDL-27169_master' of git://github.com/stronk7/moodle 2011-06-23 10:43:57 +08:00
AMOS bot 99774e998c Automatically generated installer lang files 2011-06-23 00:55:12 +00:00
Eloy Lafuente (stronk7) 5973f0b53d MDL-26677 repositories - clean one debugging var_dump() 2011-06-23 02:04:30 +02:00
Eloy Lafuente (stronk7) 39354db055 Merge branch 's10_MDL-27341_flickr_plugin_master' of git://github.com/dongsheng/moodle 2011-06-23 02:02:24 +02:00
Eloy Lafuente (stronk7) 4c15bde8f1 Merge branch 'MDL-27948' of git://github.com/timhunt/moodle 2011-06-23 01:14:19 +02:00
Eloy Lafuente (stronk7) daf4cf26f7 Merge branch 'MDL-27929' of git://github.com/timhunt/moodle 2011-06-23 00:51:16 +02:00
Eloy Lafuente (stronk7) e345969ae2 Merge branch 'MDL-27937' of git://github.com/timhunt/moodle 2011-06-23 00:46:29 +02:00
Eloy Lafuente (stronk7) e059fa90b1 Merge branch 'MDL-27973' of git://github.com/timhunt/moodle 2011-06-23 00:43:11 +02:00
Eloy Lafuente (stronk7) 4d05c972ea Merge branch 'MDL-27974' of git://github.com/timhunt/moodle 2011-06-23 00:37:13 +02:00
Eloy Lafuente (stronk7) a2854474ce Merge branch 'MDL-27979' of git://github.com/timhunt/moodle 2011-06-23 00:34:03 +02:00
Eloy Lafuente (stronk7) 63c4530f0f Merge branch 'MDL-27991' of git://github.com/timhunt/moodle 2011-06-23 00:29:28 +02:00
Eloy Lafuente (stronk7) aad4048bd7 Merge branch 'MDL-27196-hardcodedstrings' of git://github.com/mudrd8mz/moodle 2011-06-23 00:25:27 +02:00
Tim Hunt da72991636 MDL-27979 Should be an edit link for each question when previewing or reviewing a quiz. 2011-06-22 21:07:40 +01:00
Tim Hunt eb624cf7e0 MDL-27937 Calculated tolerance field should have the label Tolerance +- 2011-06-22 19:49:39 +01:00
Tim Hunt 87af936b22 MDL-27991 End test... should be Finish attempt... to be more Moodly 2011-06-22 19:24:45 +01:00
Tim Hunt 35d5f1c28d MDL-27948 The question engine should use recordsets to load attempt data
This should be good for performance (memory usage). It also avoids having to construct a meaningless, unique, first column, which is a pain on MyQSL.
2011-06-22 18:53:15 +01:00
Tim Hunt 2fa66bdf71 MDL-27929 question_attempts.minfraction should be signed! 2011-06-22 18:48:05 +01:00
Eloy Lafuente (stronk7) a8f3f4ccf1 MDL-27169 filepicker - add explicit enctype to the js upload form. Credit goes to J Ross Nicoll, thanks! 2011-06-22 19:30:57 +02:00
David Mudrak e4394d00c4 MDL-27196 workshop - hardcoded strings in the random allocator 2011-06-22 17:58:48 +02:00
David Mudrak 069de416af MDL-27196 workshop - hardcoded string in the number of errors strategy form 2011-06-22 17:40:40 +02:00
Tim Hunt ef01d2c8f5 MDL-27973 hopefully fix QTI2 question export.
Well, at least fix the most obvious notices.
2011-06-22 15:56:05 +01:00
Tim Hunt 3c78184552 MDL-27974 problems with gift question import/export.
Double-escapeing in match export and not initialising combined feedback on import.

Also remove a lot of redundant breaks.
2011-06-22 15:26:34 +01:00
Eloy Lafuente (stronk7) d2a5e2278c Merge branch 'wip-mdl-26281-master' of git://github.com/rajeshtaneja/moodle 2011-06-22 14:27:46 +02:00
Eloy Lafuente (stronk7) f96147c291 Merge branch 'wip-mdl-27956-master' of git://github.com/rajeshtaneja/moodle 2011-06-22 14:21:01 +02:00
Eloy Lafuente (stronk7) fc57ca6a54 Merge branch 'MDL-27969-randomallocator' of git://github.com/mudrd8mz/moodle 2011-06-22 14:15:52 +02:00
Eloy Lafuente (stronk7) 01acbc42e1 Merge branch 'MDL-27073_multilang-custommenu' of git://github.com/mudrd8mz/moodle 2011-06-22 14:11:18 +02:00
David Mudrak 9153248d22 MDL-27969 workshop - prevent PHP notices in the random allocator
When generating the output of the allocation results, the names of
reviewers and authors are obtained based on the current state of assigned
roles and the 'musthavesubmission' setting. Therefore, when we want to
display information about a re-used allocation, the name of the author
or the name of the author may not be available.

In case of reviewers, we first try to reload the list including the
users without own submission. If it does not help, we just display the
id of the user instead of the name. In case of authors, we just display
the id the user. I can't see much point of eventual fetching the user
record from the database just to populate the list that almost no-one
reads anyway.
2011-06-22 12:03:56 +02:00
Sam Hemelryk a0977339b0 Merge branch 'MDL-27952' of git://github.com/stronk7/moodle 2011-06-22 17:20:49 +08:00
Rajesh Taneja 92c93432bd MDL-26281 Lesson - Fixed short answer with apostrophe and other html formats 2011-06-22 17:17:55 +08:00
Sam Hemelryk 115910dccd Merge branch 'MDL-27966_master' of git://github.com/stronk7/moodle 2011-06-22 17:15:10 +08:00
Sam Hemelryk df839f28dc Merge branch 'MDL-25811_master' of git://github.com/stronk7/moodle 2011-06-22 17:06:12 +08:00
Andrew Davis (andyjdavis) b822fc8511 MDL-27829 blocks: added some brains to generate_page_type_patterns() so that it can handle special cases like course reports 2011-06-22 17:01:21 +08:00
Rajesh Taneja ba15c346b1 MDL-27956 Lesson - Fixed strings and readquestions scope 2011-06-22 09:11:32 +08:00
Eloy Lafuente (stronk7) 1e3ddd6bc4 Merge branch 's10_MDL-27341_flickr_json_error_master' of git://github.com/dongsheng/moodle 2011-06-22 03:06:14 +02:00
Eloy Lafuente (stronk7) 92f753eb99 Merge branch 'MDL-27860' of git://github.com/timhunt/moodle 2011-06-22 02:57:50 +02:00
Eloy Lafuente (stronk7) 96dc283b53 Merge branch 'MDL-27914' of git://github.com/nebgor/moodle 2011-06-22 02:52:50 +02:00
Eloy Lafuente (stronk7) 8032990022 Merge branch 'MDL-26948' of git://github.com/timhunt/moodle 2011-06-22 02:35:25 +02:00
Eloy Lafuente (stronk7) 6057bf5b05 MDL-27810 portfolio: Added ->portfolioenabled check to one more place 2011-06-22 02:10:11 +02:00
Eloy Lafuente (stronk7) 555cc4b4a0 Merge branch 'wip-MDL-27810-master' of git://github.com/samhemelryk/moodle 2011-06-22 01:56:30 +02:00
Eloy Lafuente (stronk7) 2fc832a1ae Merge branch 'MDL-27906_HEAD' of git://github.com/rwijaya/moodle 2011-06-22 01:52:57 +02:00
Eloy Lafuente (stronk7) f5a6bf5e35 Merge branch 'master_MDL-27959' of git://github.com/danmarsden/moodle 2011-06-22 01:35:15 +02:00
David Mudrak c1ab2b109e MDL-27970 workshop submission can't be edited after the deadline even if late submissions are allowed 2011-06-22 00:34:45 +02:00
Eloy Lafuente (stronk7) ea1e73843b MDL-27966 timezones - updated to 2011g version + fix minor notice 2011-06-21 16:23:24 +02:00
Aparup Banerjee 38adb0def9 MDL-27914 data fixed image gallery template CSS selector for #singleimage to include img tag and set height to auto 2011-06-21 14:22:00 +08:00
Dan Marsden b447192e8f Choice MDL-27959 invalid strings 2011-06-21 16:39:46 +12:00
Andrew Davis (andyjdavis) 7ce5df8620 MDL-27920 gradebook: export was always excluding course totals and xml export was failing 2011-06-21 11:13:34 +08:00
Sam Hemelryk 6708a1f525 MDL-27810 portfolio: Added ->portfolioenabled checks before creating portfolio buttons to avoid initialising portfolio requirements 2011-06-21 10:35:53 +08:00
Eloy Lafuente (stronk7) beae4a6684 MDL-25811 automated backups - clean running status after 90 mins of inactivity 2011-06-21 02:41:12 +02:00
Eloy Lafuente (stronk7) 1b8655ab0f MDL-27952 quiz - fix navigation for users having 0 nodes in module nav 2011-06-21 02:38:04 +02:00
Eloy Lafuente (stronk7) 3552484b91 on-demand release 2.1beta 2011-06-21 02:31:40 +02:00
Eloy Lafuente (stronk7) b3c1b5f1a6 Merge branch 'install_master' of git://github.com/amosbot/moodle 2011-06-21 02:30:37 +02:00
Eloy Lafuente (stronk7) 9192e9fe45 Merge branch 'master_MDL-27366' of git://github.com/danmarsden/moodle 2011-06-20 23:38:47 +02:00
Eloy Lafuente (stronk7) 5e811bb000 Merge branch 's11_MDL-27941_partipants_page_master' of github.com:dongsheng/moodle 2011-06-20 18:44:08 +02:00
Eloy Lafuente (stronk7) ca31e935e6 Merge branch 'wip-MDL-27899-master' of git://github.com/samhemelryk/moodle 2011-06-20 18:38:42 +02:00
Eloy Lafuente (stronk7) aed0dbe70a Merge branch 'MDL-27942' of git://github.com/timhunt/moodle 2011-06-20 17:05:54 +02:00
Eloy Lafuente (stronk7) 8edbfba909 Merge branch 'MDL-24594_wip' of git://github.com/timhunt/moodle 2011-06-20 12:48:55 +02:00
Eloy Lafuente (stronk7) 6f9297b48b Merge branch 'MDL-27915' of git://github.com/timhunt/moodle 2011-06-20 12:39:19 +02:00
Eloy Lafuente (stronk7) ee37607188 Merge branch 'MDL-27925' of git://github.com/timhunt/moodle 2011-06-20 11:56:34 +02:00
Sam Hemelryk 0ebb526f85 MDL-27899 Moved initialise_fullme during setup to after sam has been initialised 2011-06-20 17:40:03 +08:00
Tim Hunt e28bbd8919 MDL-27942 Use picture not displayed during quiz attempts. 2011-06-20 10:26:01 +01:00
Dongsheng Cai 3712f7aaca MDL-27941 Fixed a bug introduced by block setting improvement, the
context should be course context
2011-06-20 16:30:16 +08:00
Sam Hemelryk 8a322fc19b Merge branch 'MDL-24255' of git://github.com/timhunt/moodle 2011-06-20 15:51:59 +08:00
Rossiani Wijaya 18d63ffb67 MDL-27906 calendar event: fixed retrieving coursemodule by replacing get_coursemodule_from_id() to get_coursemodule_from_instance() 2011-06-20 14:32:47 +08:00
Sam Hemelryk fe70d8814b Merge branch 's11_MDL-27880_get_course_participants_ws' of git://github.com/dongsheng/moodle 2011-06-20 14:31:23 +08:00
Sam Hemelryk 8e307054d3 Merge branch 'MDL-27907' of git://github.com/timhunt/moodle 2011-06-20 14:10:41 +08:00
Dongsheng Cai 4be8a7d55c MDL-27866, set page context for $OUTPUT->pix_url 2011-06-20 13:52:03 +08:00
Dongsheng Cai ea4e96c248 MDL-27880
1. moodle_user_get_course_participants_by_id web service to get user details in course context
2. Fixed the proformance issues of get_users_by_id web service
2011-06-20 13:46:47 +08:00
Sam Hemelryk 70e35c4d1d Merge branch 'MDL-27916' of git://github.com/timhunt/moodle 2011-06-20 13:45:12 +08:00
Sam Hemelryk 1533a25e51 Merge branch 'MDL-27927' of git://github.com/timhunt/moodle 2011-06-20 13:15:37 +08:00
Sam Hemelryk 8ffaf7b4dd Merge branch 'MDL-27928' of git://github.com/timhunt/moodle 2011-06-20 13:06:10 +08:00
Sam Hemelryk 3fc7c06b99 Merge branch 'quiz_feedback_for_grade' of git://github.com/stronk7/moodle 2011-06-20 13:02:02 +08:00
AMOS bot e0dd2857ea Automatically generated installer lang files 2011-06-20 00:55:10 +00:00
Eloy Lafuente (stronk7) 1b327dec8a MDL-27932 quiz - fix some calls to quiz_feedback_for_grade() 2011-06-20 01:46:29 +02:00
Eloy Lafuente (stronk7) f2113d66cd Merge branch 'MDL-27910' of git://github.com/timhunt/moodle 2011-06-20 01:26:03 +02:00
Eloy Lafuente (stronk7) b9412668c4 Merge branch 'MDL-27902' of git://github.com/timhunt/moodle 2011-06-20 01:21:18 +02:00
Tim Hunt 460797abbd MDL-27928 missing string in the question bank UI.
AMOS BEGIN
 MOV [categorymove,mod_quiz],[categorymove,question]
AMOS END
2011-06-19 10:44:44 +01:00
Tim Hunt 635971c750 MDL-27927 qtype_multianswer remove hard-coded string. 2011-06-19 10:34:39 +01:00
Tim Hunt 928e7d2a33 MDL-27927 Fix invalid HTML in the multianswer editing form. 2011-06-19 10:27:24 +01:00
AMOS bot e97eaa907e Automatically generated installer lang files 2011-06-19 00:55:21 +00:00
Tim Hunt 2d6829727d MDL-24255 Use the proper editor element for manual grading comments.
It would be nice if someone imporoved the API for using the HTML editor outside formslib.
2011-06-18 21:15:40 +01:00
Tim Hunt 3461dbad9e MDL-27860 count quiz attempts properly when checking if a new attempt is allowed. 2011-06-18 18:23:49 +01:00
Tim Hunt bc502c166c MDL-27908 quiz settings menu, make the order more logical. 2011-06-18 16:27:21 +01:00
Tim Hunt 01d203566f MDL-27925 Give meaningful keys to all the standard navigation mod settings nodes. 2011-06-18 16:24:31 +01:00
Tim Hunt 0c2f94e081 MDL-27925 A way to get the all the keys of the child nodes of a node. 2011-06-18 16:23:53 +01:00
Tim Hunt 88ef9d0b2b MDL-27916 Question state was described wrongly in adaptive and immediate feedback behaviours. 2011-06-18 13:29:39 +01:00
Tim Hunt fb17f129a3 MDL-27907 calculated* editing form inheritance mix up.
Lead to duplicate fields appearing on the editing forms.
2011-06-18 12:53:32 +01:00
Tim Hunt e50a5813b7 MDL-27910 quiz stupid typo in a DB query 2011-06-18 11:37:08 +01:00
AMOS bot 9ba87c6c8c Automatically generated installer lang files 2011-06-18 00:55:15 +00:00
Tim Hunt d610cb8980 MDL-27915 improved debuginfo for some file exceptions. 2011-06-17 19:46:09 +01:00
Tim Hunt f263d4935f MDL-27913 Stray whitespace in backup. 2011-06-17 19:37:20 +01:00
Tim Hunt 35c9b65274 MDL-24594 Fix some issues with the display of HTML choices.
The most significant issue is that the HTML editor alwasy wraps <p> tags round the input, but that is not appropriate for the choices. It is especially not appropriate because we want to display the choices in a <lable> for accessibility and usability reasons. In valid HTML label can only contain inline elemnts. Therefore, I introduced a make_html_inline method, with a minimal implementation. (It could be improved in future.)

Long term, I think the best option would be a new form field type, editorinline, or something like that. That would be a smaller version of TinyMCE that only lets you enter inline elements.
2011-06-17 18:41:15 +01:00
ppichet 2a6c5c52ee MDL-24594 qtype_multichoice should allow images in the choices.
This change was massively re-worked by Tim Hunt to update Pierre Pichet's original patch for Moodle 2.0 to work in Moodle 2.1.
2011-06-17 18:41:13 +01:00
Eloy Lafuente (stronk7) 7a7d34febb on-demand release 2.1beta 2011-06-17 19:25:39 +02:00
Eloy Lafuente (stronk7) fd8f24dba8 Merge branch 'MDL-27869' of git://github.com/timhunt/moodle 2011-06-17 18:32:00 +02:00
Tim Hunt 83f93ec41f MDL-26948 quiz navigation fake block should have an id to allow styling. 2011-06-17 17:26:28 +01:00
Eloy Lafuente (stronk7) faf1f957ac Merge branch 'MDL-27490' of git://github.com/timhunt/moodle 2011-06-17 17:24:51 +02:00
Tim Hunt fde4560dae MDL-27490 Implement a manage question behaviours admin page
While doing this, I found various bugs in the manages question types admin page, and so fixed them, and updated the code
there to use $OUTPUT and html_writer.

AMOS BEGIN
 MOV [cannotdeletemissingqtype,admin],[cannotdeletemissingqtype,question]
 MOV [cannotdeleteqtypeinuse,admin],[cannotdeleteqtypeinuse,question]
 MOV [cannotdeleteqtypeneeded,admin],[cannotdeleteqtypeneeded,question]
 MOV [deleteqtypeareyousure,admin],[deleteqtypeareyousure,question]
 MOV [deleteqtypeareyousuremessage,admin],[deleteqtypeareyousuremessage,question]
 MOV [deletingqtype,admin],[deletingqtype,question]
 MOV [numquestions,admin],[numquestions,question]
 MOV [numquestionsandhidden,admin],[numquestionsandhidden,question]
 MOV [qtypedeletefiles,admin],[qtypedeletefiles,question]
 MOV [uninstallqtype,admin],[uninstallqtype,question]
AMOS END
2011-06-17 16:21:32 +01:00
David Mudrak 87e0230d0a MDL-27073 Support multi-language content in custom menu 2011-06-17 17:08:33 +02:00
Eloy Lafuente (stronk7) 3c158ff95e Merge branch 'MDL-27868' of git://github.com/timhunt/moodle 2011-06-17 16:45:30 +02:00
Tim Hunt 5cf69d7ff5 MDL-27868 Hints (and some other things) lost when re-editing calculated* questions. 2011-06-17 15:42:03 +01:00
Tim Hunt 3a5da40b4c MDL-27902 quiz reviewquestion.php page needs to be converted to use the renderer. 2011-06-17 15:27:41 +01:00
Eloy Lafuente (stronk7) ff30976ad5 Merge branch 'MDL-27887' of git://github.com/timhunt/moodle 2011-06-17 16:16:58 +02:00
Eloy Lafuente (stronk7) 5df6b3c87e Merge branch 'MDL-27877' of git://github.com/timhunt/moodle 2011-06-17 15:32:10 +02:00
Eloy Lafuente (stronk7) 5017d4dc7d Merge branch 'MDL-27878' of git://github.com/timhunt/moodle 2011-06-17 15:30:16 +02:00
Tim Hunt 5f79a9bcb6 MDL-27898 fix question/engine/simpletest/testdatalib.php unit tests.
Now that MDL-27897 is fixed.
2011-06-17 11:28:05 +01:00
Tim Hunt cfcf9bb4e3 MDL-27897 moodle_database::get_in_or_equal must not use a static variable.
It makes unit testing impossible. Switch to a field.
2011-06-17 11:26:51 +01:00
Eloy Lafuente (stronk7) d037c6bc3c on-demand release 2.1beta 2011-06-17 11:18:33 +02:00
Aparup Banerjee cec76330fe MDL-27500 editor - updated plugin version references, thirdparty version reference and tinymce upgrade readme 2011-06-17 16:52:57 +08:00
Dongsheng Cai da78b10ce0 MDL-27341, fixed flickr public plugin should check
search text, tag and nsid before searching photos
2011-06-17 12:14:05 +08:00
Dongsheng Cai d55846d8bd MDL-26677 fixed undefined index usewatermarks in flickr plugin 2011-06-17 12:11:54 +08:00
Eloy Lafuente (stronk7) 16fd82d8ef MDL-27500 HTML Editor - bump version 2011-06-17 01:11:34 +02:00
Eloy Lafuente (stronk7) 33865a7812 MDL-27500 HTML Editor - deleted 3.3.9.2 build 2011-06-17 01:10:15 +02:00
Eloy Lafuente (stronk7) 7035b80ad9 Merge branch 'MDL-27500' of git://github.com/nebgor/moodle 2011-06-17 01:06:07 +02:00
Dan Marsden 1a70a6470c SCORM MDL-27366 - show content if attemptstatus is set even if closed. 2011-06-17 09:08:26 +12:00
Dan Marsden 6257f66455 SCORM MDL-27366 add attempt status to My home 2011-06-17 09:08:26 +12:00
Tim Hunt a8c8641802 MDL-27887 In developer debug, use uncompressed TinyMCE code. 2011-06-16 18:59:41 +01:00
Tim Hunt 03b2b8fa29 MDL-27869 Fix images in numerical and calculated questions.
Also fix an embarassing TODO in multianswer quetsions.
2011-06-16 18:56:37 +01:00
Tim Hunt 6481b28fe5 MDL-27878 make progress bars fail explicity if you forget to call create(). 2011-06-16 18:55:29 +01:00
Tim Hunt 08c458d10f MDL-27877 question engine progress bars not working. 2011-06-16 18:55:10 +01:00
Eloy Lafuente (stronk7) c3f85e22d9 weekly release 2.1beta 2011-06-16 19:08:04 +02:00
Eloy Lafuente (stronk7) 28e23ea737 fix permissions 2011-06-16 19:06:07 +02:00
Eloy Lafuente (stronk7) 868ca72707 Merge branch 'install_master' of git://github.com/amosbot/moodle 2011-06-16 19:03:16 +02:00
Andrew Davis (andyjdavis) 0f63f2714f MDL-26105 blocks: made the block settings help icons work 2011-06-16 12:05:53 +02:00
Andrew Davis (andyjdavis) 84a1bea972 MDL-26105 blocks: readded the my moodle page's page type list generator function 2011-06-16 12:05:48 +02:00
Aparup Banerjee da4772a276 Backup - mod lesson conversion: apply jumpto fix only to matching question types. 2011-06-16 10:52:55 +02:00
Aparup Banerjee 914bfea245 MDL-27819 Backup - fixed extra answers/jump data.
- fixed unset causing missing property
	- fixed answers empty notice, allowed for page with no answers.
2011-06-16 10:52:45 +02:00
Eloy Lafuente (stronk7) 5c5f71172a Merge branch 'wip-MDL-24355-master' of git://github.com/andyjdavis/moodle 2011-06-16 10:38:49 +02:00
Eloy Lafuente (stronk7) a31a6ce32d MDL-27171 take rid of 2 wrong strings moved to forum/lang/xx/forum.php 2011-06-16 00:43:58 +02:00
Eloy Lafuente (stronk7) 192026f6e5 Merge branch 'MDL-27797_fixup' of git://github.com/timhunt/moodle 2011-06-15 18:18:26 +02:00
Tim Hunt 1f1c60c6a7 MDL-27797 supplimental. Fix two minor issues found by Sam H during testing. 2011-06-15 15:38:46 +01:00
Eloy Lafuente (stronk7) 3420de9f97 Merge branch 'MDL-27865' of git://github.com/timhunt/moodle 2011-06-15 14:37:23 +02:00
Tim Hunt e6d7658337 MDL-27865 fix editing of calculated* questions. 2011-06-15 12:20:26 +01:00
Aparup Banerjee 6df63e4f9b MDL-27819 Backup - mod_lesson conversion: optimized page buffering from all pages to 3 pages 2011-06-15 12:09:33 +02:00
Aparup Banerjee 496a576aa9 MDL-27819 backup - added nextpageid and prevpageid elements to lesson moodle1 backup conversion to 2.x 2011-06-15 12:09:24 +02:00
Eloy Lafuente (stronk7) 84a5f2d26e Merge branch 'MDL-27820' of git://github.com/stronk7/moodle 2011-06-15 11:59:52 +02:00
Eloy Lafuente (stronk7) 07c4c12b80 Merge branch 'wip-mdl-27863-master' of git://github.com/rajeshtaneja/moodle 2011-06-15 11:25:09 +02:00
Eloy Lafuente (stronk7) 5edac71d16 MDL-27820 backup - fix backup of ratings 2011-06-15 11:01:41 +02:00
Rajesh Taneja 42ab2b70a4 MDL-27863 moodlelib - fixed testcase faliure in MDL-27577 2011-06-15 16:34:52 +08:00
Andrew Davis (andyjdavis) 638cf6157a MDL-24355 tag: minor clean up of tags changes 2011-06-15 14:25:38 +08:00
Sam Hemelryk e2a64d832e MDL-24355 Fixed up deletion of tag correlations when deleting tags 2011-06-15 08:36:17 +08:00
Sam Hemelryk 2650c54734 MDL-24355 Added code to delete any tag correlations that wern't just identified 2011-06-15 08:36:17 +08:00
Eloy Lafuente (stronk7) 17073fb53a Merge branch 'MDL-27852' of git://github.com/timhunt/moodle 2011-06-15 02:04:50 +02:00
Eloy Lafuente (stronk7) 31c7fbafa6 Merge branch 'MDL-27797' of git://github.com/timhunt/moodle 2011-06-15 02:00:23 +02:00
Eloy Lafuente (stronk7) a16e137f21 Merge branch 'MDL-27639_wip' of git://github.com/timhunt/moodle 2011-06-15 01:30:59 +02:00
Eloy Lafuente (stronk7) 5800c0fde1 Merge branch 'master_MDL-27858' of git://github.com/danmarsden/moodle 2011-06-15 01:18:05 +02:00
Eloy Lafuente (stronk7) d55ecccb9b Merge branch 'MDL-27848_for_master' of git://github.com/kordan/moodle 2011-06-15 00:48:56 +02:00
Dan Marsden bdea587be2 SCORM MDL-27858 - fix typo 2011-06-15 10:31:52 +12:00
Eloy Lafuente (stronk7) ee1235e7af Merge branch 'backup-convert' of git://github.com/mudrd8mz/moodle 2011-06-14 22:38:27 +02:00
Tim Hunt 8a5d05eea8 MDL-27854 qformat_xml fix import/export of essay questions to include the new options. 2011-06-14 17:36:11 +01:00
AMOS bot 037b313215 Automatically generated installer lang files 2011-06-14 18:25:54 +02:00
Tim Hunt 79e25fb456 MDL-27797 fix all the codechecker issues in format_xml
After this change, I can still export my test course with one of each question type, and all the unit tests still pass.
2011-06-14 17:06:55 +01:00
Tim Hunt 67b8b40cfa MDL-27797 fix bugs with Moodle XML export. 2011-06-14 16:34:14 +01:00
Eloy Lafuente (stronk7) 4a9e5fbe91 MDL-27759 fix whitespace 2011-06-14 17:01:20 +02:00
Tim Hunt ba5a29f528 MDL-27852 local_qeupgradehelper convertquiz.php script was broken. 2011-06-14 15:59:25 +01:00
Eloy Lafuente (stronk7) 90333a972e Merge branch 'wip-mdl-27759-integration-master' of git://github.com/rajeshtaneja/moodle 2011-06-14 16:57:36 +02:00
Eloy Lafuente (stronk7) b0635db229 Merge branch 'MDL-25461-lang-install-link' of git://github.com/mudrd8mz/moodle 2011-06-14 16:43:07 +02:00
Tim Hunt 98a3898efc MDL-27849 fix qtype_multianswer attempt data restore (2.1 -> 2.1).
Also, refactor calculatedmulti restore to avoid duplication.
2011-06-14 15:17:50 +01:00
David Mudrak 07ec4f650b MDL-27708 Fixed the version of language packs to install in 2.1 2011-06-14 13:55:27 +02:00
David Mudrak da84821329 MDL-25461 Installing a language pack is recorded in moodle.org statistics
This patch fixes the URLs for fetching data from download.moodle.org so
that the requests are recorded in statistics collector download.php.
Note that we do not record fetching languages.md5 as we want to
record the real .zip downloads only.
2011-06-14 13:49:09 +02:00
Tim Hunt 5b64e32645 MDL-27585 implement restore of qtype_calculatedmulti 2.1 attempt data 2011-06-14 12:11:23 +01:00
Tim Hunt 18ab06bac5 MDL-27639 restore of attempt data from 2.0 - first attempt.
This is now at the stage where it mostly appears to work, at lease on
one backup file.
2011-06-14 12:11:19 +01:00
Tim Hunt b8882c1334 MDL-27639 add two missing language strings.
Without these strings, important information for debugging is not displayed.
2011-06-14 12:10:27 +01:00
Tim Hunt cee74600fa MDL-27839 supply default qtype_essay_options if they are not present in the XML. 2011-06-14 12:10:25 +01:00
Tim Hunt d7ad6ac4ef MDL-27787 Fix restore of matching quetsions backed up from Moodle 2.0. 2011-06-14 12:10:23 +01:00
Eloy Lafuente (stronk7) 7a5f3a3cc7 MDL-27844 files support added to get_users_by_id() 2011-06-14 12:41:51 +02:00
Eloy Lafuente (stronk7) 260dd13064 Merge branch 'wip-MDL-27825-master' of git://github.com/samhemelryk/moodle 2011-06-14 12:32:47 +02:00
Eloy Lafuente (stronk7) e298ec5162 Merge branch 'MDL-27525' of git://github.com/rwijaya/moodle 2011-06-14 12:11:54 +02:00
Kordan db3b8953ce MDL-27835_for_master fix 2011-06-14 11:04:39 +02:00
Sam Hemelryk e625feaf0b MDL-27825 Improved check of themedesignermode to prevent errors if it isn't set 2011-06-14 15:48:10 +08:00
Eloy Lafuente (stronk7) 9b9d7a6039 MDL-27552 whitespace fixes 2011-06-14 08:55:06 +02:00
Rajesh Taneja b4e29077d3 MDL-27759 Fixed conflicts for integration 2011-06-14 10:45:03 +08:00
Rajesh Taneja ccc77f9152 MDL-27759 user webservice - added new PARAM for timezone PARAM_TIMEZONE, to validate timezone input in webservice while deling with user information 2011-06-14 10:15:00 +08:00
Sam Hemelryk 0e36d0cdf5 Merge branch 'MDL-27834' of git://github.com/kordan/moodle 2011-06-14 09:52:39 +08:00
Sam Hemelryk f74415b926 Merge branch 'MDL-27286_master' of git://github.com/stronk7/moodle 2011-06-14 09:47:52 +08:00
Sam Hemelryk 650142bb9b Merge branch 's11_MDL-27497_upload_master' of github.com:dongsheng/moodle 2011-06-14 09:43:24 +08:00
Sam Hemelryk d8f85b6e8b Merged branch 's11_MDL-27552_token_master' of git@github.com:dongsheng/moodle.git with changes 2011-06-14 09:32:44 +08:00
Eloy Lafuente (stronk7) 25b4558c40 MDL-27822 rename new methods 2011-06-14 00:33:16 +02:00
Tim Hunt be7b29eff6 MDL-27822 old module version should be available in restore_activity_structure_step::define_structure() 2011-06-14 00:30:30 +02:00
Eloy Lafuente (stronk7) a0be4a1fcb Merge branch 'MDL-27065-workshop-categories' of git://github.com/mudrd8mz/moodle 2011-06-13 19:52:49 +02:00
Eloy Lafuente (stronk7) ad08c5632e MDL-27286 recent files repo - fix for oracle and cleanup 2011-06-13 18:52:39 +02:00
Kordan b2d606a4e3 MDL-27834 fix 2011-06-13 14:49:26 +02:00
Eloy Lafuente (stronk7) 269c173e81 whitespace fixes 2011-06-13 12:21:48 +02:00
Dongsheng Cai 13ea96c40b MDL-27552 get webservice token by providing username and password 2011-06-13 17:41:56 +08:00
David Mudrak 85fbe3fdcf MDL-27811 Fixed incorrect qtype_essay conversion 2011-06-13 11:11:31 +02:00
Sam Hemelryk 46d3b9be73 Merged branch 's7_MDL-26105_block_settings_master' git://github.com/andyjdavis/moodle.git with changes 2011-06-13 16:54:52 +08:00
Eloy Lafuente (stronk7) 379f39eb9f Merge branch 'MDL-27789-qe2plugins' of git://github.com/mudrd8mz/moodle 2011-06-13 10:12:03 +02:00
Dongsheng Cai 42b2809ff3 MDL-27497, using webservice token to upload files 2011-06-13 16:06:18 +08:00
Aparup Banerjee 486e889262 MDL-27446 Backup - added answers 'jumpto' conversion to moodle1 converter for
lesson
2011-06-13 10:02:28 +02:00
Sam Hemelryk 12aafa8769 Merge branch 'master_MDL-272522' of git://github.com/danmarsden/moodle 2011-06-13 15:49:24 +08:00
Sam Hemelryk f44c912bd0 Merge branch 'MDL-26147-workshop-ignore-deadlines' of git://github.com/mudrd8mz/moodle 2011-06-13 15:32:44 +08:00
Sam Hemelryk 0723dcab40 Merged branch 'MDL-26960' of git://git.luns.net.uk/moodle with changes 2011-06-13 15:06:19 +08:00
Sam Hemelryk aa8ec18b52 Merge branch 'master_MDL-27404' of git://github.com/danmarsden/moodle 2011-06-13 14:53:37 +08:00
Sam Hemelryk 16c2d2c1b4 Merge branch 'MDL-26774-wip' of git://github.com/mouneyrac/moodle 2011-06-13 14:11:58 +08:00
Sam Hemelryk fcc871181f Merge branch 'MDL-27399' of git://github.com/mouneyrac/moodle 2011-06-13 14:04:28 +08:00
Sam Hemelryk a7b7c2d3db Merge branch 'MDL-20538' of git://github.com/timhunt/moodle 2011-06-13 11:22:51 +08:00
Sam Hemelryk 355871acd5 Merge branch 'MDL-27757-HEAD' of git://github.com/srynot4sale/moodle 2011-06-13 11:17:59 +08:00
Sam Hemelryk 89b2cdb28a Merge branch 'MDL-27783' of git://github.com/mouneyrac/moodle 2011-06-13 11:13:29 +08:00
Sam Hemelryk 178ac9033b Merged branch 'MDL-27781' of git://github.com/mouneyrac/moodle.git with changes 2011-06-13 10:54:24 +08:00
Rossiani Wijaya 6ff768a67f MDL-27525 mod_wiki: Fixed typing error for the variable and assign the value contextid to use mod context id 2011-06-13 10:54:07 +08:00
Sam Hemelryk 85ee4e350c Merge branch 'MDL-27792-plugin-subsystem' of git://github.com/mudrd8mz/moodle 2011-06-13 10:39:32 +08:00
Sam Hemelryk 954adfc923 Merged branch 'MDL-27801' of git://github.com/kordan/moodle.git with changes 2011-06-13 10:33:39 +08:00
Dan Marsden d1e3b5c2d3 MDL-27404 SCORM fix for IE 6 - thanks to Howard Miller 2011-06-13 11:32:26 +12:00
Dan Marsden 2875714e4a MDL-27522 SCORM tidy up commit 2011-06-13 11:00:43 +12:00
Ankit Kumar Agarwal b4baa7faa3 MDL-27522 SCORM - seperate user report from main report page to allow better re-use in preparation for MDL-27256 2011-06-13 10:21:40 +12:00
David Mudrak 9ddff589df MDL-26147 workshop - added capability to ignore time restrictions 2011-06-10 19:01:27 +02:00
David Mudrak a74cadfa77 MDL-27065 workshop grades categories can be defined in mod_form
Because the Workshop module creates two grade items in the gradebook, we
can't use standard modedit features to set the corresponding category in
the gradebook (it supports single grade item only).

The patch also cleans the mod_form.php so that it does not use the
global $COURSE (just because I do not like this global variable).

And for the record - QuickForms must die.
2011-06-10 16:48:09 +02:00
David Mudrak b7119f4f3f MDL-22414 Exclude unsupported modules from the course contents 2011-06-10 09:01:41 +02:00
Andrew Davis (andyjdavis) 35d725627c MDL-26105 blocks: added use of user friendly block settings to messaging 2011-06-10 13:52:53 +08:00
Marina Glancy 13b3f4d4af MDL-26430 fixed appearance of one html form within another 2011-06-10 12:55:12 +08:00
Aaron Barnes 7075e37e0c MDL-27757 lib/completionlib.php: Load "enablecompletion" property if required 2011-06-10 13:58:41 +12:00
kordan b0f37206c6 fix MDL-27801 2011-06-09 21:47:09 +02:00
Tim Hunt 55190d7e2c MDL-20538 get rid of badly name-spaced constants from lib/questionlib.php.
Unfortunately, they are used all over the import/export code, so I cannot eliminate them completely. However, I was able to move them out of the core library.
2011-06-09 19:27:36 +01:00
David Mudrak a0166f5507 MDL-27792 Fixed missing core subsystem 2011-06-09 16:19:51 +02:00
Dan Poltawski a8134ff68b messaging: MDL-26960 Check correct users permissions
When on message profile page, the incorrect capability was checked
2011-06-09 15:18:43 +01:00
David Mudrak d1c77ac372 MDL-27789 The new question plugins reported as standard ones 2011-06-09 14:29:27 +02:00
David Mudrak b61cf3ff8a MDL-22414 Merge branch 'master' into backup-convert
Conflicts:
	theme/base/style/core.css
2011-06-09 13:04:49 +02:00
David Mudrak fad0f24499 MDL-22414 Removing obj_to_readable helper 2011-06-09 11:38:15 +02:00
Andrew Davis (andyjdavis) fb794ab73c MDL-26105 blocks: fixed some php errors and made a help string better 2011-06-09 17:03:27 +08:00
Jerome Mouneyrac 02ae44cf4e MDL-27783 enabled status of a built-in service should never been updated on upgrade. It is only used during the installation. If a dev really needs to change the status, he can do it in lib/db/upgrade.php 2011-06-09 16:50:14 +08:00
Jerome Mouneyrac f2806b9a65 MDL-27399 Add all the new mobile ws functions to the built-in mobile service 2011-06-09 15:19:58 +08:00
Jerome Mouneyrac 565e477184 MDL-27781 remove Undefined property: stdClass:: during installation with cli script 2011-06-09 15:08:03 +08:00
Sam Hemelryk 32a510de4e MDL-26105 block setting, improvement, replace switch-case with get_core_subsystems + get_plugin_types 2011-06-09 13:51:14 +08:00
Dongsheng Cai b1627a92e5 MDL-26105 Block settings should contains less options, and be more user friendly
AMOS BEGIN
    MOV [page-blog-index, pagetype], [page-blog-index, blog]
    MOV [page-blog-x, pagetype], [page-blog-x, blog]
    MOV [page-tag-x, pagetype], [page-tag-x, tag]
    MOV [page-course-view-weeks, pagetype], [page-course-view-weeks, format_weeks]
    MOV [page-course-view-weeks-x, pagetype], [page-course-view-weeks-x, format_weeks]
    MOV [page-course-view-topics, pagetype], [page-course-view-topics, format_topics]
    MOV [page-course-view-topics-x, pagetype], [page-course-view-topics-x, format_topics]
AMOS END
2011-06-09 13:51:14 +08:00
Eloy Lafuente (stronk7) 6911fa130b weekly release 2.1dev 2011-06-09 03:41:42 +02:00
David Mudrak 4ece48dc36 MDL-22414 Fixed the order of course modules in the restored course
During the restore, the section's sequence field is ignored and the
order of modules is controlled by the order of the <contents> activity
elements. This patch makes sure that the modules are listed in that
section in the right order.

Also, the patch removes the obsolete stash sectionidslist which was
introduced when the method get_stash_itemids() had not existed yet.
2011-06-09 02:41:27 +02:00
Eloy Lafuente (stronk7) c7dbcc9452 Merge branch 'MDL-27770' of git://github.com/timhunt/moodle 2011-06-09 01:41:24 +02:00
Eloy Lafuente (stronk7) d92858291a Merge branch 'wip-MDL-27638-master' of git://github.com/samhemelryk/moodle 2011-06-09 01:20:54 +02:00
Eloy Lafuente (stronk7) 2cb791ebc5 Merge branch 'wip-mdl-27577-master' of git://github.com/rajeshtaneja/moodle 2011-06-09 00:59:11 +02:00
Eloy Lafuente (stronk7) 112c26e9dd Merge branch 'wip-MDL-27676-master' of git://github.com/samhemelryk/moodle 2011-06-09 00:36:00 +02:00
David Mudrak 30d5190a9b MDL-27452 Workshop 1.9 backups conversion support 2011-06-09 00:00:03 +02:00
David Mudrak a5f2b97b7f MDL-22414 Fixed debugging information when a particular exception is thrown 2011-06-08 19:15:40 +02:00
Tim Hunt 810c5b9e5a MDL-27770 unnecessary upgrade step copied into quiz upgrade script. 2011-06-08 17:48:43 +01:00
Sam Hemelryk 82ee5a1f41 MDL-27676 Requests for a users profile pic that doesnt exist now redirect to the requested f1/f2 rather than just f1 2011-06-08 18:05:23 +08:00
Sam Hemelryk 32825ebd3d MDL-27566 Fixed up typo with user prefs 2011-06-08 17:54:25 +08:00
Sam Hemelryk 00a33dcbac Merged branch 'MDL-26777-wip' of git://github.com/mouneyrac/moodle.git 2011-06-08 17:52:59 +08:00
Sam Hemelryk 96e0194c05 Merged branch 'MLD-27551' of git://github.com/mouneyrac/moodle.git with changes 2011-06-08 17:34:17 +08:00
Sam Hemelryk 0b8dea80dc Merge branch 'MDL-27747' of git://github.com/timhunt/moodle 2011-06-08 17:09:05 +08:00
Sam Hemelryk f6bd0b9e39 Merged branch 'MDL-27695' of git://github.com/nebgor/moodle.git with changes 2011-06-08 16:25:57 +08:00
David Mudrak 33560f50fb MDL-22414 Added new inforef manager
This helper class keeps the referenced ids to be dumped into the
inforef.xml files. For now, it uses a in-memory storage structures but
in the future we may refactor it so that it can use some persistent
storage (like converter's stashes).
2011-06-08 10:18:56 +02:00
David Mudrak e29746c25f MDL-22414 Added scales conversion handler 2011-06-08 10:18:44 +02:00
Jerome Mouneyrac b4c74367a3 MDL-26774 fix web service function moodle_user_get_users_by_id. It now matches viewing profile / editing profile. It suppose to work for current user / other user / admin. It is not returning the information of course profile. 2011-06-08 16:07:12 +08:00
Jerome Mouneyrac c1b658832d MDL-27551 add enable mobile feature (enable web services + mobile service - add mobile builtin service - add unique shortname for service) 2011-06-08 15:10:26 +08:00
Sam Hemelryk 287d1c0c2c Merged branch 'MDL-25775_head' of git://github.com/grabs/moodle.git 2011-06-08 13:49:36 +08:00
Aparup Banerjee 3b6711d5ce MDL-27695 Documentation : updated the moodle docs link at the footer of pages to point to new docs url 2011-06-08 13:44:35 +08:00
Sam Hemelryk 131a9071d6 Merged branch 'MDL-27118' of git://github.com/epsd/moodle.git 2011-06-08 13:42:33 +08:00
Sam Hemelryk de133aa87f Merge branch 'MDL-27294' of git://github.com/epsd/moodle 2011-06-08 13:38:35 +08:00
Sam Hemelryk 405f69eb7b Merge branch 'MDL-27704_master' of git://github.com/MaryE/moodle.git 2011-06-08 13:33:42 +08:00
kordan b396e1678b MDL-27588 Fixed up several bugs with the formal_white theme
-> MDL-26934 has been fixed
-> MDL-27474 has been fixed
-> one more option to have blocks column with different background colours
-> one more option to use custom font size
-> version.php, and b/install.php to handle upgrades
-> increased the font size in the table with plugin list shown at upgrade time
-> minor fixes in IE7 when images from remote web sites are shown in the header
-> conformed the dock background colour to the block background colour to avoid unpleasant color combinations
-> conformed a.link, a.visited and a.active colours in tabs
-> conformed a.link, a.visited and a.active colours in the navigation block
-> deleted an awful box border from enrolment page
-> right aligned commands for resources and activities in the course page
-> increased the width of field item title column in mform
-> increased the padding-top to the help popup box messages
-> user menu restyled to fix some minor tweaks in IE7
-> minor repair to tabs to improve its look
-> restyling of the docked item panel header to look like all the other blocks
-> reduced the distance between elements in headermenu to look better even when only headings are shown in the header
-> links wherever and always black
-> the "search courses" field in the navigation bar does not force extra height
-> some unpleasant generalbox border duplicating some other border have been removed
-> some unpleasant margin/padding in notices and mtables has been removed
2011-06-08 13:17:06 +08:00
Sam Hemelryk d1c96f6604 Merged branch 'MDL-27692_master' of git://github.com/MaryE/moodle.git 2011-06-08 13:03:11 +08:00
Sam Hemelryk 38a466084d Merge branch 'MDL-25477' of git://github.com/epsd/moodle 2011-06-08 11:30:28 +08:00
Aparup Banerjee ca7d5f8bbc MDL-27500 HTML Editor - updating tinymce version used by moodle to 3.4.2 2011-06-08 11:19:26 +08:00
Aparup Banerjee abd7557e79 MDL-27500 HTML Editor - added build 3.4.2 of tinymce 2011-06-08 11:16:37 +08:00
Sam Hemelryk 9186cb7e98 Merged branch 'ou-messaging-release' of git://git.luns.net.uk/moodle with conflict resolution for MDL-27171 2011-06-08 11:07:22 +08:00
Sam Hemelryk 7bff5441c8 Merged changes for MDL-25394 2011-06-08 10:58:42 +08:00
Sam Hemelryk 9bf5d894de Merge branch 'MDL-27564-wip' of git://github.com/mouneyrac/moodle with changes for MDL-27564 2011-06-08 10:38:29 +08:00
Sam Hemelryk 0373264c20 Merge branch 'MLD-27565-wip' of 'git://github.com/mouneyrac/moodle.git' with changes and conflict resolution for MDL-27565 2011-06-08 10:11:51 +08:00
Sam Hemelryk 78736e5d64 Merged branch 'MDL-27566-wip' of git://github.com/mouneyrac/moodle.git with changes and conflict resolution for MDL-27566 2011-06-08 10:02:59 +08:00
Sam Hemelryk da1bf0e82a MDL-27721 Fixed up typo in upgrade comments 2011-06-08 09:49:43 +08:00
Tim Hunt e84dacffeb MDL-27747 don't truncate essay responses in the reports. #601 2011-06-07 17:01:11 +01:00
Tim Hunt 47678d60f8 MDL-27747 quiz_statistics fix edit question icons. #737 2011-06-07 16:46:30 +01:00
Tim Hunt 0f1c59c552 MDL-27747 quiz locallib remove unnecessary try/catch. #475
delegated_transaction just does the right thing. Thanks to Justin Wyllie for spotting this.
2011-06-07 16:27:49 +01:00
Tim Hunt 3b049b7626 MDL-27747 question engine stupid typo in DB query broke regrading. #472 2011-06-07 16:22:10 +01:00
Tim Hunt adf7fe2148 MDL-27747 Missing information and errors on the quiz view page. #720 2011-06-07 16:05:17 +01:00
Tim Hunt f57d75bdf8 MDL-27747 quiz review, time taken and overtime were formatted incorrectly #598 2011-06-07 15:33:31 +01:00
Tim Hunt 97cdc1de72 MDL-27747 quiz summary, add a CSS class to the table rows based on question state.
The standard themes do not use this for anything, but it makes it easier for themers to do cool stuff.
Also improve the API for getting the question state class.
2011-06-07 15:11:04 +01:00
Tim Hunt 4464734bb6 MDL-27747 qtype_truefalse, false feedback went missing whenre-editing a question. #465 2011-06-07 14:38:05 +01:00
Tim Hunt c9272e87f9 MDL-27747 quiz End test... link was not working. #387
I don't know why this was ever changed from class to id. That was done in commit a1eb3a4466.
2011-06-07 14:29:11 +01:00
Tim Hunt e198992b20 MDL-27747 Fix a lot of coding style issues in question/format.php 2011-06-07 14:04:24 +01:00
Tim Hunt 92111e8d2c MDL-27747 questions remove all references to the recently deprecated get_grade_options() 2011-06-07 14:00:07 +01:00
Tim Hunt af2f98ee39 MDL-27747 Imporove API for getting the standard fraction choices.
This includes moving the None option to the top, which is slightly better for usability.
2011-06-07 13:53:29 +01:00
Eloy Lafuente (stronk7) 2b64de2008 MDL-27721 ratings - drop interim 'unknown' defaults 2011-06-07 12:58:59 +02:00
Jerome Mouneyrac 0e5fd1299a MDL-27564 most parameter should have been optional - return more common information so no extra web service required - note that it could be good to return role and group for each user in each course (it would make sens and save some web service call) 2011-06-07 18:20:07 +08:00
Jerome Mouneyrac 8d46dabb6e MDL-27565 implement moodle_notes_create_note 2011-06-07 17:28:51 +08:00
Jerome Mouneyrac a623b6b892 MDL-27566-wip implement moodle_message_send_messages function (matching front end logic - TODO: 2 core functions to change to support bulk operations) 2011-06-07 16:40:55 +08:00
Sam Hemelryk c464a23873 Merged branch 's9_MDL-26392_wiki_files_master' from git://github.com/dongsheng/moodle.git with fixes 2011-06-07 16:29:44 +08:00
Sam Hemelryk e0f18a37c9 Merge branch 'MDL-27734-workshop-example-weight' of git://github.com/mudrd8mz/moodle 2011-06-07 16:24:17 +08:00
Sam Hemelryk 656bb6725b Merge branch 'MDL-27733-workshop-deadlines' of git://github.com/mudrd8mz/moodle 2011-06-07 16:23:34 +08:00
Sam Hemelryk ac6668198b Merge branch 'MDL-27732-glossary-introformat' of git://github.com/mudrd8mz/moodle 2011-06-07 16:13:52 +08:00
Sam Hemelryk f5936345cd Merge branch 'admin_whitespace_cleanup_master' of git://github.com/stronk7/moodle 2011-06-07 16:09:55 +08:00
Sam Hemelryk 6e76848427 Merge branch 'todo_wiki_upgrade_master' of git://github.com/stronk7/moodle 2011-06-07 16:01:49 +08:00
Jerome Mouneyrac 0bf486a619 MDL-26777 moodle_webservice_mobile_get_siteinfo TODO: add this service name into the service of MDL-27551 2011-06-07 15:19:53 +08:00
Eloy Lafuente (stronk7) 82b25e8e71 MDL-20636 fix local/qeupgradehelper perms 2011-06-06 23:28:50 +02:00
Tim Hunt d9eb95433f MDL-20636 fix notice on qtypes admin page. (Eloy review comment I2) 2011-06-06 18:26:32 +01:00
Tim Hunt aadad31a6e MDL-27737 numerical qtype upgrade bug 2.0dev -> 2.0. 2011-06-06 18:06:57 +01:00
Tim Hunt 70d248181c MDL-20636 remove QTYPE from some comments. 2011-06-06 17:48:29 +01:00
Tim Hunt 030fba85f1 MDL-20636 qe restor make method protected (Eloy review comment B1). 2011-06-06 17:26:33 +01:00
Tim Hunt 6e56da8347 MDL-20636 Fix quiz_statistics upgrade (Eloy review comment A3). 2011-06-06 17:22:49 +01:00
Eloy Lafuente (stronk7) cc5937f4c0 MDL-20636 changes to report statistics DB layer 2011-06-06 17:16:41 +01:00
Eloy Lafuente (stronk7) 44c280c63e MDL-20636 changes to mod/quiz DB layer 2011-06-06 17:16:35 +01:00
Eloy Lafuente (stronk7) cdda538128 MDL-20636 changes to core & questions DB layer 2011-06-06 17:16:28 +01:00
Eloy Lafuente (stronk7) 5abfa6a930 MDL-20636 changes to quiz and quiz reports upgrade code 2011-06-06 17:16:22 +01:00
Eloy Lafuente (stronk7) 1db15c2718 MDL-20636 changes to core & questions upgrade code
Changes include:

    - fixing versions and requires to current weekly (2011060313)
    - fix essay wrong upgrade step. Review & test!
    - fix numerical missing savepoint.
2011-06-06 17:16:11 +01:00
Andreas Grabs a9e9549911 MDL-25775 - Site policy page blank 2011-06-06 18:15:12 +02:00
Tim Hunt 54771d89d1 Merge remote-tracking branch 'moodle/master' into MDL-20636_master_new_question_engine
Conflicts:
	lib/db/upgrade.php
	mod/quiz/lib.php
2011-06-06 17:14:59 +01:00
Tim Hunt 4c5743343f MDL-20636 make qe upgrade tests independent of html2text details.
Based on Eloy's change, but refactored to be slightly nicer.
2011-06-06 17:05:54 +01:00
Tim Hunt 0370e3ab0d MDL-27736 html2text add unit test for Eloy's new code. 2011-06-06 16:54:13 +01:00
Eloy Lafuente (stronk7) 3709ecb929 MDL-27736 improve a bit html2text to avoid some ugly & unnecessary trailing spaces 2011-06-06 16:42:55 +01:00
Eloy Lafuente (stronk7) 36e91f1de1 MDL-20636 Whitespace fixes 2011-06-06 16:38:46 +01:00
Eloy Lafuente (stronk7) 4561302dec MDL-20636 Prepare stuff for cleaner merging 2011-06-06 16:38:23 +01:00
David Mudrak b34b969103 MDL-27734 Fixed weights of the example submission assessments 2011-06-06 17:37:59 +02:00
David Mudrak ce8157ed91 MDL-27733 workshop: keep the phase deadlines during the 1.9 => 2.0 upgrade 2011-06-06 17:36:32 +02:00
David Mudrak 7e1450977e MDL-27732 Include the introformat field in the glossary module backups 2011-06-06 15:19:41 +02:00
David Mudrak fe50f530fd MDL-27379 Backup conversion logging facilities 2011-06-06 13:56:06 +02:00
David Mudrak 1b85912abb MDL-27729 Glossary module 1.9 backup converts to 2.0 format 2011-06-06 10:11:58 +02:00
Eloy Lafuente (stronk7) b04aa92544 MDL-27724 wiki - update commented upgrade step to avoid future problems 2011-06-05 19:47:38 +02:00
Eloy Lafuente (stronk7) 6e9cd6698e MDL-27723 whitespace cleanup of admin directory 2011-06-05 19:35:42 +02:00
David Mudrak c5c315e2a7 MDL-27718 Migrate files embedded in the activity intro fields
Contains various fixed spotted through the way, too.
2011-06-05 17:37:58 +02:00
David Mudrak fa30779b70 MDL-22414 Fixed the convert_path data handling 2011-06-05 16:17:23 +02:00
David Mudrak 718f781690 MDL-27718 Files embedded into the course summary and section summaries are migrated during the conversion 2011-06-04 23:34:26 +02:00
David Mudrak 02e9095677 MDL-27448 IMS content package module conversion improved
The files embedded into the intro field and the backup of the original
content package are migrated now, too.
2011-06-04 22:12:47 +02:00
David Mudrak 85d91b6a1b MDL-27448 Do not stop conversion because of missing course files 2011-06-04 22:11:03 +02:00
David Mudrak baa44e3d3d MDL-27448 Simplified migration of the files embedded in the resources HTML texts 2011-06-04 21:13:56 +02:00
David Mudrak afb4494bd0 MDL-27448 URL resource module backup conversion improved
The patch also fixes invalid 'course' field in moodle2 backup code.
2011-06-04 21:04:02 +02:00
David Mudrak c39226d9b2 MDL-22414 Added a helper method to migrate all files referenced from a hypertext 2011-06-04 21:03:11 +02:00
David Mudrak 351bf4826c MDL-27448 Improved resource module converter 2011-06-04 20:03:28 +02:00
David Mudrak aa97e0dd52 MDL-22414 File manager allows to set explicit sortorder and accepts filepaths not ending with a slash
We want to set migrated content file in the File module as a main file.
Main files are files with sortorder set to 1. Therefore the file manager
must provide a way to set the sortorder property of the new file record.

The second change allowing filepaths not ending with slash is a helper
as we can easily use dirname() as a value (see the usage in the next
commits). Not providing the dirname() was a bug as the reference to a
file in the HTML text did not respect the migrated file path.
2011-06-04 20:02:03 +02:00
David Mudrak 93dd33b405 MDL-27448 Folder module conversion improved 2011-06-04 18:28:58 +02:00
David Mudrak 9b2ab50d27 MDL-27448 Page module conversion improved 2011-06-04 18:28:35 +02:00
David Mudrak 9e3e8c8004 MDL-27448 Changed the interface of resource module successors to make it clear they are a special case 2011-06-04 16:11:59 +02:00
David Mudrak 48fcecffb6 MDL-27448 Page module conversion fixed and improved
The embedded files are now converted into the proper file area on the
conversion. The previous usage of $CFG->wwwroot/file.php was wrong for two
reasons: (1) the moodle.xml does not (should not) contain these links but
$@FILEPHP@$ placeholder and (2) even if it did, we could not compare to
our wwwroot but to the original wwwroot.

Also fixed the actual list of fields being written into page.xml - the
previous version included legacy fields (like type, reference and
friends).
2011-06-04 14:43:04 +02:00
David Mudrak b2e905102a MDL-27448 Pretty pedantic fix of using spaces in the code 2011-06-04 14:42:07 +02:00
David Mudrak 9b5f831803 MDL-27448 Added common base class for all resource module successors 2011-06-04 14:38:41 +02:00
David Mudrak d61ed0afdc MDL-22414 Added possibility to explicitly reset the list of migrated files by a file manager instance 2011-06-04 14:29:39 +02:00
David Mudrak 904888daee MDL-27448 Resource intro (legacy summary) field converted consistently by the resource handler 2011-06-04 13:24:03 +02:00
David Mudrak 069b5b80c4 MDL-27448 Fixed copyright and phpdoc info 2011-06-04 13:24:03 +02:00
David Mudrak 56bd82cceb MDL-27448 IMS content package converter checks that the manifest file exists 2011-06-04 13:24:03 +02:00
Andrew Davis 5da3af58a0 MDL-27448 resource conversion support to restore 1.9 backup to 2.1 2011-06-04 13:24:03 +02:00
David Mudrak c818e2df49 MDL-22414 Added helper methods to migrate files referenced by $@FILEPHP@$ 2011-06-04 13:22:27 +02:00
David Mudrak d73c82e791 MDL-22414 Getting rid of a relict method copied from restore subsystem 2011-06-04 11:46:31 +02:00
David Mudrak a78b139ce6 Merge branch 'master' into backup-convert 2011-06-03 23:22:23 +02:00
David Mudrak db6491bf9e Merge pull request #10 from nebgor/MDL-27451
MDL-27451 Backup - added 1.9 backup conversion handler for wiki
2011-06-03 14:15:26 -07:00
David Mudrak c15649fbd2 MDL-27626 random question conversion support 2011-06-03 22:59:13 +02:00
David Mudrak 0e3a69b0e5 MDL-22414 Provided a work around MDL-27713
Currently the underlying backup/restore code does not differentiate null
and empty array data. So we have to explicitly check that we got array,
even though the correct set_stash() was called.
2011-06-03 22:45:46 +02:00
David Mudrak c0e3796e1b MDL-27626 calculated qtype conversion support
uff...
2011-06-03 21:57:00 +02:00
David Mudrak aaf88d2cb2 MDL-27626 numerical_options are written only if there are some numerical_units available
This reflects the logic of the backup 2.0. Previously, the new
numerical_options structure was written always, even if there were no
numerical_units.
2011-06-03 21:56:59 +02:00
David Mudrak 0a562bafd1 MDL-27626 matching question type conversion handler 2011-06-03 21:56:59 +02:00
David Mudrak 23007e5d27 MDL-22414 Fixed wrong usage of static caches
These static caches were bad idea of mine. Multiple conversion jobs
executed from a single PHP script share such variables, of course, which
is wrong. This patch removes one static cache completely and
reimplements the other two static caches as normal member variables.
2011-06-03 21:54:13 +02:00
David Mudrak 38bce21a9e MDL-22414 Fixed the id generation entropy 2011-06-03 18:54:57 +02:00
David Mudrak cd92d83bf2 MDL-22414 Added new method to get the list of existing stashes 2011-06-03 18:54:57 +02:00
David Mudrak a4158f8d93 MDL-27626 Make sure that the <answers> structure is present before converting it
This corresponds the logic of question_backup_answers()
2011-06-03 18:54:57 +02:00
David Mudrak 7cfff0ccfb MDL-27626 multianswer (embedded, cloze) question type conversion handler 2011-06-03 18:54:57 +02:00
David Mudrak 589475665e MDL-27626 numerical question type conversion handler 2011-06-03 18:54:56 +02:00
David Mudrak f75ad8d776 MDL-27626 moodle1_qtype_handler now provides helper methods for numerical_units and numerical_options 2011-06-03 18:54:56 +02:00
David Mudrak 1056c9b914 MDL-22414 Fixed moodle1_xml_handler::write_xml() attributes handling
The attributes did not work for nested elements because of the missing
slash.
2011-06-03 18:54:51 +02:00
Mary Evans 5d224075ae MDL-27704_master Fix for Overlapping problems in Fusion theme 2011-06-03 17:41:39 +01:00
David Mudrak 513e2215c6 MDL-27626 The test file with questions now contains numerical units in numerical qtype 2011-06-03 18:06:35 +02:00
David Mudrak afa08aeb15 MDL-27626 essay question type conversion handler 2011-06-03 18:06:34 +02:00
David Mudrak 2b129b4cb6 MDL-27626 truefalse question type conversion handler 2011-06-03 18:06:29 +02:00
David Mudrak 2554f389d4 MDL-27626 shortanswer question type conversion handler 2011-06-03 18:06:28 +02:00
David Mudrak 7ffc82df8b MDL-27626 multichoice question type conversion handler 2011-06-03 18:06:28 +02:00
David Mudrak 22b8486fe6 MDL-27626 moodle1_qtype_handler now provides a helper method for answers structure conversion 2011-06-03 18:06:27 +02:00
David Mudrak 1ff4b8dec0 MDL-27626 moodle1_qtype_handler::process_question() is not supposed to return anything
Returning the converted array has no benefit here and makes the things
more complicated. From now on, the method is supposed to write what it
needs directly into the opened file, without returning anything.
2011-06-03 18:06:27 +02:00
David Mudrak e19d0c109c MDL-27626 The initial support for the question bank backups conversion
This patch introduces a framework for the question bank conversion. It
deals with the common question data (that are not qtype-specific) and
the way how to make sure that the qtype plugins have access to the paths
they are interested in.
2011-06-03 18:06:27 +02:00
Mary Evans 3ae75b44c7 MDL-27692_master Fixes issue - bullets not numbers in ordered list... 2011-06-03 12:11:09 +01:00
Aparup Banerjee 61ff1fecc3 MDL-27451 Backup - added 1.9 backup conversion handler for wiki 2011-06-03 15:09:15 +08:00
David Mudrak 0f5860f707 Merge pull request #11 from nebgor/MDL-27447
MDL-27447 mod_quiz backup conversion
2011-06-02 23:08:12 -07:00
Dongsheng Cai 12c9bbbdd2 MDL-26392 WIKI added file managment support to wiki editor 2011-06-03 11:22:18 +08:00
Rajesh Taneja 6a0bf5c4b0 MDL-27577 moodlelib - fixed dst offset in userdate, usergetdate and make_timestamp functions 2011-06-03 09:50:38 +08:00
Eloy Lafuente (stronk7) a56c68e3f4 weekly release 2.1dev 2011-06-02 23:35:35 +02:00
Ruslan Kabalin 8e26531519 MDL-27171 messages: add processor uninstall function
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-06-02 09:27:05 +01:00
David Mudrak 78d22af957 Fixed error/required_not_stashed_data when the backup does not contain course_files 2011-06-02 09:05:59 +02:00
Aparup Banerjee 4b2da7cee0 MDL-27447 Backup - improvements to 1.9 quiz backup converter 2011-06-02 10:35:08 +08:00
Aparup Banerjee 63e9bb60e6 MDL-27447 Backup - added quiz module 1.9 backup converter 2011-06-02 10:35:08 +08:00
David Mudrak 034b0e4a30 Fixed applying convert_path recipes on sub-paths of grouped elements
Grouped elements contain arrays with the sub-paths. This patch makes
sure that the sub-paths are pre-cooked recursively. However because the
recipes do not distinguish the full path to the element, only the
implicit recipe (making the tags lowecase) is applied. To avoid
potential data loss (for example dropfields recipe would delete all
fields from the whole grouped tree, not only the direct descendants of
the path where the recipe is declared), explicit recipes are forbidden
for grouped elements. The developer has to convert the $data manually as
needed.
2011-06-02 03:26:52 +02:00
Ruslan Kabalin d004c4b20a MDL-27171 messages: fix bug in upgrade_populate_default_messaging_prefs
isset check assumed that $defaultpreferences is the object

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-06-01 12:30:28 +01:00
Ruslan Kabalin afed8d0f17 MDL-27652 messages: introduce message_update_processors
This function populates default message preferences for all existing providers
when the new message processor is added.

The change also includes update of message_set_default_message_preference to
make possible using it for particular message processor update.

install_populate_default_messaging_prefs() is no longer needed and depricted.

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-06-01 12:02:37 +01:00
Ruslan Kabalin 67147c2550 MDL-27171 messages: populate messaging defaults after the installation
This makes the order of plugins returned by get_plugin_types not important as
all messaging defaults population is done at the end.

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-31 16:00:32 +01:00
Ruslan Kabalin 60bbe7684a MDL-27171 messages: meet require_once usage gudelines
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-31 15:16:17 +01:00
Ruslan Kabalin a4de1d8f0e MDL-27171 messages: remove excessive include_once
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-31 14:02:37 +01:00
Ruslan Kabalin 838075147b MDL-27171 messages: some minor fixes in translate_message_default_setting function
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-31 13:55:57 +01:00
Ruslan Kabalin bf0fb77293 MDL-27171 messages: avoid using depricated notification method.
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-31 12:26:15 +01:00
Ruslan Kabalin 72e6af0344 MDL-27171 messages: fix static variable filtering bug in get_message_processors
Static $processors should contain the full list of processors only, when
filtering is required, the $processors variable should not be updated.

Lambda function refactoring is made as well.

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-31 11:18:11 +01:00
Ruslan Kabalin 298925d4d1 MDL-27171 messages: clean up pereferences on message provider removal
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-31 10:55:30 +01:00
Ruslan Kabalin 31afb0a437 MDL-27171 messages: recover message_update_providers backward compatibility
'return true' was removed by mistake

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-31 10:05:39 +01:00
Sam Hemelryk e455bdb3d7 MDL-27638 Removed buggy status line from query as it is being calculated in php anyway 2011-05-31 17:02:17 +08:00
Ruslan Kabalin e8fc7940a8 MDL-27171 messages: $defaultpreferences is an object, use isset instead.
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-31 09:46:22 +01:00
Dan Poltawski b46ca3d7ae messaging: MDL-27171 - change variable with underscores 2011-05-31 09:07:38 +01:00
David Mudrák 193407a096 Merge pull request #9 from nebgor/MDL-27449
MDL-27449 SCORM module 1.9 converter
2011-05-30 23:35:26 -07:00
Sam Hemelryk e5824bb9c6 MDL-25394 Tidied up several things in order to get this integrated 2011-05-31 14:28:03 +08:00
Anthony Forth 37959dd471 MDL-25394 Improved support for mobile and device themes 2011-05-31 14:25:52 +08:00
Aparup Banerjee a1cac902ec MDL-27449 Backup - migrating scorm file within scorm module 1.9 backup converter 2011-05-31 11:29:48 +08:00
David Mudrák ba1e221a0d Merge pull request #7 from rwijaya/MDL-27441b
MDL-27441 mod_feedback 1.9 backup conversion
2011-05-30 16:26:18 -07:00
Eloy Lafuente (stronk7) a6b2f0faf2 Merge branch 'MDL-25191-master' of git://github.com/sammarshallou/moodle 2011-05-31 00:58:34 +02:00
Sam Hemelryk 52a3c2c703 Merge branch 'wip-mdl-27603-master' of git://github.com/rajeshtaneja/moodle 2011-05-30 17:21:29 +08:00
Aparup Banerjee 0e7269d11d MDL-27449 Backup - added scorm module 1.9 backup converter 2011-05-30 14:20:35 +08:00
David Mudrák 071f617c52 Merge pull request #6 from rwijaya/MDL-27446b
MDL-27446 mod_lesson
2011-05-29 22:46:31 -07:00
Sam Hemelryk 8dc13ee7b0 Merge branch 'MDL-25512_master' of git://github.com/MaryE/moodle.git 2011-05-30 13:03:07 +08:00
Rossiani Wijaya a6486a827f MDL-27441 mod_feedback: added conversion code to restore 1.9 backup to 2.1 site 2011-05-30 11:29:13 +08:00
Rossiani Wijaya b44739c868 MDL-27446 mod_lesson: added conversion code to restore 1.9 backup to 2.1 site 2011-05-30 10:56:31 +08:00
Rajesh Taneja 6006774cf7 MDL-27603 enrol_user - changed modifier to modifierid which is used in database 2011-05-30 10:10:03 +08:00
Sam Hemelryk 5436561c7c Merge branch 'MDL-27600-master' of git://github.com/sammarshallou/moodle 2011-05-30 10:05:59 +08:00
Sam Hemelryk 59023e7799 Merge branch 'MDL-27636_master' of git://github.com/stronk7/moodle 2011-05-30 09:18:02 +08:00
Adam Olley 9b01f68597 MDL-27009: Fix role group by statement for statistics 2011-05-30 09:05:53 +08:00
Sam Hemelryk 9efd421e0e Merge branch 'navigationlib_userreports' of git://github.com/stronk7/moodle 2011-05-30 08:56:15 +08:00
Sam Hemelryk 91bad7adc1 Merge branch 'MDL-27627-master' of git://github.com/sammarshallou/moodle 2011-05-30 08:54:15 +08:00
Mary Evans df7962f977 wip-MDL-25512 Correct CSS rules in Canvas theme to align with YUI3 CSS Fonts 2011-05-30 00:41:06 +01:00
David Mudrak 93264625f2 The source passed to the migrate_directory() may not exist
In case the source $rootpath passed to the migrate_directory() does not
exist, an empty array is returned by the method. Note that if the
directory exists and is empty, the directory itself is converter so
there would be a new record created. However, the restore process
ignores these records anyway, as the directory records are created
automatically by certain file api methods.
2011-05-29 00:38:23 +02:00
David Mudrak 214c492447 Converter file manager's methods take relative path within the backup instead of the absolute path 2011-05-29 00:18:19 +02:00
Tim Hunt b360806d5c MDL-20636 update local/qeupgradehelper/README.txt. 2011-05-27 20:58:18 +01:00
Tim Hunt 85714b36c2 MDL-20636 implement the shell of the system for completing the upgrade using cron. 2011-05-27 20:46:37 +01:00
Tim Hunt 60006d2971 MDL-20636 remove bogus include that breaks cron. 2011-05-27 20:43:20 +01:00
Tim Hunt 1027301215 MDL-20636 Implement the ability to only upgrade some of the quiz attempts during the main upgrade. 2011-05-27 19:44:53 +01:00
Tim Hunt 61eca136c1 MDL-20636 remove the pretendupgrade script that does not work. 2011-05-27 18:10:15 +01:00
David Mudrák 64f7da2402 Merge pull request #2 from rwijaya/MDL-27450
MDL-27450 mod_survey: added conversion code to restore 1.9 backup to 2.1
2011-05-27 06:44:30 -07:00
Tim Hunt a4c982917e MDL-20636 truefalse qtype clean up other unit tests to use the new way of making test tf questions. 2011-05-27 14:43:28 +01:00
Tim Hunt 188e174457 MDL-20636 truefalse qtype was showing the false feedback even when no response was given. #386 2011-05-27 14:41:48 +01:00
David Mudrák 455fc30367 Merge pull request #1 from nebgor/MDL-27440_chunkyfix
MDL-27440 Backup - added database module 1.9 backup converter
2011-05-27 06:34:38 -07:00
Ruslan Kabalin 65c941a698 MDL-27171 messages: use moodle_url in admin_page_ messaging classes
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-27 14:07:06 +01:00
Ruslan Kabalin ebe0c008ca MDL-27171 messages: commenting style changes and extra comments
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
Signed-off-by: Dan Poltawski <dan.poltawski@luns.net.uk>
2011-05-27 14:07:06 +01:00
Ruslan Kabalin b53b2b0ee9 MDL-27171 messages: ensure message preferences for the core message providers are set
upgrade_core also attempts to populate the preferences, but since during the
first installation it is called before message outputs are set, we need to
force preferences setting at the end.

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-27 14:07:06 +01:00
Ruslan Kabalin ae2a213e1e MDL-27171 lib/moodlelib: change the order of plugins returned by get_plugin_types function
We need to ensure that message/output is installed first so that default
messaging settings are set correctly afterwards.

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-27 14:07:05 +01:00
Ruslan Kabalin 7a04c476a2 MDL-27171 messages: implement new syntax in messages.php and update processing
The new messaging default settings can be set in messages.php and deployed
during installation. This also ensures the removing of settings on plugin
uninstallation and contains the update script to populate current default
settings on the existing system when the new feature is introduced.

For security reason we have to avoid using library functions in upgrade
function, so we set defaults the blind way. At this point we do not expect
plugins to have individual messaging defaults presets anyway. The site
defaults are the same as were set for each user using
message_set_default_message_preferences function.

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-27 14:06:56 +01:00
Ruslan Kabalin 3bcbd80ebe MDL-27642 messages: ensure message processors are removed when plugin is being uninstalled
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-27 13:49:28 +01:00
Ruslan Kabalin f15097b5a3 MDL-27171 messages: remove excessive check from jabber send_message function
the parent send_message in messagelib.php does user/system configuration
checks before calling this method using the plugin instance.

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-27 13:49:28 +01:00
Ruslan Kabalin 2e075f41b9 MDL-27171 messages: change send_message to accomodate changes in messaging
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-27 13:49:28 +01:00
Ruslan Kabalin 76a8aef9a1 MDL-27171 messages: allow using user IDs instead of objects in message_send function
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-27 13:49:28 +01:00
Ruslan Kabalin 2af2210c4e MDL-27652 messages: fix varaibles names in message_send function
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-27 13:49:28 +01:00
Ruslan Kabalin f8351d0927 MDL-27171 messages: do not keep empty messging configuration strings in user preferences
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-27 13:49:28 +01:00
Ruslan Kabalin 814e373576 MDL-27171 messages: upgrade user profile messaging preferences interface
Existing user messaging preferences should accomodate default settings and
permissions.  This also includes some changes to default outputs preferences.

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-27 13:49:28 +01:00
Ruslan Kabalin 1d72e9d441 MDL-27171 messages: add default message outputs management interface
This introduces the new page where admin may change the permissions and
defaults for particular combination of message processors and providers.

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-27 13:49:28 +01:00
Ruslan Kabalin e710658d89 MDL-27171 forum: refactor forum settings
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-27 13:49:28 +01:00
Ruslan Kabalin 2f2137fca4 MDL-27171 messages: admin settings reordering
This includes:
 * most email settings go from general admin setings to email plugin settings
 * digestmailtime goes to mod/forum/settings.php
 * supportname, supportemail and supportpage go to Support contact page
 * all jabber settings go from general admin setings to jabber plugin settings

AMOS BEGIN
 MOV [jabberhost,admin],[jabberhost,message_jabber]
 MOV [configjabberhost,admin],[configjabberhost,message_jabber]
 MOV [jabberserver,admin],[jabberserver,message_jabber]
 MOV [configjabberserver,admin],[configjabberserver,message_jabber]
 MOV [jabberusername,admin],[jabberusername,message_jabber]
 MOV [configjabberusername,admin],[configjabberusername,message_jabber]
 MOV [jabberpassword,admin],[jabberpassword,message_jabber]
 MOV [configjabberpassword,admin],[configjabberpassword,message_jabber]
 MOV [jabberport,admin],[jabberport,message_jabber]
 MOV [configjabberport,admin],[configjabberport,message_jabber]
 MOV [digestmailtime,admin],[digestmailtime,forum]
 MOV [configdigestmailtime,admin],[configdigestmailtime,forum]
 MOV [allowusermailcharset,admin],[allowusermailcharset,message_email]
 MOV [configallowusermailcharset,admin],[configallowusermailcharset,message_email]
 MOV [mailnewline,admin],[mailnewline,message_email]
 MOV [configmailnewline,admin],[configmailnewline,message_email]
 MOV [noreplyaddress,admin],[noreplyaddress,message_email]
 MOV [confignoreplyaddress,admin],[confignoreplyaddress,message_email]
 MOV [sitemailcharset,admin],[sitemailcharset,message_email]
 MOV [configsitemailcharset,admin],[configsitemailcharset,message_email]
 MOV [smtphosts,admin],[smtphosts,message_email]
 MOV [configsmtphosts,admin],[configsmtphosts,message_email]
 MOV [smtpmaxbulk,admin],[smtpmaxbulk,message_email]
 MOV [configsmtpmaxbulk,admin],[configsmtpmaxbulk,message_email]
 MOV [smtpuser,admin],[smtpuser,message_email]
 MOV [configsmtpuser,admin],[configsmtpuser,message_email]
 MOV [smtppass,admin],[smtppass,message_email]
AMOS END

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-27 13:49:28 +01:00
Ruslan Kabalin 75c34c23a4 MDL-27171 messages: add message outputs management interface page
This introduces the page for management message outputs (processors) where
admin may enable/disable them and jump to configuration pages.
2011-05-27 13:49:28 +01:00
Ruslan Kabalin 21e6c82282 MDL-27643 messages: message_output_jabber should not send messges to emails
Jabber message should only be send if destination user has Jabber ID specified
in the profile. It should not use email if jabber id is not provided as it is
a performance breach.

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-27 13:44:49 +01:00
Ruslan Kabalin cd8f78c88f MDL-27171 messages: add new methods on the message_output class
This introduces the new methods to the abstract class: is_system_configured
and is_user_configured that are supposed to return boolean depending whether
required configuration has been made on both system or user level
respectively. These methods return true by default and and be overriden by
being declared in the plugin class itself

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
2011-05-27 13:44:49 +01:00
sam marshall 3fbe0e8a0f MDL-27627 Headers in moodleform_mod should have IDs 2011-05-27 13:40:02 +01:00
Adam Olley 0420f8dca0 MDL-25191: Properly destroy all elements of the modinfo cache 2011-05-27 13:28:55 +01:00
sam marshall 188a812794 MDL-27600 Navigation: Should be able to add nodes at other places than end of list 2011-05-27 13:18:03 +01:00
Tim Hunt 9199e7a569 MDL-20636 fix styling of essay questions. #371 2011-05-27 12:11:54 +01:00
Tim Hunt 612106b3a4 MDL-20636 fix URL handling for previews to always use Moodle URL.
Also, make the preview window big enough. #367
2011-05-27 11:49:23 +01:00
Wale Olujide dc0373c852 MDL-20636 Make more space for the qusetion name in the question bank view #580. 2011-05-27 10:31:37 +01:00
David Mudrak 66f79e50a3 Files conversion support improved
The new file manager class is introduced. Once its public properties are
set, one can use it to migrate either a single file or a whole
directory. The course_files conversion reworked so that it uses the new
manager now. The files.xml written at the very end of the conversion,
giving all handlers a chance to migrate the files they need.
2011-05-27 04:13:34 +02:00
Tim Hunt c014b989ba MDL-27649 Convert the calculated question types to use the new variants mechanism. 2011-05-26 21:53:47 +01:00
Tim Hunt 1da821bbde MDL-27649 support question variants as a first-class concept in the question engine. 2011-05-26 21:23:56 +01:00
David Mudrak bef9ad9540 MDL-27647 Added the afterburner theme to the whitelist of standard plugins 2011-05-26 21:51:01 +02:00
Tim Hunt f55192bf08 MDL-20636 improve the fomatting of the generated code. 2011-05-26 19:31:24 +01:00
Tim Hunt 61e2c3fb3f MDL-20636 fix question flag icons on the review page. 2011-05-26 19:27:38 +01:00
Tim Hunt 0500a3a92d MDL-27413 qtype_multianswer upgrade should be complete. 2011-05-26 19:19:45 +01:00
Tim Hunt b3e146268f MDL-27413 qtype_multianswer two more upgrade tests. 2011-05-26 18:35:52 +01:00
Tim Hunt 1cacb05989 MDL-27413 qtype_multianswer upgrade. First passing test. 2011-05-26 18:25:19 +01:00
David Mudrak 826d17f274 MDL-27444 The choice module backup converter now uses on-start and on-end handlers to write <options> wrapper
This is mainly for the demonstration purposes, the previous form works
as well.
2011-05-26 18:37:15 +02:00
Tim Hunt dcedbb0e25 MDL-27413 qtype_multianswer now works for all embedded types, I think. 2011-05-26 16:44:09 +01:00
David Mudrak f6f7a7266c Merge branch 'master' into backup-convert
Conflicts:
	backup/util/xml/parser/processors/simplified_parser_processor.class.php
	backup/util/xml/parser/simpletest/testparser.php
2011-05-26 17:30:27 +02:00
David Mudrak 6cfa5a3220 Added support for the on_xxx_start() event handler for MOD and BLOCK sub-paths 2011-05-26 16:59:59 +02:00
David Mudrak 4ddf9ac6b5 Added base class for the activity module subplugins 2011-05-26 16:59:51 +02:00
Tim Hunt 7ac7977cbe MDL-27413 qtype_multianswer embedded inline multichoice now work. 2011-05-26 15:03:47 +01:00
Tim Hunt c83d6cc1eb MDL-27413 qtype_multianswer add missing module.js 2011-05-26 11:25:48 +01:00
Tim Hunt 12c6e0087e MDL-27413 qtype_multianswer more coding style cleanup. 2011-05-26 11:25:26 +01:00
Tim Hunt df4be1222e MDL-27410 Fix broken calculated qytpe install. #670 2011-05-26 11:00:17 +01:00
Rossiani Wijaya 39a35cc589 MDL-27450 mod_survey: added conversion code to restore 1.9 backup to 2.1 site 2011-05-26 13:25:18 +08:00
Aparup Banerjee 4c9c90fbe2 MDL-27440 Backup - added database module 1.9 backup converter 2011-05-26 11:32:05 +08:00
Eloy Lafuente (stronk7) c44299c172 MDL-27636 restore - add support for after_restore() to plugins. Credit goes to Mark Nielsen. Thanks! 2011-05-26 02:37:16 +02:00
Eloy Lafuente (stronk7) 5fba6731d3 MDL-27541 course reports - allow teachers to view individual reports 2011-05-26 01:29:41 +02:00
Eloy Lafuente (stronk7) 16b5541dd2 weekly release 2.1dev 2011-05-26 00:26:54 +02:00
Eloy Lafuente (stronk7) c4cee99c7b MDL-27625 rating - fix one merging problem 2011-05-25 22:34:51 +02:00
Tim Hunt 42a5b055b7 MDL-27413 qtype_multianswer start work on rendering.
Embedded shortanswer questions now work.

Note that overlib is no longer required by the JS.
2011-05-25 19:31:07 +01:00
Tim Hunt df55047ee4 MDL-20636 Fix potential bug with qtype_shortanswer correct answer display. 2011-05-25 19:29:01 +01:00
Eloy Lafuente (stronk7) f2e725930b MDL-27471 rating - whitespace cleanup 2011-05-25 16:54:51 +02:00
Eloy Lafuente (stronk7) 5b52ce19c5 Merge branch 'MDL-27625_master' of git://github.com/stronk7/moodle
Conflicts:
	mod/forum/lib.php
2011-05-25 16:37:43 +02:00
David Mudrak d777f26837 MDL-27445 Fixed the deprecated call 2011-05-25 12:13:26 +02:00
Aparup Banerjee d1711071f4 MDL-27445 added moodle1 backup converter for label 2011-05-25 12:08:00 +02:00
Eloy Lafuente (stronk7) 5693d56cd8 MDL-27625 rating - consider RATING_UNSET_RATING a valid rating value 2011-05-25 12:00:16 +02:00
Eloy Lafuente (stronk7) 28e2b08582 Merge branch 'MDL-27594' of git://github.com/stronk7/moodle 2011-05-25 10:16:10 +02:00
David Mudrak ad28527828 MDL-27445 Fixed the deprecated call 2011-05-24 16:31:28 +02:00
Aparup Banerjee b391176a0b MDL-27445 added moodle1 backup converter for chat 2011-05-24 16:17:51 +02:00
David Mudrak 2fe7d14a04 The generation of module.xml and friends moved to a later phase
This is needed to give the modules a chance to actually rewrite course
modules related information. Resource module needs this so it is able to
split its own information into its successors (url, folder, page etc).
2011-05-24 16:01:04 +02:00
David Mudrak 8bcefb3254 Activity module handler get_moduleid() replaced with get_cminfo() 2011-05-24 16:01:00 +02:00
David Mudrak 6357693c8b Extended debugging information thrown by an exception 2011-05-24 16:00:55 +02:00
Eloy Lafuente (stronk7) d4dd06591b MDL-27594 backup - out unused (and incorrect) condition + stronger tests 2011-05-24 11:55:39 +02:00
Eloy Lafuente (stronk7) eb78f0632d MDL-27594 backup - fix start/end notifications on empty chunks 2011-05-24 11:01:00 +02:00
Sam Hemelryk 85d0c7f6b2 MDL-22833 Cleaned up afterburner footer 2011-05-24 15:54:49 +08:00
Sam Hemelryk 12b3d58286 Merge branch 'MDL-22833' of git://github.com/MaryE/moodle.git 2011-05-24 15:32:27 +08:00
David Mudrak 8b866ce4b1 Merge branch 'MDL-27439' of git://github.com/nebgor/moodle into backup-convert 2011-05-24 09:21:38 +02:00
Tim Hunt fa6c862065 MDL-27413 unit tests for some of the new multianswer code. 2011-05-23 20:00:05 +01:00
Tim Hunt ab50232b7e MDL-27413 start conversion of the multianswer qtype to the new question engine. 2011-05-23 16:45:12 +01:00
Tim Hunt 0c3fa8209e MDL-20636 a bit of clode clean-up in calculated*. 2011-05-23 16:44:21 +01:00
Eloy Lafuente (stronk7) b47dcdf0de MDL-27471 minor fixups 2011-05-23 12:42:15 +02:00
Sam Hemelryk 2b04c41c58 MDL-27471 Adding mandatory component & ratingarea to the ratings API + other fixes
* Added the component and ratingarea fields and implemented it throughout
  the rating API as mandatory fields
* Cleanup rating indexes
* Upgrade forum/data/glossary ratings
* Moved the logic in the render_rating method to methods of the rating object.
* Added new callback for checking ratingareas
* Cleaned comments here and there
* Mark the xxx_get_participants methods as deprecated
* Refactor rate_ajax and ratingsuser_can_view_aggregate methods
* Cleaned up rating/index.php to use html_table object and moved inline styles to CSS.
* Added missing properties of the rating object that were being set throughout the rating
  API.
2011-05-23 12:35:39 +02:00
Eloy Lafuente (stronk7) 7a01a2d0ca Merge branch 'MDL-27532-master' of git://github.com/sammarshallou/moodle 2011-05-23 10:29:33 +02:00
Sam Hemelryk 2c2034c9c3 Merge branch 'master_MDL-25177_choice_windowfix' of git://github.com/danmarsden/moodle 2011-05-23 11:32:23 +08:00
Sam Hemelryk 34997cf89e Merge branch 'MDL-27530_head' of git://github.com/grabs/moodle 2011-05-23 11:24:39 +08:00
Aparup Banerjee 0193d9dfe7 MDL-27428 accessibility : added a fourth argument to event's subscription and delegation methods to specify selector actions.
- selected actions will fire the event through to the relevant handling functions.
2011-05-23 11:13:52 +08:00
Aparup Banerjee f93844f3d7 MDL-27428 accessibility : added keyboard support to navigational menus loaded via ajax. 2011-05-23 11:13:36 +08:00
Aparup Banerjee eb25449ae6 MDL-27428 accessibility : added keyboard navigation to dock arrow keys expand and collapse. enter and space will toggle actions. 2011-05-23 11:13:20 +08:00
Aparup Banerjee 32561cafd4 MDL-27428 accessibility : made navigation and settings menu category span nodes navigable using tabs with tabindex=0 2011-05-23 11:12:53 +08:00
Aparup Banerjee 1e22cd351f MDL-27428 accessibility : allowed enter/space/left_arrow/right_arrow to expand/collapse navigation & settings menu branches
- note: a menu node branch that is a link will be followed instead of toggling the branch.
2011-05-23 11:12:35 +08:00
Eloy Lafuente (stronk7) 54b8f33421 MDL-27594 backup - fix start/end notifications on empty chunks 2011-05-23 00:58:45 +02:00
Tim Hunt 59a3fcd3eb MDL-20636 Fix a lot more coding style issues. 2011-05-20 20:18:04 +01:00
Tim Hunt e0736817f0 MDL-20636 fix some more coding style issues in the question code. 2011-05-20 18:50:41 +01:00
Tim Hunt 449bfe90c6 MDL-20636 quiz let users with capability mod/quiz:grade, but not mod/quiz:viewreports see the manual grading report in the navigation. OU bug #412. 2011-05-20 18:25:07 +01:00
Tim Hunt 667cdde361 MDL-20636 Implement upgrade of calculated* question type attempts. 2011-05-20 18:22:35 +01:00
David Mudrak 8312ab674a Course files conversion 2011-05-20 11:59:41 +02:00
David Mudrak f3b0b1e552 The write_xml() does not put 'id' into attributes implicitly
In some situations - like in inforef.xml - we need id to be proper
nested citizen.
2011-05-20 11:29:00 +02:00
David Mudrak 716a9616e3 The handlers now throw moodle1_convert_exception instead of convert_exception 2011-05-20 10:19:28 +02:00
David Mudrak 26cac34a6c Improved get_contextid()
For system and course levels, we do not need itemid as we work with
single system context and single course context only. Thanks to this, we
can generate contextid for the restored course even we do not know its
original id yet.
2011-05-20 10:19:28 +02:00
David Mudrak 6700d288b3 New get_nextid() method
This is useful for generating artificial database records ids.
2011-05-20 10:19:27 +02:00
David Mudrak dbf6843a72 Include a course file in the unit test 2011-05-20 10:19:27 +02:00
David Mudrak 6d73f18573 New method get_stash_itemids()
This will be useful to build inforef.xml files.
2011-05-20 10:19:22 +02:00
David Mudrak 01b922fe70 Trivial improvement of member variables doc 2011-05-20 09:39:22 +02:00
Aparup Banerjee be53cf4e4c MDL-27439 added moodle1 backup converter for assignment
- only recreates assignment module, not user data or submissions yet.
2011-05-20 11:59:20 +08:00
Tim Hunt c35bf0e6b1 MDL-20636 local_qeupgradehelper use a textarea in extracttestcase for easier copy/paste. 2011-05-19 20:32:44 +01:00
Tim Hunt 2db6fbad97 MDL-20636 make upgradehelper able to reset badly upgraded attempts
Obviously, these are the ones where it most important to be able to redo the upgrade.
2011-05-19 20:27:12 +01:00
Tim Hunt ffe4d23abd MDL-20636 make question upgrade more robust for incompatible question types. 2011-05-19 20:27:09 +01:00
Tim Hunt e35ba43c91 MDL-20636 make syncronised datasets work for calculated* questions. 2011-05-19 19:06:07 +01:00
Tim Hunt 0eb253f7f6 MDL-20636 quiz restart preview button was missing since the renderer refactor. 2011-05-19 19:05:25 +01:00
Tim Hunt d1770e4258 MDL-27410, MDL-27412 make the calculated* qtypes work in the statistics report. 2011-05-19 18:12:38 +01:00
Tim Hunt 39153237f5 MDL-20636 fix broken links in the statistics report. 2011-05-19 18:11:52 +01:00
Tim Hunt 2178cd3a12 MDL-20636 Dean's refactoring had broken the quiz summary page. 2011-05-19 17:52:52 +01:00
Tim Hunt b130270d2d MDL-20636 Add support for hints to the calculated* questions. 2011-05-19 17:38:38 +01:00
Tim Hunt cdece95ea4 MDL-27412 Upgrade the calculatedmulti question type to the new question engine. 2011-05-19 17:14:09 +01:00
David Mudrak 2304cbaacd Do not try to convert activity modules that do not have the converter implemented yet
This checks for the presence of moodle1 library in the module directory.
If there is no such file, the converter does not include the module in
the list of included modules.

Note that some files (like module.xml) are created for such skipped
modules anyway. But restore process seems to use the information from
moodle_backup.xml so it does not try to restore them.
2011-05-19 14:25:37 +02:00
David Mudrak 317f1c6f61 Generate fake XML files to make the restore process happy
With these changes I was able to restore the very first 1.9 course
containing a forum and a choice.
2011-05-19 13:56:43 +02:00
Andrew Davis (andyjdavis) ab1da2675d MDL-27442 forum: allow forum to be restored into 2.1 from a 1.9 backup 2011-05-19 13:41:01 +02:00
Tim Hunt efe3e87b61 MDL-27411 upgrade the calculatedsimple qtype to the new question engine. 2011-05-19 12:20:49 +01:00
David Mudrak 46ff8b0ecf The handler's process_xxx() method is not mandatory any more
It was realized that it is pretty common to register a convert_path just
to be able to attach on-start or on-end listeners to it, without actual
processing data. So now, the handler must provide at least one of these
three methods and the process_xxx() does not need to be there if it is
not needed.
2011-05-19 03:17:18 +02:00
Dan Marsden 6fa51b70a5 MDL-25177 Choice - fix typo for form creation causing pop-up window - thanks to Jason Hardin for fix 2011-05-19 13:01:21 +12:00
Tim Hunt 18f9b2d2cf MDL-27410 qtype_calculated fix basic question editing and preview.
At least, after these changes, I was able to create a calculated question through the Moodle UI and then preview it. I am sure more testing and fixing is needed to make sure everything works.
2011-05-18 21:15:25 +01:00
Tim Hunt 1da4060f65 MDL-27410 qtype_calculated works in my unit tests.
Probably does not work through the Moodle UI yet.
2011-05-18 17:21:26 +01:00
Tim Hunt f580e0e4b0 MDL-20636 Fix some minor problems with the question unit tests. 2011-05-18 17:07:16 +01:00
David Mudrak ae80f68f31 Improvements in moodle1_xml_handler external API
The methods are protected now as they are supposed to be used by
subclasses only. Added a new method to check if the output writer has
been opened.
2011-05-18 16:32:51 +02:00
David Mudrak c18f90f22f Merge remote branch 'github/master' into backup-convert 2011-05-18 16:08:15 +02:00
sam marshall 5e0dae125d MDL-27532 Add backup support for course report per-course data 2011-05-18 14:56:11 +01:00
Tim Hunt 19e911a251 MDL-27410 qtype_calculated better errorhandling for invalid expressions.
Better method names.
2011-05-18 14:12:34 +01:00
David Mudrak c171d28ebc The basic wrapper for question categories conversion
The QUESTION_CATEGORIES tag is optional in moodle.xml but the file
questions.xml is required by the moodle2 restore process. So here we
make sure that at least an empty file is created.
2011-05-18 14:33:05 +02:00
David Mudrak ba66847b71 Roles definition conversion 2011-05-18 14:12:52 +02:00
David Mudrak 96f7c7ad72 Implemented new XML transformer for the files being written during the conversion 2011-05-18 14:10:04 +02:00
David Mudrak 71d1751c53 Improved the information display about a non-standard backup file 2011-05-18 12:19:57 +02:00
Sam Hemelryk d04f7fb4a8 weekly release 2.1dev 2011-05-18 18:11:10 +08:00
Sam Hemelryk f138b7c13b MDL-27161 Improved the 2 new strings in assignment 2011-05-18 17:29:39 +08:00
Sam Hemelryk 74cf2d0015 MDL-26704 Fixed up variable typo 2011-05-18 15:32:40 +08:00
David Mudrak f666f14930 The first attempt to include backup conversion in the restore process
With this initial implementation, we do not display any information
about the backup contents yet. The non-standard backup file is just
silently converted at the beginning of the settings stage, as soon as
the restore controller is available.

In the future we will probably want to display the information about the
contents of the converted file as if we were restoring from standard
MBZ format. However this includes more work in the restore UI machinery
and I leave it open for now.
2011-05-18 01:55:27 +02:00
David Mudrak 3a0767218a The core_backup_renderer does not need the full backup information any more
In the previous implementation, the renderer needed full backup
information just to see if its type is TYPE_1COURSE or not. For
non-standard backups, we do not have the full backup information
available but we can easily decide if we are restoring the whole course
or just its part.
2011-05-18 01:14:24 +02:00
David Mudrak d51345c7c6 Fixed the class name in the calling code after a recent change 2011-05-18 00:55:24 +02:00
David Mudrak 179982a400 Added missing description of the moodle1 converter 2011-05-18 00:54:00 +02:00
David Mudrak 4eb2a097c5 The display() method in backup/restore UI returns the HTML rather then echoing it
This implementation uses a hacky trick with the output buffer unless
someone finds a time to add support for returning the HTML from
quickforms.
2011-05-18 00:50:26 +02:00
Tim Hunt 0652547685 MDL-27410 qtype_calculated start working on the new code for the question type.
This is an attempt to start thinking about how to handle the dataset values.
2011-05-17 18:28:16 +01:00
Eloy Lafuente (stronk7) faf0e91a4b MDL-27192 Global scope does not need global usage 2011-05-17 18:48:20 +02:00
Eloy Lafuente (stronk7) 79da959b55 Merge branch 'wip-MDL-27192_MASTER' of git://github.com/jason-platts/moodle 2011-05-17 18:44:16 +02:00
Tim Hunt afe24f850b MDL-20636 Rename questiontype.php to questiontypebase.php. Also some conde-checker issues. 2011-05-17 16:46:57 +01:00
Jason Platts 8acd718118 MDL-27192 Page context error on calendar export with custom user
profile fields
2011-05-17 16:12:26 +01:00
Tim Hunt 8200ccd66f MDL-27411 qtype_calculatedsimple Fix lots of coding style issues. 2011-05-17 16:01:51 +01:00
Tim Hunt 29b689142f MDL-27412 qtype_calculatedmulti Fix lots of coding style issues. 2011-05-17 16:01:16 +01:00
Eloy Lafuente (stronk7) 4d7e02616b Merge branch 'MDL-27386_HEAD2' of git://github.com/rwijaya/moodle 2011-05-17 14:19:23 +02:00
stabijoh f63e0bb61f MDL-27294 Fix for fusion and overlay themes on zooming text 2011-05-17 07:28:13 -04:00
Eloy Lafuente (stronk7) 94a74f549a MDL-26704 gradebook: adding TODO comment to avoid forgetting 2011-05-17 11:58:22 +02:00
Eloy Lafuente (stronk7) dcc26efb70 Merge branch 'MDL-26704_user_outline_report_master' of git://github.com/andyjdavis/moodle 2011-05-17 11:55:04 +02:00
Tim Hunt f184c65cda MDL-27410 Big cleanup of the coding style in qtype_calculated. 2011-05-16 18:48:50 +01:00
David Mudrak 383f6f63c7 Fixed wrong class name 2011-05-16 19:05:34 +02:00
David Mudrak 99a82518eb The main moodle_backup.xml file is now being generated by the converter 2011-05-16 19:02:13 +02:00
Andreas Grabs a193a0cfa1 MDL-27530 The webdav-repository loads empty files 2011-05-16 15:35:16 +02:00
Tim Hunt 8f9145bb52 MDL-27505 Remove the ou-specific question types from the main branch.
The OU question types are now available from https://github.com/timhunt.
2011-05-16 08:30:44 +01:00
Eloy Lafuente (stronk7) 14c3fd5f83 Merge branch 'MDL-26436_close_recordsets_master' of git://github.com/andyjdavis/moodle 2011-05-16 09:23:42 +02:00
Sam Hemelryk 870b8b0402 Merge branch 'MDL-27161_head' of git://github.com/rwijaya/moodle.git 2011-05-16 12:28:18 +08:00
Sam Hemelryk 731d1b89ad Merge branch 'MDL-27387_rating_scale_validation_master2' of git://github.com/andyjdavis/moodle 2011-05-16 12:14:11 +08:00
Sam Hemelryk c23ee732c2 Merge branch 'MDL-26075_head' of git://github.com/grabs/moodle 2011-05-16 11:51:41 +08:00
Sam Hemelryk d5a99a030c Merge branch 'start_end_notifications' of git://github.com/stronk7/moodle 2011-05-16 10:06:49 +08:00
Sam Hemelryk 62ff4fe30b Merge branch 'prevent_profiling_before_install' of git://github.com/stronk7/moodle 2011-05-16 09:56:42 +08:00
Glenn Ansley 3efd551351 MDL-27494 choice - fixing incorrectly named column in backup 2011-05-16 03:24:30 +02:00
Eloy Lafuente (stronk7) bed4c52c67 Merge branch 'MDL-26436_close_recordsets2_master' of git://github.com/andyjdavis/moodle 2011-05-16 02:45:51 +02:00
Tim Hunt 9c197f4445 MDL-20636 Fix some more codechecker issues. 2011-05-14 22:53:25 +01:00
Tim Hunt bee82469d4 MDL-27408 Database upgrade for adaptive mode.
Could really do with more unit tests.
2011-05-13 16:55:14 +01:00
Tim Hunt 0c404c4211 MDL-20636 QE upgrade helper: Make resetting quiz attempts work. 2011-05-13 16:46:47 +01:00
Tim Hunt d02ac70862 MDL-20636 Add warning about very old attempts to listpreupgrade.php. 2011-05-13 11:57:26 +01:00
Tim Hunt 1ab31a1b92 MDL-20636 Make extracttestcase.php work after the upgrade too. 2011-05-13 11:42:37 +01:00
Tim Hunt 2d43a02323 MDL-20636 Make extracttestcase work. 2011-05-13 11:34:18 +01:00
David Mudrak 17d2e210b7 Renamed converter factory method to more self-descriptive get_converter() 2011-05-13 12:06:10 +02:00
Tim Hunt c468ce5922 MDL-20636 Fix upgrade of numerical questions. 2011-05-13 11:04:23 +01:00
David Mudrak 1cc0e42a86 The current element's data are passed to the on_element_end() event handler 2011-05-13 10:16:25 +02:00
Rossiani Wijaya 4bb7783ef1 MDL-27386: fixed mform for lesson essay grading (head) 2011-05-13 14:14:19 +08:00
Sam Hemelryk 5b239d6e8e MDL-27456 Fixed typo in comment/lib.php after last refatoring 2011-05-13 11:18:19 +08:00
David Mudrak eb3dc80bc3 Merge branch 'master' into backup-convert 2011-05-13 03:16:13 +02:00
David Mudrak a5ea28b32d Removing relics of the previous plan/tasks/steps based implementation
Kudos to Mark Nielsen for his initial work on this project. In his code,
Mark described the valuable logic of the conversion using a framework
mirroring plan/tasks/steps based architecture of the backup and restore.
My attempt to simplify it led to the current handlers-based
architecture.
2011-05-13 03:09:26 +02:00
David Mudrak 5f3185feb8 MDL-27444 Choice module 1.9 backup converts to 2.0 format
So far, user related data are not supported by the project.
2011-05-13 02:42:44 +02:00
David Mudrak baa6f6a848 Improved course module info conversion 2011-05-13 02:41:47 +02:00
Tim Hunt aac80ff319 MDL-20636 fix most of the remaining codechecker issues in mod/quiz and lib/questionlib.php. 2011-05-13 00:33:44 +01:00
Tim Hunt d3bab68c78 MDL-27408 update all question and quiz plugin version.php files. 2011-05-12 23:18:47 +01:00
Tim Hunt ab6cb45b7b MDL-27408 fix question engine upgrade issues on MySQL. 2011-05-12 23:17:58 +01:00
Tim Hunt 39759ac468 MDL-27408 fix a few minor bugs with the upgrade from 2.0.
More testing, and adaptive mode, still to come.
2011-05-12 21:03:24 +01:00
Tim Hunt bb28e3bc5e MDL-27408 Moved the question engine install/upgrade code into the proper place.
I have tested upgrade from the previous development version, and a clean install. Upgrade from 2.0 still needs more work.
2011-05-12 18:58:50 +01:00
David Mudrak d5d02635d7 Refactored get_contextid() and unit tests for it 2011-05-12 18:36:03 +02:00
David Mudrak 9b5f1ad5fb Improved the moodle1_convert stashing subsystem 2011-05-12 18:18:29 +02:00
Andreas Grabs 74e3f2c67e MDL-26075 Sending Message through Feedback Component throws an error 2011-05-12 17:12:11 +02:00
David Mudrak beb7de3736 More backup-converter API improvements
Added write_xml() helper that writes the given tree-ish structure into
the current xml writer. Improved get_contextid() so that it can use
indices for searching data. Added set_stash() and get_stash() helper
methods.
2011-05-12 15:36:09 +02:00
Rossiani Wijaya e512715b89 MDL-27161: fixed optional setting for 'require grading' to prevent page lock out (head) 2011-05-12 17:32:00 +08:00
Tim Hunt dcd03928ab MDL-20636 split question/engine/lib.php into several smaller files. 2011-05-12 10:28:09 +01:00
Aparup Banerjee b38f0baad4 MDL-27386 lesson fix mform->score not saving (wip) 2011-05-12 16:00:18 +08:00
Eloy Lafuente (stronk7) 68fabb5c7e MDL-27481 profiling - prevent data to be sent to DB before it is available 2011-05-12 02:04:13 +02:00
Tim Hunt 25a03faaca MDL-20636 fix many code-checker issues in mod/quiz. 2011-05-12 00:30:25 +01:00
Tim Hunt cfd811c8eb MDL-20636 fix upgrade issue. 2011-05-11 22:29:55 +01:00
Tim Hunt a2ac234956 MDL-20636 Merge remote-tracking branch 'moodle/master' into upgrade
Conflicts:
	lib/filestorage/file_storage.php
	mod/quiz/attemptlib.php
	mod/quiz/lib.php
	mod/quiz/mod_form.php
	mod/quiz/report/overview/overview_table.php
	mod/quiz/report/overview/report.php
	mod/quiz/report/responses/report.php
	mod/quiz/report/responses/responses_table.php
	mod/quiz/report/statistics/db/install.xml
	mod/quiz/report/statistics/qstats.php
	mod/quiz/report/statistics/report.php
	mod/quiz/report/statistics/statistics_question_table.php
	mod/quiz/report/statistics/statistics_table.php
	mod/quiz/report/statistics/version.php
	mod/quiz/review.php
	mod/quiz/reviewquestion.php
	mod/quiz/startattempt.php
	mod/quiz/styles.css
	mod/quiz/view.php
	question/type/essay/questiontype.php
	question/type/match/backup/moodle2/backup_qtype_match_plugin.class.php
	question/type/match/backup/moodle2/restore_qtype_match_plugin.class.php
	question/type/numerical/display.html
	question/type/numerical/questiontype.php
	question/type/questiontype.php
	question/type/random/questiontype.php
	question/type/shortanswer/questiontype.php
	theme/base/style/question.css
2011-05-11 20:29:49 +01:00
Eloy Lafuente (stronk7) 8298bedab7 MDL-27475 backup - fix start/end notifications order + tests 2011-05-11 20:01:13 +02:00
Tim Hunt fca599a683 MDL-20636 Question engine upgrade unit tests for description, essay, match and numerical. 2011-05-11 18:17:11 +01:00
Tim Hunt d04626e4cd MDL-20636 Question engine upgrade unit tests for shortanswer, random and multichoice. 2011-05-11 17:19:12 +01:00
Tim Hunt 38d42fc476 MDL-27408 question engine upgrade, change to update the quiz settings in config_plugins.
Also start creating the unit tests for the upgrade.
2011-05-11 15:32:29 +01:00
Tim Hunt cd300cf34c MDL-20636 Initial pass at converting this code to Moodle 2.0 style. 2011-05-11 15:32:26 +01:00
Tim Hunt cca6d63252 MDL-20636 Refactor the various list pages a bit. 2011-05-11 15:32:24 +01:00
Tim Hunt 5ab62d9d3d MDL-20636 listpreupgrade done. 2011-05-11 15:32:22 +01:00
Tim Hunt 22cd62caa9 MDL-20636 Cleanup in the upgradehelper plugin. 2011-05-11 15:32:20 +01:00
Tim Hunt 92dcdc88df MDL-20636 Implement lots of the post-upgrade functionality for the upgrade helper plugin. 2011-05-11 15:32:18 +01:00
Tim Hunt d98389ffed MDL-20636 Start of work on a local plugin to help with the question engine upgrade on large sites. 2011-05-11 15:32:16 +01:00
Tim Hunt 0859ff6503 MDL-20636 Re-organise all the old upgrade code, before I start work on it for real. 2011-05-11 15:32:14 +01:00
Dean Lennard 0de4393945 MDL-20636 moved header creation into seperate funciton 2011-05-11 15:04:19 +01:00
Dean Lennard 8e8bd3f967 MDL-20636 Changed renderer function scopes so they can be overridden. 2011-05-11 15:04:13 +01:00
Dean Lennard 2c3e2b53e6 MDL-20636 Added phpDoc comments 2011-05-11 15:04:07 +01:00
Eloy Lafuente (stronk7) de584990c6 weekly release 2.1dev 2011-05-11 15:12:20 +02:00
Andrew Davis (andyjdavis) 6ac149dce3 MDL-27387 rating: prevent the submission of ratings outside of the range allowed by the current scale 2011-05-11 11:29:31 +08:00
David Mudrak a5fe591280 MDL-27376 MDL-27377 MDL-27378 Backup converters refactoring - still work in progress
This patch mainly adds support for dispatching path-start and path-end events,
defines API to access backup_ids_temp table. Some ideas emailed by Mark
after his first review of the code are incorporated already.
2011-05-11 03:28:39 +02:00
David Mudrak 1e2c735111 MDL-27376 MDL-27377 MDL-27378 Backup converters refactoring - work in progress
These are David's changes of Mark's code that replace the
plan/tasks/steps infrastructure with a bit simpler one. The changes will
be described in the next commit that will actually finish the
conversion.

TODO: refactor backup/converter/moodle1/stepslib.php into conversion
handlers.
2011-05-10 17:58:00 +02:00
David Mudrak 0164592b8c MDL-27376 MDL-27377 Backup converters API refactored
* Several base_converter methods made protected when there was no obvious
reason why they should be public (subject of eventual change still).
* The conversion chain now constructed in advance before any converter
class is instantiated, using Dijkstra's algorithm.
2011-05-10 17:57:59 +02:00
David Mudrak e48477d94f MDL-22414 Fixed standard copyright file headers (R0417) 2011-05-10 17:57:59 +02:00
Eloy Lafuente (stronk7) 5b01180aed Apply parser processor new methods + observe $CFG->keeptempdirectoriesonbackup 2011-05-10 17:57:58 +02:00
Mark Nielsen be85390109 Adding moodle_backup.xml generation and updating course structure step 2011-05-10 17:57:58 +02:00
Mark Nielsen 8e2c53665e Adding basic block instance conversion 2011-05-10 17:57:58 +02:00
Mark Nielsen 5aee1af3f1 Adding plugin abstract class and adding a step to activities to generate their module.xml 2011-05-10 17:57:57 +02:00
Mark Nielsen 7c9d2927b8 Cleanup from last commit, just wanted prototype code to be saved to VCS 2011-05-10 17:57:57 +02:00
Mark Nielsen 72c089f117 Adding in activity support and adding base forum classes as proof of concept 2011-05-10 17:57:57 +02:00
Mark Nielsen 534d4294a4 Section conversion 2011-05-10 17:57:57 +02:00
Mark Nielsen 30a4a49421 Figured out how to get the final task to work properly 2011-05-10 17:57:56 +02:00
Mark Nielsen 7125544864 Adding to moodle1 abstract structured step 2011-05-10 17:57:56 +02:00
Mark Nielsen d2c32ec8a1 A start at a moodle1 abstract structured step 2011-05-10 17:57:56 +02:00
Mark Nielsen be145927c5 Creating stepslib.php and taskslib.php 2011-05-10 17:57:55 +02:00
Mark Nielsen 56bd1ab0e1 Added use of get_contextid and fixed some problems 2011-05-10 17:57:55 +02:00
Philip Cali a656fcb387 Adding the convert_file function to the file manager. 2011-05-10 17:57:55 +02:00
Mark Nielsen 62c5daf122 Adding doc block todos 2011-05-10 17:57:55 +02:00
Mark Nielsen 6c0235b375 Adding doc block 2011-05-10 17:57:54 +02:00
Mark Nielsen e10e887905 Might make it faster... 2011-05-10 17:57:54 +02:00
Mark Nielsen eba6af755c Re-arranging function definition 2011-05-10 17:57:53 +02:00
Philip Cali 142ec51fcd Added contextid generation... I think. 2011-05-10 17:57:53 +02:00
Mark Nielsen 970bc1f3e0 Adding root and final tasks 2011-05-10 17:57:53 +02:00
Mark Nielsen bb2e1609c5 Full example implementation of the convert course step 2011-05-10 17:57:53 +02:00
Philip Cali 5c10f37b8a Adding vanilla 1.9 moodle.xml for unit testing. 2011-05-10 17:57:52 +02:00
Mark Nielsen dda19810e0 Starting to unit test - fixed bugs, things are... working!?! 2011-05-10 17:57:52 +02:00
Mark Nielsen 653bc98b0e Fixing several bugs while actually trying to execute some of the code 2011-05-10 17:57:52 +02:00
Mark Nielsen 5af8804415 Moving converters into sub-directories so they can have other files and simpletest directories specific to them 2011-05-10 17:57:51 +02:00
Mark Nielsen 8450e2c41f Attempting to write up processing of the moodle.xml file - the converter collects all of the element paths to watch and then dispatches them to the convert_structure_step classes. 2011-05-10 17:57:51 +02:00
Mark Nielsen c5c8b3503a Making the conversion process more re-usable 2011-05-10 17:57:51 +02:00
Mark Nielsen 1e8c265c2b Added converter format detection and added conversion logic to restore controller 2011-05-10 17:57:50 +02:00
Mark Nielsen 7336701ff1 Minor fixes and added more methods 2011-05-10 17:57:50 +02:00
Mark Nielsen 17252e2d8a Adding some of the base classes and starting to fill out their methods/properties 2011-05-10 17:57:50 +02:00
Wale Olujide 3546187e63 MDL-20636 Fix for minor css issue for wip#372 2011-05-10 11:45:08 +01:00
Andrew Davis (andyjdavis) 017c440bb4 MDL-27460 roles: now closing a record set that wasnt being closed 2011-05-10 17:01:08 +08:00
Andrew Davis (andyjdavis) 19c5532b5d MDL-26436 message: reviewed use of recordsets in messaging 2011-05-10 16:37:06 +08:00
Andrew Davis (andyjdavis) 4433f871f2 MDL-26704 gradebook: added some intelligence to the dates displayed on the user outline activity report 2011-05-10 11:14:16 +08:00
Sam Hemelryk a0fcf81265 Merge branch 'MDL-27140_master' of git://github.com/stronk7/moodle 2011-05-10 09:45:40 +08:00
Eloy Lafuente (stronk7) 162bbbe2f4 MDL-27140 weeks course format - incorrect roll of dates on hidden sections
Credit goes to Nikhil Gupta, big thanks!
2011-05-09 18:15:10 +02:00
Eloy Lafuente (stronk7) 36da956322 Merge branch 'MDL-27401-master' of git://github.com/sammarshallou/moodle 2011-05-09 17:46:22 +02:00
Tim Hunt 78a61cd6d0 MDL-20636 quiz renderers. Some final clean-ups. 2011-05-09 14:22:20 +01:00
Dean Lennard 7933ab8c67 MDL-20636 Code Checked 2011-05-09 12:31:13 +01:00
Dean Lennard 37015e0cd1 MDL-20636 Convverted html to html::writer and code checked 2011-05-09 12:31:11 +01:00
Dean Lennard 88c7e2a9b6 MDL-20636 Changed guest access and enrollment code checking 2011-05-09 12:31:09 +01:00
Dean Lennard 56cef201da MDL-20636 Created view object in renderer file 2011-05-09 12:31:07 +01:00
Dean Lennard 3b7efd6d8f MDL-20636 Added viuew object as class 2011-05-09 12:31:05 +01:00
Dean Lennard fcd5e24506 MDL-20636 Code checked 2011-05-09 12:31:03 +01:00
Dean Lennard da59992eda MDL-20636 Made changes to view and renderer sections 2011-05-09 12:31:01 +01:00
Dean Lennard 8d47043fee MDL-20636 updates to code 2011-05-09 12:30:59 +01:00
Dean Lennard cbe8754358 MDL-20636 code checked 2011-05-09 12:30:57 +01:00
Dean Lennard 7886376a12 MDL-20636 changed accessrules to return the button instead of eco it and applied this change to render file 2011-05-09 12:30:55 +01:00
Dean Lennard 213d4cff9c MDL-20636 updates to view/renderer code 2011-05-09 12:30:53 +01:00
Dean Lennard 06eb64b8ba MDL-20636 added view page to the renderer file 2011-05-09 12:30:51 +01:00
Dean Lennard 13040e1452 MDL-20636 changes made to renderers, attempt and view 2011-05-09 12:30:49 +01:00
Dean Lennard 63be47d932 MDL-20636 Made changes to the three files and code checked 2011-05-09 12:30:47 +01:00
Dean Lennard bcd42560e3 MDL-20636 Updated code to include html writer 2011-05-09 12:30:45 +01:00
Dean Lennard 9f335e76fa MDL-20636 Fixed issues raised 2011-05-09 12:30:43 +01:00
Dean Lennard 606e07d574 MDL-20636 Attempt as converting attempt.php over to renderer 2011-05-09 12:30:41 +01:00
Tim Hunt b3782c71bf MDL-20636 My go and creating a renderer for mod/quiz/review.php.
Note that this breaks the attempt.php page; there are a lot of methods that are missing PHPdoc comment; there are probably now some unused methods that could be deleted; and there are a couple of places which could be handled a bit better.

But, overall, I think this way makes sense.
2011-05-09 12:30:39 +01:00
sam marshall 0367953eaf MDL-27401 Unit test errors in lib/simpletest/testpagelib_moodlepage.php 2011-05-09 11:15:55 +01:00
Andreas Grabs 439ae873af MDL-27422 The excel export fails in some conditions. 2011-05-09 17:27:06 +08:00
Sam Hemelryk 8f25ae26db Merge branch 'MDL-27325_master' of git://github.com/stronk7/moodle 2011-05-09 10:35:31 +08:00
Sam Hemelryk 644b14c552 Merge branch 'MDL-27367-HEAD' of git://github.com/srynot4sale/moodle 2011-05-09 10:20:15 +08:00
Eloy Lafuente (stronk7) 91a7cd842d Merge branch 'wip-MDL-27400-master' of git://github.com/samhemelryk/moodle 2011-05-09 02:04:34 +02:00
Eloy Lafuente (stronk7) a8f60a4d58 Merge branch 'MDL-27317-variable-name-typos' of git://github.com/mudrd8mz/moodle 2011-05-09 01:58:38 +02:00
Eloy Lafuente (stronk7) d1380a3c9a Merge branch 'MDL-27372' of git://github.com/nebgor/moodle 2011-05-09 01:54:46 +02:00
Eloy Lafuente (stronk7) 3c1ee10423 Merge branch 'MDL-27391-master' of git://github.com/sammarshallou/moodle 2011-05-09 00:58:55 +02:00
David Mudrak 52deafc143 MDL-27317 Fixed incorrect variable names in the language pack update
This was introduced by copying & pasting the code during 74a4c9.
2011-05-06 23:38:02 +02:00
Eloy Lafuente (stronk7) 86f456d8f0 MDL-27325 Adding some extreme, but 32bits safe, float tests 2011-05-06 16:07:17 +02:00
Eloy Lafuente (stronk7) 0c4c6d468a MDL-27325 Now also testing update_record and set_field 2011-05-06 16:07:17 +02:00
Eloy Lafuente (stronk7) 7aa9e45f56 MDL-27325 mysql: Avoid some implicit casting from float to varchar/text 2011-05-06 16:07:17 +02:00
Tim Hunt 6531aff715 MDL-27325 New DB unit tests to demonstrate the problem. 2011-05-06 16:07:17 +02:00
Eloy Lafuente (stronk7) 804ebc77b8 weekly release 2.1dev (emergency) 2011-05-06 14:44:46 +02:00
Sam Hemelryk faca4f2f29 MDL-27400 Fixed up typo in blocklib.php 2011-05-06 16:27:15 +08:00
Tim Hunt c749527bec MDL-20636 Finished backup and restore of attempt data. Yay 2011-05-05 21:26:25 +01:00
Tim Hunt 3b3d5e799d MDL-20636 Fix 2 essay issues. Wrong file area name and broken backup/restore. 2011-05-05 21:23:41 +01:00
Eloy Lafuente (stronk7) 327c24beea Merge branch 'MDL-27394_master' of git://github.com/timhunt/moodle 2011-05-05 22:00:58 +02:00
Tim Hunt 7bbe96dc16 MDL-27394 Moodle 2.0 backup and restore may randomise the order of multichoice/numerical/shortanswer answers 2011-05-05 19:17:41 +01:00
Tim Hunt 9e06daf251 MDL-27394 Moodle 2.0 backup and restore may randomise the order of multichoice/numerical/shortanswer answers 2011-05-05 18:53:43 +01:00
sam marshall 1cec45f1c0 MDL-26778 Completion unit tests broken by earlier change 2011-05-05 12:10:27 +01:00
Aparup Banerjee fce7424beb MDL-27372 moved blog comments to end of body of blog entry. we now see the entire blog entry without comments in the way. 2011-05-05 15:27:38 +08:00
Sam Hemelryk a02f87a838 Merge branch 's9_MDL-27382_dropbox_get_file_fix_master' of github.com:dongsheng/moodle 2011-05-05 13:25:36 +08:00
Sam Hemelryk 74704aab26 Merge branch 's9_MDL-27381_overwrite_dialog_safari_master' of github.com:dongsheng/moodle 2011-05-05 13:22:15 +08:00
Sam Hemelryk d6e0313e86 Merge branch 's9_MDL-26854_spam_comments_master_2' of git://github.com/dongsheng/moodle 2011-05-05 11:44:49 +08:00
Dongsheng Cai 480fe33538 MDL-26854 Added comments block lib.php, it contains comments callbacks 2011-05-05 11:22:39 +08:00
Sam Hemelryk d045b479f4 Merge branch 's9_MDL-26854_spam_comments_master_2' of git://github.com/dongsheng/moodle 2011-05-05 10:41:53 +08:00
Dongsheng Cai 1448c5952f MDL-27381 fixed 'overwrite files' dialog zindex in safari 2011-05-05 10:41:02 +08:00
Sam Hemelryk 2c82d0eeb0 Merge branch 'MDL-26838_ratings_bad_data_master4' of git://github.com/andyjdavis/moodle 2011-05-05 10:18:39 +08:00
Dongsheng Cai 991aa8ab57 MDL-27382 repository dropbox plugin, fixed bug of
file downloading path
2011-05-05 09:58:49 +08:00
Eloy Lafuente (stronk7) 156816d0b5 weekly release 2.1dev 2011-05-05 00:35:40 +02:00
Eloy Lafuente (stronk7) dd0ac53d7a Merge branch 'MDL-25594-HEAD' of git://github.com/srynot4sale/moodle 2011-05-04 16:08:59 +02:00
Sam Hemelryk 280b1b21c0 Merge branch 'MDL-26250-final6' of github.com:mouneyrac/moodle 2011-05-04 18:04:10 +08:00
Dongsheng Cai c1951ea953 MDL-26854 COMMENT
1. added pluginname_comment_validate callback to comments api
2. change permission callback defaults to false
3. Tidied up serveal areas of comments and implemented callback to
ignore system permissions for view (credits to Sam Hemelryk)

AMOS BEGIN
    MOV [modulerejectcomment,error],[callbackrejectcomment,error]
AMOS END
2011-05-04 17:23:46 +08:00
Eloy Lafuente (stronk7) 5f0ac7652b Merge branch 'MDL-26788_head' of git://github.com/rwijaya/moodle 2011-05-04 11:18:22 +02:00
Dongsheng Cai 99b15d4438 MDL-26388 Recent repository plugin should return draft url 2011-05-04 17:03:19 +08:00
Dongsheng Cai 6e7b113da9 MDL-26388 Recent repository plugin should return draft url 2011-05-04 15:46:15 +08:00
Andrew Davis (andyjdavis) 778361c330 MDL-26838 rating: multiple fixes after a review of rating validation code 2011-05-04 15:43:30 +08:00
Sam Hemelryk f4c7c735f5 Merge branch 's10_MDL-27330_dropbox_authorization_url_master' of github.com:dongsheng/moodle 2011-05-04 13:53:47 +08:00
Jerome Mouneyrac 543967a9e8 MDL-26250 Create a web service function that enrols users to a certain course 2011-05-04 12:23:18 +08:00
Aaron Barnes e874292134 MDL-25594 completion: Remove unused column from query
Which is also a reserved word.
2011-05-04 13:02:28 +12:00
Aaron Barnes 0e5e1daaee MDL-26190 completion blocks: Completion blocks shouldn't ever be blank 2011-05-04 12:55:26 +12:00
Tim Hunt d6522c33a1 MDL-20636 Fix qtype backup issues. 2011-05-03 17:53:12 +01:00
stabijoh f26500d477 MDL-25477 fix for Anomoly theme doesn't display bullets for unordered lists in descriptions or labels 2011-05-03 07:03:06 -04:00
Dongsheng Cai 810aea11df MDL-27330 repository dropbox plugin
Dropbox changed authorization URL, and added a few error check code
2011-05-03 17:41:03 +08:00
Sam Hemelryk c8ad2c12ba Merged MDL-26388 Fixed whitespace 2011-05-03 16:27:31 +08:00
Sam Hemelryk 870815faed Merged MDL-25805 Renamed property and function to be a little more descriptive 2011-05-03 15:41:34 +08:00
Aaron Barnes 5227344a07 MDL-26628 completion report: Fix hard coded strings in Completion report 2011-05-03 11:24:41 +08:00
Sam Hemelryk 5f1c825dfa Merged MDL-27251 Fixed up whitespace, Fixed broken string, reworded new strings 2011-05-03 10:51:06 +08:00
Eloy Lafuente (stronk7) bff0e85d37 Merge branch 'MDL-25840' of git://github.com/nebgor/moodle 2011-05-03 01:08:00 +02:00
Eloy Lafuente (stronk7) 069e955519 Merge branch 'MDL-27293-customlang-timeout' of git://github.com/mudrd8mz/moodle 2011-05-02 16:14:05 +02:00
Aparup Banerjee b9bcad24db MDL-25805 Roles propagated ugly hack for parent seeing child activities into navigation lib to display nav node. 2011-05-02 20:08:08 +08:00
Eloy Lafuente (stronk7) c0977cccd1 Merge branch 'MDL-26714_master' of git://github.com/timhunt/moodle 2011-05-02 11:46:10 +02:00
Sam Hemelryk fa49d24312 Merged changes and fixed whitespace issues for MDL-23188 2011-05-02 14:43:24 +08:00
Sam Hemelryk c0ceb0bab3 Merge branch 'MDL-26955-themedir-plugindirectory' of git://github.com/mudrd8mz/moodle 2011-05-02 14:21:16 +08:00
Sam Hemelryk 0af90dca01 Merge branch 'MDL-27116-themedir-config' of git://github.com/mudrd8mz/moodle 2011-05-02 14:16:13 +08:00
Sam Hemelryk 598a9f7726 Merge branch 'MDL-27155_master' of git://github.com/timhunt/moodle 2011-05-02 14:03:36 +08:00
Sam Hemelryk 290a5db67e Merge branch 'MDL-27246-cutomlang-version' of git://github.com/mudrd8mz/moodle 2011-05-02 12:11:23 +08:00
Dongsheng Cai f392caba15 MDL-26388, pop up a dialog when attaching a file already being used in draft area. 2011-05-02 10:11:19 +08:00
Tim Hunt d8a3b87c0e MDL-27340 tablelib.php fix a notice when is false. 2011-05-01 17:36:19 +01:00
Andrew Davis (andyjdavis) 2c2ff8d5fc MDL-26838 rating: remove logged in users ability to sidestep rating validity checks 2011-05-01 18:50:13 +08:00
Mary Evans 041cfef9f7 MDL-22833 adding Afterburner theme to Moodle CORE 2011-05-01 03:10:11 +01:00
Tim Hunt 64d5c1c376 MDL-27155 qtype_numerical problem with GIFT import. 2011-04-29 14:14:55 +01:00
stabijoh 5fe87e7d44 MDL-27118 Text in a highlighted topic box is white on white in the Leatherbound theme. 2011-04-29 07:40:53 -04:00
Rossiani Wijaya f672e3e920 MDL-26788 - grading in lesson containing essays (head) 2011-04-29 18:20:19 +08:00
Tim Hunt 4c51e56d98 MDL-26714 qtype_multianswer regression from the previous commit for numerical subquestions. 2011-04-28 23:31:07 +01:00
Tim Hunt bea1a6a73a MDL-20636 Work-in-progress on quiz attempt backup and restore. 2011-04-28 21:21:43 +01:00
Tim Hunt d1de533164 MDL-20636 qtype_numerical oops, I deleted a function from the wrong place. Fix. 2011-04-28 20:22:45 +01:00
Tim Hunt 5073fb743f MDL-20636 qtype_numerical multi-choice units now work, I think. 2011-04-28 20:06:51 +01:00
Tim Hunt ae3e2e6e7f MDL-20636 qtype_numerical Fix a bunch of minor issues found by Pierre. 2011-04-28 20:06:49 +01:00
Tim Hunt 5d2465c3f4 MDL-20636 numerical qtype: assorted changes
1. database upgrade to merge instructions into the questiontext field,
and remove the UNITDISPLAY option.

2. Changes to the validation in deferred feedback mode, so students
are warned about incomplete answers.

3. Using this to wark students if they enter an answer that is not
recognised as a number.
2011-04-28 20:06:47 +01:00
Tim Hunt 52ad7e0c1b MDL-20636 Tidy-up of numerical questiontype.php. 2011-04-28 20:06:45 +01:00
Tim Hunt d7d8cee279 MDL-20636 Finish implementing answer processing. 2011-04-28 20:06:43 +01:00
Tim Hunt b3c9da2f0a MDL-20636 I think I have now find a reliable way to parse responses. 2011-04-28 20:06:41 +01:00
Tim Hunt 544de1c035 MDL-20636 Lots of work on numerical answer matching.
Still more to do. Not all the unit tests pass at the moment.
2011-04-28 20:06:39 +01:00
Tim Hunt 91d431240f MDL-20636 Better way of handling the creation of test questions for different question types. 2011-04-28 20:06:37 +01:00
Tim Hunt fdd015b779 MDL-20636 Fix some minor editing problems, and a bunch of coding style. 2011-04-28 20:06:35 +01:00
Tim Hunt 1fa3936440 MDL-20636 Fix the numerical qtype editing form. 2011-04-28 20:06:33 +01:00
Tim Hunt 397bd29549 MDL-20636 Fix qtype_numerical get_question_options. 2011-04-28 20:06:31 +01:00
Tim Hunt 0ff173d3f2 MDL-20636 Fix numerical unit tests. 2011-04-28 20:06:29 +01:00
Tim Hunt 50c0296698 MDL-26724 notice from numerical qtype when no answer is given. 2011-04-28 20:06:27 +01:00
ppichet 062f7e95c9 MDL-26445 question -fix numerical unit grade
fix unit penalty grading and display

Signed-off-by: ppichet <pichet.pierre@uqam.ca>
2011-04-28 20:06:25 +01:00
Tim Hunt f77f47ec56 MDL-20636 Start converting the numerical question type. 2011-04-28 20:06:24 +01:00
stabijoh b00982db34 MDL-23188 Implement custom menu where possible in core themes, serenity and anomaly 2011-04-27 08:38:15 -04:00
David Mudrak 3dd1d7e701 MDL-27116 theme_config::find_theme_location() respects $CFG->themedir
Credit goes to Jai Gupta for the idea of the patch.
2011-04-27 14:09:08 +02:00
David Mudrak 546b4bf59d MDL-26955 get_plugin_directory() respects $CFG->themedir
If $CFG->themedir is set (it is not usually) and the given theme is not
found in the standard location, then it is expected to be in the custom
$CFG->themedir directory.

Credit goes to Urs Hunkler for the idea of the patch.
2011-04-27 14:09:02 +02:00
David Mudrak 8ae076ae26 MDL-27293 report customlang has extra execution time and displays a progress bar during the checkout
Initial checkout of strings into the translator table may take a long time. The
maximum execution time is increased to one hour and a progress bar is
displayed so the user is informed on what is going on.
2011-04-27 14:08:48 +02:00
David Mudrak c2c9bc3b7a MDL-27246 customlang report stores the versions in a char field rather than integer 2011-04-27 14:08:22 +02:00
Petr Skoda b8df9414bd weekly release 2.1dev 2011-04-27 12:09:15 +02:00
Petr Skoda e0dd7cb005 MDL-23532 fix missing include 2011-04-27 08:56:12 +02:00
Aparup Banerjee 20b503841b MDL-25840 blog - fixed broken image file image attachment display 2011-04-27 11:39:01 +08:00
Aparup Banerjee 60b5a2fec7 MDL-27251 Files API - added timeout re-calculation as an optional argument. added setting for minimum Kbps for large files fetched from internet where the passed in timeout maybe too low.
allowed turning off the http HEAD request timeout calculation with zero (or negative) bitrate

	This was added in to allow servers that have a problem with
	HEAD requests to carry on with the given timeout without re-calculations.
	See PULL-651 for the discussion.

	the optional argument to force recalculation of timeout has been forced within scorm/locallib.php

	timeout re-calculation only increments timeout.
2011-04-27 10:49:40 +08:00
Eloy Lafuente (stronk7) b90b28e2cb Merge branch 'w17_MDL-26249_m21_usercourses' of git://github.com/skodak/moodle 2011-04-26 11:33:46 +02:00
Eloy Lafuente (stronk7) 0cd053b40b Merge branch 'w17_MDL-27253_m21_swfsize' of git://github.com/skodak/moodle 2011-04-26 11:08:05 +02:00
Eloy Lafuente (stronk7) 0540e39af9 Merge branch 'w17_MDL-27263_m21_loggedintypo' of git://github.com/skodak/moodle 2011-04-26 11:04:39 +02:00
Petr Skoda 039d221e49 Merge branch 'wip-MDL-26770-master' of git://github.com/samhemelryk/moodle 2011-04-25 17:51:41 +02:00
Petr Skoda 6bc62c4486 Merge branch 'wip-MDL-23532-master' of git://github.com/samhemelryk/moodle 2011-04-25 17:50:01 +02:00
Petr Skoda 3364dbb5a4 MDL-26249 external enrol functions: get list of courses user is enrolled in 2011-04-25 10:53:29 +02:00
Tim Hunt f902a54e5a MDL-20636 Fix method scope. 2011-04-23 12:57:02 +01:00
Tim Hunt d2c69d9373 MDL-20636 Fix query so that it works on MySQL. 2011-04-23 12:56:47 +01:00
Petr Skoda 7774aca0fb MDL-27253 add default swf size and allow #d=100x50 URL resizing in mod/url 2011-04-21 20:35:48 +02:00
Petr Skoda 3c2fffbaa7 MDL-27263 fix already logged in error message typo 2011-04-21 20:35:16 +02:00
Sam Hemelryk 75ee207b81 MDL-26770 enrol - Added support for bulk operations by enrol plugins 2011-04-21 10:13:13 +08:00
Sam Hemelryk 884faffda3 MDL-23532 enrol - fixed up SQL indenting and added missing sesskey calls that were removed after refactoring 2011-04-21 10:02:55 +08:00
Sam Hemelryk d4c98cffa8 MDL-23532 enrol - rebased after latest weekly and split new UI components out to the manual plugin 2011-04-21 10:02:55 +08:00
Sam Hemelryk 12a52d7c6e MDL-23532 enrol - removed general handling of user enrolment editing/unenrolment plugins are now responsible for this 2011-04-21 10:02:55 +08:00
Sam Hemelryk 8c6e0ebebb MDL-23532 enrol-self - Self enrolments now manages its own enrolment editing and unenrolment 2011-04-21 10:02:55 +08:00
Sam Hemelryk 24a0c1ea66 MDL-23532 enrol-manual - manual enrolments now manages its own enrolment editing and unenrolment 2011-04-21 10:02:55 +08:00
Sam Hemelryk 291215f441 MDL-23532 enrol - abstracted user enrolment action icons to the enrolment plugin class 2011-04-21 10:02:54 +08:00
Sam Hemelryk 410135aa10 MDL-23532 theme-base - added base styles for the changes to tne enrolment UI 2011-04-21 10:02:54 +08:00
Sam Hemelryk 076995bf91 MDL-23532 enrol - fixed regressions after latest weekly and improved moodle_page handling 2011-04-21 10:02:54 +08:00
Sam Hemelryk cf855c0b7a MDL-23532 enrol - separated AJAX functions from enrol/ajax.php to their respective enrol plugins 2011-04-21 10:02:54 +08:00
Sam Hemelryk b69ca6bee4 MDL-23532 enrol - moved UI enrolment components from core enrol to their respective enrolment plugins 2011-04-21 10:02:54 +08:00
stabijoh 6e405dafde MDL-27252 themes - fix for nonzero current section highlighting 2011-04-20 12:54:45 -04:00
Eloy Lafuente (stronk7) 4452ed6f17 weekly release 2.1dev 2011-04-20 13:35:08 +02:00
Eloy Lafuente (stronk7) 329b79139e Fix permissions 2011-04-20 11:08:21 +02:00
Aparup Banerjee eb183fe469 MDL-26580 adding precautionary upgrade_set_timeout() calls to some loops which may timeout in very edge cases 2011-04-19 17:52:35 +08:00
Aparup Banerjee f5fa4c0e02 MDL-26580 adding some upgrade_set_timeout() calls to 2010080901 upgrade block, upgrades on questions were timing out 2011-04-19 17:38:54 +08:00
Sam Hemelryk 4d8bd3f570 Merged with small fix branch MDL-26516_head from git://github.com/rwijaya/moodle.git 2011-04-19 16:25:40 +08:00
John Stabinger 572427d2f8 Fixes for MDL-27138, add correct page headers and footer 2011-04-19 11:06:54 +08:00
Sam Hemelryk d1d087991f MDL-26835 Fixed up styles being used for suspended users in the grader report. 2011-04-19 10:42:49 +08:00
Sam Hemelryk 9146566c65 Merged with conflict resolution branch MDL-26835_MASTER_grader_highlight_suspended_users from git://github.com/andyjdavis/moodle.git 2011-04-19 10:35:50 +08:00
Sam Hemelryk fc3e922e65 MDL-25999 Fixed URL bug with admin bookmark changes 2011-04-19 10:22:46 +08:00
Sam Hemelryk d0542700f5 Merge branch 'MDL-25999_head' of git://github.com/rwijaya/moodle 2011-04-19 10:16:39 +08:00
Rossiani Wijaya f4700b91c1 MDL-26516: fix calendar event type (user overides)- master 2011-04-18 18:27:10 +08:00
Eloy Lafuente (stronk7) f50a61fb47 MDL-26167 lib/form: minor coding tweaks 2011-04-18 11:42:27 +02:00
Rossiani Wijaya 53758125dc MDL-25999: update Admin Bookmarks block to work properly in head 2011-04-18 17:31:35 +08:00
Eloy Lafuente (stronk7) ff6b4cdb6d Merge branch 'MDL-26167-master' of git://github.com/agwells/moodle 2011-04-18 11:09:38 +02:00
Eloy Lafuente (stronk7) e62ea95dfc Merge branch 'w16_MDL-17344_m21_uploadprof' of git://github.com/skodak/moodle 2011-04-18 11:02:09 +02:00
Andrew Davis (andyjdavis) 3aafffc043 MDL-26835 gradebook: grader report now marks suspended students 2011-04-18 14:29:13 +08:00
Sam Hemelryk 5d53a674b7 MDL-26958 theme-base Removed border color CSS 2011-04-18 10:54:12 +08:00
Mary Evans 1559583ce3 MDL-26958 Core Themes:adding css patch to base theme so hidden elements are dimmed
This patch also fixes MDL-27160 - the same bug which affects many CORE themes like Binarus and Nonzeo. This patch also a small element of a patch supplied by Thomas Lake in Tracker MDL-26958 (most of which already exists in Base theme).
2011-04-18 10:49:07 +08:00
Andrew Davis (andyjdavis) 4f82032a16 MDL-27153 gradebook - fixed an SQL error in grade export 2011-04-18 02:04:57 +02:00
Eloy Lafuente (stronk7) 20d8d5c799 MDL-27148 whitespace fix 2011-04-18 01:38:41 +02:00
Eloy Lafuente (stronk7) 97fefd2386 Merge branch 'w16_MDL-27148_m21_stringinc' of git://github.com/skodak/moodle 2011-04-18 01:15:56 +02:00
Eloy Lafuente (stronk7) dd92611ec5 Merge branch 'w16_MDL-27217_m21_tinyset' of git://github.com/skodak/moodle 2011-04-18 01:10:29 +02:00
Eloy Lafuente (stronk7) 47f89dc8a6 Merge branch 'w16_MDL-27220_m21_tagprofile' of git://github.com/skodak/moodle 2011-04-18 01:02:23 +02:00
Petr Skoda af4378aee9 Merge branch 'master_MDL-26880_SCORM2004_tracking_fix' of git://github.com/danmarsden/moodle 2011-04-17 17:16:03 +02:00
Petr Skoda 13516b7c1f Merge branch 'master_MDL-24734_gradefix' of git://github.com/danmarsden/moodle 2011-04-17 17:09:05 +02:00
Petr Skoda 6b7fb33661 Merge branch 'master_MDL-18392_slash_cleanup' of git://github.com/danmarsden/moodle 2011-04-17 17:02:15 +02:00
Petr Skoda e87ca54256 Merge branch 'MDL-27198-master' of git://github.com/sammarshallou/moodle 2011-04-17 16:37:54 +02:00
Petr Skoda c001225250 Merge branch 'MDL-22308_20' of git://git.catalyst.net.nz/moodle-r2 2011-04-17 16:30:41 +02:00
Petr Skoda c6423ea2de Merge branch 'wip-MDL-26013-master' of git://github.com/samhemelryk/moodle 2011-04-17 16:21:51 +02:00
Petr Skoda bdc782470b Merge branch 'wip-MDL-27145-master' of git://github.com/samhemelryk/moodle 2011-04-17 16:11:49 +02:00
Petr Skoda 3867494381 MDL-27123 fix coding style and add missing parameters in phpdocs 2011-04-17 16:06:19 +02:00
Petr Skoda 2b8747799e MDL-27217 use correct editor name in editor settings page
Credit goes to Franck Bellemain.
2011-04-17 11:18:49 +02:00
Petr Skoda da84c1491f MDL-27220 add missing tag lib include 2011-04-17 11:08:24 +02:00
Dan Marsden 4f4a8acf3b SCORM MDL-24734 - fix display of grade information on view.php page - also fixes some XHTML in the same function. 2011-04-16 19:34:04 +12:00
Aaron Wells 4b72f9eb78 MDL-26167 lib/form: Altering Javascript so that "disabledIf" will disable the "Choose" button for a filepicker 2011-04-15 09:59:46 +12:00
sam marshall 611684a8ec MDL-27198 Accessibility: For labels, completion/editing icons must appear after content 2011-04-14 17:31:14 +01:00
Petr Skoda cf717dc26b MDL-27148 use new get_in_or_equal() param prefix instead of start 2011-04-14 15:15:01 +02:00
Petr Skoda c49bec382c MDL-27148 fix unit tests to accept arbitrary named params format from get_in_or_equal 2011-04-14 15:12:33 +02:00
Petr Skoda 906c957b63 MDL-27148 use static counter instead of incrementing parameter name 2011-04-14 14:50:35 +02:00
John Beedell 7351b54e86 MDL-27123 adds a new admin_setting_configmultiselect_modules class
and uses it on the module security page. This saves one DB query per
page for users who can see the admin tree in the settings nav.
2011-04-14 12:25:41 +01:00
Petr Skoda 623966a396 MDL-17344 fix case and unicode related profile field issues in user upload
This fixes issue with uppercase and non-ascii profile fields and closes the iterator properly when field not found. Please note that profile fields with upper case letters must be specified exactly in CSV file headers. includes improved docs and parameter typo fix (credit for the parameter typo discovery goes to Aparup Banerjee)
2011-04-14 13:19:52 +02:00
Nadav Kavalerchik b41fc49c26 CSS MDL-26013 Fixed several display bugs when using right to left languages 2011-04-14 15:56:10 +08:00
Matteo Scaramuccia 74ef6bd82d PULL-498 - Fixed potential issues about UTF-8 and multilang filter by adopting pure ASCII chars, the SCO primary key 2011-04-14 10:28:36 +12:00
Matteo Scaramuccia 0ec0224b9a MDL-26880 - Fixed missing of activity id
Moved errorCode as global, to allow GetLastError() to work
Applied MDL-17891 mechanism against AJAX failures, "true if true, false otherwise"
Limited what added to log when in debug, to be compliant with mdl_log.action as VARCHAR(40)
2011-04-14 10:28:31 +12:00
Dan Marsden 4f6e39db5e Merge remote branch 'moodle/master' into master_MDL-18392_slash_cleanup 2011-04-14 09:15:48 +12:00
Petr Skoda 91787c37e1 weekly release 2.1dev 2011-04-13 22:09:33 +02:00
Petr Skoda 2c55034844 Merge branch 'MDL-24355_emergency_21' of git://github.com/stronk7/moodle 2011-04-13 16:48:38 +02:00
Eloy Lafuente (stronk7) 1c2cfff051 MDL-24355 tags - fix correlation sql to be cross-db 2011-04-13 16:31:09 +02:00
Petr Skoda fe0ccf0c79 Merge branch 'MDL-27053-dev-code-warning' of git://github.com/mudrd8mz/moodle 2011-04-13 15:23:33 +02:00
Petr Skoda 9015609696 Revert "MDL-25840 fixed image files link not rendered correctly when attached as file (instead of inline)."
The reason is failed testing. This reverts commit c9b0e31ff2.
2011-04-13 15:06:39 +02:00
David Mudrak a95682b2b3 MDL-27053 Code maturity info added to admin notifications page
The patch introduces a new string to be displayed at admin notifications
page. The maturity level message for upgrade/install reworded as
requested in the tracker.

The patch also adds a new core call to purge all caches at the beginning
of the upgrade. This must be done before the upgrade starts so that the
strings are re-fetched from the updated source and not from the on-disk
cache.
2011-04-13 15:03:25 +02:00
David Mudrak 1c5ab635b6 MDL-27053 Revert "MDL-26985 make sure admins do not upgrade to 2.1dev accidentally"
This reverts commit 9778dae374.
2011-04-13 14:08:32 +02:00
Dan Marsden 3825bed0e8 SCORM MDL-18392 - remove old call to stripslashes 2011-04-13 20:05:30 +12:00
Matteo Scaramuccia 454f5aeef6 SCORM MDL-18392 MDL-26282 - Fixed calls to add/strip slashes 2011-04-13 20:05:19 +12:00
Tim Hunt 6160bdb1f3 MDL-20636 Move question lang strings to the right place. 2011-04-12 15:20:29 +01:00
Petr Skoda 2293a504eb MDL-25718 fix incorrect 'no grade' test and improve coding style 2011-04-12 10:06:13 +02:00
Petr Skoda d2e360a95b Merge branch 'MDL-25718_recover_grades_master' of git://github.com/andyjdavis/moodle 2011-04-12 09:50:20 +02:00
Sam Hemelryk fec617dee5 form-dateselector MDL-27145 Fixed up error resulting from incorrectly required 'optional' argument on create event 2011-04-12 14:14:34 +08:00
Eloy Lafuente (stronk7) 9ff913b716 Merge branch 'MDL-26778-master' of git://github.com/sammarshallou/moodle 2011-04-11 17:48:29 +02:00
Eloy Lafuente (stronk7) 72e97b5880 Merge branch 'w15_MDL-26577_m21_groupscleanup' of git://github.com/skodak/moodle 2011-04-11 15:55:33 +02:00
Tim Hunt d0e25622bd MDL-20636 Two gradeboundary 0%s on the quiz editing form. One shoudl be a HTML editor. #392
This was a weird variable aliasing issue.
2011-04-11 14:40:04 +01:00
Eloy Lafuente (stronk7) af58cf7d40 Merge branch 'w15_MDL-26805_m21_userpol' of git://github.com/skodak/moodle 2011-04-11 15:15:40 +02:00
Petr Skoda 39de30aac2 Merge branch 'wip-MDL-27024' of git://github.com/samhemelryk/moodle 2011-04-11 14:14:02 +02:00
Petr Skoda 337d8b1489 Merge branch 'wip-MDL-26599' of git://github.com/samhemelryk/moodle 2011-04-11 14:09:15 +02:00
sam marshall 6553cda7c9 MDL-26778 Change to completion should immediately affect nav block
Includes change so that updating completion resets the cache, and a debugging
warning if any module calls the completion viewed thing after it's already
printed navigation (which will mean navigation obviously doesn't update right
away). All existing modules that currently update after printing navigation
were updated.
2011-04-11 12:40:13 +01:00
Petr Skoda de57ec3926 Merge branch 'MDL-25840' of git://github.com/nebgor/moodle 2011-04-11 13:31:45 +02:00
Petr Skoda 82053cb192 MDL-26805 cleanup default role selections
Frontpage role selection now allows only guest and frontpage roles. Default forntpage role is selected duuring install. Unused nodefaultuserrolelists option was removed completely. Coding style improvements.
2011-04-11 13:10:50 +02:00
Eloy Lafuente (stronk7) 920234498e Merge branch 's9_MDL-27098_filemanager_strings_master' of git://github.com/dongsheng/moodle 2011-04-11 11:18:23 +02:00
Dongsheng Cai 6d30723e41 MDL-27098
1. Fixed add file language string
2. Fixed hard-coded 'moving' string
3. Fixed hard-coded 'Files' string
2011-04-11 17:09:15 +08:00
Eloy Lafuente (stronk7) 43f8192a65 Merge branch 'w15_MDL-25826_m21_htmlpurifier' of git://github.com/skodak/moodle 2011-04-11 11:06:30 +02:00
Sam Hemelryk 2e79cd117a Merge branch 'MDL-25746' of git://github.com/nebgor/moodle 2011-04-11 15:35:03 +08:00
Aparup Banerjee 16265f06d1 MDL-25746 fixed db tempate page layout to prevent hidden content layers 2011-04-11 15:15:58 +08:00
Sam Hemelryk e1ce7c7e7b Merge branch 'MDL-26896' of git://github.com/stronk7/moodle 2011-04-11 14:48:01 +08:00
Sam Hemelryk 08c2633f12 Merge branch 'MDL-27034_xhprof_table_sql_master' of git://github.com/stronk7/moodle 2011-04-11 14:28:57 +08:00
Aparup Banerjee c9b0e31ff2 MDL-25840 fixed image files link not rendered correctly when attached as file (instead of inline). 2011-04-11 14:14:03 +08:00
Sam Hemelryk cf0050f92a Merge branch 'MDL-26185_master' of git://github.com/andyjdavis/moodle 2011-04-11 11:48:18 +08:00
Sam Hemelryk d59d34e9a7 Merge branch 'w15_MDL-27056_m21_maxmind' of git://github.com/skodak/moodle 2011-04-11 11:42:53 +08:00
Mary Evans c8b728139e MDL-27063 tt styled incorrectly in canvas theme 2011-04-11 11:39:30 +08:00
Sam Hemelryk 99f2cd5435 comment MDL-27024 Removed last check within comment.js for block_comment env 2011-04-11 10:31:13 +08:00
Sam Hemelryk 1c64a9cd58 comment MDL-27024 Fixed bug that arose when a comment section didnt require pagination but the JS still looked for pageination HTML in the page 2011-04-11 10:31:13 +08:00
Sam Hemelryk 93b86f6239 comment MDL-27024 Removed last reference to the comment block within the comment API and used the options properly 2011-04-11 10:31:13 +08:00
Sam Hemelryk d664d673a7 comment MDL-27024 Fixed up whitespace issues 2011-04-11 10:31:13 +08:00
Sam Hemelryk 116a48b133 comment MDL-27024 made notoggle and autoload into proper options to remove comment block conditions from comment API 2011-04-11 10:31:13 +08:00
Sam Hemelryk 8aab32297d comment MDL-27024 Cleaned up HTML output in comment class 2011-04-11 10:31:13 +08:00
Sam Hemelryk 2f181b8c83 comment MDL-27024 Cleaned up use of undefined property $this->link 2011-04-11 10:31:13 +08:00
Sam Hemelryk 65f2fad9a0 mod-lesson MDL-26599 Fixed echo causing incorrect nesting. 2011-04-11 10:16:35 +08:00
Eloy Lafuente (stronk7) 14e6710d99 MDL-26896 parser - add start/end path notifications 2011-04-11 02:16:58 +02:00
Eloy Lafuente (stronk7) b34324a73e Merge branch 'w15_MDL-27094_m21_assval' of git://github.com/skodak/moodle 2011-04-11 01:33:17 +02:00
Eloy Lafuente (stronk7) 11ea5b96a8 Merge branch 'w15_MDL-27007_m21_userupload' of git://github.com/skodak/moodle 2011-04-11 01:20:41 +02:00
Eloy Lafuente (stronk7) 90bf8b535b Merge branch 'w15_MDL-26910_m21_httpd' of git://github.com/skodak/moodle 2011-04-11 00:14:05 +02:00
Eloy Lafuente (stronk7) 12257f2c39 Merge branch 'w15_MDL-27121_m21_phpreq' of git://github.com/skodak/moodle 2011-04-10 23:54:21 +02:00
Eloy Lafuente (stronk7) fa81a03257 Merge branch 'MDL-26319' of git://github.com/nebgor/moodle 2011-04-10 23:51:26 +02:00
Eloy Lafuente (stronk7) b5f9a6d302 Merge branch 'mdl27084' of git://github.com/tlevi/moodle 2011-04-10 23:41:01 +02:00
Petr Skoda aa25e42ba2 MDL-27094 fix incorrect assignment form validation method name
Credit goes to H. Hanna
2011-04-10 21:03:02 +02:00
Petr Skoda b7e96b0ac0 MDL-27056 update location of GeoLite City file 2011-04-10 15:28:44 +02:00
Petr Skoda 4e3e8464b6 MDL-26910 add HTTPD server name whitelisting 2011-04-10 14:00:42 +02:00
Petr Skoda 998ced0805 MDL-26577 fix several groups and groupings issues
The current group in verified on each page which prevents problems when group settings are changed. The default group for course level is now using correct grouping id which solves problems when activity and course are using different grouping. The grouping is now displayed in group selector if user has access to all groups.
2011-04-10 13:31:17 +02:00
Petr Skoda 1c71748dd1 MDL-27121 fix incorrect check_moodle_environment() version parameter
This prevents Moodle 2.0 from using environment info for 2.1 in the installer and CLI upgrade.
2011-04-09 17:43:52 +02:00
Petr Skoda 02c97e653d MDL-27007 fix incorrectly suspended user enrolment when uploading users
This bug surfaced after the recent change in enrol API, credit goes to Chaim Schendowich and Micky Fokken.
2011-04-09 12:09:23 +02:00
Petr Skoda a32b68475a MDL-25826 add more HTMLPurifier integration tests 2011-04-09 11:46:13 +02:00
Petr Skoda 7df50029b4 MDL-25826 integrate HTMLPurifier 4.3.0 and improve performance
The new HTMLPurifier finally caches the schema properly eliminating both extra CPU cycles and disk writes. The repeated dir exists tests might cause problems on NFS shares.
2011-04-09 11:45:24 +02:00
Petr Skoda 88efb586b4 MDL-25826 import HTMLPurifier 4.3.0 2011-04-09 10:05:27 +02:00
Tim Hunt 3f469e808b MDL-20636 Notice when editing shortanswer questions. #339 2011-04-08 18:21:53 +01:00
Tim Hunt 330c1148a4 MDL-20636 Quiz report graph not showing up due to an SQL error. #426 2011-04-08 18:09:24 +01:00
Tim Hunt a056778d8a MDL-20636 Fix unit test that the recent code change broke. #382 2011-04-08 17:46:15 +01:00
tjh238 7c85d7c871 MDL-20636 Bug 11493 can't show marks available for deferred feedback summative iCMAs 2011-04-08 17:16:55 +01:00
Tim Hunt 33dae771db MDL-20636 Fix bare in language string in OU code. #427, #429 2011-04-08 16:58:43 +01:00
Colin Chambers 7ee214ff89 MDL-20636 lib/Questionlib fixed calls to question_delete_question() #381 2011-04-08 16:21:47 +01:00
Colin Chambers 058f658ed1 MDL-20636 remove tests for obsolete functions #436 2011-04-08 16:21:36 +01:00
Andrew Davis (andyjdavis) 13ba903634 enrol MDL-25718 added ability to recover user grades from grade history 2011-04-08 15:06:27 +08:00
Tim Hunt 1631ceeaec MDL-20636 Fix codechecker issues in the question behaviours. 2011-04-08 07:24:24 +01:00
Tim Hunt 9447399c11 MDL-20636 Fix codechecker issues in qtype_oumultiresponse. 2011-04-08 06:26:47 +01:00
Tim Hunt 553b8ee5e4 MDL-20636 Fix codechecker issues in qtype_opaque. 2011-04-08 06:06:46 +01:00
Tim Hunt eaeb6b513a MDL-20636 Fix codechecker issues in the question type base classes. 2011-04-08 05:39:16 +01:00
Tim Hunt dcd69f8d97 MDL-20636 Fix codechecker issues in qtype_truefalse. 2011-04-08 05:08:24 +01:00
Tim Hunt 8cfc4fbd72 MDL-20636 Fix codechecker issues in qtype_shortanswer. 2011-04-08 05:08:11 +01:00
Tim Hunt 59f26004cd MDL-20636 Fix codechecker issues in qtype_random. 2011-04-08 05:07:57 +01:00
Tim Hunt 12039f2e7a MDL-20636 Fix codechecker issues in qtype_multichoice. 2011-04-08 05:07:42 +01:00
Tim Hunt 2b7c9bd235 MDL-20636 Fix codechecker issues in qtype_missingtype. 2011-04-08 05:07:24 +01:00
Tim Hunt 9afa71af83 MDL-20636 Fix codechecker issues in qtype_gapselect. 2011-04-08 05:05:22 +01:00
Tim Hunt b3ae5457c4 MDL-20636 Fix type respones -> response. Thanks Colin. #415 2011-04-07 11:53:00 +01:00
Andrew Davis (andyjdavis) d3a8184239 message MDL-26185 fixed the logic around email addy in user profile Vs in messaging preferences 2011-04-07 15:58:33 +08:00
Aparup Banerjee ca3617c513 MDL-26319 moved cancel_backup() from backup_ui to cancel_process() in base_ui and renamed callers. fix for method inheritance in restore_ui. 2011-04-07 10:39:34 +08:00
Eloy Lafuente (stronk7) 54fb7e80fc MDL-27034 profiling - xhprof_table_sql improvement 2011-04-07 00:46:54 +02:00
Petr Skoda 6b14adf210 weekly release 2.1dev 2011-04-06 14:56:45 +02:00
Petr Skoda a32ab0254c Merge branch 'MDL-26784-plugin-manager' of git://github.com/mudrd8mz/moodle 2011-04-06 11:26:20 +02:00
David Mudrak 7c9b837ea9 MDL-26784 Plugin manager: make sure that filter_active already exists
In case of upgrade from 1.9, the table filter_active does not exist yet.
There already was this checked at another place but it is needed to test
the table existence here as well.
2011-04-06 11:24:59 +02:00
Eloy Lafuente (stronk7) 11a6763546 MDL-26425 tablelib - fix tr class typo (detected @ MDL-27034) 2011-04-06 10:58:39 +02:00
Petr Skoda 5f27855ea4 MDL-26914 fix undefined CFG langcache property during install 2011-04-06 10:50:19 +02:00
Sam Hemelryk 62f7ce7989 PULL-574 MDL-26185 Reverted changes due failed testing + review 2011-04-06 16:33:47 +08:00
Tim Hunt 3758786f6d MDL-20636 Fix codechecker problems in match, description and ddwtos qtypes. 2011-04-05 17:54:39 +01:00
Petr Skoda 1d57f8622c revert MDL-26577 added session cleaning to groups_get_activity_group() that fixes an issue with dirty session data. refactored session cleaning into one function, added caching to reduce queries.
(reverse-merged from commit 0d1e49d468) This change was causing fatal errors on the course level, I am going to fix it myself.
2011-04-05 18:33:35 +02:00
Tim Hunt 121fd4c12d MDL-20636 Fix code-checker issues in qtype_essay. 2011-04-05 11:29:26 +01:00
Sam Hemelryk bbb79f47a7 messaging MDL-26185 Last minute fix of bug during integration, empty user preference causing error 2011-04-05 16:52:07 +08:00
Petr Skoda 773e3c5031 Merge branch 'MDL-26577_groups_api_refactor_take2' of git://github.com/nebgor/moodle 2011-04-05 10:19:16 +02:00
Aparup Banerjee 0d1e49d468 MDL-26577 added session cleaning to groups_get_activity_group() that fixes an issue with dirty session data. refactored session cleaning into one function, added caching to reduce queries. 2011-04-05 12:22:27 +08:00
Jonathan Harker 6e9ce8e766 MDL-22308 Update lib/bennu to latest upstream. 2011-04-05 16:00:21 +12:00
Tony Levi 05edae9f89 MDL-27084: mod/feedback fix bad syntax in database query 2011-04-05 12:14:16 +09:30
Eloy Lafuente (stronk7) 21473e6cd7 Merge branch 'wip-MDL-26560-master' of git://github.com/samhemelryk/moodle 2011-04-04 23:21:49 +02:00
Eloy Lafuente (stronk7) b76070db70 Merge branch 'wip-MDL-26858' of git://github.com/samhemelryk/moodle 2011-04-04 21:53:17 +02:00
Tim Hunt 55ca80edde MDL-20636 Fix lots of problems found by the new improved codechecker. 2011-04-04 20:11:29 +01:00
Eloy Lafuente (stronk7) a7174151db Merge branch 'MDL-11288-course-module-cloning' of git://github.com/mudrd8mz/moodle 2011-04-04 12:35:04 +02:00
Eloy Lafuente (stronk7) 4102345add Merge branch 'master' of git.moodle.org:/git/integration 2011-04-04 12:00:30 +02:00
Eloy Lafuente (stronk7) a70ba1b069 Merge branch 'MDL-26931-blog-post-order_master' of git://github.com/mudrd8mz/moodle 2011-04-04 11:56:44 +02:00
Petr Skoda 33620e1772 Merge branch 'MDL-26784-plugin-manager' of git://github.com/mudrd8mz/moodle 2011-04-04 11:55:39 +02:00
Andrew Davis (andyjdavis) 656d17c2c6 gradebook MDL-20946 fixed average calculation where users have multiple gradeable roles 2011-04-04 11:35:47 +02:00
Petr Skoda 3d3ead8e35 Merge branch 'MDL-26914-lang-grand-parents' of git://github.com/mudrd8mz/moodle 2011-04-04 11:19:51 +02:00
Petr Skoda 1f67888540 Merge branch 'wip-MDL-25651' of git://github.com/jennymgray/moodle 2011-04-04 09:55:41 +02:00
Petr Skoda 7974c4ec03 Merge branch 'MDL-26542_empty_array' of git://github.com/stronk7/moodle 2011-04-04 09:49:12 +02:00
Sam Hemelryk a1ead9a478 enrolments MDL-26560 Fixed panel.user bug with role assignments dialogue 2011-04-04 14:49:28 +08:00
Sam Hemelryk af8851282e enrolments MDL-26858 Added finish user enrolments button to JS dialogue 2011-04-04 14:37:35 +08:00
Sam Hemelryk 637a8daf76 Merge branch 'MDL-26185_ms' of git://github.com/rwijaya/moodle 2011-04-04 13:30:55 +08:00
Sam Hemelryk adb24226bf Merge branch 'MDL-27016' of git://github.com/MaryE/moodle 2011-04-04 13:08:37 +08:00
Sam Hemelryk 4632bb9668 Merge branch 'earlier_profiling' of git://github.com/stronk7/moodle 2011-04-04 11:16:33 +08:00
Tim Hunt f45a12d28e MDL-20636 tinyMCE boxes for each sub-question are enormous. #355 2011-04-01 14:39:51 +01:00
Tim Hunt 1322daba08 MDL-20636 Fix visibility of quiz_attempt_report_table::get_row_class. #357 2011-04-01 14:39:31 +01:00
Rossiani Wijaya 9d61d9ac6d MDL-26185: simplify the logic of email message output and removing email address cache 2011-04-01 16:55:37 +08:00
Mary Evans 5deabe4338 Fix for MDL-27016 added min-width 2011-04-01 02:43:23 +01:00
Tim Hunt 825908a0d6 MDL-20636 Fix missing include in oumultiresponse qtype. #346 2011-03-31 16:30:46 +01:00
Tim Hunt dbf76faf52 MDL-20636 Fix two HTML validation issues. 2011-03-31 15:24:37 +01:00
Jenny Gray 52d1a8043c MDL-25651 add capability check to my private files navigation link 2011-03-31 14:44:35 +01:00
David Mudrak 91dedc324f MDL-26784 Strings for the new plugin manager
The new strings file core_plugin defines names of all plugin types
supported by Moodle. Some strings have already been defined elsewhere
and we use AMOS script here to copy their translation, if it is
available.

AMOS BEGIN
 CPY [settings,core],[settings,core_plugin]
 CPY [status,core],[status,core_plugin]
 CPY [missingfromdisk,core],[status_missing,core_plugin]
 CPY [nodatabase,core_admin],[status_nodb,core_plugin]
 CPY [authenticationplugins,core],[type_auth_plural,core_plugin]
 CPY [block,core],[type_block,core_plugin]
 CPY [blocks,core],[type_block_plural,core_plugin]
 CPY [coursereport,core],[type_coursereport,core_plugin]
 CPY [coursereports,core],[type_coursereport_plural,core_plugin]
 CPY [filter,core],[type_filter,core_plugin]
 CPY [courseformats,core],[type_format_plural,core_plugin]
 CPY [activitymodule,core],[type_mod,core_plugin]
 CPY [activitymodules,core],[type_mod_plural,core_plugin]
 CPY [plagiarism,core_plagiarism],[type_plagiarism,core_plugin]
 CPY [portfolio,core_portfolio],[type_portfolio,core_plugin]
 CPY [portfolios,core_portfolio],[type_portfolio_plural,core_plugin]
 CPY [questiontype,core_admin],[type_qtype,core_plugin]
 CPY [questiontypes,core_admin],[type_qtype_plural,core_plugin]
 CPY [repository,core_repository],[type_repository,core_plugin]
 CPY [theme,core],[type_theme,core_plugin]
 CPY [themes,core],[type_theme_plural,core_plugin]
 CPY [uninstallplugin,core_admin],[uninstall,core_plugin]
 CPY [version,core],[version,core_plugin]
 CPY [assignmenttype,mod_assignment],[subplugintype_assignment,mod_assignment]
 CPY [presets,mod_data],[subplugintype_datapreset_plural,mod_data]
 CPY [evaluationmethod,mod_workshop],[subplugintype_workshopeval,mod_workshop]
 CPY [strategy,mod_workshop],[subplugintype_workshopform,mod_workshop]
AMOS END
2011-03-31 13:59:05 +02:00
David Mudrak b9934a173a MDL-26784 Improved plugins check screen and the new plugins management screen
This patch introduces new lib/pluginlib.php library that provides
unified access meta-information about all present plugin types. The
library defines plugin_manager singleton that in turn gathers
information about all present plugins and their status. The list of
plugins can be rendered either as plugins check table or plugins control
panel.

This makes print_plugins_table() function obsolete and because it is not
expected to be called by any contrib plugin, the function is removed.
CSS for the legacy table generated by print_plugins_table() is cleaned
up.
2011-03-31 13:59:05 +02:00
Tim Hunt 48d9c17db3 MDL-20636 Essay questions can now handle files in the HTML editor. #216 2011-03-31 12:45:36 +01:00
Tim Hunt 7a3e1f7d51 MDL-26887 Refactor file_save_draft_area_files to separate out
the file_rewrite_urls_to_pluginfile bit.
2011-03-31 12:45:31 +01:00
Tim Hunt a54ecbbb10 MDL-20636 Essay qtype now uses proper HTML editor and has format field. #216 2011-03-31 12:45:26 +01:00
Tim Hunt d42dbe87a7 MDL-20636 Essay questions allowing multiple attachments now work. #216 2011-03-31 12:45:22 +01:00
Tim Hunt 6b5f24d376 MDL-20636 Handle deleting response files when the usage is deleted. #216 2011-03-31 12:45:17 +01:00
Tim Hunt cd6fc47e8d MDL-26847 new method file_storage::delete_area_files_select for efficient bulk file deletion. 2011-03-31 12:45:12 +01:00
Tim Hunt cd3557e64c MDL-20636 Essay question type, make is_same_response consider files. #216 2011-03-31 12:45:07 +01:00
Tim Hunt 217f9a618c MDL-20636 Essay submission now handles attachments. #216 2011-03-31 12:45:02 +01:00
Tim Hunt 783af2523e MDL-20636 Implement display of grader instructions. #216 2011-03-31 12:44:57 +01:00
Tim Hunt 8026d4aa0a MDL-20636 Can now display the file picker in essay questions with attachments #216 2011-03-31 12:44:52 +01:00
Tim Hunt caeeff0726 MDL-20636 Can now display the attachments to an essay question that has attachments. 2011-03-31 12:44:47 +01:00
Tim Hunt b36d2d0643 MDL-20636 Start supporting different response formats in essay. #216 2011-03-31 12:44:43 +01:00
Tim Hunt 894e8b4e93 MDL-6535 new features for the essay qtype. Part I DB tables and editing form.
Also MDL-8229, MDL-10861, MDL-11080

The features are attachements with repsonses, control over whether the respons can contain images, letting the question author set the size for the input box, and allowing the author to input some text that is shown to the grader.
2011-03-31 12:44:38 +01:00
David Mudrak fa82056328 MDL-11288 Added ability to duplicate module in the course
Internally, the new script modduplicate.php performs a single activity
backup and restore and then moves the newly created copy right below the
original.
2011-03-31 13:39:05 +02:00
David Mudrak 74a4c9a9ee MDL-26914 When installing a lang pack, install all the grandparents too
All places where a language pack is installed now use the new language
package installer that takes case of the parental dependencies.
2011-03-31 12:21:05 +02:00
David Mudrak 15e16f0e93 MDL-26914 Added new language pack installer class and unit tests for it
The new class wraps some common coding patterns to install a language
pack via component_installer. Most notably it deals with the parental
dependency of the language packs.

The new class should also be the only place holding the information
about the location of language packs for the given Moodle version.
2011-03-31 12:20:54 +02:00
Ankit Agarwal 899d5e2d50 MDL-26931 Order blog entries by the creation date 2011-03-31 11:50:57 +02:00
Tim Hunt 71811083ba MDL-27035 table_sql forgets to set countparams. 2011-03-30 20:25:43 +01:00
Eloy Lafuente (stronk7) c7ce62f9c8 MDL-26542 get_in_or_equal - adding $onemptyitems + tests 2011-03-30 18:22:53 +02:00
Eloy Lafuente (stronk7) c646dd26ea MDL-26891 profiling - earlier runs
This allows profiling to be started earlier in the
setup.php execution, by configuring everything in
the config.php file. That way some interesting code
is also profiled, like DB connections, load of config records...

100% compatible with normal profiling and enabled via
special setting $CFG->earlyprofilingenabled

Example (to be put on config.php):

$CFG->earlyprofilingenabled = true;
$CFG->profilingautofrec = 3;
$CFG->profilingincluded = '/*';
$CFG->profilingallowme = true;

(to enable early profiling for 1/3 of any requests while also
allowing to use the PROFILEME PGC)
2011-03-30 18:08:38 +02:00
Petr Skoda dae6b38c51 sync version with stable 2011-03-30 18:01:39 +02:00
Tim Hunt 8d13ea834c MDL-20636 Another little bug found by Jamie. 2011-03-30 14:30:40 +01:00
Petr Skoda 0947b90b98 weekly release 2011-03-30 14:32:49 +02:00
Tim Hunt e65f89b914 MDL-20636 Fix typo. Thanks Jamie. 2011-03-30 11:00:33 +01:00
Petr Skoda 3b6d215b91 Merge branch 'MDL-26964-moodle_url-anchor_master' of git://github.com/mudrd8mz/moodle 2011-03-29 09:57:20 +02:00
Helen Foster 4b59f327cd MDL-26744 enrol meta lang string improvement thanks to Ray Lawrence 2011-03-28 23:58:27 +02:00
Eloy Lafuente (stronk7) a5743e866e Merge branch 'w13_MDL-22733_21_youtubeiframe' of git://github.com/skodak/moodle 2011-03-28 23:33:23 +02:00
Eloy Lafuente (stronk7) 5e44c5c998 Merge branch 'w13_MDL-26909_21_mediatests' of git://github.com/skodak/moodle 2011-03-28 22:08:15 +02:00
Eloy Lafuente (stronk7) 12abf305f8 Merge branch 'w13_MDL-26987_21_sclean' of git://github.com/skodak/moodle 2011-03-28 21:56:25 +02:00
Eloy Lafuente (stronk7) 63d6da51fe Merge branch 'w13_MDL-26913_20_sitecreated' of git://github.com/skodak/moodle 2011-03-28 19:58:49 +02:00
Eloy Lafuente (stronk7) 2326b8d301 Merge branch 'w13_MDL-26951_21_archetypes' of git://github.com/skodak/moodle 2011-03-28 19:38:48 +02:00
Eloy Lafuente (stronk7) 18318237d7 Merge branch 'w13_MDL-26991_21_legacy' of git://github.com/skodak/moodle 2011-03-28 19:25:03 +02:00
Eloy Lafuente (stronk7) 0a284930cf Merge branch 'w13_MDL-26966_21_urlparsing' of git://github.com/skodak/moodle 2011-03-28 19:05:07 +02:00
Eloy Lafuente (stronk7) 58937f7e57 Merge branch 'w13_MDL-26985_21_branching' of git://github.com/skodak/moodle 2011-03-28 18:09:29 +02:00
Petr Skoda b2b9320570 Merge branch 'MDL-26425' of git://github.com/timhunt/moodle 2011-03-28 16:49:49 +02:00
Eloy Lafuente (stronk7) 37c2a8a035 Merge branch 'master' of git.moodle.org:/git/integration 2011-03-28 16:21:11 +02:00
Eloy Lafuente (stronk7) a226727238 Merge branch 'w13_MDL-26990_21_missingrebuild' of git://github.com/skodak/moodle 2011-03-28 16:07:20 +02:00
Petr Skoda ce14a7644e Merge branch 'MDL-26335' of github.com:mouneyrac/moodle 2011-03-28 15:15:23 +02:00
Eloy Lafuente (stronk7) df8248b035 Merge branch 'MDL-26804-langlistcache_master' of git://github.com/mudrd8mz/moodle 2011-03-28 14:48:38 +02:00
Tim Hunt 06cd11a989 MDL-20636 Fix scope of quiz edit form data_preprocessing. 2011-03-28 11:40:15 +01:00
Eloy Lafuente (stronk7) e1feb94cd1 Merge branch 's8_MDL-26213_wiki_rewrite_file_url' of git://github.com/dongsheng/moodle 2011-03-28 11:48:58 +02:00
Dongsheng Cai cfdac90f2b MOD-WIKI MDL-26213
1. Rewrite the image urls in diff.php and viewdiff.php
2. Fxied image urls in search.php
3. Add modcontext variable to avoid using duplicated
get_context_instance calls
2011-03-28 17:31:01 +08:00
Eloy Lafuente (stronk7) b431645c89 Merge branch 'MDL-26932' of git://github.com/jennymgray/moodle 2011-03-28 11:03:44 +02:00
Eloy Lafuente (stronk7) 12c6a556b2 Merge branch 'm20_MDL-26939_plagiarism_restore' of git://github.com/danmarsden/moodle 2011-03-28 10:48:45 +02:00
Sam Hemelryk 223680f562 Merge branch 's8_MDL-26916_filepicker_paging' of git://github.com/dongsheng/moodle 2011-03-28 16:12:55 +08:00
Sam Hemelryk 628c600cd9 Merge branch 'm20_MDL-26957_forum_overview' of git://github.com/danmarsden/moodle 2011-03-28 16:10:39 +08:00
Sam Hemelryk 6db981b2ee Merge branch 'MDL-26906-2' of git://github.com/epsd/moodle 2011-03-28 16:03:15 +08:00
Sam Hemelryk e1a7281ab2 Merge branch 'MDL-26077_message_strip_brackets2' of git://github.com/andyjdavis/moodle 2011-03-28 15:59:25 +08:00
Sam Hemelryk e1339a6dda Merge branch 's8_MDL-26798_dropbox_repo' of git://github.com/dongsheng/moodle 2011-03-28 15:52:21 +08:00
Sam Hemelryk bc071c7580 Merge branch 'w13_MDL-26992_21_uploadtemplates' of git://github.com/skodak/moodle 2011-03-28 14:29:50 +08:00
Sam Hemelryk 982e619d2a Merge branch 'w13_MDL-26989_21_enrolroles' of git://github.com/skodak/moodle 2011-03-28 14:10:44 +08:00
Sam Hemelryk d2c4a97a70 Merge branch 'w13_MDL-26795_21_emailchange' of git://github.com/skodak/moodle 2011-03-28 13:54:39 +08:00
Petr Skoda 43070e6193 MDL-26992 fix broken upload users templates 2011-03-27 23:48:41 +02:00
Tim Hunt a208aefbc4 MDL-26425 change all table subclasses to use parent::__construct 2011-03-27 20:06:45 +01:00
Tim Hunt ba9164e575 MDL-26425 tablelib more cleanup, mostly to PHPdocs, following sam's comments. 2011-03-27 20:06:45 +01:00
Tim Hunt 76dc1e2527 MDL-26425 tablelib use html_writer when outputting rows and headers.
This includes refactoring to extract methods like sort_icon and show_hide_link which I think makes the code easier to read.

Note also the change to make_styles_string that makes it usable with html_writer. (Perhpas we need a css_writer classe ;-))
2011-03-27 20:06:44 +01:00
Tim Hunt 6f0d3480c7 MDL-26425 tablelib change print_initials_bar to remove duplication, and to use html_writer. 2011-03-27 20:06:44 +01:00
Tim Hunt b08fb128c8 MDL-26425 tablelib ability for table_sql to add a class to the row based on the data. 2011-03-27 20:06:43 +01:00
Tim Hunt abf72969a4 MDL-26425 tablelib change col_username to use html_writer and moodle_url. 2011-03-27 20:06:43 +01:00
Tim Hunt e81eed542c MDL-26425 tablelib better validation of the sort code, also some cleanup.
You may think that the extra validation is unnecessary, since the sort fields are already validated when the URL parameters are parsed, however that overlooks an important point. There may be other options that affect which columns are in the SQL, for example the quiz show individual question grades setting. These other options can cause a column that was in the table, and being sorted on, to disappear. Therefore, it is necessary to re-validate the sort columns when they are used, to make sure they are still present, otherwise you can get ORDER BY sql that refers to non-existant columns, which then causes DB errors.
2011-03-27 20:06:42 +01:00
Tim Hunt 59f392b3f0 MDL-26425 tablelib clean up setup and URL handling code.
Note that this change removes ->reseturl, This was supposed to be a way to reset all the session stuff relating to a table automatically in some situations, but from using Moodle and reading the code, I don't beleive it was working. The code was horrible and not easily fixible, and has been broken for years, so I just removed it.
2011-03-27 20:06:42 +01:00
Tim Hunt a49c17b424 MDL-26425 tablelib rename constructors to PHP5 __construct
and add depreacted functions with the old name so that legacy code does not break.
2011-03-27 20:05:55 +01:00
Tim Hunt 4b7079c100 MDL-26425 tablelib clean up constant definitions. 2011-03-27 19:55:10 +01:00
Tim Hunt 9683db71c9 MDL-26425 tablelib mass whitespace clean-up. 2011-03-27 19:55:10 +01:00
Nikhil Gupta d099348e32 MDL-26989 fix incorrect disabling of assignable roles 2011-03-27 20:34:15 +02:00
Petr Skoda c4dd3bb86f MDL-26913 set timecreated in fortpage of a newly installed site 2011-03-27 18:22:11 +02:00
Petr Skoda c6a074f867 MDL-26795 fix incorrect location of email change strings
AMOS BEGIN
 MOV [auth_emailchangecancel,auth_email],[emailchangecancel,core_auth]
 MOV [auth_emailchangepending,auth_email],[emailchangepending,core_auth]
 MOV [auth_emailupdate,auth_email],[emailupdate,core_auth]
 MOV [auth_emailnowexists,auth_email],[emailnowexists,core_auth]
 MOV [auth_emailupdatemessage,auth_email],[emailupdatemessage,core_auth]
 MOV [auth_emailupdatesuccess,auth_email],[emailupdatesuccess,core_auth]
 MOV [auth_emailupdatetitle,auth_email],[emailupdatetitle,core_auth]
 CPY [auth_emailnoemail,auth_email],[noemail,auth_ldap]
AMOS END
2011-03-27 17:19:23 +02:00
Petr Skoda ce8b66c67f MDL-26881 work around the block context setting problems 2011-03-27 16:39:27 +02:00
Petr Skoda d38f419d5c MDL-26987 fix invalid DML syntax in spam cleaner tool 2011-03-27 16:14:22 +02:00
Petr Skoda c102060deb MDL-26951 fix removing of archetype from role 2011-03-27 16:04:33 +02:00
Petr Skoda 0ae36f6638 MDL-26966 improve self URL validation 2011-03-27 12:29:36 +02:00
Petr Skoda 3c3d544700 MDL-26909 fix outdated mediaplugin filter unittests 2011-03-26 23:54:45 +01:00
Petr Skoda c4b491a417 MDL-22733 enable youtube iframe embedding 2011-03-26 23:38:40 +01:00
Petr Skoda 112d3b4962 MDL-26990 fix undefined rebuild_course_cache() regression 2011-03-26 22:49:04 +01:00
Petr Skoda 9778dae374 MDL-26985 make sure admins do not upgrade to 2.1dev accidentally
We already have the new maturity warning in the upgrade page but we are not changing versions yet, we should better give admins one extra chance to go back to latest 2.0.2+ stable.
2011-03-26 22:28:32 +01:00
Petr Skoda aca9888fa0 MDL-26985 add 2.1 release info
We keep the $CFG->version unchanged for now so that admins that upgrade accidentally can go back to the latest stable 2.0.2+.
2011-03-26 22:08:56 +01:00
Petr Skoda c904cbbdd2 MDL-26985 new Moodle 2.1 requirements
For now only extra PHP 5.3.2 requirement compared to 2.0.
2011-03-26 22:02:42 +01:00
Jenny Gray d5842f7a35 MDL-26932 full url path for toggle completion form POST 2011-03-25 11:57:41 +00:00
David Mudrak a9cbd19bff MDL-26804 core_string_manager::get_list_of_translations() can use a cache again
This patch reimplements the internal cache that was used to store the
list of available translations in Moodle 1.x. By default, the method
get_list_of_translations() still uses the file
moodledata/cache/languages to store the list of available translations.
The location of that file can be redefined in config.php. The internal
format of the cache file is JSON now (used to be a plain text list).

The patch also fixes a usage of the global $CFG in translation_exists()
methods where the internal property should be used instead.
2011-03-24 21:51:30 +01:00
David Mudrak a12cd69c9e MDL-26964 URL anchor support for single_button and single_select
If the single_button or single_select use HTTP method 'get' then the
eventual anchor part of the URL is used.
2011-03-24 14:51:39 +01:00
David Mudrak 5c6ee6ec36 MDL-26964 URL returned by moodle_url::out_omit_querystring() may contain the anchor part 2011-03-24 14:51:39 +01:00
Dongsheng Cai 60a4bf98eb MDL-26916, MDL-26917
1. Fix filepicker paging issue MDL-26916
2. Highlight view as icon button by default MDL-26917
2011-03-24 13:55:33 +08:00
Myles Carrick ab603b243c MDL-26798 encode file path in dropbox repository plugin, credits to Myles Carrick 2011-03-24 13:54:10 +08:00
Andrew Davis (andyjdavis) 7e98f60bfb message MDL-26077 fixed up a problem with html tags being stripped out 2011-03-24 11:30:12 +08:00
Dan Marsden 7fd4730805 Plagiarism MDL-26939 - missing return 2011-03-24 14:46:35 +13:00
Dan Marsden 6d64106306 Forum Overview MDL-26957 add classes to allow better control by theme 2011-03-24 14:42:57 +13:00
Tim Hunt 7348402f33 MDL-20636 A few more publics. 2011-03-23 16:40:19 +00:00
Tim Hunt c7df5006b9 MDL-20636 Add lots of missing public/protected/private. 2011-03-23 16:22:25 +00:00
Tim Hunt c73c98365b MDL-20636 Question import, support for files in hints.
Also fix some minor bugs and unit tests.
2011-03-23 14:27:22 +00:00
stabijoh 110e6876e5 Revised fix for MDL-26906, magazine and formal white secure browser quiz window 2011-03-23 07:29:01 -04:00
Jerome Mouneyrac ac3e0b3c8c MDL-26335 fix capability name typo in the description of the web service function moodle_user_get_users_by_id 2011-03-23 11:35:46 +08:00
Tim Hunt 92d04f0b4c MDL-20636 Problem processing submissions if slots is not given explicitly.
James found this during load testing.
2011-03-21 12:43:00 +00:00
Tim Hunt ff58648f8a MDL-20636 Fix problem editing truefalse questions. #298
Also, fix a notice on the quiz editing form.
2011-03-21 12:42:54 +00:00
Tim Hunt 6d03fd9830 MDL-20636 Fix for Bug 11593 merged from our 1.9 version. #268 2011-03-16 14:34:19 +00:00
Tim Hunt 9f622ce7d8 MDL-20636 Fix syntax error in question/format/xhtml/format.php 2011-03-11 18:28:40 +00:00
Tim Hunt 56b0df7eac MDL-20636 Kill Left over addslashes in the question engine code. #223 2011-03-11 13:45:38 +00:00
Tim Hunt c8b3ad7c46 MDL-20636 quiz_attempts.sumgrades should be nullable. #224 2011-03-11 13:45:03 +00:00
Tim Hunt 42e6506ebe MDL-20636 Minor fixes to the truefalse and match editing forms. 2011-03-10 19:09:42 +00:00
Tim Hunt 07f8858406 MDL-20636 Cannot really delete questions that were only used in previews #196 2011-03-07 16:23:11 +00:00
Tim Hunt c5c16a2c81 MDL-26324 Existing overall feedback on non-graded quizzes prevents editing 2011-03-04 17:50:31 +00:00
Tim Hunt e2661fa8bc MDL-20636 Fix GIFT unit test 2011-03-02 17:47:12 +00:00
Tim Hunt cd4b6c1932 MDL-20636 Backup and restore of Opaque questions. 2011-03-02 17:43:04 +00:00
Tim Hunt 515e6b97b5 MDL-20636 Restore of question hints, and some other minor clean-up. 2011-03-02 17:43:02 +00:00
Tim Hunt b662532752 MDL-20636 Minor theme tweaks. 2011-03-02 17:43:00 +00:00
Tim Hunt c26b7f0cfb MDL-20636 Fix upgrade problems. Thanks to James Brisland for his help. 2011-03-02 17:42:58 +00:00
Tim Hunt 7916ea127e MDL-20636 Fix install breakage. 2011-03-02 17:42:56 +00:00
Tim Hunt beca0d8daf MDL-20636 Fix backup and restore issues found during testing. 2011-03-02 17:42:54 +00:00
Tim Hunt 42663bb78e MDL-20636 Fix a bunch of missing strings caused by separating question from quiz. 2011-03-02 17:42:53 +00:00
Tim Hunt f3ca24e418 MDL-20636 Update quiz and questions backup and restore.
This does not include user data yet, and it needs more testing.
2011-03-02 17:42:51 +00:00
Tim Hunt e2cba246b7 MDL-20636 Merge vle/master into ouqe2
Conflicts:
	mod/quiz/locallib.php
	mod/quiz/report/overview/overview_table.php
	mod/quiz/report/overview/report.php
	mod/quiz/report/responses/report.php
	question/type/random/questiontype.php
2011-03-02 17:34:18 +00:00
Tim Hunt 404da23812 MDL-20636 Fix question flag javascript. 2011-02-25 15:36:07 +00:00
Tim Hunt f39cf78c02 MDL-20636 Only show the full summary of attempt table on the first page of the review. 2011-02-25 12:24:55 +00:00
Tim Hunt 3c6185e979 MDL-20636 Move restart preview button into the quiz nav block & remove unnecessary titles.
Also, remove automatic redirects to the quiz edit page. Show a message and a button instead.
2011-02-25 12:12:09 +00:00
Tim Hunt 22cebed503 MDL-20636 Review and fix the format parameter to all calls to format_text. 2011-02-24 20:18:16 +00:00
Tim Hunt a18fda20c4 MDL-20636 Split question-type specific styles into the separate plugins. 2011-02-24 19:34:08 +00:00
Tim Hunt ef31a28343 MDL-20636 Split question_definition::init_first_step into start_attempt and apply_attempt_state. 2011-02-24 19:12:42 +00:00
Tim Hunt 2daffca554 MDL-20636 Fix 30 TODOs 2011-02-24 17:47:51 +00:00
Tim Hunt d649fb0221 MDL-20636 Remove all references to global $QTYPES.
Except in the question types that have not yet been converted to the new question engine.
2011-02-24 15:29:07 +00:00
Tim Hunt 446166a628 MDL-20636 Minor bug-fixes 2011-02-24 12:01:37 +00:00
Tim Hunt 5e8a85aa64 MDL-20636 Massively reduce the number of references to quiz in the question code.
This mostly involves moving lang strings around, but I don't have time to do an AMOS script now.
2011-02-23 18:53:50 +00:00
Tim Hunt 88f0eb1546 MDL-20636 Reveiw all throw statements. 2011-02-23 16:50:09 +00:00
Tim Hunt f7970e3ca7 MDL-20636 Eliminate integer and boolean in PHPdoc comments. should be int and bool. 2011-02-23 16:25:25 +00:00
Tim Hunt a17b297d60 MDL-20636 Add missing defined('MOODLE_INTERNAL') || die(); 2011-02-23 16:00:20 +00:00
Tim Hunt 7764183a4a MDL-20636 Fix @package names and PHPdoc layout. 2011-02-23 13:38:16 +00:00
Tim Hunt 017bc1d9f3 MDL-20636 Fix @package names in question/behaviour, question/engine and question top level. 2011-02-22 20:50:18 +00:00
Tim Hunt d3603157bf MDL-20636 Add @package and GPL boiler-plate to files in /question. 2011-02-22 19:59:12 +00:00
Tim Hunt 0ff4bd0877 MDL-20636 Fix new stdClass -> stdClass(), and trailing whitespace. 2011-02-21 18:10:19 +00:00
Tim Hunt aa9bdbe31c MDL-20636 Boilerplate and other cleanup in the question core code.
This includes converting behaviours to pluginname strings.
2011-02-21 18:00:15 +00:00
Tim Hunt f7c1dfaf79 MDL-20636 Finish off converting question import. 2011-02-21 17:29:18 +00:00
Tim Hunt ba6438471b MDL-20636 Fix top of file boilerplate in mod/quiz. 2011-02-21 16:13:25 +00:00
Tim Hunt b04a4319d6 MDL-20636 Remove &copy; from all PHPdoc comments, and tidy them up a bit. 2011-02-21 14:51:02 +00:00
Tim Hunt 8032cd792c MDL-25122 Quiz review page does not check and enforce separate groups mode. 2011-02-18 17:36:18 +00:00
Tim Hunt 05d2a8b7f1 MDL-26416 avoid subtracting two unsigned ints, which breaks MySQL since 5.5.5. 2011-02-18 16:27:49 +00:00
Tim Hunt e24ee794b2 MDL-20636 Convert the overview report. 2011-02-16 17:33:51 +00:00
Tim Hunt 2a3bdbf98e MDL-20636 Fix some minor bugs. 2011-02-16 14:06:12 +00:00
Tim Hunt 0f33deafaa MDL-20636 Fix question/enigne/datalib.php unit tests. 2011-02-15 18:19:55 +00:00
Tim Hunt 04853f273a MDL-20636 Convert quiz statistics report. 2011-02-15 17:22:31 +00:00
Tim Hunt 9b40c540ee MDL-20636 Responses report mostly working. 2011-02-14 17:57:47 +00:00
Tim Hunt cf3b65686a MDL-20636 Finished conversion of the manual grading report. 2011-02-14 17:57:44 +00:00
Tim Hunt adaad5f224 MDL-20636 Fix install 2011-02-13 07:34:32 +00:00
Tim Hunt a8a8ec51fc MDL-20636 Fix bug with starting an attempt. Now uses exceptions, so should not check return values. 2011-02-12 00:40:43 +00:00
Tim Hunt 2709ee45d3 MDL-20636 Working on converting the reports, starting with the manual grading report. Very much a work-in-progress.
Also, some random bug-fixing.
2011-02-11 18:47:08 +00:00
Tim Hunt a13d4fbd20 MDL-20636 Fix lots of minor quiz editing glitches. 2011-02-11 17:36:30 +00:00
Tim Hunt fd214b596d MDL-20636 Preserve scroll position when doing action on the quiz edit page. 2011-02-11 17:36:02 +00:00
Tim Hunt f9b0500f7f MDL-20636 Quiz editing now works, as does the random question type.
However, all this needs more testing.

Also, a bit of a purge of training whitespace and global .
2011-02-10 20:50:18 +00:00
Tim Hunt 1493619923 MDL-20636 Review option defaults in the admin settings. 2011-02-10 18:35:42 +00:00
Tim Hunt 55b81c131f MDL-20636 todo list clean-up. 2011-02-10 12:50:50 +00:00
Tim Hunt 56e82d993d MDL-20636 Images in questions now work in quiz attempts. 2011-02-09 20:33:51 +00:00
Tim Hunt 7ee80cab53 MDL-20636 Manual comment popup comment.php now works. 2011-02-09 20:29:59 +00:00
Tim Hunt 37cfb5f163 MDL-26337 Improve close_window. Fix bug when $reloadopener is false, and
better usability when it is true.
2011-02-09 20:18:31 +00:00
Tim Hunt 729c372b1b MDL-20636 Quiz index and reviewquestion pages work. 2011-02-09 20:18:28 +00:00
Tim Hunt b2607ccc19 MDL-20636 Now the quiz review page works. 2011-02-09 20:18:24 +00:00
Tim Hunt 167f1562f8 MDL-20636 Merge and fix quiz unit tests. 2011-02-09 20:18:21 +00:00
Tim Hunt 8f37f7fb7a MDL-20636 It is now possible to submit a page of the quiz, and view the summary page. 2011-02-09 20:18:18 +00:00
Tim Hunt a1eb3a4466 MDL-20636 It is now possible to start a quiz attempt.
This includes merging the CSS.
2011-02-09 20:18:15 +00:00
Tim Hunt 7c5bd5bfab MDL-20636 Working towards being able to attempt a quiz. 2011-02-09 20:18:12 +00:00
Tim Hunt 48f1784a16 MDL-20636 Quiz view page now works. 2011-02-09 20:18:09 +00:00
Tim Hunt f255782339 MDL-20636 You can now create a quiz, and edit the settings.
Little else works, but this is just the first step.
2011-02-09 20:18:06 +00:00
Tim Hunt 25302dee78 MDL-20636 Started work converting the quiz. 2011-02-09 20:18:03 +00:00
Tim Hunt 3d0b815cb1 MDL-20636 Try to allow Opaque questions to work in deferred feedback mode, if they want. 2011-02-09 20:18:00 +00:00
Tim Hunt a31689a4eb MDL-20636 Recent bug fix. 2011-02-09 20:17:35 +00:00
Tim Hunt 74c479f212 MDL-20636 Merge branch 'master' into qe2_wip
Conflicts:
	lib/questionlib.php
	question/type/calculated/lang/en/qtype_calculated.php
	question/type/questiontype.php
2011-02-03 11:18:40 +00:00
Tim Hunt 0fafed0f09 MDL-20636 Finish making ddwtos work, mostly. Also various other JS fixes.
This JavaScript really needs to be rewritten to use YUI3.
2011-02-02 19:03:38 +00:00
Tim Hunt 706d06e29b MDL-20636 ddwtos and gapselect qtypes now very nearly work.
Todo rendering questions with files, and ddwtos javascript.
2011-02-01 23:44:40 +00:00
Tim Hunt 9a9e776c55 MDL-20636 Now all the unit tests for the the ddwtos and gapselect qtypes pass. 2011-02-01 11:40:29 +00:00
Tim Hunt 5258903e7f MDL-20636 More work on the ddwtos and gapselect qtypes.
Now there are no longer fatal errors that break other qtypes, but these two qtypes still not work completely. More to come.
2011-01-31 18:07:38 +00:00
Tim Hunt c3e6bd18f5 MDL-20636 work-in-progress converting the ddwtos and gapselect qtypes. 2011-01-28 19:07:33 +00:00
Tim Hunt 6e34cd2924 MDL-20636 Rename the question type editing forms to start with qtype_... 2011-01-28 18:50:20 +00:00
Tim Hunt 14ed1aa2d8 MDL-20636 Clean up. 2011-01-27 19:11:17 +00:00
Tim Hunt 46cf70cc8c MDL-20636 Bug 11408 JME and applet components don't work in IE. 2011-01-27 18:03:35 +00:00
Tim Hunt 26a03a6112 MDL-20636 Fix bad line endings. 2011-01-27 18:02:10 +00:00
Tim Hunt f86390dc94 MDL-20636 Bug 11396 better handle manually graded questions that are graded out of 0.
The key point is that 0 * Ungraded should equal 0, rather than Ungraded.
2011-01-27 17:43:50 +00:00
Tim Hunt d4d64ee3f1 MDL-20636 Bug 11406 Opaque gives radio groups name _rg by default, which QE cannot handle.
As a work around, we specifically look for this variable, and if it is present, include it in the sumbitted data.
2011-01-24 14:54:21 +00:00
Tim Hunt 1c2ed7c501 MDL-20636 Conversion of the OU multi-response question type. 2011-01-18 19:23:26 +00:00
Tim Hunt 2eeb76f845 MDL-20636 Finish conversion of the Opaque qtype/behaviour. 2011-01-18 17:35:03 +00:00
Tim Hunt fe0412432f MDL-20636 And fix XML import unit tests too. 2011-01-18 16:06:05 +00:00
Tim Hunt 5f7cfba7fa MDL-20636 Question XML export unit tests now all pass. 2011-01-18 14:36:40 +00:00
Tim Hunt 49e2bba7cc MDL-20636 Merge import/export formats. XML is not finished (unit test failures). 2011-01-17 18:01:49 +00:00
Tim Hunt 3404cc149d MDL-20636 More work on the opaque question type. You can now set up question engines.
More work still needed on the actual question type.
2011-01-17 17:53:49 +00:00
Tim Hunt c32256af45 MDL-20636 unit tests MDL-26029 fix notices from CheckSpecifie
dFieldsExpectation.
2011-01-17 16:30:09 +00:00
Tim Hunt 04bbc70631 MDL-20636 qtype admin MDL-25987 also allow question type settings to be on an admin_externalpage. 2011-01-14 19:13:45 +00:00
Tim Hunt 2086d94077 MDL-20636 work-in-progress on converting the Opaque question type. 2011-01-14 19:06:52 +00:00
Tim Hunt 24ef491d8f MDL-20636 qtype admin MDL-25987 use get_plugin_list, rather than including questionlib.php.
This should be a small be significant performance win for people who are logged in as admin.
2011-01-14 17:38:11 +00:00
Tim Hunt 2ac0843f4b MDL-20636 Fix behaviour unit tests. (all but opaque) 2011-01-14 16:30:27 +00:00
Tim Hunt 93cadb1ede MDL-20636 Conversion of the match question type. 2011-01-13 20:24:33 +00:00
Tim Hunt 22f24ca87c MDL-20636 html_writer MDL-25971 Support disabled => boolean, as well as disabled => disabled in html_writer::select. 2011-01-13 19:36:30 +00:00
Tim Hunt 8b9dfc2bf6 MDL-20636 Fix editing of multichoice questions. 2011-01-13 18:36:13 +00:00
Tim Hunt ce5e4fb620 MDL-20636 Better icon for missing qtype. 2011-01-13 18:36:11 +00:00
Tim Hunt c9c989a09a MDL-20636 Mostly working conversion of the multichoice question type.
Currently, you get an error on saving the editing form.
2011-01-13 18:36:08 +00:00
Tim Hunt 9481434019 MDL-20636 Conversion of the missingtype question type. 2011-01-13 18:36:05 +00:00
Tim Hunt ec3d4ef543 MDL-20636 Actually, passing to get_question summary is silly. Revert. 2011-01-13 18:36:03 +00:00
Tim Hunt 6d03299dec MDL-20636 Conversion of the essay question type. 2011-01-13 18:36:00 +00:00
Tim Hunt 7a7197482d MDL-20636 Fix if the use of the File API so images work in questions. 2011-01-13 18:35:57 +00:00
Tim Hunt 32d8935c8d MDL-20636 Conversion of the description question type. 2011-01-13 18:35:54 +00:00
Tim Hunt 481dc639b3 MDL-20636 Add all the new styles to the base theme.
Later, some of these should be moved to canvas, or something, but this is good enough for now.
2011-01-13 18:35:52 +00:00
Tim Hunt 068b4594ba MDL-20636 Conversion of the shortanswer question type to the new question engine.
This commit includes minor bug fixes elsewhere in the system.
2011-01-13 18:35:49 +00:00
Tim Hunt cce1b6556c MDL-20636 Fix a bunch of minor errors in the truefalse preview.
Most significantly, all behaviours now work.
2011-01-13 18:35:46 +00:00
Tim Hunt c76145d3e4 MDL-20636 Previewing a truefalse question in deferred feedback mode now works. 2011-01-13 18:35:43 +00:00
Tim Hunt 2b7da64586 MDL-20636 It is now possible to save a truefalse question you have created.
This includes all the necessary DB upgrades.

Also all unit tests in question/type/simpletest and question/type/truefalse now pass.
2011-01-13 18:35:41 +00:00
Tim Hunt f29aeb5afd MDL-20636 converstion of questionlib.php and base questiontype.php, plus other cheanges required to get the question editing page to display. 2011-01-13 18:35:37 +00:00
Tim Hunt 06f8ed54fd MDL-20636 More progress. 2011-01-13 18:35:34 +00:00
Tim Hunt b691dc8510 MDL-20636 todo list 2011-01-13 18:35:32 +00:00
Tim Hunt d1b7e03d5d MDL-20636 Current work-in-progress converting the question engine to Moodle 2.0 2011-01-13 18:35:29 +00:00
2336 changed files with 159721 additions and 70556 deletions
+57 -4
View File
@@ -12,6 +12,8 @@
$hide = optional_param('hide', 0, PARAM_INT);
$show = optional_param('show', 0, PARAM_INT);
$delete = optional_param('delete', 0, PARAM_INT);
$unprotect = optional_param('unprotect', 0, PARAM_INT);
$protect = optional_param('protect', 0, PARAM_INT);
/// Print headings
@@ -24,6 +26,9 @@
$strcourses = get_string('blockinstances', 'admin');
$strname = get_string('name');
$strshowblockcourse = get_string('showblockcourse');
$strprotecthdr = get_string('blockprotect', 'admin'). $OUTPUT->help_icon('blockprotect','admin');
$strprotect = get_string('blockprotect', 'admin');
$strunprotect = get_string('blockunprotect', 'admin');
/// If data submitted, then process and store.
@@ -43,6 +48,36 @@
admin_get_root(true, false); // settings not required - only pages
}
if (!isset($CFG->undeletableblocktypes) || (!is_array($CFG->undeletableblocktypes) && !is_string($CFG->undeletableblocktypes))) {
$undeletableblocktypes = array('navigation', 'settings');
} else if (is_string($CFG->undeletableblocktypes)) {
$undeletableblocktypes = explode(',', $CFG->undeletableblocktypes);
} else {
$undeletableblocktypes = $CFG->undeletableblocktypes;
}
if (!empty($protect) && confirm_sesskey()) {
if (!$block = $DB->get_record('block', array('id'=>$protect))) {
print_error('blockdoesnotexist', 'error');
}
if (!in_array($block->name, $undeletableblocktypes)) {
$undeletableblocktypes[] = $block->name;
set_config('undeletableblocktypes', implode(',', $undeletableblocktypes));
}
admin_get_root(true, false); // settings not required - only pages
}
if (!empty($unprotect) && confirm_sesskey()) {
if (!$block = $DB->get_record('block', array('id'=>$unprotect))) {
print_error('blockdoesnotexist', 'error');
}
if (in_array($block->name, $undeletableblocktypes)) {
$undeletableblocktypes = array_diff($undeletableblocktypes, array($block->name));
set_config('undeletableblocktypes', implode(',', $undeletableblocktypes));
}
admin_get_root(true, false); // settings not required - only pages
}
if (!empty($delete) && confirm_sesskey()) {
echo $OUTPUT->header();
echo $OUTPUT->heading($strmanageblocks);
@@ -114,11 +149,12 @@
$table = new flexible_table('admin-blocks-compatible');
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'delete', 'settings'));
$table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strdelete, $strsettings));
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'undeletable', 'delete', 'settings'));
$table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strprotecthdr, $strdelete, $strsettings));
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
$table->set_attribute('class', 'compatibleblockstable blockstable generaltable');
$table->setup();
$tablerows = array();
foreach ($blocks as $blockid=>$block) {
$blockname = $block->name;
@@ -191,15 +227,32 @@
$version = "$block->version ($plugin->version)";
}
if (!$blockobject) {
// ignore
$undeletable = '';
} else if (in_array($blockname, $undeletableblocktypes)) {
$undeletable = '<a href="blocks.php?unprotect='.$blockid.'&amp;sesskey='.sesskey().'" title="'.$strunprotect.'">'.
'<img src="'.$OUTPUT->pix_url('t/unlock') . '" class="icon" alt="'.$strunprotect.'" /></a>';
} else {
$undeletable = '<a href="blocks.php?protect='.$blockid.'&amp;sesskey='.sesskey().'" title="'.$strprotect.'">'.
'<img src="'.$OUTPUT->pix_url('t/unlock_gray') . '" class="icon" alt="'.$strprotect.'" /></a>';
}
$table->add_data(array(
$row = array(
'<span'.$class.'>'.$strblockname.'</span>',
$blocklist,
'<span'.$class.'>'.$version.'</span>',
$visible,
$undeletable,
$delete,
$settings
));
);
$tablerows[] = array(strip_tags($strblockname), $row); // first element will be used for sorting
}
textlib_get_instance()->asort($tablerows);
foreach ($tablerows as $row) {
$table->add_data($row[1]);
}
$table->print_html();
+14 -23
View File
@@ -115,12 +115,12 @@ if (function_exists('date_default_timezone_set') and function_exists('date_defau
define('MOODLE_INTERNAL', true);
// Check that PHP is of a sufficient version
if (version_compare(phpversion(), "5.2.8") < 0) {
if (version_compare(phpversion(), "5.3.2") < 0) {
$phpversion = phpversion();
// do NOT localise - lang strings would not work here and we CAN NOT move it after installib
echo "Sorry, Moodle 2.0 requires PHP 5.2.8 or later (currently using version $phpversion).\n";
echo "Please upgrade your server software or install latest Moodle 1.9.x instead.";
die;
fwrite(STDERR, "Moodle 2.1 or later requires at least PHP 5.3.2 (currently using version $phpversion).\n");
fwrite(STDERR, "Please upgrade your server software or install older Moodle version.\n");
exit(1);
}
// set up configuration
@@ -376,25 +376,16 @@ if ($interactive) {
}
}
//download lang pack with optional notification
if ($CFG->lang != 'en') {
if ($cd = new component_installer('http://download.moodle.org', 'langpack/2.0', $CFG->lang.'.zip', 'languages.md5', 'lang')) {
if ($cd->install() == COMPONENT_ERROR) {
if ($cd->get_error() == 'remotedownloaderror') {
$a = new stdClass();
$a->url = 'http://download.moodle.org/langpack/2.0/'.$CFG->lang.'.zip';
$a->dest = $CFG->dataroot.'/lang';
cli_problem(get_string($cd->get_error(), 'error', $a));
} else {
cli_problem(get_string($cd->get_error(), 'error'));
}
} else {
// install parent lang if defined
if ($parentlang = get_parent_language()) {
if ($cd = new component_installer('http://download.moodle.org', 'langpack/2.0', $parentlang.'.zip', 'languages.md5', 'lang')) {
$cd->install();
}
}
// download required lang packs
if ($CFG->lang !== 'en') {
$installer = new lang_installer($CFG->lang);
$results = $installer->run();
foreach ($results as $langcode => $langstatus) {
if ($langstatus === lang_installer::RESULT_DOWNLOADERROR) {
$a = new stdClass();
$a->url = $installer->lang_pack_url($langcode);
$a->dest = $CFG->dataroot.'/lang';
cli_problem(get_string('remotedownloaderror', 'error', $a));
}
}
}
+19 -24
View File
@@ -46,6 +46,8 @@ Options:
--adminuser=USERNAME Username for the moodle admin account. Default is admin.
--adminpass=PASSWORD Password for the moodle admin account.
--agree-license Indicates agreement with software license.
--fullname Name of the site
--shortname Name of the site
-h, --help Print out this help
Example:
@@ -53,12 +55,12 @@ Example:
";
// Check that PHP is of a sufficient version
if (version_compare(phpversion(), "5.2.8") < 0) {
if (version_compare(phpversion(), "5.3.2") < 0) {
$phpversion = phpversion();
// do NOT localise - lang strings would not work here and we CAN NOT move it after installib
fwrite(STDERR, "Sorry, Moodle 2.0 requires PHP 5.2.8 or later (currently using version $phpversion).\n");
fwrite(STDERR, "Please upgrade your server software or install latest Moodle 1.9.x instead.\n");
die(1);
fwrite(STDERR, "Moodle 2.1 or later requires at least PHP 5.3.2 (currently using version $phpversion).\n");
fwrite(STDERR, "Please upgrade your server software or install older Moodle version.\n");
exit(1);
}
// Nothing to do if config.php does not exist
@@ -66,7 +68,7 @@ $configfile = dirname(dirname(dirname(__FILE__))).'/config.php';
if (!file_exists($configfile)) {
fwrite(STDERR, 'config.php does not exist, can not continue'); // do not localize
fwrite(STDERR, "\n");
die(1);
exit(1);
}
// Include necessary libs
@@ -93,6 +95,8 @@ list($options, $unrecognized) = cli_get_params(
'lang' => 'en',
'adminuser' => 'admin',
'adminpass' => '',
'fullname' => '',
'shortname' => '',
'agree-license' => false,
'help' => false
),
@@ -121,26 +125,17 @@ if (!file_exists($CFG->dirroot.'/install/lang/'.$options['lang'])) {
}
$CFG->lang = $options['lang'];
//download lang pack with optional notification
if ($CFG->lang != 'en') {
// download required lang packs
if ($CFG->lang !== 'en') {
make_upload_directory('lang');
if ($cd = new component_installer('http://download.moodle.org', 'langpack/2.0', $CFG->lang.'.zip', 'languages.md5', 'lang')) {
if ($cd->install() == COMPONENT_ERROR) {
if ($cd->get_error() == 'remotedownloaderror') {
$a = new stdClass();
$a->url = 'http://download.moodle.org/langpack/2.0/'.$CFG->lang.'.zip';
$a->dest = $CFG->dataroot.'/lang';
cli_problem(get_string($cd->get_error(), 'error', $a));
} else {
cli_problem(get_string($cd->get_error(), 'error'));
}
} else {
// install parent lang if defined
if ($parentlang = get_parent_language()) {
if ($cd = new component_installer('http://download.moodle.org', 'langpack/2.0', $parentlang.'.zip', 'languages.md5', 'lang')) {
$cd->install();
}
}
$installer = new lang_installer($CFG->lang);
$results = $installer->run();
foreach ($results as $langcode => $langstatus) {
if ($langstatus === lang_installer::RESULT_DOWNLOADERROR) {
$a = new stdClass();
$a->url = $installer->lang_pack_url($langcode);
$a->dest = $CFG->dataroot.'/lang';
cli_problem(get_string('remotedownloaderror', 'error', $a));
}
}
}
+1 -1
View File
@@ -94,7 +94,7 @@ $oldversion = "$CFG->release ($CFG->version)";
$newversion = "$release ($version)";
// test environment first
if (!check_moodle_environment($version, $environment_results, false, ENV_SELECT_RELEASE)) {
if (!check_moodle_environment(normalize_version($release), $environment_results, false, ENV_SELECT_RELEASE)) {
$errors = environment_get_errors($environment_results);
cli_heading(get_string('environment', 'admin'));
foreach ($errors as $error) {
+6
View File
@@ -36,6 +36,12 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
if (defined('STDIN')) {
fwrite(STDERR, "ERROR: This script no longer supports CLI, please use admin/cli/cron.php instead\n");
exit(1);
}
// This is a fake CLI script, it is a really ugly hack which emulates
// CLI via web interface, please do not use this hack elsewhere
define('CLI_SCRIPT', true);
+114
View File
@@ -328,4 +328,118 @@
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="2.1" requires="1.9">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="5.0.25">
<FEEDBACK>
<ON_ERROR message="mysql416required" />
</FEEDBACK>
</VENDOR>
<VENDOR name="postgres" version="8.3" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
<VENDOR name="mssql_n" version="9.0" />
<VENDOR name="oracle" version="10.2" />
<VENDOR name="sqlite" version="2.0" />
</DATABASE>
<PHP version="5.3.2" level="required">
</PHP>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_CHECK message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_CHECK message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="optional">
<FEEDBACK>
<ON_CHECK message="gdrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_CHECK message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_CHECK message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="optional">
<FEEDBACK>
<ON_CHECK message="intlrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="40M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="safe_mode" value="0" level="optional">
<FEEDBACK>
<ON_CHECK message="settingsafemode" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+3 -3
View File
@@ -387,10 +387,10 @@ class generator {
.$this->get('number_of_modules')." modules in each section, for each course...");
list($modules_list_sql, $modules_params) =
$DB->get_in_or_equal($this->get('modules_list'), SQL_PARAMS_NAMED, 'param0000', true);
$DB->get_in_or_equal($this->get('modules_list'), SQL_PARAMS_NAMED, 'mod', true);
list($modules_ignored_sql, $ignore_params) =
$DB->get_in_or_equal($this->modules_to_ignore, SQL_PARAMS_NAMED, 'param2000', false);
$DB->get_in_or_equal($this->modules_to_ignore, SQL_PARAMS_NAMED, 'ignore', false);
$wheresql = "name $modules_list_sql AND name $modules_ignored_sql";
$modules = $DB->get_records_select('modules', $wheresql, array_merge($modules_params, $ignore_params));
@@ -622,7 +622,7 @@ class generator {
require_once($CFG->libdir .'/questionlib.php');
require_once($CFG->dirroot .'/mod/quiz/editlib.php');
$questions = array();
$questionsmenu = question_type_menu();
$questionsmenu = question_bank::get_creatable_qtypes();
$questiontypes = array();
foreach ($questionsmenu as $qtype => $qname) {
$questiontypes[] = $qtype;
+6 -2
View File
@@ -39,13 +39,17 @@ while(!feof($fd)) {
$action = clam_handle_infected_file($file,$log->userid,true);
clam_replace_infected_file($file);
list($ctxselect, $ctxjoin) = context_instance_preload_sql('c.id', CONTEXT_COURSE, 'ctx');
$sql = "SELECT c.id, c.fullname $ctxselect FROM {course} c $ctxjoin WHERE c.id = :courseid";
$course = $DB->get_record_sql($sql, array('courseid' => $log->course));
context_instance_preload($course);
$user = $DB->get_record("user", array("id"=>$log->userid));
$course = $DB->get_record("course", array("id"=>$log->course));
$subject = get_string('virusfoundsubject','moodle',format_string($site->fullname));
$a->date = userdate($log->time);
$a->action = $action;
$a->course = $course->fullname;
$a->course = format_string($course->fullname, true, array('context' => get_context_instance(CONTEXT_COURSE, $course->id)));
$a->user = fullname($user);
notify_user($user,$subject,$a);
+43 -27
View File
@@ -30,11 +30,11 @@ if (!file_exists('../config.php')) {
}
// Check that PHP is of a sufficient version as soon as possible
if (version_compare(phpversion(), '5.2.0') < 0) {
if (version_compare(phpversion(), '5.3.2') < 0) {
$phpversion = phpversion();
// do NOT localise - lang strings would not work here and we CAN NOT move it to later place
echo "Sorry, Moodle 2.0 requires PHP 5.2.8 or later (currently using version $phpversion). ";
echo "Please upgrade your server software or use latest Moodle 1.9.x instead.";
echo "Moodle 2.1 or later requires at least PHP 5.3.2 (currently using version $phpversion).<br />";
echo "Please upgrade your server software or install older Moodle version.";
die;
}
@@ -48,6 +48,7 @@ $id = optional_param('id', '', PARAM_TEXT);
$confirmupgrade = optional_param('confirmupgrade', 0, PARAM_BOOL);
$confirmrelease = optional_param('confirmrelease', 0, PARAM_BOOL);
$confirmplugins = optional_param('confirmplugincheck', 0, PARAM_BOOL);
$showallplugins = optional_param('showallplugins', 0, PARAM_BOOL);
$agreelicense = optional_param('agreelicense', 0, PARAM_BOOL);
// Check some PHP server settings
@@ -123,7 +124,7 @@ if (!core_tables_exist()) {
echo $OUTPUT->box($copyrightnotice, 'copyrightnotice');
echo '<br />';
$continue = new single_button(new moodle_url('/admin/index.php', array('lang'=>$CFG->lang, 'agreelicense'=>1)), get_string('continue'), 'get');
echo $OUTPUT->confirm(get_string('doyouagree'), $continue, "http://docs.moodle.org/en/License");
echo $OUTPUT->confirm(get_string('doyouagree'), $continue, "http://docs.moodle.org/dev/License");
echo $OUTPUT->footer();
die;
}
@@ -147,12 +148,12 @@ if (!core_tables_exist()) {
}
}
$releasenoteslink = get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes');
$releasenoteslink = get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/dev/Releases');
$releasenoteslink = str_replace('target="_blank"', 'onclick="this.target=\'_blank\'"', $releasenoteslink); // extremely ugly validation hack
echo $OUTPUT->box($releasenoteslink, 'generalbox releasenoteslink');
require_once($CFG->libdir.'/environmentlib.php');
if (!check_moodle_environment($release, $environment_results, true, ENV_SELECT_RELEASE)) {
if (!check_moodle_environment(normalize_version($release), $environment_results, true, ENV_SELECT_RELEASE)) {
print_upgrade_reload("index.php?agreelicense=1&amp;lang=$CFG->lang");
} else {
echo $OUTPUT->notification(get_string('environmentok', 'admin'), 'notifysuccess');
@@ -193,6 +194,7 @@ if (empty($CFG->version)) {
}
if ($version > $CFG->version) { // upgrade
purge_all_caches();
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
@@ -229,7 +231,7 @@ if ($version > $CFG->version) { // upgrade
$PAGE->set_cacheable(false);
echo $OUTPUT->header();
echo $OUTPUT->heading("Moodle $release");
$releasenoteslink = get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes');
$releasenoteslink = get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/dev/Releases');
$releasenoteslink = str_replace('target="_blank"', 'onclick="this.target=\'_blank\'"', $releasenoteslink); // extremely ugly validation hack
echo $OUTPUT->box($releasenoteslink);
@@ -255,17 +257,19 @@ if ($version > $CFG->version) { // upgrade
$PAGE->set_title($strplugincheck);
$PAGE->set_heading($strplugincheck);
$PAGE->set_cacheable(false);
echo $OUTPUT->header();
echo $OUTPUT->heading($strplugincheck);
echo $OUTPUT->box_start('generalbox', 'notice');
print_string('pluginchecknotice');
echo $OUTPUT->box_end();
print_plugin_tables();
$output = $PAGE->get_renderer('core', 'admin');
$pluginman = plugin_manager::instance();
echo $output->header();
echo $output->box_start('generalbox');
echo $output->container(get_string('pluginchecknotice', 'core_plugin'), 'generalbox', 'notice');
echo $output->plugins_check($pluginman->get_plugins(), array('full' => $showallplugins));
echo $output->box_end();
print_upgrade_reload('index.php?confirmupgrade=1&amp;confirmrelease=1');
$button = new single_button(new moodle_url('index.php', array('confirmupgrade'=>1, 'confirmrelease'=>1, 'confirmplugincheck'=>1)), get_string('upgradestart', 'admin'), 'get');
$button->class = 'continuebutton';
echo $OUTPUT->render($button);
echo $OUTPUT->footer();
echo $output->render($button);
echo $output->footer();
die();
} else {
@@ -293,17 +297,19 @@ if (moodle_needs_upgrading()) {
$PAGE->set_title($strplugincheck);
$PAGE->set_heading($strplugincheck);
$PAGE->set_cacheable(false);
echo $OUTPUT->header();
echo $OUTPUT->heading($strplugincheck);
echo $OUTPUT->box_start('generalbox', 'notice');
print_string('pluginchecknotice');
echo $OUTPUT->box_end();
print_plugin_tables();
$output = $PAGE->get_renderer('core', 'admin');
$pluginman = plugin_manager::instance();
echo $output->header();
echo $output->box_start('generalbox');
echo $output->container(get_string('pluginchecknotice', 'core_plugin'), 'generalbox', 'notice');
echo $output->plugins_check($pluginman->get_plugins(), array('full' => $showallplugins));
echo $output->box_end();
print_upgrade_reload('index.php');
$button = new single_button(new moodle_url('index.php', array('confirmplugincheck'=>1)), get_string('upgradestart', 'admin'), 'get');
$button->class = 'continuebutton';
echo $OUTPUT->render($button);
echo $OUTPUT->footer();
echo $output->render($button);
echo $output->footer();
die();
}
}
@@ -349,7 +355,6 @@ if (during_initial_install()) {
}
// login user and let him set password and admin details
$adminuser->newadminuser = 1;
message_set_default_message_preferences($adminuser);
complete_user_login($adminuser, false);
redirect("$CFG->wwwroot/user/editadvanced.php?id=$adminuser->id"); // Edit thyself
@@ -402,6 +407,17 @@ if (any_new_admin_settings($adminroot)){
admin_externalpage_setup('adminnotifications');
echo $OUTPUT->header();
// Unstable code warning
if (isset($maturity)) {
if ($maturity < MATURITY_STABLE) {
$maturitylevel = get_string('maturity'.$maturity, 'admin');
echo $OUTPUT->box(
get_string('maturitycoreinfo', 'admin', $maturitylevel) . ' ' .
$OUTPUT->doc_link('admin/versions', get_string('morehelp')),
'generalbox adminwarning maturityinfo');
}
}
if ($insecuredataroot == INSECURE_DATAROOT_WARNING) {
echo $OUTPUT->box(get_string('datarootsecuritywarning', 'admin', $CFG->dataroot), 'generalbox adminwarning');
} else if ($insecuredataroot == INSECURE_DATAROOT_ERROR) {
@@ -440,10 +456,10 @@ if (!empty($CFG->maintenance_enabled)) {
//////////////////////////////////////////////////////////////////////////////////////////////////
//// IT IS ILLEGAL AND A VIOLATION OF THE GPL TO HIDE, REMOVE OR MODIFY THIS COPYRIGHT NOTICE ///
$copyrighttext = '<a href="http://moodle.org/">Moodle</a> '.
'<a href="http://docs.moodle.org/en/Release" title="'.$CFG->version.'">'.$CFG->release.'</a><br />'.
'<a href="http://docs.moodle.org/dev/Releases" title="'.$CFG->version.'">'.$CFG->release.'</a><br />'.
'Copyright &copy; 1999 onwards, Martin Dougiamas<br />'.
'and <a href="http://docs.moodle.org/en/Credits">many other contributors</a>.<br />'.
'<a href="http://docs.moodle.org/en/License">GNU Public License</a>';
'and <a href="http://docs.moodle.org/dev/Credits">many other contributors</a>.<br />'.
'<a href="http://docs.moodle.org/dev/License">GNU Public License</a>';
echo $OUTPUT->box($copyrighttext, 'copyright');
//////////////////////////////////////////////////////////////////////////////////////////////////
+50 -96
View File
@@ -18,7 +18,7 @@
/**
* Fetches language packages from download.moodle.org server
*
* Language packages are available at http://download.moodle.org/langpack/2.0/
* Language packages are available at http://download.moodle.org/langpack/
* in ZIP format together with a file languages.md5 containing their hashes
* and meta info.
* Locally, language packs are saved into $CFG->dataroot/lang/
@@ -33,8 +33,6 @@ require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/filelib.php');
require_once($CFG->libdir.'/componentlib.class.php');
$thisversion = '2.0'; // TODO this information should be taken from version.php or similar source
admin_externalpage_setup('langimport');
if (!empty($CFG->skiplangupgrade)) {
@@ -53,11 +51,6 @@ define('INSTALLATION_OF_SELECTED_LANG', 2);
define('DELETION_OF_SELECTED_LANG', 4);
define('UPDATE_ALL_LANG', 5);
//reset and diagnose lang cache permissions
remove_dir($CFG->dataroot.'/cache/languages');
if (file_exists($CFG->dataroot.'/cache/languages')) {
print_error('cannotdeletelangcache', 'error');
}
get_string_manager()->reset_caches();
$notice_ok = array();
@@ -68,41 +61,22 @@ if (($mode == INSTALLATION_OF_SELECTED_LANG) and confirm_sesskey() and !empty($p
make_upload_directory('temp');
make_upload_directory('lang');
if (is_array($pack)) {
$packs = $pack;
} else {
$packs = array($pack);
}
foreach ($packs as $pack) {
if ($cd = new component_installer('http://download.moodle.org', 'langpack/'.$thisversion, $pack.'.zip', 'languages.md5', 'lang')) {
$status = $cd->install();
switch ($status) {
case COMPONENT_ERROR:
if ($cd->get_error() == 'remotedownloaderror') {
$a = new stdClass();
$a->url = 'http://download.moodle.org/langpack/'.$thisversion.'/'.$pack.'.zip';
$a->dest = $CFG->dataroot.'/lang';
print_error($cd->get_error(), 'error', 'langimport.php', $a);
} else {
print_error($cd->get_error(), 'error', 'langimport.php');
}
break;
case COMPONENT_INSTALLED:
$notice_ok[] = get_string('langpackinstalled','admin',$pack);
if ($parentlang = get_parent_language($pack)) {
// install also parent pack if specified
if ($cd = new component_installer('http://download.moodle.org', 'langpack/'.$thisversion,
$parentlang.'.zip', 'languages.md5', 'lang')) {
$cd->install();
}
}
break;
case COMPONENT_UPTODATE:
break;
}
} else {
echo $OUTPUT->notification('Had an unspecified error with the component installer, sorry.');
$installer = new lang_installer($pack);
$results = $installer->run();
foreach ($results as $langcode => $langstatus) {
switch ($langstatus) {
case lang_installer::RESULT_DOWNLOADERROR:
$a = new stdClass();
$a->url = $installer->lang_pack_url($langcode);
$a->dest = $CFG->dataroot.'/lang';
print_error('remotedownloaderror', 'error', 'langimport.php', $a);
break;
case lang_installer::RESULT_INSTALLED:
$notice_ok[] = get_string('langpackinstalled', 'admin', $langcode);
break;
case lang_installer::RESULT_UPTODATE:
$notice_ok[] = get_string('langpackuptodate', 'admin', $langcode);
break;
}
}
}
@@ -141,7 +115,9 @@ if ($mode == DELETION_OF_SELECTED_LANG and !empty($uninstalllang)) {
if ($mode == UPDATE_ALL_LANG) {
set_time_limit(0);
if (!$availablelangs = get_remote_list_of_languages()) {
$installer = new lang_installer();
if (!$availablelangs = $installer->get_remote_list_of_languages()) {
print_error('cannotdownloadlanguageupdatelist', 'error');
}
$md5array = array(); // (string)langcode => (string)md5
@@ -176,8 +152,8 @@ if ($mode == UPDATE_ALL_LANG) {
make_upload_directory('temp');
make_upload_directory('lang');
$updated = false; // any packs updated?
foreach ($neededlangs as $pack) {
// clean-up currently installed versions of the packs
foreach ($neededlangs as $packindex => $pack) {
if ($pack == 'en') {
continue;
}
@@ -190,41 +166,38 @@ if ($mode == UPDATE_ALL_LANG) {
if (file_exists($dest1)) {
if (!remove_dir($dest1)) {
$notice_error[] = 'Could not delete old directory '.$dest1.', update of '.$pack.' failed, please check permissions.';
unset($neededlangs[$packindex]);
continue;
}
}
if (file_exists($dest2)) {
if (!remove_dir($dest2)) {
$notice_error[] = 'Could not delete old directory '.$dest2.', update of '.$pack.' failed, please check permissions.';
unset($neededlangs[$packindex]);
continue;
}
}
}
// copy and unzip new version
if ($cd = new component_installer('http://download.moodle.org', 'langpack/'.$thisversion, $pack.'.zip', 'languages.md5', 'lang')) {
$status = $cd->install();
switch ($status) {
case COMPONENT_ERROR:
if ($cd->get_error() == 'remotedownloaderror') {
$a = new stdClass();
$a->url = 'http://download.moodle.org/langpack/'.$thisversion.'/'.$pack.'.zip';
$a->dest = $CFG->dataroot.'/lang';
print_error($cd->get_error(), 'error', 'langimport.php', $a);
} else {
print_error($cd->get_error(), 'error', 'langimport.php');
}
break;
case COMPONENT_UPTODATE:
// should not get here
break;
case COMPONENT_INSTALLED:
$notice_ok[] = get_string('langpackupdated', 'admin', $pack);
$updated = true;
break;
}
// install all needed language packs
$installer->set_queue($neededlangs);
$results = $installer->run();
$updated = false; // any packs updated?
foreach ($results as $langcode => $langstatus) {
switch ($langstatus) {
case lang_installer::RESULT_DOWNLOADERROR:
$a = new stdClass();
$a->url = $installer->lang_pack_url($langcode);
$a->dest = $CFG->dataroot.'/lang';
print_error('remotedownloaderror', 'error', 'langimport.php', $a);
break;
case lang_installer::RESULT_INSTALLED:
$updated = true;
$notice_ok[] = get_string('langpackinstalled', 'admin', $langcode);
break;
case lang_installer::RESULT_UPTODATE:
$notice_ok[] = get_string('langpackuptodate', 'admin', $langcode);
break;
}
}
@@ -233,6 +206,8 @@ if ($mode == UPDATE_ALL_LANG) {
} else {
$notice_ok[] = get_string('nolangupdateneeded','admin');
}
unset($installer);
}
get_string_manager()->reset_caches();
@@ -244,7 +219,7 @@ $installedlangs = get_string_manager()->get_list_of_translations(true);
$missingparents = array();
foreach ($installedlangs as $installedlang => $unused) {
$parent = get_parent_language($installedlang);
if (empty($parent) or ($parent === 'en')) {
if (empty($parent)) {
continue;
}
if (!isset($installedlangs[$parent])) {
@@ -252,7 +227,9 @@ foreach ($installedlangs as $installedlang => $unused) {
}
}
if ($availablelangs = get_remote_list_of_languages()) {
$installer = new lang_installer();
if ($availablelangs = $installer->get_remote_list_of_languages()) {
$remote = true;
} else {
$remote = false;
@@ -362,26 +339,3 @@ function is_installed_lang($lang, $md5check) {
}
return false;
}
/**
* Returns the list of available language packs from download.moodle.org
*
* @return array|bool false if can not download
*/
function get_remote_list_of_languages() {
$source = 'http://download.moodle.org/langpack/2.0/languages.md5';
$availablelangs = array();
if ($content = download_file_content($source)) {
$alllines = explode("\n", $content);
foreach($alllines as $line) {
if (!empty($line)){
$availablelangs[] = explode(',', $line);
}
}
return $availablelangs;
} else {
return false;
}
}
+39
View File
@@ -0,0 +1,39 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This file contains functions used by the admin pages
*
* @since 2.1
* @package admin
* @copyright 2011 Andrew Davis
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Return a list of page types
* @param string $pagetype current page type
* @param stdClass $parentcontext Block's parent context
* @param stdClass $currentcontext Current context of block
*/
function admin_page_type_list($pagetype, $parentcontext, $currentcontext) {
$array = array(
'admin-*' => get_string('page-admin-x', 'pagetype'),
$pagetype => get_string('page-admin-current', 'pagetype')
);
return $array;
}
+1 -1
View File
@@ -21,7 +21,7 @@
* Displays the list of found local plugins, their version (if found) and
* a link to delete the local plugin.
*
* @see http://docs.moodle.org/en/Development:Local_customisation
* @see http://docs.moodle.org/dev/Local_customisation
* @package admin
* @copyright 2010 David Mudrak <david.mudrak@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+70
View File
@@ -0,0 +1,70 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Message outputs configuration page
*
* @package message
* @copyright 2011 Lancaster University Network Services Limited
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../config.php');
require_once($CFG->dirroot . '/message/lib.php');
require_once($CFG->libdir.'/adminlib.php');
// This is an admin page
admin_externalpage_setup('managemessageoutputs');
// Require site configuration capability
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
// Get the submitted params
$disable = optional_param('disable', 0, PARAM_INT);
$enable = optional_param('enable', 0, PARAM_INT);
if (!empty($disable) && confirm_sesskey()) {
if (!$processor = $DB->get_record('message_processors', array('id'=>$disable))) {
print_error('outputdoesnotexist', 'message');
}
$DB->set_field('message_processors', 'enabled', '0', array('id'=>$processor->id)); // Disable output
}
if (!empty($enable) && confirm_sesskey() ) {
if (!$processor = $DB->get_record('message_processors', array('id'=>$enable))) {
print_error('outputdoesnotexist', 'message');
}
$DB->set_field('message_processors', 'enabled', '1', array('id'=>$processor->id)); // Enable output
}
if ($disable || $enable) {
$url = new moodle_url('message.php');
redirect($url);
}
// Page settings
$PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
// Grab the renderer
$renderer = $PAGE->get_renderer('core', 'message');
// Display the manage message outputs interface
$processors = get_message_processors();
$messageoutputs = $renderer->manage_messageoutputs($processors);
// Display the page
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('managemessageoutputs', 'message'));
echo $messageoutputs;
echo $OUTPUT->footer();
+14 -4
View File
@@ -42,12 +42,20 @@ function online_assignment_cleanup($output=false) {
/// get a list of all courses on this site
$courses = $DB->get_records('course');
list($ctxselect, $ctxjoin) = context_instance_preload_sql('c.id', CONTEXT_COURSE, 'ctx');
$sql = "SELECT c.* $ctxselect FROM {course} c $ctxjoin";
$courses = $DB->get_records_sql($sql);
/// cycle through each course
foreach ($courses as $course) {
context_instance_preload($course);
$context = get_context_instance(CONTEXT_COURSE, $course->id);
$fullname = empty($course->fullname) ? 'Course: '.$course->id : $course->fullname;
if (empty($course->fullname)) {
$fullname = get_string('course').': '.$course->id;
} else {
$fullname = format_string($course->fullname, true, array('context' => $context));
}
if ($output) echo $OUTPUT->heading($fullname);
/// retrieve a list of sections beyond what is currently being shown
@@ -96,7 +104,9 @@ function online_assignment_cleanup($output=false) {
/// grab the section record
if (!($section = $DB->get_record('course_sections', array('id'=>$newsection)))) {
if ($output) echo 'Serious error: Cannot retrieve section: '.$newsection.' for course: '. format_string($course->fullname) .'<br />';
if ($output) {
echo 'Serious error: Cannot retrieve section: '.$newsection.' for course: '. $fullname .'<br />';
}
continue;
}
@@ -117,7 +127,7 @@ function online_assignment_cleanup($output=false) {
/// grab the old section record
if (!($section = $DB->get_record('course_sections', array('id'=>$xsection->id)))) {
if ($output) echo 'Serious error: Cannot retrieve old section: '.$xsection->id.' for course: '.$course->fullname.'<br />';
if ($output) echo 'Serious error: Cannot retrieve old section: '.$xsection->id.' for course: '.$fullname.'<br />';
continue;
}
+41
View File
@@ -0,0 +1,41 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* UI for general plugins management
*
* @package core
* @subpackage admin
* @copyright 2011 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(dirname(__FILE__)) . '/config.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->libdir . '/pluginlib.php');
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
admin_externalpage_setup('pluginsoverview');
$output = $PAGE->get_renderer('core', 'admin');
$pluginman = plugin_manager::instance();
echo $output->header();
echo $output->heading(get_string('pluginsoverview', 'core_admin'));
echo $output->box_start('generalbox');
echo $output->plugins_control_panel($pluginman->get_plugins());
echo $output->box_end();
echo $output->footer();
+302
View File
@@ -0,0 +1,302 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Allows the admin to manage question behaviours.
*
* @package moodlecore
* @subpackage questionengine
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../config.php');
require_once($CFG->libdir . '/questionlib.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->libdir . '/tablelib.php');
// Check permissions.
require_login();
$systemcontext = get_context_instance(CONTEXT_SYSTEM);
require_capability('moodle/question:config', $systemcontext);
admin_externalpage_setup('manageqbehaviours');
$thispageurl = new moodle_url('/admin/qbehaviours.php');
$behaviours = get_plugin_list('qbehaviour');
// Get some data we will need - question counts and which types are needed.
$counts = $DB->get_records_sql_menu("
SELECT behaviour, COUNT(1)
FROM {question_attempts} GROUP BY behaviour");
$needed = array();
$archetypal = array();
foreach ($behaviours as $behaviour => $notused) {
if (!array_key_exists($behaviour, $counts)) {
$counts[$behaviour] = 0;
}
$needed[$behaviour] = $counts[$behaviour] > 0;
$archetypal[$behaviour] = question_engine::is_behaviour_archetypal($behaviour);
}
foreach ($behaviours as $behaviour => $notused) {
foreach (question_engine::get_behaviour_required_behaviours($behaviour) as $reqbehaviour) {
$needed[$reqbehaviour] = true;
}
}
foreach ($counts as $behaviour => $count) {
if (!array_key_exists($behaviour, $behaviours)) {
$counts['missingtype'] += $count;
}
}
// Work of the correct sort order.
$config = get_config('question');
$sortedbehaviours = array();
foreach ($behaviours as $behaviour => $notused) {
$sortedbehaviours[$behaviour] = question_engine::get_behaviour_name($behaviour);
}
if (!empty($config->behavioursortorder)) {
$sortedbehaviours = question_engine::sort_behaviours($sortedbehaviours,
$config->behavioursortorder, '');
}
if (!empty($config->disabledbehaviours)) {
$disabledbehaviours = explode(',', $config->disabledbehaviours);
} else {
$disabledbehaviours = array();
}
// Process actions ============================================================
// Disable.
if (($disable = optional_param('disable', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
if (!isset($behaviours[$disable])) {
print_error('unknownbehaviour', 'question', $thispageurl, $disable);
}
if (array_search($disable, $disabledbehaviours) === false) {
$disabledbehaviours[] = $disable;
set_config('disabledbehaviours', implode(',', $disabledbehaviours), 'question');
}
redirect($thispageurl);
}
// Enable.
if (($enable = optional_param('enable', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
if (!isset($behaviours[$enable])) {
print_error('unknownbehaviour', 'question', $thispageurl, $enable);
}
if (!$archetypal[$enable]) {
print_error('cannotenablebehaviour', 'question', $thispageurl, $enable);
}
if (($key = array_search($enable, $disabledbehaviours)) !== false) {
unset($disabledbehaviours[$key]);
set_config('disabledbehaviours', implode(',', $disabledbehaviours), 'question');
}
redirect($thispageurl);
}
// Move up in order.
if (($up = optional_param('up', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
if (!isset($behaviours[$up])) {
print_error('unknownbehaviour', 'question', $thispageurl, $up);
}
// This function works fine for behaviours, as well as qtypes.
$neworder = question_reorder_qtypes($sortedbehaviours, $up, -1);
set_config('behavioursortorder', implode(',', $neworder), 'question');
redirect($thispageurl);
}
// Move down in order.
if (($down = optional_param('down', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
if (!isset($behaviours[$down])) {
print_error('unknownbehaviour', 'question', $thispageurl, $down);
}
// This function works fine for behaviours, as well as qtypes.
$neworder = question_reorder_qtypes($sortedbehaviours, $down, +1);
set_config('behavioursortorder', implode(',', $neworder), 'question');
redirect($thispageurl);
}
// Delete.
if (($delete = optional_param('delete', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
// Check it is OK to delete this question type.
if ($delete == 'missing') {
print_error('cannotdeletemissingbehaviour', 'question', $thispageurl);
}
if (!isset($behaviours[$delete])) {
print_error('unknownbehaviour', 'question', $thispageurl, $delete);
}
$behaviourname = $sortedbehaviours[$delete];
if ($counts[$delete] > 0) {
print_error('cannotdeletebehaviourinuse', 'question', $thispageurl, $behaviourname);
}
if ($needed[$delete] > 0) {
print_error('cannotdeleteneededbehaviour', 'question', $thispageurl, $behaviourname);
}
// If not yet confirmed, display a confirmation message.
if (!optional_param('confirm', '', PARAM_BOOL)) {
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('deletebehaviourareyousure', 'question', $behaviourname));
echo $OUTPUT->confirm(
get_string('deletebehaviourareyousuremessage', 'question', $behaviourname),
new moodle_url($thispageurl, array('delete' => $delete, 'confirm' => 1)),
$thispageurl);
echo $OUTPUT->footer();
exit;
}
// Do the deletion.
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('deletingbehaviour', 'question', $behaviourname));
// Delete any configuration records.
if (!unset_all_config_for_plugin('qbehaviour_' . $delete)) {
echo $OUTPUT->notification(get_string('errordeletingconfig', 'admin', 'qbehaviour_' . $delete));
}
if (($key = array_search($delete, $disabledbehaviours)) !== false) {
unset($disabledbehaviours[$key]);
set_config('disabledbehaviours', implode(',', $disabledbehaviours), 'question');
}
$behaviourorder = explode(',', $config->behavioursortorder);
if (($key = array_search($delete, $behaviourorder)) !== false) {
unset($behaviourorder[$key]);
set_config('behavioursortorder', implode(',', $behaviourorder), 'question');
}
// Then the tables themselves
drop_plugin_tables($delete, get_plugin_directory('qbehaviour', $delete) . '/db/install.xml', false);
// Remove event handlers and dequeue pending events
events_uninstall('qbehaviour_' . $delete);
$a->behaviour = $behaviourname;
$a->directory = get_plugin_directory('qbehaviour', $delete);
echo $OUTPUT->box(get_string('qbehaviourdeletefiles', 'question', $a), 'generalbox', 'notice');
echo $OUTPUT->continue_button($thispageurl);
echo $OUTPUT->footer();
exit;
}
// End of process actions ==================================================
// Print the page heading.
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('manageqbehaviours', 'admin'));
// Set up the table.
$table = new flexible_table('qbehaviouradmintable');
$table->define_baseurl($thispageurl);
$table->define_columns(array('behaviour', 'numqas', 'version', 'requires',
'available', 'delete'));
$table->define_headers(array(get_string('behaviour', 'question'), get_string('numqas', 'question'),
get_string('version'), get_string('requires', 'admin'),
get_string('availableq', 'question'), get_string('delete')));
$table->set_attribute('id', 'qbehaviours');
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
$table->setup();
// Add a row for each question type.
foreach ($sortedbehaviours as $behaviour => $behaviourname) {
$row = array();
// Question icon and name.
$row[] = $behaviourname;
// Count
$row[] = $counts[$behaviour];
// Question version number.
$version = get_config('qbehaviour_' . $behaviour, 'version');
if ($version) {
$row[] = $version;
} else {
$row[] = html_writer::tag('span', get_string('nodatabase', 'admin'), array('class' => 'disabled'));
}
// Other question types required by this one.
$requiredbehaviours = question_engine::get_behaviour_required_behaviours($behaviour);
if (!empty($requiredbehaviours)) {
$strrequiredbehaviours = array();
foreach ($requiredbehaviours as $required) {
$strrequiredbehaviours[] = $sortedbehaviours[$required];
}
$row[] = implode(', ', $strrequiredbehaviours);
} else {
$row[] = '';
}
// Are people allowed to create new questions of this type?
$rowclass = '';
if ($archetypal[$behaviour]) {
$enabled = array_search($behaviour, $disabledbehaviours) === false;
$icons = question_behaviour_enable_disable_icons($behaviour, $enabled);
if (!$enabled) {
$rowclass = 'dimmed_text';
}
} else {
$icons = $OUTPUT->spacer() . ' ';
}
// Move icons.
$icons .= question_behaviour_icon_html('up', $behaviour, 't/up', get_string('up'), null);
$icons .= question_behaviour_icon_html('down', $behaviour, 't/down', get_string('down'), null);
$row[] = $icons;
// Delete link, if available.
if ($needed[$behaviour]) {
$row[] = '';
} else {
$row[] = html_writer::link(new moodle_url($thispageurl,
array('delete' => $behaviour, 'sesskey' => sesskey())), get_string('delete'),
array('title' => get_string('uninstallbehaviour', 'question')));
}
$table->add_data($row, $rowclass);
}
$table->finish_output();
echo $OUTPUT->footer();
function question_behaviour_enable_disable_icons($behaviour, $enabled) {
if ($enabled) {
return question_behaviour_icon_html('disable', $behaviour, 'i/hide',
get_string('enabled', 'question'), get_string('disable'));
} else {
return question_behaviour_icon_html('enable', $behaviour, 'i/show',
get_string('disabled', 'question'), get_string('enable'));
}
}
function question_behaviour_icon_html($action, $behaviour, $icon, $alt, $tip) {
global $OUTPUT;
return $OUTPUT->action_icon(new moodle_url('/admin/qbehaviours.php',
array($action => $behaviour, 'sesskey' => sesskey())),
new pix_icon($icon, $alt, 'moodle', array('title' => '')),
null, array('title' => $tip)) . ' ';
}
+267 -248
View File
@@ -1,293 +1,312 @@
<?php
// Allows the admin to manage question types.
require_once(dirname(__FILE__) . '/../config.php');
require_once($CFG->libdir . '/questionlib.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->libdir . '/tablelib.php');
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/// Check permissions.
require_login();
$systemcontext = get_context_instance(CONTEXT_SYSTEM);
require_capability('moodle/question:config', $systemcontext);
$canviewreports = has_capability('report/questioninstances:view', $systemcontext);
/**
* Allows the admin to manage question types.
*
* @package moodlecore
* @subpackage questionbank
* @copyright 2008 Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
admin_externalpage_setup('manageqtypes');
/// Get some data we will need - question counts and which types are needed.
$counts = $DB->get_records_sql("
SELECT qtype, COUNT(1) as numquestions, SUM(hidden) as numhidden
FROM {question} GROUP BY qtype", array());
$needed = array();
foreach ($QTYPES as $qtypename => $qtype) {
if (!isset($counts[$qtypename])) {
$counts[$qtypename] = new stdClass;
$counts[$qtypename]->numquestions = 0;
$counts[$qtypename]->numhidden = 0;
}
$needed[$qtypename] = $counts[$qtypename]->numquestions > 0;
$counts[$qtypename]->numquestions -= $counts[$qtypename]->numhidden;
require_once(dirname(__FILE__) . '/../config.php');
require_once($CFG->libdir . '/questionlib.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->libdir . '/tablelib.php');
// Check permissions.
require_login();
$systemcontext = get_context_instance(CONTEXT_SYSTEM);
require_capability('moodle/question:config', $systemcontext);
$canviewreports = has_capability('report/questioninstances:view', $systemcontext);
admin_externalpage_setup('manageqtypes');
$thispageurl = new moodle_url('/admin/qtypes.php');
$qtypes = question_bank::get_all_qtypes();
// Get some data we will need - question counts and which types are needed.
$counts = $DB->get_records_sql("
SELECT qtype, COUNT(1) as numquestions, SUM(hidden) as numhidden
FROM {question} GROUP BY qtype", array());
$needed = array();
foreach ($qtypes as $qtypename => $qtype) {
if (!isset($counts[$qtypename])) {
$counts[$qtypename] = new stdClass;
$counts[$qtypename]->numquestions = 0;
$counts[$qtypename]->numhidden = 0;
}
$needed['missingtype'] = true; // The system needs the missing question type.
foreach ($QTYPES as $qtypename => $qtype) {
foreach ($qtype->requires_qtypes() as $reqtype) {
$needed[$reqtype] = true;
}
$needed[$qtypename] = $counts[$qtypename]->numquestions > 0;
$counts[$qtypename]->numquestions -= $counts[$qtypename]->numhidden;
}
$needed['missingtype'] = true; // The system needs the missing question type.
foreach ($qtypes as $qtypename => $qtype) {
foreach ($qtype->requires_qtypes() as $reqtype) {
$needed[$reqtype] = true;
}
foreach ($counts as $qtypename => $count) {
if (!isset($QTYPES[$qtypename])) {
$counts['missingtype']->numquestions += $count->numquestions - $count->numhidden;
$counts['missingtype']->numhidden += $count->numhidden;
}
}
foreach ($counts as $qtypename => $count) {
if (!isset($qtypes[$qtypename])) {
$counts['missingtype']->numquestions += $count->numquestions - $count->numhidden;
$counts['missingtype']->numhidden += $count->numhidden;
}
}
// Work of the correct sort order.
$config = get_config('question');
$sortedqtypes = array();
foreach ($qtypes as $qtypename => $qtype) {
$sortedqtypes[$qtypename] = $qtype->local_name();
}
$sortedqtypes = question_bank::sort_qtype_array($sortedqtypes, $config);
// Process actions ============================================================
// Disable.
if (($disable = optional_param('disable', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
if (!isset($qtypes[$disable])) {
print_error('unknownquestiontype', 'question', $thispageurl, $disable);
}
/// Work of the correct sort order.
$config = get_config('question');
$sortedqtypes = array();
foreach ($QTYPES as $qtypename => $qtype) {
$sortedqtypes[$qtypename] = $qtype->local_name();
}
$sortedqtypes = question_sort_qtype_array($sortedqtypes, $config);
set_config($disable . '_disabled', 1, 'question');
redirect($thispageurl);
}
/// Process actions ============================================================
// Disable.
if (($disable = optional_param('disable', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
if (!isset($QTYPES[$disable])) {
print_error('unknownquestiontype', 'question', admin_url('qtypes.php'), $disable);
}
set_config($disable . '_disabled', 1, 'question');
redirect(admin_url('qtypes.php'));
// Enable.
if (($enable = optional_param('enable', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
if (!isset($qtypes[$enable])) {
print_error('unknownquestiontype', 'question', $thispageurl, $enable);
}
// Enable.
if (($enable = optional_param('enable', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
if (!isset($QTYPES[$enable])) {
print_error('unknownquestiontype', 'question', admin_url('qtypes.php'), $enable);
}
if (!$QTYPES[$enable]->menu_name()) {
print_error('cannotenable', 'question', admin_url('qtypes.php'), $enable);
}
unset_config($enable . '_disabled', 'question');
redirect(admin_url('qtypes.php'));
if (!$qtypes[$enable]->menu_name()) {
print_error('cannotenable', 'question', $thispageurl, $enable);
}
// Move up in order.
if (($up = optional_param('up', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
if (!isset($QTYPES[$up])) {
print_error('unknownquestiontype', 'question', admin_url('qtypes.php'), $up);
}
unset_config($enable . '_disabled', 'question');
redirect($thispageurl);
}
$neworder = question_reorder_qtypes($sortedqtypes, $up, -1);
question_save_qtype_order($neworder, $config);
redirect(admin_url('qtypes.php'));
// Move up in order.
if (($up = optional_param('up', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
if (!isset($qtypes[$up])) {
print_error('unknownquestiontype', 'question', $thispageurl, $up);
}
// Move down in order.
if (($down = optional_param('down', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
if (!isset($QTYPES[$down])) {
print_error('unknownquestiontype', 'question', admin_url('qtypes.php'), $down);
}
$neworder = question_reorder_qtypes($sortedqtypes, $up, -1);
question_save_qtype_order($neworder, $config);
redirect($thispageurl);
}
$neworder = question_reorder_qtypes($sortedqtypes, $down, +1);
question_save_qtype_order($neworder, $config);
redirect(admin_url('qtypes.php'));
// Move down in order.
if (($down = optional_param('down', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
if (!isset($qtypes[$down])) {
print_error('unknownquestiontype', 'question', $thispageurl, $down);
}
// Delete.
if (($delete = optional_param('delete', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
// Check it is OK to delete this question type.
if ($delete == 'missingtype') {
print_error('cannotdeletemissingqtype', 'admin', admin_url('qtypes.php'));
}
$neworder = question_reorder_qtypes($sortedqtypes, $down, +1);
question_save_qtype_order($neworder, $config);
redirect($thispageurl);
}
if (!isset($QTYPES[$delete])) {
print_error('unknownquestiontype', 'question', admin_url('qtypes.php'), $delete);
}
// Delete.
if (($delete = optional_param('delete', '', PARAM_SAFEDIR)) && confirm_sesskey()) {
// Check it is OK to delete this question type.
if ($delete == 'missingtype') {
print_error('cannotdeletemissingqtype', 'question', $thispageurl);
}
$qtypename = $QTYPES[$delete]->local_name();
if ($counts[$delete]->numquestions + $counts[$delete]->numhidden > 0) {
print_error('cannotdeleteqtypeinuse', 'admin', admin_url('qtypes.php'), $qtypename);
}
if (!isset($qtypes[$delete])) {
print_error('unknownquestiontype', 'question', $thispageurl, $delete);
}
if ($needed[$delete] > 0) {
print_error('cannotdeleteqtypeneeded', 'admin', admin_url('qtypes.php'), $qtypename);
}
$qtypename = $qtypes[$delete]->local_name();
if ($counts[$delete]->numquestions + $counts[$delete]->numhidden > 0) {
print_error('cannotdeleteqtypeinuse', 'question', $thispageurl, $qtypename);
}
// If not yet confirmed, display a confirmation message.
if (!optional_param('confirm', '', PARAM_BOOL)) {
$qtypename = $QTYPES[$delete]->local_name();
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('deleteqtypeareyousure', 'admin', $qtypename));
echo $OUTPUT->confirm(get_string('deleteqtypeareyousuremessage', 'admin', $qtypename),
admin_url('qtypes.php?delete=' . $delete . '&confirm=1'),
admin_url('qtypes.php'));
echo $OUTPUT->footer();
exit;
}
if ($needed[$delete] > 0) {
print_error('cannotdeleteqtypeneeded', 'question', $thispageurl, $qtypename);
}
// Do the deletion.
// If not yet confirmed, display a confirmation message.
if (!optional_param('confirm', '', PARAM_BOOL)) {
$qtypename = $qtypes[$delete]->local_name();
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('deletingqtype', 'admin', $qtypename));
// Delete any configuration records.
if (!unset_all_config_for_plugin('qtype_' . $delete)) {
echo $OUTPUT->notification(get_string('errordeletingconfig', 'admin', 'qtype_' . $delete));
}
unset_config($delete . '_disabled', 'question');
unset_config($delete . '_sortorder', 'question');
// Then the tables themselves
drop_plugin_tables($delete, $QTYPES[$delete]->plugin_dir() . '/db/install.xml', false);
// Remove event handlers and dequeue pending events
events_uninstall('qtype/' . $delete);
$a->qtype = $qtypename;
$a->directory = $QTYPES[$delete]->plugin_dir();
echo $OUTPUT->box(get_string('qtypedeletefiles', 'admin', $a), 'generalbox', 'notice');
echo $OUTPUT->continue_button(admin_url('qtypes.php'));
echo $OUTPUT->heading(get_string('deleteqtypeareyousure', 'question', $qtypename));
echo $OUTPUT->confirm(get_string('deleteqtypeareyousuremessage', 'question', $qtypename),
new moodle_url($thispageurl, array('delete' => $delete, 'confirm' => 1)),
$thispageurl);
echo $OUTPUT->footer();
exit;
}
// End of process actions ==================================================
/// Print the page heading.
// Do the deletion.
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('manageqtypes', 'admin'));
echo $OUTPUT->heading(get_string('deletingqtype', 'question', $qtypename));
/// Set up the table.
$table = new flexible_table('qtypeadmintable');
$table->define_columns(array('questiontype', 'numquestions', 'version', 'requires',
'availableto', 'delete', 'settings'));
$table->define_headers(array(get_string('questiontype', 'admin'), get_string('numquestions', 'admin'),
get_string('version'), get_string('requires', 'admin'), get_string('availableq', 'question'),
get_string('delete'), get_string('settings')));
$table->set_attribute('id', 'qtypes');
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
$table->setup();
/// Add a row for each question type.
$createabletypes = question_type_menu();
foreach ($sortedqtypes as $qtypename => $localname) {
$qtype = $QTYPES[$qtypename];
$row = array();
// Question icon and name.
$fakequestion = new stdClass;
$fakequestion->qtype = $qtypename;
$icon = print_question_icon($fakequestion, true);
$row[] = $icon . ' ' . $localname;
// Number of questions of this type.
if ($counts[$qtypename]->numquestions + $counts[$qtypename]->numhidden > 0) {
if ($counts[$qtypename]->numhidden > 0) {
$strcount = get_string('numquestionsandhidden', 'admin', $counts[$qtypename]);
} else {
$strcount = $counts[$qtypename]->numquestions;
}
if ($canviewreports) {
$row[] = '<a href="' . admin_url('/report/questioninstances/index.php?qtype=' . $qtypename) .
'" title="' . get_string('showdetails', 'admin') . '">' . $strcount . '</a>';
} else {
$strcount;
}
} else {
$row[] = 0;
}
// Question version number.
$version = get_config('qtype_' . $qtypename, 'version');
if ($version) {
$row[] = $version;
} else {
$row[] = '<span class="disabled">' . get_string('nodatabase', 'admin') . '</span>';
}
// Other question types required by this one.
$requiredtypes = $qtype->requires_qtypes();
$strtypes = array();
if (!empty($requiredtypes)) {
foreach ($requiredtypes as $required) {
$strtypes[] = $QTYPES[$required]->local_name();
}
$row[] = implode(', ', $strtypes);
} else {
$row[] = '';
}
// Are people allowed to create new questions of this type?
$rowclass = '';
if ($qtype->menu_name()) {
$createable = isset($createabletypes[$qtypename]);
$icons = enable_disable_button($qtypename, $createable);
if (!$createable) {
$rowclass = 'dimmed_text';
}
} else {
$icons = '<img src="' . $OUTPUT->pix_url('spacer') . '" alt="" class="spacer" />';
}
// Move icons.
$icons .= icon_html('up', $qtypename, 't/up', get_string('up'), '');
$icons .= icon_html('down', $qtypename, 't/down', get_string('down'), '');
$row[] = $icons;
// Delete link, if available.
if ($needed[$qtypename]) {
$row[] = '';
} else {
$row[] = '<a href="' . admin_url('qtypes.php?delete=' . $qtypename .
'&amp;sesskey=' . sesskey()) . '" title="' .
get_string('uninstallqtype', 'admin') . '">' . get_string('delete') . '</a>';
}
// Settings link, if available.
$settings = admin_get_root()->locate('qtypesetting' . $qtypename);
if ($settings instanceof admin_externalpage) {
$row[] = '<a href="' . $settings->url .
'">' . get_string('settings') . '</a>';
} else if ($settings instanceof admin_settingpage) {
$row[] = '<a href="' . admin_url('settings.php?section=qtypesetting' . $qtypename) .
'">' . get_string('settings') . '</a>';
} else {
$row[] = '';
}
$table->add_data($row, $rowclass);
// Delete any configuration records.
if (!unset_all_config_for_plugin('qtype_' . $delete)) {
echo $OUTPUT->notification(get_string('errordeletingconfig', 'admin', 'qtype_' . $delete));
}
unset_config($delete . '_disabled', 'question');
unset_config($delete . '_sortorder', 'question');
$table->finish_output();
// Then the tables themselves
drop_plugin_tables($delete, $qtypes[$delete]->plugin_dir() . '/db/install.xml', false);
// Remove event handlers and dequeue pending events
events_uninstall('qtype_' . $delete);
$a->qtype = $qtypename;
$a->directory = $qtypes[$delete]->plugin_dir();
echo $OUTPUT->box(get_string('qtypedeletefiles', 'question', $a), 'generalbox', 'notice');
echo $OUTPUT->continue_button($thispageurl);
echo $OUTPUT->footer();
function admin_url($endbit) {
global $CFG;
return $CFG->wwwroot . '/' . $CFG->admin . '/' . $endbit;
exit;
}
function enable_disable_button($qtypename, $createable) {
if ($createable) {
return icon_html('disable', $qtypename, 'i/hide', get_string('enabled', 'question'), get_string('disable'));
// End of process actions ==================================================
// Print the page heading.
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('manageqtypes', 'admin'));
// Set up the table.
$table = new flexible_table('qtypeadmintable');
$table->define_baseurl($thispageurl);
$table->define_columns(array('questiontype', 'numquestions', 'version', 'requires',
'availableto', 'delete', 'settings'));
$table->define_headers(array(get_string('questiontype', 'question'), get_string('numquestions', 'question'),
get_string('version'), get_string('requires', 'admin'), get_string('availableq', 'question'),
get_string('delete'), get_string('settings')));
$table->set_attribute('id', 'qtypes');
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
$table->setup();
// Add a row for each question type.
$createabletypes = question_bank::get_creatable_qtypes();
foreach ($sortedqtypes as $qtypename => $localname) {
$qtype = $qtypes[$qtypename];
$row = array();
// Question icon and name.
$fakequestion = new stdClass;
$fakequestion->qtype = $qtypename;
$icon = print_question_icon($fakequestion, true);
$row[] = $icon . ' ' . $localname;
// Number of questions of this type.
if ($counts[$qtypename]->numquestions + $counts[$qtypename]->numhidden > 0) {
if ($counts[$qtypename]->numhidden > 0) {
$strcount = get_string('numquestionsandhidden', 'question', $counts[$qtypename]);
} else {
$strcount = $counts[$qtypename]->numquestions;
}
if ($canviewreports) {
$row[] = html_writer::link(new moodle_url('/admin/report/questioninstances/index.php',
array('qtype' => $qtypename)), $strcount, array('title' => get_string('showdetails', 'admin')));
} else {
$strcount;
}
} else {
return icon_html('enable', $qtypename, 'i/show', get_string('disabled', 'question'), get_string('enable'));
$row[] = 0;
}
// Question version number.
$version = get_config('qtype_' . $qtypename, 'version');
if ($version) {
$row[] = $version;
} else {
$row[] = html_writer::tag('span', get_string('nodatabase', 'admin'), array('class' => 'disabled'));
}
// Other question types required by this one.
$requiredtypes = $qtype->requires_qtypes();
$strtypes = array();
if (!empty($requiredtypes)) {
foreach ($requiredtypes as $required) {
$strtypes[] = $qtypes[$required]->local_name();
}
$row[] = implode(', ', $strtypes);
} else {
$row[] = '';
}
// Are people allowed to create new questions of this type?
$rowclass = '';
if ($qtype->menu_name()) {
$createable = isset($createabletypes[$qtypename]);
$icons = question_types_enable_disable_icons($qtypename, $createable);
if (!$createable) {
$rowclass = 'dimmed_text';
}
} else {
$icons = $OUTPUT->spacer() . ' ';
}
// Move icons.
$icons .= question_type_icon_html('up', $qtypename, 't/up', get_string('up'), '');
$icons .= question_type_icon_html('down', $qtypename, 't/down', get_string('down'), '');
$row[] = $icons;
// Delete link, if available.
if ($needed[$qtypename]) {
$row[] = '';
} else {
$row[] = html_writer::link(new moodle_url($thispageurl,
array('delete' => $qtypename, 'sesskey' => sesskey())), get_string('delete'),
array('title' => get_string('uninstallqtype', 'question')));
}
// Settings link, if available.
$settings = admin_get_root()->locate('qtypesetting' . $qtypename);
if ($settings instanceof admin_externalpage) {
$row[] = html_writer::link($settings->url, get_string('settings'));
} else if ($settings instanceof admin_settingpage) {
$row[] = html_writer::link(new moodle_url('/admin/settings.php',
array('section' => 'qtypesetting' . $qtypename)), get_string('settings'));
} else {
$row[] = '';
}
$table->add_data($row, $rowclass);
}
$table->finish_output();
echo $OUTPUT->footer();
function question_types_enable_disable_icons($qtypename, $createable) {
if ($createable) {
return question_type_icon_html('disable', $qtypename, 'i/hide',
get_string('enabled', 'question'), get_string('disable'));
} else {
return question_type_icon_html('enable', $qtypename, 'i/show',
get_string('disabled', 'question'), get_string('enable'));
}
}
function icon_html($action, $qtypename, $icon, $alt, $tip) {
function question_type_icon_html($action, $qtypename, $icon, $alt, $tip) {
global $OUTPUT;
if ($tip) {
$tip = 'title="' . $tip . '" ';
}
$html = ' <form action="' . admin_url('qtypes.php') . '" method="post"><div>';
$html .= '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
$html .= '<input type="image" name="' . $action . '" value="' . $qtypename .
'" src="' . $OUTPUT->pix_url($icon) . '" alt="' . $alt . '" ' . $tip . '/>';
$html .= '</div></form>';
return $html;
return $OUTPUT->action_icon(new moodle_url('/admin/qtypes.php',
array($action => $qtypename, 'sesskey' => sesskey())),
new pix_icon($icon, $alt, 'moodle', array('title' => '')),
null, array('title' => $tip)) . ' ';
}
+2 -2
View File
@@ -47,7 +47,7 @@ $error = optional_param('error', '', PARAM_ALPHANUM);
admin_externalpage_setup('registrationindex');
if (!empty($error) and $error == 'urlalreadyexist') {
throw new moodle_exception('urlalreadyregistered', 'hub',
throw new moodle_exception('urlalreadyregistered', 'hub',
$CFG->wwwroot . '/' . $CFG->admin . '/registration/index.php');
}
@@ -85,7 +85,7 @@ if (!empty($registeredhub) and $registeredhub->token == $token) {
echo $OUTPUT->footer();
} else {
throw new moodle_exception('wrongtoken', 'hub',
throw new moodle_exception('wrongtoken', 'hub',
$CFG->wwwroot . '/' . $CFG->admin . '/registration/index.php');
}
+1 -1
View File
@@ -203,7 +203,7 @@ class site_registration_form extends moodleform {
$cleanhuburl = clean_param($huburl, PARAM_ALPHANUMEXT);
$sitename = get_config('hub', 'site_name_' . $cleanhuburl);
if ($sitename === false) {
$sitename = $site->fullname;
$sitename = format_string($site->fullname, true, array('context' => get_context_instance(CONTEXT_COURSE, SITEID)));
}
$sitedescription = get_config('hub', 'site_description_' . $cleanhuburl);
if ($sitedescription === false) {
+2 -2
View File
@@ -148,12 +148,12 @@ if (empty($cancel) and $unregistration and !$confirm) {
$moodleorghub = $registrationmanager->get_registeredhub(HUB_MOODLEORGHUBURL);
if (!empty($moodleorghub)) {
$registeredonmoodleorg = true;
}
}
echo $OUTPUT->heading(get_string('registeron', 'hub'), 3, 'main');
echo $renderer->registrationselector($registeredonmoodleorg);
if (extension_loaded('xmlrpc')) {
if (extension_loaded('xmlrpc')) {
$hubs = $registrationmanager->get_registered_on_hubs();
if (!empty($hubs)) {
echo $OUTPUT->heading(get_string('registeredon', 'hub'), 3, 'main');
+296
View File
@@ -0,0 +1,296 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Renderer for core_admin subsystem
*
* @package core
* @subpackage admin
* @copyright 2011 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir . '/pluginlib.php');
/**
* Standard HTML output renderer for core_admin subsystem
*/
class core_admin_renderer extends plugin_renderer_base {
/**
* Displays all known plugins and information about their installation or upgrade
*
* This default implementation renders all plugins into one big table. The rendering
* options support:
* (bool)full = false: whether to display up-to-date plugins, too
*
* @param array $plugininfo as returned by {@see plugin_manager::get_plugins()}
* @param array $options rendering options
* @return string HTML code
*/
public function plugins_check(array $plugininfo, array $options = null) {
if (empty($plugininfo)) {
return '';
}
if (empty($options)) {
$options = array(
'full' => false,
);
}
$pluginman = plugin_manager::instance();
$table = new html_table();
$table->id = 'plugins-check';
$table->head = array(
get_string('displayname', 'core_plugin'),
get_string('rootdir', 'core_plugin'),
get_string('source', 'core_plugin'),
get_string('versiondb', 'core_plugin'),
get_string('versiondisk', 'core_plugin'),
get_string('status', 'core_plugin'),
);
$table->colclasses = array(
'displayname', 'rootdir', 'source', 'versiondb', 'versiondisk', 'status',
);
$table->data = array();
$numofhighlighted = array(); // number of highlighted rows per this subsection
foreach ($plugininfo as $type => $plugins) {
$header = new html_table_cell($pluginman->plugintype_name_plural($type));
$header->header = true;
$header->colspan = count($table->head);
$header = new html_table_row(array($header));
$header->attributes['class'] = 'plugintypeheader type-' . $type;
$numofhighlighted[$type] = 0;
if (empty($plugins) and $options['full']) {
$msg = new html_table_cell(get_string('noneinstalled', 'core_plugin'));
$msg->colspan = count($table->head);
$row = new html_table_row(array($msg));
$row->attributes['class'] .= 'msg msg-noneinstalled';
$table->data[] = $header;
$table->data[] = $row;
continue;
}
$plugintyperows = array();
foreach ($plugins as $name => $plugin) {
$row = new html_table_row();
$row->attributes['class'] = 'type-' . $plugin->type . ' name-' . $plugin->type . '_' . $plugin->name;
if ($this->page->theme->resolve_image_location('icon', $plugin->type . '_' . $plugin->name)) {
$icon = $this->output->pix_icon('icon', '', $plugin->type . '_' . $plugin->name, array('class' => 'smallicon pluginicon'));
} else {
$icon = $this->output->pix_icon('spacer', '', 'moodle', array('class' => 'smallicon pluginicon noicon'));
}
$displayname = $icon . ' ' . $plugin->displayname;
$displayname = new html_table_cell($displayname);
$rootdir = new html_table_cell($plugin->get_dir());
if ($isstandard = $plugin->is_standard()) {
$row->attributes['class'] .= ' standard';
$source = new html_table_cell(get_string('sourcestd', 'core_plugin'));
} else {
$row->attributes['class'] .= ' extension';
$source = new html_table_cell(get_string('sourceext', 'core_plugin'));
}
$versiondb = new html_table_cell($plugin->versiondb);
$versiondisk = new html_table_cell($plugin->versiondisk);
$statuscode = $plugin->get_status();
$row->attributes['class'] .= ' status-' . $statuscode;
$status = new html_table_cell(get_string('status_' . $statuscode, 'core_plugin'));
if ($isstandard and in_array($statuscode, array(plugin_manager::PLUGIN_STATUS_NODB, plugin_manager::PLUGIN_STATUS_UPTODATE))) {
if (empty($options['full'])) {
continue;
}
} else {
$numofhighlighted[$type]++;
}
$row->cells = array($displayname, $rootdir, $source, $versiondb, $versiondisk, $status);
$plugintyperows[] = $row;
}
if (empty($numofhighlighted[$type]) and empty($options['full'])) {
continue;
}
$table->data[] = $header;
$table->data = array_merge($table->data, $plugintyperows);
}
$sumofhighlighted = array_sum($numofhighlighted);
if ($sumofhighlighted == 0) {
$out = $this->output->container_start('nonehighlighted', 'plugins-check-info');
$out .= $this->output->heading(get_string('nonehighlighted', 'core_plugin'));
if (empty($options['full'])) {
$out .= html_writer::link(new moodle_url('/admin/index.php',
array('confirmupgrade' => 1, 'confirmrelease' => 1, 'showallplugins' => 1)),
get_string('nonehighlightedinfo', 'core_plugin'));
}
$out .= $this->output->container_end();
} else {
$out = $this->output->container_start('somehighlighted', 'plugins-check-info');
$out .= $this->output->heading(get_string('somehighlighted', 'core_plugin', $sumofhighlighted));
if (empty($options['full'])) {
$out .= html_writer::link(new moodle_url('/admin/index.php',
array('confirmupgrade' => 1, 'confirmrelease' => 1, 'showallplugins' => 1)),
get_string('somehighlightedinfo', 'core_plugin'));
}
$out .= $this->output->container_end();
}
if ($sumofhighlighted > 0 or $options['full']) {
$out .= html_writer::table($table);
}
return $out;
}
/**
* Displays all known plugins and links to manage them
*
* This default implementation renders all plugins into one big table.
*
* @param array $plugininfo as returned by {@see plugin_manager::get_plugins()}
* @return string HTML code
*/
public function plugins_control_panel(array $plugininfo) {
if (empty($plugininfo)) {
return '';
}
$pluginman = plugin_manager::instance();
$table = new html_table();
$table->id = 'plugins-control-panel';
$table->head = array(
get_string('displayname', 'core_plugin'),
get_string('systemname', 'core_plugin'),
get_string('source', 'core_plugin'),
get_string('version', 'core_plugin'),
get_string('availability', 'core_plugin'),
get_string('settings', 'core_plugin'),
get_string('uninstall','core_plugin'),
);
$table->colclasses = array(
'displayname', 'systemname', 'source', 'version', 'availability', 'settings', 'uninstall',
);
foreach ($plugininfo as $type => $plugins) {
$header = new html_table_cell($pluginman->plugintype_name_plural($type));
$header->header = true;
$header->colspan = count($table->head);
$header = new html_table_row(array($header));
$header->attributes['class'] = 'plugintypeheader type-' . $type;
$table->data[] = $header;
if (empty($plugins)) {
$msg = new html_table_cell(get_string('noneinstalled', 'core_plugin'));
$msg->colspan = count($table->head);
$row = new html_table_row(array($msg));
$row->attributes['class'] .= 'msg msg-noneinstalled';
$table->data[] = $row;
continue;
}
foreach ($plugins as $name => $plugin) {
$row = new html_table_row();
$row->attributes['class'] = 'type-' . $plugin->type . ' name-' . $plugin->type . '_' . $plugin->name;
if ($this->page->theme->resolve_image_location('icon', $plugin->type . '_' . $plugin->name)) {
$icon = $this->output->pix_icon('icon', '', $plugin->type . '_' . $plugin->name, array('class' => 'smallicon pluginicon'));
} else {
$icon = $this->output->pix_icon('spacer', '', 'moodle', array('class' => 'smallicon pluginicon noicon'));
}
if ($plugin->get_status() === plugin_manager::PLUGIN_STATUS_MISSING) {
$msg = html_writer::tag('span', get_string('status_missing', 'core_plugin'), array('class' => 'notifyproblem'));
$row->attributes['class'] .= ' missingfromdisk';
} else {
$msg = '';
}
$displayname = $icon . ' ' . $plugin->displayname . ' ' . $msg;
$displayname = new html_table_cell($displayname);
$systemname = new html_table_cell($plugin->type . '_' . $plugin->name);
if ($plugin->is_standard()) {
$row->attributes['class'] .= ' standard';
$source = new html_table_cell(get_string('sourcestd', 'core_plugin'));
} else {
$row->attributes['class'] .= ' extension';
$source = new html_table_cell(get_string('sourceext', 'core_plugin'));
}
$version = new html_table_cell($plugin->versiondb);
$isenabled = $plugin->is_enabled();
if (is_null($isenabled)) {
$availability = new html_table_cell('');
} else if ($isenabled) {
$row->attributes['class'] .= ' enabled';
$icon = $this->output->pix_icon('i/hide', get_string('pluginenabled', 'core_plugin'));
$availability = new html_table_cell($icon . ' ' . get_string('pluginenabled', 'core_plugin'));
} else {
$row->attributes['class'] .= ' disabled';
$icon = $this->output->pix_icon('i/show', get_string('plugindisabled', 'core_plugin'));
$availability = new html_table_cell($icon . ' ' . get_string('plugindisabled', 'core_plugin'));
}
$settingsurl = $plugin->get_settings_url();
if (is_null($settingsurl)) {
$settings = new html_table_cell('');
} else {
$settings = html_writer::link($settingsurl, get_string('settings', 'core_plugin'));
$settings = new html_table_cell($settings);
}
$uninstallurl = $plugin->get_uninstall_url();
if (is_null($uninstallurl)) {
$uninstall = new html_table_cell('');
} else {
$uninstall = html_writer::link($uninstallurl, get_string('uninstall', 'core_plugin'));
$uninstall = new html_table_cell($uninstall);
}
$row->cells = array(
$displayname, $systemname, $source, $version, $availability, $settings, $uninstall
);
$table->data[] = $row;
}
}
return html_writer::table($table);
}
}
+1 -2
View File
@@ -79,13 +79,12 @@
$param->extras
ORDER BY $param->orderby";
}
//error_log($sql);
$courses = $DB->get_records_sql($sql, $param->params, 0, $numcourses);
if (empty($courses)) {
echo $OUTPUT->notification(get_string('statsnodata'));
echo '</td></tr></table>';echo '<p>after notify</p>';
echo '</td></tr></table>';
} else {
if (empty($CFG->gdversion)) {
+3 -3
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="admin/report/customlang/db" VERSION="20101115" COMMENT="XMLDB file for Moodle admin/report/customlang"
<XMLDB PATH="admin/report/customlang/db" VERSION="20110419" COMMENT="XMLDB file for Moodle admin/report/customlang"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../lib/xmldb/xmldb.xsd"
>
@@ -30,11 +30,11 @@
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="name"/>
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" COMMENT="The normalized name of the plugin" PREVIOUS="id" NEXT="version"/>
<FIELD NAME="version" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="The checked out version of the plugin, null of the version is unknown" PREVIOUS="name"/>
<FIELD NAME="version" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false" COMMENT="The checked out version of the plugin, null if the version is unknown" PREVIOUS="name"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
</TABLE>
</TABLES>
</XMLDB>
</XMLDB>
+13
View File
@@ -57,5 +57,18 @@ function xmldb_report_customlang_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2010111500, 'report', 'customlang');
}
/**
* Change the version field from integer to varchar
*/
if ($oldversion < 2011041900) {
$table = new xmldb_table('report_customlang_components');
$field = new xmldb_field('version', XMLDB_TYPE_CHAR, '255', null, null, null, null, 'name');
$dbman->change_field_type($table, $field);
upgrade_plugin_savepoint(true, 2011041900, 'report', 'customlang');
}
return $result;
}
+18 -2
View File
@@ -24,6 +24,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('NO_OUTPUT_BUFFERING', true); // progress bar is used here
require(dirname(dirname(dirname(dirname(__FILE__)))).'/config.php');
require_once($CFG->dirroot.'/'.$CFG->admin.'/report/customlang/locallib.php');
require_once($CFG->libdir.'/adminlib.php');
@@ -45,8 +47,22 @@ if ($action === 'checkout') {
if (empty($lng)) {
print_error('missingparameter');
}
report_customlang_utils::checkout($lng);
redirect(new moodle_url('/admin/report/customlang/edit.php', array('lng' => $lng)));
$PAGE->set_cacheable(false); // progress bar is used here
$output = $PAGE->get_renderer('report_customlang');
echo $output->header();
echo $output->heading(get_string('pluginname', 'report_customlang'));
$progressbar = new progress_bar();
$progressbar->create(); // prints the HTML code of the progress bar
// we may need a bit of extra execution time and memory here
@set_time_limit(HOURSECS);
raise_memory_limit(MEMORY_EXTRA);
report_customlang_utils::checkout($lng, $progressbar);
echo $output->continue_button(new moodle_url('/admin/report/customlang/edit.php', array('lng' => $lng)), 'get');
echo $output->footer();
exit;
}
if ($action === 'checkin') {
@@ -27,7 +27,9 @@
defined('MOODLE_INTERNAL') || die();
$string['checkin'] = 'Check in strings into disk';
$string['checkout'] = 'Check out strings into translator';
$string['checkout'] = 'Check out strings into the translator';
$string['checkoutdone'] = 'Strings checked out successfully into the translator';
$string['checkoutinprogress'] = 'Checking out strings into the translator';
$string['confirmcheckin'] = 'You are about to check in modified strings into your local language pack. This will export the customized strings from the translator into the data directory and Moodle will start using the modified strings. Press \'Continue\' button to proceed check in.';
$string['customlang:edit'] = 'Edit local translation';
$string['customlang:view'] = 'View local translation';
+23 -2
View File
@@ -16,7 +16,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Definition of classes used by Langugae customization admin report
* Definition of classes used by language customization admin report
*
* @package report
* @subpackage customlang
@@ -33,6 +33,12 @@ defined('MOODLE_INTERNAL') || die();
*/
class report_customlang_utils {
/**
* Rough number of strings that are being processed during a full checkout.
* This is used to estimate the progress of the checkout.
*/
const ROUGH_NUMBER_OF_STRINGS = 16500;
/** @var array cache of {@link self::list_components()} results */
protected static $components = null;
@@ -83,8 +89,9 @@ class report_customlang_utils {
* This should be executed each time before going to the translation page
*
* @param string $lang language code to checkout
* @param progress_bar $progressbar optionally, the given progress bar can be updated
*/
public static function checkout($lang) {
public static function checkout($lang, progress_bar $progressbar = null) {
global $DB;
// make sure that all components are registered
@@ -107,6 +114,10 @@ class report_customlang_utils {
}
unset($current);
// initialize the progress counter - stores the number of processed strings
$done = 0;
$strinprogress = get_string('checkoutinprogress', 'report_customlang');
// reload components and fetch their strings
$stringman = get_string_manager();
$components = $DB->get_records('report_customlang_components');
@@ -129,6 +140,12 @@ class report_customlang_utils {
$stringlocal = isset($local[$stringid]) ? $local[$stringid] : null;
$now = time();
if (!is_null($progressbar)) {
$done++;
$donepercent = floor(min($done, self::ROUGH_NUMBER_OF_STRINGS) / self::ROUGH_NUMBER_OF_STRINGS * 100);
$progressbar->update_full($donepercent, $strinprogress);
}
if (isset($current[$stringid])) {
$needsupdate = false;
$currentoriginal = $current[$stringid]->original;
@@ -175,6 +192,10 @@ class report_customlang_utils {
}
}
}
if (!is_null($progressbar)) {
$progressbar->update_full(100, get_string('checkoutdone', 'report_customlang'));
}
}
/**
+4
View File
@@ -63,3 +63,7 @@
background-color: #f6f6f6;
margin-top: 0.5em;
}
#page-admin-report-customlang-index .continuebutton {
margin-top: 1em;
}
+1 -1
View File
@@ -24,5 +24,5 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2010120900;
$plugin->version = 2011041900;
$plugin->requires = 2010120700;
+1 -1
View File
@@ -3,6 +3,6 @@
defined('MOODLE_INTERNAL') || die;
// profiling report, added to development
if (extension_loaded('xhprof') && function_exists('xhprof_enable') && !empty($CFG->profilingenabled)) {
if (extension_loaded('xhprof') && function_exists('xhprof_enable') && (!empty($CFG->profilingenabled) || !empty($CFG->earlyprofilingenabled))) {
$ADMIN->add('development', new admin_externalpage('reportprofiling', get_string('pluginname', 'report_profiling'), "$CFG->wwwroot/$CFG->admin/report/profiling/index.php", 'moodle/site:config'));
}
+5 -3
View File
@@ -22,8 +22,9 @@ echo $OUTPUT->header();
add_to_log(SITEID, "admin", "report questioninstances", "report/questioninstances/index.php?qtype=$requestedqtype", $requestedqtype);
// Prepare the list of capabilities to choose from
$qtypes = question_bank::get_all_qtypes();
$qtypechoices = array();
foreach ($QTYPES as $qtype) {
foreach ($qtypes as $qtype) {
$qtypechoices[$qtype->name()] = $qtype->local_name();
}
@@ -45,7 +46,7 @@ if ($requestedqtype) {
// Work out the bits needed for the SQL WHERE clauses.
if ($requestedqtype == 'missingtype') {
$othertypes = array_keys($QTYPES);
$othertypes = array_keys($qtypes);
$key = array_search('missingtype', $othertypes);
unset($othertypes[$key]);
list($sqlqtypetest, $params) = $DB->get_in_or_equal($othertypes, SQL_PARAMS_QM, '', false);
@@ -58,7 +59,8 @@ if ($requestedqtype) {
} else {
$sqlqtypetest = 'WHERE qtype = ?';
$params = array($requestedqtype);
$title = get_string('reportforqtype', 'report_questioninstances', $QTYPES[$requestedqtype]->local_name());
$title = get_string('reportforqtype', 'report_questioninstances',
question_bank::get_qtype($requestedqtype)->local_name());
}
// Get the question counts, and all the context information, for each
+8 -6
View File
@@ -151,19 +151,21 @@ function search_spammers($keywords) {
$params = array('userid'=>$USER->id);
$keywordfull = array();
$i = 0;
foreach ($keywords as $keyword) {
$keywordfull[] = $DB->sql_like('description', ':descpat', false);
$params['descpat'] = "%$keyword%";
$keywordfull2[] = $DB->sql_like('p.summary', ':sumpat', false);
$params['sumpat'] = "%$keyword%";
$keywordfull[] = $DB->sql_like('description', ':descpat'.$i, false);
$params['descpat'.$i] = "%$keyword%";
$keywordfull2[] = $DB->sql_like('p.summary', ':sumpat'.$i, false);
$params['sumpat'.$i] = "%$keyword%";
$i++;
}
$conditions = '( '.implode(' OR ', $keywordfull).' )';
$conditions2 = '( '.implode(' OR ', $keywordfull2).' )';
$sql = "SELECT * FROM {user} WHERE deleted = 0 AND id <> :userid AND $conditions"; // Exclude oneself
$sql2 = "SELECT u.*, p.summary FROM {user} AS u, {post} AS p WHERE $conditions2 AND u.deleted = 0 AND u.id=p.userid AND u.id <> :userid";
$spamusers_desc = $DB->get_recordset_sql($sql);
$spamusers_blog = $DB->get_recordset_sql($sql2);
$spamusers_desc = $DB->get_recordset_sql($sql, $params);
$spamusers_blog = $DB->get_recordset_sql($sql2, $params);
$keywordlist = implode(', ', $keywords);
echo $OUTPUT->box(get_string('spamresult', 'report_spamcleaner').s($keywordlist)).' ...';
+1 -1
View File
@@ -108,7 +108,7 @@ M.report_spamcleaner = {
context.Y = Y;
context.me = me;
if (Y.one("#removeall_btn")) {
Y.on("click", context.del_all, "#removeall_btn");
Y.on("click", context.del_all, "#removeall_btn");
}
});
}
+5 -1
View File
@@ -68,7 +68,11 @@ if (!empty($edit) || !empty($new)) {
$settings['name'] = $fromform->name;
if (!$instance->readonly) {
foreach($configs as $config) {
$settings[$config] = $fromform->$config;
if (isset($fromform->$config)) {
$settings[$config] = $fromform->$config;
} else {
$settings[$config] = null;
}
}
}
$success = $instance->set_option($settings);
+3 -3
View File
@@ -628,7 +628,7 @@ class define_role_table_advanced extends capability_table_with_risks {
// Legacy type.
$archetype = optional_param('archetype', null, PARAM_RAW);
if ($archetype) {
if (isset($archetype)) {
$archetypes = get_role_archetypes();
if (isset($archetypes[$archetype])){
$this->role->archetype = $archetype;
@@ -716,7 +716,6 @@ class define_role_table_advanced extends capability_table_with_risks {
}
protected function get_archetype_field($id) {
global $OUTPUT;
$options = array();
$options[''] = get_string('none');
foreach(get_role_archetypes() as $type) {
@@ -1143,7 +1142,7 @@ class existing_role_holders extends role_assign_user_selector_base {
global $DB;
list($wherecondition, $params) = $this->search_sql($search, 'u');
list($ctxcondition, $ctxparams) = $DB->get_in_or_equal(get_parent_contexts($this->context, true), SQL_PARAMS_NAMED, 'ctx00');
list($ctxcondition, $ctxparams) = $DB->get_in_or_equal(get_parent_contexts($this->context, true), SQL_PARAMS_NAMED, 'ctx');
$params = array_merge($params, $ctxparams);
$params['roleid'] = $this->roleid;
@@ -1317,6 +1316,7 @@ abstract class role_allow_role_page {
foreach ($rs as $allow) {
$this->allowed[$allow->roleid][$allow->{$this->targetcolname}] = true;
}
$rs->close();
}
/**
+1 -1
View File
@@ -138,7 +138,7 @@ M.core_role.init_cap_table_filter = function(Y, tableid, contextid) {
lastheading = null;
this.setFilterCookieValue(filtertext);
this.button.set('disabled', (filtertext == ''));
this.table.all('tr').each(function(row){
+2
View File
@@ -18,6 +18,8 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$temp->add(new admin_setting_configcheckbox('allowuserblockhiding', get_string('allowuserblockhiding', 'admin'), get_string('configallowuserblockhiding', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('allowblockstodock', get_string('allowblockstodock', 'admin'), get_string('configallowblockstodock', 'admin'), 1));
$temp->add(new admin_setting_configtextarea('custommenuitems', get_string('custommenuitems', 'admin'), get_string('configcustommenuitems', 'admin'), '', PARAM_TEXT, '50', '10'));
$temp->add(new admin_setting_configcheckbox('enabledevicedetection', get_string('enabledevicedetection', 'admin'), get_string('configenabledevicedetection', 'admin'), 1));
$temp->add(new admin_setting_devicedetectregex('devicedetectregex', get_string('devicedetectregex', 'admin'), get_string('devicedetectregex_desc', 'admin'), ''));
$ADMIN->add('themes', $temp);
$ADMIN->add('themes', new admin_externalpage('themeselector', get_string('themeselector','admin'), $CFG->wwwroot . '/theme/index.php'));
+11 -11
View File
@@ -21,10 +21,11 @@ if ($hassiteconfig
$formcourseformats[$courseformat] = get_string('pluginname', "format_$courseformat");
}
$temp->add(new admin_setting_configselect('moodlecourse/format', get_string('format'), get_string('coursehelpformat'), 'weeks',$formcourseformats));
for ($i=1; $i<=52; $i++) {
$sectionmenu[$i] = "$i";
}
$temp->add(new admin_setting_configselect('moodlecourse/numsections', get_string('numberweeks'), get_string('coursehelpnumberweeks'), 10,$sectionmenu));
$temp->add(new admin_setting_configtext('moodlecourse/maxsections', get_string('maxnumberweeks'), get_string('maxnumberweeks_desc'), 52));
$temp->add(new admin_settings_num_course_sections('moodlecourse/numsections', get_string('numberweeks'), get_string('coursehelpnumberweeks'), 10));
$choices = array();
$choices['0'] = get_string('hiddensectionscollapsed');
$choices['1'] = get_string('hiddensectionsinvisible');
@@ -33,15 +34,14 @@ if ($hassiteconfig
$temp->add(new admin_setting_configselect('moodlecourse/newsitems', get_string('newsitemsnumber'), get_string('coursehelpnewsitemsnumber'), 5,$options));
$temp->add(new admin_setting_configselect('moodlecourse/showgrades', get_string('showgrades'), get_string('coursehelpshowgrades'), 1,array(0 => get_string('no'), 1 => get_string('yes'))));
$temp->add(new admin_setting_configselect('moodlecourse/showreports', get_string('showreports'), '', 0,array(0 => get_string('no'), 1 => get_string('yes'))));
if (isset($CFG->maxbytes)) {
$choices = get_max_upload_sizes($CFG->maxbytes);
} else {
$choices = get_max_upload_sizes();
}
$temp->add(new admin_setting_configselect('moodlecourse/maxbytes', get_string('maximumupload'), get_string('coursehelpmaximumupload'), key($choices), $choices));
if (!empty($CFG->legacyfilesinnewcourses)) {
$choices = array('0'=>get_string('no'), '2'=>get_string('yes'));
$temp->add(new admin_setting_configselect('moodlecourse/legacyfiles', get_string('courselegacyfiles'), get_string('courselegacyfiles_help'), key($choices), $choices));
@@ -139,10 +139,10 @@ if ($hassiteconfig
400 => '400',
500 => '500');
$temp->add(new admin_setting_configselect('backup/backup_auto_keep', get_string('keep'), get_string('backupkeephelp'), 1, $keepoptoins));
$temp->add(new admin_setting_heading('automatedsettings', get_string('automatedsettings','backup'), ''));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_users', get_string('users'), get_string('backupusershelp'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_users', get_string('generalusers', 'backup'), get_string('configgeneralusers', 'backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_role_assignments', get_string('generalroleassignments','backup'), get_string('configgeneralroleassignments','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_user_files', get_string('generaluserfiles', 'backup'), get_string('configgeneraluserfiles','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_activities', get_string('generalactivities','backup'), get_string('configgeneralactivities','backup'), 1));
@@ -150,10 +150,10 @@ if ($hassiteconfig
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_filters', get_string('generalfilters','backup'), get_string('configgeneralfilters','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_comments', get_string('generalcomments','backup'), get_string('configgeneralcomments','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_userscompletion', get_string('generaluserscompletion','backup'), get_string('configgeneraluserscompletion','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_logs', get_string('logs'), get_string('backuplogshelp'), 0));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_logs', get_string('generallogs', 'backup'), get_string('configgenerallogs', 'backup'), 0));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_histories', get_string('generalhistories','backup'), get_string('configgeneralhistories','backup'), 0));
//$temp->add(new admin_setting_configcheckbox('backup/backup_auto_messages', get_string('messages', 'message'), get_string('backupmessageshelp','message'), 0));
//$temp->add(new admin_setting_configcheckbox('backup/backup_auto_blogs', get_string('blogs', 'blog'), get_string('backupblogshelp','blog'), 0));
+14 -5
View File
@@ -52,13 +52,22 @@ if (!during_initial_install()) { //do not use during installation
$temp->add(new admin_setting_configtext('coursesperpage', get_string('coursesperpage', 'admin'), get_string('configcoursesperpage', 'admin'), 20, PARAM_INT));
// front page default role
$roleoptions = array(0=>get_string('none')); // roles to choose from
if ($roles = get_all_roles()) {
foreach ($roles as $role) {
$roleoptions[$role->id] = strip_tags(format_string($role->name, true));
$options = array(0=>get_string('none')); // roles to choose from
$defaultfrontpageroleid = 0;
foreach (get_all_roles() as $role) {
if (empty($role->archetype) or $role->archetype === 'guest' or $role->archetype === 'frontpage' or $role->archetype === 'student') {
$options[$role->id] = strip_tags(format_string($role->name)) . ' ('. $role->shortname . ')';
if ($role->archetype === 'frontpage') {
$defaultfrontpageroleid = $role->id;
}
}
}
$temp->add(new admin_setting_configselect('defaultfrontpageroleid', get_string('frontpagedefaultrole', 'admin'), '', 0, $roleoptions));
if ($defaultfrontpageroleid and (!isset($CFG->defaultfrontpageroleid) or $CFG->defaultfrontpageroleid)) {
//frotpage role may not exist in old upgraded sites
unset($options[0]);
}
$temp->add(new admin_setting_configselect('defaultfrontpageroleid', get_string('frontpagedefaultrole', 'admin'), '', $defaultfrontpageroleid, $options));
$ADMIN->add('frontpage', $temp);
+1 -1
View File
@@ -10,7 +10,7 @@ if ($hassiteconfig) {
$temp->add(new admin_setting_configselect('lang', get_string('lang', 'admin'), get_string('configlang', 'admin'), current_language(), get_string_manager()->get_list_of_translations())); // $CFG->lang might be set in installer already, default en is in setup.php
$temp->add(new admin_setting_configcheckbox('langmenu', get_string('langmenu', 'admin'), get_string('configlangmenu', 'admin'), 1));
$temp->add(new admin_setting_langlist());
$temp->add(new admin_setting_configcheckbox('langcache', get_string('langcache', 'admin'), get_string('configlangcache', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('langcache', get_string('langcache', 'admin'), get_string('langcache_desc', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('langstringcache', get_string('langstringcache', 'admin'), get_string('configlangstringcache', 'admin'), 1));
$temp->add(new admin_setting_configtext('locale', get_string('localetext', 'admin'), get_string('configlocale', 'admin'), '', PARAM_FILE));
$temp->add(new admin_setting_configselect('latinexcelexport', get_string('latinexcelexport', 'admin'), get_string('configlatinexcelexport', 'admin'), '0', array('0'=>'Unicode','1'=>'Latin')));
+33
View File
@@ -5,6 +5,7 @@
*/
if ($hassiteconfig) {
$ADMIN->add('modules', new admin_page_pluginsoverview());
$ADMIN->add('modules', new admin_category('modsettings', get_string('activitymodules')));
$ADMIN->add('modsettings', new admin_page_managemods());
$modules = $DB->get_records('modules', array(), "name ASC");
@@ -45,6 +46,27 @@ if ($hassiteconfig) {
}
}
// message outputs
$ADMIN->add('modules', new admin_category('messageoutputs', get_string('messageoutputs', 'message')));
$ADMIN->add('messageoutputs', new admin_page_managemessageoutputs());
$ADMIN->add('messageoutputs', new admin_page_defaultmessageoutputs());
require_once($CFG->dirroot.'/message/lib.php');
$processors = get_message_processors();
foreach ($processors as $processor) {
$processorname = $processor->name;
if (!$processor->available) {
continue;
}
if ($processor->hassettings) {
$strprocessorname = get_string('pluginname', 'message_'.$processorname);
$settings = new admin_settingpage('messagesetting'.$processorname, $strprocessorname, 'moodle/site:config', !$processor->enabled);
include($CFG->dirroot.'/message/output/'.$processor->name.'/settings.php');
if ($settings) {
$ADMIN->add('messageoutputs', $settings);
}
}
}
// authentication plugins
$ADMIN->add('modules', new admin_category('authsettings', get_string('authentication', 'admin')));
@@ -52,6 +74,8 @@ if ($hassiteconfig) {
$temp->add(new admin_setting_manageauths());
$temp->add(new admin_setting_heading('manageauthscommonheading', get_string('commonsettings', 'admin'), ''));
$temp->add(new admin_setting_special_registerauth());
$temp->add(new admin_setting_configcheckbox('authpreventaccountcreation', get_string('authpreventaccountcreation', 'admin'), get_string('authpreventaccountcreation_help', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('loginpageautofocus', get_string('loginpageautofocus', 'admin'), get_string('loginpageautofocus_help', 'admin'), 0));
$temp->add(new admin_setting_configselect('guestloginbutton', get_string('guestloginbutton', 'auth'),
get_string('showguestlogin', 'auth'), '1', array('0'=>get_string('hide'), '1'=>get_string('show'))));
$temp->add(new admin_setting_configtext('alternateloginurl', get_string('alternateloginurl', 'auth'),
@@ -321,8 +345,13 @@ if ($hassiteconfig) {
$temp = new admin_settingpage('webservicesoverview', get_string('webservicesoverview', 'webservice'));
$temp->add(new admin_setting_webservicesoverview());
$ADMIN->add('webservicesettings', $temp);
//API documentation
$ADMIN->add('webservicesettings', new admin_externalpage('webservicedocumentation', get_string('wsdocapi', 'webservice'), "$CFG->wwwroot/$CFG->admin/webservice/documentation.php", 'moodle/site:config', false));
/// manage service
$temp = new admin_settingpage('externalservices', get_string('externalservices', 'webservice'));
$enablemobiledocurl = new moodle_url(get_docs_url('Enable_mobile_web_services'));
$enablemobiledoclink = html_writer::link($enablemobiledocurl, get_string('documentation'));
$temp->add(new admin_setting_enablemobileservice('enablemobilewebservice', get_string('enablemobilewebservice', 'admin'), get_string('configenablemobilewebservice', 'admin', $enablemobiledoclink), 0));
$temp->add(new admin_setting_heading('manageserviceshelpexplaination', get_string('information', 'webservice'), get_string('servicehelpexplanation', 'webservice')));
$temp->add(new admin_setting_manageexternalservices());
$ADMIN->add('webservicesettings', $temp);
@@ -369,6 +398,10 @@ if ($hassiteconfig) {
// Question type settings
if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext)) {
// Question behaviour settings.
$ADMIN->add('modules', new admin_category('qbehavioursettings', get_string('questionbehaviours', 'admin')));
$ADMIN->add('qbehavioursettings', new admin_page_manageqbehaviours());
// Question type settings.
$ADMIN->add('modules', new admin_category('qtypesettings', get_string('questiontypes', 'admin')));
$ADMIN->add('qtypesettings', new admin_page_manageqtypes());
+4 -8
View File
@@ -71,6 +71,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$temp->add(new admin_setting_configcheckbox('groupenrolmentkeypolicy', get_string('groupenrolmentkeypolicy', 'admin'), get_string('groupenrolmentkeypolicy_desc', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('disableuserimages', get_string('disableuserimages', 'admin'), get_string('configdisableuserimages', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('emailchangeconfirmation', get_string('emailchangeconfirmation', 'admin'), get_string('configemailchangeconfirmation', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('strictformsrequired', get_string('strictformsrequired', 'admin'), get_string('configstrictformsrequired', 'admin'), 0));
$ADMIN->add('security', $temp);
@@ -91,14 +92,9 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
'all' => get_string('fulllistofcourses'),
'requested' => get_string('requestedcourses'))));
$temp->add(new admin_setting_configcheckbox('restrictbydefault', get_string('restrictbydefault', 'admin'), get_string('configrestrictbydefault', 'admin'), 0));
if (!$options = $DB->get_records('modules')) {
$options = array();
}
$options2 = array();
foreach ($options as $option) {
$options2[$option->id] = $option->name;
}
$temp->add(new admin_setting_configmultiselect('defaultallowedmodules', get_string('defaultallowedmodules', 'admin'), get_string('configdefaultallowedmodules', 'admin'), array(), $options2));
$temp->add(new admin_setting_configmultiselect_modules('defaultallowedmodules',
get_string('defaultallowedmodules', 'admin'),
get_string('configdefaultallowedmodules', 'admin')));
$ADMIN->add('security', $temp);
+4 -51
View File
@@ -17,46 +17,8 @@ $ADMIN->add('server', $temp);
// "email" settingpage
$temp = new admin_settingpage('mail', get_string('mail','admin'));
$temp->add(new admin_setting_configtext('smtphosts', get_string('smtphosts', 'admin'), get_string('configsmtphosts', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configtext('smtpuser', get_string('smtpuser', 'admin'), get_string('configsmtpuser', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configpasswordunmask('smtppass', get_string('smtppass', 'admin'), get_string('configsmtpuser', 'admin'), ''));
$temp->add(new admin_setting_configtext('smtpmaxbulk', get_string('smtpmaxbulk', 'admin'), get_string('configsmtpmaxbulk', 'admin'), 1, PARAM_INT));
$temp->add(new admin_setting_configtext('noreplyaddress', get_string('noreplyaddress', 'admin'), get_string('confignoreplyaddress', 'admin'), 'noreply@' . get_host_from_url($CFG->wwwroot), PARAM_NOTAGS));
$temp->add(new admin_setting_configselect('digestmailtime', get_string('digestmailtime', 'admin'), get_string('configdigestmailtime', 'admin'), 17, array('00' => '00',
'01' => '01',
'02' => '02',
'03' => '03',
'04' => '04',
'05' => '05',
'06' => '06',
'07' => '07',
'08' => '08',
'09' => '09',
'10' => '10',
'11' => '11',
'12' => '12',
'13' => '13',
'14' => '14',
'15' => '15',
'16' => '16',
'17' => '17',
'18' => '18',
'19' => '19',
'20' => '20',
'21' => '21',
'22' => '22',
'23' => '23')));
$charsets = get_list_of_charsets();
unset($charsets['UTF-8']); // not needed here
$options = array();
$options['0'] = 'UTF-8';
$options = array_merge($options, $charsets);
$temp->add(new admin_setting_configselect('sitemailcharset', get_string('sitemailcharset', 'admin'), get_string('configsitemailcharset','admin'), '0', $options));
$temp->add(new admin_setting_configcheckbox('allowusermailcharset', get_string('allowusermailcharset', 'admin'), get_string('configallowusermailcharset', 'admin'), 0));
$options = array('LF'=>'LF', 'CRLF'=>'CRLF');
$temp->add(new admin_setting_configselect('mailnewline', get_string('mailnewline', 'admin'), get_string('configmailnewline','admin'), 'LF', $options));
// "supportcontact" settingpage
$temp = new admin_settingpage('supportcontact', get_string('supportcontact','admin'));
if (isloggedin()) {
global $USER;
$primaryadminemail = $USER->email;
@@ -73,17 +35,6 @@ $temp->add(new admin_setting_configtext('supportpage', get_string('supportpage',
$ADMIN->add('server', $temp);
// Jabber settingpage
$temp = new admin_settingpage('jabber', get_string('jabber', 'admin'));
$temp->add(new admin_setting_configtext('jabberhost', get_string('jabberhost', 'admin'), get_string('configjabberhost', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configtext('jabberserver', get_string('jabberserver', 'admin'), get_string('configjabberserver', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configtext('jabberusername', get_string('jabberusername', 'admin'), get_string('configjabberusername', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configpasswordunmask('jabberpassword', get_string('jabberpassword', 'admin'), get_string('configjabberpassword', 'admin'), ''));
$temp->add(new admin_setting_configtext('jabberport', get_string('jabberport', 'admin'), get_string('configjabberport', 'admin'), 5222, PARAM_INT));
$ADMIN->add('server', $temp);
// "sessionhandling" settingpage
$temp = new admin_settingpage('sessionhandling', get_string('sessionhandling', 'admin'));
$temp->add(new admin_setting_configcheckbox('dbsessions', get_string('dbsessions', 'admin'), get_string('configdbsessions', 'admin'), 1));
@@ -241,6 +192,8 @@ $temp->add(new admin_setting_configselect('extramemorylimit', get_string('extram
$temp->add(new admin_setting_configtext('curlcache', get_string('curlcache', 'admin'),
get_string('configcurlcache', 'admin'), 120, PARAM_INT));
$temp->add(new admin_setting_configtext('curltimeoutkbitrate', get_string('curltimeoutkbitrate', 'admin'),
get_string('curltimeoutkbitrate_help', 'admin'), 56, PARAM_INT));
/* //TODO: we need to fix code instead of relying on slow rcache, enable this once we have some code that is actually using it
$temp->add(new admin_setting_special_selectsetup('cachetype', get_string('cachetype', 'admin'),
get_string('configcachetype', 'admin'), '',
+25 -27
View File
@@ -38,17 +38,18 @@ if ($hassiteconfig
if ($ADMIN->fulltree) {
if (!during_initial_install()) {
$context = get_context_instance(CONTEXT_SYSTEM);
$allroles = array();
$generalroles = array();
$otherroles = array();
$guestroles = array();
$userroles = array();
$studentroles = array();
$teacherroles = array();
$creatornewroles = array();
$defaultteacherid = null;
$defaultuserid = null;
$defaultguestid = null;
foreach (get_all_roles() as $role) {
$rolename = strip_tags(format_string($role->name)) . ' ('. $role->shortname . ')';
$allroles[$role->id] = $rolename;
switch ($role->archetype) {
case 'manager':
$creatornewroles[$role->id] = $rolename;
@@ -56,58 +57,55 @@ if ($hassiteconfig
case 'coursecreator':
break;
case 'editingteacher':
$teacherroles[$role->id] = $rolename;
$defaultteacherid = isset($defaultteacherid) ? $defaultteacherid : $role->id;
$creatornewroles[$role->id] = $rolename;
break;
case 'teacher':
$creatornewroles[$role->id] = $rolename;
break;
case 'student':
$studentroles[$role->id] = $rolename;
break;
case 'guest':
$defaultguestid = isset($defaultguestid) ? $defaultguestid : $role->id;
$guestroles[$role->id] = $rolename;
break;
case 'user':
$defaultuserid = isset($defaultuserid) ? $defaultuserid : $role->id;
$userroles[$role->id] = $rolename;
break;
case 'frontpage':
break;
default:
$creatornewroles[$role->id] = $rolename;
$generalroles[$role->id] = $rolename;
$otherroles[$role->id] = $rolename;
break;
}
}
reset($guestroles);
$defaultguestid = key($guestroles);
reset($studentroles);
$defaultstudentid = key($studentroles);
reset($teacherroles);
$defaultteacherid = key($teacherroles);
if (empty($guestroles)) {
$guestroles[0] = get_string('none');
$defaultguestid = 0;
}
if ($userroles) {
reset($userroles);
$defaultuserid = key($userroles);
} else {
$userroles = array('0'=>get_string('none'));
if (empty($userroles)) {
$userroles[0] = get_string('none');
$defaultuserid = 0;
}
$temp->add(new admin_setting_configselect('notloggedinroleid', get_string('notloggedinroleid', 'admin'),
get_string('confignotloggedinroleid', 'admin'), $defaultguestid, ($guestroles + $generalroles)));
get_string('confignotloggedinroleid', 'admin'), $defaultguestid, ($guestroles + $otherroles)));
$temp->add(new admin_setting_configselect('guestroleid', get_string('guestroleid', 'admin'),
get_string('guestroleid_help', 'admin'), $defaultguestid, ($guestroles + $generalroles)));
get_string('guestroleid_help', 'admin'), $defaultguestid, ($guestroles + $otherroles)));
$temp->add(new admin_setting_configselect('defaultuserroleid', get_string('defaultuserroleid', 'admin'),
get_string('configdefaultuserroleid', 'admin'), $defaultuserid, ($userroles + $generalroles)));
}
$temp->add(new admin_setting_configcheckbox('nodefaultuserrolelists', get_string('nodefaultuserrolelists', 'admin'), get_string('confignodefaultuserrolelists', 'admin'), 0));
if (!during_initial_install()) {
get_string('configdefaultuserroleid', 'admin'), $defaultuserid, ($userroles + $otherroles)));
$temp->add(new admin_setting_configselect('creatornewroleid', get_string('creatornewroleid', 'admin'),
get_string('creatornewroleid_help', 'admin'), $defaultteacherid, $creatornewroles));
// release memory
unset($otherroles);
unset($guestroles);
unset($userroles);
unset($creatornewroles);
}
$temp->add(new admin_setting_configcheckbox('autologinguests', get_string('autologinguests', 'admin'), get_string('configautologinguests', 'admin'), 0));
+26 -6
View File
@@ -307,6 +307,9 @@ if ($formdata = $mform2->is_cancelled()) {
// process templates
$user->$field = uu_process_template($formdata->$field, $user);
$formdefaults[$field] = true;
if (in_array($field, $upt->columns)) {
$upt->track($field, s($user->$field), 'normal');
}
}
}
foreach ($PRF_FIELDS as $field) {
@@ -465,6 +468,7 @@ if ($formdata = $mform2->is_cancelled()) {
if (!isset($supportedauths[$user->auth])) {
$upt->track('auth', $struserauthunsupported, 'warning');
}
$doupdate = true;
}
$allcolumns = array_merge($STD_FIELDS, $PRF_FIELDS);
foreach ($allcolumns as $column) {
@@ -614,7 +618,13 @@ if ($formdata = $mform2->is_cancelled()) {
$isinternalauth = $auth->is_internal();
if ($DB->record_exists('user', array('email'=>$user->email))) {
if (empty($user->email)) {
$upt->track('email', get_string('invalidemail'), 'error');
$upt->track('status', $strusernotaddederror, 'error');
$userserrors++;
continue;
} else if ($DB->record_exists('user', array('email'=>$user->email))) {
if ($noemailduplicates) {
$upt->track('email', $stremailduplicate, 'error');
$upt->track('status', $strusernotaddederror, 'error');
@@ -765,7 +775,7 @@ if ($formdata = $mform2->is_cancelled()) {
}
}
$manual->enrol_user($manualcache[$courseid], $user->id, $rid, $today, $timeend, true);
$manual->enrol_user($manualcache[$courseid], $user->id, $rid, $today, $timeend);
$a = new stdClass();
$a->course = $shortname;
@@ -898,12 +908,22 @@ while ($linenum <= $previewrows and $fields = $cir->next()) {
$rowcols['status'][] = get_string('missingusername');
}
if (!validate_email($rowcols['email'])) {
$rowcols['status'][] = get_string('invalidemail');
if (isset($rowcols['email'])) {
if (!validate_email($rowcols['email'])) {
$rowcols['status'][] = get_string('invalidemail');
}
if ($DB->record_exists('user', array('email'=>$rowcols['email']))) {
$rowcols['status'][] = $stremailduplicate;
}
}
if ($DB->record_exists('user', array('email'=>$rowcols['email']))) {
$rowcols['status'][] = $stremailduplicate;
if (isset($rowcols['city'])) {
$rowcols['city'] = trim($rowcols['city']);
if (empty($rowcols['city'])) {
$rowcols['status'][] = get_string('fieldrequired', 'error', 'city');
}
}
$rowcols['status'] = implode('<br />', $rowcols['status']);
$data[] = $rowcols;
}
+1 -4
View File
@@ -264,6 +264,7 @@ class admin_uploaduser_form2 extends moodleform {
} else {
$mform->setDefault('city', $CFG->defaultcity);
}
$mform->addRule('city', get_string('required'), 'required');
$mform->addElement('select', 'country', get_string('selectacountry'), get_string_manager()->get_list_of_countries());
if (empty($CFG->country)) {
@@ -408,10 +409,6 @@ class admin_uploaduser_form2 extends moodleform {
if (!in_array('email', $columns) and empty($data['email'])) {
$errors['email'] = get_string('requiredtemplate', 'admin');
}
if (!in_array('city', $columns) and empty($data['city'])) {
$errors['city'] = get_string('required');
}
}
return $errors;
+61 -28
View File
@@ -157,14 +157,14 @@ class uu_progress_tracker {
/**
* Validation callback function - verified the column line of csv file.
* Converts column names to lowercase too.
* Converts standard column names to lowercase.
* @param csv_import_reader $cir
* @param array standard user fields
* @param array custom profile fields
* @param array $stdfields standard user fields
* @param array $profilefields custom profile fields
* @param moodle_url $returnurl return url in case of any error
* @return array list of fields
*/
function uu_validate_user_upload_columns(csv_import_reader $cir, $stdfields, $frofilefields, moodle_url $returnurl) {
function uu_validate_user_upload_columns(csv_import_reader $cir, $stdfields, $profilefields, moodle_url $returnurl) {
$columns = $cir->get_columns();
if (empty($columns)) {
@@ -178,22 +178,40 @@ function uu_validate_user_upload_columns(csv_import_reader $cir, $stdfields, $fr
print_error('csvfewcolumns', 'error', $returnurl);
}
$textlib = textlib_get_instance(); // profile fields may contain unicode chars
// test columns
$processed = array();
foreach ($columns as $key=>$unused) {
$field = strtolower($columns[$key]); // no unicode expected here, ignore case
if (!in_array($field, $stdfields) && !in_array($field, $frofilefields) &&// if not a standard field and not an enrolment field, then we have an error
!preg_match('/^course\d+$/', $field) && !preg_match('/^group\d+$/', $field) &&
!preg_match('/^type\d+$/', $field) && !preg_match('/^role\d+$/', $field) &&
!preg_match('/^enrolperiod\d+$/', $field)) {
print_error('invalidfieldname', 'error', $returnurl, $field);
}
if (in_array($field, $processed)) {
$field = $columns[$key];
$lcfield = $textlib->strtolower($field);
if (in_array($field, $stdfields) or in_array($lcfield, $stdfields)) {
// standard fields are only lowercase
$newfield = $lcfield;
} else if (in_array($field, $profilefields)) {
// exact profile field name match - these are case sensitive
$newfield = $field;
} else if (in_array($lcfield, $profilefields)) {
// hack: somebody wrote uppercase in csv file, but the system knows only lowercase profile field
$newfield = $lcfield;
} else if (preg_match('/^(course|group|type|role|enrolperiod)\d+$/', $lcfield)) {
// special fields for enrolments
$newfield = $lcfield;
} else {
$cir->close();
$cir->cleanup();
print_error('duplicatefieldname', 'error', $returnurl, $field);
print_error('invalidfieldname', 'error', $returnurl, $field);
}
$processed[$key] = $field;
if (in_array($newfield, $processed)) {
$cir->close();
$cir->cleanup();
print_error('duplicatefieldname', 'error', $returnurl, $newfield);
}
$processed[$key] = $newfield;
}
return $processed;
@@ -248,33 +266,48 @@ function uu_process_template($template, $user) {
if (is_null($result)) {
return $template; //error during regex processing??
}
if (is_array($template)) {
$template['text'] = $result;
return $t;
} else {
if (array($template)) {
$template['text'] = $t;
return $t;
} else {
return $t;
}
return $result;
}
}
/**
* Internal callback function.
*/
function uu_process_template_callback($block, $username, $firstname, $lastname) {
function uu_process_template_callback($username, $firstname, $lastname, $block) {
$textlib = textlib_get_instance();
$repl = $block[0];
switch ($block[3]) {
case 'u': $repl = $username; break;
case 'f': $repl = $firstname; break;
case 'l': $repl = $lastname; break;
case 'u':
$repl = $username;
break;
case 'f':
$repl = $firstname;
break;
case 'l':
$repl = $lastname;
break;
default:
return $block[0];
}
switch ($block[1]) {
case '+': $repl = $textlib->strtoupper($repl); break;
case '-': $repl = $textlib->strtolower($repl); break;
case '~': $repl = $textlib->strtotitle($repl); break;
case '+':
$repl = $textlib->strtoupper($repl);
break;
case '-':
$repl = $textlib->strtolower($repl);
break;
case '~':
$repl = $textlib->strtotitle($repl);
break;
}
if (!empty($block[2])) {
$repl = $textlib->substr($repl, 0 , $block[2]);
}
+61
View File
@@ -0,0 +1,61 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Web services API documentation
*
* @package webservice
* @copyright 2011 Moodle Pty Ltd (http://moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @author Jerome Mouneyrac
*/
require_once('../../config.php');
require_once($CFG->libdir . '/adminlib.php');
require($CFG->dirroot . '/webservice/lib.php');
admin_externalpage_setup('webservicedocumentation');
// get all the function descriptions
$functions = $DB->get_records('external_functions', array(), 'name');
$functiondescs = array();
foreach ($functions as $function) {
$functiondescs[$function->name] = external_function_info($function);
}
//display the documentation for all documented protocols,
//regardless if they are activated or not
$protocols = array();
$protocols['rest'] = true;
$protocols['xmlrpc'] = true;
/// Check if we are in printable mode
$printableformat = optional_param('print', false, PARAM_BOOL);
/// OUTPUT
echo $OUTPUT->header();
$renderer = $PAGE->get_renderer('core', 'webservice');
echo $renderer->documentation_html($functiondescs,
$printableformat, $protocols, array(), $PAGE->url);
/// trigger browser print operation
if (!empty($printableformat)) {
$PAGE->requires->js_function_call('window.print', array());
}
echo $OUTPUT->footer();
+2 -2
View File
@@ -33,7 +33,7 @@ $userid = required_param('userid', PARAM_INT);
admin_externalpage_setup('externalserviceusersettings');
//define nav bar
$PAGE->set_url('/' . $CFG->admin . '/webservice/service_user_settings.php',
$PAGE->set_url('/' . $CFG->admin . '/webservice/service_user_settings.php',
array('id' => $serviceid, 'userid' => $userid));
$node = $PAGE->settingsnav->find('externalservices', navigation_node::TYPE_SETTING);
if ($node) {
@@ -62,7 +62,7 @@ if ($usersettingsform->is_cancelled()) {
$serviceuserinfo->id = $serviceuser->serviceuserid;
$serviceuserinfo->iprestriction = $settingsformdata->iprestriction;
$serviceuserinfo->validuntil = $settingsformdata->validuntil;
$webservicemanager->update_ws_authorised_user($serviceuserinfo);
//TODO: assign capability
+2 -2
View File
@@ -37,7 +37,7 @@ $PAGE->set_url('/' . $CFG->admin . '/webservice/testclient.php');
$PAGE->navbar->ignore_active(true);
$PAGE->navbar->add(get_string('administrationsite'));
$PAGE->navbar->add(get_string('development', 'admin'));
$PAGE->navbar->add(get_string('testclient', 'webservice'),
$PAGE->navbar->add(get_string('testclient', 'webservice'),
new moodle_url('/' . $CFG->admin . '/webservice/testclient.php'));
if (!empty($function)) {
$PAGE->navbar->add($function);
@@ -169,4 +169,4 @@ if ($mform->is_cancelled()) {
$mform->display();
echo $OUTPUT->footer();
die;
}
}
+1 -1
View File
@@ -94,7 +94,7 @@ switch ($action) {
die;
break;
case 'delete':
case 'delete':
$token = $webservicemanager->get_created_by_user_ws_token($USER->id, $tokenid);
//Delete the token
@@ -290,7 +290,7 @@ class main_view extends XMLDBAction {
$o .= ' that seems to be active (true). ENUMs support has been dropped in Moodle 2.0, ' .
' the XMLDB Editor will delete any ENUM reference next time you save this file' .
' and you MUST provide one upgrade block in your code to drop them from DB. See' .
' <a href="http://docs.moodle.org/en/Development:DB_layer_2.0_migration_docs#The_changes">' .
' <a href="http://docs.moodle.org/dev/DB_layer_2.0_migration_docs#The_changes">' .
' Moodle Docs</a> for more info and examples.';
} else {
$o .= ' that seem to be inactive (false). ENUMs support has been dropped in Moodle 2.0,' .
+36 -1
View File
@@ -360,7 +360,7 @@ class auth_plugin_cas extends auth_plugin_ldap {
* @return boolean result
*/
function iscreator($username) {
if ((empty($this->config->attrcreators) && empty($this->config->groupecreators)) or empty($this->config->memberattribute)) {
if (empty($this->config->host_url) or (empty($this->config->attrcreators) && empty($this->config->groupecreators)) or empty($this->config->memberattribute)) {
return false;
}
@@ -405,4 +405,39 @@ class auth_plugin_cas extends auth_plugin_ldap {
return false;
}
/**
* Reads user information from LDAP and returns it as array()
*
* If no LDAP servers are configured, user information has to be
* provided via other methods (CSV file, manually, etc.). Return
* an empty array so existing user info is not lost. Otherwise,
* calls parent class method to get user info.
*
* @param string $username username
* @return mixed array with no magic quotes or false on error
*/
function get_userinfo($username) {
if (empty($this->config->host_url)) {
return array();
}
return parent::get_userinfo($username);
}
/**
* Syncronizes users from LDAP server to moodle user table.
*
* If no LDAP servers are configured, simply return. Otherwise,
* call parent class method to do the work.
*
* @param bool $do_updates will do pull in data updates from LDAP if relevant
* @return nothing
*/
function sync_users($do_updates=true) {
if (empty($this->config->host_url)) {
error_log('[AUTH CAS] '.get_string('noldapserver', 'auth_cas'));
return;
}
parent::sync_users($do_updates);
}
}
+1
View File
@@ -61,4 +61,5 @@ $string['auth_cas_text'] = 'Secure connection';
$string['auth_cas_use_cas'] = 'Use CAS';
$string['auth_cas_version'] = 'Version of CAS';
$string['CASform'] = 'Authentication choice';
$string['noldapserver'] = 'No LDAP server configured for CAS! Syncing disabled.';
$string['pluginname'] = 'CAS server (SSO)';
+6 -6
View File
@@ -228,17 +228,17 @@ class auth_plugin_db extends auth_plugin_base {
// find obsolete users
if (count($userlist)) {
list($notin_sql, $params) = $DB->get_in_or_equal($userlist, SQL_PARAMS_NAMED, 'u0000', false);
$params['authtype'] = $this->authtype;
$sql = "SELECT u.id, u.username, u.email, u.auth
list($notin_sql, $params) = $DB->get_in_or_equal($userlist, SQL_PARAMS_NAMED, 'u', false);
$params['authtype'] = $this->authtype;
$sql = "SELECT u.*
FROM {user} u
WHERE u.auth=:authtype AND u.deleted=0 AND u.username $notin_sql";
} else {
$sql = "SELECT u.id, u.username, u.email, u.auth
$sql = "SELECT u.*
FROM {user} u
WHERE u.auth=:authtype AND u.deleted=0";
$params = array();
$params['authtype'] = $this->authtype;
$params['authtype'] = $this->authtype;
}
$remove_users = $DB->get_records_sql($sql, $params);
@@ -290,7 +290,7 @@ class auth_plugin_db extends auth_plugin_base {
// only go ahead if we actually
// have fields to update locally
if (!empty($updatekeys)) {
list($in_sql, $params) = $DB->get_in_or_equal($userlist, SQL_PARAMS_NAMED, 'u0000', true);
list($in_sql, $params) = $DB->get_in_or_equal($userlist, SQL_PARAMS_NAMED, 'u', true);
$params['authtype'] = $this->authtype;
$sql = "SELECT u.id, u.username
FROM {user} u
+1 -16
View File
@@ -24,23 +24,8 @@
*/
$string['auth_emaildescription'] = 'Email confirmation is the default authentication method. When the user signs up, choosing their own new username and password, a confirmation email is sent to the user\'s email address. This email contains a secure link to a page where the user can confirm their account. Future logins just check the username and password against the stored values in the Moodle database.';
$string['auth_emailchangecancel'] = 'Cancel email change';
$string['auth_emailchangepending'] = 'Change pending. Open the link sent to you at {$a->preference_newemail}.';
$string['auth_emailnoemail'] = 'Tried to send you an email but failed!';
$string['auth_emailnoinsert'] = 'Could not add your record to the database!';
$string['auth_emailnowexists'] = 'The email address you tried to assign to your profile has been assigned to someone else since your original request. Your request for change of email address is hereby cancelled, but you may try again with a different address.';
$string['auth_emailrecaptcha'] = 'Adds a visual/audio confirmation form element to the signup page for email self-registering users. This protects your site against spammers and contributes to a worthwhile cause. See http://recaptcha.net/learnmore.html for more details. <br /><em>PHP cURL extension is required.</em>';
$string['auth_emailrecaptcha'] = 'Adds a visual/audio confirmation form element to the signup page for email self-registering users. This protects your site against spammers and contributes to a worthwhile cause. See http://www.google.com/recaptcha/learnmore for more details. <br /><em>PHP cURL extension is required.</em>';
$string['auth_emailrecaptcha_key'] = 'Enable reCAPTCHA element';
$string['auth_emailsettings'] = 'Settings';
$string['auth_emailupdate'] = 'Email address update';
$string['auth_emailupdatemessage'] = 'Dear {$a->fullname},
You have requested a change of your email address for your user account at {$a->site}. Please open the following URL in your browser in order to confirm this change.
{$a->url}';
$string['auth_emailupdatesuccess'] = 'Email address of user <em>{$a->fullname}</em> was successfully updated to <em>{$a->email}</em>.';
$string['auth_emailupdatetitle'] = 'Confirmation of email update at {$a->site}';
$string['auth_changingemailaddress'] = 'You have requested a change of email address, from {$a->oldemail} to {$a->newemail}. For security reasons, we are sending you an email message at the new address to confirm that it belongs to you. Your email address will be updated as soon as you open the URL sent to you in that message.';
$string['auth_invalidnewemailkey'] = 'Error: if you are trying to confirm a change of email address, you may have made a mistake in copying the URL we sent you by email. Please copy the address and try again.';
$string['auth_outofnewemailupdateattempts'] = 'You have run out of allowed attempts to update your email address. Your update request has been cancelled.';
$string['pluginname'] = 'Email-based self-registration';
+1 -1
View File
@@ -1,3 +1,3 @@
LDAP-module README
Please read comments from lib.php
Please read comments from auth.php in this directory.
+14 -13
View File
@@ -502,7 +502,7 @@ class auth_plugin_ldap extends auth_plugin_base {
events_trigger('user_created', $user);
if (! send_confirmation_email($user)) {
print_error('auth_emailnoemail', 'auth_email');
print_error('noemail', 'auth_ldap');
}
if ($notify) {
@@ -579,16 +579,17 @@ class auth_plugin_ldap extends auth_plugin_base {
$sr = ldap_read($ldapconnection, $user_dn, '(objectClass=*)', $search_attribs);
if ($sr) {
$info = ldap_get_entries_moodle($ldapconnection, $sr);
$info = array_change_key_case($info, CASE_LOWER);
if (!empty ($info) and !empty($info[0][$this->config->expireattr][0])) {
$expiretime = $this->ldap_expirationtime2unix($info[0][$this->config->expireattr][0], $ldapconnection, $user_dn);
if ($expiretime != 0) {
$now = time();
if ($expiretime > $now) {
$result = ceil(($expiretime - $now) / DAYSECS);
}
else {
$result = floor(($expiretime - $now) / DAYSECS);
if (!empty ($info)) {
$info = array_change_key_case($info[0], CASE_LOWER);
if (!empty($info[$this->config->expireattr][0])) {
$expiretime = $this->ldap_expirationtime2unix($info[$this->config->expireattr][0], $ldapconnection, $user_dn);
if ($expiretime != 0) {
$now = time();
if ($expiretime > $now) {
$result = ceil(($expiretime - $now) / DAYSECS);
} else {
$result = floor(($expiretime - $now) / DAYSECS);
}
}
}
}
@@ -689,7 +690,7 @@ class auth_plugin_ldap extends auth_plugin_base {
// Find users in DB that aren't in ldap -- to be removed!
// this is still not as scalable (but how often do we mass delete?)
if ($this->config->removeuser !== AUTH_REMOVEUSER_KEEP) {
$sql = 'SELECT u.id, u.username, u.email, u.auth
$sql = 'SELECT u.*
FROM {user} u
LEFT JOIN {tmp_extuser} e ON (u.username = e.username AND u.mnethostid = e.mnethostid)
WHERE u.auth = ?
@@ -1385,7 +1386,7 @@ class auth_plugin_ldap extends auth_plugin_base {
}
}
}
$moodleattributes['username'] = $this->config->user_attribute;
$moodleattributes['username'] = moodle_strtolower(trim($this->config->user_attribute));
return $moodleattributes;
}
+1
View File
@@ -114,6 +114,7 @@ $string['morethanoneuser'] = 'Strange! More than one user record found in ldap.
$string['needbcmath'] = 'You need the BCMath extension to use grace logins with Active Directory';
$string['needmbstring'] = 'You need the mbstring extension to change passwords in Active Directory';
$string['nodnforusername'] = 'Error in user_update_password(). No DN for: {$a->username}';
$string['noemail'] = 'Tried to send you an email but failed!';
$string['notcalledfromserver'] = 'Should not be called from the web server!';
$string['noupdatestobedone'] = "No updates to be done\n";
$string['nouserentriestoremove'] = "No user entries to be removed\n";
+3
View File
@@ -45,5 +45,8 @@ function xmldb_auth_manual_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2011022700, 'auth', 'manual');
}
// Moodle v2.1.0 release upgrade line
// Put any upgrade step following this
return true;
}
+1 -2
View File
@@ -276,6 +276,7 @@ class auth_plugin_mnet extends auth_plugin_base {
*/
$remoteuser->mnethostid = $remotehost->id;
$remoteuser->firstaccess = time(); // First time user in this server, grab it here
$remoteuser->confirmed = 1;
$remoteuser->id = $DB->insert_record('user', $remoteuser);
$firsttime = true;
@@ -889,8 +890,6 @@ class auth_plugin_mnet extends auth_plugin_base {
global $CFG, $DB;
$remoteclient = get_mnet_remote_client();
$CFG->usesid = true;
// We don't want to output anything to the client machine
$start = ob_start();
+3
View File
@@ -43,5 +43,8 @@ function xmldb_auth_mnet_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2010071300, 'auth', 'mnet');
}
// Moodle v2.1.0 release upgrade line
// Put any upgrade step following this
return true;
}
+5 -10
View File
@@ -193,18 +193,13 @@ class auth_plugin_shibboleth extends auth_plugin_base {
*
*/
function logoutpage_hook() {
global $redirect;
global $SESSION, $redirect;
// Only do this if logout handler is defined
if (
isset($this->config->logout_handler)
&& !empty($this->config->logout_handler)
){
// Only do this if logout handler is defined, and if the user is actually logged in via Shibboleth
$logouthandlervalid = isset($this->config->logout_handler) && !empty($this->config->logout_handler);
if (isset($SESSION->shibboleth_session_id) && $logouthandlervalid ) {
// Check if there is an alternative logout return url defined
if (
isset($this->config->logout_return_url)
&& !empty($this->config->logout_return_url)
){
if (isset($this->config->logout_return_url) && !empty($this->config->logout_return_url)) {
// Set temp_redirect to alternative return url
$temp_redirect = $this->config->logout_return_url;
} else {
+4 -3
View File
@@ -54,6 +54,7 @@ abstract class backup implements checksumable {
const MODE_HUB = 30;
const MODE_SAMESITE = 40;
const MODE_AUTOMATED = 50;
const MODE_CONVERTED = 60;
// Target (new/existing/current/adding/deleting)
const TARGET_CURRENT_DELETING = 0;
@@ -107,8 +108,8 @@ abstract class backup implements checksumable {
const OPERATION_RESTORE ='restore';// We are performing one restore
// Version (to keep CFG->backup_version (and release) updated automatically)
const VERSION = 2010111800;
const RELEASE = '2.0';
const VERSION = 2011063000;
const RELEASE = '2.1';
}
/*
@@ -117,6 +118,6 @@ abstract class backup implements checksumable {
abstract class backup_exception extends moodle_exception {
public function __construct($errorcode, $a=NULL, $debuginfo=null) {
parent::__construct($errorcode, 'error', '', $a, null, $debuginfo);
parent::__construct($errorcode, 'error', '', $a, $debuginfo);
}
}
+5 -3
View File
@@ -60,10 +60,12 @@ switch ($type) {
$heading = get_string('backupcourse', 'backup', $course->shortname);
break;
case backup::TYPE_1SECTION :
require_capability('moodle/backup:backupsection', get_context_instance(CONTEXT_COURSE, $course->id));
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
require_capability('moodle/backup:backupsection', $coursecontext);
if (!empty($section->name)) {
$heading = get_string('backupsection', 'backup', $section->name);
$PAGE->navbar->add($section->name);
$sectionname = format_string($section->name, true, array('context' => $coursecontext));
$heading = get_string('backupsection', 'backup', $sectionname);
$PAGE->navbar->add($sectionname);
} else {
$heading = get_string('backupsection', 'backup', $section->section);
$PAGE->navbar->add(get_string('section').' '.$section->section);
+1 -1
View File
@@ -194,7 +194,7 @@ function schedule_backup_cron() {
//Build the message subject
$site = get_site();
$prefix = $site->shortname.": ";
$prefix = format_string($site->shortname, true, array('context' => get_context_instance(CONTEXT_COURSE, SITEID))).": ";
if ($count_error != 0 || $count_unfinished != 0) {
$prefix .= "[".strtoupper(get_string('error'))."] ";
}
-2
View File
@@ -92,5 +92,3 @@ define('MOODLE_QUIZ_MULTIPLE_RESPONSE', 'multichoice');
define('MOODLE_QUIZ_MACHT', 'match');
define('MOODLE_QUIZ_ESSAY', 'essay');
define('MOODLE_QUIZ_SHORTANSWER', 'shortanswer');
?>
@@ -290,6 +290,9 @@ class backup_controller extends backup implements loggable {
* @return void Throws and exception of completes
*/
public function execute_plan() {
// Basic/initial prevention against time/memory limits
set_time_limit(1 * 60 * 60); // 1 hour for 1 course initially granted
raise_memory_limit(MEMORY_EXTRA);
return $this->plan->execute();
}
@@ -336,7 +339,7 @@ class backup_controller extends backup implements loggable {
protected function apply_defaults() {
$this->log('applying plan defaults', backup::LOG_DEBUG);
backup_controller_dbops::apply_general_config_defaults($this);
backup_controller_dbops::apply_config_defaults($this);
$this->set_status(backup::STATUS_CONFIGURED);
}
}
+30 -21
View File
@@ -296,6 +296,9 @@ class restore_controller extends backup implements loggable {
}
public function execute_plan() {
// Basic/initial prevention against time/memory limits
set_time_limit(1 * 60 * 60); // 1 hour for 1 course initially granted
raise_memory_limit(MEMORY_EXTRA);
return $this->plan->execute();
}
@@ -377,38 +380,44 @@ class restore_controller extends backup implements loggable {
}
/**
* convert from current format to backup::MOODLE format
* Converts from current format to backup::MOODLE format
*/
public function convert() {
global $CFG;
require_once($CFG->dirroot . '/backup/util/helper/convert_helper.class.php');
// Basic/initial prevention against time/memory limits
set_time_limit(1 * 60 * 60); // 1 hour for 1 course initially granted
raise_memory_limit(MEMORY_EXTRA);
if ($this->status != backup::STATUS_REQUIRE_CONV) {
throw new restore_controller_exception('cannot_convert_not_required_status');
}
if ($this->format == backup::FORMAT_UNKNOWN) {
throw new restore_controller_exception('cannot_convert_from_unknown_format');
}
if ($this->format == backup::FORMAT_MOODLE1) {
// TODO: Implement moodle1 => moodle2 conversion
throw new restore_controller_exception('cannot_convert_yet_from_moodle1_format');
$this->log('backup format conversion required', backup::LOG_INFO);
// Run conversion to the proper format
if (!convert_helper::to_moodle2_format($this->get_tempdir(), $this->format, $this->get_logger())) {
// todo - unable to find the conversion path, what to do now?
// throwing the exception as a temporary solution
throw new restore_controller_exception('unable_to_find_conversion_path');
}
// Once conversions have finished, we check again the format
$newformat = backup_general_helper::detect_backup_format($tempdir);
$this->log('backup format conversion successful', backup::LOG_INFO);
// If format is moodle2, load plan, apply security and set status based on interactivity
if ($newformat === backup::FORMAT_MOODLE) {
// Load plan
$this->load_plan();
// If no exceptions were thrown, then we are in the proper format
$this->format = backup::FORMAT_MOODLE;
// Perform all initial security checks and apply (2nd param) them to settings automatically
restore_check::check_security($this, true);
// Load plan, apply security and set status based on interactivity
$this->load_plan();
if ($this->interactive == backup::INTERACTIVE_YES) {
$this->set_status(backup::STATUS_SETTING_UI);
} else {
$this->set_status(backup::STATUS_NEED_PRECHECK);
}
// Perform all initial security checks and apply (2nd param) them to settings automatically
restore_check::check_security($this, true);
if ($this->interactive == backup::INTERACTIVE_YES) {
$this->set_status(backup::STATUS_SETTING_UI);
} else {
throw new restore_controller_exception('conversion_ended_with_wrong_format', $newformat);
$this->set_status(backup::STATUS_NEED_PRECHECK);
}
}
+286
View File
@@ -0,0 +1,286 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Provides base converter classes
*
* @package core
* @subpackage backup-convert
* @copyright 2011 Mark Nielsen <mark@moodlerooms.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/backup/util/includes/convert_includes.php');
/**
* Base converter class
*
* All Moodle backup converters are supposed to extend this base class.
*
* @throws convert_exception
*/
abstract class base_converter implements loggable {
/** @var string unique identifier of this converter instance */
protected $id;
/** @var string the name of the directory containing the unpacked backup being converted */
protected $tempdir;
/** @var string the name of the directory where the backup is converted to */
protected $workdir;
/** @var null|base_logger logger to use during the conversion */
protected $logger = null;
/**
* Constructor
*
* @param string $tempdir the relative path to the directory containing the unpacked backup to convert
* @param null|base_logger logger to use during the conversion
*/
public function __construct($tempdir, $logger = null) {
$this->tempdir = $tempdir;
$this->id = convert_helper::generate_id($tempdir);
$this->workdir = $tempdir . '_' . $this->get_name() . '_' . $this->id;
$this->set_logger($logger);
$this->log('instantiating '.$this->get_name().' converter '.$this->get_id(), backup::LOG_DEBUG);
$this->log('conversion source directory', backup::LOG_DEBUG, $this->tempdir);
$this->log('conversion target directory', backup::LOG_DEBUG, $this->workdir);
$this->init();
}
/**
* Sets the logger to use during the conversion
*
* @param null|base_logger $logger
*/
public function set_logger($logger) {
if (is_null($logger) or ($logger instanceof base_logger)) {
$this->logger = $logger;
}
}
/**
* If the logger was set for the converter, log the message
*
* If the $display is enabled, the spaces in the $message text are removed
* and the text is used as a string identifier in the core_backup language file.
*
* @see backup_helper::log()
* @param string $message message text
* @param int $level message level {@example backup::LOG_WARNING}
* @param null|mixed $a additional information
* @param null|int $depth the message depth
* @param bool $display whether the message should be sent to the output, too
*/
public function log($message, $level, $a = null, $depth = null, $display = false) {
if ($this->logger instanceof base_logger) {
backup_helper::log($message, $level, $a, $depth, $display, $this->logger);
}
}
/**
* Get instance identifier
*
* @return string the unique identifier of this converter instance
*/
public function get_id() {
return $this->id;
}
/**
* Get converter name
*
* @return string the system name of the converter
*/
public function get_name() {
return array_shift(explode('_', get_class($this)));
}
/**
* Converts the backup directory
*/
public function convert() {
try {
$this->log('creating the target directory', backup::LOG_DEBUG);
$this->create_workdir();
$this->log('executing the conversion', backup::LOG_DEBUG);
$this->execute();
$this->log('replacing the source directory with the converted version', backup::LOG_DEBUG);
$this->replace_tempdir();
} catch (Exception $e) {
}
// clean-up stuff if needed
$this->destroy();
// eventually re-throw the execution exception
if (isset($e) and ($e instanceof Exception)) {
throw $e;
}
}
/**
* @return string the full path to the working directory
*/
public function get_workdir_path() {
global $CFG;
return "$CFG->dataroot/temp/backup/$this->workdir";
}
/**
* @return string the full path to the directory with the source backup
*/
public function get_tempdir_path() {
global $CFG;
return "$CFG->dataroot/temp/backup/$this->tempdir";
}
/// public static methods //////////////////////////////////////////////////
/**
* Makes sure that this converter is available at this site
*
* This is intended for eventual PHP extensions check, environment check etc.
* All checks that do not depend on actual backup data should be done here.
*
* @return boolean true if this converter should be considered as available
*/
public static function is_available() {
return true;
}
/**
* Detects the format of the backup directory
*
* Moodle 2.x format is being detected by the core itself. The converters are
* therefore supposed to detect the source format. Eventually, if the target
* format os not {@link backup::FORMAT_MOODLE} then they should be able to
* detect both source and target formats.
*
* @param string $tempdir the name of the backup directory
* @return null|string null if not recognized, backup::FORMAT_xxx otherwise
*/
public static function detect_format($tempdir) {
return null;
}
/**
* Returns the basic information about the converter
*
* The returned array must contain the following keys:
* 'from' - the supported source format, eg. backup::FORMAT_MOODLE1
* 'to' - the supported target format, eg. backup::FORMAT_MOODLE
* 'cost' - the cost of the conversion, non-negative non-zero integer
*/
public static function description() {
return array(
'from' => null,
'to' => null,
'cost' => null,
);
}
/// end of public API //////////////////////////////////////////////////////
/**
* Initialize the instance if needed, called by the constructor
*/
protected function init() {
}
/**
* Converts the contents of the tempdir into the target format in the workdir
*/
protected abstract function execute();
/**
* Prepares a new empty working directory
*/
protected function create_workdir() {
fulldelete($this->get_workdir_path());
if (!check_dir_exists($this->get_workdir_path())) {
throw new convert_exception('failed_create_workdir');
}
}
/**
* Replaces the source backup directory with the converted version
*
* If $CFG->keeptempdirectoriesonbackup is defined, the original source
* source backup directory is kept for debugging purposes.
*/
protected function replace_tempdir() {
global $CFG;
if (empty($CFG->keeptempdirectoriesonbackup)) {
fulldelete($this->get_tempdir_path());
} else {
if (!rename($this->get_tempdir_path(), $this->get_tempdir_path() . '_' . $this->get_name() . '_' . $this->id . '_source')) {
throw new convert_exception('failed_rename_source_tempdir');
}
}
if (!rename($this->get_workdir_path(), $this->get_tempdir_path())) {
throw new convert_exception('failed_move_converted_into_place');
}
}
/**
* Cleans up stuff after the execution
*
* Note that we do not know if the execution was successful or not.
* An exception might have been thrown.
*/
protected function destroy() {
global $CFG;
if (empty($CFG->keeptempdirectoriesonbackup)) {
fulldelete($this->get_workdir_path());
}
}
}
/**
* General convert-related exception
*
* @author David Mudrak <david@moodle.com>
*/
class convert_exception extends moodle_exception {
/**
* Constructor
*
* @param string $errorcode key for the corresponding error string
* @param object $a extra words and phrases that might be required in the error string
* @param string $debuginfo optional debugging information
*/
public function __construct($errorcode, $a = null, $debuginfo = null) {
parent::__construct($errorcode, '', '', $a, $debuginfo);
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

@@ -0,0 +1,602 @@
<?xml version="1.0" encoding="UTF-8"?>
<MOODLE_BACKUP>
<INFO>
<NAME>restore.zip</NAME>
<MOODLE_VERSION>2007101520</MOODLE_VERSION>
<MOODLE_RELEASE>1.9.2 (Build: 20080711)</MOODLE_RELEASE>
<BACKUP_VERSION>2008030300</BACKUP_VERSION>
<BACKUP_RELEASE>1.9</BACKUP_RELEASE>
<DATE>1299774017</DATE>
<ORIGINAL_WWWROOT>http://elearning-testadam.uss.lsu.edu/moodle</ORIGINAL_WWWROOT>
<ZIP_METHOD>internal</ZIP_METHOD>
<DETAILS>
<MOD>
<NAME>forum</NAME>
<INCLUDED>true</INCLUDED>
<USERINFO>false</USERINFO>
<INSTANCES>
<INSTANCE>
<ID>57</ID>
<NAME>News forum</NAME>
<INCLUDED>true</INCLUDED>
<USERINFO>false</USERINFO>
</INSTANCE>
</INSTANCES>
</MOD>
<METACOURSE>false</METACOURSE>
<USERS>course</USERS>
<LOGS>false</LOGS>
<USERFILES>true</USERFILES>
<COURSEFILES>true</COURSEFILES>
<SITEFILES>true</SITEFILES>
<GRADEBOOKHISTORIES>false</GRADEBOOKHISTORIES>
<MESSAGES>false</MESSAGES>
<BLOGS>false</BLOGS>
<BLOCKFORMAT>instances</BLOCKFORMAT>
</DETAILS>
</INFO>
<ROLES>
</ROLES>
<COURSE>
<HEADER>
<ID>33</ID>
<CATEGORY>
<ID>1</ID>
<NAME>Miscellaneous</NAME>
</CATEGORY>
<PASSWORD></PASSWORD>
<FULLNAME>Moodle 2.0 Test Restore</FULLNAME>
<SHORTNAME>M2TR</SHORTNAME>
<IDNUMBER></IDNUMBER>
<SUMMARY>Cazzin'</SUMMARY>
<FORMAT>weeks</FORMAT>
<SHOWGRADES>1</SHOWGRADES>
<NEWSITEMS>5</NEWSITEMS>
<TEACHER>Teacher</TEACHER>
<TEACHERS>Teachers</TEACHERS>
<STUDENT>Student</STUDENT>
<STUDENTS>Students</STUDENTS>
<GUEST>0</GUEST>
<STARTDATE>1299823200</STARTDATE>
<NUMSECTIONS>10</NUMSECTIONS>
<MAXBYTES>52428800</MAXBYTES>
<SHOWREPORTS>0</SHOWREPORTS>
<GROUPMODE>0</GROUPMODE>
<GROUPMODEFORCE>0</GROUPMODEFORCE>
<DEFAULTGROUPINGID>0</DEFAULTGROUPINGID>
<LANG></LANG>
<THEME></THEME>
<COST></COST>
<CURRENCY>USD</CURRENCY>
<MARKER>0</MARKER>
<VISIBLE>1</VISIBLE>
<HIDDENSECTIONS>0</HIDDENSECTIONS>
<TIMECREATED>1299773769</TIMECREATED>
<TIMEMODIFIED>1299773769</TIMEMODIFIED>
<METACOURSE>0</METACOURSE>
<EXPIRENOTIFY>0</EXPIRENOTIFY>
<NOTIFYSTUDENTS>0</NOTIFYSTUDENTS>
<EXPIRYTHRESHOLD>864000</EXPIRYTHRESHOLD>
<ENROLLABLE>1</ENROLLABLE>
<ENROLSTARTDATE>0</ENROLSTARTDATE>
<ENROLENDDATE>0</ENROLENDDATE>
<ENROLPERIOD>0</ENROLPERIOD>
<ROLES_OVERRIDES>
</ROLES_OVERRIDES>
<ROLES_ASSIGNMENTS>
</ROLES_ASSIGNMENTS>
</HEADER>
<BLOCKS>
<BLOCK>
<ID>314</ID>
<NAME>participants</NAME>
<PAGEID>33</PAGEID>
<PAGETYPE>course-view</PAGETYPE>
<POSITION>l</POSITION>
<WEIGHT>0</WEIGHT>
<VISIBLE>1</VISIBLE>
<CONFIGDATA>Tjs=</CONFIGDATA>
<ROLES_OVERRIDES>
</ROLES_OVERRIDES>
<ROLES_ASSIGNMENTS>
</ROLES_ASSIGNMENTS>
</BLOCK>
<BLOCK>
<ID>315</ID>
<NAME>activity_modules</NAME>
<PAGEID>33</PAGEID>
<PAGETYPE>course-view</PAGETYPE>
<POSITION>l</POSITION>
<WEIGHT>1</WEIGHT>
<VISIBLE>1</VISIBLE>
<CONFIGDATA>Tjs=</CONFIGDATA>
<ROLES_OVERRIDES>
</ROLES_OVERRIDES>
<ROLES_ASSIGNMENTS>
</ROLES_ASSIGNMENTS>
</BLOCK>
<BLOCK>
<ID>316</ID>
<NAME>search_forums</NAME>
<PAGEID>33</PAGEID>
<PAGETYPE>course-view</PAGETYPE>
<POSITION>l</POSITION>
<WEIGHT>2</WEIGHT>
<VISIBLE>1</VISIBLE>
<CONFIGDATA>Tjs=</CONFIGDATA>
<ROLES_OVERRIDES>
</ROLES_OVERRIDES>
<ROLES_ASSIGNMENTS>
</ROLES_ASSIGNMENTS>
</BLOCK>
<BLOCK>
<ID>317</ID>
<NAME>admin</NAME>
<PAGEID>33</PAGEID>
<PAGETYPE>course-view</PAGETYPE>
<POSITION>l</POSITION>
<WEIGHT>3</WEIGHT>
<VISIBLE>1</VISIBLE>
<CONFIGDATA>Tjs=</CONFIGDATA>
<ROLES_OVERRIDES>
</ROLES_OVERRIDES>
<ROLES_ASSIGNMENTS>
</ROLES_ASSIGNMENTS>
</BLOCK>
<BLOCK>
<ID>318</ID>
<NAME>course_list</NAME>
<PAGEID>33</PAGEID>
<PAGETYPE>course-view</PAGETYPE>
<POSITION>l</POSITION>
<WEIGHT>4</WEIGHT>
<VISIBLE>1</VISIBLE>
<CONFIGDATA>Tjs=</CONFIGDATA>
<ROLES_OVERRIDES>
</ROLES_OVERRIDES>
<ROLES_ASSIGNMENTS>
</ROLES_ASSIGNMENTS>
</BLOCK>
<BLOCK>
<ID>319</ID>
<NAME>news_items</NAME>
<PAGEID>33</PAGEID>
<PAGETYPE>course-view</PAGETYPE>
<POSITION>r</POSITION>
<WEIGHT>0</WEIGHT>
<VISIBLE>1</VISIBLE>
<CONFIGDATA>Tjs=</CONFIGDATA>
<ROLES_OVERRIDES>
</ROLES_OVERRIDES>
<ROLES_ASSIGNMENTS>
</ROLES_ASSIGNMENTS>
</BLOCK>
<BLOCK>
<ID>320</ID>
<NAME>calendar_upcoming</NAME>
<PAGEID>33</PAGEID>
<PAGETYPE>course-view</PAGETYPE>
<POSITION>r</POSITION>
<WEIGHT>1</WEIGHT>
<VISIBLE>1</VISIBLE>
<CONFIGDATA>Tjs=</CONFIGDATA>
<ROLES_OVERRIDES>
</ROLES_OVERRIDES>
<ROLES_ASSIGNMENTS>
</ROLES_ASSIGNMENTS>
</BLOCK>
<BLOCK>
<ID>321</ID>
<NAME>recent_activity</NAME>
<PAGEID>33</PAGEID>
<PAGETYPE>course-view</PAGETYPE>
<POSITION>r</POSITION>
<WEIGHT>2</WEIGHT>
<VISIBLE>1</VISIBLE>
<CONFIGDATA>Tjs=</CONFIGDATA>
<ROLES_OVERRIDES>
</ROLES_OVERRIDES>
<ROLES_ASSIGNMENTS>
</ROLES_ASSIGNMENTS>
</BLOCK>
</BLOCKS>
<SECTIONS>
<SECTION>
<ID>436</ID>
<NUMBER>0</NUMBER>
<SUMMARY>$@NULL@$</SUMMARY>
<VISIBLE>1</VISIBLE>
<MODS>
<MOD>
<ID>250</ID>
<TYPE>forum</TYPE>
<INSTANCE>57</INSTANCE>
<ADDED>1299773780</ADDED>
<SCORE>0</SCORE>
<INDENT>0</INDENT>
<VISIBLE>1</VISIBLE>
<GROUPMODE>0</GROUPMODE>
<GROUPINGID>0</GROUPINGID>
<GROUPMEMBERSONLY>0</GROUPMEMBERSONLY>
<IDNUMBER>$@NULL@$</IDNUMBER>
<ROLES_OVERRIDES>
</ROLES_OVERRIDES>
<ROLES_ASSIGNMENTS>
</ROLES_ASSIGNMENTS>
</MOD>
</MODS>
</SECTION>
<SECTION>
<ID>437</ID>
<NUMBER>1</NUMBER>
<SUMMARY></SUMMARY>
<VISIBLE>1</VISIBLE>
</SECTION>
<SECTION>
<ID>438</ID>
<NUMBER>2</NUMBER>
<SUMMARY></SUMMARY>
<VISIBLE>1</VISIBLE>
</SECTION>
<SECTION>
<ID>439</ID>
<NUMBER>3</NUMBER>
<SUMMARY></SUMMARY>
<VISIBLE>1</VISIBLE>
</SECTION>
<SECTION>
<ID>440</ID>
<NUMBER>4</NUMBER>
<SUMMARY></SUMMARY>
<VISIBLE>1</VISIBLE>
</SECTION>
<SECTION>
<ID>441</ID>
<NUMBER>5</NUMBER>
<SUMMARY></SUMMARY>
<VISIBLE>1</VISIBLE>
</SECTION>
<SECTION>
<ID>442</ID>
<NUMBER>6</NUMBER>
<SUMMARY></SUMMARY>
<VISIBLE>1</VISIBLE>
</SECTION>
<SECTION>
<ID>443</ID>
<NUMBER>7</NUMBER>
<SUMMARY></SUMMARY>
<VISIBLE>1</VISIBLE>
</SECTION>
<SECTION>
<ID>444</ID>
<NUMBER>8</NUMBER>
<SUMMARY></SUMMARY>
<VISIBLE>1</VISIBLE>
</SECTION>
<SECTION>
<ID>445</ID>
<NUMBER>9</NUMBER>
<SUMMARY></SUMMARY>
<VISIBLE>1</VISIBLE>
</SECTION>
<SECTION>
<ID>446</ID>
<NUMBER>10</NUMBER>
<SUMMARY></SUMMARY>
<VISIBLE>1</VISIBLE>
</SECTION>
</SECTIONS>
<USERS>
<USER>
<ID>2</ID>
<AUTH>manual</AUTH>
<CONFIRMED>1</CONFIRMED>
<POLICYAGREED>0</POLICYAGREED>
<DELETED>0</DELETED>
<USERNAME>admin</USERNAME>
<PASSWORD>ea557cf33bda866d97b07465f1ea3867</PASSWORD>
<IDNUMBER>891220979</IDNUMBER>
<FIRSTNAME>Admin</FIRSTNAME>
<LASTNAME>User</LASTNAME>
<EMAIL>adamzap@gmail.com</EMAIL>
<EMAILSTOP>0</EMAILSTOP>
<ICQ></ICQ>
<SKYPE></SKYPE>
<YAHOO></YAHOO>
<AIM></AIM>
<MSN></MSN>
<PHONE1></PHONE1>
<PHONE2></PHONE2>
<INSTITUTION></INSTITUTION>
<DEPARTMENT></DEPARTMENT>
<ADDRESS></ADDRESS>
<CITY>br</CITY>
<COUNTRY>US</COUNTRY>
<LANG>en_utf8</LANG>
<THEME></THEME>
<TIMEZONE>99</TIMEZONE>
<FIRSTACCESS>0</FIRSTACCESS>
<LASTACCESS>1265755409</LASTACCESS>
<LASTLOGIN>1265658108</LASTLOGIN>
<CURRENTLOGIN>1265741271</CURRENTLOGIN>
<LASTIP>130.39.194.172</LASTIP>
<SECRET>lknsJoSw0S6myJA</SECRET>
<PICTURE>1</PICTURE>
<URL></URL>
<DESCRIPTION></DESCRIPTION>
<MAILFORMAT>1</MAILFORMAT>
<MAILDIGEST>0</MAILDIGEST>
<MAILDISPLAY>1</MAILDISPLAY>
<HTMLEDITOR>1</HTMLEDITOR>
<AJAX>1</AJAX>
<AUTOSUBSCRIBE>1</AUTOSUBSCRIBE>
<TRACKFORUMS>0</TRACKFORUMS>
<TIMEMODIFIED>1265216036</TIMEMODIFIED>
<ROLES>
<ROLE>
<TYPE>needed</TYPE>
</ROLE>
</ROLES>
<USER_PREFERENCES>
<USER_PREFERENCE>
<NAME>email_bounce_count</NAME>
<VALUE>1</VALUE>
</USER_PREFERENCE>
<USER_PREFERENCE>
<NAME>email_send_count</NAME>
<VALUE>1</VALUE>
</USER_PREFERENCE>
<USER_PREFERENCE>
<NAME>user_editadvanced_form_showadvanced</NAME>
<VALUE>1</VALUE>
</USER_PREFERENCE>
</USER_PREFERENCES>
<ROLES_OVERRIDES>
</ROLES_OVERRIDES>
<ROLES_ASSIGNMENTS>
</ROLES_ASSIGNMENTS>
</USER>
<USER>
<ID>3</ID>
<AUTH>cas</AUTH>
<CONFIRMED>1</CONFIRMED>
<POLICYAGREED>0</POLICYAGREED>
<DELETED>0</DELETED>
<USERNAME>azaple1</USERNAME>
<PASSWORD>fb005bdc5fb1b23ea95d238fb5ecb9e2</PASSWORD>
<IDNUMBER>891111111</IDNUMBER>
<FIRSTNAME>Adam</FIRSTNAME>
<LASTNAME>Zapletal</LASTNAME>
<EMAIL>azaple1@lsu.edu</EMAIL>
<EMAILSTOP>0</EMAILSTOP>
<ICQ></ICQ>
<SKYPE></SKYPE>
<YAHOO></YAHOO>
<AIM></AIM>
<MSN></MSN>
<PHONE1></PHONE1>
<PHONE2></PHONE2>
<INSTITUTION></INSTITUTION>
<DEPARTMENT></DEPARTMENT>
<ADDRESS></ADDRESS>
<CITY>asdf</CITY>
<COUNTRY>AL</COUNTRY>
<LANG>en_utf8</LANG>
<THEME></THEME>
<TIMEZONE>99</TIMEZONE>
<FIRSTACCESS>0</FIRSTACCESS>
<LASTACCESS>1299774054</LASTACCESS>
<LASTLOGIN>1297979000</LASTLOGIN>
<CURRENTLOGIN>1299773727</CURRENTLOGIN>
<LASTIP>173.253.129.223</LASTIP>
<SECRET></SECRET>
<PICTURE>1</PICTURE>
<URL></URL>
<DESCRIPTION></DESCRIPTION>
<MAILFORMAT>1</MAILFORMAT>
<MAILDIGEST>0</MAILDIGEST>
<MAILDISPLAY>2</MAILDISPLAY>
<HTMLEDITOR>1</HTMLEDITOR>
<AJAX>1</AJAX>
<AUTOSUBSCRIBE>1</AUTOSUBSCRIBE>
<TRACKFORUMS>0</TRACKFORUMS>
<TIMEMODIFIED>1288033285</TIMEMODIFIED>
<ROLES>
<ROLE>
<TYPE>needed</TYPE>
</ROLE>
</ROLES>
<USER_PREFERENCES>
<USER_PREFERENCE>
<NAME>assignment_mailinfo</NAME>
<VALUE>1</VALUE>
</USER_PREFERENCE>
<USER_PREFERENCE>
<NAME>assignment_perpage</NAME>
<VALUE>10</VALUE>
</USER_PREFERENCE>
<USER_PREFERENCE>
<NAME>assignment_quickgrade</NAME>
<VALUE>0</VALUE>
</USER_PREFERENCE>
<USER_PREFERENCE>
<NAME>auth_forcepasswordchange</NAME>
<VALUE>0</VALUE>
</USER_PREFERENCE>
<USER_PREFERENCE>
<NAME>forum_displaymode</NAME>
<VALUE>3</VALUE>
</USER_PREFERENCE>
<USER_PREFERENCE>
<NAME>grader_report_preferences_form_showadvanced</NAME>
<VALUE>1</VALUE>
</USER_PREFERENCE>
<USER_PREFERENCE>
<NAME>grade_report_simple_aggregationview51</NAME>
<VALUE>0</VALUE>
</USER_PREFERENCE>
<USER_PREFERENCE>
<NAME>grade_report_simple_grader_collapsed_categories</NAME>
<VALUE>a:2:{s:14:&quot;aggregatesonly&quot;;a:4:{i:0;s:2:&quot;70&quot;;i:1;s:2:&quot;71&quot;;i:2;s:2:&quot;72&quot;;i:3;s:2:&quot;73&quot;;}s:10:&quot;gradesonly&quot;;a:0:{}}</VALUE>
</USER_PREFERENCE>
<USER_PREFERENCE>
<NAME>grade_report_simple_meanselection</NAME>
<VALUE>2</VALUE>
</USER_PREFERENCE>
<USER_PREFERENCE>
<NAME>grade_report_simple_showranges</NAME>
<VALUE>1</VALUE>
</USER_PREFERENCE>
<USER_PREFERENCE>
<NAME>grade_report_simple_showstickytab</NAME>
<VALUE>0</VALUE>
</USER_PREFERENCE>
<USER_PREFERENCE>
<NAME>lesson_view</NAME>
<VALUE>collapsed</VALUE>
</USER_PREFERENCE>
<USER_PREFERENCE>
<NAME>mod_resource_mod_form_showadvanced</NAME>
<VALUE>1</VALUE>
</USER_PREFERENCE>
<USER_PREFERENCE>
<NAME>user_editadvanced_form_showadvanced</NAME>
<VALUE>1</VALUE>
</USER_PREFERENCE>
</USER_PREFERENCES>
<ROLES_OVERRIDES>
</ROLES_OVERRIDES>
<ROLES_ASSIGNMENTS>
</ROLES_ASSIGNMENTS>
</USER>
<USER>
<ID>6</ID>
<AUTH>cas</AUTH>
<CONFIRMED>1</CONFIRMED>
<POLICYAGREED>0</POLICYAGREED>
<DELETED>0</DELETED>
<USERNAME>pcali1</USERNAME>
<PASSWORD>fb005bdc5fb1b23ea95d238fb5ecb9e2</PASSWORD>
<IDNUMBER></IDNUMBER>
<FIRSTNAME>Philip</FIRSTNAME>
<LASTNAME>Cali</LASTNAME>
<EMAIL>pcali1@lsu.edu</EMAIL>
<EMAILSTOP>0</EMAILSTOP>
<ICQ></ICQ>
<SKYPE></SKYPE>
<YAHOO></YAHOO>
<AIM></AIM>
<MSN></MSN>
<PHONE1></PHONE1>
<PHONE2></PHONE2>
<INSTITUTION></INSTITUTION>
<DEPARTMENT></DEPARTMENT>
<ADDRESS></ADDRESS>
<CITY></CITY>
<COUNTRY></COUNTRY>
<LANG>en_utf8</LANG>
<THEME></THEME>
<TIMEZONE>99</TIMEZONE>
<FIRSTACCESS>0</FIRSTACCESS>
<LASTACCESS>1268662392</LASTACCESS>
<LASTLOGIN>0</LASTLOGIN>
<CURRENTLOGIN>1268662284</CURRENTLOGIN>
<LASTIP>68.105.37.237</LASTIP>
<SECRET></SECRET>
<PICTURE>1</PICTURE>
<URL></URL>
<DESCRIPTION>$@NULL@$</DESCRIPTION>
<MAILFORMAT>1</MAILFORMAT>
<MAILDIGEST>0</MAILDIGEST>
<MAILDISPLAY>2</MAILDISPLAY>
<HTMLEDITOR>1</HTMLEDITOR>
<AJAX>1</AJAX>
<AUTOSUBSCRIBE>1</AUTOSUBSCRIBE>
<TRACKFORUMS>0</TRACKFORUMS>
<TIMEMODIFIED>1268662284</TIMEMODIFIED>
<ROLES>
<ROLE>
<TYPE>needed</TYPE>
</ROLE>
</ROLES>
<ROLES_OVERRIDES>
</ROLES_OVERRIDES>
<ROLES_ASSIGNMENTS>
</ROLES_ASSIGNMENTS>
</USER>
</USERS>
<GRADEBOOK>
<GRADE_CATEGORIES>
<GRADE_CATEGORY>
<ID>90</ID>
<PARENT>$@NULL@$</PARENT>
<FULLNAME>?</FULLNAME>
<AGGREGATION>11</AGGREGATION>
<KEEPHIGH>0</KEEPHIGH>
<DROPLOW>0</DROPLOW>
<AGGREGATEONLYGRADED>1</AGGREGATEONLYGRADED>
<AGGREGATEOUTCOMES>0</AGGREGATEOUTCOMES>
<AGGREGATESUBCATS>0</AGGREGATESUBCATS>
<TIMECREATED>1299774068</TIMECREATED>
<TIMEMODIFIED>1299774068</TIMEMODIFIED>
</GRADE_CATEGORY>
</GRADE_CATEGORIES>
<GRADE_ITEMS>
<GRADE_ITEM>
<ID>410</ID>
<CATEGORYID>$@NULL@$</CATEGORYID>
<ITEMNAME>$@NULL@$</ITEMNAME>
<ITEMTYPE>course</ITEMTYPE>
<ITEMMODULE>$@NULL@$</ITEMMODULE>
<ITEMINSTANCE>90</ITEMINSTANCE>
<ITEMNUMBER>$@NULL@$</ITEMNUMBER>
<ITEMINFO>$@NULL@$</ITEMINFO>
<IDNUMBER>$@NULL@$</IDNUMBER>
<CALCULATION>$@NULL@$</CALCULATION>
<GRADETYPE>1</GRADETYPE>
<GRADEMAX>100.00000</GRADEMAX>
<GRADEMIN>0.00000</GRADEMIN>
<SCALEID>$@NULL@$</SCALEID>
<OUTCOMEID>$@NULL@$</OUTCOMEID>
<GRADEPASS>0.00000</GRADEPASS>
<MULTFACTOR>1.00000</MULTFACTOR>
<PLUSFACTOR>0.00000</PLUSFACTOR>
<AGGREGATIONCOEF>1.00000</AGGREGATIONCOEF>
<DISPLAY>0</DISPLAY>
<DECIMALS>$@NULL@$</DECIMALS>
<HIDDEN>0</HIDDEN>
<LOCKED>0</LOCKED>
<LOCKTIME>0</LOCKTIME>
<NEEDSUPDATE>0</NEEDSUPDATE>
<TIMECREATED>1299774068</TIMECREATED>
<TIMEMODIFIED>1299774068</TIMEMODIFIED>
</GRADE_ITEM>
</GRADE_ITEMS>
</GRADEBOOK>
<MODULES>
<MOD>
<ID>57</ID>
<MODTYPE>forum</MODTYPE>
<TYPE>news</TYPE>
<NAME>News forum</NAME>
<INTRO>General news and announcements</INTRO>
<ASSESSED>0</ASSESSED>
<ASSESSTIMESTART>0</ASSESSTIMESTART>
<ASSESSTIMEFINISH>0</ASSESSTIMEFINISH>
<MAXBYTES>0</MAXBYTES>
<SCALE>0</SCALE>
<FORCESUBSCRIBE>1</FORCESUBSCRIBE>
<TRACKINGTYPE>1</TRACKINGTYPE>
<RSSTYPE>0</RSSTYPE>
<RSSARTICLES>0</RSSARTICLES>
<TIMEMODIFIED>1299773780</TIMEMODIFIED>
<WARNAFTER>0</WARNAFTER>
<BLOCKAFTER>0</BLOCKAFTER>
<BLOCKPERIOD>0</BLOCKPERIOD>
</MOD>
</MODULES>
<FORMATDATA>
</FORMATDATA>
</COURSE>
</MOODLE_BACKUP>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,463 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Unit tests for the moodle1 converter
*
* @package core
* @subpackage backup-convert
* @copyright 2011 Mark Nielsen <mark@moodlerooms.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/backup/converter/moodle1/lib.php');
class moodle1_converter_test extends UnitTestCase {
public static $includecoverage = array();
/** @var string the name of the directory containing the unpacked Moodle 1.9 backup */
protected $tempdir;
public function setUp() {
global $CFG;
$this->tempdir = convert_helper::generate_id('simpletest');
check_dir_exists("$CFG->dataroot/temp/backup/$this->tempdir/course_files/sub1");
check_dir_exists("$CFG->dataroot/temp/backup/$this->tempdir/moddata/unittest/4/7");
copy(
"$CFG->dirroot/backup/converter/moodle1/simpletest/files/moodle.xml",
"$CFG->dataroot/temp/backup/$this->tempdir/moodle.xml"
);
copy(
"$CFG->dirroot/backup/converter/moodle1/simpletest/files/icon.gif",
"$CFG->dataroot/temp/backup/$this->tempdir/course_files/file1.gif"
);
copy(
"$CFG->dirroot/backup/converter/moodle1/simpletest/files/icon.gif",
"$CFG->dataroot/temp/backup/$this->tempdir/course_files/sub1/file2.gif"
);
copy(
"$CFG->dirroot/backup/converter/moodle1/simpletest/files/icon.gif",
"$CFG->dataroot/temp/backup/$this->tempdir/moddata/unittest/4/file1.gif"
);
copy(
"$CFG->dirroot/backup/converter/moodle1/simpletest/files/icon.gif",
"$CFG->dataroot/temp/backup/$this->tempdir/moddata/unittest/4/icon.gif"
);
copy(
"$CFG->dirroot/backup/converter/moodle1/simpletest/files/icon.gif",
"$CFG->dataroot/temp/backup/$this->tempdir/moddata/unittest/4/7/icon.gif"
);
}
public function tearDown() {
global $CFG;
if (empty($CFG->keeptempdirectoriesonbackup)) {
fulldelete("$CFG->dataroot/temp/backup/$this->tempdir");
}
}
public function test_detect_format() {
$detected = moodle1_converter::detect_format($this->tempdir);
$this->assertEqual(backup::FORMAT_MOODLE1, $detected);
}
public function test_convert_factory() {
$converter = convert_factory::get_converter('moodle1', $this->tempdir);
$this->assertIsA($converter, 'moodle1_converter');
}
public function test_stash_storage_not_created() {
$converter = convert_factory::get_converter('moodle1', $this->tempdir);
$this->expectException('moodle1_convert_storage_exception');
$converter->set_stash('tempinfo', 12);
}
public function test_stash_requiring_empty_stash() {
$converter = convert_factory::get_converter('moodle1', $this->tempdir);
$converter->create_stash_storage();
$converter->set_stash('tempinfo', 12);
$this->expectException('moodle1_convert_empty_storage_exception');
try {
$converter->get_stash('anothertempinfo');
} catch (moodle1_convert_empty_storage_exception $e) {
// we must drop the storage here so we are able to re-create it in the next test
$converter->drop_stash_storage();
throw new moodle1_convert_empty_storage_exception('rethrowing');
}
}
public function test_stash_storage() {
$converter = convert_factory::get_converter('moodle1', $this->tempdir);
$converter->create_stash_storage();
// no implicit stashes
$stashes = $converter->get_stash_names();
$this->assertIsA($stashes, 'array');
$this->assertTrue(empty($stashes));
// test stashes without itemid
$converter->set_stash('tempinfo1', 12);
$converter->set_stash('tempinfo2', array('a' => 2, 'b' => 3));
$stashes = $converter->get_stash_names();
$this->assertIsA($stashes, 'array');
$this->assertEqual(2, count($stashes));
$this->assertTrue(in_array('tempinfo1', $stashes));
$this->assertTrue(in_array('tempinfo2', $stashes));
$this->assertIdentical(12, $converter->get_stash('tempinfo1'));
$this->assertIdentical(array('a' => 2, 'b' => 3), $converter->get_stash('tempinfo2'));
// overwriting a stashed value is allowed
$converter->set_stash('tempinfo1', '13');
$this->assertNotIdentical(13, $converter->get_stash('tempinfo1'));
$this->assertIdentical('13', $converter->get_stash('tempinfo1'));
// repeated reading is allowed
$this->assertIdentical('13', $converter->get_stash('tempinfo1'));
// storing empty array
$converter->set_stash('empty_array_stash', array());
$restored = $converter->get_stash('empty_array_stash');
//$this->assertIsA($restored, 'array'); // todo return null now, this needs MDL-27713 to be fixed, then uncomment
$this->assertTrue(empty($restored));
// test stashes with itemid
$converter->set_stash('tempinfo', 'Hello', 1);
$converter->set_stash('tempinfo', 'World', 2);
$this->assertIdentical('Hello', $converter->get_stash('tempinfo', 1));
$this->assertIdentical('World', $converter->get_stash('tempinfo', 2));
// test get_stash_itemids()
$ids = $converter->get_stash_itemids('course_fileref');
$this->assertIsA($ids, 'array');
$this->assertTrue(empty($ids));
$converter->set_stash('course_fileref', null, 34);
$converter->set_stash('course_fileref', null, 52);
$ids = $converter->get_stash_itemids('course_fileref');
$this->assertEqual(2, count($ids));
$this->assertTrue(in_array(34, $ids));
$this->assertTrue(in_array(52, $ids));
$converter->drop_stash_storage();
}
public function test_get_stash_or_default() {
$converter = convert_factory::get_converter('moodle1', $this->tempdir);
$converter->create_stash_storage();
$this->assertTrue(is_null($converter->get_stash_or_default('stashname')));
$this->assertTrue(is_null($converter->get_stash_or_default('stashname', 7)));
$this->assertTrue('default' === $converter->get_stash_or_default('stashname', 0, 'default'));
$this->assertTrue(array('foo', 'bar') === $converter->get_stash_or_default('stashname', 42, array('foo', 'bar')));
//$converter->set_stash('stashname', 0);
//$this->assertFalse(is_null($converter->get_stash_or_default('stashname'))); // todo returns true now, this needs MDL-27713 to be fixed
//$converter->set_stash('stashname', '');
//$this->assertFalse(is_null($converter->get_stash_or_default('stashname'))); // todo returns true now, this needs MDL-27713 to be fixed
//$converter->set_stash('stashname', array());
//$this->assertFalse(is_null($converter->get_stash_or_default('stashname'))); // todo returns true now, this needs MDL-27713 to be fixed
$converter->set_stash('stashname', 42);
$this->assertTrue(42 === $converter->get_stash_or_default('stashname'));
$this->assertTrue(is_null($converter->get_stash_or_default('stashname', 1)));
$this->assertTrue(42 === $converter->get_stash_or_default('stashname', 0, 61));
$converter->set_stash('stashname', array(42 => (object)array('id' => 42)), 18);
$stashed = $converter->get_stash_or_default('stashname', 18, 1984);
$this->assertIsA($stashed, 'array');
$this->assertTrue(is_object($stashed[42]));
$this->assertTrue($stashed[42]->id === 42);
$converter->drop_stash_storage();
}
public function test_get_contextid() {
$converter = convert_factory::get_converter('moodle1', $this->tempdir);
// stash storage must be created in advance
$converter->create_stash_storage();
// ids are generated on the first call
$id1 = $converter->get_contextid(CONTEXT_BLOCK, 10);
$id2 = $converter->get_contextid(CONTEXT_BLOCK, 11);
$id3 = $converter->get_contextid(CONTEXT_MODULE, 10);
$this->assertNotEqual($id1, $id2);
$this->assertNotEqual($id1, $id3);
$this->assertNotEqual($id2, $id3);
// and then re-used if called with the same params
$this->assertEqual($id1, $converter->get_contextid(CONTEXT_BLOCK, 10));
$this->assertEqual($id2, $converter->get_contextid(CONTEXT_BLOCK, 11));
$this->assertEqual($id3, $converter->get_contextid(CONTEXT_MODULE, 10));
// for system and course level, the instance is irrelevant
// as we need only one system and one course
$id1 = $converter->get_contextid(CONTEXT_COURSE);
$id2 = $converter->get_contextid(CONTEXT_COURSE, 10);
$id3 = $converter->get_contextid(CONTEXT_COURSE, 14);
$this->assertEqual($id1, $id2);
$this->assertEqual($id1, $id3);
$id1 = $converter->get_contextid(CONTEXT_SYSTEM);
$id2 = $converter->get_contextid(CONTEXT_SYSTEM, 11);
$id3 = $converter->get_contextid(CONTEXT_SYSTEM, 15);
$this->assertEqual($id1, $id2);
$this->assertEqual($id1, $id3);
$converter->drop_stash_storage();
}
public function test_get_nextid() {
$converter = convert_factory::get_converter('moodle1', $this->tempdir);
$id1 = $converter->get_nextid();
$id2 = $converter->get_nextid();
$id3 = $converter->get_nextid();
$this->assertTrue(0 < $id1);
$this->assertTrue($id1 < $id2);
$this->assertTrue($id2 < $id3);
}
public function test_migrate_file() {
// set-up the file manager
$converter = convert_factory::get_converter('moodle1', $this->tempdir);
$converter->create_stash_storage();
$contextid = $converter->get_contextid(CONTEXT_MODULE, 32);
$fileman = $converter->get_file_manager($contextid, 'mod_unittest', 'testarea');
// this fileman has not converted anything yet
$fileids = $fileman->get_fileids();
$this->assertIsA($fileids, 'array');
$this->assertEqual(0, count($fileids));
// try to migrate a non-existing directory
$returned = $fileman->migrate_directory('not/existing/directory');
$this->assertIsA($returned, 'array');
$this->assertEqual(0, count($returned));
$fileids = $fileman->get_fileids();
$this->assertIsA($fileids, 'array');
$this->assertEqual(0, count($fileids));
// migrate a single file
$fileman->itemid = 4;
$fileman->migrate_file('moddata/unittest/4/icon.gif');
$this->assertTrue(is_file($converter->get_workdir_path().'/files/4e/4ea114b0558f53e3af8dd9afc0e0810a95c2a724'));
// get the file id
$fileids = $fileman->get_fileids();
$this->assertIsA($fileids, 'array');
$this->assertEqual(1, count($fileids));
// migrate another single file into another file area
$fileman->filearea = 'anotherarea';
$fileman->itemid = 7;
$fileman->migrate_file('moddata/unittest/4/7/icon.gif', '/', 'renamed.gif');
// get the file records
$filerecordids = $converter->get_stash_itemids('files');
foreach ($filerecordids as $filerecordid) {
$filerecord = $converter->get_stash('files', $filerecordid);
$this->assertEqual('4ea114b0558f53e3af8dd9afc0e0810a95c2a724', $filerecord['contenthash']);
$this->assertEqual($contextid, $filerecord['contextid']);
$this->assertEqual('mod_unittest', $filerecord['component']);
if ($filerecord['filearea'] === 'testarea') {
$this->assertEqual(4, $filerecord['itemid']);
$this->assertEqual('icon.gif', $filerecord['filename']);
}
}
// explicitly clear the list of migrated files
$this->assertTrue(count($fileman->get_fileids()) > 0);
$fileman->reset_fileids();
$this->assertTrue(count($fileman->get_fileids()) == 0);
$converter->drop_stash_storage();
}
public function test_convert_path() {
$path = new convert_path('foo_bar', '/ROOT/THINGS/FOO/BAR');
$this->assertEqual('foo_bar', $path->get_name());
$this->assertEqual('/ROOT/THINGS/FOO/BAR', $path->get_path());
$this->assertEqual('process_foo_bar', $path->get_processing_method());
$this->assertEqual('on_foo_bar_start', $path->get_start_method());
$this->assertEqual('on_foo_bar_end', $path->get_end_method());
}
public function test_convert_path_implicit_recipes() {
$path = new convert_path('foo_bar', '/ROOT/THINGS/FOO/BAR');
$data = array(
'ID' => 76,
'ELOY' => 'stronk7',
'MARTIN' => 'moodler',
'EMPTY' => null,
);
// apply default recipes (converting keys to lowercase)
$data = $path->apply_recipes($data);
$this->assertEqual(4, count($data));
$this->assertEqual(76, $data['id']);
$this->assertEqual('stronk7', $data['eloy']);
$this->assertEqual('moodler', $data['martin']);
$this->assertIdentical(null, $data['empty']);
}
public function test_convert_path_explicit_recipes() {
$path = new convert_path(
'foo_bar', '/ROOT/THINGS/FOO/BAR',
array(
'newfields' => array(
'david' => 'mudrd8mz',
'petr' => 'skodak',
),
'renamefields' => array(
'empty' => 'nothing',
),
'dropfields' => array(
'id'
),
)
);
$data = array(
'ID' => 76,
'ELOY' => 'stronk7',
'MARTIN' => 'moodler',
'EMPTY' => null,
);
$data = $path->apply_recipes($data);
$this->assertEqual(5, count($data));
$this->assertFalse(array_key_exists('id', $data));
$this->assertEqual('stronk7', $data['eloy']);
$this->assertEqual('moodler', $data['martin']);
$this->assertEqual('mudrd8mz', $data['david']);
$this->assertEqual('skodak', $data['petr']);
$this->assertIdentical(null, $data['nothing']);
}
public function test_grouped_data_on_nongrouped_convert_path() {
// prepare some grouped data
$data = array(
'ID' => 77,
'NAME' => 'Pale lagers',
'BEERS' => array(
array(
'BEER' => array(
'ID' => 67,
'NAME' => 'Pilsner Urquell',
)
),
array(
'BEER' => array(
'ID' => 34,
'NAME' => 'Heineken',
)
),
)
);
// declare a non-grouped path
$path = new convert_path('beer_style', '/ROOT/BEER_STYLES/BEER_STYLE');
// an attempt to apply recipes throws exception because we do not expect grouped data
$this->expectException('convert_path_exception');
$data = $path->apply_recipes($data);
}
public function test_grouped_convert_path_with_recipes() {
// prepare some grouped data
$data = array(
'ID' => 77,
'NAME' => 'Pale lagers',
'BEERS' => array(
array(
'BEER' => array(
'ID' => 67,
'NAME' => 'Pilsner Urquell',
)
),
array(
'BEER' => array(
'ID' => 34,
'NAME' => 'Heineken',
)
),
)
);
// implict recipes work for grouped data if the path is declared as grouped
$path = new convert_path('beer_style', '/ROOT/BEER_STYLES/BEER_STYLE', array(), true);
$data = $path->apply_recipes($data);
$this->assertEqual('Heineken', $data['beers'][1]['beer']['name']);
// an attempt to provide explicit recipes on grouped elements throws exception
$this->expectException('convert_path_exception');
$path = new convert_path(
'beer_style', '/ROOT/BEER_STYLES/BEER_STYLE',
array(
'renamefields' => array(
'name' => 'beername', // note this is confusing recipe because the 'name' is used for both
// beer-style name ('Pale lagers') and beer name ('Pilsner Urquell')
)
), true);
}
public function test_referenced_course_files() {
$text = 'This is a text containing links to file.php
as it is parsed from the backup file. <br /><br /><img border="0" width="110" vspace="0" hspace="0" height="92" title="News" alt="News" src="$@FILEPHP@$$@SLASH@$pics$@SLASH@$news.gif" /><a href="$@FILEPHP@$$@SLASH@$pics$@SLASH@$news.gif$@FORCEDOWNLOAD@$">download image</a><br />
<br /><a href=\'$@FILEPHP@$$@SLASH@$MANUAL.DOC$@FORCEDOWNLOAD@$\'>download manual</a><br />';
$files = moodle1_converter::find_referenced_files($text);
$this->assertIsA($files, 'array');
$this->assertEqual(2, count($files));
$this->assertTrue(in_array('/pics/news.gif', $files));
$this->assertTrue(in_array('/MANUAL.DOC', $files));
$text = moodle1_converter::rewrite_filephp_usage($text, array('/pics/news.gif', '/another/file/notused.txt'), $files);
$this->assertEqual($text, 'This is a text containing links to file.php
as it is parsed from the backup file. <br /><br /><img border="0" width="110" vspace="0" hspace="0" height="92" title="News" alt="News" src="@@PLUGINFILE@@/pics/news.gif" /><a href="@@PLUGINFILE@@/pics/news.gif?forcedownload=1">download image</a><br />
<br /><a href=\'$@FILEPHP@$$@SLASH@$MANUAL.DOC$@FORCEDOWNLOAD@$\'>download manual</a><br />');
}
public function test_question_bank_conversion() {
global $CFG;
copy(
"$CFG->dirroot/backup/converter/moodle1/simpletest/files/questions.xml",
"$CFG->dataroot/temp/backup/$this->tempdir/moodle.xml"
);
$converter = convert_factory::get_converter('moodle1', $this->tempdir);
$converter->convert();
}
public function test_convert_run_convert() {
$converter = convert_factory::get_converter('moodle1', $this->tempdir);
$converter->convert();
}
public function test_inforef_manager() {
$converter = convert_factory::get_converter('moodle1', $this->tempdir);
$inforef = $converter->get_inforef_manager('unittest');
$inforef->add_ref('file', 45);
$inforef->add_refs('file', array(46, 47));
// todo test the write_refs() via some dummy xml_writer
$this->expectException('coding_exception');
$inforef->add_ref('unknown_referenced_item_name', 76);
}
}
+13 -4
View File
@@ -72,11 +72,20 @@ class backup_course_task extends backup_task {
// annotating some bits, tags and module restrictions
$this->add_step(new backup_course_structure_step('course_info', 'course.xml'));
// Generate the enrolment file
$this->add_step(new backup_enrolments_structure_step('course_enrolments', 'enrolments.xml'));
// Generate the enrolment file (conditionally, prevent it in any IMPORT/HUB operation)
if ($this->plan->get_mode() != backup::MODE_IMPORT && $this->plan->get_mode() != backup::MODE_HUB) {
$this->add_step(new backup_enrolments_structure_step('course_enrolments', 'enrolments.xml'));
}
// Annotate the groups used in already annotated groupings
$this->add_step(new backup_annotate_groups_from_groupings('annotate_groups'));
// Annotate all the groups and groupings belonging to the course
$this->add_step(new backup_annotate_course_groups_and_groupings('annotate_course_groups'));
// Annotate the groups used in already annotated groupings (note this may be
// unnecessary now that we are annotating all the course groups and groupings in the
// step above. But we keep it working in case we decide, someday, to introduce one
// setting to transform the step above into an optional one. This is here to support
// course->defaultgroupingid
$this->add_step(new backup_annotate_groups_from_groupings('annotate_groups_from_groupings'));
// Annotate the question_categories belonging to the course context
$this->add_step(new backup_calculate_question_categories('course_question_categories'));
@@ -0,0 +1,34 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
defined('MOODLE_INTERNAL') || die();
/**
* Base class for course report backup plugins.
*
* NOTE: When you back up a course, it potentially may run backup for all
* course reports. In order to control whether a particular report gets
* backed up, a course report should make use of the second and third
* parameters in get_plugin_element().
*
* @package moodlecore
* @subpackage backup-moodle2
* @copyright 2011 onwards The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class backup_coursereport_plugin extends backup_plugin {
// Use default parent behaviour
}
@@ -36,6 +36,7 @@ require_once($CFG->dirroot . '/backup/moodle2/backup_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_qtype_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_format_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_theme_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_coursereport_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_plagiarism_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_subplugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_settingslib.php');
+13 -4
View File
@@ -53,7 +53,12 @@ abstract class backup_qtype_plugin extends backup_plugin {
$answers->add_child($answer);
// Set the sources
$answer->set_source_table('question_answers', array('question' => backup::VAR_PARENTID));
$answer->set_source_sql('
SELECT *
FROM {question_answers}
WHERE question = :question
ORDER BY id',
array('question' => backup::VAR_PARENTID));
// Aliases
$answer->set_source_alias('answer', 'answertext');
@@ -82,7 +87,12 @@ abstract class backup_qtype_plugin extends backup_plugin {
$units->add_child($unit);
// Set the sources
$unit->set_source_table('question_numerical_units', array('question' => backup::VAR_PARENTID));
$unit->set_source_sql('
SELECT *
FROM {question_numerical_units}
WHERE question = :question
ORDER BY id',
array('question' => backup::VAR_PARENTID));
// don't need to annotate ids nor files
}
@@ -101,8 +111,7 @@ abstract class backup_qtype_plugin extends backup_plugin {
// Define the elements
$options = new backup_nested_element('numerical_options');
$option = new backup_nested_element('numerical_option', array('id'), array(
'instructions', 'instructionsformat', 'showunits', 'unitsleft',
'unitgradingtype', 'unitpenalty'));
'showunits', 'unitsleft', 'unitgradingtype', 'unitpenalty'));
// Build the tree
$element->add_child($options);
+101 -58
View File
@@ -174,78 +174,76 @@ abstract class backup_questions_activity_structure_step extends backup_activity_
/**
* Attach to $element (usually attempts) the needed backup structures
* for question_states for a given question_attempt
* for question_usages and all the associated data.
*/
protected function add_question_attempts_states($element, $questionattemptname) {
protected function add_question_usages($element, $usageidname) {
global $CFG;
require_once($CFG->dirroot . '/question/engine/lib.php');
// Check $element is one nested_backup_element
if (! $element instanceof backup_nested_element) {
throw new backup_step_exception('question_states_bad_parent_element', $element);
}
// Check that the $questionattemptname is final element in $element
if (! $element->get_final_element($questionattemptname)) {
throw new backup_step_exception('question_states_bad_question_attempt_element', $questionattemptname);
if (! $element->get_final_element($usageidname)) {
throw new backup_step_exception('question_states_bad_question_attempt_element', $usageidname);
}
// TODO: Some day we should stop these "encrypted" state->answers and
// TODO: delegate to qtypes plugin to proper XML writting the needed info on each question
$quba = new backup_nested_element('question_usage', array('id'),
array('component', 'preferredbehaviour'));
// TODO: Should be doing here some introspection in the "answer" element, based on qtype,
// TODO: to know which real questions are being used (for randoms and other qtypes...)
// TODO: Not needed if consistency is guaranteed, but it isn't right now :-(
$qas = new backup_nested_element('question_attempts');
$qa = new backup_nested_element('question_attempt', array('id'), array(
'slot', 'behaviour', 'questionid', 'maxmark', 'minfraction',
'flagged', 'questionsummary', 'rightanswer', 'responsesummary',
'timemodified'));
// Define the elements
$states = new backup_nested_element('states');
$state = new backup_nested_element('state', array('id'), array(
'question', 'seq_number', 'answer', 'timestamp',
'event', 'grade', 'raw_grade', 'penalty'));
$steps = new backup_nested_element('steps');
$step = new backup_nested_element('step', array('id'), array(
'sequencenumber', 'state', 'fraction', 'timecreated', 'userid'));
$response = new backup_nested_element('response');
$variable = new backup_nested_element('variable', null, array('name', 'value'));
// Build the tree
$element->add_child($states);
$states->add_child($state);
$element->add_child($quba);
$quba->add_child($qas);
$qas->add_child($qa);
$qa->add_child($steps);
$steps->add_child($step);
$step->add_child($response);
$response->add_child($variable);
// Set the sources
$state->set_source_table('question_states', array('attempt' => '../../' . $questionattemptname));
$quba->set_source_table('question_usages',
array('id' => '../' . $usageidname));
$qa->set_source_sql('
SELECT *
FROM {question_attempts}
WHERE questionusageid = :questionusageid
ORDER BY slot',
array('questionusageid' => backup::VAR_PARENTID));
$step->set_source_sql('
SELECT *
FROM {question_attempt_steps}
WHERE questionattemptid = :questionattemptid
ORDER BY sequencenumber',
array('questionattemptid' => backup::VAR_PARENTID));
$variable->set_source_table('question_attempt_step_data',
array('attemptstepid' => backup::VAR_PARENTID));
// Annotate ids
$state->annotate_ids('question', 'question');
}
/**
* Attach to $element (usually attempts) the needed backup structures
* for question_sessions for a given question_attempt
*/
protected function add_question_attempts_sessions($element, $questionattemptname) {
// Check $element is one nested_backup_element
if (! $element instanceof backup_nested_element) {
throw new backup_step_exception('question_sessions_bad_parent_element', $element);
}
// Check that the $questionattemptname is final element in $element
if (! $element->get_final_element($questionattemptname)) {
throw new backup_step_exception('question_sessions_bad_question_attempt_element', $questionattemptname);
}
// Define the elements
$sessions = new backup_nested_element('sessions');
$session = new backup_nested_element('session', array('id'), array(
'questionid', 'newest', 'newgraded', 'sumpenalty',
'manualcomment', 'manualcommentformat', 'flagged'));
// Build the tree
$element->add_child($sessions);
$sessions->add_child($session);
// Set the sources
$session->set_source_table('question_sessions', array('attemptid' => '../../' . $questionattemptname));
// Annotate ids
$session->annotate_ids('question', 'questionid');
$qa->annotate_ids('question', 'questionid');
$step->annotate_ids('user', 'userid');
// Annotate files
// Note: question_sessions haven't files associated. On purpose manualcomment is lacking
// support for them, so we don't need to annotated them here.
$fileareas = question_engine::get_all_response_file_areas();
foreach ($fileareas as $filearea) {
$step->annotate_files('question', $filearea, 'id');
}
}
}
/**
* backup structure step in charge of calculating the categories to be
* included in backup, based in the context being backuped (module/course)
@@ -321,8 +319,9 @@ class backup_module_structure_step extends backup_structure_step {
// attach format plugin structure to $module element, only one allowed
$this->add_plugin_structure('format', $module, false);
// attach plagiarism plugin structure to $module element, only one allowed
$this->add_plugin_structure('plagiarism', $module, false);
// attach plagiarism plugin structure to $module element, there can be potentially
// many plagiarism plugins storing information about this course
$this->add_plugin_structure('plagiarism', $module, true);
// Define the tree
$module->add_child($availinfo);
@@ -419,8 +418,13 @@ class backup_course_structure_step extends backup_structure_step {
// save course data (in case of user theme, legacy theme, etc)
$this->add_plugin_structure('theme', $course, true);
// attach plagiarism plugin structure to $course element, only one allowed
$this->add_plugin_structure('plagiarism', $course, false);
// attach course report plugin structure to $course element; multiple
// course reports can save course data if required
$this->add_plugin_structure('coursereport', $course, true);
// attach plagiarism plugin structure to $course element, there can be potentially
// many plagiarism plugins storing information about this course
$this->add_plugin_structure('plagiarism', $course, true);
// Build the tree
@@ -1560,6 +1564,32 @@ class backup_activity_grade_items_to_ids extends backup_execution_step {
}
}
/**
* This step will annotate all the groups and groupings belonging to the course
*/
class backup_annotate_course_groups_and_groupings extends backup_execution_step {
protected function define_execution() {
global $DB;
// Get all the course groups
if ($groups = $DB->get_records('groups', array(
'courseid' => $this->task->get_courseid()))) {
foreach ($groups as $group) {
backup_structure_dbops::insert_backup_ids_record($this->get_backupid(), 'group', $group->id);
}
}
// Get all the course groupings
if ($groupings = $DB->get_records('groupings', array(
'courseid' => $this->task->get_courseid()))) {
foreach ($groupings as $grouping) {
backup_structure_dbops::insert_backup_ids_record($this->get_backupid(), 'grouping', $grouping->id);
}
}
}
}
/**
* This step will annotate all the groups belonging to already annotated groupings
*/
@@ -1666,19 +1696,25 @@ class backup_questions_structure_step extends backup_structure_step {
$question = new backup_nested_element('question', array('id'), array(
'parent', 'name', 'questiontext', 'questiontextformat',
'generalfeedback', 'generalfeedbackformat', 'defaultgrade', 'penalty',
'generalfeedback', 'generalfeedbackformat', 'defaultmark', 'penalty',
'qtype', 'length', 'stamp', 'version',
'hidden', 'timecreated', 'timemodified', 'createdby', 'modifiedby'));
// attach qtype plugin structure to $question element, only one allowed
$this->add_plugin_structure('qtype', $question, false);
$qhints = new backup_nested_element('question_hints');
$qhint = new backup_nested_element('question_hint', array('id'), array(
'hint', 'hintformat', 'shownumcorrect', 'clearwrong', 'options'));
// Build the tree
$qcategories->add_child($qcategory);
$qcategory->add_child($questions);
$questions->add_child($question);
$question->add_child($qhints);
$qhints->add_child($qhint);
// Define the sources
@@ -1692,6 +1728,13 @@ class backup_questions_structure_step extends backup_structure_step {
$question->set_source_table('question', array('category' => backup::VAR_PARENTID));
$qhint->set_source_sql('
SELECT *
FROM {question_hints}
WHERE questionid = :questionid
ORDER BY id',
array('questionid' => backup::VAR_PARENTID));
// don't need to annotate ids nor files
// (already done by {@link backup_annotate_all_question_files}
+10 -1
View File
@@ -34,6 +34,7 @@ abstract class restore_activity_task extends restore_task {
protected $modulename; // name of the module
protected $moduleid; // new (target) id of the course module
protected $oldmoduleid; // old (original) id of the course module
protected $oldmoduleversion; // old (original) version of the module
protected $contextid; // new (target) context of the activity
protected $oldcontextid;// old (original) context of the activity
protected $activityid; // new (target) id of the activity
@@ -43,11 +44,11 @@ abstract class restore_activity_task extends restore_task {
* Constructor - instantiates one object of this class
*/
public function __construct($name, $info, $plan = null) {
$this->info = $info;
$this->modulename = $this->info->modulename;
$this->moduleid = 0;
$this->oldmoduleid = $this->info->moduleid;
$this->oldmoduleversion = 0;
$this->contextid = 0;
$this->oldcontextid = 0;
$this->activityid = 0;
@@ -66,6 +67,10 @@ abstract class restore_activity_task extends restore_task {
$this->moduleid = $moduleid;
}
public function set_old_moduleversion($oldmoduleversion) {
$this->oldmoduleversion = $oldmoduleversion;
}
public function set_activityid($activityid) {
$this->activityid = $activityid;
}
@@ -90,6 +95,10 @@ abstract class restore_activity_task extends restore_task {
return $this->moduleid;
}
public function get_old_moduleversion() {
return $this->oldmoduleversion;
}
public function get_activityid() {
return $this->activityid;
}
+4 -2
View File
@@ -69,8 +69,10 @@ class restore_course_task extends restore_task {
// Restore course role assignments and overrides (internally will observe the role_assignments setting)
$this->add_step(new restore_ras_and_caps_structure_step('course_ras_and_caps', 'roles.xml'));
// Restore course enrolments (plugins and membership)
$this->add_step(new restore_enrolments_structure_step('course_enrolments', 'enrolments.xml'));
// Restore course enrolments (plugins and membership). Conditionally prevented for any IMPORT/HUB operation
if ($this->plan->get_mode() != backup::MODE_IMPORT && $this->plan->get_mode() != backup::MODE_HUB) {
$this->add_step(new restore_enrolments_structure_step('course_enrolments', 'enrolments.xml'));
}
// Restore course filters (conditionally)
if ($this->get_setting_value('filters')) {
@@ -0,0 +1,29 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
defined('MOODLE_INTERNAL') || die();
/**
* Restore for course plugin: course report.
*
* @package moodlecore
* @subpackage backup-moodle2
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class restore_coursereport_plugin extends restore_plugin {
// Use default parent behaviour
}
@@ -41,6 +41,6 @@ abstract class restore_plagiarism_plugin extends restore_plugin {
if (!array_key_exists($this->pluginname, $enabledplugins)) {
return;
}
parent::define_plugin_structure($connectionpoint);
return parent::define_plugin_structure($connectionpoint);
}
}
@@ -35,11 +35,13 @@ require_once($CFG->dirroot . '/backup/moodle2/restore_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_qtype_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_format_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_theme_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_coursereport_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_plagiarism_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_qtype_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_format_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_theme_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_coursereport_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_plagiarism_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_subplugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_settingslib.php');
+17
View File
@@ -80,6 +80,23 @@ abstract class restore_plugin {
}
}
/**
* after_restore dispatcher for any restore_plugin class
*
* This method will dispatch execution to the corresponding
* after_restore_xxx() method when available, with xxx
* being the connection point of the instance, so plugin
* classes with multiple connection points will support
* multiple after_restore methods, one for each connection point
*/
public function launch_after_restore_methods() {
// Check if the after_restore method exists and launch it
$afterrestore = 'after_restore_' . basename($this->connectionpoint->get_path());
if (method_exists($this, $afterrestore)) {
$this->$afterrestore();
}
}
/**
* Returns one array with all the decode contents
* to be processed by the links decoder
+31 -2
View File
@@ -115,6 +115,23 @@ abstract class restore_qtype_plugin extends restore_plugin {
$newquestionid = $this->get_new_parentid('question');
$questioncreated = $this->get_mappingid('question_created', $oldquestionid) ? true : false;
// In the past, there were some sloppily rounded fractions around. Fix them up.
$changes = array(
'-0.66666' => '-0.6666667',
'-0.33333' => '-0.3333333',
'-0.16666' => '-0.1666667',
'-0.142857' => '-0.1428571',
'0.11111' => '0.1111111',
'0.142857' => '0.1428571',
'0.16666' => '0.1666667',
'0.33333' => '0.3333333',
'0.333333' => '0.3333333',
'0.66666' => '0.6666667',
);
if (array_key_exists($data->fraction, $changes)) {
$data->fraction = $changes[$data->fraction];
}
// If the question has been created by restore, we need to create its question_answers too
if ($questioncreated) {
// Adjust some columns
@@ -298,9 +315,21 @@ abstract class restore_qtype_plugin extends restore_plugin {
}
/**
* Decode one question_states for this qtype (default impl)
* Do any re-coding necessary in the student response.
* @param int $questionid the new id of the question
* @param int $sequencenumber of the step within the qusetion attempt.
* @param array the response data from the backup.
* @return array the recoded response.
*/
public function recode_state_answer($state) {
public function recode_response($questionid, $sequencenumber, array $response) {
return $response;
}
/**
* Decode legacy question_states.answer for this qtype. Used when restoring
* 2.0 attempt data.
*/
public function recode_legacy_state_answer($state) {
// By default, return answer unmodified, qtypes needing recode will override this
return $state->answer;
}
+515 -79
View File
@@ -146,12 +146,18 @@ class restore_gradebook_structure_step extends restore_structure_step {
$data->courseid = $this->get_courseid();
//manual grade items store category id in categoryid
if ($data->itemtype=='manual') {
// manual grade items store category id in categoryid
$data->categoryid = $this->get_mappingid('grade_category', $data->categoryid, NULL);
} //course and category grade items store their category id in iteminstance
else if ($data->itemtype=='course' || $data->itemtype=='category') {
} else if ($data->itemtype=='course') {
// course grade item stores their category id in iteminstance
$coursecat = grade_category::fetch_course_category($this->get_courseid());
$data->iteminstance = $coursecat->id;
} else if ($data->itemtype=='category') {
// category grade items store their category id in iteminstance
$data->iteminstance = $this->get_mappingid('grade_category', $data->iteminstance, NULL);
} else {
throw new restore_step_exception('unexpected_grade_item_type', $data->itemtype);
}
$data->scaleid = $this->get_mappingid('scale', $data->scaleid, NULL);
@@ -236,6 +242,7 @@ class restore_gradebook_structure_step extends restore_structure_step {
//get the already created course level grade category
$category = new stdclass();
$category->courseid = $this->get_courseid();
$category->parent = null;
$coursecategory = $DB->get_record('grade_categories', (array)$category);
if (!empty($coursecategory)) {
@@ -273,7 +280,9 @@ class restore_gradebook_structure_step extends restore_structure_step {
//$this->set_mapping('grade_setting', $oldid, $newitemid);
}
//put all activity grade items in the correct grade category and mark all for recalculation
/**
* put all activity grade items in the correct grade category and mark all for recalculation
*/
protected function after_execute() {
global $DB;
@@ -284,23 +293,84 @@ class restore_gradebook_structure_step extends restore_structure_step {
);
$rs = $DB->get_recordset('backup_ids_temp', $conditions);
// We need this for calculation magic later on.
$mappings = array();
if (!empty($rs)) {
foreach($rs as $grade_item_backup) {
// Store the oldid with the new id.
$mappings[$grade_item_backup->itemid] = $grade_item_backup->newitemid;
$updateobj = new stdclass();
$updateobj->id = $grade_item_backup->newitemid;
//if this is an activity grade item that needs to be put back in its correct category
if (!empty($grade_item_backup->parentitemid)) {
$updateobj->categoryid = $this->get_mappingid('grade_category', $grade_item_backup->parentitemid);
$oldcategoryid = $this->get_mappingid('grade_category', $grade_item_backup->parentitemid, null);
if (!is_null($oldcategoryid)) {
$updateobj->categoryid = $oldcategoryid;
$DB->update_record('grade_items', $updateobj);
}
} else {
//mark course and category items as needing to be recalculated
$updateobj->needsupdate=1;
$DB->update_record('grade_items', $updateobj);
}
$DB->update_record('grade_items', $updateobj);
}
}
$rs->close();
// We need to update the calculations for calculated grade items that may reference old
// grade item ids using ##gi\d+##.
// $mappings can be empty, use 0 if so (won't match ever)
list($sql, $params) = $DB->get_in_or_equal(array_values($mappings), SQL_PARAMS_NAMED, 'param', true, 0);
$sql = "SELECT gi.id, gi.calculation
FROM {grade_items} gi
WHERE gi.id {$sql} AND
calculation IS NOT NULL";
$rs = $DB->get_recordset_sql($sql, $params);
foreach ($rs as $gradeitem) {
// Collect all of the used grade item id references
if (preg_match_all('/##gi(\d+)##/', $gradeitem->calculation, $matches) < 1) {
// This calculation doesn't reference any other grade items... EASY!
continue;
}
// For this next bit we are going to do the replacement of id's in two steps:
// 1. We will replace all old id references with a special mapping reference.
// 2. We will replace all mapping references with id's
// Why do we do this?
// Because there potentially there will be an overlap of ids within the query and we
// we substitute the wrong id.. safest way around this is the two step system
$calculationmap = array();
$mapcount = 0;
foreach ($matches[1] as $match) {
// Check that the old id is known to us, if not it was broken to begin with and will
// continue to be broken.
if (!array_key_exists($match, $mappings)) {
continue;
}
// Our special mapping key
$mapping = '##MAPPING'.$mapcount.'##';
// The old id that exists within the calculation now
$oldid = '##gi'.$match.'##';
// The new id that we want to replace the old one with.
$newid = '##gi'.$mappings[$match].'##';
// Replace in the special mapping key
$gradeitem->calculation = str_replace($oldid, $mapping, $gradeitem->calculation);
// And record the mapping
$calculationmap[$mapping] = $newid;
$mapcount++;
}
// Iterate all special mappings for this calculation and replace in the new id's
foreach ($calculationmap as $mapping => $newid) {
$gradeitem->calculation = str_replace($mapping, $newid, $gradeitem->calculation);
}
// Update the calculation now that its being remapped
$DB->update_record('grade_items', $gradeitem);
}
$rs->close();
//need to correct the grade category path and parent
$conditions = array(
'courseid' => $this->get_courseid()
@@ -1010,6 +1080,9 @@ class restore_course_structure_step extends restore_structure_step {
// Apply for 'theme' plugins optional paths at course level
$this->add_plugin_structure('theme', $course);
// Apply for 'course report' plugins optional paths at course level
$this->add_plugin_structure('coursereport', $course);
// Apply for plagiarism plugins optional paths at course level
$this->add_plugin_structure('plagiarism', $course);
@@ -1218,6 +1291,28 @@ class restore_ras_and_caps_structure_step extends restore_structure_step {
*/
class restore_enrolments_structure_step extends restore_structure_step {
/**
* Conditionally decide if this step should be executed.
*
* This function checks the following parameter:
*
* 1. the course/enrolments.xml file exists
*
* @return bool true is safe to execute, false otherwise
*/
protected function execute_condition() {
// Check it is included in the backup
$fullpath = $this->task->get_taskbasepath();
$fullpath = rtrim($fullpath, '/') . '/' . $this->filename;
if (!file_exists($fullpath)) {
// Not found, can't restore enrolments info
return false;
}
return true;
}
protected function define_structure() {
$paths = array();
@@ -1676,7 +1771,7 @@ class restore_course_logs_structure_step extends restore_structure_step {
/**
* Conditionally decide if this step should be executed.
*
* This function checks the following four parameters:
* This function checks the following parameter:
*
* 1. the course/logs.xml file exists
*
@@ -1797,28 +1892,47 @@ class restore_activity_grades_structure_step extends restore_structure_step {
}
protected function process_grade_item($data) {
global $DB;
$data = (object)($data);
$oldid = $data->id; // We'll need these later
$oldparentid = $data->categoryid;
$courseid = $this->get_courseid();
// make sure top course category exists, all grade items will be associated
// to it. Later, if restoring the whole gradebook, categories will be introduced
$coursecat = grade_category::fetch_course_category($this->get_courseid());
$coursecat = grade_category::fetch_course_category($courseid);
$coursecatid = $coursecat->id; // Get the categoryid to be used
$idnumber = null;
if (!empty($data->idnumber)) {
// Don't get any idnumber from course module. Keep them as they are in grade_item->idnumber
// Reason: it's not clear what happens with outcomes->idnumber or activities with multiple items (workshop)
// so the best is to keep the ones already in the gradebook
// Potential problem: duplicates if same items are restored more than once. :-(
// This needs to be fixed in some way (outcomes & activities with multiple items)
// $data->idnumber = get_coursemodule_from_instance($data->itemmodule, $data->iteminstance)->idnumber;
// In any case, verify always for uniqueness
$sql = "SELECT cm.id
FROM {course_modules} cm
WHERE cm.course = :courseid AND
cm.idnumber = :idnumber AND
cm.id <> :cmid";
$params = array(
'courseid' => $courseid,
'idnumber' => $data->idnumber,
'cmid' => $this->task->get_moduleid()
);
if (!$DB->record_exists_sql($sql, $params) && !$DB->record_exists('grade_items', array('courseid' => $courseid, 'idnumber' => $data->idnumber))) {
$idnumber = $data->idnumber;
}
}
unset($data->id);
$data->categoryid = $coursecatid;
$data->courseid = $this->get_courseid();
$data->iteminstance = $this->task->get_activityid();
// Don't get any idnumber from course module. Keep them as they are in grade_item->idnumber
// Reason: it's not clear what happens with outcomes->idnumber or activities with multiple items (workshop)
// so the best is to keep the ones already in the gradebook
// Potential problem: duplicates if same items are restored more than once. :-(
// This needs to be fixed in some way (outcomes & activities with multiple items)
// $data->idnumber = get_coursemodule_from_instance($data->itemmodule, $data->iteminstance)->idnumber;
// In any case, verify always for uniqueness
$data->idnumber = grade_verify_idnumber($data->idnumber, $this->get_courseid()) ? $data->idnumber : null;
$data->idnumber = $idnumber;
$data->scaleid = $this->get_mappingid('scale', $data->scaleid);
$data->outcomeid = $this->get_mappingid('outcome', $data->outcomeid);
$data->timecreated = $this->apply_date_offset($data->timecreated);
@@ -2022,6 +2136,8 @@ class restore_module_structure_step extends restore_structure_step {
$data = (object)$data;
$oldid = $data->id;
$this->task->set_old_moduleversion($data->version);
$data->course = $this->task->get_courseid();
$data->module = $DB->get_field('modules', 'id', array('name' => $data->modulename));
// Map section (first try by course_section mapping match. Useful in course and section restores)
@@ -2109,6 +2225,7 @@ class restore_module_structure_step extends restore_structure_step {
* - Activity includes completion info (file_exists)
*/
class restore_userscompletion_structure_step extends restore_structure_step {
private $done = array();
/**
* To conditionally decide if this step must be executed
@@ -2153,7 +2270,33 @@ class restore_userscompletion_structure_step extends restore_structure_step {
$data->userid = $this->get_mappingid('user', $data->userid);
$data->timemodified = $this->apply_date_offset($data->timemodified);
$DB->insert_record('course_modules_completion', $data);
// Check we didn't already insert one for this cmid and userid
// (there aren't supposed to be duplicates in that field, but
// it was possible until MDL-28021 was fixed).
$key = $data->coursemoduleid . ',' . $data->userid;
if (array_key_exists($key, $this->done)) {
// Find the existing record
$existing = $DB->get_record('course_modules_completion', array(
'coursemoduleid' => $data->coursemoduleid,
'userid' => $data->userid), 'id, timemodified');
// Update it to these new values, but only if the time is newer
if ($existing->timemodified < $data->timemodified) {
$data->id = $existing->id;
$DB->update_record('course_modules_completion', $data);
}
} else {
// Normal entry where it doesn't exist already
$DB->insert_record('course_modules_completion', $data);
// Remember this entry
$this->done[$key] = true;
}
}
protected function after_execute() {
// This gets called once per activity (according to my testing).
// Clearing the array isn't strictly required, but avoids using
// unnecessary memory.
$this->done = array();
}
}
@@ -2194,6 +2337,7 @@ abstract class restore_activity_structure_step extends restore_structure_step {
/**
* As far as activity restore steps are implementing restore_subplugin stuff, they need to
* have the parent task available for wrapping purposes (get course/context....)
* @return restore_task
*/
public function get_task() {
return $this->task;
@@ -2249,11 +2393,13 @@ class restore_create_categories_and_questions extends restore_structure_step {
$category = new restore_path_element('question_category', '/question_categories/question_category');
$question = new restore_path_element('question', '/question_categories/question_category/questions/question');
$hint = new restore_path_element('question_hint',
'/question_categories/question_category/questions/question/question_hints/question_hint');
// Apply for 'qtype' plugins optional paths at question level
$this->add_plugin_structure('qtype', $question);
return array($category, $question);
return array($category, $question, $hint);
}
protected function process_question_category($data) {
@@ -2306,6 +2452,17 @@ class restore_create_categories_and_questions extends restore_structure_step {
// we have loaded qcatids there for all parsed questions
$data->category = $this->get_mappingid('question_category', $questionmapping->parentitemid);
// In the past, there were some very sloppy values of penalty. Fix them.
if ($data->penalty >= 0.33 && $data->penalty <= 0.34) {
$data->penalty = 0.3333333;
}
if ($data->penalty >= 0.66 && $data->penalty <= 0.67) {
$data->penalty = 0.6666667;
}
if ($data->penalty >= 1) {
$data->penalty = 1;
}
$data->timecreated = $this->apply_date_offset($data->timecreated);
$data->timemodified = $this->apply_date_offset($data->timemodified);
@@ -2335,6 +2492,47 @@ class restore_create_categories_and_questions extends restore_structure_step {
// step will be in charge of restoring all the question files
}
protected function process_question_hint($data) {
global $DB;
$data = (object)$data;
$oldid = $data->id;
// Detect if the question is created or mapped
$oldquestionid = $this->get_old_parentid('question');
$newquestionid = $this->get_new_parentid('question');
$questioncreated = $this->get_mappingid('question_created', $oldquestionid) ? true : false;
// If the question has been created by restore, we need to create its question_answers too
if ($questioncreated) {
// Adjust some columns
$data->questionid = $newquestionid;
// Insert record
$newitemid = $DB->insert_record('question_hints', $data);
// The question existed, we need to map the existing question_hints
} else {
// Look in question_hints by hint text matching
$sql = 'SELECT id
FROM {question_hints}
WHERE questionid = ?
AND ' . $DB->sql_compare_text('hint', 255) . ' = ' . $DB->sql_compare_text('?', 255);
$params = array($newquestionid, $data->hint);
$newitemid = $DB->get_field_sql($sql, $params);
// If we haven't found the newitemid, something has gone really wrong, question in DB
// is missing hints, exception
if (!$newitemid) {
$info = new stdClass();
$info->filequestionid = $oldquestionid;
$info->dbquestionid = $newquestionid;
$info->hint = $data->hint;
throw new restore_step_exception('error_question_hint_missing_in_db', $info);
}
}
// Create mapping (I'm not sure if this is really needed?)
$this->set_mapping('question_hint', $oldid, $newitemid);
}
protected function after_execute() {
global $DB;
@@ -2455,8 +2653,18 @@ class restore_create_question_files extends restore_execution_step {
$oldctxid, $this->task->get_userid(), 'question_created', $question->itemid, $newctxid, true);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'generalfeedback',
$oldctxid, $this->task->get_userid(), 'question_created', $question->itemid, $newctxid, true);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'answer',
$oldctxid, $this->task->get_userid(), 'question_answer', null, $newctxid, true);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'answerfeedback',
$oldctxid, $this->task->get_userid(), 'question_answer', null, $newctxid, true);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'hint',
$oldctxid, $this->task->get_userid(), 'question_hint', null, $newctxid, true);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'correctfeedback',
$oldctxid, $this->task->get_userid(), 'question_created', $question->itemid, $newctxid, true);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'partiallycorrectfeedback',
$oldctxid, $this->task->get_userid(), 'question_created', $question->itemid, $newctxid, true);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'incorrectfeedback',
$oldctxid, $this->task->get_userid(), 'question_created', $question->itemid, $newctxid, true);
// Add qtype dependent files
$components = backup_qtype_plugin::get_components_and_fileareas($question->qtype);
foreach ($components as $component => $fileareas) {
@@ -2477,12 +2685,16 @@ class restore_create_question_files extends restore_execution_step {
* (like the quiz module), to support qtype plugins, states and sessions
*/
abstract class restore_questions_activity_structure_step extends restore_activity_structure_step {
/** @var array question_attempt->id to qtype. */
protected $qtypes = array();
/** @var array question_attempt->id to questionid. */
protected $newquestionids = array();
/**
* Attach below $element (usually attempts) the needed restore_path_elements
* to restore question_states
* to restore question_usages and all they contain.
*/
protected function add_question_attempts_states($element, &$paths) {
protected function add_question_usages($element, &$paths) {
// Check $element is restore_path_element
if (! $element instanceof restore_path_element) {
throw new restore_step_exception('element_must_be_restore_path_element', $element);
@@ -2491,70 +2703,124 @@ abstract class restore_questions_activity_structure_step extends restore_activit
if (!is_array($paths)) {
throw new restore_step_exception('paths_must_be_array', $paths);
}
$paths[] = new restore_path_element('question_state', $element->get_path() . '/states/state');
$paths[] = new restore_path_element('question_usage',
$element->get_path() . '/question_usage');
$paths[] = new restore_path_element('question_attempt',
$element->get_path() . '/question_usage/question_attempts/question_attempt');
$paths[] = new restore_path_element('question_attempt_step',
$element->get_path() . '/question_usage/question_attempts/question_attempt/steps/step',
true);
$paths[] = new restore_path_element('question_attempt_step_data',
$element->get_path() . '/question_usage/question_attempts/question_attempt/steps/step/response/variable');
}
/**
* Attach below $element (usually attempts) the needed restore_path_elements
* to restore question_sessions
* Process question_usages
*/
protected function add_question_attempts_sessions($element, &$paths) {
// Check $element is restore_path_element
if (! $element instanceof restore_path_element) {
throw new restore_step_exception('element_must_be_restore_path_element', $element);
}
// Check $paths is one array
if (!is_array($paths)) {
throw new restore_step_exception('paths_must_be_array', $paths);
}
$paths[] = new restore_path_element('question_session', $element->get_path() . '/sessions/session');
}
/**
* Process question_states
*/
protected function process_question_state($data) {
protected function process_question_usage($data) {
global $DB;
// Clear our caches.
$this->qtypes = array();
$this->newquestionids = array();
$data = (object)$data;
$oldid = $data->id;
// Get complete question mapping, we'll need info
$question = $this->get_mapping('question', $data->question);
// In the quiz_attempt mapping we are storing uniqueid
// and not id, so this gets the correct question_attempt to point to
$data->attempt = $this->get_new_parentid('quiz_attempt');
$data->question = $question->newitemid;
$data->answer = $this->restore_recode_answer($data, $question->info->qtype); // Delegate recoding of answer
$data->timestamp= $this->apply_date_offset($data->timestamp);
// Everything ready, insert and create mapping (needed by question_sessions)
$newitemid = $DB->insert_record('question_states', $data);
$this->set_mapping('question_state', $oldid, $newitemid);
}
/**
* Process question_sessions
*/
protected function process_question_session($data) {
global $DB;
$data = (object)$data;
$oldid = $data->id;
// In the quiz_attempt mapping we are storing uniqueid
// and not id, so this gets the correct question_attempt to point to
$data->attemptid = $this->get_new_parentid('quiz_attempt');
$data->questionid = $this->get_mappingid('question', $data->questionid);
$data->newest = $this->get_mappingid('question_state', $data->newest);
$data->newgraded = $this->get_mappingid('question_state', $data->newgraded);
$oldcontextid = $this->get_task()->get_old_contextid();
$data->contextid = $this->get_mappingid('context', $this->task->get_old_contextid());
// Everything ready, insert (no mapping needed)
$newitemid = $DB->insert_record('question_sessions', $data);
$newitemid = $DB->insert_record('question_usages', $data);
// Note: question_sessions haven't files associated. On purpose manualcomment is lacking
// support for them, so we don't need to handle them here.
$this->inform_new_usage_id($newitemid);
$this->set_mapping('question_usage', $oldid, $newitemid, false);
}
/**
* When process_question_usage creates the new usage, it calls this method
* to let the activity link to the new usage. For example, the quiz uses
* this method to set quiz_attempts.uniqueid to the new usage id.
* @param integer $newusageid
*/
abstract protected function inform_new_usage_id($newusageid);
/**
* Process question_attempts
*/
protected function process_question_attempt($data) {
global $DB;
$data = (object)$data;
$oldid = $data->id;
$question = $this->get_mapping('question', $data->questionid);
$data->questionusageid = $this->get_new_parentid('question_usage');
$data->questionid = $question->newitemid;
$data->timemodified = $this->apply_date_offset($data->timemodified);
$newitemid = $DB->insert_record('question_attempts', $data);
$this->set_mapping('question_attempt', $oldid, $newitemid);
$this->qtypes[$newitemid] = $question->info->qtype;
$this->newquestionids[$newitemid] = $data->questionid;
}
/**
* Process question_attempt_steps
*/
protected function process_question_attempt_step($data) {
global $DB;
$data = (object)$data;
$oldid = $data->id;
// Pull out the response data.
$response = array();
if (!empty($data->response['variable'])) {
foreach ($data->response['variable'] as $variable) {
$response[$variable['name']] = $variable['value'];
}
}
unset($data->response);
$data->questionattemptid = $this->get_new_parentid('question_attempt');
$data->timecreated = $this->apply_date_offset($data->timecreated);
$data->userid = $this->get_mappingid('user', $data->userid);
// Everything ready, insert and create mapping (needed by question_sessions)
$newitemid = $DB->insert_record('question_attempt_steps', $data);
$this->set_mapping('question_attempt_step', $oldid, $newitemid, true);
// Now process the response data.
$response = $this->questions_recode_response_data(
$this->qtypes[$data->questionattemptid],
$this->newquestionids[$data->questionattemptid],
$data->sequencenumber, $response);
foreach ($response as $name => $value) {
$row = new stdClass();
$row->attemptstepid = $newitemid;
$row->name = $name;
$row->value = $value;
$DB->insert_record('question_attempt_step_data', $row, false);
}
}
/**
* Recode the respones data for a particular step of an attempt at at particular question.
* @param string $qtype the question type.
* @param int $newquestionid the question id.
* @param int $sequencenumber the sequence number.
* @param array $response the response data to recode.
*/
public function questions_recode_response_data(
$qtype, $newquestionid, $sequencenumber, array $response) {
$qtyperestorer = $this->get_qtype_restorer($qtype);
if ($qtyperestorer) {
$response = $qtyperestorer->recode_response($newquestionid, $sequencenumber, $response);
}
return $response;
}
/**
@@ -2577,25 +2843,195 @@ abstract class restore_questions_activity_structure_step extends restore_activit
}
/**
* Given one question_states record, return the answer
* recoded pointing to all the restored stuff
* Get the restore_qtype_plugin subclass for a specific question type.
* @param string $qtype e.g. multichoice.
* @return restore_qtype_plugin instance.
*/
public function restore_recode_answer($state, $qtype) {
protected function get_qtype_restorer($qtype) {
// Build one static cache to store {@link restore_qtype_plugin}
// while we are needing them, just to save zillions of instantiations
// or using static stuff that will break our nice API
static $qtypeplugins = array();
// If we haven't the corresponding restore_qtype_plugin for current qtype
// instantiate it and add to cache
if (!isset($qtypeplugins[$qtype])) {
$classname = 'restore_qtype_' . $qtype . '_plugin';
if (class_exists($classname)) {
$qtypeplugins[$qtype] = new $classname('qtype', $qtype, $this);
} else {
$qtypeplugins[$qtype] = false;
$qtypeplugins[$qtype] = null;
}
}
return !empty($qtypeplugins[$qtype]) ? $qtypeplugins[$qtype]->recode_state_answer($state) : $state->answer;
return $qtypeplugins[$qtype];
}
protected function after_execute() {
parent::after_execute();
// Restore any files belonging to responses.
foreach (question_engine::get_all_response_file_areas() as $filearea) {
$this->add_related_files('question', $filearea, 'question_attempt_step');
}
}
/**
* Attach below $element (usually attempts) the needed restore_path_elements
* to restore question attempt data from Moodle 2.0.
*
* When using this method, the parent element ($element) must be defined with
* $grouped = true. Then, in that elements process method, you must call
* {@link process_legacy_attempt_data()} with the groupded data. See, for
* example, the usage of this method in {@link restore_quiz_activity_structure_step}.
* @param restore_path_element $element the parent element. (E.g. a quiz attempt.)
* @param array $paths the paths array that is being built to describe the
* structure.
*/
protected function add_legacy_question_attempt_data($element, &$paths) {
global $CFG;
require_once($CFG->dirroot . '/question/engine/upgrade/upgradelib.php');
// Check $element is restore_path_element
if (!($element instanceof restore_path_element)) {
throw new restore_step_exception('element_must_be_restore_path_element', $element);
}
// Check $paths is one array
if (!is_array($paths)) {
throw new restore_step_exception('paths_must_be_array', $paths);
}
$paths[] = new restore_path_element('question_state',
$element->get_path() . '/states/state');
$paths[] = new restore_path_element('question_session',
$element->get_path() . '/sessions/session');
}
protected function get_attempt_upgrader() {
if (empty($this->attemptupgrader)) {
$this->attemptupgrader = new question_engine_attempt_upgrader();
$this->attemptupgrader->prepare_to_restore();
}
return $this->attemptupgrader;
}
/**
* Process the attempt data defined by {@link add_legacy_question_attempt_data()}.
* @param object $data contains all the grouped attempt data ot process.
* @param pbject $quiz data about the activity the attempts belong to. Required
* fields are (basically this only works for the quiz module):
* oldquestions => list of question ids in this activity - using old ids.
* preferredbehaviour => the behaviour to use for questionattempts.
*/
protected function process_legacy_quiz_attempt_data($data, $quiz) {
global $DB;
$upgrader = $this->get_attempt_upgrader();
$data = (object)$data;
$layout = explode(',', $data->layout);
$newlayout = $layout;
// Convert each old question_session into a question_attempt.
$qas = array();
foreach (explode(',', $quiz->oldquestions) as $questionid) {
if ($questionid == 0) {
continue;
}
$newquestionid = $this->get_mappingid('question', $questionid);
if (!$newquestionid) {
throw new restore_step_exception('questionattemptreferstomissingquestion',
$questionid, $questionid);
}
$question = $upgrader->load_question($newquestionid, $quiz->id);
foreach ($layout as $key => $qid) {
if ($qid == $questionid) {
$newlayout[$key] = $newquestionid;
}
}
list($qsession, $qstates) = $this->find_question_session_and_states(
$data, $questionid);
if (empty($qsession) || empty($qstates)) {
throw new restore_step_exception('questionattemptdatamissing',
$questionid, $questionid);
}
list($qsession, $qstates) = $this->recode_legacy_response_data(
$question, $qsession, $qstates);
$data->layout = implode(',', $newlayout);
$qas[$newquestionid] = $upgrader->convert_question_attempt(
$quiz, $data, $question, $qsession, $qstates);
}
// Now create a new question_usage.
$usage = new stdClass();
$usage->component = 'mod_quiz';
$usage->contextid = $this->get_mappingid('context', $this->task->get_old_contextid());
$usage->preferredbehaviour = $quiz->preferredbehaviour;
$usage->id = $DB->insert_record('question_usages', $usage);
$this->inform_new_usage_id($usage->id);
$data->uniqueid = $usage->id;
$upgrader->save_usage($quiz->preferredbehaviour, $data, $qas, $quiz->questions);
}
protected function find_question_session_and_states($data, $questionid) {
$qsession = null;
foreach ($data->sessions['session'] as $session) {
if ($session['questionid'] == $questionid) {
$qsession = (object) $session;
break;
}
}
$qstates = array();
foreach ($data->states['state'] as $state) {
if ($state['question'] == $questionid) {
// It would be natural to use $state['seq_number'] as the array-key
// here, but it seems that buggy behaviour in 2.0 and early can
// mean that that is not unique, so we use id, which is guaranteed
// to be unique.
$qstates[$state['id']] = (object) $state;
}
}
ksort($qstates);
$qstates = array_values($qstates);
return array($qsession, $qstates);
}
/**
* Recode any ids in the response data
* @param object $question the question data
* @param object $qsession the question sessions.
* @param array $qstates the question states.
*/
protected function recode_legacy_response_data($question, $qsession, $qstates) {
$qsession->questionid = $question->id;
foreach ($qstates as &$state) {
$state->question = $question->id;
$state->answer = $this->restore_recode_legacy_answer($state, $question->qtype);
}
return array($qsession, $qstates);
}
/**
* Recode the legacy answer field.
* @param object $state the state to recode the answer of.
* @param string $qtype the question type.
*/
public function restore_recode_legacy_answer($state, $qtype) {
$restorer = $this->get_qtype_restorer($qtype);
if ($restorer) {
return $restorer->recode_legacy_state_answer($state);
} else {
return $state->answer;
}
}
}
+7 -1
View File
@@ -5,7 +5,7 @@ require_once('../config.php');
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
$contextid = required_param('contextid', PARAM_INT);
$stage = optional_param('stage', restore_ui::STAGE_CONFIRM, PARAM_INT);
$stage = optional_param('stage', restore_ui::STAGE_CONFIRM, PARAM_INT);
list($context, $course, $cm) = get_context_info_array($contextid);
@@ -30,9 +30,15 @@ if ($stage & restore_ui::STAGE_CONFIRM + restore_ui::STAGE_DESTINATION) {
}
}
if ($rc) {
// check if the format conversion must happen first
if ($rc->get_status() == backup::STATUS_REQUIRE_CONV) {
$rc->convert();
}
$restore = new restore_ui($rc, array('contextid'=>$context->id));
}
}
$outcome = $restore->process();
if (!$restore->is_independent()) {
if ($restore->get_stage() == restore_ui::STAGE_PROCESS && !$restore->requires_substage()) {
+34 -32
View File
@@ -102,45 +102,31 @@ abstract class backup_check {
// Note: all the checks along the function MUST be performed for $userid, that
// is the user who "requested" the course backup, not current $USER at all!!
// First of all, check the main backup[course|section|activity] principal caps
// Lacking the corresponding one makes this to break with exception always
// First of all, decide which caps/contexts are we going to check
// for common backups (general, automated...) based exclusively
// in the type (course, section, activity). And store them into
// one capability => context array structure
$typecapstocheck = array();
switch ($type) {
case backup::TYPE_1COURSE :
$DB->get_record('course', array('id' => $id), '*', MUST_EXIST); // course exists
if (!has_capability('moodle/backup:backupcourse', $coursectx, $userid)) {
$a = new stdclass();
$a->userid = $userid;
$a->courseid = $courseid;
$a->capability = 'moodle/backup:backupcourse';
throw new backup_controller_exception('backup_user_missing_capability', $a);
}
$typecapstocheck['moodle/backup:backupcourse'] = $coursectx;
break;
case backup::TYPE_1SECTION :
$DB->get_record('course_sections', array('course' => $courseid, 'id' => $id), '*', MUST_EXIST); // sec exists
if (!has_capability('moodle/backup:backupsection', $coursectx, $userid)) {
$a = new stdclass();
$a->userid = $userid;
$a->courseid = $courseid;
$a->capability = 'moodle/backup:backupsection';
throw new backup_controller_exception('backup_user_missing_capability', $a);
}
$typecapstocheck['moodle/backup:backupsection'] = $coursectx;
break;
case backup::TYPE_1ACTIVITY :
get_coursemodule_from_id(null, $id, $courseid, false, MUST_EXIST); // cm exists
$modulectx = get_context_instance(CONTEXT_MODULE, $id);
if (!has_capability('moodle/backup:backupactivity', $modulectx, $userid)) {
$a = new stdclass();
$a->userid = $userid;
$a->cmid = $id;
$a->capability = 'moodle/backup:backupactivity';
throw new backup_controller_exception('backup_user_missing_capability', $a);
}
$typecapstocheck['moodle/backup:backupactivity'] = $modulectx;
break;
default :
print_error('unknownbackuptype');
throw new backup_controller_exception('backup_unknown_backup_type', $type);
}
// Now, if backup mode is hub or import, check userid has permissions for those modes
// other modes will perform common checks only (backupxxxx capabilities in $typecapstocheck)
switch ($mode) {
case backup::MODE_HUB:
if (!has_capability('moodle/backup:backuptargethub', $coursectx, $userid)) {
@@ -160,6 +146,18 @@ abstract class backup_check {
throw new backup_controller_exception('backup_user_missing_capability', $a);
}
break;
// Common backup (general, automated...), let's check all the $typecapstocheck
// capability => context pairs
default:
foreach ($typecapstocheck as $capability => $context) {
if (!has_capability($capability, $context, $userid)) {
$a = new stdclass();
$a->userid = $userid;
$a->courseid = $courseid;
$a->capability = $capability;
throw new backup_controller_exception('backup_user_missing_capability', $a);
}
}
}
// Now, enforce 'moodle/backup:userinfo' to 'users' setting, applying changes if allowed,
@@ -219,15 +217,19 @@ abstract class backup_check {
}
// Check the user has the ability to configure the backup. If not then we need
// to lock all settings by permission so that no changes can be made.
$hasconfigcap = has_capability('moodle/backup:configure', $coursectx, $userid);
if (!$hasconfigcap) {
$settings = $backup_controller->get_plan()->get_settings();
foreach ($settings as $setting) {
if ($setting->get_name()=='filename') {
continue;
// to lock all settings by permission so that no changes can be made. This does
// not apply to the import facility, where the activities must be always enabled
// to be able to pick them
if ($mode != backup::MODE_IMPORT) {
$hasconfigcap = has_capability('moodle/backup:configure', $coursectx, $userid);
if (!$hasconfigcap) {
$settings = $backup_controller->get_plan()->get_settings();
foreach ($settings as $setting) {
if ($setting->get_name() == 'filename') {
continue;
}
$setting->set_status(base_setting::LOCKED_BY_PERMISSION);
}
$setting->set_status(base_setting::LOCKED_BY_PERMISSION);
}
}
+32 -30
View File
@@ -68,41 +68,27 @@ abstract class restore_check {
// Note: all the checks along the function MUST be performed for $userid, that
// is the user who "requested" the course restore, not current $USER at all!!
// First of all, check the main restore[course|section|activity] principal caps
// Lacking the corresponding one makes this to break with exception always
// First of all, decide which caps/contexts are we going to check
// for common backups (general, automated...) based exclusively
// in the type (course, section, activity). And store them into
// one capability => context array structure
$typecapstocheck = array();
switch ($type) {
case backup::TYPE_1COURSE :
if (!has_capability('moodle/restore:restorecourse', $coursectx, $userid)) {
$a = new stdclass();
$a->userid = $userid;
$a->courseid = $courseid;
$a->capability = 'moodle/restore:restorecourse';
throw new restore_controller_exception('restore_user_missing_capability', $a);
}
$typecapstocheck['moodle/restore:restorecourse'] = $coursectx;
break;
case backup::TYPE_1SECTION :
if (!has_capability('moodle/restore:restoresection', $coursectx, $userid)) {
$a = new stdclass();
$a->userid = $userid;
$a->courseid = $courseid;
$a->capability = 'moodle/restore:restoresection';
throw new restore_controller_exception('restore_user_missing_capability', $a);
}
$typecapstocheck['moodle/restore:restoresection'] = $coursectx;
break;
case backup::TYPE_1ACTIVITY :
if (!has_capability('moodle/restore:restoreactivity', $coursectx, $userid)) {
$a = new stdclass();
$a->userid = $userid;
$a->courseid = $courseid;
$a->capability = 'moodle/restore:restoreactivity';
throw new restore_controller_exception('restore_user_missing_capability', $a);
}
$typecapstocheck['moodle/restore:restoreactivity'] = $coursectx;
break;
default :
print_error('unknownrestoretype');
throw new restore_controller_exception('restore_unknown_restore_type', $type);
}
// Now, if restore mode is hub or import, check userid has permissions for those modes
// other modes will perform common checks only (restorexxxx capabilities in $typecapstocheck)
switch ($mode) {
case backup::MODE_HUB:
if (!has_capability('moodle/restore:restoretargethub', $coursectx, $userid)) {
@@ -122,6 +108,18 @@ abstract class restore_check {
throw new restore_controller_exception('restore_user_missing_capability', $a);
}
break;
// Common backup (general, automated...), let's check all the $typecapstocheck
// capability => context pairs
default:
foreach ($typecapstocheck as $capability => $context) {
if (!has_capability($capability, $context, $userid)) {
$a = new stdclass();
$a->userid = $userid;
$a->courseid = $courseid;
$a->capability = $capability;
throw new restore_controller_exception('restore_user_missing_capability', $a);
}
}
}
// Now, enforce 'moodle/restore:userinfo' to 'users' setting, applying changes if allowed,
@@ -158,12 +156,16 @@ abstract class restore_check {
}
// Check the user has the ability to configure the restore. If not then we need
// to lock all settings by permission so that no changes can be made.
$hasconfigcap = has_capability('moodle/restore:configure', $coursectx, $userid);
if (!$hasconfigcap) {
$settings = $restore_controller->get_plan()->get_settings();
foreach ($settings as $setting) {
$setting->set_status(base_setting::LOCKED_BY_PERMISSION);
// to lock all settings by permission so that no changes can be made. This does
// not apply to the import facility, where all the activities (picked on backup)
// are restored automatically without restore UI
if ($mode != backup::MODE_IMPORT) {
$hasconfigcap = has_capability('moodle/restore:configure', $coursectx, $userid);
if (!$hasconfigcap) {
$settings = $restore_controller->get_plan()->get_settings();
foreach ($settings as $setting) {
$setting->set_status(base_setting::LOCKED_BY_PERMISSION);
}
}
}
@@ -401,12 +401,40 @@ abstract class backup_controller_dbops extends backup_dbops {
return $DB->get_record('course', array('id' => $courseid), 'fullname, shortname, startdate');
}
/**
* Sets the default values for the settings in a backup operation
*
* Based on the mode of the backup it will delegate the process to
* other methods like {@link apply_general_config_defaults} ...
* to get proper defaults loaded
*
* @param backup_controller $controller
*/
public static function apply_config_defaults(backup_controller $controller) {
// Based on the mode of the backup (general, automated, import, hub...)
// decide the action to perform to get defaults loaded
$mode = $controller->get_mode();
switch ($mode) {
case backup::MODE_GENERAL:
// Load the general defaults
self::apply_general_config_defaults($controller);
break;
case backup::MODE_AUTOMATED:
// TODO: Move the loading from automatic stuff to here
break;
default:
// Nothing to do for other modes (IMPORT/HUB...). Some day we
// can define defaults (admin UI...) for them if we want to
}
}
/**
* Sets the controller settings default values from the backup config.
*
* @param backup_controller $controller
*/
public static function apply_general_config_defaults(backup_controller $controller) {
private static function apply_general_config_defaults(backup_controller $controller) {
$settings = array(
// Config name => Setting name
'backup_general_users' => 'users',
@@ -214,6 +214,8 @@ abstract class backup_plan_dbops extends backup_dbops {
switch ($type) {
case backup::TYPE_1COURSE:
$shortname = $DB->get_field('course', 'shortname', array('id' => $id));
$context = get_context_instance(CONTEXT_COURSE, $id);
$shortname = format_string($shortname, true, array('context' => $context));
break;
case backup::TYPE_1SECTION:
if (!$shortname = $DB->get_field('course_sections', 'name', array('id' => $id))) {
+2 -1
View File
@@ -1340,7 +1340,8 @@ abstract class restore_dbops {
$course->sortorder = 0;
$course->timecreated = time();
$course->timemodified = $course->timecreated;
$course->visible = $category->visible;
// forcing skeleton courses to be hidden instead of going by $category->visible , until MDL-27790 is resolved.
$course->visible = 0;
$courseid = $DB->insert_record('course', $course);
@@ -0,0 +1,60 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* @package core
* @subpackage backup-convert
* @copyright 2011 Mark Nielsen <mark@moodlerooms.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Factory class to create new instances of backup converters
*/
abstract class convert_factory {
/**
* Instantinates the given converter operating on a given directory
*
* @throws coding_exception
* @param $name The converter name
* @param $tempdir The temp directory to operate on
* @param base_logger|null if the conversion should be logged, use this logger
* @return base_converter
*/
public static function get_converter($name, $tempdir, $logger = null) {
global $CFG;
$name = clean_param($name, PARAM_SAFEDIR);
$classfile = "$CFG->dirroot/backup/converter/$name/lib.php";
$classname = "{$name}_converter";
if (!file_exists($classfile)) {
throw new coding_exception("Converter factory error: class file not found $classfile");
}
require_once($classfile);
if (!class_exists($classname)) {
throw new coding_exception("Converter factory error: class not found $classname");
}
return new $classname($tempdir, $logger);
}
}
+33 -14
View File
@@ -76,7 +76,7 @@ abstract class backup_cron_automated_helper {
} else if ($state === backup_cron_automated_helper::STATE_RUNNING) {
mtrace('RUNNING');
if ($rundirective == self::RUN_IMMEDIATELY) {
mtrace('automated backups are already. If this script is being run by cron this constitues an error. You will need to increase the time between executions within cron.');
mtrace('Automated backups are already running. If this script is being run by cron this constitues an error. You will need to increase the time between executions within cron.');
} else {
mtrace("automated backup are already running. Execution delayed");
}
@@ -123,14 +123,24 @@ abstract class backup_cron_automated_helper {
$backupcourse = $DB->get_record('backup_courses', array('courseid'=>$course->id));
}
// Skip courses that do not yet need backup
$skipped = !(($backupcourse->nextstarttime >= 0 && $backupcourse->nextstarttime < $now) || $rundirective == self::RUN_IMMEDIATELY);
// Skip backup of unavailable courses that have remained unmodified in a month
$skipped = false;
if (empty($course->visible) && ($now - $course->timemodified) > 31*24*60*60) { //Hidden + unmodified last month
$backupcourse->laststatus = backup_cron_automated_helper::BACKUP_STATUS_SKIPPED;
$DB->update_record('backup_courses', $backupcourse);
mtrace('Skipping unchanged course '.$course->fullname);
$skipped = true;
} else if (($backupcourse->nextstarttime >= 0 && $backupcourse->nextstarttime < $now) || $rundirective == self::RUN_IMMEDIATELY) {
if (!$skipped && empty($course->visible) && ($now - $course->timemodified) > 31*24*60*60) { //Hidden + settings were unmodified last month
//Check log if there were any modifications to the course content
$sqlwhere = "course=:courseid AND time>:time AND ". $DB->sql_like('action', ':action', false, true, true);
$params = array('courseid' => $course->id, 'time' => $now-31*24*60*60, 'action' => '%view%');
$logexists = $DB->record_exists_select('log', $sqlwhere, $params);
if (!$logexists) {
$backupcourse->laststatus = backup_cron_automated_helper::BACKUP_STATUS_SKIPPED;
$backupcourse->nextstarttime = $nextstarttime;
$DB->update_record('backup_courses', $backupcourse);
mtrace('Skipping unchanged course '.$course->fullname);
$skipped = true;
}
}
//Now we backup every non-skipped course
if (!$skipped) {
mtrace('Backing up '.$course->fullname, '...');
//We have to send a email because we have included at least one backup
@@ -197,7 +207,7 @@ abstract class backup_cron_automated_helper {
//Build the message subject
$site = get_site();
$prefix = $site->shortname.": ";
$prefix = format_string($site->shortname, true, array('context' => get_context_instance(CONTEXT_COURSE, SITEID))).": ";
if ($haserrors) {
$prefix .= "[".strtoupper(get_string('error'))."] ";
}
@@ -312,7 +322,7 @@ abstract class backup_cron_automated_helper {
$settings = array(
'users' => 'backup_auto_users',
'role_assignments' => 'backup_auto_users',
'role_assignments' => 'backup_auto_role_assignments',
'user_files' => 'backup_auto_user_files',
'activities' => 'backup_auto_activities',
'blocks' => 'backup_auto_blocks',
@@ -401,10 +411,19 @@ abstract class backup_cron_automated_helper {
if ($active === self::AUTO_BACKUP_DISABLED || ($rundirective == self::RUN_ON_SCHEDULE && $active === self::AUTO_BACKUP_MANUAL)) {
return self::STATE_DISABLED;
} else if (!empty($config->backup_auto_running)) {
// TODO: We should find some way of checking whether the automated
// backup has infact finished. In 1.9 this was being done by checking
// the log entries.
return self::STATE_RUNNING;
// Detect if the backup_auto_running semaphore is a valid one
// by looking for recent activity in the backup_controllers table
// for backups of type backup::MODE_AUTOMATED
$timetosee = 60 * 90; // Time to consider in order to clean the semaphore
$params = array( 'purpose' => backup::MODE_AUTOMATED, 'timetolook' => (time() - $timetosee));
if ($DB->record_exists_select('backup_controllers',
"operation = 'backup' AND type = 'course' AND purpose = :purpose AND timemodified > :timetolook", $params)) {
return self::STATE_RUNNING; // Recent activity found, still running
} else {
// No recent activity found, let's clean the semaphore
mtrace('Automated backups activity not found in last ' . (int)$timetosee/60 . ' minutes. Cleaning running status');
backup_cron_automated_helper::set_state_running(false);
}
}
return self::STATE_OK;
}
@@ -153,7 +153,9 @@ abstract class backup_general_helper extends backup_helper {
$rolemappings->modified = false;
$rolemappings->mappings = array();
$info->role_mappings = $rolemappings;
// Some initially empty containers
$info->sections = array();
$info->activities = array();
// Now the contents
$contentsarr = $infoarr['contents'];
@@ -164,7 +166,6 @@ abstract class backup_general_helper extends backup_helper {
}
if (isset($contentsarr['sections']) && isset($contentsarr['sections']['section'])) {
$sectionarr = $contentsarr['sections']['section'];
$sections = array();
foreach ($sectionarr as $section) {
$section = (object)$section;
$section->settings = array();
@@ -174,7 +175,6 @@ abstract class backup_general_helper extends backup_helper {
}
if (isset($contentsarr['activities']) && isset($contentsarr['activities']['activity'])) {
$activityarr = $contentsarr['activities']['activity'];
$activities = array();
foreach ($activityarr as $activity) {
$activity = (object)$activity;
$activity->settings = array();
@@ -214,8 +214,10 @@ abstract class backup_general_helper extends backup_helper {
* generated or no. Behavior of various parts of restore are
* dependent of this.
*
* Use site_identifier (hashed) and fallback to wwwroot, thought
* any 2.0 backup should have the former. See MDL-16614
* Backups created natively in 2.0 and later declare the hashed
* site identifier. Backups created by conversion from a 1.9
* backup do not declare such identifier, so there is a fallback
* to wwwroot comparison. See MDL-16614.
*/
public static function backup_is_samesite($info) {
global $CFG;
@@ -228,50 +230,34 @@ abstract class backup_general_helper extends backup_helper {
}
/**
* Given one temp/backup/xxx dir, detect its format
* Detects the format of the given unpacked backup directory
*
* TODO: Move harcoded detection here to delegated classes under backup/format (moodle1, imscc..)
* conversion code will be there too.
* @param string $tempdir the name of the backup directory
* @return string one of backup::FORMAT_xxx constants
*/
public static function detect_backup_format($tempdir) {
global $CFG;
$filepath = $CFG->dataroot . '/temp/backup/' . $tempdir . '/moodle_backup.xml';
require_once($CFG->dirroot . '/backup/util/helper/convert_helper.class.php');
// Does tempdir exist and is dir
if (!is_dir(dirname($filepath))) {
throw new backup_helper_exception('tmp_backup_directory_not_found', dirname($filepath));
if (convert_helper::detect_moodle2_format($tempdir)) {
return backup::FORMAT_MOODLE;
}
// First look for MOODLE (moodle2) format
if (file_exists($filepath)) { // Looks promising, lets load some information
$handle = fopen ($filepath, "r");
$first_chars = fread($handle,200);
$status = fclose ($handle);
// Check if it has the required strings
if (strpos($first_chars,'<?xml version="1.0" encoding="UTF-8"?>') !== false &&
strpos($first_chars,'<moodle_backup>') !== false &&
strpos($first_chars,'<information>') !== false) {
return backup::FORMAT_MOODLE;
// see if a converter can identify the format
$converters = convert_helper::available_converters();
foreach ($converters as $name) {
$classname = "{$name}_converter";
if (!class_exists($classname)) {
throw new coding_exception("available_converters() is supposed to load
converter classes but class $classname not found");
}
$detected = call_user_func($classname .'::detect_format', $tempdir);
if (!empty($detected)) {
return $detected;
}
}
// Then look for MOODLE1 (moodle1) format
$filepath = $CFG->dataroot . '/temp/backup/' . $tempdir . '/moodle.xml';
if (file_exists($filepath)) { // Looks promising, lets load some information
$handle = fopen ($filepath, "r");
$first_chars = fread($handle,200);
$status = fclose ($handle);
// Check if it has the required strings
if (strpos($first_chars,'<?xml version="1.0" encoding="UTF-8"?>') !== false &&
strpos($first_chars,'<MOODLE_BACKUP>') !== false &&
strpos($first_chars,'<INFO>') !== false) {
return backup::FORMAT_MOODLE1;
}
}
// Other formats
// Arrived here, unknown format
return backup::FORMAT_UNKNOWN;
}
}
+340
View File
@@ -0,0 +1,340 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Provides {@link convert_helper} and {@link convert_helper_exception} classes
*
* @package core
* @subpackage backup-convert
* @copyright 2011 Mark Nielsen <mark@moodlerooms.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/backup/util/includes/convert_includes.php');
/**
* Provides various functionality via its static methods
*/
abstract class convert_helper {
/**
* @param string $entropy
* @return string random identifier
*/
public static function generate_id($entropy) {
return md5(time() . '-' . $entropy . '-' . random_string(20));
}
/**
* Returns the list of all available converters and loads their classes
*
* Converter must be installed as a directory in backup/converter/ and its
* method is_available() must return true to get to the list.
*
* @see base_converter::is_available()
* @return array of strings
*/
public static function available_converters() {
global $CFG;
$converters = array();
$plugins = get_list_of_plugins('backup/converter');
foreach ($plugins as $name) {
$classfile = "$CFG->dirroot/backup/converter/$name/lib.php";
$classname = "{$name}_converter";
if (!file_exists($classfile)) {
throw new convert_helper_exception('converter_classfile_not_found', $classfile);
}
require_once($classfile);
if (!class_exists($classname)) {
throw new convert_helper_exception('converter_classname_not_found', $classname);
}
if (call_user_func($classname .'::is_available')) {
$converters[] = $name;
}
}
return $converters;
}
/**
* Detects if the given folder contains an unpacked moodle2 backup
*
* @param string $tempdir the name of the backup directory
* @return boolean true if moodle2 format detected, false otherwise
*/
public static function detect_moodle2_format($tempdir) {
global $CFG;
$dirpath = $CFG->dataroot . '/temp/backup/' . $tempdir;
$filepath = $dirpath . '/moodle_backup.xml';
if (!is_dir($dirpath)) {
throw new convert_helper_exception('tmp_backup_directory_not_found', $dirpath);
}
if (!file_exists($filepath)) {
return false;
}
$handle = fopen($filepath, 'r');
$firstchars = fread($handle, 200);
$status = fclose($handle);
if (strpos($firstchars,'<?xml version="1.0" encoding="UTF-8"?>') !== false and
strpos($firstchars,'<moodle_backup>') !== false and
strpos($firstchars,'<information>') !== false) {
return true;
}
return false;
}
/**
* Converts the given directory with the backup into moodle2 format
*
* @param string $tempdir The directory to convert
* @param string $format The current format, if already detected
* @param base_logger|null if the conversion should be logged, use this logger
* @throws convert_helper_exception
* @return bool false if unable to find the conversion path, true otherwise
*/
public static function to_moodle2_format($tempdir, $format = null, $logger = null) {
if (is_null($format)) {
$format = backup_general_helper::detect_backup_format($tempdir);
}
// get the supported conversion paths from all available converters
$converters = self::available_converters();
$descriptions = array();
foreach ($converters as $name) {
$classname = "{$name}_converter";
if (!class_exists($classname)) {
throw new convert_helper_exception('class_not_loaded', $classname);
}
if ($logger instanceof base_logger) {
backup_helper::log('available converter', backup::LOG_DEBUG, $classname, 1, false, $logger);
}
$descriptions[$name] = call_user_func($classname .'::description');
}
// choose the best conversion path for the given format
$path = self::choose_conversion_path($format, $descriptions);
if (empty($path)) {
if ($logger instanceof base_logger) {
backup_helper::log('unable to find the conversion path', backup::LOG_ERROR, null, 0, false, $logger);
}
return false;
}
if ($logger instanceof base_logger) {
backup_helper::log('conversion path established', backup::LOG_INFO,
implode(' => ', array_merge($path, array('moodle2'))), 0, false, $logger);
}
foreach ($path as $name) {
if ($logger instanceof base_logger) {
backup_helper::log('running converter', backup::LOG_INFO, $name, 0, false, $logger);
}
$converter = convert_factory::get_converter($name, $tempdir, $logger);
$converter->convert();
}
// make sure we ended with moodle2 format
if (!self::detect_moodle2_format($tempdir)) {
throw new convert_helper_exception('conversion_failed');
}
return true;
}
/**
* Inserts an inforef into the conversion temp table
*/
public static function set_inforef($contextid) {
global $DB;
}
public static function get_inforef($contextid) {
}
/// end of public API //////////////////////////////////////////////////////
/**
* Choose the best conversion path for the given format
*
* Given the source format and the list of available converters and their properties,
* this methods picks the most effective way how to convert the source format into
* the target moodle2 format. The method returns a list of converters that should be
* called, in order.
*
* This implementation uses Dijkstra's algorithm to find the shortest way through
* the oriented graph.
*
* @see http://en.wikipedia.org/wiki/Dijkstra's_algorithm
* @author David Mudrak <david@moodle.com>
* @param string $format the source backup format, one of backup::FORMAT_xxx
* @param array $descriptions list of {@link base_converter::description()} indexed by the converter name
* @return array ordered list of converter names to call (may be empty if not reachable)
*/
protected static function choose_conversion_path($format, array $descriptions) {
// construct an oriented graph of conversion paths. backup formats are nodes
// and the the converters are edges of the graph.
$paths = array(); // [fromnode][tonode] => converter
foreach ($descriptions as $converter => $description) {
$from = $description['from'];
$to = $description['to'];
$cost = $description['cost'];
if (is_null($from) or $from === backup::FORMAT_UNKNOWN or
is_null($to) or $to === backup::FORMAT_UNKNOWN or
is_null($cost) or $cost <= 0) {
throw new convert_helper_exception('invalid_converter_description', $converter);
}
if (!isset($paths[$from][$to])) {
$paths[$from][$to] = $converter;
} else {
// if there are two converters available for the same conversion
// path, choose the one with the lowest cost. if there are more
// available converters with the same cost, the chosen one is
// undefined (depends on the order of processing)
if ($descriptions[$paths[$from][$to]]['cost'] > $cost) {
$paths[$from][$to] = $converter;
}
}
}
if (empty($paths)) {
// no conversion paths available
return array();
}
// now use Dijkstra's algorithm and find the shortest conversion path
$dist = array(); // list of nodes and their distances from the source format
$prev = array(); // list of previous nodes in optimal path from the source format
foreach ($paths as $fromnode => $tonodes) {
$dist[$fromnode] = null; // infinitive distance, can't be reached
$prev[$fromnode] = null; // unknown
foreach ($tonodes as $tonode => $converter) {
$dist[$tonode] = null; // infinitive distance, can't be reached
$prev[$tonode] = null; // unknown
}
}
if (!array_key_exists($format, $dist)) {
return array();
} else {
$dist[$format] = 0;
}
$queue = array_flip(array_keys($dist));
while (!empty($queue)) {
// find the node with the smallest distance from the source in the queue
// in the first iteration, this will find the original format node itself
$closest = null;
foreach ($queue as $node => $undefined) {
if (is_null($dist[$node])) {
continue;
}
if (is_null($closest) or ($dist[$node] < $dist[$closest])) {
$closest = $node;
}
}
if (is_null($closest) or is_null($dist[$closest])) {
// all remaining nodes are inaccessible from source
break;
}
if ($closest === backup::FORMAT_MOODLE) {
// bingo we can break now
break;
}
unset($queue[$closest]);
// visit all neighbors and update distances to them eventually
if (!isset($paths[$closest])) {
continue;
}
$neighbors = array_keys($paths[$closest]);
// keep just neighbors that are in the queue yet
foreach ($neighbors as $ix => $neighbor) {
if (!array_key_exists($neighbor, $queue)) {
unset($neighbors[$ix]);
}
}
foreach ($neighbors as $neighbor) {
// the alternative distance to the neighbor if we went thru the
// current $closest node
$alt = $dist[$closest] + $descriptions[$paths[$closest][$neighbor]]['cost'];
if (is_null($dist[$neighbor]) or $alt < $dist[$neighbor]) {
// we found a shorter way to the $neighbor, remember it
$dist[$neighbor] = $alt;
$prev[$neighbor] = $closest;
}
}
}
if (is_null($dist[backup::FORMAT_MOODLE])) {
// unable to find a conversion path, the target format not reachable
return array();
}
// reconstruct the optimal path from the source format to the target one
$conversionpath = array();
$target = backup::FORMAT_MOODLE;
while (isset($prev[$target])) {
array_unshift($conversionpath, $paths[$prev[$target]][$target]);
$target = $prev[$target];
}
return $conversionpath;
}
}
/**
* General convert_helper related exception
*
* @author David Mudrak <david@moodle.com>
*/
class convert_helper_exception extends moodle_exception {
/**
* Constructor
*
* @param string $errorcode key for the corresponding error string
* @param object $a extra words and phrases that might be required in the error string
* @param string $debuginfo optional debugging information
*/
public function __construct($errorcode, $a = null, $debuginfo = null) {
parent::__construct($errorcode, '', '', $a, $debuginfo);
}
}
@@ -53,4 +53,12 @@ class restore_inforef_parser_processor extends grouped_parser_processor {
$itemid = $data['tags']['id'];
restore_dbops::set_backup_ids_record($this->restoreid, $itemname, $itemid);
}
protected function notify_path_start($path) {
// nothing to do
}
protected function notify_path_end($path) {
// nothing to do
}
}

Some files were not shown because too many files have changed in this diff Show More