Compare commits

..

1569 Commits

Author SHA1 Message Date
moodler 585b76a0e8 Bumping the version to Moodle 1.9 in preparation for release. 2008-03-03 07:06:31 +00:00
moodler 15e6b71bc0 MDL-13754 Avoid joining to lastaccess unless we really wanted it
Plus some other cosmetic tidying and comments
2008-03-03 06:19:31 +00:00
moodler 94c265fe95 MDL-11484 Added some colors for overridden grades 2008-03-03 05:54:43 +00:00
moodler 9f3c4120f9 Fixed a notice 2008-03-03 05:27:36 +00:00
moodler 734b4d4dd1 MDL-13478 Cleaned up some variables 2008-03-03 05:24:29 +00:00
moodler 94cf182211 MDL-13753 Show percentages under numbers for result columns 2008-03-03 05:11:39 +00:00
moodler 2c7def765e MDL-13478 use count() function to count arrays 2008-03-03 04:38:36 +00:00
moodler 63ae91cc6d MDL-13478 - massive performance fixes
- general tidying up

           This patch is a mix of Dan Marsden's fairly extensive tidying up
           plus my fixes which bring db calls down to a constant value (from something
           like 6 calls per user response).  Thanks Dan!
2008-03-03 04:26:59 +00:00
moodler f7c44f3873 MDL-13722 Preview now works when when idnumbers might be empty 2008-03-02 15:15:07 +00:00
moodler 58331043d0 MDL-13475 Fixed some character lengths for course->shortname and role->shortname (100char) 2008-03-02 15:02:25 +00:00
moodler 08dc6e642a MDL-13717 Applied hack from Nicklas to fix sitemp etc. It worked for me in a quick test. 2008-03-02 01:20:23 +00:00
nicolasconnault 6a22b20efd MDL-13663 More lang string updates. 2008-03-01 16:56:41 +00:00
skodak ccb472e7b9 fixed groups property typo 2008-03-01 16:19:48 +00:00
skodak eccbfc92ae MDL-13705 2008-03-01 13:10:39 +00:00
nicolasconnault d4e9a98087 MDL-13663 Last lang string change. 2008-02-29 22:17:43 +00:00
nicolasconnault 1b44161802 MDL-13564 Deduced the missing strings from similar strings found in auth.php 2008-02-29 22:11:09 +00:00
nicolasconnault 66fd7a7612 MDL-13736 Wrapped the link in a div and fixed the style. 2008-02-29 21:44:08 +00:00
stronk7 60a18dc226 rebuild_course_cache() to calculate modinfo before role assignments. MDL-13740 2008-02-29 19:53:40 +00:00
nicolasconnault 7209121b5d MDL-11484 Changed the display of overridden and locked grades 2008-02-29 17:05:40 +00:00
tjhunt f154315266 MDL-13738 - Invalid context developer debug notice in manual grading. 2008-02-29 16:22:13 +00:00
moodler 189bb2de50 MDL-10990 Reverting patch for (5) for forum display for guests (from 27 Feb)
We really need this feature, there must be another way to still gain performance here.
2008-02-29 15:18:13 +00:00
stronk7 35cff7a641 Deletin the grader->get_numusers() method. I was doing some not
needed checks (I guess copied from load_users(), where they have
sense). Fallback to grade_report->get_numusers(), that looks ok. MDL-13403
2008-02-29 15:10:16 +00:00
danmarsden f0e4cbcabd MDL-13478 performance fixes. 2008-02-29 11:58:32 +00:00
nicolasconnault 464b3d80fa Notices on empty array index. 2008-02-29 10:06:43 +00:00
scyrma 08450fe007 MDL-13728 - No need for tag:changetype after all 2008-02-29 09:32:57 +00:00
scyrma 6387e05acd MDL-13728 - Tag form editing now provides a checkbox to set the tag type (official or not) 2008-02-29 09:31:58 +00:00
moodler fd21a93e5f MDL-13676 Fixed some mistakes 2008-02-29 08:55:42 +00:00
scyrma 548a5a4ae3 MDL-13728 - Removing old capabilities and creating a new one for tag type modifications. 2008-02-29 08:43:22 +00:00
moodler f45aff70d9 MDL-13676 Changed a field so that Oracle can cope with a COALESCE statement. :-(
I hate doing this at this late stage, but without it Oracle fails.

           On the way I also fixed the profile page so it displays role aliases if they exist
2008-02-29 08:40:39 +00:00
moodler 63b33f502d New tags file for 1.9 2008-02-29 07:49:53 +00:00
moodler 8f79558997 MDL-13568 Only show full profiles if capability allows it (FERPA) 2008-02-29 07:10:06 +00:00
scyrma 31820054f2 MDL-13728 - Removing old code, this is now in the tag management interface. 2008-02-29 07:08:23 +00:00
moodler 536273ae99 MDL-11960 DIsable rss block on tags pages :-( 2008-02-29 07:04:27 +00:00
moodler e331f94902 MDL-13727 Added a cpability check when showing blog entries 2008-02-29 06:51:02 +00:00
moodler 8a53bb7c91 Added error string for MDL-13725 2008-02-29 06:36:27 +00:00
moodler 97634109b7 MDL-13725 Fixed errorcode typo 2008-02-29 06:32:42 +00:00
moodler c7aebb6755 MDL-13725 Remove tag_get_tag_by_id completely
I also re-ordered tag/lib.php a bit
2008-02-29 06:25:22 +00:00
moodlerobot e8b45d3e1d Automatic installer.php lang files by installer_builder (20080229) 2008-02-29 03:36:24 +00:00
stronk7 9059cb4550 Raising to 1.9 final 2008-02-29 01:43:04 +00:00
tjhunt 078c8b402b MDL-12776 - Quiz email notification and separate groups mode - student not in group -> all teachers get email I have changed it so that if the quiz is set to groups mode, and if the student is not in a group, then only teachers with 'accessallgroups' get emailed. 2008-02-28 22:44:10 +00:00
tjhunt 0a22085fdb MDL-13723 - Unbalanced brackets in get_users_by_capability in the groups bit. 2008-02-28 22:39:15 +00:00
tjhunt 14942a2508 MDL-12815 - Quiz uses inconsistent class attribute for the paging bar. I have added the standard .paging class, but I have left the old class there too, so as not to break existing themes. 2008-02-28 21:43:47 +00:00
skodak 0abc6db872 MDL-13705 2008-02-28 21:16:56 +00:00
skodak 0771778fff MDL-13705 2008-02-28 21:00:13 +00:00
nicolasconnault cbca4dbf6c Changing "overall average" to "Course average" in the outcomes report. 2008-02-28 15:51:25 +00:00
nicolasconnault 0e55fb3512 MDL-13718 New icon for "locked" state icon, for grades whose grade item is locked. 2008-02-28 15:40:42 +00:00
tjhunt 3747744140 MDL-13189 - replace the $QTYPE_MENU global with a function call, so that we can set up the language strings later, after $COURSE is initialised. This ensures that the quesion names appear in the right language. 2008-02-28 12:52:59 +00:00
nicolasconnault 0b0bfed7f3 MDL-13712 Fixed 2008-02-28 12:40:38 +00:00
nicolasconnault 2a1245108c Corrected a few US spellings (z in categorized for example). 2008-02-28 08:57:21 +00:00
urs_hunkler 591f3a61ab added new icon 2008-02-28 08:14:24 +00:00
scyrma b893b91a47 MDL-12726 - Making the htmlarea width default to 598 if it's null, don't touch it otherwise 2008-02-28 08:13:08 +00:00
moodlerobot e018b8db42 Automatic installer.php lang files by installer_builder (20080228) 2008-02-28 03:41:27 +00:00
moodler 0e8422bf22 MDL-13659 Change display of groupings on course page 2008-02-28 03:37:03 +00:00
martinlanghoff 551f60bd3b MDL-90: Remove System.php until we have sorted licensing issues. 2008-02-28 03:16:18 +00:00
scyrma dec87682bf MDL-11242 - Setting the width back to it's 1.8 value. This makes it a bit too large for the message window, but is necessary for IE7/Vista 2008-02-28 03:11:37 +00:00
nicolasconnault 38e533a43c MDL-13663 Docs updated. 2008-02-27 19:04:03 +00:00
skodak 0ed613096c MDL-13681 fixed forum search 2008-02-27 18:49:08 +00:00
nicolasconnault 6778021371 MDL-13699 Followed Helen's instructions. 2008-02-27 18:43:07 +00:00
urs_hunkler d3228e8238 MDL-13700 :: added fontsizes for tag clouds 2008-02-27 18:40:06 +00:00
andreabix b17ce9a429 Fixed MDL-12564 2008-02-27 17:36:53 +00:00
nicolasconnault 2758b9a780 MDL-11924 Changed setting quickfeedback to showquickfeedback and added the toggle accordingly. 2008-02-27 17:03:46 +00:00
andreabix 3fb558da2f Updates and fix for Moodle 1.9 2008-02-27 13:41:08 +00:00
nicolasconnault 5c32a46383 MDL-13674 Course category fullname field is no longer required. If set to empty it will be recorded in the DB as ?, and the course name will be used instead wherever the category name is displayed. 2008-02-27 12:45:10 +00:00
urs_hunkler 4b76cb6fc0 MDL-13648 :: removed the chameleon settings 2008-02-27 12:06:49 +00:00
skodak 7c6e10fe39 MDL-90 fixed quickforms pear include regression 2008-02-27 11:08:01 +00:00
urs_hunkler 68d6a45263 MDL-13648 :: several enhancements/changes due to the discussion in the Moodle tracker:
_ changed the README - Custom corners is now experimental
_ styles_colors from standard included - all the usabilty work using colors will automatically show up in Custom corners too
_ optimized the JavaScript which adds the necessary layouttable classes to the body tag
_ Chameleon engine removed - developers throw in CSS at the end without caring if the Chameleon engine can handle it
2008-02-27 10:31:28 +00:00
nicolasconnault 517e069dec /MDL-13578 New links implemented. 2008-02-27 10:11:50 +00:00
skodak ed1b0d012c MDL-13690 activity outcome items do not support calculation - remove calc icon 2008-02-27 10:10:23 +00:00
skodak cb8faf0f12 MDL-90 fixed install.xml 2008-02-27 10:07:10 +00:00
skodak 0854d3f00e MDL-13695 precreating grades in grade calculation if needed 2008-02-27 10:00:47 +00:00
scyrma d3b68faff0 MDL-13404 - print cloud in the box 2008-02-27 09:44:55 +00:00
scyrma 7684e6314d MDL-13691 - make the tag description edition work again. 2008-02-27 09:33:24 +00:00
nicolasconnault a6b6baf25e MDL-13647 Added new icon. 2008-02-27 09:15:59 +00:00
skodak 7551972d69 MDL-12497 fixed regressionwhen saving site letters, fixed redirect 2008-02-27 08:57:54 +00:00
scyrma 6f5fd34644 MDL-13404 - misc fixes 2008-02-27 08:54:26 +00:00
moodler 4e2d942e71 Fixed the renaming and added a new tag_get() function.
Some of the other tag_get functions should be removed and we can use this for many things
2008-02-27 08:53:03 +00:00
nicolasconnault 8ea0f9c792 MDL-13579 Corrected a bug in default value selection for the grader report preferences form. 2008-02-27 07:50:12 +00:00
scyrma 70adc76b61 MDL-13404 - make tag_rename able to make a change in case, and prevent numerous possible missing addslashes problems. 2008-02-27 07:29:15 +00:00
nicolasconnault ca45180f23 MDL-13579 Reduced the setting to 3 locations. 2008-02-27 07:27:13 +00:00
moodler 9b80ac3538 MDL-13635 FIxed logic here a bit: Mat is fixing tag_rename next 2008-02-27 07:12:28 +00:00
scyrma bb6010edaa MDL-13404 - Minor performance improvement and code cleanup 2008-02-27 06:31:28 +00:00
moodler 2c1868ca6b Protect the directory a bit 2008-02-27 06:11:39 +00:00
scyrma 0a08be2397 MDL-13633 - Now sorting correctly 2008-02-27 06:02:44 +00:00
scyrma 6a4bd1e861 MDL-13633 - (OOPS) Completed incomplete changes - simplified tag_print_cloud. 2008-02-27 05:54:16 +00:00
moodler 524c0c8fab MDL-13685 Make custom_corners use colours properly on plugin page 2008-02-27 05:39:14 +00:00
moodler 6468df8aca MDL-6591 Simplified some wording and fixed the help file name for emailnotification 2008-02-27 05:05:01 +00:00
scyrma fb10b05479 MDL-10639 - Missing string 2008-02-27 04:46:43 +00:00
scyrma 86def10b64 MDL-13633 - This is a first step toward integrating all "tag blocks" together. 2008-02-27 04:46:15 +00:00
moodler 9e1889cdae MDL-90 Adding webdav_locks table to make Martin Langhoff's WebDAV patches simpler to apply later
From: http://git.catalyst.net.nz/gitweb?p=moodle-r2.git;a=commitdiff_plain;h=e27f04c42ba05ee224eafa03549b4b5252ca07f5
2008-02-27 04:33:20 +00:00
moodlerobot 08bae0231a Automatic installer.php lang files by installer_builder (20080227) 2008-02-27 03:44:00 +00:00
martinlanghoff 351b7cd179 MDL-90 PEAR/HTTP/WebDAV: fix file name encoding ... for real this time?
Cherry picked from upstream.
2008-02-27 03:02:05 +00:00
martinlanghoff ed997a6b9c MDL-90 moodlelib: Introducing get_cache_flag() - gets a row from cache_flags table
Useful if you intend to use cache_flags as a session
table. (Oops! Did I reveal my cunning plans?)
2008-02-27 02:57:44 +00:00
martinlanghoff 94ff81261d MDL-90 authenticate_user_login() - don't accidentally return a bogus $user
While I don't quite understand why we need that $user->id=0, at
_least_ make double sure we don't return it! Callers assume
that if we return an object===success and a user acct that just does
not exist will return an dummy object.
2008-02-27 02:56:59 +00:00
martinlanghoff 58bf9beea3 MDL-90 lib/setup: extend include_path to cover the PEAR libs we distribute
Almost no cost - most of our require/include calls are with
absolute paths, which will skip the include_path. The few
that are not absolute are usually to include PEAR libs -
so this is appropriate and avoids having to change the
PEAR libs themselves when they make references to other
PEAR libs.

Using the include path does mean that OS-installed PEAR libs
will override ours. There's a small compat risk here - if you
need to ensure a particular version, use an absolute path.
2008-02-27 02:56:06 +00:00
martinlanghoff 0844c5d93b MDL-90 weblib: Introducing mdie() - close sibling of Perl's die()
So that commandline scripts can die with a message and
a nonzero errorcode
2008-02-27 02:52:39 +00:00
martinlanghoff 26e8984b51 MDL-90 Introducing MOODLE_SANE_INPUT and MOODLE_SANE_OUTPUT to setup.php
These two constants indicate that the Moodle core should not mangle
input (magic quotes of any kind verboten!) and should not spit odd stuff
in the output (displaydebug verboten!). Both are needed for WebDAV
support.

MOODLE_SANE_INPUT is tricky - it means that the codepaths _must_ use
$db->qstr() (or addslashes() - but that has its own problems).
2008-02-27 02:51:59 +00:00
martinlanghoff 2f599e1732 MDL-90 lib/pear: Included System.php - used by WebDAV libs
We need to resolve the dual-licensing of this if we are going to
distribute it with Moodle - see MDL-6693
2008-02-27 02:51:18 +00:00
martinlanghoff c67c987c80 file System.php was added on branch MOODLE_19_STABLE on 2008-02-27 02:51:18 +0000 2008-02-27 02:50:59 +00:00
martinlanghoff b1f3971caf MDL-90 Imported PEAR's HTTP_WebDAV_Server from HEAD @ 28-01-2008
This is a very strict import - did not include any of the
sample files (which are quite dangerous!). See the
README_MOODLE.txt for details.
2008-02-27 02:50:20 +00:00
martinlanghoff dfaa493161 file _parse_proppatch.php was added on branch MOODLE_19_STABLE on 2008-02-27 02:50:21 +0000 2008-02-27 02:49:21 +00:00
martinlanghoff 3e02d264ab file _parse_propfind.php was added on branch MOODLE_19_STABLE on 2008-02-27 02:50:21 +0000 2008-02-27 02:49:21 +00:00
martinlanghoff 670fd620d8 file _parse_lockinfo.php was added on branch MOODLE_19_STABLE on 2008-02-27 02:50:21 +0000 2008-02-27 02:49:21 +00:00
martinlanghoff d47d910b13 file Server.php was added on branch MOODLE_19_STABLE on 2008-02-27 02:50:21 +0000 2008-02-27 02:49:21 +00:00
martinlanghoff 5874bee4d1 file README_MOODLE.txt was added on branch MOODLE_19_STABLE on 2008-02-27 02:50:21 +0000 2008-02-27 02:49:21 +00:00
martinlanghoff e74d5d31af file LICENSE was added on branch MOODLE_19_STABLE on 2008-02-27 02:50:21 +0000 2008-02-27 02:49:20 +00:00
martinlanghoff 9913f77ed1 file COPYING was added on branch MOODLE_19_STABLE on 2008-02-27 02:50:20 +0000 2008-02-27 02:49:20 +00:00
martinlanghoff ef201b4775 file AUTHORS was added on branch MOODLE_19_STABLE on 2008-02-27 02:50:20 +0000 2008-02-27 02:49:20 +00:00
skodak 36d07602b7 MDL-13158 choice/index.php only return values for choices in the current course. 2008-02-26 23:19:05 +00:00
skodak 2a154e890e MDL-10990 2) added event table index for calendar block/view 2008-02-26 22:46:32 +00:00
skodak 2bef07cd85 MDL-10990 4) added missing indexes into data module 2008-02-26 22:02:59 +00:00
martinlanghoff 5ab05fb15f MDL-11180 datalib: get_courses() - grab the course context as part of the select
This speeds up course & category listing enormously - cutting 2500 DB queries
for a site with 2500 courses. It's the power of the JOIN...
2008-02-26 21:51:16 +00:00
skodak 3236902cdd MDL-10990 5) eliminated reply related cap queries for guests and not-logged-in users because they can not post anyway, removed reply link for guests from news posts, they did not see Add discussion link already 2008-02-26 21:35:54 +00:00
skodak c1d1f1679e fixed occurred spelling; backport from HEAD 2008-02-26 21:25:03 +00:00
skodak 871836deb7 fixed broken lang string with incorrect " 2008-02-26 21:21:46 +00:00
skodak d242777c73 MDL-10990 1) fixed slow guest query with no mnethostid 2008-02-26 20:00:25 +00:00
skodak ea80372129 MDL-12927 installer should detect the magic quotes settings and undo the slashes if necessary 2008-02-26 19:50:06 +00:00
skodak ce896718cf MDL-6591 inverted checkbox for email notification; MDL-9657 - fixed date issues in drafts 2008-02-26 19:26:42 +00:00
skodak 13db6cc1e4 MDL-13623 proper version detection 2008-02-26 18:33:22 +00:00
nicolasconnault 997dc05600 MDL-13663 Docs updated. 2008-02-26 16:25:48 +00:00
nicolasconnault e588753478 Missing string 2008-02-26 13:02:00 +00:00
moodler 52ffec20aa MDL-13672 tag name function was not updated when tag/lib.php changed 2008-02-26 12:45:32 +00:00
sam_marshall c254ed8511 MDL-13660: Allow admin reports to have db tables, cron 2008-02-26 10:32:40 +00:00
nicolasconnault 8900fdf11d MDL-13663 Docs updated. 2008-02-26 09:56:30 +00:00
moodler 4dc9acd3db MDL-13569 Mark N patch for notice 2008-02-26 09:05:04 +00:00
moodler 2d08c94d20 MDL-12634 Fixed returning to index page 2008-02-26 08:42:21 +00:00
moodler 3bbc889109 MDL-12294 Fixed some strings 2008-02-26 08:34:04 +00:00
moodler eecbfe6e80 MDL-12294 Fixed some assignment strings 2008-02-26 08:26:23 +00:00
moodler 65be953852 MDL-12294 FIxed some wrong string 2008-02-26 08:06:56 +00:00
moodler c8842694e2 MDL-12294 Fixed a bunch of missing or wrong strings 2008-02-26 08:00:09 +00:00
scyrma 207828729e MDL-10639 - Removed "Export" column - export all available outcomes 2008-02-26 07:28:01 +00:00
moodler e5f7002f2f MDL-12294 fixed parentlang string 2008-02-26 07:27:23 +00:00
moodler 00f60cd1cb MDL-12248 custom_corners people can now use roles ;-) 2008-02-26 07:15:34 +00:00
moodler 659cae579e MDL-11809 Fixed broken headline 2008-02-26 07:01:23 +00:00
scyrma 8d0aa2442d MDL-13669 - Editing now only lists the manually added tags 2008-02-26 06:53:51 +00:00
scyrma 8389c869ee MDL-13404 - Missing part of previous commit : args to tag_get_related_tags have changed 2008-02-26 06:48:58 +00:00
scyrma 7bbd75dc6e MDL-13404 - Modification to all tag_get_tags_* calls needing an array & other improvements 2008-02-26 06:39:10 +00:00
skodak 186fa912d9 MDL-13623 fixed regression in PHP < 5.2.0 2008-02-26 06:25:23 +00:00
moodler 30c56fe4dc MDL-9367 Fix doc links for auth pages 2008-02-26 05:49:32 +00:00
scyrma 21c24eb64f MDL-13642 - re-added the proper query limits 2008-02-26 05:07:49 +00:00
scyrma a55d206ce7 MDL-13404 - Fix to a few queries, to prevent problems, as suggested by Eloy 2008-02-26 02:23:10 +00:00
skodak 578629dabe MDL-13626 fixed mssql compatibility issue in stats upgrade 2008-02-25 21:54:54 +00:00
skodak f362682471 MDL-13665 HTML editor is loaded as non-secure on the secure "Add new user" form, patch by Steve Bond 2008-02-25 20:38:52 +00:00
skodak 3dd102788f MDL-13661 - fixing incorrect use of array_shift 2008-02-25 20:21:18 +00:00
skodak a4166d5966 MDL-13237, MDL-13661 - fixing rcache regression, sorry :-( 2008-02-25 15:14:35 +00:00
skodak d7f64fa590 MDL-13483 adding noemailever info 2008-02-25 14:29:50 +00:00
skodak c5b4af2e5d MDL-13483 found two more native php mail() commands 2008-02-25 14:03:53 +00:00
skodak 3fa7bee5ce MDL-9657 advanced upload assignment draft tracking now available as activity setting 2008-02-25 13:33:26 +00:00
skodak e7bbc17fa2 MDL-9657 better dealing with drafts in assignment 2008-02-25 12:38:26 +00:00
skodak 2dc8d0e158 MDL-13653 droplow not ignoring ungraded items un sum aggregation 2008-02-25 12:16:56 +00:00
poltawski e9e0641372 MDL-9667 - convert_tree_to_html doesn't set css class properly if
$tab->linkedwhenselected is set

Patch from Jeff Graham
2008-02-25 11:56:43 +00:00
scyrma 6343168321 MDL-13624 - Use bigint(10), not bigint(11). This update doesn't change the schema on a site that's already installed. 2008-02-25 08:25:51 +00:00
scyrma 3c5591c51c MDL-13643 - Missing constant definition 2008-02-25 08:10:22 +00:00
scyrma 7afc1d07f4 MDL-13404 - Final fix to make it possible, for an tag-managing user, to rename a tag on the tag editing page. 2008-02-25 08:02:41 +00:00
skodak 137a439ac6 MDL-13644 permanent typos 2008-02-25 07:43:48 +00:00
moodler 4984973b93 MDL-13643 Use PARAM_TAGLIST 2008-02-25 07:16:14 +00:00
moodler 3ded4d989d Restoring type PARAM_TAGLIST MDL-13643 2008-02-25 07:15:33 +00:00
scyrma e9a0e86e70 MDL-13636 - Modification to the YUI autocomplete call, to show and use the right strings 2008-02-25 07:05:46 +00:00
moodler 10487fa6da MDL-13635 Managers can now edit tag name on the edit tag interface 2008-02-25 06:26:47 +00:00
moodler 58ea1ced21 Just moved a line of code 2008-02-25 06:25:54 +00:00
scyrma d6f8bc5b15 MDL-13639 - use tag_find_tags, MDL-13404 - improve documentation in the file, MDL-13636 - partial fix 2008-02-25 05:47:03 +00:00
moodler 4d6eee8d65 MDL-13632 Make sure official tags are in the right case. 2008-02-25 05:30:44 +00:00
moodler 6652a915eb MDL-13640 Manage tags link is now consistent on search and tag page 2008-02-25 05:02:25 +00:00
moodler 72876267d2 MDL-13638 Added a link to remove from interests, moved user/tag.php to tag/user.php and removed manage link from that list of links about the one tag 2008-02-25 04:56:18 +00:00
moodler 391cd0eb8e MDL-13637 Changed the check for siteadmin to a capability check (managetags) 2008-02-25 03:49:19 +00:00
scyrma dc62cb9ecc MDL-13404 - A site admin should always be able to edit a tag 2008-02-25 03:32:13 +00:00
scyrma f55102c501 MDL-13632 - Keep tag name case by default 2008-02-25 03:26:13 +00:00
scyrma f866f7be99 MDL-13404 - fix in tag_get_related_tags_csv 2008-02-25 03:23:03 +00:00
moodler 91e727f9ae Make blog_tags block get name and rawname MDL-13632 2008-02-25 03:20:35 +00:00
scyrma 1afe433c80 MDL-13634 - wrong _param type. Fixed 2008-02-25 03:15:59 +00:00
moodler f0f4244474 Latest tags 2008-02-25 03:15:51 +00:00
scyrma e278eb4830 MDL-13632 - keeptagnamecase needs to be "On", and with this change, it will work as expected. 2008-02-25 03:08:59 +00:00
scyrma dde95d41ec MDL-13630 - fix and improvement of the documentation. 2008-02-25 02:49:11 +00:00
scyrma 3310c48044 MDL-13404 - Several improvements to tag system (re-commit, with locallib.php). 2008-02-25 01:25:42 +00:00
scyrma 13ced7fb17 file locallib.php was added on branch MOODLE_19_STABLE on 2008-02-25 01:25:44 +0000 2008-02-25 01:16:46 +00:00
urs_hunkler 2bfb2f1f05 MDL-13418, MDL-13422, MDL 13597 :: corrected CSS issues 2008-02-24 21:15:05 +00:00
skodak 2ec2175f1e MDL-13625 improve perf and fixed groups code on forum index page 2008-02-24 20:14:30 +00:00
skodak 1f7448fc9d MDL-13303 fixed regression in forum recent activity 2008-02-24 20:04:52 +00:00
urs_hunkler da693b58b8 MDL-13453 :: corrected typo 2008-02-24 19:27:30 +00:00
skodak 4ba7849b64 MDL-13605 use userdate() instead of date() when printing next cron execution time 2008-02-24 13:29:10 +00:00
skodak 01911fa4b2 MDL-11494 MDL-13623 - support for secure and httponly cookies 2008-02-24 12:45:49 +00:00
skodak 7545ecdb86 MDL-13565 Tracking forum fixes 2008-02-24 10:52:40 +00:00
skodak 0ed6f1fc6b MDL-13274 label grouping identification 2008-02-24 10:32:13 +00:00
skodak 11274206e0 MDL-13520, MDL-13604, MDL-13620 stats - better simplified parent context join, administrator now counted too, optimised processing when no day logs present 2008-02-23 22:54:30 +00:00
arborrow f543e2acf7 added missing migratinggrades string (called from /backup/restorelib.php) 2008-02-23 20:20:30 +00:00
skodak 794fc9a9a3 MDL-13399, MDL-13614 fixed regression caused by last commit 2008-02-23 19:28:33 +00:00
skodak 1bd430af60 MDL-13615 course edit settings - improved metacourse compatible detection 2008-02-23 19:21:32 +00:00
skodak 910fa9c611 MDL-13613 added better detection for outdated course modinfo 2008-02-23 18:41:14 +00:00
skodak 11f95c99ad MDL-13525 role name aliases used in stat reports 2008-02-23 12:25:21 +00:00
skodak 17178a4ec3 MDL-13192 minor cleanup 2008-02-23 12:16:52 +00:00
skodak 54a252ba51 MDL-13603 fixed course_setup() minor problem with $course in $SITE 2008-02-23 12:12:47 +00:00
skodak 2771076cab MDL-13526 fixed site stats report language 2008-02-23 12:09:43 +00:00
skodak 80eb2b104b MDL-13532 removed incorrect coalesce+count combination 2008-02-23 11:54:34 +00:00
moodlerobot 11925184b7 Automatic installer.php lang files by installer_builder (20080223) 2008-02-23 03:27:48 +00:00
scyrma 4c264c7ff8 MDL-13594 - sorry again, didn't realize Petr had reverted the patch. This reverts the last commit..
i'll fix the mess on Monday.
2008-02-23 03:18:57 +00:00
scyrma a5725844ff MDL-13590 - commited the wrong file, sorry everybody. Here's the good one. 2008-02-23 03:12:52 +00:00
skodak 458544ed1d MDL-13404 reverted - missing file and other minor problems; backported from HEAD 2008-02-22 19:55:11 +00:00
skodak 6b1b51c095 MDL-13590 fixed fatal incorrect require 2008-02-22 14:53:46 +00:00
wildgirl 7541ac282a MDL-12759 help file grammar fix 2008-02-22 11:47:00 +00:00
scyrma 65c75c3ca7 MDL-13404 - Several improvements to the tag sub-system. 2008-02-22 10:17:56 +00:00
wildgirl 20dd99627c MDL-13116 lang string typo fix 2008-02-22 09:27:29 +00:00
wildgirl c070c4021e MDL-13013 lang string typo fixes 2008-02-22 09:02:30 +00:00
moodlerobot 48ab51a5ff Automatic installer.php lang files by installer_builder (20080222) 2008-02-22 03:39:22 +00:00
moodler 58dcf7ad08 Add a shortcut to assign roles page from the participants listing 2008-02-22 02:43:09 +00:00
moodler bda3445de9 MDL-13567 Some fixes to the updating of course settings for restricted modules 2008-02-21 15:15:49 +00:00
skodak 5ed1079984 MDL-13274, MDL-13215 - improved modedit shared forms, label supports groupmembersonly, removed extra button for labels 2008-02-21 14:11:18 +00:00
nicolasconnault 321fcad3ae MDL-11282 Implemented fix 2008-02-21 12:21:44 +00:00
skodak e731779d7a MDL-13559 discussion moving 2008-02-21 10:30:26 +00:00
skodak 9688dc4e27 MDL-13549 related these changes 2008-02-21 09:38:57 +00:00
skodak b8d4faed6b MDL-13549 major bugfixing and improvements in outline report 2008-02-21 09:35:31 +00:00
skodak 570d5b907d MDL-13549 major bugfixing and improvements in participation report 2008-02-21 09:32:15 +00:00
skodak e98a1b9ef3 MDL-13550 deprecated primary role concept 2008-02-21 09:28:59 +00:00
skodak e5a33e0082 MDL-13561 add cmid index to log table to speedup reports that deal with individual activities 2008-02-21 09:25:03 +00:00
nicolasconnault a919ee17b3 MDL-13465 Implemented Martin's solution. Merging from MOODLE_18_STABLE 2008-02-21 09:17:01 +00:00
skodak 20d03127ad MDL-13560 simplify deating with role name course aliases 2008-02-21 09:16:34 +00:00
skodak 2e14f03a63 MDL-13555 fixed typo - thanks Mitsuhiro Yoshida 2008-02-21 08:50:04 +00:00
skodak 1e095f1636 MDL-6591 moving the disable notification from fg prefs 2008-02-21 08:13:58 +00:00
moodler 7a67c58424 Initialise a variable to avoid a notice $displaypage 2008-02-21 06:13:05 +00:00
moodler fdc61d3e9f Latest tags file 2008-02-21 06:09:03 +00:00
moodler 246eb27d88 Avoided a notice for users not logged in 2008-02-21 06:08:30 +00:00
moodler 83ad6e2213 Just some robustness in checking for a variable 2008-02-21 06:01:31 +00:00
moodler 71ebb06911 Some better error checking to help us pick bad lang files 2008-02-21 05:59:50 +00:00
moodler 0746cf3e40 Reverted bad lang file MDLSITE-359 2008-02-21 05:51:48 +00:00
moodler c98be5a96f MDL-13554 Fix from Mark Nielsen for bad block backups 2008-02-21 05:34:10 +00:00
moodler d20c043713 MDL-11752 Upload user pictures (from Anthony and Inaki)
Verified with just major code formatting changes
2008-02-21 05:23:24 +00:00
moodlerobot 4f353aadf5 Automatic installer.php lang files by installer_builder (20080221) 2008-02-21 03:41:22 +00:00
scyrma 16b963e777 MDL-13553 - one more time : it's 'post' not 'blog' 2008-02-21 01:49:06 +00:00
scyrma d970b5a0b2 MDL-13553 - now correctly saving tags with itemtype 'post' 2008-02-21 01:39:31 +00:00
scyrma 6d643c9d6d MDL-13553 - upgrade path to correctly identify the type of each tag_instance 2008-02-21 00:49:59 +00:00
skodak 2c4bd0a648 MDL-6591 changing label to Disable notification in order to prevent confusion 2008-02-20 21:48:25 +00:00
stronk7 645beec03b Adding one new string, preparing for blogs backup. 2008-02-20 19:06:13 +00:00
skodak 0db6d34e6d MDL-12909 do not included users without idnumber in xml grade export preview 2008-02-20 18:28:50 +00:00
skodak 6b465e1867 MDL-6591 Optional assignment graded email notification - based on patch by Gary Anderson 2008-02-20 17:49:58 +00:00
pichetp 5420407e1e Merging from HEAD MDL-13457 Validation when moving to another category 2008-02-20 13:00:36 +00:00
skodak 9660a6ddf2 MDL-4667, MDL-4112 switching order of columns in course-userid log table index in order to please mysql 2008-02-20 09:52:46 +00:00
skodak 8ae9a7dffc MDL-4667, MDL-4112 switching order of columns in course-userid log table index in order to please mysql 2008-02-20 09:31:44 +00:00
skodak f499bdf505 MDL-13546 fixed table name typo - patch by Samuli Karevaara 2008-02-20 08:40:04 +00:00
moodler d0c276727d Prevent a notice with bad rss feeds 2008-02-20 08:10:38 +00:00
moodler 3eb9c93999 MDL-13544 Removed logging of cleanremoteaddr from logs 2008-02-20 07:01:18 +00:00
moodler 86e44df6b0 SMall notice fix for $showing 2008-02-20 06:51:45 +00:00
moodler d30f1d1ad9 Fixing a trivial notice 2008-02-20 06:18:52 +00:00
moodler f3aac02c26 MDL-13542 More return value checking 2008-02-20 06:15:16 +00:00
moodler 2116a8a428 FIxed some notices MDL-13542 2008-02-20 06:12:09 +00:00
moodler f8471a1a96 MDL-13541 Error checking on parameters 2008-02-20 06:07:18 +00:00
moodlerobot bebd1968b2 Automatic installer.php lang files by installer_builder (20080220) 2008-02-20 03:38:26 +00:00
moodler ed3b8f3d0c MDL-12277 Merged from 1.8 - fix for message sending in other languages 2008-02-20 02:32:03 +00:00
tjhunt 978af5c28b Fix dangerous comment. (MDL-13536) 2008-02-19 17:14:10 +00:00
tjhunt 1cc44fbf90 MDL-13448 - missing the global $db statement. Fix thanks to Samuli Karevaara. 2008-02-19 16:21:35 +00:00
tjhunt 17e4bb1533 MDL-13390 - Wrong links in quiz notification emails 2008-02-19 16:19:56 +00:00
tjhunt aede0ebcc0 MDL-13530 - Improve words used in the gradebook plugin selector dropdown menu 2008-02-19 15:00:00 +00:00
skodak 5f65bc5b94 MDL-12538 skip to main does not work if page div contains other attributes 2008-02-19 13:33:21 +00:00
skodak 4a906d7333 MDL-9931 adding go button to delete 2008-02-19 13:12:55 +00:00
skodak 281ec00e8f MDL-11586 rewritten file name collision handling in upload manager - files without extension, fixed increments if file name contains _123 already 2008-02-19 13:03:01 +00:00
stronk7 d685fe5705 Added one new string to installer files. MDL-13489 2008-02-19 11:47:35 +00:00
skodak c26f59b6fc MDL-11816 fixed wiki export with quick hack 2008-02-19 11:04:48 +00:00
skodak 9e931faa98 MDL-11816 fixed wiki export with quick hack 2008-02-19 10:59:21 +00:00
skodak f6dde04372 MDL-11843 deleting of activities directly from calendar is dangerous/confusing 2008-02-19 10:45:14 +00:00
skodak e4fd076246 MDL-12862 ewiki source code converted to utf8, patch by Tatsuya Shirai 2008-02-19 10:04:08 +00:00
urs_hunkler 5407ff018b Merged from 1.8 :: Added h1 - h4 fontsizes. Disabled the Chameleon engine by default. Wrote a short hint about the intearactive editing in the README. 2008-02-19 07:52:37 +00:00
moodler 6fd30e78c7 MDL-13489 Fixed wording 2008-02-19 06:57:10 +00:00
moodler d33eb04648 MDL-13489 Applied patches from Anthony with minor changes 2008-02-19 06:49:41 +00:00
scyrma a81b97bf9b MDL-13404 correct typo 2008-02-19 05:13:41 +00:00
scyrma a5cf0536aa MDL-13404 - cleanup code style 2008-02-19 05:12:25 +00:00
skodak 827ea538e5 MDL-12382 allow admins to access any course - including courses where they have guest role and course does not allow guests 2008-02-18 23:39:28 +00:00
skodak adb4cdc5a8 MDL-12382 allow admins to access any course - including courses where they have guest role and course does not allow guests 2008-02-18 23:33:35 +00:00
skodak ff90e9be5f MDL-13302 gradebook data deleted now in remove_course_contents() - it makes better sense to have it there 2008-02-18 23:09:43 +00:00
skodak acb05e1d85 MDL-13302 gradebook data deleted now in remove_course_contents() - it makes better sense to have it there 2008-02-18 23:07:44 +00:00
pichetp a19e31a1d6 cleaning // 2008-02-18 20:40:41 +00:00
pichetp a1b3e19dd4 merging MDL-13419 removing space before input html element and cleaning of diagnostic
message
2008-02-18 20:35:52 +00:00
skodak 8905e7b645 MDL-13399 prevent ambiguous column names in get_my_courses 2008-02-18 20:13:02 +00:00
danmarsden b28a21b88b MDL-13478 choice results using too much memory. - improves performance when not showing the unanswered column. - also tidies up a few checks which aren't needed. Merged from HEAD 2008-02-18 19:53:06 +00:00
skodak 35e8af0edf MDL-12942 extra credit implemented in sum aggregation type; fixed sum aggregation; fixed division by zero in item grade min==max 2008-02-18 19:10:15 +00:00
moodler a607365fc8 Swapped the two save buttons MDL-6826 2008-02-18 14:22:30 +00:00
skodak ce07f4dc34 big big sorry, forgotten old debug code that sends all mails to null 2008-02-18 12:34:16 +00:00
stronk7 48c52be77a Add support to specify text sizes via formats. MDL-13505 2008-02-18 10:52:32 +00:00
moodlerobot c4e643d335 Automatic installer.php lang files by installer_builder (20080218) 2008-02-18 03:37:00 +00:00
moodler 1ba4c3e132 Add some information about the next stats run to the cron output 2008-02-18 03:12:57 +00:00
moodler eed0327fd9 MDL-13498 Removed path from display of plugins. 2008-02-18 02:10:14 +00:00
moodler e8f4d7e395 Removed some required files that are not needed 2008-02-18 02:08:04 +00:00
skodak 9159c64a7d MDL-11811 OpenDocument is correct name for file format 2008-02-17 19:47:48 +00:00
skodak 1f30b89fd8 MDL-11811 OpenDocument is correct name for file format 2008-02-17 19:47:25 +00:00
skodak 985ea691ac MDL-13445 linked activity deleting improvements 2008-02-17 19:11:29 +00:00
skodak 205e71d01a MDL-12934 temporary fix for grade items of activities without proper course module record 2008-02-17 19:03:15 +00:00
skodak 55534cfdd2 MDL-12934 temporary fix for grade items of activities without proper course module record 2008-02-17 18:37:54 +00:00
skodak 832ca9bd1b MDL-13026 improved sql for course totals on grader report 2008-02-17 17:17:48 +00:00
skodak c2f2f33541 MDL-13231 outcomes aggregation off by default now 2008-02-17 16:05:16 +00:00
skodak d29877ac8c MDL-13269 fixed regrading of activity raw grades 2008-02-17 15:59:44 +00:00
skodak 44ceee90e9 MDL-13437 Grader report: Showing idnumber column shifts controls into wrong columns 2008-02-17 14:55:40 +00:00
skodak bd9a7b89a7 MDL-13477 main version bumped to .02 - three decimal points did not work for Eloy :-( 2008-02-16 22:26:54 +00:00
skodak 1b268daa33 MDL-13192 major stats cleanup patch - see tracker for more details 2008-02-16 18:32:23 +00:00
skodak 490c14fe8a MDL-13459 fixed hardcoded mdl_ prefix 2008-02-16 11:35:54 +00:00
skodak 53726ba409 MDL-13241 adding forgotten table scale_history into upgrade code 2008-02-16 11:20:15 +00:00
nicolasconnault ee6689b003 MDL-13459 Didn't use the patch, which puts its finger in too many pies. Instead just implemented a quick-fix, a temporary get_assignable_for_switchrole() function. It only affects the switchroles menu 2008-02-15 16:35:19 +00:00
nicolasconnault 29252268ca MDL-13459 Didn't use the patch, which puts its finger in too many pies. Instead just implemented a quick-fix, a temporary get_assignable_for_switchrole() function. It only affects the switchroles menu 2008-02-15 16:35:19 +00:00
skodak bd09b95b81 undefined discussion timestart on frontpage 2008-02-15 15:27:17 +00:00
skodak 3db9b3c2b1 MDL-13484 peak memory used perf info added 2008-02-15 11:31:38 +00:00
skodak 30914826c9 MDL-13483 new hidden $CFG->noemailever setting to block sending of all emails - for dev sites only, set in config.php if needed 2008-02-15 10:45:36 +00:00
skodak 32d746f1d7 fixed warning when module code missing 2008-02-15 10:38:37 +00:00
skodak 02bb190c1d MDL-13482 fixed pg issue with group by 2008-02-15 10:30:38 +00:00
mudrd8mz 11a30670cb MDL-13480 swapped strings in help 2008-02-15 09:36:43 +00:00
skodak fc98a031c3 $cours typo fixed 2008-02-15 08:32:48 +00:00
donal 5afa13193d MDL-12492: Thanks to Nigel McNie, this addresses a problem which prevents hosts from re-keying when their keys expire. 2008-02-15 08:32:24 +00:00
donal 14715db3ee Write to the log when the SSL key is created 2008-02-15 08:10:52 +00:00
donal 28febd2534 Remove unneeded mnet_host2service records 2008-02-15 08:04:22 +00:00
moodler 282e599572 UPdated readme to be consistent with new version
Languages all seem to be fixed upstream
2008-02-15 06:49:30 +00:00
moodler 626b76b38f Added back some forced conversion in _adodb_column_sql() (not the same patch as before)
Related to SC#259
2008-02-15 06:44:22 +00:00
moodler 4dd6dd7155 Reapply MDL-12378 to current version for XHTML compliance 2008-02-15 06:34:16 +00:00
moodler a41ba92752 Upgrading to 4.98 as per MDL-13474. Works for me! 2008-02-15 06:03:58 +00:00
moodlerobot c9d4eba186 Automatic installer.php lang files by installer_builder (20080215) 2008-02-15 03:39:23 +00:00
moodler 9988024f6e Just tidying up source 2008-02-15 02:42:56 +00:00
moodler 1fe0ed0b7d Fixed MDL-13476
- discussions can now be moved
 - URL for return is now correct (discuss.php not discussion.php)
2008-02-15 00:50:10 +00:00
stronk7 3ecc34b2d5 Messages backup improvement. MDL-13473 2008-02-14 23:32:43 +00:00
skodak 186c4de5ac MDL-13303 fixing missing group icons in forum 2008-02-14 16:36:12 +00:00
skodak 7a26b64a13 MDL-12945 fixed sql purity to make pg happy, fixed bug in user list of active chats 2008-02-14 16:11:58 +00:00
nicolasconnault 43a4458850 MDL-13430 I can only see this issue in the assignment submissions page. Merging from MOODLE_18_STABLE 2008-02-14 07:25:11 +00:00
moodler 6fcb1a4e2d MDL-13152 from Dariem Garces
Groups that don't exist will be created on the fly
2008-02-14 03:12:00 +00:00
skodak 66714f7c98 MDL-13303 - forgot to change warnings to developer mode only MFC 2008-02-13 17:17:26 +00:00
skodak 5623276da8 MDL-13450 and MDL-13303 - sorry for changing forum API so late, but it was needed; major perf improvement for forum; fixed printing of user pictures 2008-02-13 17:01:41 +00:00
skodak af9ce11eec this function should work for all modules but forgot to remove 'quiz' from sql. - backporting from HEAD, I hope that is ok ;-) 2008-02-13 16:30:12 +00:00
skodak f34dfc143f MDL-13375 fix for duplicate itemnumbers in outcome items 2008-02-13 09:47:22 +00:00
skodak 8a881c78de MDL-13375 reverting, the bug is somewhere else 2008-02-13 09:22:26 +00:00
nicolasconnault 4618409cfd MDL-13375 Applied Dan's patch, and patched up assignment/lib.php accordingly. Multiple outcome grading from assignment is now possible. 2008-02-13 08:49:52 +00:00
nicolasconnault 6644a4f4e5 MDL-13375 Fixed the bug in modedit.php 2008-02-13 08:14:40 +00:00
donal 916071c464 Ensure that the wwwroot has been supplied with a http:// or https:// prefix 2008-02-13 03:06:56 +00:00
pichetp a01d104cdf merging MDL-12421 rounding 2008-02-13 02:09:14 +00:00
pichetp 5710f8575c merging MDL-12388 return url and MDL-12421 rounding problem 2008-02-13 01:30:13 +00:00
donal 0962e21070 MDL-12492: This patch addresses a problem which prevents hosts from re-keying when their keys expire. 2008-02-12 22:27:51 +00:00
urs_hunkler 0594a0aaee MDL-13421 :: corrected left padding in admin block - second approach 2008-02-12 21:26:49 +00:00
poltawski 624c7abf1a MDL-13337 - Add confirmation before deleting outcomes (and POST for action..) 2008-02-12 21:13:25 +00:00
urs_hunkler 0871252e6b MDL-13444 :: removed the jQuery library and use direct JavaScript instead. That's much faster.
MDL-12078 :: Changed them calles from themewww to httpsthemwww (MDL-12078). MDL-13421 :: corrected left padding in admin block
2008-02-12 21:12:46 +00:00
nicolasconnault 311ea49f58 MDL-13397 Implemented the requiredentries parameter (previously not implemented). This includes a warning message and an SQL restriction on entries fetched for view.php 2008-02-12 15:55:34 +00:00
nicolasconnault 111c351849 MDL-13397 Implemented the requiredentries parameter (previously not implemented). This includes a warning message and an SQL restriction on entries fetched for view.php 2008-02-12 15:06:52 +00:00
nicolasconnault aebdc0bdb3 MDL-13440 fixed typo 2008-02-12 13:45:15 +00:00
thepurpleblob 91fa457ea2 Added check for <text> fields that contain markup (an error!) 2008-02-12 11:55:33 +00:00
skodak c2d04f05a0 MDL-9657 assignment submission finalisation now independent from grade 2008-02-12 10:50:35 +00:00
skodak a63215000d MDL-11920 prevent db traffic caused by user images 2008-02-12 08:19:50 +00:00
scyrma 6fec177f09 MDL-10639 - fix problem with buttons when there are no outcomes. 2008-02-12 07:59:24 +00:00
ethem a1cc49c6b1 Merged from MOODLE_18_STABLE 2008-02-11 15:39:13 +00:00
scyrma fa868b8a3d MDL-10639 - now using moodleforms 2008-02-11 02:19:37 +00:00
moodlerobot 78298a17dd Automatic installer.php lang files by installer_builder (20080209) 2008-02-09 03:35:43 +00:00
poltawski 4890c92d15 MDL-13262 - role related user filters were assuming roleids because array_merge
was stomping on keys. Patch by Dennis Rochford
2008-02-08 12:14:39 +00:00
poltawski a3b2abed80 MDL-13354 - wrong capability checked for view report link 2008-02-08 09:57:07 +00:00
moodler e26612356b Fixed context in has_capability call MDL-13378 2008-02-08 03:58:45 +00:00
moodlerobot 40a15c546e Automatic installer.php lang files by installer_builder (20080208) 2008-02-08 03:30:27 +00:00
poltawski f8cfb1230f MDL-13339 - ensure we don't continue the restore process if there is
no course header in the backup file. This bug was causing blank course
records to be created when users tried to restore a non-moodle backup file
such as a scorm file.
2008-02-07 18:48:53 +00:00
ethem f461eacc8e Cron handles all expired unenrolments. It is time to use own enrolment method when calling funcs enrol_into_course, role_assign.
Zend Studio Warning: Assignment in condition (line XX), Solved, one more ()

Merged from MOODLE_18_STABLE
2008-02-07 16:27:50 +00:00
moodler 67574a93c5 Fix subject lines and corrupted emails from messages MDL-13364 2008-02-07 05:19:01 +00:00
gbateson a6a781458e MDL-13328 correct the counting of attempts when clickreporting has been enabled 2008-02-07 04:14:21 +00:00
moodlerobot 32e854e51f iAdded lang 2008-02-07 03:32:09 +00:00
moodlerobot 713f0c63dd file installer.php was added on branch MOODLE_19_STABLE on 2008-02-07 03:32:09 +0000 2008-02-07 03:29:58 +00:00
moodlerobot ab147736c1 Automatic installer.php lang files by installer_builder (20080207) 2008-02-07 03:27:24 +00:00
nicolasconnault 2a5e3d244b MDL-6826 Removed the optional_param lines at the top, and set the submit buttons to PARAM_RAW. Also changed !empty() to isset(); Merging from 1.8 2008-02-06 10:24:40 +00:00
ethem d8347a0ab7 MDL-10181 User Management Improvements: Cron unenrolment of manual should takes place in the main cron.
It is time to use own enrolment method when calling funcs enrol_into_course, role_assign, role_unassign.

Zend Studio Warning: Assignment in condition (line XX), Solved, one more ()
Assignments in a conditional statement are sometimes the result of a typo.
In many cases, instead of the assignment operator =, the equality operator ==
should be used. When comparing a variable and a non-variable expression,
it is common practice to put the variable on the right-hand side of the equality
operator, so that if the equality operator is erroneously replaced with the
assignment operator, PHP will report a parse error immediately.
This helps you avoid a big subset of this class of bugs.
2008-02-06 08:07:03 +00:00
scyrma c9c2c21b84 MDL-13348 - fix to get the right order for countries with names starting with unicode characters 2008-02-06 06:17:10 +00:00
moodler 4f8ac26792 Fixed some apostrophes 2008-02-06 05:55:21 +00:00
scyrma 8f5ef63f5d Fix for MDLSITE-345 and correction to MDL-12565. This doesn't solve it all
though : there will still be "orphans" tags in table tag.
2008-02-06 03:34:14 +00:00
skodak 9e10147777 MDL-10132 improved random glossary blocks - now uses modinfo too + fixed some notices 2008-02-05 23:33:44 +00:00
skodak 58da996994 MDL-11282, MDL-11643 - removing notice() from grade_update() - we can not stop execution there! 2008-02-05 23:10:27 +00:00
skodak 9c76f3b45e MDL-13345 disabled module not present on backup form anymore 2008-02-05 22:55:26 +00:00
skodak ffd15ec8f6 MDL-13155 once more - reverting mod/xx/index.php to use get_all_instances_in_courses() again, should be now nearly the same as in 1.8.x ;-) 2008-02-05 21:39:52 +00:00
skodak f1bd9b5ecf MDL-13155 reworked get_all_instances_in_course() and get_all_instances_in_courses(), based on patch by Tim 2008-02-05 21:34:08 +00:00
stronk7 d916897125 Some old backups can contain empties in user->picture, fix them before insert. 2008-02-05 20:28:29 +00:00
skodak ef7b0cc319 MDL-13292 <Vspan> tag on the bottom of the wiki HTML Editor fixed 2008-02-05 19:51:49 +00:00
andreabix 03daf74013 Added missing classes
.rolecap .inherit.capdefault, .rolecap .allow.capdefault {
  background-color:#E3DFD4;
}

#admin-roles-override .capcurrent {
  background-color:#E3DFD4;
}
2008-02-05 18:53:54 +00:00
skodak 1eff062408 MDL-10796 fixed wiki deprecated passing by reference 2008-02-05 18:41:43 +00:00
poltawski c472c4bb50 MDL-13314 count_role_users was showing different count to those returned from
get_role_users(), based on patch from Patrick Pollett
2008-02-05 17:18:10 +00:00
poltawski f296008fe5 MDL-13235 - bulk user action removing users etc was buggy 2008-02-05 15:22:07 +00:00
skodak 782532955d MDL-12518 fixed restore of grade calculations 2008-02-05 13:11:09 +00:00
skodak f6ea800797 MDL-12938, MDL-12937 - unenrol fixes - can not unenrol if can not unassign all users roles in course, do not show self unenrol if enrolment comes from parent context, fixed rturn value from get_user_roles; based on patch by Eric Merrill 2008-02-05 12:58:59 +00:00
jamiesensei 1fe2c24de3 MDL-13298 "Question bank displays always page 1 after adding new question" this was caused because the question creation page was redirecting back to the question back edit page and telling it to change to the category of the question that was just saved. This was causing the edit page to go back to page 0 of the new category. Now we only go back to page 0 if the category has actually changed. 2008-02-05 12:08:38 +00:00
skodak 0e47869e99 MDL-3942 fixed warnings 2008-02-05 11:48:45 +00:00
skodak 6708fa8b98 MDL-12795 length specification in configtext constructor instead of css 2008-02-05 11:42:51 +00:00
jamiesensei c6a4075609 MDL-13005 When trying to restore a course when you have more then one quiz and you choose only one quiz, the restore fails when trying to create categories and questions. Fixed this by ignoring module context level q categories in backup when the course module has not already been restored. 2008-02-05 11:24:19 +00:00
skodak 9430296726 MDL-3942 - various forum scoring types - patch by Anthony Borrow 2008-02-05 11:21:36 +00:00
skodak ddc33af359 MDL-13335 rewritten caching in forum cron 2008-02-05 10:51:20 +00:00
skodak 907a481674 MDL-13334 get_role_access() static cache in cron only 2008-02-05 10:39:59 +00:00
nicolasconnault 7021c8441d MDL-12158 Applied Matt's patch, merging from 1.8 2008-02-05 10:39:29 +00:00
nicolasconnault 50d0bb2e24 MDL-12888 Removing redundant form 2008-02-05 10:29:31 +00:00
nicolasconnault 56352ac96f MDL-12497 Disabled the "override site defaults" checkbox for admin page, and removed redundant help buttons 2008-02-05 10:26:13 +00:00
jamiesensei 4811aacb5a MDL-13034 fixes "insertion of question / category ids at the CONTEXT_MODULE level does not respect whether the instance of the module has been selected for backup" and cleans up code a little. The last commit for this issue did not include any changes. 2008-02-05 10:16:40 +00:00
nicolasconnault 2008bbe5de MDL-10451 Fixed HTML errors, merging from 1.8 2008-02-05 09:53:07 +00:00
scyrma 816219141b MDL-10639. Initial commit of an import/export system for outcomes (and associated scales). 2008-02-05 08:38:44 +00:00
gbateson aad4873cc6 MDL-10451 remove extraneous closing </b> tag from lang/en_utf8/help/hotpot/outputformat.html 2008-02-05 04:24:24 +00:00
gbateson 369865830c MDL-13048 fix undefined course id when importing a Hot Potatoes quiz into the Lesson module 2008-02-05 04:09:58 +00:00
moodler ea5a1c3bf6 Merged logic fix for MDL-6826 2008-02-05 03:17:42 +00:00
skodak ecf7fad11a MDL-13038 update_record now works with boolean false 2008-02-04 23:51:40 +00:00
urs_hunkler f3c789cd94 merged from 1.8 :: MDL-13329 :: Buttons in the sidblocks looked quite different in the different browsers. Changed several CSS aspects to make them look more similar, specially added IE "hacks". 2008-02-04 20:59:20 +00:00
nicolasconnault 63fc9bd4fd MDL-13087 Adding a page break before the first user report 2008-02-04 14:29:11 +00:00
nicolasconnault 74f7fe1b30 MDL-13050 Now showing a link to the gradebook for the hotpot, assignment, quiz and lesson module grading pages, with the right capabilities etc. 2008-02-04 13:52:49 +00:00
nicolasconnault ad619206e1 MDL-6826 Implementing Tatsuya's patch 2008-02-04 12:59:53 +00:00
nicolasconnault d7df0a5d84 MDL-6826 Removed the word "changes" from the two buttons 2008-02-04 12:17:49 +00:00
nicolasconnault 1ee448b935 MDL-13101 Added the Reload button; inserted the 3 tables into one large table so they appear side-by-side; Reduced the font size 2008-02-04 10:58:24 +00:00
nicolasconnault 62556bfefa MDL-13101 Moved the "unattended upgrade" checkbox to the plugin check page 2008-02-04 10:06:49 +00:00
scyrma 087f51bde0 doc & typo fixes 2008-02-04 06:44:49 +00:00
scyrma 7677bef81e MDL-13060 - removing old entries fro VA and CD 2008-02-04 00:48:09 +00:00
stronk7 cebf5d77a3 Save one extra query per user being restored. $newid contains the user id along all the iteration. 2008-02-04 00:04:02 +00:00
stronk7 1b053c41a4 Now custom profile fields and user tags are restored. MDL-6856
.CVS: ----------------------------------------------------------------------
2008-02-03 23:51:20 +00:00
stronk7 4512e31e51 Only insert outcome_course if it doesn't exist. MDL-13308 2008-02-03 18:42:48 +00:00
stronk7 d6ab69f11b Add some outcomes missing strings. MDL-13318 2008-02-03 18:31:57 +00:00
stronk7 0088748449 Oops, commenting some debug lines I left in my previous commit. 2008-02-03 18:24:56 +00:00
stronk7 71b750ed86 Fix restore of outcomes, resusing them when possible. MDL-13309 2008-02-03 18:20:36 +00:00
skodak b632c1b6c9 MDL-13320 typo in lang/en_utf8/forum.php, found by Mitsuhiro Yoshida 2008-02-03 17:56:59 +00:00
skodak 022747163e MDL-13319 skip disabled modules and blocks in cron 2008-02-03 17:27:32 +00:00
urs_hunkler 038b5bd550 Chameleon restrictions info added. 2008-02-03 17:07:05 +00:00
urs_hunkler 270c2f9a0d MDL-13268 :: CSS cleanup and moved from the end of the file to the other admin CSS definitions 2008-02-03 16:57:25 +00:00
urs_hunkler c1abb7586f Merged from 1.8 :: MDL-13268 :: CSS added 2008-02-03 16:54:53 +00:00
stronk7 e2f8d8a212 Detect used scales in course outcomes too. MDL-13307 2008-02-03 16:39:21 +00:00
skodak a3b9814156 MDL-13317 use cached system context in get_user_access_sitewide and when rebuilding paths 2008-02-03 16:21:35 +00:00
skodak b79595db64 MDL-13316 added static cache for time zone info 2008-02-03 16:00:27 +00:00
urs_hunkler 38d6367287 removed trailing space 2008-02-03 15:59:18 +00:00
urs_hunkler 936eeefdcb MDL-13181 :: added to handle changed xhtml
.glossarypost div.concept h3,
.glossarypost.continuous .concept {
  display: inline;
}
2008-02-03 15:55:29 +00:00
skodak ea3c67c5cb MDL-13312 fixed notices caused by previous commit, patch by Gary Anderson 2008-02-03 12:52:29 +00:00
skodak 27ea59826f MDL-13310 added static cron cache into format_text() to prevent some db access 2008-02-03 10:55:24 +00:00
skodak c0207b1ba7 MDL-13306 option to skip logging of blocked emails in forum cron 2008-02-03 10:35:23 +00:00
stronk7 e0acc94f9f Add missing description to grade_outcomes backup. 2008-02-03 10:32:10 +00:00
skodak fc637ec2c1 MDL-13305 , MDL-13304 - fixed memory leak in forum cron and saved 10% of queries when printing user pictures in mails 2008-02-03 10:20:31 +00:00
moodler 04d79b7a0e Automatic installer.php lang files by installer_builder (20080203) 2008-02-03 03:37:11 +00:00
stronk7 9ddb243f13 Add some browser output when restoring a lot of users 2008-02-03 00:46:32 +00:00
stronk7 8f92c1f78b Now we are reading user_profile_fields and user_tags + some small fixes on roles. MDL-6856 2008-02-02 23:58:09 +00:00
skodak 01eaffcf75 MDL-12901 undo weird IE6 hack on bulk and manage users filter form 2008-02-02 22:59:33 +00:00
skodak f995637ed3 MDL-12710 no wrapping of user selection columns in user bulk form 2008-02-02 21:52:43 +00:00
skodak 14f79d5a2f MDL-12900 prevent fatal errors when incorrect scale id specified in grade_item 2008-02-02 21:33:20 +00:00
skodak ccd48da98d MDL-13147 fixing undefined ungraded array and its indexes 2008-02-02 21:23:02 +00:00
stronk7 82ecf200b7 Respect $showfeedback when deleting groups and groupings. 2008-02-02 20:41:55 +00:00
skodak 0e87d49e09 MDL-13257 fixed problems when section 0 does not exist yet 2008-02-02 18:55:35 +00:00
skodak 98cb031e96 MDL-13239 improved smtp bulk setting based on feedback from Gary 2008-02-02 16:22:15 +00:00
moodler 7e49db8100 Automatic installer.php lang files by installer_builder (20080202) 2008-02-02 03:46:03 +00:00
stronk7 fe5f3d08ac Change some conditions to properly check if the custom-profile-field really is using a duplicate shortname. MDL-13288 2008-02-01 17:17:51 +00:00
skodak ede88ab3be MDL-12945 changing get_fast_modinfo() section property to sectionnum to prevent conflicts with real cm->section; full recent activity speedup when printing user pictures in forum 2008-02-01 14:09:27 +00:00
exe-cutor 3d4646688f Corrected some typos and improved instructions 2008-02-01 13:36:54 +00:00
exe-cutor 59780d2e8f Added Shibboleth integrated WAYF service (forgot to add these files) 2008-02-01 12:58:08 +00:00
skodak 38f3f5f1a1 MDL-12945 modfullnames typo 2008-02-01 09:11:52 +00:00
skodak c2508a1608 MDL-12945 fixing mod indexes broken by previous commit 2008-02-01 09:08:40 +00:00
exe-cutor 0bc5c5f8c6 Added new text strings for integrated Shibboleth WAYF service 2008-02-01 08:34:08 +00:00
exe-cutor f32f73c0a6 file login.php was added on branch MOODLE_19_STABLE on 2008-02-01 12:58:08 +0000 2008-02-01 08:30:17 +00:00
exe-cutor 765235a121 file index_form.html was added on branch MOODLE_19_STABLE on 2008-02-01 12:58:08 +0000 2008-02-01 08:30:17 +00:00
exe-cutor 0975cc6e50 Added integrated Shibboleth WAYF service on alternative login page
Updated README
2008-02-01 08:30:16 +00:00
skodak ab3f9fc74e MDL-13220 rebuild course cache after ajax edits - patch by Myles Carrick 2008-02-01 08:22:25 +00:00
skodak c102e3aade MDL-7547 yet more speed improvements in rebuild_course_cache() 2008-02-01 08:15:06 +00:00
skodak 8d8105fdf7 MDL-13214 rebuild_course_cache fixes and speed improvements 2008-02-01 07:47:47 +00:00
skodak 4ce19d978c MDL-12945 disabled mods are not returned from get_course_mods() anymore, the results are used in scheduled backup and other parts that do not expect disabled mods 2008-02-01 07:32:34 +00:00
skodak ab62d48e88 MDL-13239 smtp bulk sending 2008-02-01 07:04:25 +00:00
moodler 6242b7c12b Some cleanups on the error page
- avoid spammers
 - emit proper 404 response
 - use support address if configured
2008-02-01 05:48:43 +00:00
moodler e629fc4ed0 Fixed a notice when a feed dies 2008-02-01 03:05:34 +00:00
fmarier bb4bab500b MDL-13244 - weblib - Add 'summary' attribute to print_table() 2008-01-31 22:21:52 +00:00
mjollnir_ 34f06f743b MDL-12440: take out auth title and description into base class, plugins can override. updated places that use get_string to call these methods. Credit: Luke Hudson <luke@catalyst.net.nz> 2008-01-31 22:01:38 +00:00
gbateson cfce2efbf3 fix for MDL-13174 : replace calls to html_entity_decode() with hotpot_charcode_to_utf8() because html_entity_decode is broken in PHP 4 2008-01-31 07:26:08 +00:00
moodler 1659924e8d MDL-13260 Fixing misplaced variable (notice) 2008-01-31 07:03:33 +00:00
moodler 88e2f1c4bc MDL-13263 2008-01-31 05:49:46 +00:00
moodler e21d53b06b Automatic installer.php lang files by installer_builder (20080131) 2008-01-31 03:46:40 +00:00
moodler 42e9c00f18 MDL-13245 Add a check for viewall 2008-01-31 01:28:29 +00:00
scyrma 08576b0d0a MDL-11594 - Changes in image location broke chameleon 2008-01-31 00:37:06 +00:00
scyrma 740e1c8bd7 file open.gif was added on branch MOODLE_19_STABLE on 2008-01-31 00:37:06 +0000 2008-01-31 00:35:27 +00:00
scyrma 7f5e32ce55 file item.gif was added on branch MOODLE_19_STABLE on 2008-01-31 00:37:06 +0000 2008-01-31 00:35:27 +00:00
scyrma a227d4c0d9 file closed.gif was added on branch MOODLE_19_STABLE on 2008-01-31 00:37:06 +0000 2008-01-31 00:35:27 +00:00
stronk7 013df172c0 Quick fix for not working glossary index. Related to MDL-12949 that needs more improvements. 2008-01-31 00:19:04 +00:00
poltawski 9724b07ebc MDL-13255 - hidden activity capability check was wrong 2008-01-30 21:00:00 +00:00
poltawski 53938064c5 MDL-13255 - hidden activity capability check was wrong, but require_login()
handles it for us when passsed $cm
2008-01-30 20:57:37 +00:00
poltawski 0a3158d669 MDL-13221 - doing wrong capability check for hidden activites. But we
don't need it at all as require_login() with the $cm argument does the
check for us
2008-01-30 20:41:52 +00:00
tjhunt 9e1a55242f MDL-13110 - Manually grading random questions does not work. Fix thanks to Ken Burres. 2008-01-30 18:18:34 +00:00
mchurch f98f1a922e MDL-13252 Fix context to always use course context, rather than instance->page. 2008-01-30 16:42:22 +00:00
tjhunt 4334697e9e MDL-13253 - Should use separate language strings for user and module idnumber. 2008-01-30 16:33:41 +00:00
tjhunt 000b78f3f0 MDL-13238 - Optionally show the user's idnumber in the grader report. 2008-01-30 15:57:56 +00:00
scyrma ea4e7a0226 converted file from dos encoding to unix encoding 2008-01-30 07:27:15 +00:00
moodler 30b646c765 Don't show grades link when $course->showgrades is off MDL-13245 2008-01-30 06:55:55 +00:00
scyrma bcdb377366 MDL-13060 - upgrade path for users (re)created from backup files 2008-01-30 05:23:39 +00:00
stronk7 06e22959d1 Now user profile fileds and user tags are included in backups. Part of MDL-6856 2008-01-30 01:09:40 +00:00
moodler d9ab63d7e9 Applied patch from Yazel Hernandez to fix XHTML strict MDL-13230 2008-01-30 00:34:33 +00:00
danmarsden 3b32b74f43 MDL-3721 Wiki adds lots of invalid tags to the top of the page in every edit. patch from Grigory Rubstov 2008-01-29 20:51:36 +00:00
skodak b8a2e4a095 MDL-13237 rceche limiting through intcachemax finally implemented - this should prevent major memory leaks 2008-01-29 17:29:39 +00:00
poltawski 6f36f19a62 MDL-13226 - allow user digest settings to be set with bulk user actions 2008-01-29 16:20:14 +00:00
scyrma 4d4938c15e Upgrade path for MDL-13060. 2008-01-29 05:47:01 +00:00
moodler 296c5450fd Automatic installer.php lang files by installer_builder (20080129) 2008-01-29 03:39:22 +00:00
scyrma d74e9bf395 No changes - only recoded to utf8. (MDL-13060) 2008-01-29 03:34:14 +00:00
scyrma e783513693 oops : problem with apostrophes. 2008-01-28 08:32:43 +00:00
scyrma 50d3025947 Imported and replaced country list to fix MDL-13060. The new list is the exact ISO list. Note that an official list also exists in French, but we will need to
do translations to other languages.
2008-01-28 08:30:05 +00:00
moodler d2f18a8694 Merged pdf php5 fix from MDL-13207 2008-01-28 05:27:13 +00:00
moodler c15c851c3b Automatic installer.php lang files by installer_builder (20080128) 2008-01-28 03:42:10 +00:00
moodler d53e1e9535 Fixed missing context argument MDL-13206 2008-01-28 03:21:42 +00:00
moodler dd0070851d Latest 1.9 tags 2008-01-28 03:18:13 +00:00
pichetp 339726d0d0 Mergging from head MDL-12255 Adding questiontext decoding and subquestions validation 2008-01-28 00:42:42 +00:00
pichetp 5c90d8094c MDL-12255 Adding questiontext decoding and subquestions validation when editing 2008-01-28 00:39:13 +00:00
gbateson 04d1cad3bf Fix Undefined property: stdClass::$displaynext in mod\hotpot\lib.php on line 356 2008-01-27 23:55:29 +00:00
gbateson b09b58f052 fix Undefined index: studentfeedbackurl in mod\hotpot\mod_form.php on line 305 2008-01-27 23:47:17 +00:00
mjollnir_ 357eefcdbe MDL-13161 - auth/db - suppress php warning when there are no users using db auth 2008-01-27 20:05:29 +00:00
poltawski 66d4805a81 MDL-13149 - use correct capability checks to decide which forum subscribe
links to display
2008-01-27 16:59:29 +00:00
stronk7 5e41141993 Rename lesson usegrademax to usemaxgrade because some old sites can be using the wrong one. MDL-13177 2008-01-27 15:34:29 +00:00
stronk7 03901b0c62 sql_isnull() not used anymore. Deleting. MDL-12970 2008-01-27 01:37:41 +00:00
stronk7 b8f671b379 Deleting core uses of sql_isnull(). MDL-12970 2008-01-27 01:26:47 +00:00
stronk7 59a745a6ad Adding some missing log actions when restoring forums. MDL-13184 2008-01-27 00:34:41 +00:00
stronk7 3f134ab610 Fix notice with edit enabled in site page. 2008-01-26 23:12:09 +00:00
stronk7 5cfbedea89 Added some helper functions, cleanup a bit and add missing parts. MDL-10721 2008-01-26 21:52:20 +00:00
poltawski df599bc11f MDL-13180 - prevent return of duplicate rows 2008-01-26 17:35:22 +00:00
poltawski 8b722fe0b0 MDL-13179 - avoid calling get_admin() when unecessary.
It uses a relatively complex query and its not needed except
for a minority of users so we may as well avoid it..
2008-01-26 16:56:23 +00:00
poltawski 278ecb2567 MDL-13180 - stop returning duplicate rows 2008-01-26 16:02:30 +00:00
nicolasconnault c86003482a MDL-13101 Correcting the display of non-standard plugins missing from disk 2008-01-26 09:58:08 +00:00
moodler d7b02b694e Automatic installer.php lang files by installer_builder (20080126) 2008-01-26 03:33:54 +00:00
poltawski 53bdf7e60a MDL-13068 - fix typo causing course delete to fail 2008-01-25 21:07:49 +00:00
poltawski 6b18f14151 MDL-13117 - course info was unavailable to students. There was broken logic...
course_parent_visible() always returns true if $CFG->allowvisiblecoursesinhiddencategories
is true,
2008-01-25 20:42:57 +00:00
nicolasconnault be664f9a44 MDL-13101 Now showing installed plugins missing from disk 2008-01-25 16:27:34 +00:00
skodak 2b5db7a39f MDL-12945 minor modinfo improvement- fixed typos (thanks Nicolas) 2008-01-25 12:06:39 +00:00
skodak fecac81cac MDL-12945 minor modinfo improvement 2008-01-25 09:38:16 +00:00
nicolasconnault db9f04b35d MDL-13101 Now showing standard plugins missing from disk. Refactored get_plugin_name() method 2008-01-25 08:36:17 +00:00
scyrma e3a08c6eaa Start on MDL-12730 .. fixes some E_STRICT messages for 1.9 (removing __construct in
this branch only, to stay compatible with PHP4)
2008-01-25 08:34:37 +00:00
jamiesensei ed3a874632 MDL-13156 "insert_category_and_question_ids() function name can cause name conflicts" 2008-01-25 07:06:34 +00:00
moodler a2b4c8cb94 Avoid a notice about $current for guests 2008-01-25 06:26:26 +00:00
scyrma 9f7d599561 MDL-12565 : use the right table 2008-01-25 02:43:10 +00:00
scyrma 4175366743 MDL-12565 - add AS to prevent problem with pgsql 2008-01-25 02:31:22 +00:00
scyrma 080ed4ba60 Fixes MDL-13124 and chooses more relevant tags to display 2008-01-25 01:31:40 +00:00
martinlanghoff b227269e56 accesslib: Fix get_context_users_bycap() when no roles grant the cap
When no roles mention the capability, get_context_users_bycap() breaks
badly. This trivial patch does a sanity check before jumping into the
SQL shark-pool...

MDL-13160
2008-01-25 00:54:35 +00:00
stronk7 d8898325db Merge + General cleanup of backup users. Part of MDL-10721 ; merged from 18_STABLE 2008-01-25 00:46:55 +00:00
skodak 94cbbdbd2e MDL-12945 a slightly bigger patch for performance in recent activity and various group related issues + some other fixes - see list of subtasks in tracker 2008-01-24 20:29:31 +00:00
poltawski f954aeaecd MDL-12627 - when visiting the gradebook for the first time, we don't sort
by anything sensible. Default to surname
2008-01-24 20:11:21 +00:00
stronk7 f0421951ed Prevent grade_grades and grade_grades_history to be exported for non-target users. MDL-13115 2008-01-24 20:02:56 +00:00
nicolasconnault 405350262e MDL-13103 It wasn't a missing !, it was $grade_item spelled as $item... 2008-01-24 19:55:25 +00:00
nicolasconnault c92941d7a4 MDL-13103 Added missing exclamation mark in front of empty() 2008-01-24 19:46:17 +00:00
poltawski 3a8093f895 MDL-13088 - database presets weren't escaping bad chars, causing presets
to break with a rogue <
2008-01-24 19:39:59 +00:00
skodak 293a2545b1 mod/quiz: fixed fatal error in quiz_print_recent_mod_activity(); Author: Matt Clarkson <mattc@catalyst.net.nz>
backported from HEAD
2008-01-24 19:11:59 +00:00
stronk7 98e13c2eea Reworked a bit to prevent non-target user role assignments to be exported. MDL-13115 2008-01-24 19:07:43 +00:00
nicolasconnault 227323aecf Backporting small changes from Head 2008-01-24 19:05:00 +00:00
tjhunt adea20f6dc MDL-12933 - Bug in mod/quiz/lib.php break MyMoodle - Fix thanks to Eric Merrill. 2008-01-24 17:13:29 +00:00
tjhunt 0c1d63a43e MDL-13102 - quiz_results block links to the old URL of the groups editing interface, and it links there for everyone, even if they don't have the capability to go there. Make it link to the participants page instead, if possible. 2008-01-24 16:33:37 +00:00
poltawski e30a701156 MDL-13148 - adding help popup for course module idnumber 2008-01-24 16:09:12 +00:00
nicolasconnault 95a7a2b866 Correcting unicode characters 2008-01-24 15:34:39 +00:00
tjhunt 369f3834ca MDL-13150 - Remove extra <br /> tag for XHTML strict validation - Thanks to Joseph R?zeau 2008-01-24 15:06:48 +00:00
nicolasconnault be5709b7fb Fixing $Id: tag 2008-01-24 14:45:49 +00:00
nicolasconnault b1c418839e Backporting phpdocs from Head 2008-01-24 14:33:43 +00:00
nicolasconnault 300ce0c64d Backporting comment from Head 2008-01-24 14:32:02 +00:00
nicolasconnault 1b5d15ba9d Backporting view.php link in navigation from Head 2008-01-24 14:10:45 +00:00
poltawski 5c5d465c97 MDL-13146 - prevent debug message about missing helpbutton title 2008-01-24 10:59:28 +00:00
nicolasconnault 8ab96578ab MDL-13101
1. Showing full path
2. Showing plugins to be installed
3. Lang strings properly used
4. Table headers
2008-01-24 08:40:31 +00:00
scyrma ccbbdc7319 MDL-13124 : simplify and fix the tag correlation logic. 2008-01-24 08:38:27 +00:00
moodler 0c89fe886d Automatic installer.php lang files by installer_builder (20080124) 2008-01-24 04:08:27 +00:00
scyrma 9bd0d5f805 MDL-8810: changing require_once to include_once when looking for mod/.../lib.php 2008-01-24 02:17:17 +00:00
stronk7 182ac1d6d8 Readding one line missed in last commit 2008-01-24 00:49:50 +00:00
stronk7 8ba998c60e Now the backup->users = none setting is properly populated to all
modules / instances, saving a lot of info to be always written. MDL-13115

Merged from 18_STABLE
2008-01-24 00:47:40 +00:00
nicolasconnault f547727478 MDL-13101 Renamed the print_modules_table() function to print_plugin_tables() 2008-01-23 22:48:48 +00:00
nicolasconnault f5f4cc3fe7 MDL-13101 New section of the upgrade process: plugins check 2008-01-23 22:43:11 +00:00
skodak 3e6a1aa58e MDL-13026 rewritten sql for calculation of averages on grader report, I hope it will be a bit faster now 2008-01-23 19:04:45 +00:00
skodak 690b1d1324 MDL-11920 prevent db traffic caused by user images 2008-01-23 17:40:45 +00:00
poltawski d6ad2b61f1 MDL-13112 - order my courses block alphabetically when only displaying a users
individual courses.
2008-01-23 15:39:48 +00:00
poltawski af1a463811 MDL-13107 - clean up data cvs import capability checks
Removed bad check 'mod/data:uploadentries' (which doesn't exist),
replaced it with mod/data:manageentries which is what is used to display
the form for this page.

Also removed the empty database redirect and editing entries checks
as there no way to get to this point in the UI and capability check
is covered by the manageentries requirecap (+ later sesskey check).
2008-01-23 13:26:46 +00:00
nicolasconnault b55b207c27 MDL-6826 New button added! 2008-01-23 12:54:30 +00:00
scyrma 7bff26bed6 MDL-8123 and MDL-11594 : make admin icons themeable. 2008-01-23 05:41:56 +00:00
moodler 173ac66759 Automatic installer.php lang files by installer_builder (20080123) 2008-01-23 03:47:51 +00:00
moodler 7604731552 Disable Workshop by default in 1.9 MDL-13100 2008-01-23 02:52:12 +00:00
skodak 75ec296d45 MDL-12144 new catgory on modedit available only when outcomes used in course 2008-01-22 12:11:53 +00:00
skodak 14a3c9f3bc MDL-12144 fixed creation of course category 2008-01-22 11:58:43 +00:00
skodak fa2d7d3201 MDL-13091 Aggregate including subcategories off by default, adding default values info into grade cat combo setting 2008-01-22 08:25:32 +00:00
moodler 6be5bdfb8e Automatic installer.php lang files by installer_builder (20080122) 2008-01-22 03:40:16 +00:00
moodler d6b6304fc3 Fixed a typo in the styles 2008-01-22 01:20:47 +00:00
skodak 5db97707d3 MDL-13085 delete grades and items when uninstalling module 2008-01-21 23:35:11 +00:00
danmarsden 9d6bdd5874 Fix for MDL-12998 and MDL-13079 Ldap not unenrolling users correctly merged from HEAD 2008-01-21 23:22:49 +00:00
skodak d4e4739aed MDL-12620 When a student receives feedback on an an assignment, they should be able to see how many points it is worth 2008-01-21 18:45:43 +00:00
skodak 5dd81daaed MDL-12773, MDL-12144 grade category selection on modedit page 2008-01-21 18:41:32 +00:00
skodak 29ad04a314 MDL-13084 SORT_LOCALE_STRING not defined < PHP 4.4.0; fixed typo 2008-01-21 18:16:59 +00:00
skodak 4516dce1a3 MDL-13084 SORT_LOCALE_STRING not defined < PHP 4.4.0 2008-01-21 18:15:44 +00:00
nicolasconnault 0fbc5579fb MDL-13050 Reverting, it's not working out as well as planned 2008-01-21 13:39:51 +00:00
gbateson 9455d7c920 fix Undefined property: stdClass::$studentfeedbackurl (line 282) and Undefined property: stdClass::$cellcontent2 (line 1081) in mod/hotpot/lib.php 2008-01-21 07:33:33 +00:00
skodak bfaa2a61dc MDL-13081 add "long grade" formatted string "score / maxscore" into grade_get_grades() and friends 2008-01-21 07:17:47 +00:00
skodak 46203368b5 MDL-13080 delete calendar events when uninstalling modules 2008-01-21 07:07:51 +00:00
gbateson 5fffec5d49 fix for MDL-13047 where no attempts were found for a particular HotPot 2008-01-21 07:00:21 +00:00
gbateson 9275a2bae5 fix for: Error in call to helpbutton function: at least one of $title and $linktext is required 2008-01-21 06:42:40 +00:00
moodler 9051fd4e30 Automatic installer.php lang files by installer_builder (20080121) 2008-01-21 03:40:04 +00:00
stronk7 949e8de8e7 Adding missing string to installer. MDL-12914 2008-01-20 20:39:18 +00:00
danmarsden 69329d504a Fix for MDL-12979 forum sends out notification to users not in course - due to call to deprec function get_course_users - This also fixes MDL-10163 2008-01-20 20:04:17 +00:00
skodak cb2bf96fe9 MDL-12983 Installation stops after trying to download Language-Pack - patch by Dan Poltawski 2008-01-20 17:58:06 +00:00
moodler ec5e30a4e9 Automatic installer.php lang files by installer_builder (20080120) 2008-01-20 03:37:39 +00:00
mudrd8mz 39477c96a9 MDL-12291 help.php is now able to skip _local langpacks 2008-01-19 21:57:13 +00:00
skodak a746e49818 MDL-13063 fixed comments and changeme password reset; fixed prev commit 2008-01-19 20:04:23 +00:00
skodak 6c9aa9b38b MDL-13063 fixed comments and changeme password reset 2008-01-19 20:02:28 +00:00
nicolasconnault 890204da8c MDL-13050 Oops... fixing syntax error 2008-01-18 22:40:05 +00:00
skodak 49aa2ee116 MDL-13052 edit/user.php typo 2008-01-18 17:13:23 +00:00
jamiesensei acfc18d8e8 MDL-13034 fixes "insertion of question / category ids at the CONTEXT_MODULE level does not respect whether the instance of the module has been selected for backup" and cleans up code a little. merged from HEAD 2008-01-18 15:09:55 +00:00
nicolasconnault 82a6cc3f44 MDL-13050 reverting a debugging comment 2008-01-18 14:37:29 +00:00
nicolasconnault 7bb1b32039 MDL-13050 Modules were updated, and grades.php files were added to the lesson and hotpot modules 2008-01-18 14:31:15 +00:00
skodak 996177940e MDL-11165 [[writinggroupingsgroupsinfo]] - it was already in head 2008-01-18 11:06:58 +00:00
skodak a948673c75 MDL-11165 [[writinggroupingsgroupsinfo]] 2008-01-18 11:05:13 +00:00
sam_marshall 85caf1b299 MDL-13045: Made groups UI use role name aliases 2008-01-18 11:03:01 +00:00
skodak 047e7670aa MDL-11072 sort groupings alphabetically 2008-01-18 10:49:24 +00:00
skodak 3824b03f06 MDL-11759 group edit cleanup; merged from MOODLE_18_STABLE 2008-01-18 10:15:40 +00:00
skodak 4b4d9ef4fa MDL-11759 group edit cleanup; merged from MOODLE_18_STABLE 2008-01-18 10:08:10 +00:00
moodler 654a2dae51 FIxed some typos in the popup names 2008-01-18 05:17:12 +00:00
moodler 66b3a7bcec Automatic installer.php lang files by installer_builder (20080118) 2008-01-18 03:41:08 +00:00
danmarsden e7504c319b fix for MDL-7128 lang file. 2008-01-18 00:39:01 +00:00
danmarsden c562b0f504 fix for MDL-7128 - hide save button when options are all full. and tidy up of old is_guest call 2008-01-18 00:31:37 +00:00
danmarsden bab754c727 MDL-12331 prevent hidden role assignments from being shown in the unanswered column of the choice, but still allow them to be shown if they have selected a choice. 2008-01-17 23:01:02 +00:00
nicolasconnault 7300023df8 MDL-12122 Applied Petr's suggested capability fix 2008-01-17 16:25:40 +00:00
nicolasconnault 3983345254 MDL-12122 Changed userid to PARAM_INT, and changed 'all' to 0 2008-01-17 16:07:11 +00:00
nicolasconnault 047901cbd0 MDL-12122 Completed the change to a more useful user report for the admin, with a few extra bits. 2008-01-17 15:03:35 +00:00
nicolasconnault e0ade9dbe7 MDL-12122 Completed the change to a more useful user report for the admin, with a few extra bits. 2008-01-17 14:54:50 +00:00
sam_marshall 6d07659acf MDL-12991 Updated groups UI so that it categorises members and potential members into roles (Teacher, Student, etc) 2008-01-17 11:28:56 +00:00
moodler f35daade0d Automatic installer.php lang files by installer_builder (20080117) 2008-01-17 03:42:39 +00:00
urs_hunkler e9a903a539 some CSS cleaning up 2008-01-16 20:04:06 +00:00
danmarsden 5a60b8a69a MDL-12890 - patch that allows doanything users to submit a choice, but not shown in the unanswered column. 2008-01-16 18:49:42 +00:00
skodak 91cb9645d4 tweak has_capability() debug mode to add only one query per page for cap name verification 2008-01-16 17:23:07 +00:00
urs_hunkler c9262623e7 new faster jQuery version 2008-01-16 17:21:28 +00:00
urs_hunkler 6489172657 MDL-12536 :: changed customtheme call to fixed custom_corners call. 2008-01-16 17:19:03 +00:00
poltawski 64ca832445 MDL-13003 - dont initialise params twice 2008-01-16 15:05:11 +00:00
scyrma f9348b84bc MDL-13020 : deprecates make_table 2008-01-16 08:24:27 +00:00
nicolasconnault d994fe68bc Reverting MDL-12974 and MDL-12941 (Urs simple wrapper changes) 2008-01-16 08:05:01 +00:00
nicolasconnault a28baeb99c MDL-12941 Added clear:none; to div.user-box css. Also fixed a couple of & with &amp; 2008-01-16 07:33:24 +00:00
scyrma e52c8d89f6 Fix for MDL-9669 : make it possible to specify 0 as cellpadding and cellspacing 2008-01-16 06:29:03 +00:00
moodler f845a2fba9 Small fix for the new SQL ... it works now for me on moodle.org MDL-12990 2008-01-16 06:12:10 +00:00
moodler 3475eeac11 Automatic installer.php lang files by installer_builder (20080116) 2008-01-16 03:38:52 +00:00
moodler 7a15af7d90 Move the inclusion of upgradelib.php to the top MDL-13017 2008-01-16 01:48:53 +00:00
poltawski b972485c21 MDL-12990 - save more needless db queries 2008-01-15 22:07:36 +00:00
poltawski 1c9a35efa2 MDL-12990 - use our user object and we save 2dbq for free on message history page 2008-01-15 21:33:15 +00:00
poltawski 3e5f98212d MDL-12990 - Significantly reduce database queries for messaging
search by getting info required by in search sql.

On a site with 1500 users:
Before: 850 dbq
After:  8   dbq
2008-01-15 16:09:50 +00:00
tjhunt ae1a7e05a6 MDL-13011 - Improve import form layout. 2008-01-15 15:25:03 +00:00
thepurpleblob 3ed692737c MDL-12016:
Read xml structure correctly to get category path
2008-01-15 14:50:24 +00:00
thepurpleblob be1448f47b Reverting Mike C's change in MDL-12016 2008-01-15 14:34:08 +00:00
poltawski 86f404fa52 MDL-12990 - clean up message_print_contacts() a lot to:
* Use less DB queries and avoid getting lots of needless data
 * Dont do a big php array rearranging loop - database does the work for us instead
 * split all the duplicated display code into a single function
2008-01-15 13:47:45 +00:00
ethem 8c4ca06f88 Tidy up 2008-01-15 10:54:18 +00:00
mjollnir_ 33c34c5705 MDL-13000 Adding support for developers to add their own capabilities to local/db/access.php
This relies on a local/ language pack as well for the capability names.
Notes on implementation are in lib/locallib.php
2008-01-15 04:20:02 +00:00
mjollnir_ 0972aa2291 MDL-13001 - adding support for language files in local/ directory. 2008-01-15 01:39:55 +00:00
mjollnir_ 8b2a37e7b1 More on MDL-11561 - fixed up path to local/ settings file to be more consistent,
added documentation in lib/locallib.php on how to create new local admin tree items
2008-01-15 01:09:54 +00:00
mjollnir_ c1139b492e MDL-11561 - added support for local/localsettings.php 2008-01-14 23:32:19 +00:00
skodak 94000d7320 MDL-12822 readding grade_get_course_grade(), alternative to grade_get_course_grades() 2008-01-14 23:28:06 +00:00
skodak aaf8bbd470 MDL-12912 module idnumber course unique only 2008-01-14 22:45:22 +00:00
ethem c8db08b82e MDL-12958 In the Authorize enrol plug-in when a credit card expiry date (year) is entered, a validate error is generated blocking credit card usage 2008-01-14 17:55:43 +00:00
poltawski b81e38ec0b MDL-12990 Ensure that displaying message contact list pictures doesn't take a
dbq per contact. Could do with a rewrite, but this saves us dbqs for now
2008-01-14 16:58:07 +00:00
moodler 2a5bbf81ca Automatic installer.php lang files by installer_builder (20080114) 2008-01-14 03:53:09 +00:00
urs_hunkler 3f710c6be5 MDL-12974 :: We urgently need a simple wrapper function to avoid the advanced containers when only a wrapper div is needed. Pages like for example the tags page look awful in custom_corners with all those unesessarily overlapping boxes.
I created the function print_simplewrapper_start($classes='generalbox', $idname='', $return=false) { ... } and used it in tag/indec.php and tag/lib.php.

The pages look much better now in custom_corners.
2008-01-13 20:02:53 +00:00
poltawski 3416e63f61 MDL-8269 - stats wasn't paying attention to run time settings as the strtotime
arguments were the wrong way round. Thanks to Mark Nielsen
2008-01-13 18:45:55 +00:00
urs_hunkler f86a5be206 merged from 1.8 :: MDL-12564 :: added font-family to the arrow properties. 2008-01-13 17:52:48 +00:00
poltawski 8ac075addf MDL-12560 - layout fixes for tag blocks 2008-01-13 16:34:18 +00:00
poltawski d15518f149 MDL-12560 - layout fixes for tag blocks 2008-01-13 16:28:55 +00:00
poltawski 9c8bcc6562 further refinement.. 2008-01-13 12:30:17 +00:00
poltawski 2cf92c01fb Improving wording 2008-01-13 12:28:14 +00:00
poltawski 4575e76e98 MDL-7846 - use translatable strings for bulk messaging 2008-01-13 12:20:59 +00:00
poltawski 5d53aa0544 MDL-12943 - remove old dialogue unused dialogue language files 2008-01-13 11:44:44 +00:00
poltawski 22c2af60e8 MDL-12742 - remove duplicated lang files 2008-01-13 11:36:14 +00:00
jamiesensei 4a6a7074ce MDL-12695 Symantec Norton internet security pop up blocker seems to be stopping user starting a quiz attempt - fixed this by using print_single_button which uses an onclick event to trigger a confirm dialogue, should work better even with popup blockers. 2008-01-13 08:54:56 +00:00
jamiesensei f92b08d9e1 whitespace clean up, removed all indentation with tabs and trailing white space 2008-01-13 08:35:38 +00:00
jamiesensei d42e5b0034 MDL-12906 add an optional parameter $jsconfirmmessage parameter to print_single_button 2008-01-13 08:09:09 +00:00
stronk7 c279331f64 Minor changes to custom check definition. MDL-12914 2008-01-12 18:50:33 +00:00
stronk7 be176082f4 Function changed to check for register_globals. MDL-12914 2008-01-12 18:49:38 +00:00
urs_hunkler 2c30fce4a2 MDL-11154 :: added the missing code and the config line and explanation in config.php for flexible columns. 2008-01-12 17:52:03 +00:00
urs_hunkler 17be8562d7 merged from 1.8 :: MDL-9306 :: explanation added for hooks as comma separated lists in Chameleon. 2008-01-12 16:31:50 +00:00
urs_hunkler 0cb3c46479 merged from 1.8 :: MDL-11486 :: added width to the adminblock 2008-01-12 14:51:52 +00:00
urs_hunkler f300eadf46 MDL-12210 :: set background-color: none to transparent 2008-01-12 14:26:20 +00:00
urs_hunkler 901c3d48a6 MDL-12910 :: changed top from 2.9em to 3.5em 2008-01-12 14:04:49 +00:00
skodak bcb667b7f5 MDL-12914 Register globals trouble 2008-01-11 23:21:35 +00:00
stronk7 9040c8d4e9 Fixed copy/paste typo. MDL-11341 ;-) 2008-01-11 17:20:31 +00:00
poltawski 99f36270c0 MDL-11341 - allow users with language editing perms to access language
editing
2008-01-11 16:26:10 +00:00
poltawski 5a3cafc899 MDL-11074 - incorrect test in page_generic_activity, thanks to Gordon Bateson 2008-01-11 15:42:05 +00:00
skodak ca9b92d39f MDL-12926 Discussion list shows all discussion in separate mode if user not member of any group and does not have accessallgroups 2008-01-11 13:08:17 +00:00
poltawski f57cdf69c8 MDL-12930 - wrong title text on search webpages button, thanks to Mitsuhiro
Yoshida
2008-01-11 11:58:41 +00:00
poltawski 18778321e8 MDL-12400 - superfluous required_param causing problems in upload
assignment user report.
2008-01-11 11:45:30 +00:00
urs_hunkler 56db843241 typo body#tag-manage table#tag-management-list, th, must be body#tag-manage table#tag-management-list th, 2008-01-11 11:32:49 +00:00
nicolasconnault d9d18969f0 Fixed intermixed quickgrading and quickfeedback help strings 2008-01-11 10:03:24 +00:00
urs_hunkler c309d41688 MDL-12221 :: removed the "nocoursepage" hack, which was an attempt to find out if a page has a layout-table. I developed this hack because Martin said, that he does not see any chance to implement a layout-table check. This hack followed several exception hacks because Moodel pages are inconsistently created. All those exceptions I could delete too.
Now I added a JavaScript layout-table check which works great.
2008-01-11 09:21:24 +00:00
moodler 2ac2ce803e Automatic installer.php lang files by installer_builder (20080111) 2008-01-11 03:41:08 +00:00
stronk7 a8482189a7 Adding custom check to test MDL-12914 2008-01-11 00:04:12 +00:00
stronk7 9e87c6033e Backported from HEAD. Added new library to store all core
custom checks to be performed by environmental stuff. MDL-12914
2008-01-10 23:49:15 +00:00
stronk7 692866105a file customcheckslib.php was added on branch MOODLE_19_STABLE on 2008-01-10 23:49:15 +0000 2008-01-10 23:46:28 +00:00
skodak b5c8f2f808 MDL-12921 Using visible groups in Q&A Forums student can't reply to discussions for All participants (including groups code cleanup) 2008-01-10 23:12:46 +00:00
poltawski ba4aea2b35 MDL-12915 - fixed require of removed file 2008-01-10 16:10:07 +00:00
jmg324 3dc2b907da MDL-6216 print_category_info no longer counts invisible courses if the user does't have permission to see them. 2008-01-10 15:43:21 +00:00
tjhunt 168eda8b3a MDL-12913 - Error messages when doing an XML grade import are not very helpful, include the idnumber that is causing the problem in the error message. 2008-01-10 15:38:47 +00:00
skodak fa366ea698 MDL-12911 fixed permission checks; merged from MOODLE_18_STABLE 2008-01-10 15:09:10 +00:00
tjhunt d67aacd867 Fix notice when you try to import an empty XML file. 2008-01-10 14:17:35 +00:00
tjhunt 33d2459c8d MDL-12373 - More instances of links to the participants list being shown in the navigation bar to people without the necessary capability.
I have not copied and pasted the same code into lots of different places. That sucks. We really need to refactor this into a function that builds the navigation up to, and including the user's name. However, I don't have time now. A list of the places touched by this bug (MDL-12373) will at least give a complete list of places that such a refactoring would have to touch.
2008-01-10 10:58:09 +00:00
poltawski ff82f12d5e MDL-12221 - use theme variables so it doesn't break on my setup ;) And remove
comment reffering to local server
2008-01-10 10:42:42 +00:00
skodak 0e2c2828fa search cron.php is included from search block, the config.php was already included in admin/cron.php - MFC 2008-01-10 10:05:50 +00:00
jmg324 decfd5028c altered require statement for config. (merged from head) 2008-01-10 09:54:31 +00:00
moodler ab54cc74d8 Removing some temp files that shouldn't be here 2008-01-10 06:12:07 +00:00
moodler 65743c17e0 Some small fixes to make custom_corners behave better as a parent theme MDL-12221 2008-01-10 06:10:02 +00:00
moodler 84dc99bbe9 Add support for db folder to auth plugins 2008-01-10 03:46:01 +00:00
moodler 5be691946f Automatic installer.php lang files by installer_builder (20080110) 2008-01-10 03:39:46 +00:00
stronk7 675b1a05ea Bump release to have it included in backups to beta 4 2008-01-10 00:19:57 +00:00
skodak d3d791f208 MDL-12822 removing some unused grade functions (obsoleted by format grade function), renaming PUBLIC API to activity communication API and adding new querylib.php with useful functions (requested by other devs) 2008-01-09 18:19:12 +00:00
tjhunt 0e544a84e6 MDL-12373 - If you can see your user profile, but don't have moodle/course:viewparticipants, you get a link in the nav bar that takes you to an error message - and there were also instances in blog. 2008-01-09 17:23:45 +00:00
tjhunt 79a9b69e28 MDL-12373 - If you can see your user profile, but don't have moodle/course:viewparticipants, you get a link in the nav bar that takes you to an error message - this was repeated in other parts of the user profile that I had not noticed when I fixed this before. 2008-01-09 16:46:19 +00:00
urs_hunkler 8f4a3ae2f1 MDL-12221 :: I added changes to weblib and the forum and glossary view pages, the custom_corners and standard theme to get those pages working.
In the view pages I changed the container function call to a simple "echo 'div ...'" to avoid the custom_corners container overhead and page oddity.

In weblib I added "clearfix" handling to the function "print_box_start($classes ...". "clearfix" is handed over to the containing divs. This is a hack, but I didn't know how to handle it without rewriting too much areas.
2008-01-09 15:03:29 +00:00
poltawski 3dd4e13cd6 MDL-12889 - bad capability check [thanks Tim!] in assignment recent activity report 2008-01-09 12:56:48 +00:00
poltawski f00d4c451b MDL-12888 - remove require to form no longer used 2008-01-09 11:03:00 +00:00
poltawski 18077e8b96 MDL-12888 - remove require to form no longer used 2008-01-09 10:56:48 +00:00
poltawski 78fb3bf3df MDL-10886 - Category edit: use 'save changes', enable cancel button to allow us
to get back from where we came from & refine where we are returned to when cancelled.
2008-01-09 10:49:05 +00:00
poltawski fd0e2fec76 MDL-12461 - wrong urls for message related log entries 2008-01-09 10:11:04 +00:00
moodler 4d7325ef33 Added back missing string to 1.9 MDL-12801 2008-01-09 07:35:47 +00:00
moodler 220a6d19b1 Hmm, somehow I checked in a conflict! :-( MDL-12801 2008-01-09 07:30:02 +00:00
moodler 8826b45a5a Bumping to Beta 4 2008-01-09 06:59:41 +00:00
moodler 1ec0ef254c Merged MDL-12801 from MOODLE_18_STABLE (Improve roles terminology for system) 2008-01-09 06:49:14 +00:00
scyrma 941802c3d1 Small documentation fix. 2008-01-09 04:09:00 +00:00
ericmerrill 95fb95cb3e MDL-11674
Undid change that could result in dataloss.
2008-01-09 02:08:04 +00:00
mjollnir_ 07e27f4746 MDL-12884 web installer should set the depth of the miscellaneous course category to 1 too (discussion in moodle hq skype chat with Petr) 2008-01-08 23:26:26 +00:00
martinlanghoff 9b672f584f mod/chat:chat_cron() - IS NOT NULL is better - MDL-11674 2008-01-08 22:37:18 +00:00
poltawski 8049c822ec MDL-12840 - gradebook CSV import was failing due to newlines with nothing
on them
2008-01-08 22:24:10 +00:00
martinlanghoff bf2de3499f mod/chat:chat_cron() delete stale chat messages with a single query, fast, and portable too! MDL-11674 2008-01-08 20:58:32 +00:00
poltawski 8432e9ba39 MDL-12882 - we were caching empty records which caused clone warnings 2008-01-08 20:19:18 +00:00
tjhunt 5e17bdd0eb MDL-12771 - change multianswer quetsion type HTML to more closely match that of other question types, in order to fix a layout glitch in Moodle 1.9. 2008-01-08 18:37:43 +00:00
tjhunt 5ae009ad6d MDL-12785 - Partially correct tick icon not displayed for MULTICHOICE, single answer questions. Fix thanks to Joseph R?zeau. Merged from MOODLE_18_STABLE. 2008-01-08 18:29:17 +00:00
urs_hunkler a35ce8ef14 MDL-12881 :: added class names "username" and "password" for better login form handling. 2008-01-08 17:59:44 +00:00
sam_marshall 6730788f48 MDL-12876 Moved accesshide text further off the screen as it was sometimes visible 2008-01-08 17:27:29 +00:00
poltawski 27e05b35a9 MDL-12464 - refine further so that glossary can't refer to instance from
another course (and cause breakage)
2008-01-08 16:46:41 +00:00
nicolasconnault b521e9ed8a MDL-12829 Removed a hard-coded test integer 2008-01-08 15:23:52 +00:00
tjhunt e0a411d4a4 MDL-12875 - Hidden courses not in category list not visible to teachers on those courses in the list of courses in a category. 2008-01-08 15:17:04 +00:00
tjhunt 0229dc83ea Put back DEBUG_DEVELOPER sanity check in has_capability, that makes sure the capabiltiy you are asking about actually exists. I know it takes an extra DB query, but it is DEBUG_DEVELOPER only, and it is worth its weight in gold, because otherwise you get really subtle bugs that take forever to diagnose. I know, I have just been banging my head against the wall for an hour. 2008-01-08 15:04:04 +00:00
poltawski 39dfcf7138 MDL-9372 - only show RSS options in database module when RSS is enabled 2008-01-08 13:39:35 +00:00
poltawski 0b7c820a73 MDL-10813 - Course requests not respecting course request category.
Also made the course request category more robust, as breakage would
incur if $CFG->defaultrequestcategory didn't exist as a category.
2008-01-08 12:49:41 +00:00
poltawski dc51efed7e MDL-12873 - show an add course button when editing at the top level (which
is the default view when you click 'Add/Edit Courses'
2008-01-08 11:59:07 +00:00
skodak df2a9e2a0a MDL-11830 width applied to input fields only, that should solve the incorrect size of button 2008-01-08 07:32:56 +00:00
skodak d65bb1547b MDL-12869 fixed minor security problem in installer - reported by hanno 2008-01-08 07:15:29 +00:00
iarenaza d0d840eaed MDL-12858 fix print_error() usage.
print_error()'s third parameter is the URL we jump to (defaults to
$CFG->wwwroot if not set) when we click the 'Continue' button, not the message
string parameter object.

Forward ported from MOODLE_18_STABLE
2008-01-08 00:16:18 +00:00
poltawski 7e65c42f39 MDL-12856 - previous commit was breaking moodle installs after
redeclaring method. Remove the duplicate function.
2008-01-07 20:56:20 +00:00
poltawski 6b843dfac1 MDL-12859 - add some whitespace so translation layout doesn't get messed
up
2008-01-07 20:31:02 +00:00
tjhunt d091ee027f Use the locale to sort the list of activites everywhere. This matches a change a made in one place before christmas. If you don't do this, the PHP sorts by ASCII order, so mixed case names, or special characters, get sorted wrongly. 2008-01-07 16:46:10 +00:00
poltawski d18387534d MDL-6529 - strip slashes when displaying category added success messsage 2008-01-07 12:20:13 +00:00
martinlanghoff 9276c875dd dmllib:rcache_set()/rcache_get() - use clone() function which we can support in PHP4 - MDL-12827 2008-01-07 05:03:45 +00:00
ikawhero f1d52ce1aa Adding method to allow printing of the enrolment key form code when using PayPal. 2008-01-07 00:58:10 +00:00
martinlanghoff 9dc8c1b014 MDL-12452 accesslib: get_users_by_capability() now excludes doanything'ers properly
With some subselect-outer-join poison-pill magic, when the we don't
want doanything users, we remove the roles that would grant such
dubious status.

Just a flick of the SQL muscle, actually.
2008-01-06 23:20:00 +00:00
martinlanghoff 264d665380 MDL-12523 accesslib: get_users_by_capability() fix subselect with ra.hidden
MDL-12452
2008-01-06 23:19:04 +00:00
martinlanghoff 4658b598b4 MDL-12523 lib/deprecatedlib: use sort_by_roleassignment_authority() to sort RAs
After calling get_users_by_capability(), use
sort_by_roleassignment_authority() to mimic what older versions of
Moodle did.

Affects: get_teacher(), get_course_teachers()

    MDL-12452
2008-01-06 23:18:51 +00:00
martinlanghoff 4ebe85b6a5 MDL-12523 accesslib: Introducing sort_by_roleassignment_authority()
This will help us bridge the gap from olden-style order-by
user_teachers.id. From the phpdoc...

 Will re-sort a $users results array (from get_users_by_capability(), usually)
 based on a sorting policy. This is to support the odd practice of
 sorting teachers by 'authority', where authority was "lowest id of the role
 assignment".

 Will execute 1 database query. Only suitable for small numbers of users, as it
 uses an u.id IN() clause.

 Notes about the sorting criteria.

 As a default, we cannot rely on role.sortorder because then
 admins/coursecreators will always win. That is why the sane
 rule "is locality matters most", with sortorder as 2nd
 consideration.

 If you want role.sortorder, use the 'sortorder' policy, and
 name explicitly what roles you want to cover. It's probably
 a good idea to see what roles have the capabilities you want
 (array_diff() them against roiles that have 'can-do-anything'
 to weed out admin-ish roles. Or fetch a list of roles from
 variables like $CFG->coursemanagers .

MDL-12452
2008-01-06 23:18:37 +00:00
martinlanghoff 3e117fb6af MDL-12523 lib/deprecatedlib: enrol/manual: Fix calls to get_users_by_capability() to avoid ra
get_users_by_capability() can no longer refer to properties of role
assignments or roles, as the capability aggregate is indirect.

Fixes:
 get_teacher() - though the results will be poor, as we cannot provide
                 role.sortorder reliably
		 (used mainly by mod/workshop)
 get_course_teachers() - which seems broken for a lot of situations as
                 its default parameters still refer to old tables.

MDL-12452
2008-01-06 23:18:19 +00:00
martinlanghoff f5687e385b MDL-12523 enrol/manual: Fix calls to get_users_by_capability() to avoid ra
get_users_by_capability() can no longer refer to properties of role
assignments or roles, as the capability aggregate is indirect.

MDL-12452
2008-01-06 23:18:08 +00:00
martinlanghoff b5ea0a4a52 MDL-12523 accesslib: get_user_by_capability() - Fix pagination
Ooops! Off-by-one error

MDL-12452
2008-01-06 23:17:53 +00:00
martinlanghoff 8658d5c5b0 MDL-12523 datalib: get_admins() - Rewrite to avoid get_users_by_capability()
get_admins() and get_admin() were counting on
get_users_by_capability() returning a role-assignment id to pick the
"primary" admin account. With the get_users_by_capability() rewrite,
we no longer have an RA id to clearly blame for the capability.

So, rewrite get_admins() based on the known-good SQL used in
is_siteadmin().

MDL-12452
2008-01-06 23:17:42 +00:00
martinlanghoff 22edc02cf9 MDL-12523 accesslib: get_user_by_capability() - Fix last_access handling
We were missing $courseid, which is actually $context->instanceid.

MDL-12452
2008-01-06 23:17:24 +00:00
martinlanghoff 3f1e6d3c73 MDL-12523 accesslib: get_user_by_capability() - Move capcheck to has_capability_from_rarc()
This fixes the handling of default roles as "tie breakers" for lower
RAs in conflict, and simplifies the code a lot.

The main loop in get_user_by_capability() runs a simpler state machine
that just collects role assignments (roleid and depth), and handles
pagination.

The complex part of the state machine has moved to
has_capability_from_rarc() which will walk the data structures
collected by get_user_by_capability() for each user.

Having all the complex state handling of $hascap there makes things a
lot easier for pagination and general sanity of
get_user_by_capability().

MDL-12452
2008-01-06 23:17:11 +00:00
martinlanghoff 53d3f7fd89 MDL-12523 accesslib: get_user_by_capability() - Move hidden RA checks to subselect
we don't deal with RAs in the main SELECT -- we deal with _capabilities_
which is an entirely different matter ;-) -- so push the ra.hidden check
into the subselect.

Also, remove ra.hidden from the default list of fields. Hopefully no
callers are using ra.hidden -- if they are, they should be calling
something else, as this function deals with capabilities. So we might
need an audit of callers, to check that noone is expecting ra.hidden
to be there.

MDL-12452
2008-01-06 23:16:54 +00:00
martinlanghoff ba702c6731 MDL-12523 accesslib: get_user_by_capability() - Handle the complex case
With this commit, we can handle the complex cases with

 - correct pagination, but not very efficient over large datasets

 - mostly-correct application of the override rules

The structure of the code is fairly complex in that we want to do
it without holding all the recs in memory, so we use a small state
machine. We have to handle the complex override rules over 1 or 2
permissions (when $doanything is set) so it all ends up quite complex.

There is one known issue with this code, in cases where the default
role ends up as the decider between 2 conflicting RAs, we fail to
apply it. This will need a bit of reorg of how the loop works.

MDL-12452
2008-01-06 23:16:33 +00:00
martinlanghoff b8dc2b75a4 MDL-12523 accesslib: get_user_by_capability() - Simple cases now handle multiple RAs
The "simple" case SQL did not handle multiple enrolments for the same
user correctly -- it would generate multiple rows for those users,
incorrectly.

With this patch we move the join to RA to a subselect where DISTINCT
takes care of things.

MDL-12452
2008-01-06 23:16:20 +00:00
martinlanghoff 6d5d43bab3 MDL-12523 accesslib: get_user_by_capability() - Handle complex rolecap resolution
With this patch, get_user_by_capability() can handle the cases where
users have multiple role assignments to the same course, and PREVENTs
and PROHIBITs affect the rolecaps of this course.

Without stored procedures we cannot resolve this entirely on the
server side - so in the complex cases we do as much as we can on SQL,
and post-process the data on the PHP side, including SQL-style
pagination.

MDL-12452
2008-01-06 23:16:07 +00:00
martinlanghoff 285b024ebf MDL-12523 accesslib: get_user_by_capability() - First, handle simple cases
This patch reorganises the conditions and field handling so
we can spot if this is a call we can resolve in a single SQL
query that we just pass back the results.

If there are any PREVENTs or PROHIBITs, we need to delve into
more involved stuff...

MDL-12452
2008-01-06 23:15:33 +00:00
martinlanghoff 26de0996d9 MDL-12523 accesslib: revert changes to get_users_by_capability() - MDL-12452 MDL-12451
The changes made by Yu and Tim are superceded by the patches that
follow -- and would not apply cleanly without this revert.
2008-01-06 23:14:25 +00:00
martinlanghoff 18ef2fc61e lib/setup: restore sanity to rcache handling
$CFG->rcache is safe to keep, even as we are reading the config table.

This is because whenever we update the config table, all the rcache
plugins either mark the cache as dirty or they update the cache.

The reason we want to be able to preserve this is that rcache settings
in CFG should usually be set in config.php rather than in the config
table.

With this fix, we support both control points.

Merged from HEAD.
2008-01-06 22:56:11 +00:00
martinlanghoff 73733d1b4b dmllib:rcache_get()/rcache_set() clone cached records - we do not want magic references here - MDL-12827\n And calling fullclone() with the huge cost in serialize()/unserialize() is not needed. Merged from HEAD. 2008-01-06 22:46:49 +00:00
moodler f0a794d200 Automatic installer.php lang files by installer_builder (20080106) 2008-01-06 03:24:42 +00:00
thepurpleblob 235b0335ef MDL-12701:
Missing string

Merged from STABLE_18
2008-01-04 21:05:44 +00:00
stronk7 fea7cdb0ba This change was missing in 19_STABLE 2008-01-04 18:18:18 +00:00
stronk7 c319e83622 Fixing $Id expansion. 2008-01-04 18:13:07 +00:00
moodler 890aec679c FIxed the navigation on the course assign roles tab MDL-12828 2008-01-04 05:19:21 +00:00
moodler 377002f981 Automatic installer.php lang files by installer_builder (20080104) 2008-01-04 03:31:09 +00:00
poltawski c5e1dedb3c MDL-12825 - add some extra height to popups in IE7, otherwise they cant
be used
2008-01-03 22:40:12 +00:00
skodak b85226a64e MDL-12817 logout before 1.9 upgrade in order to prevent weird upgrade problems 2008-01-03 16:36:22 +00:00
skodak c05ce94476 MDL-6786 Improved dropping of block and module tables during uninstall 2008-01-03 15:02:59 +00:00
moodler 2fa04d6d4b Automatic installer.php lang files by installer_builder (20080103) 2008-01-03 03:24:17 +00:00
skodak f113b4cc91 MDL-9744 passwork field for ldap bind pw - patch by Iñaki Arenaza; merged from MOODLE_18_STABLE 2008-01-02 22:54:25 +00:00
skodak 883ceaf293 MDL-10975 enrol_database_sync.php will run even if the plugin is disabled - patch by Braden MacDonald 2008-01-02 22:35:33 +00:00
skodak d282117166 MDL-11471 adodb 4.96a import 2008-01-02 18:37:42 +00:00
skodak d2b41f28a8 MDL-12796 iplookup rewrite; MFC 2008-01-02 16:49:02 +00:00
skodak 4d3e308a52 file geoipregionvars.php was added on branch MOODLE_19_STABLE on 2008-01-02 16:49:05 +0000 2008-01-02 16:48:00 +00:00
skodak a54217c8fd file geoipcity.inc was added on branch MOODLE_19_STABLE on 2008-01-02 16:49:05 +0000 2008-01-02 16:48:00 +00:00
skodak fa0516e1c4 file geoip.inc was added on branch MOODLE_19_STABLE on 2008-01-02 16:49:05 +0000 2008-01-02 16:48:00 +00:00
skodak 5b6d891d19 file earth.jpeg was added on branch MOODLE_19_STABLE on 2008-01-02 16:49:04 +0000 2008-01-02 16:48:00 +00:00
skodak 936649fc69 file README.htm was added on branch MOODLE_19_STABLE on 2008-01-02 16:49:05 +0000 2008-01-02 16:48:00 +00:00
skodak 6a981df540 file ChangeLog.htm was added on branch MOODLE_19_STABLE on 2008-01-02 16:49:04 +0000 2008-01-02 16:48:00 +00:00
skodak 60eb215831 file marker.gif was added on branch MOODLE_19_STABLE on 2008-01-02 16:49:04 +0000 2008-01-02 16:47:59 +00:00
stronk7 789d840942 Respect case of enumvalues. MDL-12803 ; Merged from 18_STABLE 2008-01-02 16:47:34 +00:00
poltawski 8a898cb994 MDL-12789 - dont unnecessarily iterate over all groups 2008-01-01 23:03:02 +00:00
skodak a6c905fdac MDL-12794 admin setting for file location 2008-01-01 22:23:35 +00:00
skodak fb179457ce MDL-12793 PARAM_HOST incorrect cleaning 2008-01-01 17:21:54 +00:00
skodak 9263acf92a MDL-12790 highlighting in admin search results breaks html
MDL-12791 add defaults parameter to format_admin_setting()
MDL-12792 search in admin settings and defaults
+ minor speedup of fast highlighting and fixed empty span tags
2008-01-01 15:51:12 +00:00
poltawski ecf8aad8ca just tweaking comment for easy greppage 2008-01-01 15:30:09 +00:00
stronk7 225ff8f476 Better behaviour for "-" course searches under MSSQL and Oracle. MDL-7312 ; merged from 18_STABLE 2008-01-01 12:01:36 +00:00
moodler 2d00ab58bf Automatic installer.php lang files by installer_builder (20080101) 2008-01-01 03:15:04 +00:00
skodak dc2c453d63 MDL-11845 fixed security issues in curl related code in new download_file_content() + minor fixes in Snoopy 2007-12-31 23:16:56 +00:00
skodak f3566b2674 MDL-12786 admin search in configselect choices 2007-12-31 15:54:28 +00:00
skodak 5cc576de2f MDL-12782 magpie now uses download_file_content() - that should solve several remote RSS issues including proxy user/password + several download_file_content() improvements + other minor fixes 2007-12-31 15:36:48 +00:00
stronk7 1ee938f8ef Removed old timezones file. MDL-12024 ; merged from 18_STABLE 2007-12-31 15:27:11 +00:00
stronk7 40a6466542 Correct timezones listing when importing olson files 2007-12-31 15:24:22 +00:00
stronk7 f7cf45ab80 Prevent some debugging notices, cast to object before inserting. 2007-12-31 15:18:59 +00:00
stronk7 3e04a3cae9 Moving from old "timezones" location to the new "timezone" one. MDL-12024 ; merged from 18_STABLE 2007-12-31 15:06:09 +00:00
poltawski e967a609ae MDL-12777 - No longer a second option so tweak language 2007-12-31 15:01:51 +00:00
stronk7 6a51c3b132 1976 rules from 2007j Olson files. MDL-12024 ; merged from 18_STABLE 2007-12-31 13:22:21 +00:00
stronk7 1dd5f6455f file timezone.txt was added on branch MOODLE_19_STABLE on 2007-12-31 13:22:21 +0000 2007-12-31 13:20:36 +00:00
moodler 1ac07fdbcd Automatic installer.php lang files by installer_builder (20071231) 2007-12-31 03:19:00 +00:00
stronk7 19f28a9a35 Missed this in my previous commit. MDL-12698 2007-12-31 01:09:31 +00:00
stronk7 6dbe0406b6 Change some constants to avoid name collisions. MDL-12698 2007-12-31 01:03:37 +00:00
poltawski 5738a677f2 MDL-11845 - use the http 1.0 'Moved Temporarily' rather than unhelpful 'Found' 2007-12-30 23:09:29 +00:00
skodak 7271bdaf04 MDL-11830 a bit bigger button in login block, removing colons and adding css spacing 2007-12-30 22:54:16 +00:00
skodak bd955d4add MDL-12698, MDL-12569 - fixed inline docs 2007-12-30 22:35:45 +00:00
skodak 668932588a MDL-12775 PARAM_INT value '' automatically converted to 0 in configtext settings 2007-12-30 22:29:47 +00:00
skodak 5a5534d815 MDL-11845 unmask password field type for proxy url - thanks Dan for reminding me 2007-12-30 22:24:38 +00:00
skodak 52d4f11037 MDL-12698, MDL-12569 - componentlib & langimport improvements and fixes 2007-12-30 22:18:39 +00:00
skodak 593eb8ee75 MDL-11845 removing curl emulation library, snoopy has better support for proxies and seems to be more reliable on different platforms; spelling correction cURL instead of Curl; adding all proxy admin settings; better debug messages for file downloading; SOCKS5 proxy support 2007-12-30 19:42:04 +00:00
skodak 994190c63b MDL-12774 allow returning of errors from admin configtext settings 2007-12-30 17:58:30 +00:00
moodler f2bb3ae677 Automatic installer.php lang files by installer_builder (20071230) 2007-12-30 03:16:09 +00:00
mark-nielsen c992ccef67 Merging fixes for MDL-12383 and MDL-12605 from MOODLE_18_STABLE 2007-12-29 22:47:48 +00:00
mark-nielsen 56c256f030 Merging fix for MDL-12605 from MOODLE_18_STABLE 2007-12-29 22:16:03 +00:00
poltawski 3d3e3df555 MDL-11306 - adding a bit of info to try and explain that you can use
.domain.com to allow subdomains
2007-12-29 22:08:21 +00:00
mark-nielsen 69cf3d1ffb Merging fix for MDL-11900 from MOODLE_18_STABLE 2007-12-29 21:49:39 +00:00
mark-nielsen da367cb720 Merging fix for MDL-12610 from MOODLE_18_STABLE 2007-12-29 20:40:18 +00:00
poltawski 8ab536ef8c MDL-9925 - When a user presses cancel on restore they are sent to
/admin/. For teachers this gives an ugly access denied message,
so instead send them back to the course they came from.

Thanks to Wen Hao Chuang for the fix!
2007-12-29 20:29:00 +00:00
poltawski 6984aea08f MDL-12763 - proxy_url() in langimport was doing its own custom proxied
download magic. Convert to use download_file_contents() for more
robust downloads. And also add a more helpful error message while i'm
at it.
2007-12-29 20:01:04 +00:00
skodak e2d53c3d9e MDL-12756 print save button in admin search only when there are settings to save 2007-12-29 16:47:58 +00:00
skodak f62b5930a7 MDL-12752 making unsupported pages truly hidden 2007-12-29 16:35:59 +00:00
poltawski 1a30e1bc5c MDL-7242 eliminate last use of location to refer to city in profile where
it causes problems for translators
2007-12-29 15:35:38 +00:00
moodler 1946941cd7 Automatic installer.php lang files by installer_builder (20071229) 2007-12-29 12:18:40 +00:00
poltawski 3e6c7834ed Remove debugging message 2007-12-29 12:06:10 +00:00
stronk7 b097747f75 Added note about automatic DB creation. MDL-9609 2007-12-29 11:53:25 +00:00
stronk7 93c366d35d New string goes to installer lang files. MDL-9609 2007-12-29 11:50:09 +00:00
stronk7 9dbf0647b4 New string added to note about automatic DB creation. MDL-9609 2007-12-29 11:46:25 +00:00
stronk7 4698d64435 Under MySQL, create the db on install if possible. MDL-9609 2007-12-29 11:27:18 +00:00
moodler b4cc78ec68 Automatic installer.php lang files by installer_builder (20071229) 2007-12-29 03:18:14 +00:00
poltawski bb28536f44 MDL-3842 - tweak file-moving text to clarify 2007-12-28 23:23:46 +00:00
poltawski f0f110ff74 MDL-4962 - intialise var 2007-12-28 22:54:28 +00:00
stronk7 e7282f1fe6 Prevent race condition in event creation. MDL-5956.
Credit goes to Penny, Luke and Martin @ Catalyst.

Merged from MOODLE_18_STABLE
2007-12-28 18:57:45 +00:00
mchurch 23d08ac7be MDL-12703 - Use the 'welcometocourse' language string if there is no 'welcomemessage' property set in the course object. Currently, there does not seem to be any code or data items that would set this property. 2007-12-28 17:12:32 +00:00
mchurch 16614d8106 MDL-12704 - Added error handling to print_recent_activity() to prevent fatal errors in the case of missing files. 2007-12-28 16:00:24 +00:00
poltawski 32261099c9 MDL-5598 - Custom feed titles on RSS block did not allow spaces or other
useful characters ;)
2007-12-28 12:56:32 +00:00
urs_hunkler e0a046d040 MDL-12749 :: print_box_strart was closed with pint_simple_box_end. corrected. 2007-12-28 12:43:43 +00:00
poltawski 2a2113d1be MDL-2414 - using quotes in enrolment keys failed due to slashes. 2007-12-28 12:35:26 +00:00
iarenaza 4efbaec111 MDL-12323 MDL-4061 Don't connect to the LDAP server if update external is not set for any field.
Forward ported from MOODLE_18_STABLE
2007-12-28 12:08:57 +00:00
moodler 5fcd786eca Automatic installer.php lang files by installer_builder (20071228) 2007-12-28 03:33:58 +00:00
mchurch aef130f71e MDL-12744 - Add ability to pass an extra button for use in print header for modules that use the course page to display themselves with blocks. 2007-12-27 21:32:04 +00:00
urs_hunkler d7d14a80ef MDL-12745 :: added class clearfix to "form-item" to stop div collapsing. 2007-12-27 20:54:33 +00:00
poltawski f1b73b438f MDL-12209 - fix css errors 2007-12-27 15:38:53 +00:00
poltawski 1107dde0a1 ZZMDL-12345 - use consistent ordering on both sides of the assign group members
pane, sorted by lastname like other screens
2007-12-27 13:39:43 +00:00
poltawski 11bdc5ab49 MDL-12530 - fixed changing of tag type in tag management 2007-12-27 12:11:21 +00:00
poltawski ed3e48f765 MDL-9312 - prevent more than 20 chars being typed in city field, (we only
store 20 chars )
2007-12-27 11:35:38 +00:00
poltawski 9964700f5b MDL-12640 - if $CFG->country is set, use it for signup default 2007-12-27 11:17:58 +00:00
stronk7 17f1039b58 Bump to 1.9 beta 3 2007-12-27 00:15:12 +00:00
skodak 36d703a877 MDL-9552 reverting the [$userid] change - we do need array there in upgrades and changes in modedit 2007-12-26 23:20:54 +00:00
poltawski 08b6eeeae3 MDL-4164 - fix typo 2007-12-26 22:12:23 +00:00
poltawski e3a87a68b9 MDL-3776 fix typo 2007-12-26 21:40:01 +00:00
skodak ad2c8da954 MDL-12735 Make AJAX on by default, add option to disable AJAX course editing by default 2007-12-26 21:32:34 +00:00
poltawski f6453c1cde MDL-12734, fix calling print_header() twice 2007-12-26 20:18:14 +00:00
poltawski c5f4b371fe MDL-2013 - Stop resource auto-linking from occuring when resources are hidden 2007-12-26 17:41:48 +00:00
skodak cf0352fa3b MDL-12729 show recoverable fatal errors in DEBUG_ALL and DEBUG_DEVELOPER 2007-12-26 13:31:52 +00:00
skodak 50726e2969 MDL-12351 verify active group before use because allowed groups may change 2007-12-26 12:41:54 +00:00
skodak 05a3688962 MDL-12728 missing USER->mnehostid in forum cron processing 2007-12-25 22:21:19 +00:00
skodak 564c1a9392 MDL-11783 no uploads after finalising 2007-12-25 22:02:05 +00:00
skodak 1665e2d3b6 MDL-11758 removing one htmlpurifier file to prevent problems on some systems 2007-12-25 21:05:33 +00:00
skodak fbedee57ef MDL-12338 prevent KSES from breaking í chars in alt/title tags - credit goes to Eloy 2007-12-25 20:55:57 +00:00
skodak e262e268b2 MDL-12458 fixed gradebook upgrade/update problems when not grades yet in activities 2007-12-25 20:50:42 +00:00
skodak 3ff4e0d771 MDL-11561 tex debug leaking sensitive info 2007-12-25 11:41:46 +00:00
skodak 8450217132 MDL-11561 improved text filter cache resetting when settings change; fixed bug causing fatal errors if html purifier enabled during upgrade 2007-12-25 10:03:16 +00:00
moodler b2bc7cc85c Automatic installer.php lang files by installer_builder (20071225) 2007-12-25 03:17:23 +00:00
poltawski 8a4cb9dd5e MDL-12697 Category Themes do not appear when editing off 2007-12-25 00:59:31 +00:00
skodak 74a05d3fc8 MDL-12725 remove_dir() does not return correct status and fails if dir does not exist + improved sanity test in check_dir_exists() 2007-12-24 21:15:05 +00:00
skodak cb6400a485 MDL-12724 import of html purifier 2.1.3 2007-12-24 21:06:34 +00:00
skodak c525a81701 MDL-12713 all IE versions are broken beyond belief, rewrite of admin tree collapsing/expanding 2007-12-24 20:53:20 +00:00
moodler 7938b1cced Automatic installer.php lang files by installer_builder (20071224) 2007-12-24 03:21:34 +00:00
arborrow 1444c9d07e added comment to see MDL-9609 for progress on resolving auto creation of MySQL database 2007-12-24 02:35:49 +00:00
skodak 54e0d9a55c MDL-12720 removing confusing/not implemented CONTEXT_PERSONAL 2007-12-23 20:00:51 +00:00
skodak 9ddbe2cfb8 MDL-12720 removing confusing/not implemented CONTEXT_PERSONAL 2007-12-23 19:47:59 +00:00
poltawski cbf2ebdeee MDL-9981 - remove hardcoded admin path 2007-12-23 17:20:44 +00:00
poltawski 37c9edcbdf MDL-10611 - backslashes in username get doubled up with an nonsuccessful log in
merged from MOODLE_18_STABLE
2007-12-23 16:41:48 +00:00
poltawski 5dc7db71af MDL-10241 - unenrolling self wasn't working properly from user profile
because unenrol.php was doing wrong capability check when $userid set.o
Also improves the lanaguage used when unenrolling self.
merged from MOODLE_18_STABLE
2007-12-23 16:17:13 +00:00
poltawski 868f172373 MDL-10607 - support single quotes in db user/password in installer 2007-12-23 13:26:54 +00:00
skodak 4bdb55f50b MDL-12716 fixed admin setting for rcache; more robust rcache handling in setup.php 2007-12-23 13:08:56 +00:00
skodak 0c6d0ae8ed MDL-12717 use apply_default_exception_settings before other admin defaults 2007-12-23 12:04:59 +00:00
skodak 05b11fcb66 MDL-12714 no guest autologin for admin settings 2007-12-23 11:52:59 +00:00
skodak 8d6e06a18a MDL-12711 use 'checked' value for enabled resource_popup 2007-12-23 11:49:42 +00:00
skodak ed2d5284f7 MDL-12712 fixed multiselect when nothing selected 2007-12-22 21:57:28 +00:00
poltawski 2be702e457 MDL-12707 - moved hotpot/ lams to use new admin settings
backported from HEAD
2007-12-22 20:04:11 +00:00
poltawski 7c23e5eff3 file settings.php was added on branch MOODLE_19_STABLE on 2007-12-22 20:04:12 +0000 2007-12-22 19:57:46 +00:00
skodak eeaf6aa373 MDL-12705 disabled guest autoogin in upgrade scripts 2007-12-22 18:16:22 +00:00
poltawski d44522b5f7 MDL-12706 - fix caps typo 2007-12-22 17:04:09 +00:00
moodler 068deeb136 Automatic installer.php lang files by installer_builder (20071222) 2007-12-21 19:10:26 +00:00
tjhunt 6bd8edfbde Ensure links of the form /mod/quiz/view.php?q=332 are backed up and restored correctly. 2007-12-21 15:38:38 +00:00
tjhunt 88b020ce95 Sort the add activites dropdown using the locale. 2007-12-21 15:37:50 +00:00
nfreear 999fb96f7b Merged MDL-7493 further fix: clean up themes, and remove references to 'hide-show-image' background images. Document smartpix for theming icons in wood and orangewhite readmes. 2007-12-21 12:01:24 +00:00
nfreear f7bd77baf5 Merged MDL-7493 further fix: strip_tags from title strings because the titles may have HTML in them.
-From Martin D/moodler in moodleblock.class.php - thanks.
2007-12-21 11:28:50 +00:00
skodak 67c2776bae MDL-12690 use the same title for block in admin tree as in blocks manage page 2007-12-21 09:52:20 +00:00
scyrma dc82ac6eff Let the admin choose if a textfield is to be shown as plain text or as a password (with '*' in place of normal text) 2007-12-21 08:17:36 +00:00
moodler 0319f6ccac Automatic installer.php lang files by installer_builder (20071221) 2007-12-21 03:24:25 +00:00
stronk7 13ffbef897 tidy up phpdoc 2007-12-20 23:16:51 +00:00
stronk7 c15475c93b After some more tests... apply the new preconfigure_dbconnection()
to core. MDL-12657
2007-12-20 23:12:51 +00:00
stronk7 73c4f0de0e Adding the new preconfigure_dbconnection() function
to pre-define some BD/ADOdb stuff before connection. MDL-12657
2007-12-20 22:51:10 +00:00
skodak c7d6dce97d MDL-12683 - fixing broken tex in windows (borked by my last commit) sorry 2007-12-20 21:37:00 +00:00
skodak 45158bdb9d MDL-12443 use "UTF-8" label instead of "None" in sitemailcharset select box 2007-12-20 21:16:33 +00:00
skodak 766acf6ce4 MDL-12684 fixing wrong link to manual settings page - settings.php not implemented yet, sorry 2007-12-20 20:59:13 +00:00
poltawski 5d2fb0f679 MDL-12159 - We were only showing the filter selections to the user list when
there were more results than shown on the current page. This is unintuitive
with small lists where we were invisibly exluding users because of a filter
which is applied (but not shown on screen).

Now we always show the filter selections. Thanks to John Ryan.
2007-12-20 17:42:30 +00:00
skodak 583c8c1ebe MDL-12680 Assignment count for groups not working - patch by Greg Humphreys 2007-12-20 17:37:52 +00:00
poltawski cf20428733 MDL-12668 - Various themes not respecting theme varaibles 2007-12-20 17:31:18 +00:00
skodak 7e9b2809a9 MDL-12678 moved pinned blocks setup page to Modules/Blocks/ 2007-12-20 16:30:39 +00:00
skodak ed277edea0 MDL-11814 use system context for pinned blocks 2007-12-20 16:25:17 +00:00
poltawski 0c3cdd4d79 MDL-12638 - fixed typo 2007-12-20 16:16:50 +00:00
poltawski ae74081cc3 MDL-12670 - fix warning when groupings not enabled 2007-12-20 16:10:03 +00:00
poltawski 847af02833 MDL-12676 - generate navigation if none supplied to print_header_simple() 2007-12-20 15:48:37 +00:00
tjhunt 176c6e8a23 MDL-12675 - Give teachers a direct link from the quiz index page to the results. 2007-12-20 15:11:01 +00:00
poltawski bcb2b60ff9 MDL-12674 - use require_capability on the participants page to get
friendly error messages
2007-12-20 15:09:40 +00:00
skodak 59a1e0f320 MDL12672 fixed parent::search trouble 2007-12-20 14:38:01 +00:00
tjhunt 204f51c760 MDL-12666 - When moving questions between categories, we should default to copying amy linked files. 2007-12-20 11:26:50 +00:00
skodak 0d3b5bdc16 MDL-10464 user list download in bulk ops 2007-12-20 10:54:07 +00:00
skodak 165ea8e3bb MDL-12659 fixed warning 2007-12-20 09:00:59 +00:00
moodler 5f4d28ccf9 MDL-7493 further fix: strip_tags from title strings because the titles may have HTML in them. 2007-12-20 01:50:38 +00:00
whchuang 2b9cc5a966 Fixed MDL-11812, thanks to Alan Trick's report 2007-12-20 01:35:17 +00:00
mjollnir_ 363d415464 fixing lying phpdoc comments in role_cap_duplicate function that I moved to accesslib yesterday 2007-12-19 23:32:15 +00:00
skodak 4d3769bf61 MDL-12656 indicate when current value is incorrect and propose default instead in admin settings 2007-12-19 22:37:37 +00:00
poltawski bc97420bd4 MDL-11561 - tweaking language a bit 2007-12-19 22:35:49 +00:00
skodak a5b7f1ab73 MDL-12655 set_config() should cast values to string because get_config does that too 2007-12-19 22:31:16 +00:00
poltawski a3eed2b0c0 MDL-11561 - remove unused variable 2007-12-19 21:06:12 +00:00
diml c695bf2783 adding keys for LESSON Module 2007-12-19 19:29:26 +00:00
skodak a8419f1a9d MDL-11561 use 60x8 text area to fit on all screens 2007-12-19 18:41:09 +00:00
skodak 00c2507ab0 MDL-11561 nail the editor width to 640px in admin settings pages - prevents resize problems (whitespace fix) 2007-12-19 18:25:19 +00:00
skodak 285286acf3 MDL-11561 nail the editor width to 640px in admin settings pages - prevents resize problems 2007-12-19 18:24:57 +00:00
skodak 765e3e8e82 MDL-10401 redirect to site/admin/ if section error found 2007-12-19 18:04:18 +00:00
skodak 3e1f8e095c MDL-12858 fix course category depths during upgrade to 1.9 2007-12-19 17:47:31 +00:00
skodak 40f43aa1fc MDL-11561 admin tree improvements and bugfixing; backported from HEAD 2007-12-19 17:38:37 +00:00
skodak d7381358f8 file filtersettings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:49 +0000 2007-12-19 17:35:28 +00:00
skodak 530239bbc9 file settings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:49 +0000 2007-12-19 17:35:27 +00:00
skodak 92c1df4735 file settings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:45 +0000 2007-12-19 17:35:26 +00:00
skodak 07053e3df5 file settings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:41 +0000 2007-12-19 17:35:26 +00:00
skodak 86a42c8ac9 file filtersettings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:43 +0000 2007-12-19 17:35:26 +00:00
skodak 8caa580efd file plugins.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:37 +0000 2007-12-19 17:35:25 +00:00
skodak 618689ef22 file lib.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:41 +0000 2007-12-19 17:35:24 +00:00
skodak 6237517812 file filtersettings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:42 +0000 2007-12-19 17:35:24 +00:00
skodak 5b8f6bcc0b file settings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:48 +0000 2007-12-19 17:35:22 +00:00
skodak 2328f76997 file settings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:47 +0000 2007-12-19 17:35:22 +00:00
skodak f58505164c file settings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:43 +0000 2007-12-19 17:35:22 +00:00
skodak 0384e168e8 file settings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:46 +0000 2007-12-19 17:35:21 +00:00
skodak 14b34c4af3 file filtersettings.php was added on branch MOODLE_19_STABLE on 2007-12-19 17:38:45 +0000 2007-12-19 17:35:21 +00:00
tjhunt 6dd47a844f Teach XMLDB about the local/db folder, but only include it if the local folders exists. 2007-12-19 15:06:52 +00:00
nfreear b310a2d7c0 Followup for MDL-7493... - Finally the correct images! fix transparency, and improve contrast in Windows High Contrast Black mode. Merged. 2007-12-19 13:39:11 +00:00
tjhunt 7542409d39 New option on print_single_button to all printing of disabled buttons. 2007-12-19 13:31:06 +00:00
tjhunt 5af229ea58 gradebook / graded_users_iterator - Typo in conditional. 2007-12-19 12:40:02 +00:00
tjhunt 16ee776952 MDL-12647 - Moving multiple_choice questions between contexts breaks them.
There was a subtle interaction between get_question_options  and replace_file_links for this question type.
2007-12-19 12:10:50 +00:00
scyrma e8fe560958 Fix a bug passed on after commit of by http://lists.moodle.org/arc/commits/2007-12/msg00352.html
There shouldn't be html tags in this place.
2007-12-19 05:57:24 +00:00
poltawski 0600c266e9 MDL-12639 - prevent debug warnings about help buttons on database presets 2007-12-18 21:25:21 +00:00
mjollnir_ 4f5ffe5a7e moving two functions from admin/roles/manage.php (switch_roles and role_cap_duplicate) to accesslib & added phpdoc. Fixes MDL-12621 2007-12-18 20:50:39 +00:00
tjhunt e5f0e7d200 Improve the quiz_rescale_grade function, and call it from one other place, instead of duplicating code. 2007-12-18 18:19:36 +00:00
skodak b9015c2c2b MDL-12496, MDL-11889 allow deleting of activities with disabled grading from gradebook 2007-12-18 17:37:45 +00:00
nfreear fc025aeae5 Fixes reopened MDL-7493... - foreground show/hide block icon/ALT text switched with Javscript. Merged. 2007-12-18 17:25:59 +00:00
tjhunt 3f7c4ee5c4 MDL-12635 - Manual grading report does not check capabilites - also, only show the tabs for the reports people can access. 2007-12-18 16:11:41 +00:00
poltawski dca17878da MDL-12515 Feedback not available to student on assignments unless a grade has been assigned 2007-12-18 15:35:35 +00:00
tjhunt 5db5737b4f MDL-12517 - fix typo in the last commit. 2007-12-18 14:57:05 +00:00
skodak 7293bdf4cb MDL-12517 reverting the moving of data processign, returning array of warnings instead from function 2007-12-18 13:52:15 +00:00
skodak 44e65ebf62 MDL-12517 null not treated properly, max instead of min typo and pretty please initialize all objects properly 2007-12-18 13:26:30 +00:00
skodak 5b6219a750 MDL-12628 acces typo fixed 2007-12-18 11:59:52 +00:00
scyrma 72d707a346 MDL-12613 - this should fix (part of) the problem with the search block (take 2) 2007-12-18 08:17:13 +00:00
scyrma 075e3c715d MDL-12613 - this should fix the problem with the search block 2007-12-18 07:53:32 +00:00
moodler 7fdfade8dc Automatic installer.php lang files by installer_builder (20071218) 2007-12-18 03:26:51 +00:00
skodak 470b711740 MDL-12103 new config option for mail newline chars 2007-12-17 23:39:43 +00:00
skodak e1be3139a4 MDL-12524 fixed quoting of phrases in mail header (problem with special chars in names of users) 2007-12-17 21:37:59 +00:00
tjhunt cfa16a536e Strip out an unneccessary HTML table that way causing a 'button moves when you try to click on it' problem. 2007-12-17 17:17:17 +00:00
tjhunt 860f345ceb Minor quiz layout improvements. 2007-12-17 16:56:16 +00:00
tjhunt 833711e3b8 Unset a meaningless id. This probably does not change anything in moodle, but it was part of a bug fix in the OU version of Moodle that seemed correct, so I am merging it over. 2007-12-17 15:29:43 +00:00
tjhunt 204666c569 MDL-12616 - Improve layout so you can distinguish the student's response to an essay question from the feedback. 2007-12-17 12:28:00 +00:00
fmarier 00ff61c64a course/lib: Cache get_categories() using a static variable (MDL-11938)
Some recursive functions call get_categories() repeatedly to get all of the
child categories of the current one.

This commit create a lazily-initialized cache of all of the categories so
that the database is only queried once to retrieve all of the categories.

It speeds up the both the homepage and the course edit page (where the
categories are displayed in combo boxes).
2007-12-17 04:48:52 +00:00
poltawski 0b777b60c6 MDL-12385 - glossary category edit page doesn't respect $CFG->pixpath 2007-12-16 18:15:00 +00:00
poltawski 071680021c MDL-11086 - more tweaks to helpfile as per Rays suggestions 2007-12-16 16:13:26 +00:00
skodak 04a9e1a834 MDL-12596 Timezone problem in PHPMailer RFCDate() Function - patch submitted by Leo Gaggl 2007-12-16 14:50:02 +00:00
poltawski 5b243bb55d MDL-11191 - lets not advocate copyright abuse by advising to steal pictures
from the web!
2007-12-16 11:57:34 +00:00
skodak 60414b0b11 MDL-12599 , MDL-12598 - fixed capability tests in user and overview reports 2007-12-16 10:53:36 +00:00
skodak f337e9c2c9 MDL-12598 use user context instead of personal 2007-12-16 10:34:41 +00:00
urs_hunkler 6c9f235d93 CSS cleanups :: collect some background definitions in a basic property and work with cascading to more special definitions. 2007-12-16 09:39:52 +00:00
poltawski dd377953f7 MDL-12593 - hidden role assignment icon wasn't being shown. Also prevent warning
about unset $hidden
2007-12-15 23:27:01 +00:00
poltawski 2559de3be6 Improving phpdocs for when to use format_string()/format_text() based on
wiki comments. It wasn't an entirely clear (e.g. mixup in MDL-11800)
2007-12-15 18:40:18 +00:00
skodak 504e7efe76 MDL-12580 fixed infinite redirect loop when editing profile for the first time 2007-12-15 16:56:33 +00:00
skodak 138b92ce7f MDL-12592 do not execute theme_setup() if header already printed 2007-12-15 16:52:27 +00:00
skodak 7d23e00836 MDL-12581 fixed multiple xhtml strict 2007-12-15 16:05:30 +00:00
skodak 05719ae21a MDL-12585 make sure category path, parent and depth are ok before creating contexts 2007-12-15 15:46:37 +00:00
skodak 2637d1d193 MDL-8992 eoas hack added only when really needed, removed slow fullclone 2007-12-15 13:20:28 +00:00
skodak 62d19b5336 MDL-11800 improving previous commit 2007-12-15 12:05:12 +00:00
skodak 4df7a2ef4f MDL-12570 option to disable lang autodetect from browser 2007-12-15 11:48:34 +00:00
stronk7 8b32d8e829 19_STABLE version bump by delta. Modify some timezone fields to accept new olson files. MDL-12024 2007-12-15 00:31:31 +00:00
stronk7 b0f0e1bb3a Modify some timezone fields to accept new olson files. MDL-12024
Merged from MOODLE_18_STABLE
2007-12-15 00:30:41 +00:00
skodak 7fdb5ee675 MDL-12221 reworked container autoclosing - error() and notice() do not work everywhere though; notice print header if needed now; new print_footer('empty') for empty footer - removes some hacky </body></html> 2007-12-14 21:21:06 +00:00
toyomoyo fc9aacd2d7 MDL-9290, restore performance improvements on reading xml 2007-12-14 06:15:11 +00:00
urs_hunkler 7006fb7609 MDL-12221 :: Some enhancements to handle the changed boxes - work in progress. 2007-12-13 20:21:05 +00:00
urs_hunkler aeb10b1c28 MDL-11438 :: added screenshot.jpg to prevent IEs crashing on the them selection page. 2007-12-13 20:17:37 +00:00
tjhunt c9cde2149e MDL-12575 - Backup and restore problems with the new question bank. 2007-12-13 18:48:16 +00:00
stronk7 ac11681809 Added the sql_cast_char2int() funtion to provide cross-db
casting from char/text to integer. MDL-12574
2007-12-13 18:00:30 +00:00
tjhunt ddd8279beb Improve error messages. 2007-12-13 17:24:51 +00:00
tjhunt 6a729d0756 MDL-12517 - Further refinement. Move the processing to after print_header, so any notices do not break XHTML strict. 2007-12-13 14:26:01 +00:00
tjhunt 99a4959494 MDL-12517 - Move checking code into the user interface layer where it belongs. 2007-12-13 14:17:29 +00:00
toyomoyo c912cc7258 MDL-12517, notify when grades entered into gradebook is out of bounds 2007-12-13 07:08:52 +00:00
toyomoyo 86b73f8e9c MDL-12470, fixing broken span tag 2007-12-13 02:32:27 +00:00
tjhunt 946db1620f MDL-11267 - follow-up - don't show the checkboxes in the overview report if you cannot do anything with them. 2007-12-12 19:12:54 +00:00
tjhunt a488df2a95 Improve PHP doc comments. 2007-12-12 19:02:01 +00:00
tjhunt 4e0af3b107 Fix Javascript error from essay questions on the review page. 2007-12-12 18:10:50 +00:00
tjhunt b7f00cff12 Fix notice. 2007-12-12 17:47:37 +00:00
tjhunt ea7f759cbf MDL-9459 - Provide information relating to groups in the summary message "Attemts: 123". Now, depending on the situation, you see one of three messages: "Attempts: 123", "Attemtps 123 (45 from your groups)" or "Attemtps 123 (45 from this group)".
I also took the opportunity to improve the layout of this message slightly, and clarify the message that tells you that you cannot add or remove questions from the quiz if there are attemts.
2007-12-12 17:23:38 +00:00
tjhunt 297178bc87 Improve PHP doc comments. 2007-12-12 17:10:51 +00:00
toyomoyo 82b7f28a61 MDL-12544, hide hidden roles in profile when user has no capability 2007-12-12 07:12:38 +00:00
toyomoyo d40f5b74e6 MDL-12550, wrong user count in role assignment 2007-12-12 03:28:41 +00:00
stronk7 214f6d7493 Reintroducing the possibility to declare a second row of tabs
via extratabs. MDL-12551
2007-12-12 00:56:54 +00:00
stronk7 a88c2ffdaa Adding the ability to perform custom uninstall tasks in modules. MDL-12520 2007-12-11 23:38:38 +00:00
tjhunt 5775ef80c0 MDL-12546 - The choice module was calling get_users_by_capability, which hammers the database and returns lots of data, inside a loop over users - and it was calling it with identical parameters each time. Ouch!
Actually, since the fix for MDL-12331, which changed the get_users_by_capability call at the top of this function, the check it was doing is entirely redundant anyway, so I removed it.
2007-12-11 18:49:44 +00:00
tjhunt 0eea4f9355 MDL-12543 - Quiz overview report displays a grade of 0 the same way as a missing grade for an incomplete attempt. 2007-12-11 16:55:40 +00:00
tjhunt 8d531749c3 MDL-8682 - followup. When disabling the enter key, don't disable it on links. That is bad for accessibility. 2007-12-11 16:23:32 +00:00
tjhunt 6233a11b29 MDL-12542 - backup_todb not called on restore on date before it is inserted into mdl_user. This would cause a backup from a pre 1.7 site (or a pre 1.7 that has been upgraded to 1.9) to a 1.9 fresh install, to fail sometimes. 2007-12-11 15:21:28 +00:00
nfreear 0a440a8682 Fixes MDL-12541 "Weeks course format - dates for each section should be marked up as heading". 2007-12-11 15:17:55 +00:00
tjhunt c6d734d3f9 MDL-12540 - Quiz sometimes outputs content before <head> when previewing - breaks HTML strict. 2007-12-11 15:04:09 +00:00
nfreear 2ec308a8b5 Fixes MDL-12539 "Help link text for all admin/user filters are broken". Merged. 2007-12-11 14:01:17 +00:00
nfreear 29308ee5da Fixes MDL-12539 "Help link text for all admin/user filters are broken". Merged. 2007-12-11 13:01:13 +00:00
tjhunt eabc30d78b Take out debugging output in role_assign. It only tells you that something has worked, and everywhere else we use debugging output to warn people they have called an API wrongly. Therefore, this is just confusing now that we trust this bit of roles code. 2007-12-11 10:37:56 +00:00
toyomoyo 66064c5262 MDL-12504, gradebook export does not respect course item position 2007-12-11 05:42:08 +00:00
scyrma 1c8bf4e4c2 prevent some notices, cleaner code. 2007-12-11 05:09:08 +00:00
scyrma 64fa3a1f8f MDL-12528 - getElementById was misspelled. 2007-12-11 04:58:13 +00:00
jamiesensei be350cb127 MDL-12410 - a way to select which questions to export, includes debug messages 2007-12-11 03:54:21 +00:00
toyomoyo 0abcfef0c9 MDL-12463, do not backup mod gradeitems if not selected 2007-12-11 03:15:33 +00:00
toyomoyo ed8bd3952b MDL-12519. grader report row colors override highlighting 2007-12-11 02:04:00 +00:00
martinlanghoff 25977a0eaf MDL-12523 accesslib:cleanup_contexts() - Fix invalid SQL syntax and reserved keywords
cleanup_contexts() was not working on Oracle - mostly due to 2 SQL
syntax problems. So probably marginally working elsewhere.

 - We should not use AS when naming table/subselect aliases - only
   when referring to column aliases in the resultset

 - level is a reserved word - oops! - so back to contextlevel
2007-12-10 21:34:05 +00:00
tjhunt abc011e5cc MDL-12512 - Gradebook calculations are broken. This was caused by == FALSE that should have been === FALSE deep in the 3rd pary maths lib. 2007-12-10 17:37:01 +00:00
tjhunt 1bb997ecc3 Do not suppress errors from developers! it makes debugging a nightmare! 2007-12-10 16:53:11 +00:00
tjhunt 200640a52c Fix notice in numerical question. 2007-12-10 11:57:22 +00:00
stronk7 2494fa8c7b Document MDL-12378 2007-12-09 18:21:39 +00:00
stronk7 6931f8a7b5 Prevent XHTML breackage. MDL-12378 2007-12-09 18:19:24 +00:00
skodak d6948ebc6a MDL-11835 proper merging 2007-12-09 15:26:00 +00:00
stronk7 91cd49491c Changing wrong UNSIGNEDs to nulls in tests. MDL-11662 2007-12-08 18:52:12 +00:00
stronk7 c9a6c442a3 Changing XMLDB_UNSIGNED to nulls for non-numeric types. MDL-11662 2007-12-08 18:33:33 +00:00
stronk7 25da458902 XMLDB_UNSIGNED only applicable to number types. MDL-11662 2007-12-08 18:18:56 +00:00
tjhunt f8c7c3ae32 MDL-12501 - Logic for including 'Grades' link in admin block is different for the logic in grade/report/index.php. 2007-12-07 16:57:53 +00:00
sam_marshall cc4dae1350 MDL-12500 Fixed restore conversion for links in database templates 2007-12-07 16:26:07 +00:00
stronk7 1b2335b2c6 Using new cross-db sql_isnotempty() function. MDL-12084
Backporte from HEAD
2007-12-07 16:02:08 +00:00
sam_marshall ac1b88eab8 MDL-11845 Last checkin accidentally omitted a require_once (hopefully finally done now!!) 2007-12-07 11:11:13 +00:00
sam_marshall 58520f98b0 MDL-11845 Updated the three file downloads from Snoopy to download_file_content (which I didn't know about before :) 2007-12-07 10:23:27 +00:00
moodler 3563da4aad Added some whitespace as a test, sorry for the noise 2007-12-07 08:12:43 +00:00
moodler 15ad5491a4 Added whitepspace 2007-12-07 07:45:52 +00:00
fmarier ec7125dc19 weblib: Fix typo in print_table() which was causing invalid <th> tag
MDL-11506
2007-12-07 04:59:32 +00:00
toyomoyo 8353edcdf1 customized cron should be in dirroot/local/cron.php 2007-12-07 04:38:57 +00:00
toyomoyo b1b887fd84 MDL-12373, restore should not try to restore pre 1.9 gradebook categories 2007-12-07 04:06:33 +00:00
moodler ba1674a11c A test commit, only whitespace affected 2007-12-07 02:26:59 +00:00
toyomoyo 9132d15eca MDL-12432, do not enable 'updated only' grades export for other plugins 2007-12-07 01:40:45 +00:00
mattc-catalyst b97e501d33 MDL-12433: course/info respect the $CFG->allowvisiblecoursesinhiddencategories setting
Credit goes to Petr Kalis
2007-12-07 00:24:29 +00:00
mattc-catalyst 4ead5c7e3c MDL-12335: mod/lesson - fixed missing navigation links 2007-12-06 22:52:27 +00:00
sam_marshall a8e3b790b5 MDL-11845 Support for config proxy options when downloading language packs (& other components), timezone file 2007-12-06 18:07:42 +00:00
poltawski e0af2ed26c MDL-12464 - if a glossary is deleted, it causes some breakage in the
random glossary entry block
2007-12-06 15:42:01 +00:00
skodak a964e03d4f fixing unmerged files 2007-12-06 09:30:45 +00:00
skodak 0cec6e0c68 fixing unmerged files 2007-12-06 09:23:27 +00:00
skodak f8ed98f83b fixing unmerged files 2007-12-06 09:02:02 +00:00
moodler 6aac29e4ef Bumped the version to Beta 3 for new CVS server 2007-12-06 07:46:42 +00:00
toyomoyo be8e377c91 MDL-12352, block/search fails to install on postgres 2007-12-06 07:07:32 +00:00
moodler 3bdac46d14 Automatic installer.php lang files by installer_builder (20071206) 2007-12-06 05:22:42 +00:00
toyomoyo a08b933a00 MDL-12451, in get_users_by_capability(), defaultroleid bit fixes 2007-12-06 03:55:19 +00:00
tjhunt ccc64d9cf0 MDL-12452 - not a fix I fear, just clarifying the comments about how this method is broken. 2007-12-05 17:25:18 +00:00
tjhunt 22dd4e275a MDL-12438 - followup - fix typos. Thanks to Dan Poltawski. 2007-12-05 16:50:15 +00:00
tjhunt ecfa2d90ff MDL-12450 - Matching up roles on the restore settings form is broken - this is basically a complete rewrite of these two functions. 2007-12-05 16:13:59 +00:00
diml 6e7e89849a fixing security hole. reference : http://moodle.org/mod/forum/discuss.php?d=85748#p379857
Inaki Arenzana
2007-12-05 15:55:27 +00:00
poltawski 33dfd09c2d MDL-12446 - profile signup page not respecting custom user profile field
sortorder
2007-12-05 14:29:55 +00:00
nicolasconnault 4e5fa682b5 MDL-11835 Implemented changes discussed in http://moodle.org/mod/forum/discuss.php?d=85908. Also added item name and module name and category name (for category totals) in alt tags of icons 2007-12-05 09:35:18 +00:00
toyomoyo 1c47be2472 MDL-12430, if new and regrade are chosen, then preview hides 'old' students 2007-12-05 07:49:21 +00:00
toyomoyo 566e9d1313 MDL-12439 database preset fixes 2007-12-05 06:12:38 +00:00
toyomoyo 26deeb61ab MDL-12435, cancel in preferences form doesn't work 2007-12-05 02:58:54 +00:00
toyomoyo c635d2acc8 MDL-12437, sorting by names adds teacher to gradebook list 2007-12-05 01:12:02 +00:00
skodak ce9dd0470a MDL-12133 fixed regression in user advanced edit, sorry 2007-12-04 23:52:09 +00:00
mudrd8mz 907e321018 Do not produce PHP warnings in case string file does not define array $string 2007-12-04 21:50:35 +00:00
tjhunt a7502277f2 MDL-12438 - Print a develoer debug message if you call get_records with a non-unique first column. 2007-12-04 17:29:35 +00:00
nicolasconnault 5203f7252e MDL-11835 Implemented all the default settings suggested in the pdf report, and turned down the size of the report table fonts. 2007-12-04 16:05:57 +00:00
poltawski d5ca7a5706 MDL-12415 - When we have more than one category/lots of courses the course
block shows two links next to search other (Search Courses/All courses)
which point to the same place....

The all courses link is able to be switched off and the search courses is not,
for this reason i've gone for removing the search courses link.
2007-12-04 12:54:47 +00:00
sam_marshall afeec49db6 MDL-12431 Added ability for filters to contain lang files 2007-12-04 11:46:12 +00:00
nicolasconnault dbb552852a MDL-12389 Removed the selectallornone element in favour of a more generic submitlink element. The checkbox controller is now added to a form using moodleform::add_checkbox_controller. 2007-12-04 10:27:14 +00:00
martinlanghoff 7e17fa336e datalib: get_logs_user*() - fix invalid SQL - MDL-12426
Oracle does not accept column labels in the GROUP BY section -
get_logs_usercourse() and get_logs_userday() were computing the
day/hours column and using it in the GROUP BY. The compatible fix
is to reproduce the same computation in the GROUP BY section.

Credit for the fix goes to Dennis Rochford <Dennis.Rochford@usq.edu.au>.
2007-12-04 06:24:23 +00:00
martinlanghoff fc3a00b2dc blocks/online_users: Remove SQL "id,id" which causes errors on Oracle - MDL-12425
Credit for the fix goes to Dennis Rochford <Dennis.Rochford@usq.edu.au>
2007-12-04 06:23:44 +00:00
martinlanghoff a3fd4aeea7 mod/assignment: Remove SQL "id,id" which causes errors on Oracle - MDL-12425
This loop also needs some rewriting - it is _very_ inefficient on
large courses.
2007-12-04 06:23:23 +00:00
martinlanghoff eaad116912 accesslib: build_context_path() remove $temptable for Oracle too
The removal of $temptable was incomplete - and so build_context_path()
was broken on Oracle. MDL-11347
2007-12-04 06:23:06 +00:00
moodler 522437d506 Automatic installer.php lang files by installer_builder (20071204) 2007-12-04 05:24:57 +00:00
toyomoyo 8473f41780 MDL-12399, shorten_text() truncates all closing tags 2007-12-04 05:07:11 +00:00
toyomoyo d5694b16bb MDL-12419, do not present course start date if start date is invalid 2007-12-04 01:07:59 +00:00
toyomoyo ff302bdbb9 MDL-12419, do not present course start date if start date is invalid 2007-12-04 01:03:12 +00:00
fmarier ce32e5047d ddllib: Mark table_column() as deprecated
Signed-off-by: Eloy Lafuente
2007-12-03 23:19:17 +00:00
stronk7 50371de63b Adding some outer spaces to returned SQL to avoid wrong
sentences caused by concatenation.

Merged from MOODLE_18_STABLE
2007-12-03 20:43:43 +00:00
stronk7 257d6684ca Adding two new functions: sql_isempty() and sql_isnotempty() to perform
SQL comparisons to empties in a cross-db way. General solution for
problems like MDL-12084

Merged from MOODLE_18_STABLE
2007-12-03 20:28:45 +00:00
nicolasconnault 4d502df33f MDL-12389 Removed testing code 2007-12-03 20:07:24 +00:00
nfreear 9008efba33 Fixes bug MDL-12416, Help links - img ALT text should contain phrase "new window" to match link TITLE. Merged. 2007-12-03 16:44:49 +00:00
nicolasconnault 3e328cac4e MDL-12389 Added a new getElementsByClassName function in lib/javascript.php, added the selectallornone formslib element, modified the advcheckbox element to support the group variable, and implemented the new element in grade_export_form 2007-12-03 15:42:08 +00:00
poltawski ab8eeb7b5a MDL-12409 - stop access to editing 'site course' with course edit form. 2007-12-03 12:12:15 +00:00
toyomoyo 5c451f237d MDL-10915, additional setting for emoticons 2007-12-03 06:25:58 +00:00
toyomoyo d062a31039 wrap search/replace in a function so that it could be used in cron 2007-12-03 04:45:49 +00:00
toyomoyo 58d4c2f1c0 MDL-12397, gradebook sort by names should start with ASC 2007-12-03 02:02:49 +00:00
tjhunt 974fc258fb MDL-12373 - If you can see your user profile, but don't have moodle/course:viewparticipants, you get a link in the nav bar that takes you to an error message. 2007-11-30 12:07:25 +00:00
tjhunt 25c052dbd7 MDL-12393 - Layout tweaks on question category editing page. 2007-11-30 11:00:06 +00:00
scyrma 4b50cb9857 Code style corrections. 2007-11-30 03:08:05 +00:00
toyomoyo 79aa617250 adding support for customized cronjob 2007-11-30 01:56:52 +00:00
toyomoyo 5ed7235b17 fixing duplicate navigation 2007-11-30 01:15:34 +00:00
moodler 2548ed0c9c New installer files added - stronk7
Backported from HEAD
2007-11-29 17:03:39 +00:00
moodler abe74df9d9 file installer.php was added on branch MOODLE_19_STABLE on 2007-11-29 17:03:33 +0000 2007-11-29 16:59:26 +00:00
skodak 5642a74c63 MDL-7028 rewritten course reset + forum role_unassign cleanup fixes 2007-11-29 14:40:36 +00:00
scyrma a723bf77c4 Possible fix to MDL-12093 : give window without heading and navigation special css classes. 2007-11-29 07:18:53 +00:00
toyomoyo 4904f5c7a5 fixing a typo 2007-11-29 07:08:45 +00:00
moodler e38cd94623 Automatic installer.php lang files by installer_builder (20071129) 2007-11-29 06:00:48 +00:00
scyrma 4c75fbc5bb MDL-12093 : new strings to get locale-aware popup windows. 2007-11-29 05:59:18 +00:00
scyrma 84f78756c8 MDL-12093 : cleanup & simplify code to get popup windows. 2007-11-29 05:52:38 +00:00
toyomoyo 095c40469a MDL-12346, lesson module GIFT import fails 2007-11-29 04:31:14 +00:00
stronk7 cb60bc9eda Adding new wraplevelXX class for easier containers identification. MDL-12339 2007-11-28 18:13:32 +00:00
tjhunt 811c6b01e0 MDL-12330 - moving a question that uses an image in a subfolder of course files, where the same subfolder does not exist at the destination, fails. 2007-11-28 16:43:04 +00:00
urs_hunkler 210caf54a8 added missing pix 2007-11-28 16:14:58 +00:00
urs_hunkler 6480900924 file adv.gif was added on branch MOODLE_19_STABLE on 2007-11-28 16:14:58 +0000 2007-11-28 16:14:08 +00:00
urs_hunkler c5de7683ad file req.gif was added on branch MOODLE_19_STABLE on 2007-11-28 16:14:58 +0000 2007-11-28 16:14:07 +00:00
urs_hunkler 63aaa32f88 MDL-12370 :: added missing images 2007-11-28 14:20:56 +00:00
tjhunt 49aeee2bf6 MDL-12369 - get_actual_response should not truncate the student's response. 2007-11-28 12:45:42 +00:00
skodak a863e9a119 MDL-7028 gradebook related changes for course reset 2007-11-28 09:43:04 +00:00
toyomoyo 53bbf98533 MDL-10263, enable forum search for multiple groups 2007-11-28 07:51:48 +00:00
nicolasconnault f6ae5aee7c MDL-12356 Merging changes back from HEAD 2007-11-28 05:15:54 +00:00
toyomoyo 55271966bf MDL-11818, single post forum descript = first post 2007-11-28 05:08:19 +00:00
toyomoyo 2266595f2f MDL-11800, multilang support for category description 2007-11-28 02:56:04 +00:00
toyomoyo 33d78656e4 MDL-12326, adding missing footer 2007-11-28 01:24:52 +00:00
toyomoyo 76cf7cce29 MDL-12366, removing useless print_capabilities function 2007-11-28 01:19:38 +00:00
tjhunt b4c11424e2 MDL-12362 - Don't show scores for incomplete attempts on the quiz view page. 2007-11-27 19:18:11 +00:00
nicolasconnault 7f5f3d5f28 MDL-8863 Initial page field was disabled when there were no entries in the wiki, making it useless. It is now always enabled 2007-11-27 13:30:22 +00:00
nicolasconnault 43ba326a82 MDL-12098 Printing a closing div tag and the moodle footer 2007-11-27 10:31:48 +00:00
nicolasconnault b3469a7e13 MDL-12312 Reviewed and slightly improved Petr's great help file 2007-11-27 10:00:45 +00:00
gbateson 4761566c54 MDL-12318 filter/mediaplugins/filter.php can no longer insert mediaplayers into javascript, so hotpot module now requires its own filter to mimic behavior of multimedia filter in Moodle 1.7 2007-11-27 08:41:00 +00:00
nicolasconnault 9333d66af5 MDL-9506 Added support for 'course' type in grade_get_grade_items() function, plus corrected a few typos 2007-11-27 07:08:41 +00:00
nicolasconnault cd7bc967e3 MDL-12356 CSS classes implemented 2007-11-27 06:38:56 +00:00
moodler 00a00321ae FIxed up info about recordset usage 2007-11-27 05:58:18 +00:00
toyomoyo 430196f1a0 MDL-12352, block/search fails to install on postgres 2007-11-27 05:30:10 +00:00
scyrma dab7fce2aa imagealt wasn't loaded in a list of the user's posts. 2007-11-27 04:59:35 +00:00
toyomoyo 19907e0cfa fixing a typo 2007-11-27 03:22:03 +00:00
toyomoyo 2be1f0f6bb MDL-11194, course role names not reflected in course description 2007-11-27 01:52:17 +00:00
skodak 81bfdff8dd MDL-12350 do not set parent cat when updating 2007-11-26 17:44:46 +00:00
dwoolhead 81d923af09 MDL-12313 basically rationalising getting calendar events function calls 2007-11-26 14:43:07 +00:00
jamiesensei 619b3ca8db fix for error message 2007-11-26 13:34:47 +00:00
toyomoyo 52fbb269fd MDL-12331, hidden teacher should not be displayed in choice results 2007-11-26 06:00:55 +00:00
scyrma 1e27409e63 MDL-12294 - one more string fix 2007-11-26 04:51:06 +00:00
scyrma 35c9a930f3 Fix for part of the missing strings, as reported in MDL-12294 2007-11-26 04:42:23 +00:00
toyomoyo 717d379f57 MDL-12175, forum reset should delete attachments 2007-11-26 04:21:30 +00:00
toyomoyo 98ee46df71 expect multiple groups from sql 2007-11-26 03:21:20 +00:00
toyomoyo cb00cf26de MDL-12081, teacher with import capability can not import course 2007-11-26 02:38:56 +00:00
moodler 013c9869e1 Automatic installer.php lang files by installer_builder (20071125) 2007-11-25 03:57:12 +00:00
skodak a11abf14cb MDL-12130 fixed regression - disabledIf did not work in dateselectors 2007-11-24 13:36:13 +00:00
skodak ef4ad6c66e MDL-12133 validate() method tidying up 2007-11-23 22:12:34 +00:00
skodak a7d006a0d9 MDL-12329 fixed last access when course not accessed yet - patch by Yolanda Ordóñez Rufat 2007-11-23 21:30:46 +00:00
skodak 6900784f92 MDL-12221 custom themes revisited - fixed bug in previous commit, added more developer debug 2007-11-23 20:23:43 +00:00
skodak d6756ebbbc MDL-12221 custom themes revisited - implemented container concept 2007-11-23 16:41:13 +00:00
thepurpleblob a87249f196 MDL-12296:
Oops, missed adding do-not-unenrol option to synchronisation script.
Also took out bogus test function
2007-11-23 15:41:27 +00:00
moodler 868282ddc0 Automatic installer.php lang files by installer_builder (20071123) 2007-11-23 05:02:43 +00:00
stronk7 7b6da3346c Deleting one ='' condition that isn't cross-db nor necessary. MDL-12186
Merged from MOODLE_18_STABLE
2007-11-22 22:46:56 +00:00
skodak a75f4ef3e3 MDL-12312 fixed outdated aggregation help, added examples 2007-11-22 21:35:34 +00:00
tjhunt d1453ce26e MDL-12322 - Reference to incorrect language file 2007-11-22 18:15:07 +00:00
skodak 4aa2dc193f MDL-12312 fixed outdated aggregation help 2007-11-22 17:52:08 +00:00
tjhunt 1dcf42a4ba MDL-12282 - fix typo in previous commit. Sorry. 2007-11-22 11:51:19 +00:00
nicolasconnault a4a66fc93b MDL-9506 Returning stdclass objects instead of grade_item objects 2007-11-22 08:50:33 +00:00
moodler 338efed0ca Rename Smallest -> Lowest so it pairs with Highest 2007-11-22 07:04:25 +00:00
scyrma d2957326c8 Replaces 'GMT' by 'UTC' where it showed in user interface and fixes MDL-9164. 2007-11-22 06:26:58 +00:00
toyomoyo 81e19d3595 MDL-12309, gradebook can not sort by names while in group mode 2007-11-22 05:15:47 +00:00
toyomoyo b7144a35b3 removing user class from firstname/lastname cell, to avoide arrow image css 2007-11-22 01:37:00 +00:00
toyomoyo 3202bd7416 turn this block off when CFG->messaging is off 2007-11-22 01:16:37 +00:00
toyomoyo 9e4ae46a4b MDL-10028, adding a string 2007-11-22 01:04:59 +00:00
tjhunt 4a0f06d551 MDL-12305 - Don't let the quiz reorder tool put a page break at the start of the quiz. 2007-11-21 18:08:56 +00:00
tjhunt a5f1acc2b4 MDL-12305 - Quiz reorder tool broken. 2007-11-21 17:59:52 +00:00
tjhunt ac6fa5eb90 Fix some whitespace. 2007-11-21 16:30:14 +00:00
tjhunt c4c1a7737f Fix typo. 2007-11-21 16:28:40 +00:00
nfreear 375f8d33f8 Fixes reopened bug MDL-7472, "Explicitly label radio buttons in Survey" - removes use of USER->screenreader using get_accesshide + many other accessibility fixes. MERGED. 2007-11-21 15:06:02 +00:00
thepurpleblob 5612af0dba MDL-12296:
Added option to prevent database enrolment plugin unenrolling users.
2007-11-21 11:07:56 +00:00
thepurpleblob e80944a42a MDL-12296:
Add option to turn off unenrolment by database plugin.
2007-11-21 11:04:52 +00:00
nicolasconnault 08403fd61c MDL-9506 Implemented and tested the new API functions 2007-11-21 10:04:19 +00:00
toyomoyo 02bd2e0d38 MDL-10294, MDL-10028, changing messaging/bulk messaging system 2007-11-21 07:52:50 +00:00
mudrd8mz 36d2ca6559 MDL-8090, MDL-10664 & others - improved help files editing
* langdoc.php has been merged into lang.php, some GUI improvements
* ability to edit both master and local help files
* preview fix (but still blocked by MDL-12291)
* added a help file
2007-11-21 02:56:30 +00:00
stronk7 7a92a518b3 Applying one missing string. tableofcontentsabbrev. MDL-12071 2007-11-20 23:43:15 +00:00
stronk7 a62cc62551 Adding one missing string. tableofcontentsabbrev. MDL-12071 2007-11-20 23:40:49 +00:00
diml 794d8721c0 added default values for datetime fields 2007-11-20 23:29:44 +00:00
diml c75d22a17c adding lesson support to 1.9 STABLE 2007-11-20 23:28:29 +00:00
diml e7b43fe5a2 fix unchecked foreach loops 2007-11-20 23:27:45 +00:00
diml 3b0d855c3c fix table name for deletion of indexes before regeneration 2007-11-20 23:27:26 +00:00
sam_marshall eebf6e2a47 MDL-12284 Moved require_js to weblib and improved it so that it works if called during header (also tidied up code) 2007-11-20 18:03:14 +00:00
tjhunt 5ee185d12e MDL-12286 - 'Save as new question' button ignores the setting in the 'Save in category' dropdown. 2007-11-20 17:51:45 +00:00
tjhunt b35f76841d MDL-12172 - Sorry, more fall-out from converting continue buttons to use GET instead of POST. Sometimes, URLs were being passed in with & already repalced by &amp; and we weren't handling that properly. Should now be fixed. 2007-11-20 17:30:56 +00:00
tjhunt 011508b2b0 MDL-12282 - Numerical question type - the units are displayed on the editing form with a stupidly large number of decimal places. Merged from MOODLE_18_STABLE. 2007-11-20 16:57:15 +00:00
tjhunt e1a0eb49d6 MDL-12280 - Question bank forgets sort order when adding multiple questions to a quiz. 2007-11-20 15:54:21 +00:00
tjhunt 09846a54ad MDL-12133 - Errors calling parent::validation in a moodle form subclass because the base class method returns true not an empty array. This patch allow subclasses to start their validate method with
$errors = parent::validation($data, $files);

which is what you naturally want to do if you are used to object oriented programming.
2007-11-20 15:07:48 +00:00
tjhunt 06d7ef9cd3 Remove a developer debug notice and save a database query. 2007-11-20 14:46:33 +00:00
nfreear 14156d6b54 Fixes for bug MDL-12256, "Course AJAX has very poor accessibility - ALT text" (includes white-space cleanup). Merged (+ hacks for IE). 2007-11-20 14:24:41 +00:00
ethem 104838c9db Fix for Canadian Postal Code
http://moodle.org/mod/forum/discuss.php?d=81736
2007-11-20 13:30:50 +00:00
tjhunt 1a632495f7 MDL-12133 - Errors calling parent::validation in a moodle form subclass because the base class method signature was changed. This patch fixes all calls to parent::validation in the question editing forms. 2007-11-20 12:40:44 +00:00
scyrma 6ededd5f41 Makes it possible to confirm users using manual auth system. 2007-11-20 05:26:57 +00:00
moodler 36103b02fa Automatic installer.php lang files by installer_builder (20071120) 2007-11-20 05:17:31 +00:00
toyomoyo c1427112a1 fixing header/formatting 2007-11-20 05:14:55 +00:00
toyomoyo cba041369f MDL-12234, fixing unicode issues for global searchy 2007-11-20 04:09:41 +00:00
mattc-catalyst a559555e6c MDL-12264 - course/info: check if course is hidden before displaying info about it.
Author: Matt Clarkson <mattc@catalyst.net.nz>
2007-11-20 02:34:55 +00:00
martinlanghoff 244f618892 MDL-12142 mailout-debugger: Now works on Windows too
Switched to use sys_get_temp_dir() to define
which tempdir to use.
2007-11-20 00:32:15 +00:00
martinlanghoff 27bb711fe9 accesslib: has_capability_in_accessdata() respects rdef locality a bit more
With this patch, we respect rdef locality when two roles
assignments in the same context have conflicting rdefs.
In that case, the most local rdef wins.

So RA locality still matters most. If you are a teacher
sitewide and a student in course X, student role trumps
teacher.

For a use case, see the discussion here
http://moodle.org/mod/forum/discuss.php?d=84472

Notes:

- If we wanted to have locality of RDEF trump everything
  we can. A comment in this patch shows how.

- I don't know how to reproduce this in pure SQL.

And Also:

This patch also fixes a bug where if CAP_PROHIBIT was set
_and_ another role added to it in the same context, we would
add or substract 1 to CAP_PROHIBIT, and it would lose its magic.

And while at it, tighten the code to avoid casts. All the
ints are unambiguously ints.
2007-11-20 00:19:07 +00:00
stronk7 d77bd5ecbe Some question formating...
Merged from MOODLE_18_STABLE
2007-11-20 00:08:58 +00:00
skodak 24b3c8307f MDL-12249 fixed distribution for small groups 2007-11-19 22:53:50 +00:00
skodak bad6da7acc MDL-12249 fixed small group ration, can be overriden from config.php now 2007-11-19 21:30:47 +00:00
skodak 70e10c77f3 MDL-12249 groups UI cleanup and improvements - see tracker for details 2007-11-19 20:27:50 +00:00
nfreear 9523ad0ab7 Initial fix for MDL-12256, "Course AJAX has very poor accessibility - ALT text" - test, imgAttributes.length NOT attributes.length. Merged. 2007-11-19 15:26:29 +00:00
sam_marshall ee20235449 MDL-12075 Display individually colour-coded events in calendar rather than random day colours 2007-11-19 10:50:53 +00:00
moodler 17afefef30 Improvements to the tabs for assigning and overriding roles. MDL-12120
Tabs are now all on the top row
Tabs have clearer titles
Other help texts improved
2007-11-19 07:10:48 +00:00
moodler d0131dbd89 Added some styles so that override screens have color. MDL-12248 2007-11-19 06:56:50 +00:00
scyrma 64b489a10d MDL-3632 : this prevents people without mod/forum:viewhiddentimedposts to see hiddentimedposts. 2007-11-19 04:42:43 +00:00
toyomoyo 8ed7f23e33 MDL-12218, display course specific rolenames on override page 2007-11-19 04:34:16 +00:00
toyomoyo 08f256c416 MDL-12217, display course specific rolename in participants page 2007-11-19 04:12:38 +00:00
martinlanghoff 27278d2346 user_login() was not converted to using get_cache_flags().
It was still using the 'old' get_config() interface, so the 'cookie'
set by ntlmsso_finish() wasn't retrieved at all, and the automatic
login always failed.

Signed-off-by: Iñaki Arenaza <iarenuno@eteo.mondragon.edu>


Author: Iñaki Arenaza <iarenuno@eteo.mondragon.edu>
Committer: Martin Langhoff <martin@catalyst.net.nz>
2007-11-19 02:51:36 +00:00
martinlanghoff bb4bfe13df If the cache flag is not set, it doesn't make sense trying to test its value
Signed-off-by: Iñaki Arenaza <iarenuno@eteo.mondragon.edu>


Author: Iñaki Arenaza <iarenuno@eteo.mondragon.edu>
Committer: Martin Langhoff <martin@catalyst.net.nz>
2007-11-19 02:51:25 +00:00
martinlanghoff c124578f93 Fix typo in ntlmsso_finish()
Signed-off-by: Iñaki Arenaza <iarenuno@eteo.mondragon.edu>


Author: Iñaki Arenaza <iarenuno@eteo.mondragon.edu>
Committer: Martin Langhoff <martin@catalyst.net.nz>
2007-11-19 02:51:14 +00:00
martinlanghoff 2e2892ce89 auth/ldap: "creators" role assignment now also supports contexts
Now the DNs that indicate a course-creator role can also be contexts.
This way we support one more widely used practice in the weird and
wonderful LDAP world... MDL-12178
2007-11-19 02:50:55 +00:00
toyomoyo 896c18e842 MDLSITE-294, have to use a type cast 2007-11-19 02:23:30 +00:00
toyomoyo a3752a0b13 MDLSITE-294, role id needs to be an int, not a string 2007-11-19 02:06:37 +00:00
mattc-catalyst fc0e5e988e MDL-12172: fixed get parameters not being submitted in Firefox
Author: Matt Clarkson <mattc@catalyst.net.nz>
2007-11-19 01:42:38 +00:00
toyomoyo 4ea6f1f0ef changed to get_recordset_sql because get_records forces the first element to be key 2007-11-19 01:38:59 +00:00
toyomoyo 8bb10719d6 making an SQL cross-db compatible 2007-11-19 01:12:22 +00:00
iarenaza 2fa4b6d68e MDL-11099 and MDL-11655 Don't show external db password in clear (backported from HEAD) 2007-11-18 12:47:26 +00:00
moodler 9e65d861f7 Automatic installer.php lang files by installer_builder (20071118) 2007-11-18 04:49:16 +00:00
skodak 92db621b5d MDL-12231 fixed applying of CFG defaults during initial install phase 2007-11-17 21:20:48 +00:00
skodak 119fb86673 fixed typo throwing warnings during install 2007-11-17 20:54:43 +00:00
skodak 056ac15288 MDL-12041 fixed groupmode flag in cm when mode forced in course 2007-11-17 17:40:46 +00:00
skodak be4dd6c79b MDL-12041 fixed groupmode flag in cm when mode forced in course 2007-11-17 16:55:26 +00:00
skodak 9743ed49b9 MDL-10888 parent definition_after_data() must be called too! 2007-11-17 16:52:45 +00:00
skodak eafe828b26 MDL-12221 initialised $output and fixed whitespace 2007-11-17 16:35:26 +00:00
skodak 16ba1b0cf2 MDL-12199 problem with "Show advanced" used after pressing of enter in forms 2007-11-17 13:29:14 +00:00
skodak 6d1ad6b3e1 MDL-12146 merged recent changes from normal item to outcome form 2007-11-16 22:13:12 +00:00
skodak e56fb50a4a MDL-12146 merged recent changes from normal item to outcome form 2007-11-16 22:13:12 +00:00
skodak 519b6676c8 MDL-12200 fixed problems when no custom user fields defined 2007-11-16 22:10:52 +00:00
dwoolhead 0c46637a1a MDL-12226 forum index page not always displaying forum links or subscription buttons as expected 2007-11-16 17:00:50 +00:00
nfreear 326cf96333 Fixes bug MDL-12225, Mark up lists correctly in course/lib (accessibility). Merged. 2007-11-16 16:51:14 +00:00
dwoolhead 2bb2aa4dbb MDL-11979 Forum subscriptions loop hole allowing users to subscribe to forums they should not have access to. 2007-11-16 16:23:42 +00:00
arborrow fc4a2fffc6 Clarified help for importing custom user profile field data in response to http://moodle.org/mod/forum/discuss.php?d=84651 2007-11-16 16:13:48 +00:00
urs_hunkler b173ea77d9 MDL-12221 :: example: adding custom_corners to the info box on the forum page. 2007-11-16 12:49:10 +00:00
urs_hunkler 441df375b6 MDL-12221 :: add CSS for custom_corners boxes 2007-11-16 12:47:16 +00:00
urs_hunkler 1adb0ebb50 MDL-12221 :: Added wrapper functions for print_box, print_box_start and print_box_end to be able to add custom_corners to any boxes.
If you call print_custom_corners_box with the same parameters as print_box and custom_corners is enabled you get the custom corners divs within those boxes and can style them accordingly.
2007-11-16 12:44:53 +00:00
skodak 5a948984c4 MDL-12096 changed label of parent cat 2007-11-16 07:34:55 +00:00
scyrma 6df78935f8 Small fix for MDL-12216 : user.imagealt now showing in forum posts. 2007-11-16 06:05:34 +00:00
moodler 45b20961da MDL-12215 made the advanced search tab more consistent with the interface 2007-11-16 05:55:00 +00:00
toyomoyo 14975c1946 MDL-12121, fixing a warning 2007-11-16 04:24:17 +00:00
scyrma d9b9b40a71 Fix to a bug preventing rss feeds from loading correctly. 2007-11-16 03:32:26 +00:00
toyomoyo d9c7b58af6 MDL-12187, fixing grader report style 2007-11-16 03:08:14 +00:00
toyomoyo 990e04d823 MDL-11672, hide hidden assignment descriptions from calendar 2007-11-16 02:48:32 +00:00
skodak b8e8419bfc MDL-12096 new simple weighted mean aggregation type 2007-11-15 22:28:45 +00:00
skodak 791ad685b2 MDL-12146 grade item settings can be now configured as advanced, new advanced defaults, minor tweaks in admintree 2007-11-15 17:31:07 +00:00
urs_hunkler 6142a99373 MDL-12195 :: added closing '>' in line 157. 2007-11-15 16:26:33 +00:00
skodak 72c475f9ab MFC: MDL-12140 weights/extrapoints are never advanced 2007-11-15 15:44:39 +00:00
mchurch 1ea47ba4c0 MDL-12016 Category text not being sent to 'create_category_path'. 2007-11-15 13:56:31 +00:00
mchurch 89d2e91d13 MDL-12015 Import question count was wrong. 2007-11-15 13:30:44 +00:00
urs_hunkler 3941cc43f1 MDL-12191 :: workaround with JavaScript to add MDL-12191"haslayouttabel" class to body. 2007-11-15 12:06:34 +00:00
urs_hunkler f545230234 changed the form lable look. 2007-11-15 11:43:25 +00:00
bobopinna d0d5d320b1 MDL-12161 Stripped slashes in LO titles 2007-11-15 08:40:02 +00:00
skodak 4217056ab9 MDL-12140 category can be selected when adding new items or categories 2007-11-15 08:27:13 +00:00
bobopinna c90933facf MDL-12161 Stripped slashes in LO titles 2007-11-15 08:01:51 +00:00
toyomoyo edc62676a2 MDL-12180, blocks capabilities not appearing when overriding block roles 2007-11-15 07:44:52 +00:00
scyrma f2ee9706a2 Fix for MDL-10996 : prevent course name from being displayed twice. 2007-11-15 04:08:44 +00:00
scyrma 42cf57fb26 MDL-11401 - This simplifies the code and makes the registration page a bit more clear & coherent. Also fixes an issue where the $id was mangled when coming back from moodle.org registration. 2007-11-15 02:02:12 +00:00
toyomoyo 59a24c227e MDL-8330, adding a warning to translators about updating of lang packs 2007-11-15 01:17:48 +00:00
martinlanghoff 77db689064 MDL-9399 - auth/ldap NTLM SSO - strings 2007-11-14 23:45:21 +00:00
martinlanghoff 4e5813e6f2 admin/mnet: undo accidental commit 2007-11-14 23:43:05 +00:00
martinlanghoff 53cda2de31 MDL-9399 - auth/ldap NTLM SSO - fix a missing global 2007-11-14 23:40:50 +00:00
martinlanghoff c1ef755c30 MDL-9399 auth/ldap: NTLM temp sessions now use cache_flags
cache_flags is now the apropriate way to manage this kind of temp
data. It gives us time expiry and GC for free, so it's a perfect fit
for the job, as it simplifies the code a bit.
2007-11-14 23:39:41 +00:00
martinlanghoff 8b435d0993 MDL-9399 auth/ldap: NTLM SSO - fix hardcoded strings
From Iñaki Arenaza
And here is a little patch with the last remaining non-traslated
strings (unless I missed something).
2007-11-14 23:39:24 +00:00
martinlanghoff 4912df1582 MDL-9399 auth/ldap: NTLM SSO - move textlib conversion earlier
From Iñaki Arenaza - fix for

... I forgot to put the textlib conversion
call before the block of code that uses $extusername, so it
completely breaks the user validation process.
2007-11-14 23:39:11 +00:00
martinlanghoff 6e45019417 MDL-9399 auth/ldap: NTLM SSO - cleanup of sesskey handling
Fix a bug in ntlmsso_finish(), and tighten up user_login() to avoid a
pointless DB lookup if the password doesn't match the sesskey.

Hopefully this makes things work again...
(thanks I~naki for the testing!)
2007-11-14 23:38:44 +00:00
martinlanghoff d8ee4dfa6e MDL-9399 auth/ldap: NTLM SSO - use sesskey and other tidyups
Several tidyups:

- use moodle_strtolower() for utf-8 correctness

 - use sesskey as the key instead of IP addr to support
   proxied users

 - clean the sesskey after success!

 - pull timeout out to a constant: AUTH_NTLMTIMEOUT
2007-11-14 23:38:31 +00:00
martinlanghoff 8f09118ae0 MDL-9399 moodlelib: set_config() deletes config entries if the value is NULL
New! Improved! If you pass NULL as the value, it will delete the
config entry for you.
2007-11-14 23:38:07 +00:00
martinlanghoff 176307a26a MDL-9399 auth/ldap: Tighten NTLM AD checks to the appropriate OU
From Iñaki Arenaza...

Right now, if someone logs in via NTLM magic, we don't check if that
user is inside the contexts specified in the LDAP settings. I mean,
if I want to restrict my Moodle site to those users inside a given OU
or subtree of my LDAP directory, with the current code any valid user
in my whole AD domain (and if we are using a GC as the LDAP server,
the whole forest) can log in. We should check that the user is inside
one of the configured contexts before allowing his/her to log in.

Something along the lines of the attached patch could do it.
2007-11-14 23:37:53 +00:00
martinlanghoff 58af55c35e MDL-9399 auth/ldap: ntlmsso_finish() now completes the user session setup
As Iñaki points out, ntlmsso_finish() needs to do all the setup that
login/index.php would do for a user once auth succeeds. With this
patch, the session setup is complete so the logon is usable.
2007-11-14 23:37:40 +00:00
martinlanghoff afac1a0781 MDL-9399 auth/ldap: NTLM redirect only on initial GET
We only want to redirect when users are being shown the login page (on
GET) but not when users are POSTing to it, actually trying to login.
2007-11-14 23:37:26 +00:00
martinlanghoff a1353477c4 MDL-9399 auth/ldap: NTLM SSO - lots of fixes from Iñaki
Lots of typos and minor errors fixed by Iñaki. Thanks!
2007-11-14 23:37:10 +00:00
martinlanghoff 3ae767d8ba MDL-9399 auth/ldap: NTLM SSO - Resolve Moodle cookies issue, tighten config.php require()s
Use $nomoodlecookie global to avoid session troubles. Also

 * Ensure we load the appropriate config.php, even if we are executing
   under a strange environment (ie: with a user's credentials!)

 * Test we have a spacer gif to open before we open it
2007-11-14 23:36:56 +00:00
martinlanghoff bdadff33ff MDL-9399 auth/ldap: Add NTLM SSO pages
These pages control the process of attempting an NTLM SSO login
safely. This is very draft and needs real-world testing and polish.

And string localisation too ;-)

  * If NTLM SSO is enabled, and the user's IP addr is in the right
    subnet, the loginpage_hook() of auth/ldap redirects to
    ntlmsso_attempt.php

  * ntlmsso_attempt.php will display a "redirect" msg with an img tag
    pointing to ntlmsso_magic.php, a 3s wait, and a redirect to
    ntlmsso_finish.php

  * ntlmsso_magic.php should be configured to have "Integrated
    Windows Authentication". If it does, it will serve a spacer gif
    and call ntlmsso_magic()

  * ntlmsso_finish.php calls ntlmsso_finish() to complete the SSO
    and handles failures.
2007-11-14 23:36:41 +00:00
martinlanghoff 94beeb79c7 MDL-9399 auth/ldap: flesh out ntlmsso_* functions
Flesh out the functions that get the job done. These will be triggered
by PHP files sitting under auth/ldap/ ...

ntlmsso_magic() - here is where the magic happens. Call it serving
something harmless, like a space GIF, from a URL that is blessed with
Integrated Windows Authentication. If the IWA is successful, it will
set a special session cookie in config_plugins table.

It won't complete the job because when we are under IWA magic we
cannot change (even read!) the session data, as the execution happens
under the OS privileges of the actual user acct being logged in (!!!)

ntlmsso_finish() - if it finds the session set by ntlmsso_magic() and
it hasn't expired, it will finish the job of logging in the user, by
calling authenticate_user_login() and exercising the whole auth
machinery.

user_login() - when called by authenticate_user_login() it will check
to see if there's a session setup by ntlmsso_magic() and OK the login
without really asking the AD backend to proof a password we don't have
anyway.
2007-11-14 23:36:14 +00:00
martinlanghoff 056a54babe MDL-9399 auth/ldap: Introducing loginpage_hook(), ntlmsso_attempt(), ntlmsso_finish()
A work in progress -- initial loginpage_hook() and headers for the
remaining functions. One thing to consider here is that this won't
work if there's a proxy in the middle.

Does NTLM auth thingy support proxies?
2007-11-14 23:36:00 +00:00
martinlanghoff 04038968be MDL-9399 auth/ldap: Manage 2 new config settings for NTLM SSO
Changes in the forms and forms handling to set and edit NTLM SSO
related config options.
2007-11-14 23:35:46 +00:00
martinlanghoff 6d3da6bf92 MDL-9399 auth/shibboleth: ensure we load enrolments
Most of this code should be replaced with complete_user_login() but it
does a few odd things, so we'll play it safe for now, specially since
I don't have a Shib setup to test...
2007-11-14 23:35:31 +00:00
martinlanghoff b3ebb9802e MDL-9399 loginas: call check_enrolment_plugins()
Admins will want to see an update of the user's enrolments when
they do a login-as.
2007-11-14 23:35:15 +00:00
martinlanghoff 12a113f24e MDL-9399 auth/mnet: when landing, user complete_user_login()
By using complete_user_login() we ensure that the session is fully
setup, and that enrolment plugins are called correctly.
2007-11-14 23:35:00 +00:00
martinlanghoff 8f5c5184aa MDL-9399 accesslib: Move check_enrolment_plugins() to complete_user_login()
... where it belongs ;-)

load_all_capabiloties() gets called at several points where we don't
want to be re-querying the enrolment backends. It needs to  be called
before load_all_capabilities() and only by callers that are setting up
a logon session.

Those callers need to be calling complete_user_login() anyway, as they
need to set the Moodle cookie, log the logon action, etc. In fact,
those callers duplicate a lot of that code already.

The callers that don't duplicate code for the login are actually the
cases where the backend enrolment plugins should not be queried.

To be followed by callers cleanup...
2007-11-14 23:34:46 +00:00
martinlanghoff 9d6a3d1513 MDL-9399 login/index, moodlelib: move session setup logic to complete_user_login()
Move most of the user session setup logic from login/index.php to
complete_user_login().
2007-11-14 23:34:29 +00:00
martinlanghoff 5f3315e78e file ntlmsso_finish.php was added on branch MOODLE_19_STABLE on 2007-11-14 23:36:41 +0000 2007-11-14 22:12:25 +00:00
martinlanghoff 5f084a4ecb file ntlmsso_attempt.php was added on branch MOODLE_19_STABLE on 2007-11-14 23:36:41 +0000 2007-11-14 22:12:25 +00:00
martinlanghoff 2115a30667 file ntlmsso_magic.php was added on branch MOODLE_19_STABLE on 2007-11-14 23:36:41 +0000 2007-11-14 22:08:55 +00:00
mudrd8mz dee938a59e MDL-11332 Preview did not work with help files in subdirectories. Thanks to Christian Deligant for the patch. 2007-11-14 21:20:41 +00:00
tjhunt 582e15dfd2 MDL-12066 - Links in the HTML block are not recoded on backup and restore.
This is messy because the links are hidden in the configdata column, which is serialized and base64encoded. So we have to untangle that, then ask the block whether there are any bits of $config that need to be fixed, then re-encode it before backup up. And reverse that on restore. It needs to remain base64 encoded in the backup file, so that the file format is backwards compatible.

I disucssed this with Eloy before doing it.
2007-11-14 17:03:16 +00:00
tjhunt d2219dda26 MDL-12172 - print_continue should create a method="get" button, not post. 2007-11-14 16:33:57 +00:00
urs_hunkler cf8781f41c added 2 CSS definitions to dimm the summary and the course no. in a hidden course topic. 2007-11-14 16:05:07 +00:00
tjhunt 2fca979ee3 Delete commented-out code that was actually not commented out properly, and so caused warnings. Merged from MOODLE_18_STABLE. 2007-11-14 14:48:46 +00:00
bobopinna 85ab48b33f MDL-12118 Fixed learner_response report. It was changed by SCORM2004 3rd Ed. specification 2007-11-14 12:59:16 +00:00
skodak 3929ee53cd MDL-12146 grade category defaults, forced settings and advanced options 2007-11-14 11:49:55 +00:00
bobopinna cf6e361c02 Fixed MDL-11914 2007-11-14 09:51:31 +00:00
toyomoyo 8909a7a075 removing duplicate entries in grade_grades prior to adding unique key 2007-11-14 05:06:50 +00:00
toyomoyo 0fb90ef70b MDL-12140, making most common non-weighted settings easy for teachers 2007-11-14 02:11:19 +00:00
martinlanghoff b21ca22e1f htmlarea: fix in FF - MDL-11242
The previous fix for IE left some problems in the FF side of
things because we were trying additions/substractions on
width once its had turned to a string of value + unit.

Do the math before we attach 'px' to it...
2007-11-14 01:24:40 +00:00
fmarier cfb5feb8b5 mod/quiz: Revert commit which added the "go back to course" link 2007-11-14 01:09:29 +00:00
mchurch bc304733e8 MDL-11991 Fixing error on undefined method while using the manual plug-in. 2007-11-13 18:04:58 +00:00
mchurch 90cef3dc05 MDL-12149 Added code to check for selected group as well, so that privileged users get correct count when changing groups. 2007-11-13 16:59:13 +00:00
skodak b4deed5688 MDL-12154 used proper cast to float before !== comparison 2007-11-13 16:46:12 +00:00
skodak 11b9b76181 MFC: MDL-12154 used proper cast to float before !== comparison 2007-11-13 16:09:00 +00:00
arborrow e3f5d9654a MDL-11743 - SHOW LOCAL VARIABLES more accurately returns database character set on some hosts and makes explicit what is normally the default behavior. 2007-11-13 16:02:20 +00:00
mchurch 8ead149149 MDL-12114 Fixed typo in elements array. 2007-11-13 15:59:51 +00:00
skodak 08d82f5688 MFC:
MDL-10901 new SUM aggregation type
MDL-12154 used proper cast to float before !== comparison
2007-11-13 15:33:16 +00:00
nfreear 1a78d381ff MDL-12153, "Validome - moodle.org invalid - require Content-Script-Type". Merged. 2007-11-13 14:49:04 +00:00
urs_hunkler 2c00ee97df removed CSSEdit reference line. 2007-11-13 10:31:37 +00:00
skodak 1a35d7472f MFC: MDL-12101 cleanup/fixing/refactoring of user bulk operation and admin user browsing 2007-11-13 09:02:11 +00:00
skodak 4d85a640dd file simpleselect.html was added on branch MOODLE_19_STABLE on 2007-11-13 09:02:12 +0000 2007-11-13 08:43:27 +00:00
skodak c8693d4dc1 file user_bulk_forms.php was added on branch MOODLE_19_STABLE on 2007-11-13 09:02:12 +0000 2007-11-13 08:43:22 +00:00
skodak 3d5f5f6021 file lib.php was added on branch MOODLE_19_STABLE on 2007-11-13 09:02:12 +0000 2007-11-13 08:43:22 +00:00
skodak 8ab940c495 file user_filter_forms.php was added on branch MOODLE_19_STABLE on 2007-11-13 09:02:12 +0000 2007-11-13 08:43:20 +00:00
skodak 0fe0327175 file simpleselect.php was added on branch MOODLE_19_STABLE on 2007-11-13 09:02:13 +0000 2007-11-13 08:43:20 +00:00
moodler cd73c31074 Fixed up some grammar and capitals MDL-12145 2007-11-13 08:41:47 +00:00
toyomoyo 995a53787b allowing horizontal and vertical highlighting 2007-11-13 06:21:48 +00:00
toyomoyo 6f04b5d626 MDL-12124, fixing styles for grader report 2007-11-13 03:18:18 +00:00
toyomoyo 522803d42a MDL-12138, set aggregate graded only as default 2007-11-13 03:06:56 +00:00
toyomoyo 815673e92f MDL-12141, category names should be mandatory 2007-11-13 02:52:30 +00:00
martinlanghoff 69a4aef1e1 admin: Introducing the mailout-debugger
A stand-in for sendmail that will log all emails instead of sending
them out. Use when debugging cron performance and output.

References:
  MDL-12142
  http://moodle.org/mod/forum/post.php?reply=349457
2007-11-13 00:33:42 +00:00
urs_hunkler d0796153bf The XHTML of the actual tab has been changed. Therefor the actual tab was not shown in front of the line any more. I changed the CSS to correct this introduced bug. 2007-11-12 20:20:48 +00:00
skodak 0fe09ea8fe MFC: MDL-12131 db debug messages now quoted properly 2007-11-12 17:22:22 +00:00
skodak 8490c5350e MFC: MDL-12130 and MDL-12129 - fixed advanced status of elements when header not closed; disableIf now works inside grouped elements too; code cleanup in focus() and _getElNamesRecursive() 2007-11-12 17:14:52 +00:00
nfreear 8ca956147b Fixes MDL-12125, Call to a member function FetchRow on a non-object in get_user_access_sitewide. Merged. 2007-11-12 16:56:38 +00:00
urs_hunkler 04139219e7 MDL-12093 :: changed function call from get_in_popup to is_in_popup. 2007-11-12 11:36:57 +00:00
urs_hunkler 24bcd2e3b1 MDL-12093 :: Tim propsed to change the name get_in_popup to is_in_popup for esear reading - done. 2007-11-12 11:05:18 +00:00
gbateson 393150a996 fix for MDL-9713 : use XMLDB functions to create tables when mod/hotpot/db/mysql.sql is not found. This allows upgrade direct from Moodle 1.5 (or earlier) to Moodle 1.8 (or later) 2007-11-12 08:53:54 +00:00
toyomoyo 903740173f MDL-9059, when teacher creates group event on calendar, they can not see it 2007-11-12 06:26:57 +00:00
martinlanghoff ce97dd9102 htmlarea: Fix fullscreen editor on IE6/7 -- MDL-11242
Only say px if the width is a pure number. Under IE we
get the "100%" for the width of the editor, so blindly
appending "px" results in a JS execution error.

With this patch we only attach px if it's a pure int.

Also tested the sizing of HTMLArea in the messaging
window. So both should be working now.
2007-11-12 04:09:37 +00:00
toyomoyo 2efdf88b94 MDL-12104, gradebook is showing 2 scales together 2007-11-12 03:13:05 +00:00
urs_hunkler ff3cf1e507 MDL-10683 :: added as Eric proposed:
.mform .ftextarea #id_alltext {
    width: 100%;
}
2007-11-11 19:32:09 +00:00
urs_hunkler aaef7468ac moved the sideblock accessibility property to the sidblocks section. 2007-11-11 19:24:56 +00:00
urs_hunkler fb529d5c10 added the clearfix option to the custom_corners call for admin pages to keep the "Save Changes" button within the area. 2007-11-11 17:27:55 +00:00
urs_hunkler 6a1a00bc50 Some theme enhancements while working on MDL-12098 and MDL-11154.Some theme enhancements while working on MDL-12098 and MDL-11154. 2007-11-11 16:02:21 +00:00
urs_hunkler fb87e8ae3b Added the check, if all opend custom_corners are closed. This way it's possible to add the close call in the footer which closes eventually open ccs. 2007-11-11 15:02:54 +00:00
urs_hunkler 60a4797402 MDL-12045 :: the extra "clearer" div broke the custom_corners theme on IE7. I removed the "clearer" div and added the class "clerafix" to the surrounding coursebox.
In FF and Safari floating is a mess now. I removed float:left for "coursebox" to get the page working in all browsers. It is a single element and should not need floating.
2007-11-11 11:19:36 +00:00
urs_hunkler cdedf35b0f MDL-12045 :: the extra "clearer" div broke the custom_corners theme on IE7. I removed the "clearer" div and added the class "clerafix" to the surrounding coursebox. 2007-11-11 10:53:31 +00:00
urs_hunkler b3c26633e5 added missing "if ($heading)" to suppress empty page header. 2007-11-11 09:29:51 +00:00
mark-nielsen 1e73338065 Mergin fix for MDL-12088 from MOODLE_18_STABLE 2007-11-11 01:21:52 +00:00
skodak d184f8f9b7 MFC: MDL-12079 fixed use of clean_param() 2007-11-10 14:55:46 +00:00
skodak 537e8dedfa MFC: MDL-12079 fixed use of clean_param() 2007-11-10 14:50:34 +00:00
urs_hunkler 1463bdc4ee MDL-12093 :: function get_in_popup() added to weblib.php. It returns true if the page is opened in a popup window.
* TODO Use a central function to create the popup calls allover Moodle and
 * TODO In the moment only works with resources and probably questions.
2007-11-10 14:44:41 +00:00
skodak 6ba839a768 MFC: MDL-12092 removed newline chars, we do not know the admin's platform, one line should be ok IMHO. 2007-11-10 14:36:36 +00:00
stronk7 42ae2fccb2 New profilefield_ lang files are now supported with
safe fallback to the "old" ones (stored in admin.php)
2007-11-09 20:10:14 +00:00
stronk7 d770f41a00 Adding lang support within profile fields to make them selfcontained.
Merged from MOODLE_18_STABLE
2007-11-09 19:10:08 +00:00
nfreear e9a5857b7d Follow up fixes MDL-12029 "Glossary view needs heading markup..." Merged, 2 days late :(. 2007-11-09 14:35:03 +00:00
toyomoyo 57a676ee7a MDL-12044, adding missing string 2007-11-09 02:55:59 +00:00
toyomoyo a48ae8ec5d MDL-12065, do not force parents to enrol in student courses 2007-11-09 01:39:06 +00:00
fmarier fa9ad7b620 Add missing fields when upgrading/installing on Postgres
mod/exercise, mod/scorm and question/type/rqp
MDL-12023
2007-11-09 01:24:28 +00:00
fmarier c10cac4e4a mod/quiz: Add a link back to the course page after a quiz is completed 2007-11-09 01:14:45 +00:00
poltawski e4e1faa6ab MDL-12070 - PARAM_CLEANHTML strips magic quotes.. 2007-11-08 22:18:33 +00:00
poltawski b72d8a7b98 MDL-12070 - re-enable the use of HTML in choice options,
merged from MOODLE_18_STABLE
2007-11-08 18:29:53 +00:00
sam_marshall fbaf314c87 MDL-12072 Added heading tag for calendar 'blocks' 2007-11-08 16:59:14 +00:00
sam_marshall eb8a6e6c60 MDL-12069 Make calendar events key labels and link titles consistent (also tidy up one bit of duplicated code) 2007-11-08 15:15:59 +00:00
skodak 5bdacd72ef MFC: MDL-10365 grade history can be turned off + lifetime 2007-11-08 09:58:55 +00:00
toyomoyo 46bdf8d1a8 keeping version numbers in sync 2007-11-08 05:53:02 +00:00
toyomoyo 05bab49047 MDL-12061, <p> in html editor breaks xhtml strict 2007-11-08 05:37:22 +00:00
moodler f6b74139d7 Automatic installer.php lang files by installer_builder (20071108) 2007-11-08 05:25:20 +00:00
nicolasconnault 44445b034f MDL-11790 Fixed hard-coded strings. Merci Nicolas! 2007-11-08 05:16:48 +00:00
toyomoyo 85c9758459 1.9 Beta 2 should not be read as 1.9.2 in environment page 2007-11-08 05:12:32 +00:00
toyomoyo f75cf3a13d MDL-11909, putting a unique constrait userid-itemid on grade_grades table 2007-11-08 01:59:49 +00:00
urs_hunkler 41b08f2d96 merged from 1.8 :: In the first table column class="header" was missing. 2007-11-07 18:11:26 +00:00
sam_marshall 366c49848f MDL-12055 Tweaked forum subscribe 'continue' address 2007-11-07 17:31:58 +00:00
sam_marshall 5d735c5281 MDL-12055 Tweaked forum subscribe 'continue' address 2007-11-07 17:05:06 +00:00
ethem f91a5b733a Fix for refactoring
Fatal error: Call to undefined method enrolment_plugin_authorize::print_enrolmentkeyfrom() in /usr/local/www/data/moodle/enrol/manual/enrol.html on line 7
2007-11-07 15:55:09 +00:00
tjhunt 6d3bcb44dd Eliminate duplicate $Id$ tag. 2007-11-07 15:26:29 +00:00
tjhunt 41c88b8cda Eliminate duplicate $Id$ tag. 2007-11-07 15:20:48 +00:00
tjhunt 228d5ecb07 Eliminate duplicate $Id$ tag. 2007-11-07 12:35:09 +00:00
toyomoyo 38161091d6 MDL-12025, enable row markings via javascript to keep track of current row 2007-11-07 07:45:30 +00:00
moodler 67945637f3 Merged a grammar fix from 1.8 2007-11-07 07:15:35 +00:00
toyomoyo 0646497a1e MDL-12048, assignment grades not migrated into 1.9 2007-11-07 04:27:53 +00:00
toyomoyo 69eedfa2fe backup/restore of grade histories should be off by default 2007-11-07 01:10:18 +00:00
nicolasconnault 6c5efa9157 MDL-8853 Applied Ann's Patch 2007-11-06 13:25:22 +00:00
toyomoyo 7d1b0eee29 fixing bogus $scoid 2007-11-06 05:40:58 +00:00
toyomoyo 0cd2561466 fixing a warning 2007-11-06 02:58:28 +00:00
toyomoyo 4e3dad540c MDL-10509, LDAP username to be always in lowercase 2007-11-06 01:00:27 +00:00
sam_marshall 7135ffca51 MDL-12030 Incorrect double quotes in sql 2007-11-05 17:57:10 +00:00
nfreear 6a021d6fc4 Fixes MDL-12029 "Glossary view needs heading markup + other accessibility fixes". Merged. 2007-11-05 15:24:58 +00:00
nicolasconnault 211e9c6d3f MDL-8992 Now only appearing once per page, and XHTML compliant. Also removed an ugly browser-sniffing css hack from the quicktime plugin, and applied the same browser detection as for the other plugins 2007-11-05 14:10:29 +00:00
skodak 071aeb9926 MFC: MDL-11399 make sure user context exists 2007-11-05 09:51:52 +00:00
skodak d5defbf5a8 MFC: MDL-11079 detect/prevent email duplicates when uploading users 2007-11-05 09:39:30 +00:00
skodak a17ca7ba09 MFC: MDL-11996 bulk user upload - custom profile fields docs 2007-11-05 09:13:15 +00:00
toyomoyo 31248c5d9c MDL-9552, update the gradebook everytime score is sent 2007-11-05 07:29:59 +00:00
skodak dd861fbc33 new csv import library included ;-) 2007-11-05 00:56:02 +00:00
skodak 3aa5023ef9 new csv import library included ;-) 2007-11-05 00:49:29 +00:00
skodak c92718aa13 file csvlib.class.php was added on branch MOODLE_19_STABLE on 2007-11-05 00:49:29 +0000 2007-11-05 00:43:37 +00:00
moodler f991a28d5c New installer file added to CVS repo. 2007-11-04 17:08:11 +00:00
moodler 76980fca70 file installer.php was added on branch MOODLE_19_STABLE on 2007-11-04 17:08:11 +0000 2007-11-04 17:05:25 +00:00
skodak 481425fadb MFC: MDL-12020 can not bulk delete users with the same email - new username collision 2007-11-04 13:52:30 +00:00
moodler 8453485495 Automatic installer.php lang files by installer_builder (20071103) 2007-11-03 05:09:41 +00:00
tjhunt 5cf2c57a22 Minor whitespace fixups. 2007-11-02 16:19:54 +00:00
stronk7 f2723764f7 There was a mistake in the dir being created. It must be
the backup temp area one. MDL-11912

Merged from MOODLE_18_STABLE
2007-11-02 13:02:37 +00:00
urs_hunkler 2b22a5f423 removed a typo: tabletable > table 2007-11-02 10:40:12 +00:00
stronk7 745a099abf Changed check_dir_exists() behaviour to be more robust
and to work better when used recursively under sites
with open_basedir enabled. Credit goes to René Samselnig. MDL-11437

Merged from MOODLE_18_STABLE
2007-11-02 09:52:42 +00:00
skodak b687218970 MFC: MDL-11996 bulk user upload - improvements, fixes and cleanup - part2 2007-11-02 08:42:36 +00:00
donal72 92a1d319fc Propagate additional error info about XML parse failures 2007-11-02 00:14:43 +00:00
donal72 98547f476f More error info about XML parse failures 2007-11-02 00:12:48 +00:00
stronk7 dddcaf6358 Now PHP code generated by the XMLDB editor automatically
adds calls to upgrade_main_savepoint(). MDL-11698
2007-11-01 23:21:41 +00:00
donal72 98a6fc4a3b Initialize the $message variable properly this time. 2007-11-01 21:30:09 +00:00
donal72 7499f511c8 Revert: Initialize the $message variable 2007-11-01 21:26:55 +00:00
stronk7 359ee558f0 Unsetting one white border.
Merged from MOODLE_18_STABLE
2007-11-01 20:07:55 +00:00
skodak 7b5f66308c MFC: MDL-11996 fixed previous speedup commit for user operations in admin tree 2007-11-01 19:44:32 +00:00
skodak 81c9dd751a MFC: MDL-11996 bulk user upload - improvements, fixes and cleanup - part1 2007-11-01 19:39:38 +00:00
skodak 0a48ba0c0b MFC: MDL-11995 prevent deleting of grade items attached to external activities 2007-11-01 15:09:42 +00:00
thepurpleblob 915e268e62 MDL-11977:
Add an an optional forgotten password handling url
2007-11-01 14:36:25 +00:00
nicolasconnault 5fc40f4208 MDL-8992 Added a simple script from http://mar.anomy.net/entry/2006/11/24/02.12.18/ to the mediaplugin filter output. Works like a charm on all tested browsers 2007-11-01 13:58:40 +00:00
nicolasconnault aa37778ca3 file eolas_fix.js was added on branch MOODLE_19_STABLE on 2007-11-01 13:58:40 +0000 2007-11-01 13:52:15 +00:00
nfreear 482b3d1677 Fixes bug MDL-11994, Accessibility: "Users tagged with ..." should be marked up as a list. Merged. 2007-11-01 12:34:39 +00:00
skodak f018ef4a52 MFC:
MDL-11966 fixed typo in grader report causing fatal errors
MDL-11993 refactored code for item headers and icons
2007-11-01 11:45:03 +00:00
skodak e8fc2358ca file calc_off.gif was added on branch MOODLE_19_STABLE on 2007-11-01 11:45:03 +0000 2007-11-01 11:42:33 +00:00
nicolasconnault 7e33b18807 MDL-11865 upgraded pagelib to using build_navigation() 2007-11-01 08:59:44 +00:00
skodak 219927349a MFC: MDL-11966 implemented dategraded and datesubmitted, tweaked altering of grades depending in hidden grades
MDL-11974 improved gradebook CSS
2007-11-01 08:50:30 +00:00
nicolasconnault f6d8678098 MDL-11912 Creating 1000's layer directory first, then userid directory: no need for recursion 2007-11-01 08:45:57 +00:00
donal72 71494eb0b1 Test for empty dataset to suppress a warning 2007-11-01 06:13:02 +00:00
donal72 3e6e9eaa52 Initialize the $message variable 2007-11-01 05:02:46 +00:00
pichetp 442e308648 MDL-11867 setting real null when response is null in calculated question merged from
head
2007-11-01 00:32:11 +00:00
wildgirl 48f66dd36e MDL-11725 en lang string edit 2007-10-31 21:54:30 +00:00
wildgirl c0d1c8f9cb MDL-11796 help file edit 2007-10-31 21:22:44 +00:00
wildgirl f46a06d08c MDL-11941 help file URL correction 2007-10-31 21:05:23 +00:00
nicolasconnault 6d7ab89b65 MDL-11912 Removed recursive param 2007-10-31 19:04:30 +00:00
tjhunt 2e978de3d1 MDL-10284 - wrong language string used on the quiz view page to inform students of the quiz deadline. I took the opportunity to strip out an unnecessary HTML table, and reviewing uses of the string /quiz(open|close)s?/ found one other inconsistency on the quiz editing form. Merged from MOODLE_18_STABLE. 2007-10-31 17:08:51 +00:00
tjhunt a999da51c5 MDL-11624 - /mod/quiz/index.php too dependant on individual course format names. I basically changed it to do the same as the forum module. Merged from MOODLE_18_STABLE. 2007-10-31 16:42:06 +00:00
nicolasconnault 150692da89 MDL-11912 Removed recursive param 2007-10-31 15:20:58 +00:00
skodak d01930668d MFC: MDL-11966 removed plugin selector when only one plugin available 2007-10-31 09:14:32 +00:00
skodak 809baca60a MFC: fixed numuser regression in overview 2007-10-31 09:00:06 +00:00
moodler 594676271f Automatic installer.php lang files by installer_builder (20071031) 2007-10-31 04:37:58 +00:00
pichetp a8f56ba982 solving MDL-7496 for calculated merged from head 2007-10-31 02:48:30 +00:00
skodak aa4847c757 MFC: MDL-11973 Improved showing of hidden items in ouuser and user report 2007-10-30 21:41:41 +00:00
skodak 29cf643cad MFC: MDL-11951 a little typo - no recursive call intended in has_any_capability() I guess 2007-10-30 20:52:54 +00:00
mattc-catalyst c546706479 Author: Matt Clarkson <mattc@catalyst.net.nz> 2007-10-30 20:45:04 +00:00
tjhunt 3d94c5e08e MDL-6376 - fix minor errors in the previous commit.
More significantly, this patch changes the '1 Students have made 1 attempts' string.

To start with, this code was being produced in five different places, so I made a function to do the work!. Next, as you can see, it is not gramatical. Also, some people find it confusing, as in MDL-6376.

Therefore, it now just says 'Attempts: 1'.
2007-10-30 19:28:05 +00:00
sam_marshall 3724757d96 MDL-11916 Added managegroupevents capability 2007-10-30 16:18:08 +00:00
skodak 11551df2c3 MFC: MDL-11957 improving and cleanup in grade overriding 2007-10-30 11:54:25 +00:00
tjhunt d09ab40142 MDL-11951 - supplemental - need capability checks in the outer if of the file too. 2007-10-30 10:49:25 +00:00
tjhunt 435d7bdba9 Unit tests for MDL-9295 - clean_param with PARAM_URL/PARAM_LOCALURL. Merged from MOODLE_18_STABLE. 2007-10-30 10:46:23 +00:00
tjhunt 7e340b3e8d MDL-9295 - PARAM_URL/PARAM_LOCALURL does not accept http://localhost/ or other hosts on lans. Merged from MOODLE_18_STABLE. 2007-10-30 10:15:27 +00:00
tjhunt 384a9cbda9 Correct misleading comment. Follow-on from the fix to MDL-11462. 2007-10-30 10:10:20 +00:00
toyomoyo 8b405ab59b making multibyte filename appear correctly under IE download 2007-10-30 00:33:45 +00:00
skodak 6543cbde7a MFC: MDL-11955 required scale selection when grade type is scale 2007-10-29 20:36:15 +00:00
skodak 6e0fd47067 MFC: MDL-11954 grader report links to profiles from the same course 2007-10-29 20:25:51 +00:00
skodak 90f36eaf96 MFC: MDL-11904 deny/accept Email settings conflict with text - now .example.com means all subdomains 2007-10-29 20:15:35 +00:00
tjhunt 13beed44aa MDL-11952 - In the course admin block, if the user has moodle/question:managecategory, but no other capabilites, the questions link should go to the manage categories page 2007-10-29 16:58:10 +00:00
tjhunt 1db25b8950 MDL-11951 - Need a link to the Front Page course question bank in the admin tree. 2007-10-29 16:53:41 +00:00
tjhunt 4288cc0e90 MDL-11784 - On the role assign page, list who is assigned the role for roles with only a few assignments. Improved version. Now, it only shows the extra column if some roles have between 1 and 10 assignees, as per Martin D's request. 2007-10-29 15:38:31 +00:00
poltawski fdd91b7098 MDL-11124 - Allowed 'There are no [modulename]' translations. This is currently
hardcoded and can be discovered through the user interface resonably easily.
2007-10-29 10:42:16 +00:00
poltawski 7da47c8128 MDL-11068 - fixed typo 2007-10-29 09:56:21 +00:00
poltawski 2e8b9f7325 MDL-11813 - Use existing group setting strings on course edit form so can be
better translated. Patch from Daniel Miksik
2007-10-29 09:45:38 +00:00
skodak 9a873b571d MFC: MDL-11874 grader report now indicates hidden items (gray title + range) and hidden grades (except when editing) 2007-10-29 08:39:25 +00:00
toyomoyo eab9dead49 MDL-11930, remove lang file for csv export 2007-10-29 02:02:30 +00:00
danmarsden 3a267ca3a0 missed one line.
Fix for MDL-10085  and MDL-8118 Problem with number of Responses in choice wrong, and displayed users incorrect on results. merged from HEAD
2007-10-29 00:22:44 +00:00
poltawski b1e96ca8b2 MDL-11767 SQL error with postgres 2007-10-29 00:20:30 +00:00
danmarsden 360342a41f Fix for MDL-10085 and MDL-8118 Problem with number of Responses in choice wrong, and displayed users incorrect on results. merged from HEAD 2007-10-28 23:28:14 +00:00
poltawski ce249c4de5 MDL-11937 - save 100 database queries in the case of the admin bookmarks block
without bookmarks on non-admin page
2007-10-28 23:03:33 +00:00
skodak a32126839c MFC: MDL-11563 replaced hardcoded permission check from admin_tree_block 2007-10-28 22:36:29 +00:00
skodak 020eae6335 MFC: MDL-11934 grade report in user profile now selectable 2007-10-28 18:11:17 +00:00
skodak d5d95c5e02 MFC: MDL-11927 fixed cookiepaths; patch by Kevin 2007-10-28 14:21:41 +00:00
skodak 038ee13b04 MFC: MDL-11718 report styles moved to report/xx/styles.php - for better consistency with other plugins; other cleanup in user report css; fixed css in user profile 2007-10-28 12:57:17 +00:00
skodak d6beb4690a file styles.php was added on branch MOODLE_19_STABLE on 2007-10-28 12:57:17 +0000 2007-10-28 12:51:16 +00:00
urs_hunkler 893194c625 MDL-11926 :: two comments confused Chameleon. I have deleted the comments and optimized CSS for Chameleon use. 2007-10-28 12:38:44 +00:00
urs_hunkler 55c7250333 MDL-11928 :: calendar width in IE6 && MDL-11730 :: header-home background color fixed 2007-10-28 08:53:46 +00:00
moodler b4f675e1d5 Automatic installer.php lang files by installer_builder (20071028) 2007-10-28 05:14:47 +00:00
skodak 96e3537213 MFC: added groups param to get_numusers() - to be used in oureport; might be handy elsewhere too 2007-10-27 22:06:46 +00:00
skodak 7823acb0c9 MFC: support for styles.php in grade reports 2007-10-27 22:02:47 +00:00
skodak 5e691be585 MFC: MDL-11718 fixed typos in prev commit 2007-10-27 20:38:05 +00:00
skodak b7049c9222 MFC: MDL-11718 minor cleanup 2007-10-27 20:36:34 +00:00
skodak 8941942a02 MFC: MDL-11718 minor fix for grades in user profile 2007-10-27 18:23:38 +00:00
skodak e685d5838d MFC: MDL-11718 partial cleanup in overview report - unfortunately the problems with hidden grades can not be solved here without db changes 2007-10-27 18:00:21 +00:00
skodak 70efa359e2 file settings.php was added on branch MOODLE_19_STABLE on 2007-10-27 18:00:22 +0000 2007-10-27 17:58:36 +00:00
skodak edc0fe896d MFC: MDL-11718 course settings for reports - for now only user report (rank and showing of hidden items) 2007-10-27 15:35:16 +00:00
skodak fbaa57cbf8 MFC: MDL-11718 grader report now does not show column totals if user does not have view hidden grades capability because we can not calculate the totals depending on altered aggregates 2007-10-27 13:15:06 +00:00
skodak 2ee13c5c8b MFC: fixed error when no scale present 2007-10-27 11:42:34 +00:00
nicolasconnault a7212cb9c7 grade_outcome->description doesn't exist 2007-10-27 06:28:39 +00:00
tjhunt e63938ba8a MDL-11917 - Improve the title on the assign/override roles page. 2007-10-26 16:59:49 +00:00
toyomoyo 6597b34eeb MDL-11532, updatesql needs to get run after each 'round' otherwise there's nothing to pull from the context table 2007-10-26 07:56:36 +00:00
toyomoyo c6ed8589e0 MDL-11836, show number of blocks but do not link if no reference to any course 2007-10-26 03:24:29 +00:00
toyomoyo bebdb9b162 MDL-11902, gradebook formula dereferencing problem 2007-10-26 02:06:21 +00:00
tjhunt 677ab5e475 Fix typo. 2007-10-25 14:29:39 +00:00
tjhunt 4a4b110509 MDL-11825 - Force penaltyfactor to 1 for truefalse questions on GIFT import, as is done on the editing form. Merged from MOODLE_18_STABLE. 2007-10-25 09:43:09 +00:00
toyomoyo 5e919c34ee MDL-11893, send email to admin when add_to_log fails 2007-10-25 04:01:38 +00:00
danmarsden 00f65b4e5d MDL-11397 bug with IE 6 not displaying anonymous results correctly.
- also fix for XHTML Strict.

merged from HEAD
2007-10-24 21:29:12 +00:00
toyomoyo 4ad8ec74e7 MDL-11513, adding support for grade letters 2007-10-24 07:38:23 +00:00
whchuang 8e48cb7180 Fixed MDL-10506 Hide/Show Advanced text does not toggle in IE and Safari when edit profile 2007-10-23 22:18:17 +00:00
tjhunt 6a3ba4e585 MDL-11784 - On the role assign page, list who is assigned the role for roles with only a few assignments. 2007-10-23 16:27:06 +00:00
tjhunt b16832dd09 MDL-11881 - User with question permission but not mod/quiz:manage can get a nasty require_capability error. 2007-10-23 16:15:31 +00:00
tjhunt e88133dc12 MDL-11870 - Notices on the quiz view page if the corresponding grade item was deleted. 2007-10-23 07:47:43 +00:00
moodler 841d2ca4c9 Automatic installer.php lang files by installer_builder (20071023) 2007-10-23 05:14:07 +00:00
danmarsden 319e0b83a5 Fix for MDL-9666 totals don't appear when full names are shown. merged from head. 2007-10-22 21:50:47 +00:00
danmarsden 210f57ff8a fix for MDL-11063 - thanks to Wen for the patch. merged from head. 2007-10-22 21:26:16 +00:00
arborrow 7ee7b84e9d MDL-11869 - javascript syntax error was preventing the call to the calc function. Adding in the double slashes around CDATA resolves the problem. (merging into 19STABLE) 2007-10-22 20:37:53 +00:00
tjhunt 7cc3f26d18 MDL-11708 - Zero answers are not allowed in Matching questions - sometimes I hate PHP. Merged from MOODLE_18_STABLE. 2007-10-22 16:57:09 +00:00
tjhunt 8ac54989eb MDL-11824 - Literal asterisk (\*) in shortanswer question not handled correctly by get_correct_responses + Unit tests. Merged from MOODLE_18_STABLE. 2007-10-22 15:37:25 +00:00
urs_hunkler 867354f9ae CSS color "lightgrey" does not exist. I replaced it with the "corresponding" Linux color value #D3D3D3. 2007-10-22 10:35:08 +00:00
nfreear b27db1be63 Fix for reopened bug MDL-7878, "Link identification and skipping" - includes site and course index.php. Merged. 2007-10-22 09:25:52 +00:00
nfreear b39a4fec6a Partial fix for reopened bug MDL-7878, "Link identification and skipping" - affects all course formats + other files. Merged. 2007-10-22 06:51:09 +00:00
toyomoyo a358f9b4e2 fixing some warnings 2007-10-22 03:02:00 +00:00
gbateson cde191082a improve XHTML compatability of HotPot reports; fix termination of <input> tags in JCloze and JQuiz 2007-10-22 01:43:19 +00:00
stronk7 fcad0318e9 Changing some standard colors. Merged from HEAD. 2007-10-21 19:27:30 +00:00
skodak 2f40c9ea94 MFC: MDL-11718 fixed altered aggregation of overridden and locked grades + some speedup and corrections 2007-10-21 13:23:07 +00:00
skodak d5f05bd60e MFC: MDL-11859 student rank and showing of hidden grade items are now configurable + fixed some incorrect include_once 2007-10-21 12:57:35 +00:00
skodak 94707762b5 file settings.php was added on branch MOODLE_19_STABLE on 2007-10-21 12:57:35 +0000 2007-10-21 12:56:20 +00:00
moodler bcdb15f066 Automatic installer.php lang files by installer_builder (20071021) 2007-10-21 04:23:45 +00:00
gbateson 0846150380 improvements to XHTML compatability:
(1) change & to &amp; in URLs;
(2) correctly terminate <input ... /> and <img ... /> tags;
(3) add closing tag for "page" and "content" divs when not using print_footer()
(4) change "<" and ">" to html entities in open text
2007-10-21 02:52:49 +00:00
skodak f39432cafe MFC: MDL-8605 fixed user image restore code 2007-10-20 20:59:20 +00:00
skodak 8809b99a1f MFC: MDL-11857 missing addslashes on idnumber field during backup restore 2007-10-20 19:34:26 +00:00
skodak aaf277889b MFC: MDL-11857 missing addslashes on idnumber field during backup restore 2007-10-20 19:26:53 +00:00
skodak f7266dd323 MFC: MDL-11835 proper labels for aggregation coef - weight and extra credit 2007-10-20 19:13:55 +00:00
skodak ee41a6a7c8 MFC: MDL-11718 fixed incorrect bounds when altering aggregates for hidden grades 2007-10-20 15:50:44 +00:00
skodak 8b378edc14 MFC: MDL-11278 improved forced category settings - refactoring + regrading forced + new setting to hide forced settings in UI 2007-10-20 15:11:48 +00:00
mudrd8mz e3dccebf8d Backporting tabindex support from HEAD. Sorry for adding a new feature into the stable but this is quite useful for translators. 2007-10-20 02:06:12 +00:00
stronk7 e21b7f0a57 Booleans are not always transformed to 0 /1. This was preventing install
under mysqli. Define block->multiple if needed.

Merged from MOODLE_18_STABLE
2007-10-19 17:52:03 +00:00
stronk7 74812cb716 Adding support to course/formats from within the editor. MDL-11842
Merged from MOODLE_18_STABLE
2007-10-19 16:52:06 +00:00
poltawski 7931e74e44 MDL-11766 Flickr/Youtube blocks don't respect http proxy vars 2007-10-19 15:07:02 +00:00
poltawski 612f6992c5 MDL-11840 - curl was set to use CONNECTs for all http requests. This is disallowed
by most http proxies to prevent tunneling. Added some debugging in case of failure.
2007-10-19 14:45:54 +00:00
poltawski 30a16e7e83 MDL-11766 download_file_content is quite broken with proxies - lacking global
CFG definition, so must never have worked, also incorrectly specified proxyhost..
2007-10-19 11:44:04 +00:00
skodak 8b6f55ee7a 2007-10-19 08:53:54 +00:00
skodak 2b0e9d6ef9 file agg_sum.gif was added on branch MOODLE_19_STABLE on 2007-10-19 08:53:55 +0000 2007-10-19 08:51:53 +00:00
skodak 8336513809 file agg_mean.gif was added on branch MOODLE_19_STABLE on 2007-10-19 08:53:56 +0000 2007-10-19 08:51:53 +00:00
toyomoyo 0b0ff32d3c MDL-11167, admin blocks page should not show blocks not placed on course pages 2007-10-19 07:53:09 +00:00
donal72 45bddb6e6d Enable access to Mahara from testclient.php 2007-10-19 00:44:40 +00:00
stronk7 5a27d062ee Commenting some more debug... 2007-10-18 16:02:47 +00:00
stronk7 551f994986 Commenting out some excess of debug info. 2007-10-18 15:52:16 +00:00
skodak 1e5d9d5d5f MFC: userid must be set in new grade too 2007-10-18 10:09:19 +00:00
toyomoyo 1914e3a8f3 grade_grade does not have itemid initialized in grader report 2007-10-18 07:07:59 +00:00
toyomoyo 650044d9a2 sorry fixing conflict marker 2007-10-18 05:51:39 +00:00
toyomoyo fb38e114e7 MDL-11241, adding logs for roles management 2007-10-18 05:50:41 +00:00
moodler 6d19ce3361 Automatic installer.php lang files by installer_builder (20071018) 2007-10-18 05:43:10 +00:00
mattc-catalyst 2bf84bba09 groups/autogroup: Allocate members to groups more fairly
Author: Matt Clarkson <mattc@catalyst.net.nz>
2007-10-18 03:00:23 +00:00
skodak 6bfe184be4 MFC: MDL-11718 aggregated grades which depend on hidden grades are now hidden too + cleanup in grader report 2007-10-17 20:40:19 +00:00
tjhunt b85eb9fa4a MDL-11061 - admin notifications about $CFG->wwwroot, which sometimes lead to obscure errors. 2007-10-17 20:20:17 +00:00
tjhunt c5c60abd3e Fix notice. 2007-10-17 14:35:34 +00:00
urs_hunkler 0c3f1da5b6 removed CSSEdit reference line. 2007-10-17 13:52:10 +00:00
urs_hunkler a27b6c2c52 RTL rendering optimized for IE6, IE7, Oper with CSS and Safari 2 with JavaScript. 2007-10-17 13:37:58 +00:00
skodak cdb4e23f90 MFC: MDL-11718 aggregated grades which depend on hidden grades are now hidden too; cleanup in user report 2007-10-17 10:02:51 +00:00
skodak e19f971389 MDL-11658 shared rdef definition - reduced memory usage in cron; MFC 2007-10-17 09:21:48 +00:00
donal72 47405f9b6f Laying groundwork for more Mnet error reporting 2007-10-17 08:14:32 +00:00
donal72 e04584907b Rewrite testclient.php to be a service browser for remote Moodles. This should be useful to people who are trying to connect to the API from non-Moodle hosts, or write software to connect to Moodle. MDL-10214, MDL-10174, MDL-10172, MDL-10171 2007-10-17 08:11:50 +00:00
donal72 3dff7f538b Change reflection methods to only report on methods that are being published to the inquiring host (instead of all methods that could be published). MDL-10214, MDL-10174, MDL-10172, MDL-10171 2007-10-17 08:07:50 +00:00
toyomoyo bef2f86f04 closing this $rs 2007-10-17 07:28:44 +00:00
toyomoyo cf5a890bd6 MDL-11801, chat message not shown 2007-10-17 07:18:14 +00:00
toyomoyo 244d9553ca MDL-11687, the string 'capability' should not be translated in the links to capabilities docs page 2007-10-17 05:36:23 +00:00
toyomoyo f8c11d0afc MDL-11687, the string 'capability' should not be translated in the links to capabilities docs page 2007-10-17 05:30:32 +00:00
toyomoyo bdd77c8326 MDL-11553, reducing the number of bulk user selection buttons and lang changes 2007-10-17 04:29:16 +00:00
toyomoyo c470dada5b MDL-11770, broken userid in add_to_log 2007-10-17 03:01:38 +00:00
toyomoyo 472bce6d12 MDL-11170, blog tagging code broken 2007-10-17 02:54:43 +00:00
tjhunt aeb50096a1 MDL-5262 - PHP notice when sorting on R% coloumn in the Item analysis report - I adopted the simple solution of stopping people sorting on that column, since it is the same as sorting on rcount, I think. 2007-10-16 21:26:03 +00:00
tjhunt 8af53beeec Fix possible notice. 2007-10-16 20:52:12 +00:00
tjhunt ede4316c01 MDL-11794 - Blocks editing on button is not XHTML Strict when produced by page_generic_activity. 2007-10-16 20:43:28 +00:00
tjhunt 49fa880ef6 MDL-11791 - Custom corners broken on the quiz view page because I missed a global declaration, and PHP empty was hiding the problem. 2007-10-16 20:29:37 +00:00
stronk7 7063eb9fbb Move the update of digestmailtimelast to the end of the
loop to allow digests to be sent over multiple cron
executions if something crash in the middle. MDL-11657
2007-10-16 16:08:34 +00:00
urs_hunkler abbad4af13 Added mod-data-view to the custom corners include list for properly displayed custom corners. They where missing arounfd the contetn area.
Replaced strstr with the faster strpos.
2007-10-16 14:54:46 +00:00
tjhunt 40c6886f95 Fix restore notice when a role has no capabilities. 2007-10-16 14:03:08 +00:00
donal72 49ce7ff03c Log error code and text in mnet_server_fault_xml function. MDL-10196 2007-10-16 14:03:00 +00:00
donal72 a4fbad6e80 Label for wwwroot field 2007-10-16 10:20:12 +00:00
donal72 646a6d9481 MDL-11329: fixed text: "Local courses for external users:" 2007-10-16 09:14:47 +00:00
donal72 936450330a More helpful MNet error messages in debug mode 2007-10-16 09:02:01 +00:00
urs_hunkler ac331d6a4a Updates for IE problems, mainly for RTL language display. IE6 still refuses to work properly :-( 2007-10-16 08:56:06 +00:00
donal72 29858f020e MDL-11040: get_complete_user_data doesn't get the complete user data. Replace with get_record to bring over the user's description. 2007-10-16 08:53:16 +00:00
skodak 625faf10a3 MDL-11759 missing RISK_XSS in manage groups capability; merged from MOODLE_18_STABLE 2007-10-16 08:43:54 +00:00
gustav_delius f9144364f4 Fixed yet another error in the same bit of SQL in get_users_by_capability() that made many things not work properly on the course front page. 2007-10-16 08:27:39 +00:00
gustav_delius e19c5c1018 Fixing typo that led to fatal SQL error 2007-10-16 08:20:31 +00:00
donal72 516c425215 Removed a constraint that caused mnet to fail on clusters, vservers and other network configurations where the mnet client's hostname (as specified in the wwwroot) resolves to an IP address that differs from the IP address that it uses to contact other hosts. This should address MDL-10672 2007-10-16 08:00:20 +00:00
toyomoyo 28215f3286 MDL-11679, overview report should only return mycourses 2007-10-16 05:34:10 +00:00
nicolasconnault d815125160 MDL-8605 Upgrade of user folder will not occur if the user folder already exists 2007-10-16 04:54:13 +00:00
toyomoyo 56ce5f0965 fixing a warning 2007-10-16 04:33:23 +00:00
toyomoyo 0e319f934d MDL-9059, admins can't see group events in course 2007-10-16 03:46:43 +00:00
stronk7 35c114a9dc Reverting last commit. This is an EXTERNAL library file and shouldn't
be modified. And it was broken (strange linefeeds). MDL-11779
2007-10-15 22:02:03 +00:00
nfreear 8d62aacbda Follow up for MDL-11430, Flickr & Youtube tag blocks should use list markup - Fix styles. Merged. 2007-10-15 17:01:49 +00:00
nfreear 4a7cd55555 MDL-11775 "Undefined constant 'data_submitted' ..." - it's a function! 2007-10-15 15:02:10 +00:00
nfreear 8608db739d Follow up fix for MDL-11535 "Blog block sql error" - ...MAX(ordering) max_order - adding "AS" 2007-10-15 14:46:34 +00:00
nfreear 4c8aa550dd Follow up fix for MDL-11535 "Blog block sql error" - GROUP BY, added ", tg.name" etc. 2007-10-15 14:20:22 +00:00
thepurpleblob 290084cfdc MDL-11769:
question name is properly truncated to less than 255 characters tom
stop PostGRES choking.
2007-10-15 13:50:16 +00:00
nfreear cc2c883f80 Fixes MDL-11430, Flickr & Youtube tag blocks should use list markup. Merged. 2007-10-15 12:34:13 +00:00
nfreear 7914d49318 Preparation for MDL-11430 - whitespace. 2007-10-15 12:32:42 +00:00
nfreear 4776de0668 Follow up fix for MDL-11436 'Encapsulate "accesshide" HTML class in function', and use. Merged. 2007-10-15 10:06:47 +00:00
tjhunt 478c9e9380 MDL-11762 - Navigation not set up properly for resources - $this->navlinks was not being initialised in the base class. 2007-10-15 07:31:52 +00:00
urs_hunkler 1258810abc removed the javascript to correct the header display :: IE7 hangs. Need to find a different solution. 2007-10-15 07:13:30 +00:00
nicolasconnault ca005e23f7 MDL-10905 iterating properly through readdir() 2007-10-15 05:42:20 +00:00
nicolasconnault ec74fb3501 MDL-8605 putting versions in sync between 1.9 and head 2007-10-15 05:18:09 +00:00
toyomoyo bee3222be8 MDL-10353, adding couse variable to nav bar in calendar preferences 2007-10-15 04:46:05 +00:00
moodler 8241c5e324 Automatic installer.php lang files by installer_builder (20071015) 2007-10-15 04:35:05 +00:00
toyomoyo 47641637e5 MDL-11717, adding dimmed_text a, to dim links as well 2007-10-15 02:02:19 +00:00
gbateson 8ee76d1ffe where the correct responses on a JQuiz multiple choice question all have a score of 0%, the scores will be corrected to 100% 2007-10-15 00:59:03 +00:00
stronk7 86bea5c65e Improving cron to make digests to use much less memory. MDL-11657 2007-10-14 16:13:16 +00:00
urs_hunkler 7a158dac13 corrected IE calendar display, removed CSS bugs. 2007-10-14 16:06:59 +00:00
stronk7 b782e682f0 Backported from HEAD
Drop one index that shouldn't be there. MDL-11751
2007-10-14 09:57:52 +00:00
tjhunt 94f07cd524 Correct misleading error message in upgrade_activity_modules. Spotted while diagnosing MDL-11732. 2007-10-13 22:00:30 +00:00
mark-nielsen eee9477bfd Mergin fix for MDL-11684 from MOODLE_18_STABLE 2007-10-13 03:07:27 +00:00
mark-nielsen c2325b6ffd Mergin fix for MDL-11696 from MOODLE_18_STABLE 2007-10-13 02:34:14 +00:00
mark-nielsen c09019a4b5 Merging fix for MDL-11636 from MOODLE_18_STABLE 2007-10-13 01:56:37 +00:00
urs_hunkler b1abcbd50a MDL-11664 :: IE6 can't display transparent PNGs. Added not transparent gifs instead and changed the background for IE6 to a solid colour. 2007-10-12 21:46:36 +00:00
urs_hunkler ced48de808 MDL-11664 :: added IE6/UE7 special CSS and because that didn't help at all places added JavaScript to correct some wrong calculated width. 2007-10-12 21:42:04 +00:00
nicolasconnault 01d786178d MDL-8605 Backup and restore implementation 2007-10-12 20:24:00 +00:00
nicolasconnault 46387ff2ae file testbackuplib.php was added on branch MOODLE_19_STABLE on 2007-10-12 20:24:09 +0000 2007-10-12 19:13:19 +00:00
tjhunt b34fc1be24 MDL-11741 - Convert core modules to take advantage of recent improvements to build_navigation.
This check-in removes about 400 lines of code. I hope I have not screwed anything up. I would be grateful if people could review this change, and keep an eye on the navigation bar in modules.

Any navigation bar bugs you find in the near future, feel free to file them in the tracker and assign them to me. Thanks.

If not to many problems are found, I think I would like to backport this to 1.9 stable, but I am not sure that is a good idea. Opinions to the General Developer Forum please. I am about to start a thread there.

Backported from head. Will update merged tags in a few hours. I am late for orchestra. Sorry.
2007-10-12 16:09:37 +00:00
tjhunt c971067f91 MDL-11699 - Making one more common case a bit nicer for callers. 2007-10-12 15:11:39 +00:00
nfreear 64b0ce50b7 Follow up fix for MDL-11535 "Blog block sql error" - GROUP BY, added ", tg.flag". Merged. 2007-10-12 11:01:18 +00:00
tjhunt 36f4fa0c2d MDL-11699 - Further, backwards-compatible, improvement to the build navigation API to simplify a common case. Also, further improvements to the doc comment, so it is easy to use. 2007-10-12 10:35:55 +00:00
stronk7 a1d04b878b Adding $Id tag 2007-10-12 09:44:16 +00:00
nfreear 3ab263074c Fixes MDL-11695, Skip block links inaccessible for many keyboard-only users. Merged. 2007-10-12 08:49:58 +00:00
urs_hunkler b024b748c7 MDL-11729 :: Removed commenting out loading of the Chameleon files loading. 2007-10-12 07:52:12 +00:00
moodler 22ee674191 Info about version numbers 2007-10-12 07:47:07 +00:00
toyomoyo 0f132d1bee missing context 2007-10-12 07:40:03 +00:00
toyomoyo c58f9a458e MDL-11717, dimmed_text class for hidden grade items in grader report 2007-10-12 07:17:39 +00:00
Martin Langhoff d54a1b6712 cvsimport fixups 2007-10-12 03:14:42 +00:00
toyomoyo 3ffbc9a3e0 MDL-11715, export form should follow sortorder 2007-10-12 03:14:42 +00:00
toyomoyo 0741bdca11 MDL-11714, removing debuging statement 2007-10-12 01:33:32 +00:00
tjhunt ba79369331 MDL-11699 - Addendum - fix typo in fixup code. Sorry. 2007-10-11 16:43:16 +00:00
tjhunt 0a4025eaa5 Small tidy-up in print_header_simple. 2007-10-11 15:25:14 +00:00
nicolasconnault 1ce63d3fc2 MDL-8605 Preventing new user folder from being created when original folder is empty 2007-10-11 14:18:04 +00:00
tjhunt b9ecfd4957 MDL-9542 - Show final grades from new gradebook in Quiz UI - with help from Petr. 2007-10-11 11:42:03 +00:00
nicolasconnault 16ef809654 Small unit test-related fix 2007-10-11 11:14:03 +00:00
66162 changed files with 957364 additions and 9205281 deletions
-185
View File
@@ -1,185 +0,0 @@
// 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/>.
/**
* Generates tsconfig.aliases.json for cross-component TypeScript imports.
*
* Moodle ESM source files can import from other components using the alias
* scheme @moodle/lms/<component>/* (e.g. @moodle/lms/core/SomeUtil). This
* file reads the Moodle component registry (.grunt/components.js), finds every
* component that has a js/esm/src/ directory, and writes the corresponding
* TypeScript path mappings to tsconfig.aliases.json.
*
* tsconfig.json extends tsconfig.aliases.json, so TypeScript picks up the
* mappings automatically. The file is skipped if its content is unchanged, to
* avoid unnecessary rebuilds.
*
* This must run before esbuild compilation. The Grunt `jsconfig` task calls
* generateAliases() so that both jsconfig.json and tsconfig.aliases.json are
* kept in sync. The `react` task depends on `jsconfig`, so aliases are always
* up to date before a React build.
*
* @copyright 2026 Adrian Greeve <adrian@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
import fs from "fs";
import path from "path";
import { createRequire } from "module";
const rootDir = process.cwd();
const tsconfigOut = path.join(rootDir, "tsconfig.aliases.json");
const TS_ALIASES_WARNING =
"// WARNING: Do not edit this file manually. It is generated by `grunt jsconfig`.\n";
/**
* Load Moodle component paths from `.grunt/components.js`.
*
* @returns {Record<string, string>} Map of component paths to component names.
*/
function loadComponentPathMap() {
const require = createRequire(import.meta.url);
// Load Moodle's components data from .grunt/components.js.
const { fetchComponentData } = require(
path.join(process.cwd(), ".grunt", "components.js")
);
// Format: `{ components: { "public/lib": "core", ... } }`.
const componentsData = fetchComponentData().components;
// Expected:
// `{ "public/lib": "core", "public/ai": "core_ai", ... }`.
return componentsData;
}
/**
* Compare two TypeScript `paths` maps for exact equality.
*
* @param {Record<string, string[]>} a First paths map.
* @param {Record<string, string[]>} b Second paths map.
* @returns {boolean} True when keys and values match in order.
*/
function pathsEqual(a, b) {
const aKeys = Object.keys(a);
const bKeys = Object.keys(b);
if (aKeys.length !== bKeys.length) {
return false;
}
for (const key of aKeys) {
if (!Object.prototype.hasOwnProperty.call(b, key)) {
return false;
}
const aArr = a[key] ?? [];
const bArr = b[key] ?? [];
if (aArr.length !== bArr.length) {
return false;
}
for (let i = 0; i < aArr.length; i++) {
if (aArr[i] !== bArr[i]) {
return false;
}
}
}
return true;
}
/**
* Parse JSON content and tolerate line comments.
*
* @param {string} content Raw JSON/JSONC file content.
* @returns {unknown}
*/
function parseJsonWithComments(content) {
const stripped = content
.replace(/^\uFEFF/, "")
.replace(/^\s*\/\/.*$/gm, "");
return JSON.parse(stripped);
}
/**
* Convert JSON output so single-value arrays are rendered on one line.
*
* @param {unknown} obj Data to stringify.
* @returns {string} JSON string with flattened single-value arrays.
*/
function stringifyFlatArrays(obj) {
const json = JSON.stringify(obj, null, 2);
return TS_ALIASES_WARNING + json.replace(/\[\s+\"(.*?)\"\s+\]/g, '["$1"]') + "\n";
}
/**
* Generate `tsconfig.aliases.json` from Moodle component metadata.
*
* Includes core aliases, discovers plugin React source aliases, and skips
* rewriting when aliases have not changed.
*
* @returns {void}
*/
export function generateAliases() {
const componentPathMap = loadComponentPathMap();
// Build TS paths for tsconfig.aliases.json
/** @type {Record<string, string[]>} */
const tsPaths = {
// Always include core alias.
"@moodle/lms/core/*": ["./public/lib/js/esm/src/*"],
};
for (const [componentPath, componentName] of Object.entries(componentPathMap)) {
const runtimeAliasKey = `@moodle/lms/${componentName}/*`;
const targetPattern = `./${path
.join(componentPath, "js", "esm", "src", "*")
.replace(/\\/g, "/")}`;
tsPaths[runtimeAliasKey] = [targetPattern];
}
const tsconfig = {
compilerOptions: { paths: tsPaths },
};
// If tsconfig paths didn't change, skip regeneration
let previousPaths = null;
let hasWarningHeader = false;
if (fs.existsSync(tsconfigOut)) {
try {
const previousContent = fs.readFileSync(tsconfigOut, "utf8");
hasWarningHeader = previousContent.startsWith(TS_ALIASES_WARNING);
const previousTsconfig = /** @type {{compilerOptions?: {paths?: Record<string, string[]>}}} */ (
parseJsonWithComments(previousContent)
);
previousPaths = previousTsconfig.compilerOptions?.paths ?? {};
} catch {
// ignore parse errors and treat as "no previous cache"
previousPaths = null;
}
}
if (previousPaths && hasWarningHeader && pathsEqual(previousPaths, tsPaths)) {
console.log("✓ Generating tsconfig.aliases.json was skipped. No alias modifications detected.");
return;
}
// Write tsconfig.aliases.json
fs.writeFileSync(tsconfigOut, stringifyFlatArrays(tsconfig));
console.log("✓ Generating tsconfig.aliases.json");
}
-324
View File
@@ -1,324 +0,0 @@
// 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/>.
/**
* Core esbuild library for Moodle ESM components.
*
* This is the single source of all build logic. The Grunt tasks
* (.grunt/tasks/react.js) import from here rather than duplicating
* configuration or build steps.
*
* Source layout convention:
* <component>/js/esm/src/**\/*.{ts,tsx} → <component>/js/esm/build/**\/*.js
*
* Exports:
* createBuildConfig(isDev) esbuild config object; pass isDev=true
* to disable minification / add sourcemaps.
* buildPluginComponents(isDev) Glob for every js/esm/src tree across
* core and plugins, compile all in parallel.
* buildSingleFile(filePath, isDev) Compile one source file; used by the
* Grunt watch task on incremental changes.
* watchComponents(isDev) Start esbuild's native watch mode so the
* compiler rebuilds affected files on save.
* resolveComponentPaths(entry) Map an absolute source path to its
* relative input path and output path.
*
* @copyright 2026 Adrian Greeve <adrian@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
import esbuild from "esbuild";
import { glob } from "glob";
import chalk from "chalk";
import path from "path";
import fs from "fs";
const projectRoot = process.cwd();
/**
* Resolve a path from the current project root.
*
* @param {...string} segments Path segments to resolve.
* @returns {string} Absolute path from project root.
*/
const fromRoot = (...segments) => path.resolve(projectRoot, ...segments);
/**
* Create an incremental dot progress indicator.
* Prints one dot per completed build and wraps lines for readability.
*
* @param {number} total Total number of items to build.
* @returns {{ start: () => void, tick: () => void, succeed: (msg: string) => void, fail: (msg: string) => void }}
*/
function createDotProgress(total) {
const dotsPerLine = 60;
let printed = 0;
return {
start: () => {
process.stdout.write(`${chalk.cyan("Building")} `);
},
tick: () => {
printed++;
process.stdout.write(chalk.cyan("."));
if (printed % dotsPerLine === 0 && printed < total) {
process.stdout.write(` ${chalk.dim(`[${printed}/${total}]`)}\n`);
}
},
succeed: (msg) => {
process.stdout.write(` ${chalk.dim(`[${printed}/${total}]`)}\n`);
process.stdout.write(`${chalk.green("✓")} ${msg}\n`);
},
fail: (msg) => {
process.stdout.write(` ${chalk.dim(`[${printed}/${total}]`)}\n`);
process.stdout.write(`${chalk.red("✗")} ${msg}\n`);
},
};
}
/**
* Build a single React component entry file.
*
* @param {string} entry Absolute entry file path.
* @param {import('esbuild').BuildOptions} buildConfig Shared esbuild configuration.
* @returns {Promise<{file: string, output?: string, error: Error|null}>}
*/
async function buildComponent(entry, buildConfig) {
const resolved = resolveComponentPaths(entry);
if (!resolved) {
return { file: entry, error: new Error(`Unknown path pattern: ${entry}`) };
}
const { file, output } = resolved;
fs.mkdirSync(path.dirname(output), { recursive: true });
try {
await esbuild.build({
...buildConfig,
entryPoints: [entry],
outfile: output,
});
return { file, output, error: null };
} catch (error) {
return { file, error: error instanceof Error ? error : new Error(String(error)) };
}
}
/**
* Resolve source and output paths for a component entry.
*
* @param {string} entry Absolute component source path.
* @returns {{file: string, output: string} | null} Relative file info and output path, or null for unsupported paths.
*/
export function resolveComponentPaths(entry) {
const rel = path.relative(projectRoot, entry);
if (rel.includes(path.join('esm', 'src'))) {
const [part, rawFile] = rel.split(path.join('esm', 'src'));
const file = rawFile.replace(/^[\/\\]/, '');
return {
file,
output: fromRoot(part, 'esm', 'build', file.replace(/\.(ts|tsx)$/, '.js')),
};
}
return null;
}
/**
* Run all builds in parallel, showing incremental dot progress.
*
* @param {string[]} entryPoints Absolute entry file paths.
* @param {import('esbuild').BuildOptions} buildConfig Shared esbuild configuration.
* @returns {Promise<{errors: {file: string, output?: string, error: Error|null}[]}>}
*/
async function runParallelBuilds(entryPoints, buildConfig) {
const total = entryPoints.length;
/** @type {{file: string, output?: string, error: Error|null}[]} */
const errors = [];
const startTime = Date.now();
const progress = createDotProgress(total);
progress.start();
await Promise.all(entryPoints.map(async (entry) => {
const result = await buildComponent(entry, buildConfig);
if (result.error) {
errors.push(result);
}
progress.tick();
}));
const elapsed = ((Date.now() - startTime) / 1000).toFixed(1);
const succeeded = total - errors.length;
if (errors.length > 0) {
progress.fail(`${succeeded}/${total} built · ${elapsed}s`);
for (const e of errors) {
console.error(chalk.red(`${e.file}: ${e.error?.message ?? ''}`));
}
} else {
progress.succeed(chalk.bold(`${total} components built`) + chalk.dim(` · ${elapsed}s`));
}
return { errors };
}
/**
* Create the shared esbuild build configuration.
*
* @param {boolean} isDev Whether development mode is enabled.
* @returns {import('esbuild').BuildOptions} esbuild configuration object.
*/
export function createBuildConfig(isDev) {
return {
bundle: true,
format: "esm",
external: ["react", "react/*", "react-dom", "react-dom/*", "@moodlehq/design-system", "@moodlehq/design-system/*", "@moodle/lms", "@moodle/lms/*"],
jsx: "automatic",
minify: !isDev,
sourcemap: isDev ? 'inline' : false,
jsxDev: isDev,
keepNames: isDev,
treeShaking: !isDev,
define: { 'process.env.NODE_ENV': isDev ? '"development"' : '"production"' },
};
}
/**
* Build all plugin and core React components.
*
* @param {boolean} isDev Whether development mode is enabled.
* @returns {Promise<void>}
*/
export async function buildPluginComponents(isDev) {
console.log(chalk.green('> Building components...'));
const entryPoints = glob.sync("**/js/esm/src/**/*.{ts,tsx}", {
cwd: projectRoot,
absolute: true,
ignore: [
`${process.cwd()}/node_modules/**`,
`${process.cwd()}/vendor/**`,
],
});
const buildConfig = createBuildConfig(isDev);
const { errors } = await runParallelBuilds(entryPoints, buildConfig);
if (errors.length > 0) {
throw new Error(`React build failed: ${errors.length} component(s) could not be built`);
}
}
/**
* Start esbuild in native watch mode over all React components.
*
* Creates a single incremental build context for all entry points so that
* esbuild can reuse its internal graph between rebuilds instead of starting
* from scratch on every file change.
*
* @param {boolean} isDev Whether to build in development mode.
* @param {((srcFiles: string[]) => void) | undefined} [onRebuild] Called with the rebuilt entry source
* files (relative to project root) after each non-initial successful rebuild. Use this to run
* follow-up tasks such as linting without coupling them to this module.
* @returns {Promise<import('esbuild').BuildContext|null>} The active context, or null if no source files exist.
*/
export async function watchComponents(isDev, onRebuild) {
const entryPoints = glob.sync("**/js/esm/src/**/*.{ts,tsx}", {
cwd: projectRoot,
absolute: true,
ignore: [
`${process.cwd()}/node_modules/**`,
`${process.cwd()}/vendor/**`,
],
});
if (entryPoints.length === 0) {
return null;
}
const buildConfig = createBuildConfig(isDev);
// Map each source file to an {in, out} pair so esbuild can write each
// component to its custom output directory while sharing a single context.
// The 'out' path is relative to outdir (projectRoot) and has no extension —
// esbuild appends the appropriate extension automatically.
// Build entry pairs and ensure output directories exist in a single pass.
const entryPairs = entryPoints.flatMap(entry => {
const resolved = resolveComponentPaths(entry);
if (!resolved) {
return [];
}
fs.mkdirSync(path.dirname(resolved.output), { recursive: true });
return [{ in: entry, out: path.relative(projectRoot, resolved.output).replace(/\.js$/, '') }];
});
// Report build results to the terminal after every build (initial and on each change).
// metafile: true populates result.metafile.outputs so we know which files were written.
// On a rebuild only the affected outputs appear, so it effectively names the changed file.
/** @type {import('esbuild').Plugin} */
const watchReporter = {
name: 'watch-reporter',
setup(build) {
let isInitial = true;
let startTime = 0;
build.onStart(() => {
startTime = Date.now();
});
build.onEnd(result => {
const now = new Date().toLocaleTimeString();
const elapsed = ((Date.now() - startTime) / 1000).toFixed(1);
if (result.errors.length > 0) {
console.error(chalk.red(`[${now}] ✗ Build failed (${result.errors.length} error(s))`) + chalk.dim(` · ${elapsed}s`));
return;
}
const outputs = Object.keys(result.metafile?.outputs ?? {});
console.log(chalk.green(`[${now}] ✓ ${outputs.length} component(s) built`) + chalk.dim(` · ${elapsed}s`));
if (isInitial) {
isInitial = false;
} else if (onRebuild) {
// entryPoint is the source file (relative to projectRoot) that triggered
// this rebuild. Pass it to the caller so they can run follow-up tasks
// (e.g. linting) without this module needing to know about them.
const srcFiles = Object.values(result.metafile?.outputs ?? {})
.map(output => output.entryPoint)
.filter(/** @param {string|undefined} f */ f => !!f);
onRebuild(/** @type {string[]} */ (srcFiles));
}
});
},
};
const ctx = await esbuild.context({
...buildConfig,
entryPoints: entryPairs,
outdir: projectRoot,
metafile: true,
plugins: [watchReporter],
});
await ctx.watch();
return ctx;
}
-266
View File
@@ -1,266 +0,0 @@
{
'plugins': [
'@babel',
'promise',
'jsdoc'
],
'extends': [
'eslint:recommended',
'plugin:promise/recommended'
],
'env': {
'browser': true,
// Enable ES6+ features by default.
// See http://eslint.org/docs/user-guide/configuring#specifying-environments
// Note: The YUI override must exactly match this when disabling the ES6+ version because those features are not supported by Shifter.
'es2020': true,
'amd': true
},
'globals': {
'M': true,
'Y': true
},
// Warn about unused eslint-disable statements.
'reportUnusedDisableDirectives': true,
'rules': {
// See http://eslint.org/docs/rules/ for all rules and explanations of all
// rules.
// === Possible Errors ===
'comma-dangle': 'off',
'no-console': 'error',
'no-empty': 'warn',
'no-extra-parens': 'off',
'no-prototype-builtins': 'off',
'no-unreachable': 'warn',
// === Best Practices ===
// (these mostly match our jshint config)
'array-callback-return': 'warn',
'block-scoped-var': 'warn',
'complexity': 'warn',
'consistent-return': 'warn',
'curly': 'error',
'dot-notation': 'warn',
'no-alert': 'warn',
'no-caller': 'error',
'no-div-regex': 'error',
'no-empty-function': 'warn',
'no-eq-null': 'error',
'no-eval': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'warn',
'no-floating-decimal': 'warn',
'no-global-assign': 'warn',
'no-implied-eval': 'error',
'no-invalid-this': 'error',
'no-iterator': 'error',
'no-labels': 'error',
'no-loop-func': 'error',
'no-multi-spaces': 'warn',
'no-multi-str': 'error',
'no-new-func': 'error',
'no-new-wrappers': 'error',
'no-octal-escape': 'error',
'no-proto': 'error',
'no-redeclare': 'warn',
'no-restricted-globals': ['error', { 'name': 'Notification' }],
'no-return-assign': 'error',
'no-script-url': 'error',
'no-self-compare': 'error',
'no-sequences': 'warn',
'no-throw-literal': 'warn',
'no-unmodified-loop-condition': 'error',
'no-unused-expressions': 'error',
'no-useless-call': 'warn',
'no-useless-escape': 'warn',
'wrap-iife': ['error', 'any'],
// === Variables ===
'no-undef-init': 'error',
'no-unused-vars': ['error', { 'caughtErrors': 'none' }],
// === Stylistic Issues ===
'array-bracket-spacing': 'warn',
'block-spacing': 'warn',
'brace-style': ['warn', '1tbs'],
'camelcase': 'warn',
'capitalized-comments': ['warn', 'always', { 'ignoreConsecutiveComments': true }],
'comma-spacing': ['warn', { 'before': false, 'after': true }],
'comma-style': ['warn', 'last'],
'computed-property-spacing': 'error',
'consistent-this': 'off',
'eol-last': 'off',
'func-call-spacing': ['warn', 'never'],
'func-names': 'off',
'func-style': 'off',
// indent currently not doing well with our wrapping style, so disabled.
'indent': ['off', 4, { 'SwitchCase': 1 }],
'key-spacing': ['warn', { 'beforeColon': false, 'afterColon': true, 'mode': minimum }],
'keyword-spacing': 'warn',
'linebreak-style': ['error', 'unix'],
'lines-around-comment': 'off',
'max-len': ['error', 132],
'max-lines': 'off',
'max-depth': 'warn',
'max-nested-callbacks': ['warn', 5],
'max-params': 'off',
'max-statements': 'off',
'max-statements-per-line': ['warn', { max: 2 }],
'new-cap': ['warn', { 'properties': false }],
'new-parens': 'warn',
'newline-per-chained-call': 'off',
'no-array-constructor': 'off',
'no-bitwise': 'error',
'no-continue': 'off',
'no-inline-comments': 'off',
'no-lonely-if': 'off',
'no-mixed-operators': 'off',
'no-multiple-empty-lines': 'warn',
'no-negated-condition': 'off',
'no-nested-ternary': 'warn',
'no-new-object': 'off',
'no-plusplus': 'off',
'no-tabs': 'error',
'no-ternary': 'off',
'no-trailing-spaces': 'error',
'no-underscore-dangle': 'off',
'no-unneeded-ternary': 'off',
'no-whitespace-before-property': 'warn',
'object-curly-newline': 'off',
'object-curly-spacing': 'warn',
'object-property-newline': 'off',
'one-var': 'off',
'one-var-declaration-per-line': ['warn', 'initializations'],
'operator-assignment': 'off',
'operator-linebreak': 'off',
'padded-blocks': 'off',
'quote-props': ['warn', 'as-needed', {'unnecessary': false, 'keywords': true, 'numbers': true}],
'quotes': 'off',
'semi': 'error',
'semi-spacing': ['warn', {'before': false, 'after': true}],
'sort-vars': 'off',
'space-before-blocks': 'warn',
'space-before-function-paren': ['warn', 'never'],
'space-in-parens': 'warn',
'space-infix-ops': 'warn',
'space-unary-ops': 'warn',
'spaced-comment': 'warn',
'unicode-bom': 'error',
'wrap-regex': 'off',
// === Promises (override plugin:promise/recommended) ===
'promise/always-return': 'warn',
'promise/no-return-wrap': 'warn',
'promise/param-names': 'warn',
'promise/catch-or-return': ['warn', {terminationMethod: ['catch', 'fail', 'always'], allowFinally: true}],
'promise/no-native': 'warn',
'promise/avoid-new': 'warn',
// === Deprecations ===
"no-restricted-properties": ['warn', {
'object': 'M',
'property': 'str',
'message': 'Use "core/str" module or M.util.get_string()'
}],
},
overrides: [
{
files: ["**/yui/src/**/*.js"],
'env': {
// Disable ES6+ for YUI files.
'es2020': false,
},
// Disable some rules which we can't safely define for YUI rollups.
rules: {
'no-undef': 'off',
'no-unused-vars': 'off',
'no-unused-expressions': 'off',
// === JSDocs ===
"jsdoc/check-access": 'off',
"jsdoc/check-alignment": 'off',
"jsdoc/check-param-names": 'off',
"jsdoc/check-property-names": 'off',
"jsdoc/empty-tags": 'off',
"jsdoc/implements-on-classes": 'off',
"jsdoc/multiline-blocks": 'off',
"jsdoc/require-jsdoc": 'off',
"jsdoc/require-param": 'off',
"jsdoc/require-param-name": 'off',
"jsdoc/require-param-type": 'off',
"jsdoc/require-property": 'off',
"jsdoc/require-property-name": 'off',
"jsdoc/require-property-type": 'off',
}
},
{
files: ["**/amd/src/*.js", "**/amd/src/**/*.js", "Gruntfile.js", ".grunt/*.js", ".grunt/tasks/*.js", "jsdoc.conf.js"],
// We're using babel transpiling so use their parser
// for linting.
parser: '@babel/eslint-parser',
// Check AMD with some slightly stricter rules.
rules: {
'no-implicit-globals': 'error',
// Disable all of the rules that have babel versions.
'new-cap': 'off',
// Not using this rule for the time being because it isn't
// compatible with jQuery and ES6.
'no-invalid-this': 'off',
'object-curly-spacing': 'off',
'quotes': 'off',
'semi': 'off',
'no-unused-expressions': 'off',
// Enable all of the babel version of these rules.
'@babel/new-cap': ['warn', { 'properties': false }],
// Not using this rule for the time being because it isn't
// compatible with jQuery and ES6.
'@babel/no-invalid-this': 'off',
'@babel/object-curly-spacing': 'warn',
'@babel/semi': 'error',
'@babel/no-unused-expressions': 'error',
// === Promises ===
// We have Promise now that we're using ES6.
'promise/no-native': 'off',
'promise/avoid-new': 'off',
// === JSDocs ===
'jsdoc/check-access': 'error',
'jsdoc/check-alignment': 1, // Recommended.
'jsdoc/check-param-names': 'error',
'jsdoc/check-property-names': 'error',
'jsdoc/empty-tags': 'error',
'jsdoc/implements-on-classes': 'error',
'jsdoc/multiline-blocks': 'error',
'jsdoc/require-jsdoc': 'error',
'jsdoc/require-param': 'error',
'jsdoc/require-param-name': 'error',
'jsdoc/require-param-type': 'error',
'jsdoc/require-property': 'error',
'jsdoc/require-property-name': 'error',
'jsdoc/require-property-type': 'error'
},
parserOptions: {
'sourceType': 'module',
'requireConfigFile': false
}
},
{
files: ["**/*.ts", "**/*.tsx"],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaFeatures: {
jsx: true
},
allowSyntheticDefaultImports: true
},
rules: {
// promise/no-native crashes on TypeScript ASTs (same reason it is
// disabled for AMD files above). Native Promises are standard in TS.
'promise/no-native': 'off',
'promise/avoid-new': 'off',
}
}
]
}
-24
View File
@@ -1,24 +0,0 @@
{
"indentation": ["on",{
"Feature": 0,
"Background": 2,
"Scenario": 2,
"Examples": 4,
"example": 6,
"Step": 4,
"given": 4,
"and": 4
}],
"no-dupe-feature-names": "on",
"no-dupe-scenario-names": "off",
"no-empty-file": "on",
"no-files-without-scenarios": "on",
"no-multiple-empty-lines": "on",
"no-partially-commented-tag-lines": "on",
"no-trailing-spaces": "on",
"no-unnamed-features": "on",
"no-unnamed-scenarios": "on",
"no-scenario-outlines-without-examples": "on",
"no-examples-in-scenarios": "on",
"new-line-at-eof": ["on", "yes"]
}
-9
View File
@@ -1,9 +0,0 @@
**/yui/build/** -diff
**/amd/build/** -diff
**.js.map -diff
**-min.js -diff
**.min.js -diff
# Remove composer lock file changes from standard diff views.
/composer.lock -diff
/lib/js/bundles/*/*.js -diff
-2
View File
@@ -1,2 +0,0 @@
# Primary donations pages.
custom: ["https://moodle.com/donations/"]
-7
View File
@@ -1,7 +0,0 @@
*** PLEASE DO NOT OPEN PULL REQUESTS VIA GITHUB ***
The moodle.git repository at Github is just a mirror of the official repository. We do not accept pull requests at Github.
See CONTRIBUTING.md guidelines for how to contribute patches for Moodle. Thank you.
--
-6
View File
@@ -1,6 +0,0 @@
> [!IMPORTANT]
> PLEASE DO NOT PUBLISH SECURITY FINDINGS PUBLICLY.
If you discover a potential security issue, please report it via our [Security Submission Form](https://moodle.org/security/report).
For more information about our security processes and responsible disclosure policy, see the [Security Procedures documentation](https://moodledev.io/general/development/process/security).
-1
View File
@@ -1 +0,0 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1231.24 314.44" preserveAspectRatio="xMinYMid meet"><defs><style>.cls-1{fill:#f48020;}.cls-2,.cls-3{fill:#383738;stroke:#4a4a4c;}.cls-2{stroke-width:2.37px;}.cls-3{stroke-width:2.38px;}.cls-4{fill:#585858;}</style></defs><title>Moodle_Logo_UseonBlack_RGB</title><path class="cls-1" d="M1086.3,235.34a53.42,53.42,0,0,0,16.71,29q13.26,12.27,29.48,12.27,11.29,0,24.56-5.89,16.23-6.88,16.22-16.22l58-.49q-12.29,29-41.76,45.2-27.52,15.23-60.43,15.24-42.25,0-70-26.29t-27.75-68.54q0-43.73,27.75-69.51t72-25.8q48.15,0,75.17,31.94,25.07,29.47,25.06,79.1Zm89.91-33.91q-3.43-17.69-14.73-29-12.8-12.28-29.49-12.29-17.21,0-28.74,11.79t-15.47,29.48Z"/><path class="cls-1" d="M965.45,308.54V0h55V308.54Z"/><path class="cls-1" d="M892.69,308.54V290.36q-7.38,9.83-25.06,15.72a92.31,92.31,0,0,1-30,5.41q-39.31,0-63.13-27T750.7,217.65q0-39.3,23.34-65.84t62.15-26.53q43.71,0,56.5,23.58V0h53.55V308.54Zm0-102.68q0-14.75-14-28.26t-28.74-13.51q-21.12,0-33.41,17.2-10.8,15.24-10.8,37.33,0,21.63,10.8,36.85,12.29,17.71,33.41,17.69,12.78,0,27.76-12t15-24.81Z"/><path class="cls-1" d="M647,313.45q-41.77,0-69-26.53t-27.27-68.3q0-41.73,27.27-68.28t69-26.53q41.75,0,69.27,26.53t27.52,68.28q0,41.79-27.52,68.3T647,313.45ZM647,168q-19.89,0-30.58,15.07t-10.68,35.79q0,20.73,9.94,35.05,11.43,16.31,31.32,16.28t31.32-16.28q10.44-14.31,10.44-35.05t-9.94-35Q667.42,168,647,168Z"/><path class="cls-1" d="M448.07,313.45q-41.76,0-69-26.53t-27.27-68.3q0-41.73,27.27-68.28t69-26.53q41.74,0,69.28,26.53t27.5,68.28q0,41.79-27.5,68.3T448.07,313.45Zm0-145.43q-19.89,0-30.59,15.07t-10.69,35.79q0,20.73,9.94,35.05,11.43,16.31,31.34,16.28t31.32-16.28q10.42-14.31,10.44-35.05t-9.94-35Q468.45,168,448.07,168Z"/><path class="cls-1" d="M288.89,309.11V201q0-33.9-28-33.9t-28,33.9V309.11h-55V201q0-33.9-27.52-33.9-28,0-28,33.9V309.11h-55V194.65q0-35.37,24.56-53.54,21.61-16.22,58.46-16.22,37.35,0,55,19.16,15.23-19.16,55.51-19.16,36.86,0,58.45,16.22,24.57,18.16,24.57,53.54V309.11Z"/><path class="cls-2" d="M.76,145.76"/><path class="cls-3" d="M1.73,145.32"/><path class="cls-4" d="M173.86,116.85l55.08-40.1-.7-2.44C135,83.92,80.42,96.44,0,144.13l.73,2.38,21-.67c15.17.52,30.85,1.26,46,1.32-1,24.09.83,32.65.83,32.65,51.92,17.58,101.22,1.53,127.14-43.9A248.72,248.72,0,0,0,173.86,116.85Z"/><path class="cls-4" d="M113.78,110c-.3-1.08-2.23-1.48-4.28-.9a4.73,4.73,0,0,0-3.14,2.19c-18.53,5-49.16,13.72-70.73,21l-1.33.45c-16.68,5.61-24.73,8.49-25.22,12.55-2.29,18.44-.87,42.18-.86,42.48l.19,6.4c-9.74,27.56.06,49.6,8.38,69.77.06-24.92,1.07-45.22-6-71-.2-3.82-1.49-30.36.61-47.34.34-2.75,11.65-6.56,23.63-10.59l1.33-.44c22-7.42,53.57-16.39,71.9-21.29a6.75,6.75,0,0,0,2.29-.25C112.64,112.43,114.08,111.09,113.78,110Z"/></svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

-31
View File
@@ -1,31 +0,0 @@
name: 'Close Pull Requests'
on:
pull_request_target:
types: opened
workflow_dispatch:
jobs:
close:
# Avoid forks to run this job
if: github.repository_owner == 'moodle'
name: Close Pull Requests
runs-on: ubuntu-latest
steps:
- uses: dessant/repo-lockdown@v4
with:
process-only: prs
close-pr: true
skip-closed-pr-comment: true
pr-comment: >
**Please, don't open pull requests via GitHub.**
This repository (moodle.git) at GitHub is just a mirror of the official Moodle repository.
For how to contribute patches for Moodle see
[CONTRIBUTING.md](https://github.com/moodle/moodle/blob/main/CONTRIBUTING.md).
Closing this pull request.
-118
View File
@@ -1,118 +0,0 @@
name: Run tests in a Composed Moodle Setup
on:
push:
branches-ignore:
- main
- MOODLE_[0-9]+_STABLE
tags-ignore:
- v[0-9]+.[0-9]+.[0-9]+*
workflow_dispatch:
inputs:
phpunit_extra_options:
description: Additional options to apply to PHPUnit
required: false
default: ''
env:
php: 8.4
jobs:
PHPUnit:
runs-on: ${{ matrix.os }}
services:
exttests:
image: moodlehq/moodle-exttests
ports:
- 8080:80
redis:
image: redis
ports:
- 6379:6379
postgres:
image: ${{ matrix.db == 'pgsql' && 'postgres:16' || '' }}
env:
POSTGRES_DB: test
POSTGRES_USER: test
POSTGRES_PASSWORD: test
ports:
- 5432:5432
strategy:
fail-fast: false
matrix:
include:
# MySQL builds always run with the lowest PHP supported version.
- os: ubuntu-24.04
php: 8.3
extensions:
db: mysqli
# PostgreSQL builds always run with the highest PHP supported version.
- os: ubuntu-24.04
php: 8.4
db: pgsql
steps:
- name: Run MySQL Server
if: ${{ matrix.db == 'mysqli' }}
run: |
docker run --rm \
-e MYSQL_DATABASE=test \
-e MYSQL_USER=test \
-e MYSQL_PASSWORD=test \
-e MYSQL_ROOT_PASSWORD=test \
-p 3306:3306 \
-d \
--tmpfs /var/lib/mysql:rw,noexec,nosuid,size=1024M \
mysql:8.4 \
--skip-log-bin \
--collation-server=utf8mb4_bin
- name: Configuring git vars
uses: rlespinasse/github-slug-action@v5
- name: Setting up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ matrix.extensions }}
ini-values: max_input_vars=5000
coverage: none
tools: composer
- name: Checking out code from ${{ env.GITHUB_REF_SLUG }}
uses: actions/checkout@v6
with:
path: 'moodle'
- name: 'Preparing the environment'
run: |
echo "pathtophp=$(which php)" >> $GITHUB_ENV # Inject installed pathtophp to env. The template config needs it.
sudo locale-gen en_AU.UTF-8
- name: Create the new Composer Project
run: |
mkdir testsite
cp moodle/.github/workflows/composed/composer.json testsite/composer.json
cp moodle/.github/workflows/composed/config.php testsite/config.php
mkdir -p testsite/data/moodledata
mkdir -p testsite/data/phpunitdata
- name: Install the Moodle test site
working-directory: testsite
run: |
composer install --no-interaction
- name: Setting up PHPUnit
working-directory: testsite
env:
dbtype: ${{ matrix.db }}
run: |
php moodle/public/admin/tool/phpunit/cli/init.php --no-composer-self-update
- name: Running PHPUnit tests
working-directory: testsite
env:
dbtype: ${{ matrix.db }}
phpunit_options: ${{ secrets.phpunit_options }}
run: |
vendor/bin/phpunit $phpunit_options ${{ inputs.phpunit_extra_options }}
-25
View File
@@ -1,25 +0,0 @@
{
"type": "project",
"require": {
"moodle/composer-installer": "^1",
"moodle/moodle-composer-scaffold": "^1",
"moodle/moodle": "@dev",
"moodle/moodle-testing": "^1.0"
},
"repositories": [
{
"name": "moodleundertest",
"type": "path",
"url": "../moodle"
}
],
"config": {
"audit": {
"block-insecure": false
},
"allow-plugins": {
"moodle/composer-installer": true,
"moodle/moodle-composer-scaffold": true
}
}
}
-67
View File
@@ -1,67 +0,0 @@
<?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/>.
/**
* Template configuraton file for GitHub Actions CI/CD using Composer.
*
* @package core
* @copyright 2020 onwards Eloy Lafuente (stronk7) {@link https://stronk7.com}
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// This cannot be used out from a GitHub Actions workflow, so just exit.
getenv('GITHUB_WORKFLOW') || die; // phpcs:ignore moodle.Files.MoodleInternal.MoodleInternalGlobalState
unset($CFG);
global $CFG;
$CFG = new stdClass();
$CFG->dbtype = getenv('dbtype');
$CFG->dblibrary = 'native';
$CFG->dbhost = '127.0.0.1';
$CFG->dbname = 'test';
$CFG->dbuser = 'test';
$CFG->dbpass = 'test';
$CFG->prefix = 'm_';
$CFG->dboptions = ['dbcollation' => 'utf8mb4_bin'];
$host = 'localhost';
$CFG->wwwroot = "http://{$host}";
$CFG->dataroot = __DIR__ . '/data/moodledata';
$CFG->admin = 'admin';
$CFG->directorypermissions = 0777;
// Debug options - possible to be controlled by flag in future.
$CFG->debug = (E_ALL); // DEBUG_DEVELOPER.
$CFG->debugdisplay = 1;
$CFG->debugstringids = 1; // Add strings=1 to url to get string ids.
$CFG->perfdebug = 15;
$CFG->debugpageinfo = 1;
$CFG->allowthemechangeonurl = 1;
$CFG->passwordpolicy = 0;
$CFG->cronclionly = 0;
$CFG->pathtophp = getenv('pathtophp');
$CFG->phpunit_dataroot = __DIR__ . '/data/phpunitdata';
$CFG->phpunit_prefix = 't_';
$CFG->routerconfigured = true;
define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://localhost:8080');
define('TEST_EXTERNAL_FILES_HTTPS_URL', 'http://localhost:8080');
define('TEST_SESSION_REDIS_HOST', 'localhost');
define('TEST_CACHESTORE_REDIS_TESTSERVERS', 'localhost');
-73
View File
@@ -1,73 +0,0 @@
<?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/>.
/**
* Template configuraton file for github actions CI/CD.
*
* @package core
* @copyright 2020 onwards Eloy Lafuente (stronk7) {@link https://stronk7.com}
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// This cannot be used out from a github actions workflow, so just exit.
getenv('GITHUB_WORKFLOW') || die; // phpcs:ignore moodle.Files.MoodleInternal.MoodleInternalGlobalState
unset($CFG);
global $CFG;
$CFG = new stdClass();
$CFG->dbtype = getenv('dbtype');
$CFG->dblibrary = 'native';
$CFG->dbhost = '127.0.0.1';
$CFG->dbname = 'test';
$CFG->dbuser = 'test';
$CFG->dbpass = 'test';
$CFG->prefix = 'm_';
$CFG->dboptions = ['dbcollation' => 'utf8mb4_bin'];
$host = 'localhost';
$CFG->wwwroot = "http://{$host}";
$CFG->dataroot = realpath(dirname(__DIR__)) . '/moodledata';
$CFG->admin = 'admin';
$CFG->directorypermissions = 0777;
// Debug options - possible to be controlled by flag in future.
$CFG->debug = (E_ALL); // DEBUG_DEVELOPER.
$CFG->debugdisplay = 1;
$CFG->debugstringids = 1; // Add strings=1 to url to get string ids.
$CFG->perfdebug = 15;
$CFG->debugpageinfo = 1;
$CFG->allowthemechangeonurl = 1;
$CFG->passwordpolicy = 0;
$CFG->cronclionly = 0;
$CFG->pathtophp = getenv('pathtophp');
$CFG->phpunit_dataroot = realpath(dirname(__DIR__)) . '/phpunitdata';
$CFG->phpunit_prefix = 't_';
$CFG->routerconfigured = true;
define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://localhost:8080');
define('TEST_EXTERNAL_FILES_HTTPS_URL', 'http://localhost:8080');
define('TEST_SESSION_REDIS_HOST', 'localhost');
define('TEST_CACHESTORE_REDIS_TESTSERVERS', 'localhost');
// TODO: add others (solr, mongodb, memcached, ldap...).
// Too much for now: define('PHPUNIT_LONGTEST', true); // Only leaves a few tests out and they are run later by CI.
require_once(__DIR__ . '/lib/setup.php');
-143
View File
@@ -1,143 +0,0 @@
name: One by One Testing
# Run all the individual unit tests one by one, with
# fully independent PHPUnit executions. Useful to
# detect issues with some tests that are using stuff
# that has been made available by others, but is not
# available when running individually.
#
# Note that we aren't using PHPUnit's own isolation
# here but completely separated runs, one for each
# test.
#
# The workflow will fail reporting all the tests
# that have failed (and will pass if no failure is
# detected, of course).
#
# It's only executed via workflow dispatch (automated
# or manual), not by push/tag. And acceptd configuration
# of phpunit, specially useful to run it with PHPUnit's
# own isolation or any other option.
on:
workflow_dispatch:
inputs:
phpunit_extra_options:
description: Additional options to apply to PHPUnit
required: false
default: ''
env:
chunks: 7
jobs:
collect:
name: Collect individual unit tests
runs-on: ubuntu-latest
outputs:
matrix: ${{steps.individual-tests.outputs.matrix }}
steps:
- name: Checking out code
uses: actions/checkout@v4
- name: Looking for all individual tests
id: individual-tests
run: |
count=0 # Number of individual tests found.
while read -r testfile; do # For each test file.
while read -r testname; do # For each unit test in a file.
count=$((count + 1))
# Sent it to the correct chunk file.
chunk=$(((($count % $chunks)) + 1))
echo "$testname $testfile" >> ./chunk_$chunk.txt
done < <(grep "function test_" "${testfile}" | sed -r "s/^.*function (test_[a-zA-Z0-9_]+).*/\1/")
done < <(find . -name "*_test.php" -not -path "*/fixtures/*")
# Generate the matrix to run tests.
echo "matrix=$(ls -1 chunk_*.txt | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
echo "$count individual tests collected in $chunks files"
- name: Upload individual tests files
uses: actions/upload-artifact@v4
with:
name: individual_tests
path: chunk_*.txt
retention-days: 1
test:
name: Run tests
needs: collect
runs-on: ubuntu-latest
services:
exttests:
image: moodlehq/moodle-exttests
ports:
- 8080:80
redis:
image: redis
ports:
- 6379:6379
strategy:
fail-fast: false
matrix:
file: ${{ fromJson(needs.collect.outputs.matrix) }}
steps:
- name: Setting up DB pgsql
uses: m4nu56/postgresql-action@v1
with:
postgresql version: 16
postgresql db: test
postgresql user: test
postgresql password: test
- name: Setting up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
ini-values: max_input_vars=5000
coverage: none
- name: Checking out code
uses: actions/checkout@v4
- name: Download individual test files
uses: actions/download-artifact@v4
with:
name: individual_tests # Make all the chunk files available for the next steps.
- name: Setting up PHPUnit
env:
dbtype: pgsql
run: |
echo "pathtophp=$(which php)" >> $GITHUB_ENV
cp .github/workflows/config-template.php config.php
mkdir ../moodledata
sudo locale-gen en_AU.UTF-8
php public/admin/tool/phpunit/cli/init.php --no-composer-self-update
- name: Run PHPUnit test (one by one)
env:
dbtype: pgsql
run: |
status=0
count=0
while read -r line; do # For each line in the chunk file
count=$((count + 1))
filter="${line% *}"
file="${line#* }"
# Run the individual unit test and report problems if needed to.
if ! php vendor/bin/phpunit \
--fail-on-empty-test-suite \
--fail-on-warning \
--fail-on-risky \
--filter "$filter" ${{ inputs.phpunit_extra_options }} \
"$file" >/dev/null 2>&1; then
if [ $status -eq 0 ]; then
echo "Problems found, list of PHPUnit commands failing:"
fi
echo "vendor/bin/phpunit --filter '${filter}' ${{ inputs.phpunit_extra_options }} $file"
status=$((status + 1))
fi
done < ${{ matrix.file }}
echo "Finished: $count individual tests executed, $status tests failed"
exit $status
-128
View File
@@ -1,128 +0,0 @@
name: Core
on:
push:
branches-ignore:
- main
- MOODLE_[0-9]+_STABLE
tags-ignore:
- v[0-9]+.[0-9]+.[0-9]+*
workflow_dispatch:
inputs:
phpunit_extra_options:
description: Additional options to apply to PHPUnit
required: false
default: ''
env:
php: 8.4
jobs:
Grunt:
runs-on: ubuntu-24.04
steps:
- name: Checking out code
uses: actions/checkout@v4
- name: Configuring node & npm
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Installing node stuff
run: npm install
- name: Running grunt
run: npx grunt
- name: Looking for uncommitted changes
# Add all files to the git index and then run diff --cached to see all changes.
# This ensures that we get the status of all files, including new files.
# We ignore npm-shrinkwrap.json to make the tasks immune to npm changes.
run: |
git add .
git reset -- npm-shrinkwrap.json
git diff --cached --exit-code
PHPUnit:
runs-on: ${{ matrix.os }}
services:
exttests:
image: moodlehq/moodle-exttests
ports:
- 8080:80
redis:
image: redis
ports:
- 6379:6379
postgres:
image: ${{ matrix.db == 'pgsql' && 'postgres:16' || '' }}
env:
POSTGRES_DB: test
POSTGRES_USER: test
POSTGRES_PASSWORD: test
ports:
- 5432:5432
strategy:
fail-fast: false
matrix:
include:
# MySQL builds always run with the lowest PHP supported version.
- os: ubuntu-24.04
php: 8.3
extensions:
db: mysqli
# PostgreSQL builds always run with the highest PHP supported version.
- os: ubuntu-24.04
php: 8.4
db: pgsql
steps:
- name: Run MySQL Server
if: ${{ matrix.db == 'mysqli' }}
run: |
docker run --rm \
-e MYSQL_DATABASE=test \
-e MYSQL_USER=test \
-e MYSQL_PASSWORD=test \
-e MYSQL_ROOT_PASSWORD=test \
-p 3306:3306 \
-d \
--tmpfs /var/lib/mysql:rw,noexec,nosuid,size=1024M \
mysql:8.4 \
--skip-log-bin \
--collation-server=utf8mb4_bin
- name: Configuring git vars
uses: rlespinasse/github-slug-action@v4
- name: Setting up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ matrix.extensions }}
ini-values: max_input_vars=5000
coverage: none
- name: Checking out code from ${{ env.GITHUB_REF_SLUG }}
uses: actions/checkout@v4
- name: Setting up PHPUnit
env:
dbtype: ${{ matrix.db }}
run: |
echo "pathtophp=$(which php)" >> $GITHUB_ENV # Inject installed pathtophp to env. The template config needs it.
cp .github/workflows/config-template.php config.php
mkdir ../moodledata
sudo locale-gen en_AU.UTF-8
php public/admin/tool/phpunit/cli/init.php --no-composer-self-update
- name: Running PHPUnit tests
env:
dbtype: ${{ matrix.db }}
phpunit_options: ${{ secrets.phpunit_options }}
run: vendor/bin/phpunit $phpunit_options ${{ inputs.phpunit_extra_options }}
- name: Git status
run: git status
-23
View File
@@ -1,23 +0,0 @@
name: Web Installer Testing
on:
workflow_dispatch:
jobs:
InstallationTest:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.3, 8.4]
steps:
- name: Construct repository URL
run: echo "REPOSITORY_URL=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" >> $GITHUB_ENV
shell: bash
- uses: moodlehq/moodle-webinstaller-test@main
with:
repository: ${{ env.REPOSITORY_URL }}
branch: ${{ github.ref_name }}
php: ${{ matrix.php }}
-149
View File
@@ -1,149 +0,0 @@
name: Windows Testing
on:
workflow_dispatch:
inputs:
phpunit_extra_options:
description: Additional options to apply to PHPUnit
required: false
default: ''
env:
php: 8.4
jobs:
Grunt:
runs-on: windows-latest
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checking out code
uses: actions/checkout@v4
- name: Configuring node & npm
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Installing node stuff
run: npm ci
- name: Running grunt
run: npx grunt
- name: Looking for uncommitted changes
# Add all files to the git index and then run diff --cached to see all changes.
# This ensures that we get the status of all files, including new files.
# We ignore npm-shrinkwrap.json to make the tasks immune to npm changes.
run: |
git add .
git reset -- npm-shrinkwrap.json
git diff --cached --exit-code
PHPUnit:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
php: 8.4
# Ideally we should use mysql/mariadb, but they are 4x slower without tweaks and configuration
# so let's run only postgres (1.5h vs 6h) only, If some day we want to improve the mysql runs,
# this is the place to enable them.
# db: mysqli
db: pgsql
extensions: exif, fileinfo, gd, intl, pgsql, mysql, redis, soap, sodium, zip
- os: windows-latest
php: 8.3
db: pgsql
extensions: exif, fileinfo, gd, intl, pgsql, mysql, redis, soap, sodium, zip
steps:
- name: Setting up DB mysql
if: ${{ matrix.db == 'mysqli' }}
uses: shogo82148/actions-setup-mysql@v1
with:
mysql-version: 8.4
user: test
password: test
- name: Creating DB mysql
if: ${{ matrix.db == 'mysqli' }}
run: mysql --host 127.0.0.1 -utest -ptest -e 'CREATE DATABASE IF NOT EXISTS test COLLATE = utf8mb4_bin;';
- name: Setting up DB pgsql
if: ${{ matrix.db == 'pgsql' }}
run: |
# TODO: Remove these conf. modifications when php74 or php80 are lowest.
# Change to old md5 auth, because php73 does not support it.
# #password_encryption = scram-sha-256
(Get-Content "$env:PGDATA\postgresql.conf"). `
replace('#password_encryption = scram-sha-256', 'password_encryption = md5') | `
Set-Content "$env:PGDATA\postgresql.conf"
(Get-Content "$env:PGDATA\pg_hba.conf"). `
replace('scram-sha-256', 'md5') | `
Set-Content "$env:PGDATA\pg_hba.conf"
$pgService = Get-Service -Name postgresql*
Set-Service -InputObject $pgService -Status running -StartupType automatic
Start-Process -FilePath "$env:PGBIN\pg_isready" -Wait -PassThru
& $env:PGBIN\psql --command="CREATE USER test PASSWORD 'test'" --command="\du"
- name: Creating DB pgsql
if: ${{ matrix.db == 'pgsql' }}
run: |
& $env:PGBIN\createdb --owner=test test
$env:PGPASSWORD = 'test'
& $env:PGBIN\psql --username=test --host=localhost --list test
- name: Configuring git vars
uses: rlespinasse/github-slug-action@v4
- name: Setting up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ matrix.extensions }}
ini-values: max_input_vars=5000
coverage: none
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checking out code from ${{ env.GITHUB_REF_SLUG }}
uses: actions/checkout@v4
# Needs to be done after php is available, git configured and Moodle checkout has happened.
- name: Setting up moodle-exttests service
run: |
git clone https://github.com/moodlehq/moodle-exttests.git
nssm install php-built-in C:\tools\php\php.exe -S localhost:8080 -t D:\a\moodle\moodle\moodle-exttests
nssm start php-built-in
- name: Setting up redis service
run: |
choco install redis --version 5.0.7 --no-progress
nssm install redis redis-server
nssm start redis
- name: Setting up PHPUnit
env:
dbtype: ${{ matrix.db }}
shell: bash
run: |
echo "pathtophp=$(which php)" >> $GITHUB_ENV # Inject installed pathtophp to env. The template config needs it.
cp .github/workflows/config-template.php config.php
mkdir ../moodledata
php public/admin/tool/phpunit/cli/init.php --no-composer-self-update
- name: Running PHPUnit tests
env:
dbtype: ${{ matrix.db }}
phpunit_options: ${{ secrets.phpunit_options }}
run: vendor/bin/phpunit $phpunit_options ${{ inputs.phpunit_extra_options }}
-63
View File
@@ -1,63 +0,0 @@
# This file specifies intentionally untracked files that all Moodle git
# repositories should ignore. It is recommended not to modify this file in your
# local clone. Instead, use .git/info/exclude and add new records there as
# needed.
#
# Example: if you deploy a contributed plugin mod/foobar into your site, put
# the following line into .git/info/exclude file in your Moodle clone:
# /mod/foobar/
#
# See gitignore(5) man page for more details
#
# Swap files (vim)
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Temporary files including undo
*~
#
/config.php
/tags
/TAGS
/cscope.*
/.patches/
/.idea/
.phpstorm.*
!/.phpstorm.meta.php/
/.phpstorm.meta.php/*
!/.phpstorm.meta.php/di.php
/nbproject/
CVS
.DS_Store
/.settings/
/.project
/.buildpath
/.cache
.phpunit.result.cache
phpunit.xml
# Composer support. Do not ignore composer.json, or composer.lock. These should be shipped by us.
composer.phar
/vendor/
/behat.yml
*/yui/build/*/*-coverage.js
/public/lib/yuilib/*/build/*/*-coverage.js
# lib/yuilib/version/module/module-coverage.js
/public/lib/yuilib/*/*/*-coverage.js
atlassian-ide-plugin.xml
/node_modules/
/.vscode/
moodle-plugin-ci.phar
.eslintignore
.stylelintignore
/jsdoc
/public/admin/tool/componentlibrary/docs
/public/admin/tool/componentlibrary/hugo/site/data/my-index.json
.hugo_build.lock
phpcs.xml
jsconfig.json
UPGRADING-CURRENT.md
.phpunit.cache
tsconfig.aliases.json
-169
View File
@@ -1,169 +0,0 @@
// 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 is a babel plugin to add the Moodle module names to the AMD modules
* as part of the transpiling process.
*
* In addition it will also add a return statement for the default export if the
* module is using default exports. This is a highly specific Moodle thing because
* we're transpiling to AMD and none of the existing Babel 7 plugins work correctly.
*
* This will fix the issue where an ES6 module using "export default Foo" will be
* transpiled into an AMD module that returns {default: Foo}; Instead it will now
* just simply return Foo.
*
* Note: This means all other named exports in that module are ignored and won't be
* exported.
*
* @copyright 2018 Ryan Wyllie <ryan@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
"use strict";
/* eslint-env node */
module.exports = ({template, types}) => {
const fs = require('fs');
const path = require('path');
const cwd = process.cwd();
const ComponentList = require(path.join(process.cwd(), '.grunt', 'components.js'));
/**
* Search the list of components that match the given file name
* and return the Moodle component for that file, if found.
*
* Throw an exception if no matching component is found.
*
* @throws {Error}
* @param {string} searchFileName The file name to look for.
* @return {string} Moodle component
*/
function getModuleNameFromFileName(searchFileName) {
searchFileName = fs.realpathSync(searchFileName);
const relativeFileName = searchFileName.replace(`${cwd}${path.sep}`, '').replace(/\\/g, '/');
const [componentPath, file] = relativeFileName.split('/amd/src/');
const fileName = file.replace('.js', '');
// Check subsystems first which require an exact match.
const componentName = ComponentList.getComponentFromPath(componentPath);
if (componentName) {
return `${componentName}/${fileName}`;
}
// This matches the previous PHP behaviour that would throw an exception
// if it couldn't parse an AMD file.
throw new Error(`Unable to find module name for ${searchFileName} (${componentPath}::${file}}`);
}
/**
* This is heavily inspired by the babel-plugin-add-module-exports plugin.
* See: https://github.com/59naga/babel-plugin-add-module-exports
*
* This is used when we detect a module using "export default Foo;" to make
* sure the transpiled code just returns Foo directly rather than an object
* with the default property (i.e. {default: Foo}).
*
* Note: This means that we can't support modules that combine named exports
* with a default export.
*
* @param {String} path
* @param {String} exportObjectName
*/
function addModuleExportsDefaults(path, exportObjectName) {
const rootPath = path.findParent(path => {
return path.key === 'body' || !path.parentPath;
});
// HACK: `path.node.body.push` instead of path.pushContainer(due doesn't work in Plugin.post).
// This is hardcoded to work specifically with AMD.
rootPath.node.body.push(template(`return ${exportObjectName}.default`)());
}
return {
pre() {
this.seenDefine = false;
this.addedReturnForDefaultExport = false;
},
visitor: {
// Plugin ordering is only respected if we visit the "Program" node.
// See: https://babeljs.io/docs/en/plugins.html#plugin-preset-ordering
//
// We require this to run after the other AMD module transformation so
// let's visit the "Program" node.
Program: {
exit(path) {
path.traverse({
CallExpression(path) {
// If we find a "define" function call.
if (!this.seenDefine && path.get('callee').isIdentifier({name: 'define'})) {
// We only want to modify the first instance of define that we find.
this.seenDefine = true;
// Get the Moodle component for the file being processed.
var moduleName = getModuleNameFromFileName(this.file.opts.filename);
// The function signature of `define()` is:
// define = function (name, deps, callback) {...}
// Ensure that if the moduel supplied its own name that it is replaced.
if (path.node.arguments.length > 0) {
// Ensure that there is only one name.
if (path.node.arguments[0].type === 'StringLiteral') {
// eslint-disable-next-line
console.log(`Replacing module name '${path.node.arguments[0].extra.rawValue}' with ${moduleName}`);
path.node.arguments.shift();
}
}
// Add the module name as the first argument to the define function.
path.node.arguments.unshift(types.stringLiteral(moduleName));
// Add a space after the define function in the built file so that previous versions
// of Moodle will not try to add the module name to the file when it's being served
// by PHP. This forces the regex in PHP to not match for this file.
path.node.callee.name = 'define ';
}
// Check for any Object.defineProperty('exports', 'default') calls.
if (!this.addedReturnForDefaultExport && path.get('callee').matchesPattern('Object.defineProperty')) {
const [identifier, prop] = path.get('arguments');
const objectName = identifier.get('name').node;
const propertyName = prop.get('value').node;
if ((objectName === 'exports' || objectName === '_exports') && propertyName === 'default') {
addModuleExportsDefaults(path, objectName);
this.addedReturnForDefaultExport = true;
}
}
},
AssignmentExpression(path) {
// Check for an exports.default assignments.
if (
!this.addedReturnForDefaultExport &&
(
path.get('left').matchesPattern('exports.default') ||
path.get('left').matchesPattern('_exports.default')
)
) {
const objectName = path.get('left.object.name').node;
addModuleExportsDefaults(path, objectName);
this.addedReturnForDefaultExport = true;
}
}
}, this);
}
}
}
};
};
-455
View File
@@ -1,455 +0,0 @@
// 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/>.
/**
* Helper functions for working with Moodle component names, directories, and sources.
*
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
"use strict";
/* eslint-env node */
/** @var {Object} A list of subsystems in Moodle */
const componentData = {};
/**
* Load details of all moodle modules.
*
* @returns {object}
*/
const fetchComponentData = () => {
const fs = require('fs');
const path = require('path');
const glob = require('glob');
const gruntFilePath = process.cwd();
if (!Object.entries(componentData).length) {
componentData.subsystems = {};
componentData.pathList = [];
componentData.components = {};
componentData.standardComponents = {};
// Fetch the component definiitions from the distributed JSON file.
const components = JSON.parse(fs.readFileSync(`${gruntFilePath}/lib/components.json`));
const pluginData = JSON.parse(fs.readFileSync(`${gruntFilePath}/lib/plugins.json`));
componentData.pluginTypes = components.plugintypes
const standardPlugins = Object.entries(pluginData.standard).map(
([pluginType, pluginNames]) => {
return pluginNames.map(pluginName => `${pluginType}_${pluginName}`);
}
).reduce((acc, val) => acc.concat(val), []);
// Build the list of moodle subsystems.
componentData.subsystems['public/lib'] = 'core';
componentData.pathList.push(`${process.cwd()}/public/lib`);
for (const [component, thisPath] of Object.entries(components.subsystems)) {
if (thisPath) {
// Prefix "core_" to the front of the subsystems.
componentData.subsystems[thisPath] = `core_${component}`;
componentData.pathList.push(`${process.cwd()}/${thisPath}`);
}
}
// The list of components includes the list of subsystems.
componentData.components = Object.fromEntries(
Object.entries(componentData.subsystems)
.map(([path, name]) => ([path, name]))
);
const subpluginAdder = (subpluginType, subpluginTypePath) => {
glob.sync(`${subpluginTypePath}/*/version.php`).forEach(versionPath => {
const componentPath = fs.realpathSync(path.dirname(versionPath));
const componentName = path.basename(componentPath);
const frankenstyleName = `${subpluginType}_${componentName}`;
componentData.components[`${subpluginTypePath}/${componentName}`] = frankenstyleName;
componentData.pathList.push(componentPath);
});
};
// Go through each of the plugintypes.
Object.entries(components.plugintypes).forEach(([pluginType, pluginTypePath]) => {
// We don't allow any code in this place..?
glob.sync(`${pluginTypePath}/*/version.php`).forEach(versionPath => {
const componentPath = fs.realpathSync(path.dirname(versionPath));
const componentName = path.basename(componentPath);
const frankenstyleName = `${pluginType}_${componentName}`;
componentData.components[`${pluginTypePath}/${componentName}`] = frankenstyleName;
componentData.pathList.push(componentPath);
// Look for any subplugins.
const subPluginConfigurationFile = `${componentPath}/db/subplugins.json`;
if (fs.existsSync(subPluginConfigurationFile)) {
const subpluginList = JSON.parse(fs.readFileSync(fs.realpathSync(subPluginConfigurationFile)));
if (subpluginList.subplugintypes) {
Object.entries(subpluginList.subplugintypes).forEach(([subpluginType, subpluginTypePath]) => {
subpluginAdder(
subpluginType,
`${pluginTypePath}/${componentName}/${subpluginTypePath}`
);
});
} else if (subpluginList.plugintypes) {
Object.entries(subpluginList.plugintypes).forEach(([subpluginType, subpluginTypePath]) => {
subpluginAdder(subpluginType, `public/${subpluginTypePath}`);
});
}
}
});
});
// Create a list of the standard subsystem and plugins.
componentData.standardComponents = Object.fromEntries(
Object.entries(componentData.components).filter(([, name]) => {
if (name === 'core' || name.startsWith('core_')) {
return true;
}
return standardPlugins.indexOf(name) !== -1;
})
);
componentData.componentMapping = Object.fromEntries(
Object.entries(componentData.components).map(([path, name]) => [name, path])
);
}
return componentData;
};
/**
* Get the list of component paths.
*
* @param {string} relativeTo
* @returns {array}
*/
const getComponentPaths = (relativeTo = '') => fetchComponentData().pathList.map(componentPath => {
return componentPath.replace(relativeTo, '');
});
/**
* Get the list of paths to build AMD sources.
*
* @returns {Array}
*/
const getAmdSrcGlobList = () => {
const globList = [];
fetchComponentData().pathList.forEach(componentPath => {
globList.push(`${componentPath}/amd/src/*.js`);
globList.push(`${componentPath}/amd/src/**/*.js`);
});
return globList;
};
/**
* Get the list of paths to build YUI sources.
*
* @param {String} relativeTo
* @returns {Array}
*/
const getYuiSrcGlobList = relativeTo => {
const globList = [];
fetchComponentData().pathList.forEach(componentPath => {
const relativeComponentPath = componentPath.replace(relativeTo, '');
globList.push(`${relativeComponentPath}/yui/src/**/*.js`);
});
return globList;
};
/**
* Get the list of paths to thirdpartylibs.xml.
*
* @param {String} relativeTo
* @returns {Array}
*/
const getThirdPartyLibsList = relativeTo => {
const fs = require('fs');
const path = require('path');
const pathList = fetchComponentData().pathList
.map(componentPath => path.relative(relativeTo, componentPath) + '/thirdpartylibs.xml')
.map(componentPath => componentPath.replace(/\\/g, '/'))
.filter(path => fs.existsSync(path));
pathList.push('lib/thirdpartylibs.xml');
return pathList.sort();
};
/**
* Get the list of thirdparty library paths.
*
* @returns {array}
*/
const getThirdPartyPaths = () => {
const DOMParser = require('@xmldom/xmldom').DOMParser;
const fs = require('fs');
const path = require('path');
const xpath = require('xpath');
const thirdpartyfiles = getThirdPartyLibsList(fs.realpathSync('./'));
const libs = ['node_modules/', 'vendor/'];
const addLibToList = lib => {
if (!lib.match('\\*') && fs.statSync(lib).isDirectory()) {
// Ensure trailing slash on dirs.
lib = lib.replace(/\/?$/, '/');
}
// Look for duplicate paths before adding to array.
if (libs.indexOf(lib) === -1) {
libs.push(lib);
}
};
thirdpartyfiles.forEach(function(file) {
const dirname = path.dirname(file);
const xmlContent = fs.readFileSync(file, 'utf8');
const doc = new DOMParser().parseFromString(xmlContent);
const nodes = xpath.select("/libraries/library/location/text()", doc);
nodes.forEach(function(node) {
let lib = path.posix.join(dirname, node.toString());
addLibToList(lib);
});
});
return libs;
};
/**
* Find the name of the component matching the specified path.
*
* @param {String} path
* @returns {String|null} Name of matching component.
*/
const getComponentFromPath = path => {
const componentList = fetchComponentData().components;
if (componentList.hasOwnProperty(path)) {
return componentList[path];
}
return null;
};
/**
* Check whether the supplied path, relative to the Gruntfile.js, is in a known component.
*
* @param {String} checkPath The path to check. This can be with either Windows, or Linux directory separators.
* @returns {String|null}
*/
const getOwningComponentDirectory = checkPath => {
const path = require('path');
// Fetch all components into a reverse sorted array.
// This ensures that components which are within the directory of another component match first.
const pathList = Object.keys(fetchComponentData().components).sort().reverse();
for (const componentPath of pathList) {
// If the componentPath is the directory being checked, it will be empty.
// If the componentPath is a parent of the directory being checked, the relative directory will not start with ..
if (!path.relative(componentPath, checkPath).startsWith('..')) {
return componentPath;
}
}
return null;
};
/**
* Get the latest tag in a remote GitHub repository.
*
* @param {string} url The remote repository.
* @returns {Array}
*/
const getRepositoryTags = async(url) => {
const gtr = require('git-tags-remote');
try {
const tags = await gtr.get(url);
if (tags !== undefined) {
return tags;
}
} catch (error) {
return [];
}
return [];
};
/**
* Get the list of thirdparty libraries that could be upgraded.
*
* @returns {Array}
*/
const getThirdPartyLibsUpgradable = async() => {
const libraries = getThirdPartyLibsData().filter((library) => !!library.repository);
const upgradableLibraries = [];
const versionCompare = (a, b) => {
if (a === b) {
return 0;
}
const aParts = a.split('.');
const bParts = b.split('.');
for (let i = 0; i < Math.min(aParts.length, bParts.length); i++) {
const aPart = parseInt(aParts[i], 10);
const bPart = parseInt(bParts[i], 10);
if (aPart > bPart) {
// 1.1.0 > 1.0.9
return 1;
} else if (aPart < bPart) {
// 1.0.9 < 1.1.0
return -1;
} else {
// Same version.
continue;
}
}
if (aParts.length > bParts.length) {
// 1.0.1 > 1.0
return 1;
}
// 1.0 < 1.0.1
return -1;
};
for (let library of libraries) {
upgradableLibraries.push(
getRepositoryTags(library.repository).then((tagMap) => {
library.version = library.version.replace(/^v/, '');
const currentVersion = library.version.replace(/moodle-/, '');
const currentMajorVersion = library.version.split('.')[0];
const tags = [...tagMap]
.map((tagData) => tagData[0])
.filter((tag) => !tag.match(/(alpha|beta|rc)/))
.map((tag) => tag.replace(/^v/, ''))
.sort((a, b) => versionCompare(b, a));
if (!tags.length) {
library.warning = "Unable to find any comparable tags.";
return library;
}
library.latestVersion = tags[0];
tags.some((tag) => {
if (!tag) {
return false;
}
// See if the version part matches.
const majorVersion = tag.split('.')[0];
if (majorVersion === currentMajorVersion) {
library.latestSameMajorVersion = tag;
return true;
}
return false;
});
if (versionCompare(currentVersion, library.latestVersion) > 0) {
// Moodle somehow has a newer version than the latest version.
library.warning = `Newer version found: ${currentVersion} > ${library.latestVersion} for ${library.name}`;
return library;
}
if (library.version !== library.latestVersion) {
// Delete version and add it again at the end of the array. That way, current and new will stay closer.
delete library.version;
library.version = currentVersion;
return library;
}
return null;
})
);
}
return (await Promise.all(upgradableLibraries)).filter((library) => !!library);
};
/**
* Get the list of paths to build react sources.
*
* @param {string} relativeTo
* @returns {string[]}
*/
const getReactTsSrcGlobList = (relativeTo = '') => {
const globList = [];
fetchComponentData().pathList.forEach(componentPath => {
const relativeComponentPath = componentPath.replace(relativeTo, '');
globList.push(`${relativeComponentPath}/js/esm/src/**/*.ts`);
globList.push(`${relativeComponentPath}/js/esm/src/**/*.tsx`);
});
return globList.map(componentPath => componentPath.replace(/\\/g, '/'));
};
/**
* Get the list of thirdparty libraries.
*
* @returns {Array}
*/
const getThirdPartyLibsData = () => {
const DOMParser = require('@xmldom/xmldom').DOMParser;
const fs = require('fs');
const xpath = require('xpath');
const path = require('path');
const libraryList = [];
const libraryFields = [
'location',
'name',
'version',
'repository',
];
const thirdpartyfiles = getThirdPartyLibsList(fs.realpathSync('./'));
thirdpartyfiles.forEach(function(libraryPath) {
const xmlContent = fs.readFileSync(libraryPath, 'utf8');
const doc = new DOMParser().parseFromString(xmlContent);
const libraries = xpath.select("/libraries/library", doc);
for (const library of libraries) {
const libraryData = [];
for (const field of libraryFields) {
libraryData[field] = xpath.select(`${field}/text()`, library)?.toString();
}
libraryData.location = path.join(path.dirname(libraryPath), libraryData.location);
libraryList.push(libraryData);
}
});
return libraryList.sort((a, b) => a.location.localeCompare(b.location));
};
module.exports = {
fetchComponentData,
getAmdSrcGlobList,
getComponentFromPath,
getComponentPaths,
getOwningComponentDirectory,
getYuiSrcGlobList,
getThirdPartyLibsList,
getThirdPartyPaths,
getThirdPartyLibsUpgradable,
getReactTsSrcGlobList,
};
-19
View File
@@ -1,19 +0,0 @@
# Moodle JavaScript Documentation
```
.-..-.
_____ | || |
/____/-.---_ .---. .---. .-.| || | .---.
| | _ _ |/ _ \/ _ \/ _ || |/ __ \
* | | | | | || |_| || |_| || |_| || || |___/
|_| |_| |_|\_____/\_____/\_____||_|\_____)
Moodle - the world's open source learning platform
```
## About
This generated documentation includes API documentation for JavaScript written in the AMD and ES2015 module formats within Moodle.
## Related information
See [https://moodledev.io](https://moodledev.io) for other related Developer Documentation.
-131
View File
@@ -1,131 +0,0 @@
// 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/>.
/**
* Helper functions for working with Moodle component names, directories, and sources.
*
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
"use strict";
/* eslint-env node */
// Do not include any plugins as stanard.
const plugins = [];
plugins.push('plugins/markdown');
/**
* Get the source configuration.
*
* @return {Object}
*/
const getSource = () => {
const glob = require('glob');
const path = require('path');
const ComponentList = require(path.resolve('.grunt/components.js'));
const thirdPartyPaths = ComponentList.getThirdPartyPaths();
const source = {
include: [],
includePattern: ".+\\.js$",
};
let includeList = [];
ComponentList.getAmdSrcGlobList().forEach(async pattern => {
includeList.push(...glob.sync(pattern));
});
const cwdLength = process.cwd().length + 1;
includeList.forEach(path => {
if (source.include.indexOf(path) !== -1) {
// Ensure no duplicates.
return;
}
const relPath = path.substring(cwdLength);
if (thirdPartyPaths.indexOf(relPath) !== -1) {
return;
}
source.include.push(path);
});
source.include.push('.grunt/jsdoc/README.md');
return source;
};
const tags = {
// Allow the use of unknown tags.
// We have a lot of legacy uses of these.
allowUnknownTags: true,
// We make use of jsdoc and closure dictionaries as standard.
dictionaries: [
'jsdoc',
'closure',
],
};
// Template configuraiton.
const templates = {
cleverLinks: false,
monospaceLinks: false,
};
module.exports = {
opts: {
destination: "./public/jsdoc/",
template: "node_modules/docdash",
},
plugins,
recurseDepth: 10,
source: getSource(),
sourceType: 'module',
tags,
templates,
docdash: {
collapse: true,
search: true,
sort: true,
sectionOrder: [
"Namespaces",
"Modules",
"Events",
"Classes",
"Externals",
"Mixins",
"Tutorials",
"Interfaces"
],
"menu": {
"Developer Docs": {
href: "https://moodledev.io",
target: "_blank",
"class": "menu-item",
id: "devdocs"
},
"MDN Docs": {
href: "https://developer.mozilla.org/en-US/docs/Web/JavaScript",
target: "_blank",
"class": "menu-item",
id: "mdndocs",
},
},
typedefs: true,
},
};
-138
View File
@@ -1,138 +0,0 @@
// 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/>.
import * as Components from '../../components.js';
const componentData = Components.fetchComponentData();
/**
* The standard components shipped with core Moodle.
*
* @type {Object}
*/
export const standardComponents = componentData.standardComponents;
/**
* All components of the current Moodle instance.
*
* @type {Object}
*/
export const allComponents = componentData.components;
/**
* Get all components of the current Moodle instance.
*
* @returns {Array}
*/
export const getAllComponents = () => {
let components = new Map(Object.entries(componentData.pluginTypes).map(([value, path]) => ([path,{
path,
value,
name: `${value} (plugin type)`,
}])));
Object
.entries(componentData.components)
.filter(([path, value]) => Object.values(componentData.standardComponents).includes(value))
.forEach(([path, value]) => {
const entry = {
path,
value,
name: value,
};
if (Object.values(componentData.subsystems).includes(value)) {
if (components.has(path)) {
entry.name = `${value} (subsystem / plugintype)`;
} else {
entry.name = `${value} (subsystem)`;
}
}
components.set(path, entry);
});
return Array.from(components.values());
};
/**
* Whether the specified component is a standard component shipped with core Moodle.
*
* @param {string} componentName
* @returns {boolean}
*/
export const isStandardComponent = (componentName) => {
if (Object.values(componentData.standardComponents).includes(componentName)) {
return true;
}
if (Object.keys(componentData.pluginTypes).includes(componentName)) {
return true;
}
return false;
};
export const rewritePlugintypeAsSubsystem = (componentName) => {
if (Object.keys(componentData.pluginTypes).includes(componentName)) {
const pluginTypePath = componentData.pluginTypes[componentName];
if (Object.keys(componentData.subsystems).includes(pluginTypePath)) {
return true;
}
}
return false;
};
/**
* Whether the specified component is a community component.
*
* @param {string} componentName
* @returns {boolean}
*/
export const isCommunityComponent = (componentName) => {
if (isStandardComponent(componentName)) {
return false;
}
return Object.values(componentData.components).indexOf(componentName) !== -1;
};
/**
* Sort method for components.
*
* This method sorts components putting `core` first, followed by core subsystems, then everything else.
*
* @param {String} a
* @param {String} b
* @returns {Number}
*/
export const sortComponents = (a, b) => {
// Always put 'core' first.
if (a === 'core') {
return -1;
} else if (b === 'core') {
return 1;
}
// Put core subsystems next.
if (a.startsWith('core_') && !b.startsWith('core_')) {
return -1;
} else if (b.startsWith('core_') && !a.startsWith('core_')) {
return 1;
}
// Sort alphabetically for everything else.
return a.localeCompare(b);
};
-85
View File
@@ -1,85 +0,0 @@
#!/usr/bin/env node
// 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/>.
import inquirer from 'inquirer';
import chalk from 'chalk';
import { createNote } from './note.mjs';
import { getInitialValues, getIssueNumberFromBranchName } from './helpers.mjs';
import * as Prompts from './prompts.mjs';
import logger from './logger.mjs';
export default async (options) => {
// Processs the initial values.
const initialValues = getInitialValues(options);
// Fetch information.
const messages = [];
const { issueNumber } = await inquirer.prompt([
Prompts.getIssuePrompt(getIssueNumberFromBranchName()),
], initialValues);
let selection = {};
let notePath;
do {
selection = {};
selection = await inquirer.prompt([
Prompts.getComponentsPrompt(),
Prompts.getTypePrompt(),
Prompts.getMessagePromptInput(),
], initialValues);
if (selection.message === '') {
selection = Object.assign(
selection,
await inquirer.prompt([
Prompts.getMessagePromptEditor(),
]),
);
}
logger.info(`
Creating upgrade note with the following options:
- Issue: ${chalk.bold(issueNumber)}
- Component: ${chalk.bold(selection.components)}
- Type: ${chalk.bold(selection.type)}
- Message:
${chalk.bold(selection.message)}
`);
messages.push({
components: [selection.components],
type: selection.type,
message: selection.message,
});
// Save the note so far.
if (notePath) {
await createNote(issueNumber, messages, notePath);
logger.info(`Updated note at: ${chalk.underline(chalk.bold(notePath))}`);
} else {
notePath = await createNote(issueNumber, messages);
logger.info(`Note created at: ${chalk.underline(chalk.bold(notePath))}`);
}
selection = Object.assign(
selection,
await inquirer.prompt([
Prompts.getAddAnotherPrompt(),
], initialValues),
);
} while (selection.addAnother);
};
-357
View File
@@ -1,357 +0,0 @@
#!/usr/bin/env node
// 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/>.
import chalk from 'chalk';
import { getAllComponents } from './components.mjs';
import { getCombinedNotesByComponent, deleteAllNotes } from './note.mjs';
import { getNoteName } from './noteTypes.mjs';
import { writeFile, readFile, unlink } from 'fs/promises';
import { join as joinPath } from 'path';
import logger from './logger.mjs';
import { getCurrentVersion } from './helpers.mjs';
/**
* Helper to fetch the current notes from a file.
*
* @param {string} file
* @returns {Promise<string>}
*/
const getCurrentNotes = async (file) => {
try {
return await readFile(file, 'utf8');
} catch (error) {
return null;
}
}
/**
* Update the UPGRADING.md file.
*
* @param {string} upgradeNotes
* @param {Object} options
* @param {boolean} options.deleteNotes
* @returns {Promise<void>}
*/
const updateUpgradeNotes = async (upgradeNotes, options) => {
const fileName = 'UPGRADING.md';
// Write the notes to a file.
logger.info(`Writing notes to ${chalk.underline(chalk.bold(fileName))}`);
// Prepend to the existing file.
const existingContent = await getCurrentNotes(fileName);
if (existingContent) {
await writeFile(fileName, getUpdatedNotes(existingContent, upgradeNotes));
} else {
// This should not normally happen.
await writeFile(fileName, upgradeNotes);
}
if (options.deleteNotes) {
logger.warn(`>>> Deleting all notes <<<`)
// Delete the notes.
deleteAllNotes();
}
};
/**
* Create the current summary notes.
*
* @param {string} upgradeNotes
* @returns {Promise<void>}
*/
const createCurrentSummary = async (upgradeNotes) => {
const fileName = 'UPGRADING-CURRENT.md';
const notes = `# Moodle upgrade notes\n\n${upgradeNotes}`;
await writeFile(fileName, notes);
logger.info(`Running upgrade notes written to ${chalk.underline(chalk.bold(fileName))}`);
};
/**
* Get the indexes of the lines that contain the version headings.
*
* @param {array<string>} lines
* @returns {array<object>}
*/
const getVersionLineIndexes = (lines) => {
const h2Indexes = [];
lines.forEach((line, index) => {
const matches = line.match(/^##\s(?<version>.*)$/);
if (matches) {
h2Indexes.push({
index,
line,
version: matches.groups.version,
});
}
});
return h2Indexes;
};
/**
* Find the index of the Unreleased heading.
*
* @param {array<object>} versionHeadings
* @returns {number}
*/
const findUnreleasedHeadingIndex = (versionHeadings) => versionHeadings.findIndex((heading) => {
if (heading.version === 'Unreleased') {
// Used if version cannot be guessed.
return true;
}
if (heading.version.endsWith('+')) {
// Weekly release for a stable branch.
return true;
}
if (heading.version.match(/beta|rc\d/)) {
// Beta and RC rolls are treated as weeklies.
return true;
}
if (heading.version.endsWith('dev')) {
// Development version.
return true;
}
return false;
});
/**
* Get the before and after content, to facilitate replacing any existing Unreleased notes.
*
* @param {array<string>} lines
* @returns {Object} {beforeContent: string, afterContent: string}
*/
const getBeforeAndAfterContent = (lines) => {
const existingLines = lines.split('\n');
const versionHeadings = getVersionLineIndexes(existingLines);
if (versionHeadings.length > 0) {
const unreleasedHeadingIndex = findUnreleasedHeadingIndex(versionHeadings);
if (unreleasedHeadingIndex !== -1) {
const beforeContent = existingLines.slice(0, versionHeadings[unreleasedHeadingIndex].index).join('\n');
if (versionHeadings.length > unreleasedHeadingIndex + 1) {
const afterContent = existingLines.slice(versionHeadings[unreleasedHeadingIndex + 1].index).join('\n');
return {
beforeContent,
afterContent,
};
}
return {
beforeContent,
afterContent: '',
};
}
return {
beforeContent: existingLines.slice(0, versionHeadings[0].index).join('\n'),
afterContent: existingLines.slice(versionHeadings[0].index).join('\n'),
};
}
return {
beforeContent: existingLines.join('\n'),
afterContent: '',
}
};
/**
* Get the notes for the component.
*
* @param {string} types
* @param {Number} headingLevel
* @returns {string}
*/
const getNotesForComponent = (types, headingLevel) => {
let upgradeNotes = '';
Object.entries(types).forEach(([type, notes]) => {
upgradeNotes += '#'.repeat(headingLevel);
upgradeNotes += ` ${getNoteName(type)}\n\n`;
notes.forEach(({ message, issueNumber }) => {
// Split the message into lines, removing empty lines.
const messageLines = message
.split('\n')
// Remove empty lines between tables, and list entries, but not after lists.
.filter((line, index, lines) => {
if (line.trim().length === 0) {
// This line is empty.
// If it's the first line in the file, remove it.
if (index === 0) {
return false;
}
// This is the last line in the file, remove it.
if (index === lines.length - 1) {
return false;
}
// If the previous line relates to a table, remove this line.
if (lines[index - 1].match(/^\s*\|/)) {
return false;
}
// If the next line is also empty, do not remove this line.
if (lines[index + 1].trim().length === 0) {
return true;
}
// Do not remove the line if the previous line was a list item.
if (lines[index - 1].match(/^\s*[-*]\s/)) {
return true;
}
if (lines[index - 1].match(/^\s*\d+\.\s/)) {
return true;
}
// Preserve all other empty lines by default.
return true;
}
// Keep any line which has content.
return true;
});
const firstLine = messageLines.shift().trim();
upgradeNotes += `- ${firstLine}\n`;
messageLines
.forEach((line) => {
upgradeNotes += ` ${line}`.trimEnd() + `\n`;
});
upgradeNotes += `\n For more information see [${issueNumber}](https://tracker.moodle.org/browse/${issueNumber})\n`;
});
upgradeNotes += '\n';
});
return upgradeNotes;
};
/**
* Get the updated notes mixed with existing content.
*
* @param {string} existingContent
* @param {string} upgradeNotes
*/
const getUpdatedNotes = (existingContent, upgradeNotes) => {
const { beforeContent, afterContent } = getBeforeAndAfterContent(existingContent);
const newContent = `${beforeContent}\n${upgradeNotes}\n${afterContent}`
.split('\n')
.filter((line, index, lines) => {
if (line === '' && lines[index - 1] === '') {
// Remove multiple consecutive empty lines.
return false;
}
return true;
})
.join('\n');
return newContent;
};
/**
* Update the notes for each component.
*/
const updateComponentNotes = (
notes,
version,
notesFileName = 'UPGRADING.md',
removeEmpty = false,
) => {
return getAllComponents().map(async (component) => {
logger.verbose(`Updating notes for ${component.name} into ${component.path}`);
const fileName = joinPath(component.path, notesFileName);
const existingContent = await getCurrentNotes(fileName);
if (!existingContent) {
if (!notes[component.value]) {
// No existing notes, and no new notes to add.
return;
}
} else {
if (!notes[component.value]) {
// There is existing content, but nothing to add.
if (removeEmpty) {
logger.verbose(`Removing empty notes file ${fileName}`);
await unlink(fileName);
}
return;
}
}
const componentNotes = notes[component.value];
let upgradeNotes = `## ${version}\n\n`;
upgradeNotes += getNotesForComponent(componentNotes, 3);
if (existingContent) {
await writeFile(fileName, getUpdatedNotes(existingContent, upgradeNotes));
} else {
await writeFile(
fileName,
`# ${component.name} Upgrade notes\n\n${upgradeNotes}`,
);
}
});
}
/**
* Generate the upgrade notes for a new release.
*
* @param {string|undefined} version
* @param {Object} options
* @param {boolean} options.generateUpgradeNotes
* @param {boolean} options.deleteNotes
* @returns {Promise<void>}
*/
export default async (version, options = {}) => {
const notes = await getCombinedNotesByComponent();
if (Object.keys(notes).length === 0) {
logger.warn('No notes to generate');
return;
}
if (!version) {
version = await getCurrentVersion();
}
// Generate the upgrade notes for this release.
// We have
// - a title with the release name
// - the change types
// - which contain the components
// - which document each change
let upgradeNotes = `## ${version}\n\n`;
Object.entries(notes).forEach(([component, types]) => {
upgradeNotes += `### ${component}\n\n`;
upgradeNotes += getNotesForComponent(types, 4);
});
await Promise.all([
createCurrentSummary(upgradeNotes),
...updateComponentNotes(notes, version, 'UPGRADING-CURRENT.md', true),
]);
if (options.generateUpgradeNotes) {
await Promise.all(updateComponentNotes(notes, version));
await updateUpgradeNotes(upgradeNotes, options);
}
};
-244
View File
@@ -1,244 +0,0 @@
// 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/>.
import chalk from 'chalk';
import branchName from 'current-git-branch';
import { isStandardComponent, isCommunityComponent, rewritePlugintypeAsSubsystem } from './components.mjs';
import { isValidNoteName } from './noteTypes.mjs';
import logger from './logger.mjs';
import { readFile } from 'fs/promises';
/**
* Validate an issue number input
*
* @param {string} input
* @returns {string|boolean}
*/
export const validateIssueNumber = (input) => {
if (!input) {
return 'You must provide a tracker issue number';
}
if (input.match(/^[a-zA-Z]*-\d+$/)) {
return true;
}
if (input.match(/^\d+$/)) {
return true;
}
return 'The issue number was not recognised as a valid issue number';
};
/**
* Format an issue number input.
*
* @param {string} input
* @returns {string}
*/
export const formatIssueNumber = (input) => {
if (input.match(/^[a-zA-Z]*-\d+$/)) {
return input;
}
if (input.match(/^\d+$/)) {
return `MDL-${input}`;
}
return input;
};
/**
* Get the issue number, based off current git branch name
*
* @returns {string|null}
*/
export const getIssueNumberFromBranchName = () => {
const issueNumber = String(branchName()).match(/^[a-zA-Z]*-\d+/);
if (issueNumber) {
return formatIssueNumber(issueNumber[0]);
}
return null;
};
/**
* Validate a component.
*
* @param {string} input
* @returns {string|boolean}
*/
export const validateComponent = (input) => {
if (isStandardComponent(input)) {
return true;
}
if (isCommunityComponent(input)) {
return 'Currently only core plugins are supported.';
}
return 'The component was not recognised as a standard component';
};
export const formatComponent = (input) => {
if (rewritePlugintypeAsSubsystem(input)) {
return `core_${input}`;
}
return input;
}
/**
* Get the initial values from the options.
*
* @param {object} options
* @returns {object}
*/
export const getInitialValues = (options) => {
const initialValues = {};
const type = getInitialTypeValue(options);
if (type) {
initialValues.type = type;
}
const issueNumber = getInitialIssueValue(options);
if (issueNumber) {
initialValues.issueNumber = issueNumber;
}
const component = getInitialComponentValue(options);
if (component) {
initialValues.components = component;
}
const message = getInitialMessageValue(options);
if (message) {
initialValues.message = message
initialValues.addAnother = false;
}
return initialValues;
};
/**
* Get the initial type value.
*
* @param {Object} options
* @returns {string|undefined}
*/
const getInitialTypeValue = (options) => {
if (!options.type) {
return;
}
options.type = options.type.trim().toLowerCase();
if (isValidNoteName(options.type)) {
return options.type;
}
logger.warn(`Note type "${chalk.underline(chalk.red(options.type))}" is not valid.`);
};
/**
* Get the initial issue number value.
*
* @param {Object} options
* @returns {string|undefined}
*/
const getInitialIssueValue = (options) => {
if (!options.issue) {
return;
}
options.issue = options.issue.trim().toUpperCase();
const issueNumberValidated = validateIssueNumber(options.issue);
if (issueNumberValidated === true) {
const issueNumber = formatIssueNumber(options.issue);
if (issueNumber !== options.issue) {
logger.warn(
`Issue number "${chalk.underline(chalk.red(options.issue))}" was updated to ` +
`"${chalk.underline(chalk.green(issueNumber))}"`
);
}
return issueNumber;
} else {
logger.warn(`Issue number "${chalk.underline(chalk.red(options.issue))}" is not valid: ${issueNumberValidated}`);
}
};
/**
* Get the initial component value.
*
* @param {Object} options
* @returns {string|undefined}
*/
const getInitialComponentValue = (options) => {
if (!options.component) {
return;
}
options.component = options.component.trim().toLowerCase();
const componentValidated = validateComponent(options.component);
if (componentValidated === true) {
const component = formatComponent(options.component);
if (component !== options.component) {
logger.warn(
`Component "${chalk.underline(chalk.red(options.component))}" was updated to ` +
`"${chalk.underline(chalk.green(component))}"`
);
}
return component;
} else {
logger.warn(`Component "${chalk.underline(chalk.red(options.component))}" is not valid: ${componentValidated}`);
}
};
/**
* Get the initial message value.
*
* @param {Object} options
* @returns {string|undefined}
*/
const getInitialMessageValue = (options) => {
if (!options.message) {
return;
}
return options.message.trim();
};
/**
* Get the current version from the project /version.php file.
*
* @returns {Promise<string>}
*/
export const getCurrentVersion = async () => {
const versionRegex = new RegExp(/^ *\$release *= *['\"](?<release>[^ \+]+\+?) *\(Build:.*/m);
try {
const versionFile = await readFile('public/version.php', 'utf8');
const match = versionFile.match(versionRegex);
if (match) {
return match.groups.release;
}
} catch(error) {
logger.error('Unable to read the version file');
}
return "Unreleased";
}
-30
View File
@@ -1,30 +0,0 @@
#!/usr/bin/env node
// 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/>.
import winston from 'winston';
const logger = winston.createLogger({
level: 'info',
format: winston.format.combine(
winston.format.colorize(),
winston.format.simple()
),
transports: [
new winston.transports.Console(),
],
});
export default logger;
-194
View File
@@ -1,194 +0,0 @@
// 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/>.
import yaml from 'js-yaml';
import path from 'path';
import { writeFile, mkdir, readdir, readFile, unlink } from 'fs/promises';
import { isValidNoteName, sortNoteTypes } from './noteTypes.mjs';
import { sortComponents } from './components.mjs';
const unreleasedPath = path.resolve('.upgradenotes');
/**
* Get the filename for the note.
*
* @param {string} issueNumnber The issue number
* @returns {string}
*/
const getFilename = (issueNumber) => {
const dateTimeFormat = new Intl.DateTimeFormat(undefined, {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
fractionalSecondDigits: 2,
timeZone: 'UTC',
});
const date = Object.fromEntries(
dateTimeFormat.formatToParts(new Date())
.filter((p) => p.type !== 'literal')
.map((p) => ([p.type, p.value]))
);
const dateString = [
date.year,
date.month,
date.day,
date.hour,
date.minute,
date.second,
date.fractionalSecond,
].join('');
return `${issueNumber}-${dateString}.yml`;
};
/**
* Create a new note.
*
* @param {string} issueNumber
* @param {[type: string]: {message: string}} messages
* @returns {string} The path to the note on disk
*/
export const createNote = async (
issueNumber,
messages,
notePath,
) => {
const note = {
issueNumber,
notes: {},
};
messages.forEach(({components, type, message}) => {
note.notes[components] = note.notes[components] || [];
note.notes[components].push({message, type});
});
if (!notePath) {
notePath = path.resolve(unreleasedPath, getFilename(issueNumber));
}
const noteContent = yaml.dump(note);
await mkdir(unreleasedPath, {recursive: true});
await writeFile(notePath, noteContent);
return notePath;
};
/**
* Get all unreleased notes.
*
* @returns {Promise<{issueNumber: string, components: string[], types: {[type: string]: {message: string}[]}}[]>
*/
export const getAllNotes = async () => {
const files = await readdir(unreleasedPath);
const notes = files
.filter((file) => file.endsWith('.yml'))
.map(async (file) => {
const filePath = path.resolve(unreleasedPath, file);
const fileContent = await readFile(filePath, 'utf8');
return {
...yaml.load(fileContent),
filePath,
};
});
return Promise.all(notes);
};
/**
* Get the list of notes, grouped by note type, then component.
*
* @returns {Promise<{[type: string]: {[components: string]: {message: string, issueNumber: string}[]}}>}
*/
export const getCombinedNotes = async () => {
const notes = await getAllNotes();
const combinedNotes = {};
notes.forEach((note) => {
Object.entries(note.notes).forEach(([components, data]) => {
data.forEach((entry) => {
if (!isValidNoteName(entry.type)) {
throw new Error(`Invalid note type: "${entry.type}" in file ${note.filePath}`);
}
combinedNotes[entry.type] = combinedNotes[entry.type] || {};
combinedNotes[entry.type][components] = combinedNotes[entry.type][components] || [];
combinedNotes[entry.type][components].push({message: entry.message, issueNumber: note.issueNumber});
});
});
});
return combinedNotes;
};
/**
* Get the list of notes, grouped by component, then by note type.
*
* @returns {Promise<{[component: string]: {[type: string]: {message: string, issueNumber: string}[]}}>}
*/
export const getCombinedNotesByComponent = async () => {
const notes = await getAllNotes();
const combinedNotes = {};
notes.forEach((note) => {
Object.entries(note.notes).forEach(([component, data]) => {
combinedNotes[component] = combinedNotes[component] || {};
data.forEach((entry) => {
if (!isValidNoteName(entry.type)) {
throw new Error(`Invalid note type: "${entry.type}" in file ${note.filePath}`);
}
combinedNotes[component][entry.type] = combinedNotes[component][entry.type] || [];
combinedNotes[component][entry.type].push({
component,
message: entry.message,
issueNumber: note.issueNumber,
type: entry.type,
});
});
});
});
// Sort notes by note type.
Object.entries(combinedNotes).forEach(([component, types]) => {
combinedNotes[component] = Object.fromEntries(
Object.entries(types).sort(([a], [b]) => sortNoteTypes(a, b))
);
});
// Sort components.
return Object.fromEntries(
Object.entries(combinedNotes).sort(([a], [b]) => sortComponents(a, b))
);
};
/**
* Delete all unreleased notes.
*
* @returns {Promise<void>}
*/
export const deleteAllNotes = async () => {
const files = await readdir(unreleasedPath);
return Promise.all(
files
.filter((item, index) => files.indexOf(item) === index)
.filter((file) => file.endsWith('.yml'))
.map((file) => unlink(`${unreleasedPath}/${file}`))
);
};
-80
View File
@@ -1,80 +0,0 @@
// 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/>.
/**
* The note types.
*
* Matches the suggested order in https://keepachangelog.com/en/1.1.0/.
* @type {Object<string, string>}
*/
const noteTypes = {
'improved': 'Added',
'changed': 'Changed',
'deprecated': 'Deprecated',
'removed': 'Removed',
'fixed': 'Fixed',
};
/**
* The preferred order of note types.
*
* @type {string[]}
*/
const preferredOrder = Object.keys(noteTypes);
/**
* Comparison method to sort note types.
*
* @param {String} a
* @param {String} b
* @returns {Number}
*/
export const sortNoteTypes = (a, b) => {
const aIndex = preferredOrder.indexOf(a);
const bIndex = preferredOrder.indexOf(b);
if (aIndex === -1) {
return 1;
}
if (bIndex === -1) {
return -1;
}
return aIndex - bIndex;
};
/**
* Get the note names.
*
* @returns {string[]}
*/
export const getNoteNames = () => Object.keys(noteTypes);
/**
* Get the human-readable note name.
*
* @param {string} type
* @returns {string}
*/
export const getNoteName = (type) => noteTypes[type];
/**
* Whether the note name is valid.
*
* @param {string} type
* @returns {boolean}
*/
export const isValidNoteName = (type) => noteTypes[type] !== undefined;
-153
View File
@@ -1,153 +0,0 @@
// 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/>.
import inquirer from 'inquirer';
import SearchList from 'inquirer-search-list';
import { getNoteNames } from './noteTypes.mjs';
import { getAllComponents } from './components.mjs';
import {
formatComponent,
formatIssueNumber,
validateComponent,
validateIssueNumber,
} from './helpers.mjs';
/**
* A Search List which accepts an initial value.
*/
class SearchListWithInitialValue extends SearchList {
constructor(options, ...args) {
super(options, ...args);
if (options.default) {
const pointer = this.filterList.findIndex((item) => {
return item.value === options.default;
});
if (pointer > -1) {
this.pointer = pointer;
}
}
}
}
inquirer.registerPrompt('search-list', SearchListWithInitialValue);
/**
* Get the issue type prompt.
*
* @param {string} defaultData The initially selected value
* @returns {Object}
*/
export const getTypePrompt = (defaultData) => ({
default: defaultData,
type: 'search-list',
message: 'Type of change',
name: 'type',
choices: getNoteNames(),
validate: (selection) => {
if (selection.length < 1) {
return 'You must select at least one type of change';
}
return true;
},
});
/**
* Get the component prompt.
*
* @param {string} [defaultValue='core'] The initally selected value.
* @returns
*/
export const getComponentsPrompt = (defaultValue) => {
if (!defaultValue ) {
defaultValue = 'core';
}
return {
choices: getAllComponents(),
default: defaultValue,
type: 'search-list',
message: 'Component',
name: 'components',
validate: validateComponent,
filter: formatComponent,
};
};
/**
* Get the issue number prompt as an inline input.
*
* @param {string} defaultData
* @returns {object}
*/
export const getIssuePrompt = (defaultData) => ({
default: defaultData,
type: 'input',
message: 'Tracker issue number',
name: 'issueNumber',
validate: validateIssueNumber,
filter: formatIssueNumber,
});
/**
* Get a message prompt.
*
* @param {string} defaultData
* @returns
*/
export const getMessagePromptEditor = (defaultData) => ({
default: defaultData,
type: process.stdin.isTTY ? 'editor' : 'input',
postfix: '.md',
message: 'Message',
name: 'message',
waitUserInput: false,
validate: (input) => {
if (!input) {
return 'You must provide a message';
}
return true;
},
// Remove any trailing whitespace.
filter: (input) => input.split('\n').map((line) => line.trimEnd()).join('\n'),
});
/**
* Get a message prompt.
*
* @param {string} defaultData
* @returns
*/
export const getMessagePromptInput = (defaultData) => ({
default: defaultData,
type: 'input',
message: 'Message (leave empty to use editor)',
name: 'message',
filter: (input) => input.trim(),
});
/**
* Get a prompt to ask the user if they wish to add another entry.
*
* @returns {Object}
*/
export const getAddAnotherPrompt = () => ({
type: 'confirm',
message: 'Do you want to add another note?',
default: false,
name: 'addAnother',
});
-58
View File
@@ -1,58 +0,0 @@
#!/usr/bin/env node
// 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/>.
import { getAllComponents } from './components.mjs';
import { getCombinedNotesByComponent } from './note.mjs';
import logger from './logger.mjs';
import { existsSync } from 'fs';
/**
* Generate links to component-specific upgrade notes for each component.
*
* @param {string|undefined} tag The git tag to link to
* @returns {Promise<void>}
*/
export default async (tag) => {
const notes = await getCombinedNotesByComponent();
if (Object.keys(notes).length === 0) {
logger.warn('No notes to generate');
return;
}
if (!tag) {
logger.error('No tag provided');
return;
}
// Generate the links for the components which have upgrade notes in this release.
let upgradeNotes = `### Component API updates\n<!--cspell: disable -->\n\n`;
const componentList = Object.fromEntries(
Object.values(getAllComponents()).map(({path, value}) => [value, path]),
);
Object.entries(notes)
.map(([component]) => ({
component,
componentPath: componentList[component],
}))
.filter(({ componentPath }) => existsSync(`./${componentPath}/UPGRADING.md`))
.forEach(({component, componentPath}) => {
upgradeNotes += `- [${component}](https://github.com/moodle/moodle/blob/${tag}/${componentPath}/UPGRADING.md)\n`;
});
console.log(upgradeNotes);
};
-142
View File
@@ -1,142 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* Component Library build tasks.
*
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
/**
* Get a child path of the component library.
*
* @param {string} path
* @returns {string}
*/
const getCLPath = path => `public/admin/tool/componentlibrary/${path}`;
/**
* Get a spawn handler.
*
* This is a generic function to write the spawn output, and then to exit if required and mark the async task as
* complete.
*
* @param {Promise} done
* @returns {function}
*/
const getSpawnHandler = done => (error, result, code) => {
grunt.log.write(result);
if (error) {
grunt.log.error(result.stdout);
process.exit(code);
}
done();
};
/**
* Spawn a function against Node with the provided args.
*
* @param {array} args
* @returns {object}
*/
const spawnNodeCall = (args) => grunt.util.spawn({
cmd: 'node',
args,
}, getSpawnHandler(grunt.task.current.async()));
/**
* Build the docs using Hugo.
*
* @returns {Object} Reference to the spawned task
*/
const docsBuild = () => spawnNodeCall([
'node_modules/hugo-bin/cli.js',
'--config', getCLPath('config.yml'),
'--cleanDestinationDir',
]);
/**
* Build the docs index using the hugo-lunr-indexer.
*
* @returns {Object} Reference to the spawned task
*/
const indexBuild = () => spawnNodeCall([
'node_modules/hugo-lunr-indexer/bin/hli.js',
'-i', getCLPath('content/**'),
'-o', getCLPath('hugo/site/data/my-index.json'),
'-l', 'yaml',
'-d', '---',
]);
/**
* Build the hugo CSS.
*
* @returns {Object} Reference to the spawned task
*/
const cssBuild = () => spawnNodeCall([
'node_modules/sass/sass.js',
'--style', 'expanded',
'--source-map',
'--embed-sources',
'--precision', 6,
'--load-path', `${process.cwd()}/public`,
getCLPath('hugo/scss/docs.scss'),
getCLPath('hugo/dist/css/docs.css'),
]);
// Register the various component library tasks.
grunt.registerTask('componentlibrary:docsBuild', 'Build the component library', docsBuild);
grunt.registerTask('componentlibrary:cssBuild', 'Build the component library', cssBuild);
grunt.registerTask('componentlibrary:indexBuild', 'Build the component library', indexBuild);
grunt.registerTask('componentlibrary', 'Build the component library', [
'componentlibrary:docsBuild',
'componentlibrary:cssBuild',
'componentlibrary:indexBuild',
]);
grunt.config.merge({
watch: {
componentLibraryDocs: {
files: [
getCLPath('content/**/*.md'),
getCLPath('hugo'),
],
tasks: ['componentlibrary:docsBuild', 'componentlibrary:indexBuild'],
},
componentLibraryCSS: {
files: [
getCLPath('hugo/scss/**/*.scss'),
'hugo',
],
tasks: ['componentlibrary:cssBuild'],
},
},
});
// Add the 'componentlibrary' task as a startup task.
grunt.moodleEnv.startupTasks.push('componentlibrary');
return {
docsBuild,
cssBuild,
indexBuild,
};
};
-72
View File
@@ -1,72 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
const files = grunt.moodleEnv.files;
// Project configuration.
grunt.config.merge({
eslint: {
// Even though warnings dont stop the build we don't display warnings by default because
// at this moment we've got too many core warnings.
// To display warnings call: grunt eslint --show-lint-warnings
// To fail on warnings call: grunt eslint --max-lint-warnings=0
// Also --max-lint-warnings=-1 can be used to display warnings but not fail.
options: {
quiet: (!grunt.option('show-lint-warnings')) && (typeof grunt.option('max-lint-warnings') === 'undefined'),
maxWarnings: ((typeof grunt.option('max-lint-warnings') !== 'undefined') ? grunt.option('max-lint-warnings') : -1)
},
// Check AMD src files.
amd: {src: files ? files : grunt.moodleEnv.amdSrc},
// Check YUI module source files.
yui: {src: files ? files : grunt.moodleEnv.yuiSrc},
// Check React source files.
'react': {
options: {
fix: true,
},
src: files ? files : grunt.moodleEnv.reactSrc,
},
},
});
grunt.loadNpmTasks('grunt-eslint');
// On watch, we dynamically modify config to build only affected files. This
// method is slightly complicated to deal with multiple changed files at once (copied
// from the grunt-contrib-watch readme).
let changedFiles = Object.create(null);
const onChange = grunt.util._.debounce(function() {
const files = Object.keys(changedFiles);
grunt.config('eslint.amd.src', files);
grunt.config('eslint.yui.src', files);
changedFiles = Object.create(null);
}, 200);
grunt.event.on('watch', (action, filepath) => {
changedFiles[filepath] = action;
onChange();
});
};
-92
View File
@@ -1,92 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
/**
* Get the list of feature files to pass to the gherkin linter.
*
* @returns {Array}
*/
const getGherkinLintTargets = () => {
if (grunt.moodleEnv.files) {
// Specific files were requested. Only check these.
return grunt.moodleEnv.files;
}
if (grunt.moodleEnv.inComponent) {
return [`${grunt.moodleEnv.runDir}/tests/behat/*.feature`];
}
return ['**/tests/behat/*.feature'];
};
const handler = function() {
const done = this.async();
const options = grunt.config('gherkinlint.options');
// Grab the gherkin-lint linter and required scaffolding.
const linter = require('gherkin-lint/dist/linter.js');
const featureFinder = require('gherkin-lint/dist/feature-finder.js');
const configParser = require('gherkin-lint/dist/config-parser.js');
const formatter = require('gherkin-lint/dist/formatters/stylish.js');
// Run the linter.
return linter.lint(
featureFinder.getFeatureFiles(grunt.file.expand(options.files)),
configParser.getConfiguration(configParser.defaultConfigFileName)
)
.then(results => {
// Print the results out uncondtionally.
formatter.printResults(results);
return results;
})
.then(results => {
// Report on the results.
// The done function takes a bool whereby a falsey statement causes the task to fail.
return results.every(result => result.errors.length === 0);
})
.then(done); // eslint-disable-line promise/no-callback-in-promise
};
grunt.registerTask('gherkinlint', 'Run gherkinlint against the current directory', handler);
grunt.config.set('gherkinlint', {
options: {
files: getGherkinLintTargets(),
}
});
grunt.config.merge({
watch: {
gherkinlint: {
files: [grunt.moodleEnv.inComponent ? 'tests/behat/*.feature' : '**/tests/behat/*.feature'],
tasks: ['gherkinlint'],
},
},
});
// Add the 'gherkinlint' task as a startup task.
grunt.moodleEnv.startupTasks.push('gherkinlint');
return handler;
};
-139
View File
@@ -1,139 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
/**
* Generate the PHPCS configuration.
*
* @param {Object} thirdPartyPaths
*/
const phpcsIgnore = (thirdPartyPaths) => {
const {toXML} = require('jstoxml');
const config = {
_name: 'ruleset',
_attrs: {
name: "MoodleCore",
},
_content: [
{
rule: {
_attrs: {
ref: './phpcs.xml.dist',
},
},
},
],
};
thirdPartyPaths.forEach(library => {
config._content.push({
'exclude-pattern': library,
});
});
grunt.file.write('phpcs.xml', toXML(config, {
header: true,
indent: ' ',
}) + "\n");
};
/**
* Extracts ignore entries from a local ignore file.
*
* @param {string} componentPath the file path to the component, relative to the code base directory
* @param {string} ignoreFilePath the path to the ignore file
* @return {array} array of ignore paths to be included in the global ignore files
*/
const getEntriesFromLocalIgnoreFile = (componentPath, ignoreFilePath) => {
const ignorePaths = [];
if (grunt.file.exists(ignoreFilePath)) {
const ignoreFile = grunt.file.read(ignoreFilePath);
const entries = ignoreFile.split('\n');
entries.forEach(entry => {
entry = entry.trim();
if (entry.length > 0 && !entry.startsWith('#') && !entry.startsWith('!')) {
while (entry.startsWith('/')) {
entry = entry.substring(1);
}
ignorePaths.push(componentPath + '/' + entry);
}
});
}
return ignorePaths;
};
/**
* Generate ignore files (utilising thirdpartylibs.xml data)
*/
const handler = function() {
const path = require('path');
const ComponentList = require(path.join(process.cwd(), '.grunt', 'components.js'));
// An array of paths to third party directories.
const thirdPartyPaths = ComponentList.getThirdPartyPaths();
const localStylelintIgnorePaths = [];
const localEslintIgnorePaths = [];
ComponentList.getComponentPaths(process.cwd() + '/').forEach(componentPath => {
const localEslintIgnorePath = process.cwd() + '/' + componentPath + '/.eslintignore';
const localEslintIgnoreEntries = getEntriesFromLocalIgnoreFile(componentPath, localEslintIgnorePath);
if (localEslintIgnoreEntries.length > 0) {
localEslintIgnorePaths.push(...localEslintIgnoreEntries);
}
const localStylelintIgnorePath = process.cwd() + '/' + componentPath + '/.stylelintignore';
const localStylelintIgnoreEntries = getEntriesFromLocalIgnoreFile(componentPath, localStylelintIgnorePath);
if (localStylelintIgnoreEntries.length > 0) {
localStylelintIgnorePaths.push(...localStylelintIgnoreEntries);
}
});
// Generate .eslintignore.
const eslintIgnores = [
'# Generated by "grunt ignorefiles"',
// Do not ignore the .grunt directory.
'!/.grunt',
// Ignore all yui/src meta directories and build directories.
'*/**/yui/src/*/meta/',
'*/**/build/',
].concat(thirdPartyPaths).concat(localEslintIgnorePaths);
grunt.file.write('.eslintignore', eslintIgnores.join('\n') + '\n');
// Generate .stylelintignore.
const stylelintIgnores = [
'# Generated by "grunt ignorefiles"',
'**/yui/build/*',
'public/theme/boost/style/moodle.css',
'public/theme/classic/style/moodle.css',
'jsdoc/styles/*.css',
'public/admin/tool/componentlibrary/hugo/dist/css/docs.css',
].concat(thirdPartyPaths).concat(localStylelintIgnorePaths);
grunt.file.write('.stylelintignore', stylelintIgnores.join('\n') + '\n');
phpcsIgnore(thirdPartyPaths);
};
grunt.registerTask('ignorefiles', 'Generate ignore files for linters', handler);
return handler;
};
-218
View File
@@ -1,218 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Function to generate the destination for the minification task
* (e.g. build/file.min.js). This function will be passed to
* the rename property of files array when building dynamically:
* http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically
*
* @param {String} destPath the current destination
* @param {String} srcPath the matched src path
* @return {String} The rewritten destination path.
*/
const babelRename = function(destPath, srcPath) {
destPath = srcPath.replace(`amd/src`, `amd/build`);
destPath = destPath.replace(/\.js$/, '.min.js');
return destPath;
};
module.exports = grunt => {
// Load the React build tasks.
require('./react')(grunt);
// Load the Ignorefiles tasks.
require('./ignorefiles')(grunt);
// Load the Shifter tasks.
require('./shifter')(grunt);
// Load ESLint.
require('./eslint')(grunt);
// Load jsconfig.
require('./jsconfig')(grunt);
// Load JSDoc.
require('./jsdoc')(grunt);
const path = require('path');
// Register JS tasks.
grunt.registerTask('yui', ['eslint:yui', 'shifter']);
grunt.registerTask('amd', ['ignorefiles', 'eslint:amd', 'rollup']);
grunt.registerTask('js', ['amd', 'yui', 'react']);
// Register NPM tasks.
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-rollup');
const babelTransform = require('@babel/core').transform;
const babel = (options = {}) => {
return {
name: 'babel',
transform: (code, id) => {
grunt.log.debug(`Transforming ${id}`);
options.filename = id;
const transformed = babelTransform(code, options);
return {
code: transformed.code,
map: transformed.map
};
}
};
};
// Note: We have to use a rate limit plugin here because rollup runs all tasks asynchronously and in parallel.
// When we kick off a full run, if we kick off a rollup of every file this will fork-bomb the machine.
// To work around this we use a concurrent Promise queue based on the number of available processors.
const rateLimit = () => {
const queue = [];
let queueRunner;
const startQueue = () => {
if (queueRunner) {
return;
}
queueRunner = setTimeout(() => {
const limit = Math.max(1, require('os').cpus().length / 2);
grunt.log.debug(`Starting rollup with queue size of ${limit}`);
runQueue(limit);
}, 100);
};
// The queue runner will run the next `size` items in the queue.
const runQueue = (size = 1) => {
queue.splice(0, size).forEach(resolve => {
grunt.log.debug(`Item resolved. Kicking off next one.`);
resolve();
});
};
return {
name: 'ratelimit',
// The options hook is run in parallel.
// We can return an unresolved Promise which is queued for later resolution.
options: async(options) => {
return new Promise(resolve => {
queue.push(resolve);
startQueue();
return options;
});
},
// When an item in the queue completes, start the next item in the queue.
generateBundle: (options, bundle) => {
grunt.log.debug(`Finished output phase for ${Object.keys(bundle).join(', ')}`);
runQueue();
},
};
};
const terser = require('rollup-plugin-terser').terser;
grunt.config.merge({
rollup: {
options: {
format: 'esm',
dir: 'output',
sourcemap: true,
treeshake: false,
context: 'window',
plugins: [
rateLimit(),
babel({
sourceMaps: true,
comments: false,
compact: false,
plugins: [
'transform-es2015-modules-amd-lazy',
'system-import-transformer',
// This plugin modifies the Babel transpiling for "export default"
// so that if it's used then only the exported value is returned
// by the generated AMD module.
//
// It also adds the Moodle plugin name to the AMD module definition
// so that it can be imported as expected in other modules.
path.resolve('.grunt/babel-plugin-add-module-to-define.js')
],
presets: [
['@babel/preset-env', {
modules: false,
useBuiltIns: false
}]
]
}),
terser({
// Do not mangle variables.
// Makes debugging easier.
mangle: false,
}),
],
},
dist: {
files: [{
expand: true,
src: grunt.moodleEnv.files ? grunt.moodleEnv.files : grunt.moodleEnv.amdSrc,
rename: babelRename
}],
},
},
});
grunt.config.merge({
watch: {
amd: {
files: grunt.moodleEnv.inComponent
? ['amd/src/*.js', 'amd/src/**/*.js']
: ['**/amd/src/**/*.js'],
tasks: ['amd']
},
},
});
// Add the 'js' task as a startup task.
grunt.moodleEnv.startupTasks.push('js');
// On watch, we dynamically modify config to build only affected files. This
// method is slightly complicated to deal with multiple changed files at once (copied
// from the grunt-contrib-watch readme).
let changedFiles = Object.create(null);
const onChange = grunt.util._.debounce(function() {
const files = Object.keys(changedFiles);
grunt.config('rollup.dist.files', [{expand: true, src: files, rename: babelRename}]);
changedFiles = Object.create(null);
}, 200);
grunt.event.on('watch', function(action, filepath) {
changedFiles[filepath] = action;
onChange();
});
return {
babelRename,
};
};
-83
View File
@@ -1,83 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
// @ts-nocheck
/**
* @copyright 2022 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
const configuration = {
compilerOptions: {
baseUrl: ".",
paths: {
},
target: "es2015",
allowSyntheticDefaultImports: false,
},
exclude: [
"node_modules",
],
include: [],
};
/**
* Generate jsconfig.json with AMD module path aliases for all components.
*
* @param {object} grunt The Grunt instance.
*/
const generateJsconfig = (grunt) => {
const jsconfigData = Object.assign({}, configuration);
const path = require('path');
const {fetchComponentData} = require(path.join(process.cwd(), '.grunt', 'components.js'));
const componentData = fetchComponentData().components;
for (const [thisPath, component] of Object.entries(componentData)) {
jsconfigData.compilerOptions.paths[`${component}/*`] = [`${thisPath}/amd/src/*`];
jsconfigData.include.push(`${thisPath}/amd/src/**/*`);
}
grunt.file.write('jsconfig.json', JSON.stringify(jsconfigData, null, " ") + "\n");
grunt.log.write('✓ Generating jsconfig.json\n');
};
/**
* Generate tsconfig.aliases.json with TypeScript path aliases for all ESM components.
*
* @returns {Promise<void>}
*/
const generateTsAliases = async() => {
const {generateAliases} = await import('../../.esbuild/generate-aliases.mjs');
generateAliases();
};
module.exports = (grunt) => {
const handler = async function() {
const done = this.async();
try {
generateJsconfig(grunt);
await generateTsAliases();
done();
} catch (err) {
grunt.log.error(err.message);
done(false);
}
};
grunt.registerTask('jsconfig', 'Generate a jsconfig configuration compatible with the LSP', handler);
};
-52
View File
@@ -1,52 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = (grunt) => {
const path = require('path');
grunt.registerTask('jsdoc', 'Generate JavaScript documentation using jsdoc', function() {
const done = this.async();
const configuration = path.resolve('.grunt/jsdoc/jsdoc.conf.js');
grunt.util.spawn({
cmd: 'jsdoc',
args: [
'--configure',
configuration,
]
}, function(error, result, code) {
if (result.stdout) {
grunt.log.write(result.stdout);
}
if (result.stderr) {
grunt.log.error(result.stderr);
}
if (error) {
grunt.fail.fatal(`JSDoc failed with error code ${code}`);
} else {
grunt.log.write('JSDoc completed successfully'.green);
}
done();
});
});
};
-111
View File
@@ -1,111 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
// @ts-nocheck
/**
* Grunt tasks for building React components.
*
* @copyright Meirza <meirza.arson@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
/**
* Register react task — build or watch React components.
*
* Modes:
* grunt react — production build
* grunt react:dev — development build (sourcemaps, no minification)
* grunt react:watch — esbuild native watch (dev mode, incremental context)
*
* Note: react:watch uses esbuild's own context.watch() and is intentionally
* separate from grunt-contrib-watch. This keeps esbuild's incremental build
* graph alive between rebuilds rather than restarting from scratch on each change.
*/
grunt.registerTask('react', 'Build all React components', function(mode) {
const done = this.async();
const isWatch = mode === 'watch';
const isDev = isWatch || mode === 'dev';
if (isWatch) {
const path = require('path');
const {spawn} = require('child_process');
// Run ESLint on the rebuilt source files in check-only mode (no --fix)
// to avoid writing changes that would re-trigger esbuild.
const eslintBin = path.join(grunt.moodleEnv.gruntFilePath, 'node_modules', '.bin', 'eslint');
const onRebuild = (srcFiles) => {
if (srcFiles.length === 0) {
return;
}
const absSrcFiles = srcFiles.map(f => path.join(grunt.moodleEnv.gruntFilePath, f));
spawn(eslintBin, absSrcFiles, {stdio: 'inherit'})
.on('error', err => grunt.log.error(`ESLint: ${err.message}`));
};
(async() => {
try {
const {watchComponents} = await import('../../.esbuild/plugin/plugincomponents.mjs');
const { generateAliases } = await import('../../.esbuild/generate-aliases.mjs');
const { buildPluginComponents } = await import('../../.esbuild/plugin/plugincomponents.mjs');
generateAliases();
await buildPluginComponents(isDev);
const ctx = await watchComponents(true, onRebuild);
if (!ctx) {
grunt.log.warn('No React source files found. Nothing to watch.');
done();
return;
}
grunt.log.ok('esbuild is watching for React changes. Press Ctrl+C to stop.');
// Keep the process alive until the user interrupts. done() is intentionally
// not called here — grunt's async mechanism holds the process open.
process.on('SIGINT', async() => {
await ctx.dispose();
done();
});
} catch (err) {
grunt.log.error(err.message);
done(false);
}
})();
return;
}
grunt.log.writeln(`Building React components in ${isDev ? 'DEVELOPMENT' : 'PRODUCTION'} mode...`);
(async() => {
try {
const {generateAliases} = await import('../../.esbuild/generate-aliases.mjs');
const {buildPluginComponents} = await import('../../.esbuild/plugin/plugincomponents.mjs');
generateAliases();
await buildPluginComponents(isDev);
done();
} catch (err) {
grunt.log.error(err.message);
done(false);
}
})();
});
};
-43
View File
@@ -1,43 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
grunt.loadNpmTasks('grunt-sass');
grunt.config.merge({
sass: {
dist: {
files: {
"public/theme/boost/style/moodle.css": "public/theme/boost/scss/preset/default.scss",
"public/theme/classic/style/moodle.css": "public/theme/classic/scss/classicgrunt.scss"
}
},
options: {
implementation: require('sass'),
includePaths: [
"public/theme/boost/scss/",
"public/theme/classic/scss/",
]
}
},
});
};
-155
View File
@@ -1,155 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/* eslint-env node */
module.exports = grunt => {
/**
* Shifter task. Is configured with a path to a specific file or a directory,
* in the case of a specific file it will work out the right module to be built.
*
* Note that this task runs the invidiaul shifter jobs async (becase it spawns
* so be careful to to call done().
*/
const handler = function() {
const done = this.async();
const options = grunt.config('shifter.options');
const async = require('async');
const path = require('path');
// Run the shifter processes one at a time to avoid confusing output.
async.eachSeries(options.paths, function(src, filedone) {
var args = [];
args.push(path.normalize(process.cwd() + '/node_modules/shifter/bin/shifter'));
// Always ignore the node_modules directory.
args.push('--excludes', 'node_modules');
// Determine the most appropriate options to run with based upon the current location.
if (grunt.file.isMatch('**/yui/**/*.js', src)) {
// When passed a JS file, build our containing module (this happen with
// watch).
grunt.log.debug('Shifter passed a specific JS file');
src = path.dirname(path.dirname(src));
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src', src)) {
// When in a src directory --walk all modules.
grunt.log.debug('In a src directory');
args.push('--walk');
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src/*', src)) {
// When in module, only build our module.
grunt.log.debug('In a module directory');
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src/*/js', src)) {
// When in module src, only build our module.
grunt.log.debug('In a source directory');
src = path.dirname(src);
options.recursive = false;
}
if (grunt.option('watch')) {
grunt.fail.fatal('The --watch option has been removed, please use `grunt watch` instead');
}
// Add the stderr option if appropriate
if (grunt.option('verbose')) {
args.push('--lint-stderr');
}
if (grunt.option('no-color')) {
args.push('--color=false');
}
var execShifter = function() {
grunt.log.ok("Running shifter on " + src);
grunt.util.spawn({
cmd: "node",
args: args,
opts: {cwd: src, stdio: 'inherit', env: process.env}
}, function(error, result, code) {
if (code) {
grunt.fail.fatal('Shifter failed with code: ' + code);
} else {
grunt.log.ok('Shifter build complete.');
filedone();
}
});
};
// Actually run shifter.
if (!options.recursive) {
execShifter();
} else {
// Check that there are yui modules otherwise shifter ends with exit code 1.
if (grunt.file.expand({cwd: src}, '**/yui/src/**/*.js').length > 0) {
args.push('--recursive');
execShifter();
} else {
grunt.log.ok('No YUI modules to build.');
filedone();
}
}
}, done);
};
// Register the shifter task.
grunt.registerTask('shifter', 'Run Shifter against the current directory', handler);
// Configure it.
grunt.config.set('shifter', {
options: {
recursive: true,
// Shifter takes a relative path.
paths: grunt.moodleEnv.files ? grunt.moodleEnv.files : [grunt.moodleEnv.runDir]
}
});
grunt.config.merge({
watch: {
yui: {
files: grunt.moodleEnv.inComponent
? ['yui/src/*.json', 'yui/src/**/*.js']
: ['**/yui/src/**/*.js'],
tasks: ['yui']
},
},
});
// On watch, we dynamically modify config to build only affected files. This
// method is slightly complicated to deal with multiple changed files at once (copied
// from the grunt-contrib-watch readme).
let changedFiles = Object.create(null);
const onChange = grunt.util._.debounce(function() {
const files = Object.keys(changedFiles);
grunt.config('shifter.options.paths', files);
changedFiles = Object.create(null);
}, 200);
grunt.event.on('watch', (action, filepath) => {
changedFiles[filepath] = action;
onChange();
});
return handler;
};
-49
View File
@@ -1,49 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
/**
* Generate ignore files (utilising thirdpartylibs.xml data)
*/
const handler = function() {
const path = require('path');
// Are we in a YUI directory?
if (path.basename(path.resolve(grunt.moodleEnv.cwd, '../../')) == 'yui') {
grunt.task.run('yui');
// Are we in an AMD directory?
} else if (grunt.moodleEnv.inAMD) {
grunt.task.run('amd');
// Are we in an ESM source directory?
} else if (grunt.moodleEnv.inEsm) {
grunt.task.run('react');
} else {
// Run all of the requested startup tasks.
grunt.moodleEnv.startupTasks.forEach(taskName => grunt.task.run(taskName));
}
};
// Register the startup task.
grunt.registerTask('startup', 'Run the correct tasks for the current directory', handler);
return handler;
};
-35
View File
@@ -1,35 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
// Load the ignorefiles tasks.
require('./ignorefiles')(grunt);
// Load the Style Lint tasks.
require('./stylelint')(grunt);
// Load the SASS tasks.
require('./sass')(grunt);
// Add the 'css' task as a startup task.
grunt.moodleEnv.startupTasks.push('css');
};
-187
View File
@@ -1,187 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
const getCssConfigForFiles = files => {
return {
stylelint: {
css: {
// Use a fully-qualified path.
src: files,
options: {
quietDeprecationWarnings: true,
configOverrides: {
rules: {
// These rules have to be disabled in .stylelintrc for scss compat.
"at-rule-no-unknown": true,
}
}
}
},
},
};
};
const getScssConfigForFiles = files => {
return {
stylelint: {
scss: {
options: {
quietDeprecationWarnings: true,
customSyntax: 'postcss-scss',
},
src: files,
},
},
};
};
/**
* Register any stylelint tasks.
*
* @param {Object} grunt
* @param {Array} files
* @param {String} fullRunDir
*/
const registerStyleLintTasks = () => {
const glob = require('glob');
// The stylelinters do not handle the case where a configuration was provided but no files were included.
// Keep track of whether any files were found.
let hasCss = false;
let hasScss = false;
// The stylelint processors do not take a path argument. They always check all provided values.
// As a result we must check through each glob and determine if any files match the current directory.
const scssFiles = [];
const cssFiles = [];
const requestedFiles = grunt.moodleEnv.files;
if (requestedFiles) {
// Grunt was called with a files argument.
// Check whether each of the requested files matches either the CSS or SCSS source file list.
requestedFiles.forEach(changedFilePath => {
let matchesGlob;
// Check whether this watched path matches any watched SCSS file.
matchesGlob = grunt.moodleEnv.scssSrc.some(watchedPathGlob => {
return glob.sync(watchedPathGlob).indexOf(changedFilePath) !== -1;
});
if (matchesGlob) {
scssFiles.push(changedFilePath);
hasScss = true;
}
// Check whether this watched path matches any watched CSS file.
matchesGlob = grunt.moodleEnv.cssSrc.some(watchedPathGlob => {
return glob.sync(watchedPathGlob).indexOf(changedFilePath) !== -1;
});
if (matchesGlob) {
cssFiles.push(changedFilePath);
hasCss = true;
}
});
} else {
// Grunt was called without a list of files.
// The start directory (runDir) may be a child dir of the project.
// Check each scssSrc file to see if it's in the start directory.
// This means that we can lint just mod/*/styles.css if started in the mod directory.
grunt.moodleEnv.scssSrc.forEach(path => {
if (path.startsWith(grunt.moodleEnv.runDir)) {
scssFiles.push(path);
hasScss = true;
}
});
grunt.moodleEnv.cssSrc.forEach(path => {
if (path.startsWith(grunt.moodleEnv.runDir)) {
cssFiles.push(path);
hasCss = true;
}
});
}
// Register the tasks.
const scssTasks = ['sass'];
if (hasScss) {
grunt.config.merge(getScssConfigForFiles(scssFiles));
scssTasks.unshift('stylelint:scss');
}
scssTasks.unshift('ignorefiles');
const cssTasks = ['ignorefiles'];
if (hasCss) {
grunt.config.merge(getCssConfigForFiles(cssFiles));
cssTasks.push('stylelint:css');
}
// The tasks must be registered, even if empty to ensure a consistent command list.
// They jsut won't run anything.
grunt.registerTask('scss', scssTasks);
grunt.registerTask('rawcss', cssTasks);
};
// Register CSS tasks.
grunt.loadNpmTasks('grunt-stylelint');
// Register the style lint tasks.
registerStyleLintTasks();
grunt.registerTask('css', ['scss', 'rawcss']);
const getCoreThemeMatches = () => {
const scssMatch = 'scss/**/*.scss';
if (grunt.moodleEnv.inTheme) {
return [scssMatch];
}
if (grunt.moodleEnv.runDir.startsWith('theme')) {
return [`*/${scssMatch}`];
}
return [`theme/*/${scssMatch}`];
};
// Add the watch configuration for rawcss, and scss.
grunt.config.merge({
watch: {
rawcss: {
files: [
'**/*.css',
],
excludes: [
'**/moodle.css',
'**/editor.css',
'jsdoc/styles/*.css',
],
tasks: ['rawcss']
},
scss: {
files: getCoreThemeMatches(),
tasks: ['scss']
},
},
});
};
-42
View File
@@ -1,42 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2023 Sara Arjona <sara@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
/**
* Generate upgradable third-party libraries (utilising thirdpartylibs.xml data)
*/
grunt.registerTask('upgradablelibs', 'Generate upgradable third-party libraries', async function() {
const done = this.async();
const path = require('path');
const ComponentList = require(path.join(process.cwd(), '.grunt', 'components.js'));
// An array of third party libraries that have a newer version in their repositories.
const thirdPartyLibs = await ComponentList.getThirdPartyLibsUpgradable({progress: true});
for (let library of thirdPartyLibs) {
grunt.log.ok(JSON.stringify(Object.assign({}, library), null, 4));
}
done();
});
};
-276
View File
@@ -1,276 +0,0 @@
/**
* This is a wrapper task to handle the grunt watch command. It attempts to use
* Watchman to monitor for file changes, if it's installed, because it's much faster.
*
* If Watchman isn't installed then it falls back to the grunt-contrib-watch file
* watcher for backwards compatibility.
*/
/* eslint-env node */
module.exports = grunt => {
/**
* This is a wrapper task to handle the grunt watch command. It attempts to use
* Watchman to monitor for file changes, if it's installed, because it's much faster.
*
* If Watchman isn't installed then it falls back to the grunt-contrib-watch file
* watcher for backwards compatibility.
*/
const watchHandler = function() {
const async = require('async');
const watchTaskDone = this.async();
let watchInitialised = false;
let watchTaskQueue = {};
let processingQueue = false;
const watchman = require('fb-watchman');
const watchmanClient = new watchman.Client();
// Grab the tasks and files that have been queued up and execute them.
var processWatchTaskQueue = function() {
if (!Object.keys(watchTaskQueue).length || processingQueue) {
// If there is nothing in the queue or we're already processing then wait.
return;
}
processingQueue = true;
// Grab all tasks currently in the queue.
var queueToProcess = watchTaskQueue;
// Reset the queue.
watchTaskQueue = {};
async.forEachSeries(
Object.keys(queueToProcess),
function(task, next) {
var files = queueToProcess[task];
var filesOption = '--files=' + files.join(',');
grunt.log.ok('Running task ' + task + ' for files ' + filesOption);
// Spawn the task in a child process so that it doesn't kill this one
// if it failed.
var args = [task, filesOption];
if (grunt.option('force')) {
args.push('--force');
}
grunt.util.spawn(
{
// Spawn with the grunt bin.
grunt: true,
// Run from current working dir and inherit stdio from process.
opts: {
cwd: grunt.moodleEnv.fullRunDir,
stdio: 'inherit'
},
args: args
},
function(err, res, code) {
if (code !== 0) {
// The grunt task failed.
grunt.log.error(err);
}
// Move on to the next task.
next();
}
);
},
function() {
// No longer processing.
processingQueue = false;
// Once all of the tasks are done then recurse just in case more tasks
// were queued while we were processing.
processWatchTaskQueue();
}
);
};
const originalWatchConfig = grunt.config.get(['watch']);
const watchConfig = Object.keys(originalWatchConfig).reduce(function(carry, key) {
if (key == 'options') {
return carry;
}
const value = originalWatchConfig[key];
const taskNames = value.tasks;
const files = value.files;
let excludes = [];
if (value.excludes) {
excludes = value.excludes;
}
taskNames.forEach(function(taskName) {
carry[taskName] = {
files,
excludes,
};
});
return carry;
}, {});
watchmanClient.on('error', function(error) {
// We have to add an error handler here and parse the error string because the
// example way from the docs to check if Watchman is installed doesn't actually work!!
// See: https://github.com/facebook/watchman/issues/509
if (error.message.match('Watchman was not found')) {
// If watchman isn't installed then we should fallback to the other watch task.
grunt.log.ok('It is recommended that you install Watchman for better performance using the "watch" command.');
// Fallback to the old grunt-contrib-watch task.
grunt.renameTask('watch-grunt', 'watch');
grunt.task.run(['watch']);
// This task is finished.
watchTaskDone(0);
} else {
grunt.log.error(error);
// Fatal error.
watchTaskDone(1);
}
});
watchmanClient.on('subscription', function(resp) {
if (resp.subscription !== 'grunt-watch') {
return;
}
resp.files.forEach(function(file) {
grunt.log.ok('File changed: ' + file.name);
var fullPath = grunt.moodleEnv.fullRunDir + '/' + file.name;
Object.keys(watchConfig).forEach(function(task) {
const fileGlobs = watchConfig[task].files;
var match = fileGlobs.some(function(fileGlob) {
return grunt.file.isMatch(`**/${fileGlob}`, fullPath);
});
if (match) {
// If we are watching a subdirectory then the file.name will be relative
// to that directory. However the grunt tasks expect the file paths to be
// relative to the Gruntfile.js location so let's normalise them before
// adding them to the queue.
var relativePath = fullPath.replace(grunt.moodleEnv.gruntFilePath + '/', '');
if (task in watchTaskQueue) {
if (!watchTaskQueue[task].includes(relativePath)) {
watchTaskQueue[task] = watchTaskQueue[task].concat(relativePath);
}
} else {
watchTaskQueue[task] = [relativePath];
}
}
});
});
processWatchTaskQueue();
});
process.on('SIGINT', function() {
// Let the user know that they may need to manually stop the Watchman daemon if they
// no longer want it running.
if (watchInitialised) {
grunt.log.ok('The Watchman daemon may still be running and may need to be stopped manually.');
}
process.exit();
});
// Initiate the watch on the current directory.
watchmanClient.command(['watch-project', grunt.moodleEnv.fullRunDir], function(watchError, watchResponse) {
if (watchError) {
grunt.log.error('Error initiating watch:', watchError);
watchTaskDone(1);
return;
}
if ('warning' in watchResponse) {
grunt.log.error('warning: ', watchResponse.warning);
}
var watch = watchResponse.watch;
var relativePath = watchResponse.relative_path;
watchInitialised = true;
watchmanClient.command(['clock', watch], function(clockError, clockResponse) {
if (clockError) {
grunt.log.error('Failed to query clock:', clockError);
watchTaskDone(1);
return;
}
// Generate the expression query used by watchman.
// Documentation is limited, but see https://facebook.github.io/watchman/docs/expr/allof.html for examples.
// We generate an expression to match any value in the files list of all of our tasks, but excluding
// all value in the excludes list of that task.
//
// [anyof, [
// [allof, [
// [anyof, [
// ['match', validPath, 'wholename'],
// ['match', validPath, 'wholename'],
// ],
// [not,
// [anyof, [
// ['match', invalidPath, 'wholename'],
// ['match', invalidPath, 'wholename'],
// ],
// ],
// ],
var matchWholeName = fileGlob => ['match', fileGlob, 'wholename'];
var matches = Object.keys(watchConfig).map(function(task) {
const matchAll = [];
matchAll.push(['anyof'].concat(watchConfig[task].files.map(matchWholeName)));
if (watchConfig[task].excludes.length) {
matchAll.push(['not', ['anyof'].concat(watchConfig[task].excludes.map(matchWholeName))]);
}
return ['allof'].concat(matchAll);
});
matches = ['anyof'].concat(matches);
var sub = {
expression: matches,
// Which fields we're interested in.
fields: ["name", "size", "type"],
// Add our time constraint.
since: clockResponse.clock
};
if (relativePath) {
/* eslint-disable camelcase */
sub.relative_root = relativePath;
}
watchmanClient.command(['subscribe', watch, 'grunt-watch', sub], function(subscribeError) {
if (subscribeError) {
// Probably an error in the subscription criteria.
grunt.log.error('failed to subscribe: ', subscribeError);
watchTaskDone(1);
return;
}
grunt.log.ok('Listening for changes to files in ' + grunt.moodleEnv.fullRunDir);
});
});
});
};
// Rename the grunt-contrib-watch "watch" task because we're going to wrap it.
grunt.renameTask('watch', 'watch-grunt');
// Register the new watch handler.
grunt.registerTask('watch', 'Run tasks on file changes', watchHandler);
grunt.config.merge({
watch: {
options: {
nospawn: true // We need not to spawn so config can be changed dynamically.
},
},
});
return watchHandler;
};
-111
View File
@@ -1,111 +0,0 @@
#!/usr/bin/env node
// 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/>.
import { Argument, Option, program } from 'commander';
import chalk from 'chalk';
import { getNoteNames } from './notes/src/noteTypes.mjs';
import createAction from './notes/src/create.mjs';
import generateAction from './notes/src/generate.mjs';
import generateReleaseNotesLinks from './notes/src/releasenotes.mjs';
import logger from './notes/src/logger.mjs';
console.log(`
${chalk.bold(chalk.underline(chalk.green('Moodle Upgrade Notes Generator')))}
This tool is used to generate the upgrade notes for changes you make in Moodle.
Please remember that the intended audience of these changes is
${chalk.italic('plugin developers')} who need to know how to update their plugins
for a new Moodle version.
Upgrade notes should not be used to document changes for site administrators, or
for internal API changes which are not expected to be used outside of the
relevant component.
`)
program.configureHelp({
helpWidth: 100,
});
program.on('option:verbose', () => {
logger.level = 'verbose';
});
program.addOption(
new Option(
'-v, --verbose',
'Output more information during the generation process',
)
.default(false)
);
// Define the command line options.
program
.command('create')
.summary('Generate a new upgrade note')
.addOption(
new Option('-t, --type <type>', `The type of change to document. Valid types are: ${getNoteNames().join(', ')}`)
)
.addOption(new Option('-i, --issue <issue>', 'The tracker issue number'))
.addOption(new Option('-c, --component <component>', 'The component to write a note for'))
.addOption(new Option(
'-m, --message <message>',
'The message to use for the upgrade note',
))
.action((options) => createAction(options));
program
.command('summary')
.summary('Generate a local copy of the upgrade notes summary')
.addArgument(
new Argument('[version]', 'The Moodle version to create the summary notes for')
)
.action((version) => generateAction(version));
program
.command('releasenotes')
.summary('Generate a list of upgrade notes for individual components in markdown format for the release notes')
.addArgument(
new Argument('[tag]', 'The Moodle tag')
)
.action((tag) => generateReleaseNotesLinks(tag));
program
.command('release')
.summary('Generate the markdown copies of the upgrade notes for a Moodle release')
.addArgument(
new Argument('[version]', 'The Moodle version to create the release notes for')
)
.addOption(
new Option(
'--generate-upgrade-notes',
'Generate the UPGRADING.md notes for the release. ' +
'Note: This option is intended for use by the release manager when generating the upgrade notes.',
)
.default(true)
)
.addOption(
new Option(
'-d, --delete-notes',
'Delete the notes after generating the UPGRADING.md notes for the release. ' +
'Note: This option is intended for use by the release manager when generating the upgrade notes.' +
'This option has no effect unless --generate-upgrade-notes is also set.'
)
.default(false)
)
.action((version, options) => generateAction(version, options));
program.parse();
-2
View File
@@ -1,2 +0,0 @@
**/amd/**
/*.js
-58
View File
@@ -1,58 +0,0 @@
// NOTE: We use eslint now. This file is used only by shifter. We keep the configuration
// here because shifter uses jshint after modules have been concating. Eslint can't
// currently do this.
{
"asi": false,
"bitwise": true,
"boss": false,
"browser": true,
"curly": true,
"debug": false,
"eqeqeq": false,
"eqnull": false,
"es5": false,
"esnext": false,
"evil": false,
"expr": false,
"forin": false,
"funcscope": false,
"globalstrict": false,
"immed": true,
"indent": 4,
"iterator": false,
"lastsemic": false,
"latedef": true,
"laxbreak": true,
"laxcomma": false,
"loopfunc": false,
"maxerr": 500,
"maxlen": 132,
"multistr": false,
"newcap": true,
"noarg": true,
"noempty": true,
"nomen": false,
"onecase": false,
"onevar": false,
"passfail": false,
"plusplus": false,
"predef": [
"M",
"define",
"require"
],
"proto": false,
"regexdash": false,
"regexp": false,
"scripturl": false,
"shadow": false,
"smarttabs": false,
"strict": false,
"sub": false,
"supernew": false,
"trailing": true,
"undef": true,
"unused": true,
"white": false,
"yui": true
}
-1
View File
@@ -1 +0,0 @@
lts/jod
-40
View File
@@ -1,40 +0,0 @@
<?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/>.
/**
* Helper file for PhpStorm, and other IDEs, to provide better code completion.
*
* @package core
* @copyright 2024 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace PHPSTORM_META;
// Assume that anything returned by \core\di::get('...') is an instance of the first argument.
override(\core\di::get(0), map([
'' => '@',
]));
// Assume that anything returned by \Psr\Container\ContainerInterface::get('...') is an instance of the first argument.
override(\Psr\Container\ContainerInterface::get(0), map([
'' => '@',
]));
// Assume that anything returned by \DI\Container::get('...') is an instance of the first argument.
override(\DI\Container::get(0), map([
'' => '@',
]));
-5
View File
@@ -1,5 +0,0 @@
{
"coverage": false,
"lint": "config",
"clean": true
}
-107
View File
@@ -1,107 +0,0 @@
{
"customSyntax": "postcss-scss",
"plugins": [
"stylelint-csstree-validator"
],
"rules": {
"csstree/validator": {
"syntaxExtensions": [
"sass"
]
},
"at-rule-empty-line-before": [ "always",
{"except": [ "blockless-after-blockless"], ignore: ["after-comment", "inside-block"]}
],
"at-rule-name-case": "lower",
"at-rule-name-space-after": "always-single-line",
"at-rule-no-unknown": null, # Enabled for non-scss in grunt.
"at-rule-semicolon-newline-after": "always",
"at-rule-semicolon-space-before": "never",
"block-closing-brace-newline-after": "always",
"block-closing-brace-newline-before": "always",
"block-closing-brace-space-before": "always-single-line",
"block-no-empty": true,
"block-opening-brace-newline-after": "always",
"block-opening-brace-space-after": "always-single-line",
"block-opening-brace-space-before": "always",
"color-hex-case": ["lower", { "severity": "warning" }],
"color-hex-length": ["short", { "severity": "warning" }],
"color-no-invalid-hex": true,
"declaration-bang-space-after": "never",
"declaration-bang-space-before": "always",
"declaration-block-no-duplicate-properties": true,
"declaration-block-no-shorthand-property-overrides": true,
"declaration-block-semicolon-newline-after": "always-multi-line",
"declaration-block-semicolon-space-after": "always-single-line",
"declaration-block-semicolon-space-before": "never",
"declaration-block-single-line-max-declarations": 1,
"declaration-block-trailing-semicolon": "always",
"declaration-colon-newline-after": "always-multi-line",
"declaration-colon-space-after": "always-single-line",
"declaration-colon-space-before": "never",
"declaration-no-important": true,
"font-family-no-duplicate-names": true,
"function-calc-no-unspaced-operator": true,
"function-comma-newline-after": "always-multi-line",
"function-comma-space-after": "always-single-line",
"function-comma-space-before": "never",
"function-linear-gradient-no-nonstandard-direction": true,
"function-max-empty-lines": 0,
"function-name-case": "lower",
"function-parentheses-newline-inside": "always-multi-line",
"function-parentheses-space-inside": "never-single-line",
"function-url-scheme-disallowed-list": ["data"],
"function-whitespace-after": "always",
"indentation": 4,
"keyframe-declaration-no-important": true,
"length-zero-no-unit": [true, { "severity": "warning" }],
"max-empty-lines": 2,
"max-line-length": [132, { "severity": "warning" }],
"media-feature-colon-space-after": "always",
"media-feature-colon-space-before": "never",
"media-feature-parentheses-space-inside": "never",
"media-feature-range-operator-space-after": "always",
"media-feature-range-operator-space-before": "always",
"media-query-list-comma-newline-after": "always-multi-line",
"media-query-list-comma-space-after": "always-single-line",
"media-query-list-comma-space-before": "never",
"no-empty-source": true,
"no-eol-whitespace": true,
"no-extra-semicolons": [true, { "severity": "warning" }],
"no-invalid-double-slash-comments": true,
"no-unknown-animations": true,
"property-case": "lower",
"property-no-unknown": true,
"selector-attribute-brackets-space-inside": "never",
"selector-attribute-operator-space-after": "never",
"selector-attribute-operator-space-before": "never",
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-list-comma-newline-after": "always",
"selector-list-comma-space-before": "never",
"selector-max-empty-lines": 0,
"selector-pseudo-class-case": "lower",
"selector-pseudo-class-no-unknown": true,
"selector-pseudo-class-parentheses-space-inside": "never",
"selector-pseudo-element-case": "lower",
"selector-pseudo-element-no-unknown": true,
"selector-type-case": "lower",
"selector-type-no-unknown": true,
"string-no-newline": true,
"time-min-milliseconds": 100,
"unit-disallowed-list": ["pt"],
"unit-case": "lower",
"unit-no-unknown": true,
"value-keyword-case": ["lower", {"ignoreKeywords": ["/(@|$)/"]}],
"value-list-comma-newline-after": "always-multi-line",
"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never",
},
"overrides": [
{
"files": ["**/yui/**/*.css"],
"rules": {
}
}
]
}
@@ -1,7 +0,0 @@
issueNumber: MDL-51152
notes:
enrol_manual:
- message: >-
The unused parameter 'roleid' has been removed from the external
function `unenrol_users()`
type: removed
@@ -1,22 +0,0 @@
issueNumber: MDL-71368
notes:
core:
- message: >
The `arg_separator.output` has been changed from a default of `amp;` to
a default of `&` in line with PHP defaults.
If you were previously relying on the legacy default when using
`http_build_query()` then you should _actively_ specify the value as the
third
parameter, for example:
```
http_build_query($formdata, '', '&amp;');
```
type: changed
@@ -1,8 +0,0 @@
issueNumber: MDL-73602
notes:
core:
- message: >-
Removed `qtype_random` from core.
`core\component::is_valid_plugin_name` has an additional check to ensure no-one can create a new plugin called qtype_random,
as this would conflict with the support for restoring old backups.
type: removed
@@ -1,8 +0,0 @@
issueNumber: MDL-75067
notes:
tool_behat:
- message: >-
The `behat_session_trait::ensure_element_[does_not_]exists(...)` methods
now accept optional `$container` parameter to define the parent node to
look within
type: improved
@@ -1,5 +0,0 @@
issueNumber: MDL-77894
notes:
core:
- message: Appending an exclamation mark to template names ignores theme overrides
type: improved
@@ -1,10 +0,0 @@
issueNumber: MDL-78325
notes:
core_grades:
- message: >-
In Moodle 4.2, the legacy Gradebook base widget from 4.1 has been removed and
replaced with a simpler class-based system due to a breaking change and
excessive complexity in the old pattern. The files `core/grades/basewidget.js` and
templates in `grade/templates/searchwidget/` have been deleted,
with minimal expected third-party impact.
type: removed
@@ -1,13 +0,0 @@
issueNumber: MDL-79182
notes:
core:
- message: >
The following AMD modules have been removed following the final
deprecation process. It is no longer possible or necessary to manually
register modal types. See MDL-78324 for further details.
- `core/modal_registry`
- `core/modal_factory`
type: removed
@@ -1,7 +0,0 @@
issueNumber: MDL-79574
notes:
core:
- message: >-
The `\core\persistent::get_records(...)` class method now returns
instances keyed by record ID
type: changed
@@ -1,13 +0,0 @@
issueNumber: MDL-81514
notes:
core_group:
- message: >
`groups_print_activity_menu()` and `groups_get_activity_group()` now
include an additional `$participationonly` parameter, which is true by
default. This can be set false when we want the user to be able to
select a non-participation group within an activity, for example if a
teacher wants to filter assignment submissions by non-participation
groups. It should never be used when the menu is displayed to students,
as this may allow them to participate using non-participation groups.
Non-participation groups are labeled as such.
type: improved
@@ -1,8 +0,0 @@
issueNumber: MDL-81608
notes:
mod_quiz:
- message: >-
The language strings `addpagebreak` and `removepagebreak` have been
deprecated and should no longer be used. These have been replaced by
the `addpagebreakafter` and `removepagebreakafter` language strings.
type: deprecated
@@ -1,12 +0,0 @@
issueNumber: MDL-81961
notes:
core_question:
- message: |
core_question:
- message: |
Final deprecation of `moodle-question-chooser` YUI module.
type: removed
- message: |
Final deprecation of `core_question/qbank_chooser` template.
type: removed
type: removed
-13
View File
@@ -1,13 +0,0 @@
issueNumber: MDL-81962
notes:
core:
- message: The `moodle-core-notification-confirm` YUI module has been removed after an extensive deprecation period. Please use the AMD `core/modal` module as a replacement.
type: removed
- message: |
The following feaetures of the `moodle-core-notification` YUI module have been removed after an extensive deprecation process.:
- method: `keyDelegation`
- property: `lightbox`
There is no direct replacement for these features, but they were not widely used and their removal should not cause significant issues. If you were using these features, you will need to implement your own solutions for key delegation and lightbox functionality.
type: removed
@@ -1,7 +0,0 @@
issueNumber: MDL-82284
notes:
core:
- message: >-
Legacy constructors have been removed. These relate to PHP 4 and
earlier.
type: removed
@@ -1,15 +0,0 @@
issueNumber: MDL-83902
notes:
core_badges:
- message: >-
The following classes and functions are now also available in the following new
locations. They will continue to work in their old locations:
| Old classname/function | New classname/function |
| --- | --- |
| `\badge_award_selector_base` | `\core_badges\award_selector_base` |
| `\badge_potential_users_selector` | `\core_badges\potential_award_selector` |
| `\badge_existing_users_selector` | `\core_badges\existing_award_selector` |
| `process_manual_award()` | `\core_badges\award_manager::process_manual_award()` |
| `process_manual_revoke()` | `\core_badges\award_manager::process_manual_revoke()` |
type: improved
@@ -1,7 +0,0 @@
issueNumber: MDL-84082
notes:
core_reportbuilder:
- message: >-
The text filter "Contains" and "Not contains" operators now support `*`
and `?` wildcard characters for better text content filtering
type: improved
@@ -1,30 +0,0 @@
issueNumber: MDL-84960
notes:
core:
- message: >-
Several core web services now include a new initials field in user data
structures. This change is backward-compatible and only adds an optional
field; no existing fields or field semantics have been changed.
Client applications should ensure they can handle the additional initials
field in web service responses, but clients that ignore unknown fields can
continue working without changes. The affected web services are:
- core_enrol_get_enrolled_users
- core_enrol_get_enrolled_users_with_capability
- core_enrol_get_potential_users
- core_enrol_search_users
- core_user_get_users_by_field
- core_user_get_users
- core_user_get_course_user_profiles
- core_grades_get_enrolled_users_for_selector
- core_grades_get_gradable_users
- gradereport_grader_get_users_in_report
- core_message_get_contact_requests
- core_message_get_conversation_members
- core_message_message_search_users
- core_message_get_user_contacts
- core_message_get_member_info
- core_message_get_conversation_messages
- mod_assign_list_participants
- mod_assign_get_participant
- mod_forum_get_forum_discussions
type: improved
@@ -1,9 +0,0 @@
issueNumber: MDL-85233
notes:
core_filters:
- message: >-
MimeTeX support has been removed from both `filter_tex` and
`filter_algebra`. These filters now depend on LaTeX tools (`latex`,
`dvips`, and `convert`/`dvisvgm`), and as a result, the `pathmimetex`
setting has been removed.
type: removed
@@ -1,8 +0,0 @@
issueNumber: MDL-85322
notes:
block_html:
- message: >-
Treat Dashboard (pagetype 'my-index') as trusted in web services so
get_content_for_external preserves embedded HTML (e.g. iframes) on user
Dashboard.
type: changed
@@ -1,8 +0,0 @@
issueNumber: MDL-85336
notes:
core:
- message: >-
Redis connection timeout settings for cachestores and sessions have been
split into connection timeout and read timeout to allow for finer
control. These settings now also accept floats.
type: improved
@@ -1,9 +0,0 @@
issueNumber: MDL-85405
notes:
core_course:
- message: >-
The external function `core_course_get_course_contents` now includes the
`candisplay` property for each returned module. If this is false, the
module should not be displayed on the course page (for example, for
question banks).
type: improved
@@ -1,5 +0,0 @@
issueNumber: MDL-85621
notes:
core_badges:
- message: The create_issued_badge generator now returns the issued badge object.
type: changed
@@ -1,11 +0,0 @@
issueNumber: MDL-85621
notes:
core_badges:
- message: >-
The class core_badges_assertion has been deprecated and replaced by
\core_badges\achievement_credential.
The method badges_get_default_issuer() has also been deprecated because
it is no longer needed.
The file badges/endorsement.php has been removed because it stopped being used
when MDL-84323 was integrated.
type: deprecated
@@ -1,17 +0,0 @@
issueNumber: MDL-85975
notes:
core:
- message: >
`restore_qtype_plugin::unset_excluded_fields` now returns the modified
questiondata structure,
in order to support structures that contain arrays.
If your qtype plugin overrides
`restore_qtype_plugin::remove_excluded_question_data` without
calling the parent method, you may need to modify your overridden method
to use the returned
value.
type: fixed
@@ -1,8 +0,0 @@
issueNumber: MDL-86332
notes:
core_completion:
- message: >-
The `completion_info::clear_criteria` method takes an optional
`$removetypecriteria` to determine whether to remove course type
criteria from other courses that refer to the current course
type: changed
@@ -1,26 +0,0 @@
issueNumber: MDL-86493
notes:
mod_quiz:
- message: >-
The quiz overrides cache implementation has been replaced with a faster alternative with a different API.
This should be a transparent change but any direct references will still need to be updated.
type: deprecated
- message: >
`mod_quiz_cm_info_dynamic()` now uses the new `quiz_overrides` cache via `override_manager`, performing a single cache fetch per quiz/user.
This significantly reduces cache calls on course pages with many quizzes and groups.
The new `mod_quiz:quiz_overrides` cache is keyed by `quizid_userid` using datasource `\mod_quiz\cache\quiz_overrides_cache`.
This cache returns all applicable overrides for a user in a quiz (the user override, if any, plus all group overrides for groups they belong to in the quiz's course).
New class `\mod_quiz\local\quiz_overrides_cache_manager` to interact with the cache:
- `get_overrides(int $quizid, int $userid): array`
- `purge_for_user(int $quizid, int $userid): void`
- `purge_for_users(int $quizid, array $userids): void`
- `purge_for_group(int $quizid, int $groupid): void`
- `purge_for_group_members(int $groupid, array $userids): void`
Hook callbacks in `db/hooks.php` to keep the cache in sync with group
membership changes:
- `\core_group\hook\after_group_membership_added`
- `\core_group\hook\after_group_membership_removed`
type: improved
@@ -1,12 +0,0 @@
issueNumber: MDL-86524
notes:
core_question:
- message: >-
During restore of a question_set_reference, mapping of IDs in the
filtercondition is now delegated to qbank plugins.
If your qbank plugin defines a filter condition that uses database
IDs, add an override of `restore_filtercondition()` to the `condition`
class, which checks the condition's data and replaces the IDs with
mapped values if required. See
`qbank_managecategories\category_condition` for an example.
type: improved
@@ -1,7 +0,0 @@
issueNumber: MDL-86607
notes:
mod_feedback:
- message: >-
The method `feedback_init_feedback_session()` has been deprecated, along
with all other direct access to `$SESSION` from the module
type: deprecated
@@ -1,7 +0,0 @@
issueNumber: MDL-86660
notes:
core_courseformat:
- message: >-
The `$cm` attribute in `activityoverviewbase` has been updated to public
visibility, allowing direct access to the course module instance
type: changed
@@ -1,8 +0,0 @@
issueNumber: MDL-86660
notes:
core_courseformat:
- message: >-
A new `available` attribute has been added to `activityname_exporter`
class. It allows the external API to return the activity's availability
status relative to the current user.
type: changed
@@ -1,9 +0,0 @@
issueNumber: MDL-86660
notes:
core_courseformat:
- message: >-
Two new public static methods have been added to the `overviewtable`
class:
- `is_cm_displayable`: Determines if a course module should be listed in the overview table.
- `is_cm_available`: Checks if a course module is accessible to the user (and should therefore be rendered as a link).
type: changed
@@ -1,19 +0,0 @@
issueNumber: MDL-86678
notes:
core_reportbuilder:
- message: >-
The base entity class now implements a default `initialise` method, that
will automatically call each of the following methods to load entity
report data:
* `get_available_columns()`
* `get_available_filters()`
* `get_available_conditions()`
This change allows for a lot of boilerplate to be removed from report
entity classes
type: improved
@@ -1,12 +0,0 @@
issueNumber: MDL-86699
notes:
core_reportbuilder:
- message: >-
There are two new entities intended for reports specific to course
module data, in order to provide a baseline in terms of module reporting
and API usage:
*
`core_course\reportbuilder\local\entities\{course_module,course_module_base}`
type: improved
@@ -1,7 +0,0 @@
issueNumber: MDL-86699
notes:
mod_forum:
- message: >-
The forum report entity `->get_context_joins()` method is deprecated,
replaced with `->get_course_modules_joins(...)`
type: deprecated
@@ -1,17 +0,0 @@
issueNumber: MDL-86798
notes:
core_question:
- message: >
In order to prevent re-use of question version numbers after a version
is deleted, the `nextversion` column was added to
`question_bank_entries`. This serves as a counter incremented each time
a version is created.
Do not query this field directly. Instead use
`core_question\versions::get_next_version()` to read the value, which
will initialise it based on the existing versions if it is not set yet.
By default, it will increment the version number automatically, unless
you pass `increment: false`. Because of this, it is advisable to call
it inside a transaction, that is only committed after the version number
is used in a `question_versions` record.
type: fixed
@@ -1,7 +0,0 @@
issueNumber: MDL-86798
notes:
core_question:
- message: >-
`get_next_version()` from questionlib.php is now deprecated. Use
`\core_question\versions::get_next_version()` instead.
type: deprecated
@@ -1,5 +0,0 @@
issueNumber: MDL-86832
notes:
core_block:
- message: Removed block_activity_modules from Moodle 5.2.
type: removed
@@ -1,10 +0,0 @@
issueNumber: MDL-86839
notes:
core:
- message: >
"grunt watch" now accepts a force flag. Run "grunt watch -f" or "grunt
watch --force" to prevent grunt from cancelling builds when errors
occur. This is especially useful during development, because js build
files will be built even if, for example, jslint errors are still
present in the files.
type: improved
@@ -1,8 +0,0 @@
issueNumber: MDL-86846
notes:
core:
- message: >-
The `core/drag_handle` template has been modified to use a native HTML
button for a more accessible experience and a consistent look with other
buttons on the page.
type: changed
@@ -1,7 +0,0 @@
issueNumber: MDL-86854
notes:
core_courseformat:
- message: >-
Add core_courseformat\cmactions::move_before that will allow to move a coursemodule to a position before another coursemodule.
Add core_courseformat\cmactions::move_end_section that will allow to move a coursemodule the end of a section.
type: improved
@@ -1,8 +0,0 @@
issueNumber: MDL-86854
notes:
core_course:
- message: >-
Deprecates moveto_module (core_course) in favor of
cmactions::move_before or cmactions::move_end_section
(core_courseformat\local\cmactions).
type: deprecated
@@ -1,11 +0,0 @@
issueNumber: MDL-86855
notes:
qbank_columnsortorder:
- message: >-
The Behat selector `column move handle` for the `qbank_columnsortorder` plugin has been removed.
When interacting with the column's move handle, please use the move handle's accessible name and type.
For example:
- `And I drag "Move Created by" "button" and I drop it in "Move T" "button"`
type: removed
@@ -1,9 +0,0 @@
issueNumber: MDL-86856
notes:
core_course:
- message: >-
The following methods have been deprecated and should no longer be used:
- `course_delete_module`
- `course_module_flag_for_async_deletion`
Please consider using the equivalent methods, delete and delete_async, in `core_courseformat\local\cmactions` instead.
type: deprecated
@@ -1,5 +0,0 @@
issueNumber: MDL-86856
notes:
core_courseformat:
- message: Add delete method to the core_courseformat\cmactions
type: improved
@@ -1,7 +0,0 @@
issueNumber: MDL-86857
notes:
core_courseformat:
- message: >-
Add set_groupmode method to the core_courseformat\cmactions (course
format actions)
type: improved
@@ -1,7 +0,0 @@
issueNumber: MDL-86857
notes:
core_course:
- message: >-
Deprecates set_coursemodule_groupmode in favor of
core_courseformat\cmactions::set_groupmode
type: deprecated
@@ -1,7 +0,0 @@
issueNumber: MDL-86858
notes:
core_courseformat:
- message: >-
Create a new core_courseformat\cmactions::duplicate aiming to replace
the course/lib.php version
type: improved

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