tjhunt [Mon, 15 Dec 2008 06:22:18 +0000 (06:22 +0000)]
accesslib: MDL-17647, MDL-17648 and MDL-17649 Bug fix, improvement and unit test.
MDL-17647 was referring to moodle/site:candoanything insstead of moodle/site:doanything
MDL-17648 Let get_users_by_capability take an array of capabilities, like has_any_capability
MDL-17649 get_users_by_capability must have unit tests (HEAD only).
The unit tests were briefly working (apart from the system context, which I had to set up by hand in the test contexts table). Then I made the mistake of trying to upgrade the test tables, and it all went horribly wrong (MDL-17644).
jonathanharker [Sun, 14 Dec 2008 22:50:22 +0000 (22:50 +0000)]
MDL-17548 MNET: Fix email links for sites with path component in wwwroot
Where Moodle sites had a path in their wwwroot, the MNET function that
forced remote users to go via their identity provider (to make sure they
were logged in) previously directed the user back to a URL like
contentprovider.com/moodle/moodle/mod/forum/view.php?f=7 where there
should only be one /moodle in the middle of the URL.
jonathanharker [Sun, 14 Dec 2008 22:28:39 +0000 (22:28 +0000)]
MDL-16875 New Moodle setting - sessioncookiedomain
Added new sessioncookiedomain setting to session handling section.
* allows you to change the domain that the Moodle cookies are available
from. This is useful for Moodle customisations (i.e. Squirrelmail SSO
or enrolment plugins) that need to share Moodle session information
with a web application on another subdomain.
* Will NOT work if the moodle host does not have a domain - i.e. just a
hostname, e.g. 'localhost' or 'myhostname'. Needs a FQDN
* Currently the setting is set to PARAM_TEXT length 50 since PARAM_HOST
does not allow a leading dot e.g. '.mydomain.com'
* TODO: do we make up a new PARAM_COOKIEDOMAIN which is the same as
PARAM_HOST but allows leading dots? Using PARAM_HOST and prepending a
dot may not always be desirable.
tjhunt [Fri, 12 Dec 2008 09:00:11 +0000 (09:00 +0000)]
questions manual grading: MDL-15147 refine the logic for distinguishing '' and 0, so you can grade an essay 0 without making a comment, but also, grade some, but not all student's work in the manual grading report.
jonathanharker [Fri, 12 Dec 2008 04:44:53 +0000 (04:44 +0000)]
MDL-17549 auth/radius: add CHAP and MSCHAP auth support, detect PHP extension
* Added support for CHAP and MSCHAP authentication schemes
contributed by Stanislav Tsymbalov http://www.tsymbalov.net/
original code at http://sourceforge.net/projects/moodleradius/
* Tweak the detection of PHP RADIUS extension and Pear code
* Update the warning notices to use more Moodly CSS classes
lib/pear: Add RADIUS and CHAP PEAR libs
* Add PEAR Auth_RADIUS and Crypt_CHAP packages to lib/pear
Author: Jonathan Harker <jonathan@catalyst.net.nz>
tjhunt [Fri, 12 Dec 2008 03:48:39 +0000 (03:48 +0000)]
numerical and shortanswer question types: problems with compare_responses and test_response.
MDL-15315 The previous fix for this issue with wildcard answers in the item analysis report caused the following two regressions. This patch fixes it properly.
MDL-17247 This is basiclly pointing out the weridness in the previous fix and gave some useful clues as to a proper solution. Thanks Oleg.
MDL-17610 This was a report of a problem with each attempt builds on last, with a shortanswer question, where the sutdent's response contains a '.
Also, lots of unit tests to try to ensure the new code is right.
tjhunt [Thu, 11 Dec 2008 09:21:41 +0000 (09:21 +0000)]
admin tree: MDL-10047 and MDL-13104 weird things happen when you turn editing on and off.
That was becuase not enough information was being passed in for the blocks editing controls to construct the right URL to reload the page.
It is also now possible for admin external pages to add some UI next to the turn blocks editing on/off button. For example, when you are editing the list of course catgories, the turn editing off button is now in the right place.
tjhunt [Thu, 11 Dec 2008 07:01:57 +0000 (07:01 +0000)]
forum subscriptions: MDL-14876 user of deprecated functions was breaking managing subscribers.
This was visible when, for example, unusual role definitions meant that someone could access a forum without being enrolled in a course.
Note that one of the places that was previously broken was front page forums. Since subscribers.php does not do paging at all, the fact that I have fixed this bug makes this page dangerous on large sites. A proper solution will have to wait until bug 17550 is fixed in HEAD.
This also fixes a minor problem introduced by MDL-12979.
tjhunt [Wed, 10 Dec 2008 09:11:30 +0000 (09:11 +0000)]
quiz manual grading: MDL-5517 manual grading pop-up is too small. HTML editor does not fit. Merged from MOODLE_19_STABLE.
Also MDL-17585 Improve layout of manual grading forms to make them look more like formslib forms. The standard trick of stealing the HTML and class names that formslib works, so the standard style rules apply to your form.
tjhunt [Wed, 10 Dec 2008 06:26:47 +0000 (06:26 +0000)]
quiz: MDL-6085 when editing a question from various places like a preview attempt or review screen, don't use a popup, instead take advantage of the fact that question.php now takes a returnurl. Merged from MOODLE_19_STABLE.
And MDL-17568 minor niggles with new queston navigation:
* The bit that scrolls down to the question you just submitted in adaptive mode was not working with random questions.
* Teachers reviewing an open attempt were shown the qusetions as editable, not read only!
moodler [Wed, 10 Dec 2008 06:23:35 +0000 (06:23 +0000)]
admin MDL-17429 Move registration button to admin menu, and make registration page a proper admin page, also fix bad DML call
admin MDL-16867 Change "Optional subsystems" menu item to "Advanced features"
tjhunt [Wed, 10 Dec 2008 02:57:41 +0000 (02:57 +0000)]
course request: MDL-17575 and MDL-6160 further improvements:
1/ email notification when course requested
2/ course request capability so that we can limit who can request new course
3/ list of my pending course requests on the request form
Implemented in 1.9 by Petr Skoda, and reviewed and merged to HEAD by me.
tjhunt [Tue, 9 Dec 2008 05:14:15 +0000 (05:14 +0000)]
define roles: MDL-16966 go back to 'Define roles' in the admin menu, rather than 'Manage roles'
Define is a stronger verb than manage, and most of the things there are to do with defining roles. I keep finding myself looking for 'Define roles' in the menu when I am testing, which suggests changing the working in 1.9 does more harm than good.
tjhunt [Mon, 8 Dec 2008 07:28:19 +0000 (07:28 +0000)]
course categories: MDL-17502 when deleting a category and its contents, check moodle/course:delete capability.
* Note: this would never lead to problems with default role definions.
* Also ended up mostly rewriting delete_category_form to simplify the messages that are displayed.
* New helper function require_all_capabilities, a bit like require_any_capability.
tjhunt [Mon, 8 Dec 2008 02:31:05 +0000 (02:31 +0000)]
course settings: MDL-17501 check for moodle/course:visibility in the course settings form.
1. If a user does not have that capability, don't let them change whether the course is visible.
2. Give teachers that capability by default.
3. To avoid regressions, on upgrade, give moodle/course:visibility to any role that has moodle/course:update.