Commit graph

7868 commits

Author SHA1 Message Date
mjollnir_
a65cfba54d MDL-17692: count_role_users now accepts an int or an array of ints for roleid - this is now consistent with get_role_users. (Merged from MOODLE_19_STABLE) 2008-12-19 08:45:44 +00:00
dongsheng
9e3f34d1c7 "FILTER/MDL-14582, filters 2.0, compatible with old filters" 2008-12-19 02:16:00 +00:00
sam_marshall
00653161b5 MDL-17556: Improve performance of get_fast_modinfo when courses have many activities 2008-12-18 17:52:29 +00:00
sam_marshall
82bd6a5ea9 MDL-15499: Conditional availability of activities 2008-12-17 16:37:35 +00:00
fmarier
588acd0608 MDL-17542 weblib/html2text: replace html2text.php with a GPL alternative (which is also faster) 2008-12-17 02:55:33 +00:00
stronk7
294c03a996 MDL-17647 accesslib - cleaning some candoanything in comments. Merged from 19_STABLE 2008-12-17 00:33:32 +00:00
stronk7
c362878ed7 MDL-17645 delete_records_list - Tidied a bit return values. Fix behaviour when no values are passed + new dml tests for all *_list() functions. 2008-12-15 21:41:09 +00:00
tjhunt
212235d3e2 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).
2008-12-15 06:22:18 +00:00
tjhunt
b1bc126319 unit tests: MDL-17646 Arrgh! edited the wrong file after making testsimpletestlib.php by copying testaccesslib.php! 2008-12-15 03:08:22 +00:00
tjhunt
821e4ecf16 unit tests: MDL-17646 Helper functions for loading and cleaning up test data. 2008-12-15 02:39:55 +00:00
tjhunt
0e8e23cce6 dml: MDL-17645 New database method delete_records_list. 2008-12-15 02:13:11 +00:00
jonathanharker
e6e13284f9 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.
2008-12-14 22:28:39 +00:00
skodak
1a5b427e44 MDL-17589 fixed handling of missing caps in admin tree; merged from MOODLE_19_STABLE 2008-12-12 10:50:25 +00:00
tjhunt
83f0fef567 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. 2008-12-12 09:00:11 +00:00
dongsheng
771dc7b298 "MDL-14129, fix error() in moodle2" 2008-12-12 05:45:43 +00:00
dongsheng
60e40dda6c "MDL-14129, remove the rest error() in moodle2" 2008-12-12 04:53:32 +00:00
jonathanharker
3b8c248237 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>
2008-12-12 04:44:53 +00:00
tjhunt
47ceac47e4 questionlib: clarify a comment. 2008-12-12 02:50:36 +00:00
tjhunt
9289e4c90e weblib: MDL-17606 Make the highlight function better, with unit tests. 2008-12-11 10:33:57 +00:00
tjhunt
92f008465c 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.
2008-12-11 09:21:41 +00:00
tjhunt
3c573960ec question bank: MDL-14376 Errors deleting a course containing Cloze questions.
(For some reason, this only seemed to cause problems on MySQL.)
2008-12-11 05:31:33 +00:00
dongsheng
94b8568628 "MDL-16954, get rid of remote_addr notice on cli, set ip = 0.0.0.0 in mdl_log table when accessed from cli, merged from 1.9" 2008-12-11 05:18:17 +00:00
tjhunt
e8f99abc68 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.
2008-12-10 09:11:30 +00:00
tjhunt
b166403f18 javascript cleanup: MDL-16583 clean up the close_window function in weblib.php. 2008-12-10 08:57:50 +00:00
dongsheng
ff9b4ea40a "MDL-17570,clean align property, merged from 1.9" 2008-12-10 07:24:11 +00:00
tjhunt
426091ee1f Simple whitespace cleanup. 2008-12-10 05:32:51 +00:00
tjhunt
e452210a18 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.
2008-12-10 02:57:41 +00:00
skodak
2c4eb0064b MDL-17491 oracle dml: towards full support 2008-12-09 22:24:07 +00:00
skodak
64c6d5db62 MDL-17479 category search: replaced old update capability; merged from MOODLE__STABLE 2008-12-09 20:30:02 +00:00
skodak
3ce50127b9 MDL-17502 accesslib: added warning if incorrect parameters supplied to has_all_capabilities() and fixed parameters in course lib code 2008-12-09 16:25:38 +00:00
skodak
418b74993d MDL-17491 oracle dml: problem notes 2008-12-09 09:03:37 +00:00
dongsheng
b933b378e3 "MDL-17391, fix file_type_to_ext to class, which should return array all the time" 2008-12-09 06:52:27 +00:00
moodler
22ed92de16 MDL-17391, change paramters of repository_get_client. 2008-12-09 06:50:06 +00:00
stronk7
9d510a2ea0 MDL-13746 course shortname up to 100cc (applied to mnet_enrol_course) 2008-12-08 08:21:19 +00:00
tjhunt
8a1b1c328d 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.
2008-12-08 07:28:19 +00:00
dongsheng
fc11edbfa0 "MDL-17391, enable repository filter in html editor" 2008-12-08 06:53:58 +00:00
dongsheng
014c1ca037 "MDL-17391, filter repository intances by file types" 2008-12-08 05:19:09 +00:00
tjhunt
9136a60c46 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.
2008-12-08 02:31:05 +00:00
skodak
745c0ee508 MDL-17537 course request: shortname in course_request is now the same length as in course table - 100 chars 2008-12-07 22:13:39 +00:00
dongsheng
9442670781 TINYMCE, YOUTUBE/MDL-16650 2008-12-05 05:21:24 +00:00
skodak
66e75f8d51 MDL-17491 experimental native oracle driver - still bugy and incomplete, this will require more core changes, grrrrrr 2008-12-05 00:10:27 +00:00
skodak
995821591d MDL-17534 simpletest: temporary fix for exception problems 2008-12-04 23:19:37 +00:00
skodak
9d833e931c MDL-17522 improved dml tests, fixed use of reserved word "number" 2008-12-04 23:16:35 +00:00
skodak
3ff8bf266b MDL-17522 improved dml tests, fixed sql LIMIT support in native drivers 2008-12-04 11:52:53 +00:00
tjhunt
8ed5dd63ee course categories: Fix many bugs with category editing and permissions. Clean up code.
Bugs: MDL-17479, MDL-16426, MDL-16063, MDL-16013, MDL-15658, MDL-15556, MDL-15161, MDL-14925, MDL-13742, MDL-11557.

* Simplify category editing permissions to just moodle/category:manage and moodle/category:seehiddencategories.
* Enforce those correctly. (Note MDL 17502 is still outstanding.)
* Don't screw up category sort order when you just edit name or description.
* Niceties like where redirects go when you cancel or submit forms.
* Make sure a global course creator can see the site admin block.
* Don't allow a category to be made the child of one of its children!
* General code cleanup to bring key files more in line with best pracitice.

Apologies for the fact it is one big patch, rather than a series of smaller patches. However, categoryedit.php, category.php and index.php where in pretty bad shape and needed significant cleaning up. categoryedit.php, in particular, was almost completely rewritten.

Merged from MOODLE_19_STABLE.
2008-12-04 08:53:10 +00:00
ericmerrill
62097c91ed weblib: MDL-16293: background-color attribute stripped from html. Adding 'background-color' attribute to $ALLOWED_PROTOCOLS array so kses doesn't drop it. 2008-12-03 16:31:49 +00:00
skodak
189f3ee9bf MDL-14679 enforce prefix for native pg driver 2008-12-02 10:07:03 +00:00
skodak
1638ad5317 MDL-14679 removed unnecessary CFG from native drivers 2008-12-02 10:01:01 +00:00
dongsheng
b423b4af24 REPOSITORY, FILEMANGER FORM ELEMENT/MDL-16597
new ajax filemanager.
2008-12-02 07:05:15 +00:00
poltawski
f6d3e2c486 lib: class curl does http proxy tunneling if http proxy set. Most
proxies do not permit this so I think its better to just use pure
pure http MDL-17482
2008-12-01 22:23:42 +00:00