Compare commits

...

444 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 7d3704f293 Moodle release 2.2.3 2012-05-12 03:26:46 +02:00
Petr Skoda ce4126c7a9 MDL-31558 add missing mimetype to send_temp_file()
backported from master
2012-05-11 22:04:33 +02:00
Eloy Lafuente (stronk7) 48861429c7 weekly release 2.2.2+ 2012-05-11 12:17:31 +02:00
Eloy Lafuente (stronk7) 6cf9033d8d Merge branch 'install_22_STABLE' of git://github.com/amosbot/moodle into MOODLE_22_STABLE 2012-05-11 12:10:42 +02:00
Sam Hemelryk 94b0258dc3 MDL-31763 mod_data: Fixed array iteration reference issue 2012-05-10 17:31:24 +12:00
Sam Hemelryk f818719f11 Merge branch 'wip-MDL-31763-MOODLE_22_STABLE' of git://github.com/abgreeve/moodle into MOODLE_22_STABLE 2012-05-10 15:14:28 +12:00
Adrian Greeve 194c653a11 MDL-31763 - data - users can only override their own presets unless they have manage presets permission. 2012-05-10 10:23:12 +08:00
AMOS bot 3782723995 Automatically generated installer lang files 2012-05-10 00:31:45 +00:00
Eloy Lafuente (stronk7) 6ba42caef7 Merge branch 'install_22_STABLE' of git://github.com/amosbot/moodle into MOODLE_22_STABLE 2012-05-09 19:31:46 +02:00
Dan Poltawski b37bb96b0f Merge branch 'wip-mdl-31498-m22' of git://github.com/rajeshtaneja/moodle into MOODLE_22_STABLE 2012-05-09 17:46:15 +08:00
Andrew Davis ad9fee8416 MDL-31488 admin: made admin_externalpage_setup() try to guess the reason why the requested section couldnt be found 2012-05-09 11:58:24 +08:00
Dan Poltawski 1357fde409 Merge branch 'w19_MDL-32733_m22_authorizemessage' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-05-09 10:28:55 +08:00
Dan Poltawski c0ba02d066 Merge branch 'w19_MDL-32775_m22_searchpix' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-05-09 10:22:55 +08:00
Sam Hemelryk 93af314f78 Merge branch 'MDL-32164-MOODLE_22_STABLE-1' of git://git.luns.net.uk/moodle into MOODLE_22_STABLE 2012-05-09 11:45:57 +12:00
Sam Hemelryk a1f173f774 Merge branch 'MDL-18095-MOODLE_22_STABLE-1' of git://git.luns.net.uk/moodle into MOODLE_22_STABLE 2012-05-09 11:31:40 +12:00
Petr Skoda 3a48019ea3 MDL-32178 ignore duplicates in enroL_database external course table 2012-05-09 11:18:55 +12:00
Ruslan Kabalin ed88a0b815 MDL-18095 gradebook: Make sure grade override flag is cleared whenever required
The check for feedback and grade equality between recorded values and the current
form ones before removing override flag is not really required.
2012-05-08 12:07:41 +01:00
Frederic Massart 8d716acba5 MDL-32718 Fixed typo in column name 2012-05-08 15:55:40 +08:00
Sam Hemelryk f4e4ac8c59 Merge branch 'MDL-32670_22' of git://github.com/rlorenzo/moodle into MOODLE_22_STABLE 2012-05-08 18:06:52 +12:00
Sam Hemelryk 329920fa22 Merge branch 'MDL-31671-m22' of git://github.com/ankitagarwal/moodle into MOODLE_22_STABLE 2012-05-08 17:41:52 +12:00
Dan Poltawski d6a84028e5 Merge branch 'w19_MDL-31691_m22_cohortidnumber' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-05-08 12:40:39 +08:00
Dan Poltawski 22f754bae6 Merge branch 'MDL-32718-sql-typo_22' of git://github.com/mudrd8mz/moodle into MOODLE_22_STABLE 2012-05-08 12:35:56 +08:00
AMOS bot ffeebe6088 Automatically generated installer lang files 2012-05-08 00:31:45 +00:00
David Mudrak 0bfc4d763a MDL-32718 fixing an SQL typo in workshop_get_recent_mod_activity() 2012-05-07 10:04:46 +02:00
Dan Poltawski 4b641eaf82 Merge branch 'MDL-18335_m22' of git://github.com/rwijaya/moodle into MOODLE_22_STABLE 2012-05-07 15:32:31 +08:00
Ankit Agarwal 47b43d0b4c MDL-31671 calendar: update_event hook should be triggered when updating event 2012-05-07 15:04:56 +08:00
Ankit Agarwal d28da62e34 MDL-31671 calendar: Fixing error when trying to delete parent of a repeated event series 2012-05-07 15:04:56 +08:00
Dan Poltawski 9d3f3b5093 Revert "MDL-32379: Fix memory leak in session_set_user"
This reverts commit 22dc32042a.

This integrator didn't properly read the diff, sorry
2012-05-07 14:40:35 +08:00
Dan Poltawski e71b8ccbd1 Merge branch 'MDL-32684_M22' of git://github.com/lazydaisy/moodle into MOODLE_22_STABLE 2012-05-07 13:03:57 +08:00
Dan Poltawski 9d669d60bd Merge branch 'MDL-32430_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2012-05-07 12:48:24 +08:00
Davo Smith 73db83bfaa MDL-32698 Question - Fixed typos in load_question_attempt 2012-05-07 12:06:04 +08:00
Dan Poltawski 35f7fa3d36 Merge branch 'mdl32379_22' of git://github.com/tlevi/moodle into MOODLE_22_STABLE 2012-05-07 11:29:09 +08:00
Petr Skoda 5c85ac9572 MDL-31691 treat cohort idnumbers as plain text 2012-05-06 21:38:24 +02:00
Petr Skoda fee082d56c MDL-32735 add missing message provider info for unmaintained enrol_authorize 2012-05-06 12:08:34 +02:00
Petr Skoda 9622a33982 MDL-32775 fix invalid url in mediaplugin CSS 2012-05-05 10:41:11 +02:00
Tim Hunt fca1061612 MDL-32430 quiz calendar events: fix pluginfile URLs in the description. 2012-05-04 15:23:54 +01:00
Eloy Lafuente (stronk7) 8075bd8d8a weekly release 2.2.2+ 2012-05-04 13:11:17 +02:00
Eloy Lafuente (stronk7) 4553925614 Merge branch 'install_22_STABLE' of git://github.com/amosbot/moodle into MOODLE_22_STABLE 2012-05-04 13:07:00 +02:00
Dan Poltawski 08546a8973 MDL-32693 webservice: fix typo in URL 2012-05-03 18:22:45 +02:00
Marina Glancy 3bb5950c7e MDL-32416: Picasa repository now returns path, also fixed album title retrieval 2012-05-03 11:34:19 +08:00
Rex Lorenzo fd1e4d5039 MDL-32670 mod/chat: also added missing call to ->set_heading in report.php 2012-05-02 19:08:51 -07:00
AMOS bot 1cecb26b18 Automatically generated installer lang files 2012-05-03 00:31:31 +00:00
Eloy Lafuente (stronk7) 8b727da971 MDL-32234 Library: usergetdate tests moved to assertIdentical()
(to check both type and value)
2012-05-03 00:45:39 +02:00
Eloy Lafuente (stronk7) 46d732c252 Merge branch 'wip-mdl-32234-m22' of git://github.com/rajeshtaneja/moodle into MOODLE_22_STABLE 2012-05-03 00:40:23 +02:00
Rajesh Taneja 3416857d84 MDL-31498 formslib: repeat_elements will now set default for group elements 2012-05-02 17:10:30 +08:00
Aparup Banerjee 58d053313f Merge branch 'MDL-28657-22' of https://github.com/mackensen/moodle into MOODLE_22_STABLE 2012-05-02 13:55:50 +08:00
Jerome Mouneyrac e0a57f8ccc MDL-31762 username should be lowercase and check against PARAM_USERNAME when creating/updating user by web service 2012-05-02 17:52:35 +12:00
Mary Evans 3dde1fcafb MDL-32684 lib/pagelib: adds break; statements to theme order in lib/pagelib.php 2012-05-02 01:42:34 +01:00
ppichet cc2a87e3fe MDL-32181 question/calculatedmulti validate multianswers
restructuring the validation function of edit_calculatedmulti_form.php
adding $variant to
qtype_calculated_question_helper::start_attempt($this, $step, $variant);
2012-05-01 10:53:56 +08:00
Sam Hemelryk d0eeb25a64 Merge branch 'w18_MDL-32607_m22_upgrade2' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-05-01 13:33:53 +12:00
Sam Hemelryk 0ee1c3db00 Merge branch 'MDL-28955_M22' of git://github.com/lazydaisy/moodle into MOODLE_22_STABLE 2012-05-01 13:17:12 +12:00
Sam Hemelryk 9a260ddd2c MDL-32012 Fixed white space 2012-05-01 12:38:53 +12:00
Sam Hemelryk fc3a00dc64 Merge branch 'MDL-32012_m22' of git://github.com/merrill-oakland/moodle into MOODLE_22_STABLE 2012-05-01 12:37:42 +12:00
AMOS bot 6e3ef95711 Automatically generated installer lang files 2012-05-01 00:31:42 +00:00
Sam Hemelryk 44835cdc8b Merge branch 'MDL-29264_zindex_22' of git://github.com/andyjdavis/moodle into MOODLE_22_STABLE 2012-05-01 08:23:48 +12:00
Rossiani Wijaya 81308ee649 MDL-18335 calendar event: fixed role capability checking to create new event 2012-04-30 17:38:10 +08:00
Tim Hunt 1434fdf7a6 MDL-32357 Try to fix unread post notification for blog-style forums.
I know that showing unread posts is not 100% blog-style, but I think
it is useful functionality, therefore, I chose to fix it, rather than,
say, disable it completely.

I think this fix will only affect blog-style forums since
forum_print_latest_discussions is only called with mode 'plain' in
three places:
1. Blog-style forums - the case we want to fix,
2. Site news forum, and
3. Social course format.

In all cases, having read tracking work properly seems like the
right thing to do.
2012-04-30 14:29:56 +08:00
Rajesh Taneja daa44ab05e MDL-32234 Library: usergetdate return different values when timezone is set
usergetdate should return consistent values for different timezone. There are
two return path
1. If timezone is servertime, it returns getdate
2. If timezone other then servertime, it use gmstrftime, which returns string and
   values with leading zero.
In second case, leading zero's are removed and values are type casted. One major fix
is with yday, getdate returns 0 through 365, whereas %j returns 001 through 366. This
has been fixed as well.
2012-04-30 10:54:11 +08:00
Sam Hemelryk 3464845868 Merge branch 'm22_MDL-32597' of git://github.com/danmarsden/moodle into MOODLE_22_STABLE 2012-04-30 13:21:49 +12:00
Sam Hemelryk 390c3bc54a Merge branch 'MDL-28735-m22' of git://github.com/ankitagarwal/moodle into MOODLE_22_STABLE 2012-04-30 13:15:03 +12:00
Sam Hemelryk ead5f3793b Merge branch 'MDL-26523_grader_22' of git://github.com/andyjdavis/moodle into MOODLE_22_STABLE 2012-04-30 12:46:37 +12:00
Sam Hemelryk b5907a8674 Merge branch 'MDL-31429_paypal_messages_22' of git://github.com/andyjdavis/moodle into MOODLE_22_STABLE 2012-04-30 12:33:40 +12:00
Aparup Banerjee 839e233f17 MDL-19391 Database : fixed icon size 2012-04-30 12:21:12 +12:00
Sam Hemelryk d76ac3bab6 MDL-31510 grader report: Fixed whitespace 2012-04-30 12:13:09 +12:00
Sam Hemelryk 8a8f68ff97 Merge branch 'MDL-31510_group_activities_22' of git://github.com/andyjdavis/moodle into MOODLE_22_STABLE 2012-04-30 12:11:12 +12:00
Sam Hemelryk b969338742 Merge branch 'MDL-32238-m22' of git://github.com/ankitagarwal/moodle into MOODLE_22_STABLE 2012-04-30 12:02:50 +12:00
Sam Hemelryk ba69b6952a Merge branch 'MDL-32624_22_wip' of git://github.com/grabs/moodle into MOODLE_22_STABLE 2012-04-30 11:57:26 +12:00
Mary Evans e1765762c2 MDL-28955 theme_nimble: added css rules to display horizontal/vertical-menu-submenu-indicator 2012-04-28 02:28:37 +01:00
Rex Lorenzo ceb66eb1fd MDL-32670 mod/chat: added missing call to $PAGE->set_heading 2012-04-27 16:02:38 -07:00
Eric Merrill d68cf3877c MDL-32012 resource: flaw in restore from moodle 1.9 backups 2012-04-27 16:16:44 -04:00
Petr Skoda 9257815ff1 MDL-32607 prevent upgrade_set_timeout abort in CLI scripts
Credit goes to Michael Aherne, thanks.
2012-04-27 13:46:07 +02:00
Eloy Lafuente (stronk7) 446dbeed7a weekly release 2.2.2+ 2012-04-27 12:47:40 +02:00
Eloy Lafuente (stronk7) 5f5990903f Merge branch 'install_22_STABLE' of git://github.com/amosbot/moodle into MOODLE_22_STABLE 2012-04-27 12:41:09 +02:00
Eloy Lafuente (stronk7) 0baa0a305d Revert "MDL-32249 completion: Round course grades and remove hardcoded string"
This reverts commit b795d69cc3.
2012-04-27 12:06:39 +02:00
Andrew Davis 23caf506ba MDL-29264 course: removed the z-index from course css for course completion elements 2012-04-27 11:11:33 +07:00
Andrew Davis 50223a8ae1 MDL-26523 grade: fixed a called to addHelpButton() that was asking for a non-existent string 2012-04-27 09:19:35 +07:00
AMOS bot 1fc08528c7 Automatically generated installer lang files 2012-04-27 00:31:44 +00:00
Andrew Davis 79c0996c64 MDL-31510 grade: made the user report observe $cm->uservisible so that activities not available to a student because of groups do not appear on their user report 2012-04-26 16:59:48 +07:00
Andrew Davis 923ea459d8 MDL-31429 enrol: added db/messages.php for enrolment plugins and added some smarts to messaging so it won't display message settings for disabled enrolment plugins 2012-04-26 16:10:13 +07:00
Chris Follin ab01926c99 MDL-31429 enrol: Add missing string for PayPal enrolment messages.
Signed-off-by: Andrew Davis <andrew@moodle.com>
2012-04-26 16:08:51 +07:00
Marina Glancy 47a6c7ee31 MDL-32417: Fixed regression in original (cherrypick) backport 2012-04-26 10:22:58 +02:00
Eloy Lafuente (stronk7) c821346cfe Merge branch 'MDL-19263-22' of https://github.com/mackensen/moodle into MOODLE_22_STABLE 2012-04-26 02:59:16 +02:00
Eloy Lafuente (stronk7) b8fffc6128 Merge branch 'MDL-32630-workshop-calendar_22' of git://github.com/mudrd8mz/moodle into MOODLE_22_STABLE 2012-04-26 02:20:22 +02:00
David Mudrak 08258a6dfb MDL-32630 workshop_calendar_update() does not check for calendar permissions
As discussed in MDL-32631, calendar_event::update() should not do
capability checks at all. Until that issue is fixed, we just explicitly
declare that no capability checks should be done.

The function workshop_calendar_update() is executed when adding or
updating a workshop instance (where permissions to modify the instance
were already checked and are sufficient) and in the upgrade code (where
no check should be performed anyway).
2012-04-25 16:04:47 +02:00
Eloy Lafuente (stronk7) cf1f0dfb43 Merge branch 'MDL-32192_copy_string_22' of git://github.com/andyjdavis/moodle into MOODLE_22_STABLE 2012-04-25 13:08:05 +02:00
Marina Glancy 8c19c9cfd0 MDL-32417: Fixed pagination bug in Flickr search results, also return thumbnail sizes 2012-04-25 03:42:42 +02:00
Eloy Lafuente (stronk7) 76c51e3b9b MDL-32490 Offline assignment: phpdocs and whitespace fixes 2012-04-25 02:41:39 +02:00
Henning Bostelmann 48dd268c8d MDL-32490 Offline assignment: do not display lateness information 2012-04-25 02:41:32 +02:00
AMOS bot d71590772f Automatically generated installer lang files 2012-04-25 00:31:38 +00:00
Eloy Lafuente (stronk7) 89d13f61ca Merge branch 'MDL-32082_messaging_readability_22' of git://github.com/andyjdavis/moodle into MOODLE_22_STABLE 2012-04-25 01:57:13 +02:00
Eloy Lafuente (stronk7) 5f250cff88 Merge branch 'wip-MDL-30478-MOODLE_22_STABLE' of git://github.com/abgreeve/moodle into MOODLE_22_STABLE 2012-04-25 01:12:41 +02:00
Eloy Lafuente (stronk7) 46c485a63c Merge branch 'MDL-31548-m22' of git://github.com/ankitagarwal/moodle into MOODLE_22_STABLE 2012-04-24 23:29:54 +02:00
Andreas Grabs 36e673a766 MDL-32624 - initialbars disappears 2012-04-24 21:25:15 +02:00
Eloy Lafuente (stronk7) 352476d131 MDL-31914 db fix - cannot use table aliases on DELETE statements. Credit goes to Andrew Nicols (LUNS). 2012-04-24 13:08:29 +02:00
Eloy Lafuente (stronk7) b5dd45511d Merge branch 'MDL-32249-22' of github.com:srynot4sale/moodle into MOODLE_22_STABLE 2012-04-24 12:58:50 +02:00
Eloy Lafuente (stronk7) 5c487f23ae MDL-32102 Course completion - bump to 2011120502.08 (07 was already in use) 2012-04-24 12:30:49 +02:00
Andrew Robert Nicols 8a28dbd4e1 MDL-31914 Ensure that completion criteria are deleted when removing a course module 2012-04-24 12:28:33 +02:00
Dan Poltawski 8589241024 Merge branch 'm22_MDL-32102' of git://github.com/danmarsden/moodle into MOODLE_22_STABLE 2012-04-24 15:17:51 +08:00
Ankit Agarwal 525a4642cd MDL-32238 course: Timemodifed should be updated when a course's visible status is toggled from the category page 2012-04-24 13:41:28 +08:00
Dan Poltawski d25f6a8ecb Merge branch 'w17_MDL-32427_m22_protocols' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-04-24 10:27:22 +08:00
Dan Poltawski 1d6070951a Merge branch 'w17_MDL-25407_m22_innodb' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-04-24 10:23:34 +08:00
Ankit Agarwal 958f4ff45f MDL-28735 calendar: Fixing issues with course selection dropdown 2012-04-24 09:39:12 +08:00
Andrew Robert Nicols 8d66adc9b8 MDL-32454 Fix issues highlighted by strict warnings in MNet code 2012-04-24 01:54:26 +02:00
Andrew Robert Nicols 186fe7abe9 MDL-32514 Remove onclick for the group delete button 2012-04-24 01:43:08 +02:00
Dan Marsden 80f9011c00 MDL-32597 typo in path to version.php file for local plugins 2012-04-24 11:14:57 +12:00
Eloy Lafuente (stronk7) 0742a01d54 Merge branch 'MDL-19549-22' of git://github.com/danpoltawski/moodle into MOODLE_22_STABLE 2012-04-24 01:01:06 +02:00
Eloy Lafuente (stronk7) cbc6589769 Merge branch 'MDL-28176-22' of git://github.com/danpoltawski/moodle into MOODLE_22_STABLE 2012-04-24 00:31:06 +02:00
Eloy Lafuente (stronk7) f46c9dd0f2 Merge branch 'MDL-32134-22' of git://github.com/danpoltawski/moodle into MOODLE_22_STABLE 2012-04-24 00:08:44 +02:00
Eloy Lafuente (stronk7) 5a2d320ca6 Merge branch 'wip-MDL-26500-22' of git://github.com/danpoltawski/moodle into MOODLE_22_STABLE 2012-04-24 00:05:16 +02:00
Petr Skoda 3b1055ee4c MDL-25407 ignore errors in CLI mysql engine conversion script 2012-04-23 19:20:00 +02:00
Eloy Lafuente (stronk7) f7de3d4360 MDL-29262 simpletest: fix forgotten mock objects to avoid strict notices 2012-04-23 16:30:37 +02:00
Dan Poltawski 1e13c7b154 Merge branch 'MDL-32431' of git://github.com/ankitagarwal/moodle into MOODLE_22_STABLE 2012-04-23 17:10:57 +08:00
Dan Poltawski ac05e65ef2 Merge branch 'w17_MDL-32477_m22_cloneperm' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-04-23 16:35:34 +08:00
Petr Skoda c609c3968e MDL-32427 fix suport for extra schemes in links in HTML Purifier 2012-04-23 10:30:43 +02:00
Dan Poltawski 7b969f0bb0 Merge branch 'w17_MDL-31553_m22_clitimeout' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-04-23 15:25:49 +08:00
Petr Skoda 3691c0de24 MDL-31553 do not timeout CLI upgrade scripts
Credit goes to Michael Aherne.
2012-04-23 08:53:41 +02:00
Dan Poltawski 4be12986aa Merge branch 'MDL-32462_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2012-04-23 12:54:07 +08:00
Dan Poltawski 2d3659da69 Merge branch 'MDL-32104-m22' of git://github.com/ankitagarwal/moodle into MOODLE_22_STABLE 2012-04-23 12:50:02 +08:00
Dan Poltawski 7c4e7f8fdf Merge branch 'MDL-29262_22' of git://github.com/stronk7/moodle into MOODLE_22_STABLE 2012-04-23 12:42:33 +08:00
Dan Poltawski ced892ebb2 Merge branch 'w17_MDL-25407_m22_innodb' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-04-23 12:24:48 +08:00
Jerome Mouneyrac 6d8e40a429 MDL-31431 webservices: improve user pic docs
Explain how to retrieve profile picture when forcelogin is set to NO and guestaccess to Yes
2012-04-23 11:43:27 +08:00
Andrew Robert Nicols 2bda67fa52 MDL-32459 Adjust order of remote enrolment help text to suit form order 2012-04-23 10:44:11 +08:00
Iñaki Arenaza ead9fe0cdf MDL-16646 auth/cas CAS configuration page mis-spellings
Signed-off-by: Iñaki Arenaza <iarenaza@mondragon.edu>
2012-04-23 10:33:59 +08:00
Dan Poltawski d97f2caf13 Merge branch 'MDL-23647_M22' of git://github.com/lazydaisy/moodle into MOODLE_22_STABLE 2012-04-23 10:27:51 +08:00
Chris Follin f084d74ed1 MDL-32492 auth/cas: respect https login links 2012-04-23 09:50:17 +08:00
Aaron Barnes b795d69cc3 MDL-32249 completion: Round course grades and remove hardcoded string 2012-04-23 12:24:54 +12:00
Dan Marsden f778133a99 MDL-32102 Course completion - only restore user completion if not adding to existing course 2012-04-23 11:33:33 +12:00
Eloy Lafuente (stronk7) 6a726a9901 MDL-29262 restore: Clean controller obj form DB once finished ok 2012-04-23 00:36:41 +02:00
Eloy Lafuente (stronk7) 412ae7b629 MDL-29262 backup: Clean controller obj form DB once finished ok 2012-04-23 00:36:32 +02:00
Eloy Lafuente (stronk7) c3cc54fcce MDL-29262 backup: new setting to control the ttl of backup logs
Add one new backup setting, moving from the general CFG->loglifetime,
to be able to delete backup logged information often.

Conflicts:

	admin/settings/courses.php
	version.php
2012-04-23 00:35:10 +02:00
AMOS bot 9fed35fb09 Automatically generated installer lang files 2012-04-22 00:31:41 +00:00
Petr Skoda 6e41a68058 MDL-25407 ignore errors when converting to InnoDB and ignore timeout
This should help resolve problems with table views and other unsupported stuff.
2012-04-21 11:51:51 +02:00
Andrew Davis 65634948fa MDL-32191 grade:renamed a mis-spelled string name
AMOS BEGIN
 CPY [invalidgradeitmeid,error],[invalidgradeitemid,error]
AMOS END
2012-04-21 11:44:40 +07:00
Andrew Davis 85427358fc MDL-32082 message: added a function to make user checks more readable 2012-04-21 11:22:28 +07:00
Charles Fulton edb257109e MDL-28657 backup: make automated backup filenames site admin-configurable 2012-04-20 08:48:29 -07:00
Charles Fulton e89535552b MDL-19263 assignment: only notify users enrolled in course 2012-04-20 06:15:03 -07:00
Tim Hunt c08ea5202f MDL-32462 accesslib: fix context_user::build_paths performance
The problem was that the query was updating every row whether it needed
it or not. This turns out to be a really bad thing to do on Postgres,
because it then triggers a long expensive vacuum, which lock the context
table for a long time a really bad thing to do.
2012-04-20 10:30:26 +01:00
Tim Hunt bd680d8a01 MDL-32519 completio: Fix spelling of Enrolled. 2012-04-20 10:24:17 +01:00
Ankit Agarwal 1ac84ccdfc MDL-32431 backup: Adding the feature to support backing up and restoring calendar events 2012-04-20 08:57:49 +08:00
Ankit Agarwal 661fc73a96 MDL-32104 forum: Fixing issue with logs during restore 2012-04-20 08:55:33 +08:00
Ankit Agarwal 62c325eefe MDL-31548 enrollments: Introducing new api enrol_get_all_users_courses() that returns all user courses without any checks 2012-04-20 08:53:58 +08:00
AMOS bot e5a5ca2bcb Automatically generated installer lang files 2012-04-20 00:32:29 +00:00
Adrian Greeve 595b68e2fd MDL-30478 - wiki - Fixing up group problems when viewing and creating wiki pages.
Thanks to Matt Kolb for his contribution.
2012-04-20 07:32:13 +08:00
Petr Skoda 804feede10 MDL-32477 allow cloning of plugin permissions from core
Please note it is discouraged to clone from different plugin type because the upgrade order is not guaranteed.
2012-04-19 22:11:15 +02:00
Dan Poltawski 93fb7b528b weekly release 2.2.2+ 2012-04-19 17:48:21 +08:00
Dan Poltawski d6f387e262 Merge branch 'install_22_STABLE' of git://github.com/amosbot/moodle into MOODLE_22_STABLE 2012-04-19 17:39:12 +08:00
Andrew Robert Nicols a25ac01e95 MDL-32061 Use old lesson_answer ID and correct when restoring lesson attempts 2012-04-18 02:44:01 +02:00
Jerome Mouneyrac adca1840c4 MDL-30225 Creating new web service tokens create error 2012-04-17 18:54:03 +08:00
Dan Poltawski 54ba4bf583 MDL-26500 blog: Rewrite pluginfile urls in RSS 2012-04-17 17:47:34 +08:00
Dan Poltawski 403c191be1 MDL-26500 mod/glossary: Rewrite pluginfile urls in RSS 2012-04-17 17:47:34 +08:00
Dan Poltawski 69065330c4 MDL-26500 mod/forum: Rewrite pluginfile urls in RSS 2012-04-17 17:47:33 +08:00
Dan Poltawski c8ad77f876 MDL-19549 lang: make a string less scary 2012-04-17 17:17:29 +08:00
Dan Poltawski 35eb31fa38 Merge branch 'MDL-25660-workshop-calendar_22' of git://github.com/mudrd8mz/moodle into MOODLE_22_STABLE 2012-04-17 16:07:12 +08:00
Dan Poltawski dc52f193eb MDL-28176 lang - rephrase conditional access description 2012-04-17 13:38:03 +08:00
Dan Poltawski e449096842 MDL-32134 lang: Add missing PNG string 2012-04-17 11:29:52 +08:00
AMOS bot 49eb5cf372 Automatically generated installer lang files 2012-04-17 00:31:48 +00:00
Dan Poltawski 36ddd604b5 Merge branch 'w16_MDL-32437_m22_tablename' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-04-16 20:50:25 +08:00
Dan Poltawski 1399a5bc41 Merge branch 'MDL-32358_22' of https://github.com/ppichet/moodle into MOODLE_22_STABLE 2012-04-16 14:31:17 +08:00
Jerome Mouneyrac 2547042fe6 MDL-31694 Fix XSS security issue with service name accepting javascript 2012-04-16 14:27:45 +08:00
Sam Hemelryk 5335b7deb8 Merge branch 'MDL-29174_MOODLE_22' of git://github.com/raymanuk/moodle into MOODLE_22_STABLE 2012-04-16 17:37:04 +12:00
Dan Poltawski afa1de62b2 Merge branch 'wip-MDL-32393-m22' of git://github.com/samhemelryk/moodle into MOODLE_22_STABLE 2012-04-16 13:29:07 +08:00
Dan Poltawski d2db892076 MDL-32443 queupgradehelper cli: fix path & whitespace 2012-04-16 13:23:17 +08:00
Dan Poltawski ddbc74866d Merge branch 'MDL-32443_m22' of git://github.com/merrill-oakland/moodle into MOODLE_22_STABLE 2012-04-16 13:14:42 +08:00
Sam Hemelryk 80bc3d9880 Merge branch 'MDL-32385_M22' of git://github.com/lazydaisy/moodle into MOODLE_22_STABLE 2012-04-16 17:06:09 +12:00
Dan Poltawski d4608845b2 Merge branch 'MDL-32404_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2012-04-16 13:01:52 +08:00
Sam Hemelryk 4a979297aa Merge branch 'MDL-32444_M22' of git://github.com/lazydaisy/moodle into MOODLE_22_STABLE 2012-04-16 15:59:38 +12:00
Eric Merrill ce4ca89ef1 MDL-32443 qeupgradehelper: Add cli tool to execute qeupgrade helper 2012-04-15 23:51:56 -04:00
Sam Hemelryk 41d2e418a7 MDL-32353 fixed up very minor whitespace 2012-04-16 15:22:59 +12:00
Sam Hemelryk 11990142b0 Merge branch 'MDL-32353_m22' of git://github.com/merrill-oakland/moodle into MOODLE_22_STABLE 2012-04-16 15:11:59 +12:00
Dan Poltawski 253b5f4d7e Merge branch 'MDL-32442_m22' of git://github.com/merrill-oakland/moodle into MOODLE_22_STABLE 2012-04-16 10:51:46 +08:00
ppichet 8858129c17 MDL-32358 : numerical question: validation messages errors
The selected unit parameter is added answer paramter when renderer call
 $question->get_validation_error() so that it mimics the
is_complete_response(array $response) structure.
2012-04-15 22:29:32 -04:00
Sam Hemelryk 0656d45fbc Merge branch 'm22_MDL-32388' of git://github.com/danmarsden/moodle into MOODLE_22_STABLE 2012-04-16 12:23:10 +12:00
Sam Hemelryk 98a4be5176 Merge branch 'MDL-30819_grader_col_highlight_22' of git://github.com/andyjdavis/moodle into MOODLE_22_STABLE 2012-04-16 11:45:36 +12:00
Mary Evans b2fd3caea6 MDL-23647 theme_anomaly: Removed margin + added padding to current week main content to give it more definition. 2012-04-16 00:37:21 +01:00
Sam Hemelryk 77b300ca51 Merge branch 'MDL-30955_forum_ratings_22' of git://github.com/andyjdavis/moodle into MOODLE_22_STABLE 2012-04-16 11:34:26 +12:00
Sam Hemelryk cb36e6ba4a Merge branch 'MDL-32316_22_wip' of git://github.com/grabs/moodle into MOODLE_22_STABLE 2012-04-16 11:00:25 +12:00
Sam Hemelryk b182c1238e Merge branch 'MDL-27547-MOODLE_22_STABLE' of git://github.com/mouneyrac/moodle into MOODLE_22_STABLE 2012-04-16 10:47:58 +12:00
Petr Skoda fead3b432a MDL-32437 fix invalid gradebook query sql 2012-04-15 14:26:18 +02:00
Mary Evans 877a07f709 MDL-32444 theme_afterburner: adds 5px margin to the left of #loginbtn, input, button, select in /style/afterburner_styles.css 2012-04-15 01:50:31 +01:00
Tim Hunt e0538fa845 MDL-32404 question export: missing error message when exporting an empty category. 2012-04-14 15:44:22 +01:00
Mary Evans 41f8ca66e0 MDL-32385 theme_base: adds line-height:normal in style/course.css for section summary 2012-04-14 15:04:31 +01:00
Eric Merrill a68b0363bf MDL-32442 questionupgrade: error in SQL from postgres systems 2012-04-14 09:06:02 -04:00
AMOS bot 47860563bc Automatically generated installer lang files 2012-04-14 00:31:56 +00:00
David Mudrak ade4de356e MDL-25660 workshop removes its calendar events on instance deletion 2012-04-13 13:11:09 +02:00
David Mudrak 4494053b02 MDL-25660 recreate all workshop calendar events
Due to complex workshop upgrade path from 1.9 and missing calendar events
support in 2.x, the only safe way to get rid of potentially invalid
calendar events (such as those reported in MDL-26687) is to remove all
current workshop events and recreate them from scratch.
2012-04-13 04:43:58 +02:00
David Mudrak 6c6042404a MDL-25660 workshop registers events in the calendar 2012-04-13 04:43:40 +02:00
Eric Merrill 085cc4ef9a MDL-32353 backup: Flaw in settings logic for user info and anonymise 2012-04-12 10:57:24 -04:00
Dan Poltawski b1d3043354 weekly release 2.2.2+ 2012-04-12 13:27:17 +08:00
Dan Poltawski dc201dce9e Merge branch 'install_22_STABLE' of git://github.com/amosbot/moodle into MOODLE_22_STABLE 2012-04-12 12:59:46 +08:00
Andrew Davis 92a7892d42 MDL-30955 rating: corrected /rating/index.php as it was determining the maximum rating incorrectly for custom scales 2012-04-12 10:19:15 +07:00
Andrew Davis c2e8445bf1 MDL-30819 grade: fixed column highlighting on the grader report 2012-04-12 10:14:36 +07:00
AMOS bot e6524dcbf9 Automatically generated installer lang files 2012-04-12 00:31:27 +00:00
Dan Marsden 2ed2d8c111 MDL-32388 SCORM: Fix chrome pop-ups 2012-04-11 21:05:49 +12:00
Jerome Mouneyrac e8a2384eb6 MDL-27547 When deleting a local plugin containing a built-in service, the built-in service is not deleted 2012-04-11 15:01:12 +08:00
Sam Hemelryk 61231c48fa Revert "MDL-30843 and MDL-30842 - accessibility compliance: Add <label> for form input text and select tag"
This reverts commit f01c7ddc7c.
2012-04-11 17:20:29 +12:00
Dan Poltawski b0a994f460 Merge branch 'MDL-32217_22' of git://github.com/ppichet/moodle into MOODLE_22_STABLE 2012-04-11 09:27:38 +08:00
Sam Hemelryk bd8d0b81d6 MDL-32393 navigation: Fixed up issue when rendering action_link instances for the navigation 2012-04-11 10:57:15 +12:00
Sam Hemelryk 999f7e3e17 MDL-32124 mod_feedback: Cleanup post-integration of unused var 2012-04-10 17:21:59 +12:00
Sam Hemelryk ec01a02d8b Merge branch 'MDL-32124_22_wip' of git://github.com/grabs/moodle into MOODLE_22_STABLE 2012-04-10 17:11:57 +12:00
Tony Levi e71b08c529 MDL-32379: Fix memory leak in session_set_user
session_set_user mistakingly sets the session user to be a reference to the passed object.

This is a problem when alot of data is attached to the session user object,
as any process holding a list of these users will use more memory each time it changes user.
2012-04-10 14:09:10 +09:30
Jason Fowler d4341ff79c MDL-27427 - Blog - Adding ability to delete entries from external blogs 2012-04-10 12:05:20 +08:00
Dan Poltawski 697f104ac1 Merge branch 'wip-mdl-30051-m22' of git://github.com/rajeshtaneja/moodle into MOODLE_22_STABLE 2012-04-10 11:06:09 +08:00
sam marshall 167c8c6714 MDL-32349 Installing can time out with large number of plugins 2012-04-10 12:40:00 +12:00
ppichet d8c5082b76 MDL-32217_22 Setting options->unitgradingtype
Signed-off-by: ppichet <pichet.pierre@uqam.ca>
2012-04-09 20:09:50 -04:00
Sam Hemelryk b054ead121 Merge branch 'MDL-30843_b_m22' of git://github.com/rwijaya/moodle into MOODLE_22_STABLE 2012-04-10 11:01:37 +12:00
Sam Hemelryk 3f046db150 Merge branch 'wip-mdl-32270-m22' of git://github.com/rajeshtaneja/moodle into MOODLE_22_STABLE 2012-04-10 10:53:19 +12:00
Sam Hemelryk d9cc6b7a31 Merge branch 'w15_MDL-32263_m22_enroladmin' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-04-10 10:48:15 +12:00
Andreas Grabs eb11030b38 MDL-32316 feedback: fix tem type label does honor trusted text 2012-04-10 00:27:59 +02:00
Petr Skoda 43400d60de MDL-32263 remove broken admin test in enrol_check_plugins() 2012-04-09 20:01:28 +02:00
Hugh Davenport 2719e7c8f9 MDL-32308 Fix error when testing id of guest user 2012-04-09 19:05:54 +02:00
Andreas Grabs 767ed44ca4 MDL-32124 - mails to non respondents are sent as plain text with html-tags 2012-04-07 17:31:39 +02:00
Aparup Banerjee f24ff8f8d4 weekly release 2.2.2+ 2012-04-05 16:42:19 +08:00
Aparup Banerjee 42bcf023b4 Merge branch 'install_22_STABLE' of git://github.com/amosbot/moodle into MOODLE_22_STABLE 2012-04-05 16:19:49 +08:00
Aparup Banerjee c461a6a0a7 Merge branch 'wip-MDL-31631-m22' of git://github.com/samhemelryk/moodle into MOODLE_22_STABLE 2012-04-04 13:41:00 +08:00
Eloy Lafuente (stronk7) bdd773ba40 Merge branch 'MDL-32240_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2012-04-04 00:11:43 +02:00
Eloy Lafuente (stronk7) fcc24148d6 Merge branch 'wip-MDL-29678-m22' of git://github.com/samhemelryk/moodle into MOODLE_22_STABLE 2012-04-03 23:52:32 +02:00
Sam Hemelryk 729ef69705 Merge branch 'MDL-32137-MOODLE_22_STABLE-1' of git://git.luns.net.uk/moodle into MOODLE_22_STABLE 2012-04-04 08:21:52 +12:00
Eloy Lafuente (stronk7) 8c6bc1e000 Merge branch 'wip-MDL-32018-m22' of git://github.com/samhemelryk/moodle into MOODLE_22_STABLE 2012-04-03 21:06:16 +02:00
Ray Guo d6b01141a1 MDL-29174 Remove the empty modulename_extend_navigation() stub from 7
modules.
2012-04-03 15:46:54 +01:00
Ruslan Kabalin 4f4bf67a31 MDL-32137 Fix message preference settings.
When a messaging output is set to forced, users should not be able to change
that. Regression intoroduced in bb3546f3 made possible to change checkboxes
(but not avoid forced settings). This fix replace checkboxes for 'forced'
settings with the corresponding message, similar to how it worked for
disallowed before.
2012-04-03 11:55:38 +01:00
Aparup Banerjee d0f6d6172a Merge branch 'wip-MDL-30784-stable22' of git://github.com/phalacee/moodle into MOODLE_22_STABLE 2012-04-03 17:00:51 +08:00
Aparup Banerjee 3ba909de87 Merge branch 'wip-MDL-31789-MOODLE_22_STABLE' of git://github.com/marinaglancy/moodle into MOODLE_22_STABLE 2012-04-03 16:32:06 +08:00
Marina Glancy 97c0418e64 MDL-32171: add 'Manage' link to Picasa repository
Conflicts:

	repository/picasa/lib.php
2012-04-03 13:07:06 +08:00
Dan Poltawski a028969cc7 Merge branch 'wip-mdl-30904-m22' of git://github.com/rajeshtaneja/moodle into MOODLE_22_STABLE 2012-04-03 11:39:21 +08:00
Rajesh Taneja cb2c45b31f MDL-32270 Library: ->defaulthomepage is checked before used 2012-04-03 11:29:33 +08:00
Dan Poltawski 65e5640a94 Merge branch 'MDL-32220_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2012-04-03 11:10:19 +08:00
Sam Hemelryk f65eadd42d Merge branch 'wip-mdl-32150-m22' of git://github.com/rajeshtaneja/moodle into MOODLE_22_STABLE 2012-04-03 10:32:53 +12:00
Davo Smith ed9cc071d5 MDL-32213 Question upgrade now correctly handles non-core manually-graded question types 2012-04-02 17:00:44 +08:00
Dan Poltawski 41b4bb03b2 Merge branch 'MDL-32039_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2012-04-02 11:50:50 +08:00
Andreas Grabs 18ca35b3fa MDL-31768 - it is not possible to add a picture to the thanks page in feedback 2012-04-02 11:18:19 +08:00
Dan Poltawski 17ee774fdf Merge branch 'MDL-32214' of git://github.com/mkassaei/moodle into MOODLE_22_STABLE 2012-04-02 11:02:37 +08:00
Sam Hemelryk 2de2d0d2cd Merge branch 'MDL-32239_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2012-04-02 14:31:08 +12:00
Dan Poltawski 94bea73f29 Merge branch 'wip-MDL-32264-m22' of git://github.com/samhemelryk/moodle into MOODLE_22_STABLE 2012-04-02 10:16:50 +08:00
Rajesh Taneja a99a9a163e MDL-32150 Libraries: checkbox controller will not check or uncheck freezed checkboxes 2012-04-02 10:12:06 +08:00
Dan Poltawski d54abc73a1 Merge branch 'MDL-32246_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2012-04-02 10:06:23 +08:00
Dan Poltawski 46303d1deb Merge branch 'MDL-32201_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2012-04-02 09:42:37 +08:00
Sam Hemelryk 0292c465fe Merge branch 'MDL-32256-cron-return_22_STABLE' of git://github.com/mudrd8mz/moodle into MOODLE_22_STABLE 2012-04-02 11:27:55 +12:00
Sam Hemelryk 12376c971f Merge branch 'MDL-32258-data-cron_22_STABLE' of git://github.com/mudrd8mz/moodle into MOODLE_22_STABLE 2012-04-02 11:24:41 +12:00
Kanika Goyal 84c10aaa7c MDL-31908 Glossary: entry list format- printable version does not show content 2012-04-02 11:20:55 +12:00
Sam Hemelryk fc0acdfacd Merge branch 'MDL-32289_M22' of git://github.com/lazydaisy/moodle into MOODLE_22_STABLE 2012-04-02 10:16:20 +12:00
Mary Evans 59c0293d9e MDL-32289 theme_afterburner: added lang menu to frontpage layout in config.php 2012-04-01 01:12:03 +01:00
Mary Evans 04b1865d44 MDL-32262 theme_afterburner: fixed missing comma in afterburner_styles.css 2012-04-01 00:40:05 +01:00
Rajesh Taneja d2fbfb5f73 MDL-30051 cron: login error sql is now cross db 2012-03-30 16:50:42 +08:00
Rossiani Wijaya f01c7ddc7c MDL-30843 and MDL-30842 - accessibility compliance: Add <label> for form input text and select tag 2012-03-30 16:44:13 +08:00
Rajesh Taneja 48e43c12e6 MDL-32150 Libraries: checkall and uncheckall will not select disabled or readonly checkboxes 2012-03-30 13:04:52 +08:00
Rajesh Taneja f90a927b52 MDL-30904 Calendar: Event links are descriptive with hidden event name, for screen readers 2012-03-30 13:02:02 +08:00
AMOS bot 120aa6fd38 Automatically generated installer lang files 2012-03-30 00:33:10 +00:00
Jason Fowler 11c5042847 MDL-30784 - lib - Patch provided by Jason Hardin to provide detection for Android Tablets to allow the theme engine to provide the tablet theme 2012-03-30 08:24:32 +08:00
Sam Hemelryk 76fae9b6ab MDL-29678 lib: Require login now overrides to false for AJAX scripts 2012-03-30 10:23:56 +13:00
Sam Hemelryk 431c68a867 MDL-29678 navigation: Navigation AJAX require_login calls no longer set wantsurl or redirect 2012-03-30 10:23:56 +13:00
Sam Hemelryk 7b88b81a49 MDL-31631 navigation: Removed caching of activities and sections arrays in favour of relying on cminfo caching 2012-03-30 10:22:56 +13:00
Sam Hemelryk 4b023f2a10 MDL-32018 mod_wiki: Fixed up whitespace after peer-review 2012-03-30 10:21:32 +13:00
Sam Hemelryk 2be11d5faf MDL-32018 mod_wiki: Fixed formatting of the page title so that is is consistent and secure 2012-03-30 10:21:32 +13:00
Sam Hemelryk d6105bc1e1 MDL-32018 mod_wiki: Improved form definitions to ensure they consistent and secure 2012-03-30 10:21:32 +13:00
Sam Hemelryk 7068811aa9 MDL-32264 theme_standard: Fixed multi-day calendar event border issue 2012-03-30 10:19:51 +13:00
Tim Hunt 2c92dc7bab MDL-32039 qeupgradehelper: fix typos in the lang strings 2012-03-29 21:38:24 +01:00
Tim Hunt 0971dd7939 MDL-32201 question export: use qformat_xml::write_answer in base class
Without this, images in answers were not being written to the export
file for questions using extra_answer_fields.
2012-03-29 15:20:17 +01:00
David Mudrak 5e9050d1fb MDL-32258 database module does not have any data_cron() function to execute 2012-03-29 16:02:54 +02:00
David Mudrak d55cca19cf MDL-32256 quiz_cron() now returns true as expected by the current API 2012-03-29 15:52:40 +02:00
Tim Hunt 0175c5efaa MDL-32240 quiz editing: check permissions questions are added.
We also check permissions when removing questions from the quiz, so that
we do not let users make mistakes they cannot immediately undo.

Conflicts:

	mod/quiz/editlib.php
2012-03-29 14:52:19 +01:00
Tim Hunt 29e247e44e MDL-32239 question bank: wrong cap checks editing/viewing quesitions
None of these problems affect the default roles. They only occur when
the permissions have been edited to allow restricted subsets of the
question capabilities.

In some cases, things that the restriced subset of capabilities should
have allowed were blocked by errors. In other cases, users were allowed
to do more than they should bave been due to failures to check the
right capabilities in the right places.

For full details, see the bug report.

Two of the bugs were previously reported separately as MDL-26395 and
MDL-27232.
2012-03-29 14:34:09 +01:00
Tim Hunt 112bbb8ff4 MDL-32246 question export: should cope with unrecognised qtypes.
If a question is of an unrecognised type, then we just omit it from the export.
2012-03-29 14:09:19 +01:00
Tim Hunt e4a8f90479 MDL-32220 question import: files sometimes stored in the wrong context.
Sadly, this involves a small API change, but I don't believe anyone was
using the argument I had to remove (because we were sometimes passing a
wrong value, and there is not way to compute the right value at that
point in the code.)

Also sadly, the code to compute the context we are importing into is now
rather spaghetti-like, but it works.

Conflicts:

	question/format/examview/format.php
	question/format/learnwise/format.php
	question/format/webct/format.php
2012-03-29 14:08:52 +01:00
Eloy Lafuente (stronk7) 58db57ad53 weekly release 2.2.2+ 2012-03-29 13:25:05 +02:00
Eloy Lafuente (stronk7) cf6b626f39 Merge branch 'install_22_STABLE' of git://github.com/amosbot/moodle into MOODLE_22_STABLE 2012-03-29 13:20:12 +02:00
Dan Poltawski bddec3c1d6 Revert "MDL-31914 Ensure that completion criteria are deleted when removing a course module"
This reverts commit 3bf0bb64fd.
2012-03-29 15:58:08 +08:00
AMOS bot 340691baab Automatically generated installer lang files 2012-03-29 00:31:47 +00:00
Marina Glancy 67ace38c82 MDL-31789: Allowing context object to be passed to JS using json_encode()
Classes with magic properties such as context do not pass through json_encode().
The solution is to implement iterator in such classes and convert what we
feed to json_encode to array using 'foreach' before we pass it to json_encode():
- class context implements IteratorAggregate
- added function convert_to_array() that converts anything to array
- before calling json_encode we convert the argument to array
2012-03-28 11:43:46 +08:00
M Kassaei 4bc0b067b6 MDL-32214 quiz regrading: with many attempts, PHP runs out of memory 2012-03-27 16:15:25 +01:00
Dan Poltawski 9d0610f0f3 MDL-31775 lesson: fix undefined variable warnings 2012-03-27 20:02:48 +08:00
Andrew Robert Nicols 3bf0bb64fd MDL-31914 Ensure that completion criteria are deleted when removing a course module
Conflicts:

	lib/db/upgrade.php
	version.php
2012-03-27 10:28:38 +02:00
Dan Poltawski 59fccfb0cf Merge branch 'MDL-32028_m22' of git://github.com/nebgor/moodle into MOODLE_22_STABLE 2012-03-27 14:47:44 +08:00
Aparup Banerjee 0161e20b65 Merge branch 'wip-MDL-32106-MOODLE_22_STABLE' of git://github.com/marinaglancy/moodle into MOODLE_22_STABLE 2012-03-27 10:10:19 +08:00
Tim Lock da496c52f8 MDL-31869: Searching for users in messaging with multiple roles generates a warning 2012-03-27 10:00:29 +08:00
Sam Hemelryk ec202ddbba Merge branch 'MDL-22510-m22' of git://github.com/ankitagarwal/moodle into MOODLE_22_STABLE 2012-03-27 11:03:08 +13:00
Sam Hemelryk 015c334a73 Merge branch 'm22_MDL-32147' of git://github.com/danmarsden/moodle into MOODLE_22_STABLE 2012-03-27 09:51:28 +13:00
Dan Poltawski e0f6644dc0 Merge branch 'MDL-31775_m22' of git://github.com/rwijaya/moodle into MOODLE_22_STABLE 2012-03-26 14:41:46 +08:00
Dan Poltawski 26420be610 Merge branch 'MDL-32172_m22' of git://github.com/rwijaya/moodle into MOODLE_22_STABLE 2012-03-26 12:22:57 +08:00
Dan Poltawski 4270267ee9 Merge branch 'm22_MDL-31856_choice_responses_inconsistently_displayed' of git://github.com/kanikagoyal/moodle into MOODLE_22_STABLE 2012-03-26 12:11:18 +08:00
Dan Poltawski 55878aa09b Merge branch 'MDL-27710_m22' of git://github.com/rwijaya/moodle into MOODLE_22_STABLE 2012-03-26 11:27:38 +08:00
Marina Glancy e30281eed5 MDL-32106: fixed JS bug - when html element did not exist the script stopped 2012-03-26 10:48:08 +08:00
Ankit Agarwal d06b2e0c89 MDL-22510 libraries: Set wantsurl only when $setwantsurltome is set in
require_login
2012-03-26 08:56:17 +08:00
Iurii Kucherov 071746fb4a MDL-31513 rename 'Edit service' to 'Save changes' 2012-03-26 12:12:08 +13:00
Andrew Robert Nicols 07435fc117 MDL-32142 Add missing langstring for section backups 2012-03-26 12:01:50 +13:00
Sam Hemelryk 2733a8c4d5 Merge branch 'wip-mdl-29331-m22' of git://github.com/rajeshtaneja/moodle into MOODLE_22_STABLE 2012-03-26 11:57:29 +13:00
Rajesh Taneja ea496d1a00 MDL-31903 course: Title on highlight and hide icon should be only added in ie 2012-03-26 11:45:58 +13:00
Rajesh Taneja f6fd27e70a MDL-31903 course: Highlight icon will get iniatlised properly 2012-03-26 11:45:58 +13:00
Rajesh Taneja e06bc8c074 MDL-31903 course: update patch to fix course highlight icon and title toggle 2012-03-26 11:45:58 +13:00
Juho Viitasalo 46424df47a MDL-31903 course: Fixed course highlight icon and title toggle 2012-03-26 11:45:58 +13:00
Sam Hemelryk abdbeec6bb Merge branch 'MDL-29400' of git://github.com/danpoltawski/moodle into MOODLE_22_STABLE 2012-03-26 11:19:27 +13:00
Ruslan Kabalin 772c720527 MDL-32026 messaging: Fix non-existing variable in the error output 2012-03-26 11:14:12 +13:00
Mary Evans 4cfd77fc0e MDL-30019 theme_fusion: fix for mod-assignment-submission page by reducing font-size and page wapper padding 2012-03-25 08:24:22 +01:00
AMOS bot 7ec66c7da8 Merge branch 'MOODLE_22_STABLE' into install_22_STABLE 2012-03-24 00:32:16 +00:00
Andrew Robert Nicols 44f2c95717 MDL-32164 Add string for file encoding
AMOS BEGIN
  CPY [encoding,tool_uploaduser],[fileencoding,mod_data]
AMOS END
2012-03-23 09:54:59 +00:00
Rossiani Wijaya a69d0091fa MDL-32172 Lesson Module: add variable initialization for 2012-03-23 15:39:12 +08:00
Rajesh Taneja c0254bafa8 MDL-29331 Users: Participants list with user_details now show check box for bluk operation 2012-03-23 11:28:58 +08:00
AMOS bot e8e1b85e72 Automatically generated installer lang files 2012-03-23 00:31:45 +00:00
Sam Hemelryk a81e8c47f1 weekly release 2.2.2+ 2012-03-23 12:19:07 +13:00
Sam Hemelryk 292f509cff Merge branch 'install_22_STABLE' of git://github.com/amosbot/moodle into MOODLE_22_STABLE 2012-03-23 12:11:03 +13:00
Dan Marsden 7ebb628d8d MDL-32147 - use correct 404 for server type 2012-03-23 10:00:31 +13:00
Dan Marsden ef1889484b MDL-32147 SCORM improve performance of 404s for files inside SCORM packages. 2012-03-23 09:44:32 +13:00
Kanika Goyal 4941396825 MDL-31856, if choice not open, responses inconsistently displayed 2012-03-22 18:57:49 +05:30
Sam Hemelryk 366d7c0aba MDL-31528 categories: Fixed up typo 2012-03-22 09:45:45 +13:00
Sam Hemelryk 11c86239b7 MDL-31528 category: Fixed use of lang_string class 2012-03-21 14:28:37 +13:00
Sam Hemelryk 89399cb129 Merge branch 'wip-mdl-31640-m22' of git://github.com/rajeshtaneja/moodle into MOODLE_22_STABLE 2012-03-21 09:50:13 +13:00
Sam Hemelryk 0d2001b756 Merge branch 'MDL-28952-m22' of git://github.com/ankitagarwal/moodle into MOODLE_22_STABLE 2012-03-21 09:29:12 +13:00
Andrew Robert Nicols 9c6d59285e MDL-32065 Allow feedback images to be themed 2012-03-21 09:25:22 +13:00
Dan Poltawski 91e79a37cc Merge branch 'MDL-31266_m22' of git://github.com/rwijaya/moodle into MOODLE_22_STABLE 2012-03-20 21:45:03 +08:00
Rossiani Wijaya 9530780571 MDL-31775 Lesson Module: fixed start at last page seen bug 2012-03-20 17:36:21 +08:00
Aparup Banerjee a57b5479db MDL-29848 glossary: fixed whitespace 2012-03-20 16:12:54 +08:00
Aparup Banerjee 6a680dd4aa Merge branch 'MDL-29848-22' of https://github.com/mackensen/moodle into MOODLE_22_STABLE 2012-03-20 16:12:21 +08:00
Rossiani Wijaya a8e1b6b3ef MDL-27710 lesson module: add the following jump options: unseen branch page, random page and random branch 2012-03-20 15:20:08 +08:00
Andrew Davis e9ed7e0ed0 MDL-31818 grade: removed some broken code to do with overriding students per page, added a post variable so the page isnt lost when submitting grades 2012-03-20 13:24:36 +08:00
Ankit Agarwal 9f84da6969 MDL-28592 blocks: changing the arguments to moodle_url::out() 2012-03-20 10:58:56 +08:00
Aparup Banerjee fbc708dc4d Merge branch 'wip-MDL-31528-m22' of git://github.com/samhemelryk/moodle into MOODLE_22_STABLE 2012-03-20 10:10:11 +08:00
Dan Poltawski 507e6a2eda MDL-29400 assignment: Require a file to be uploaded in form
Don't display 'File uploaded successfully' when no file uploaded for
both upload and uploadsingle
2012-03-20 09:06:13 +08:00
Sam Hemelryk dff9c69fa8 Merge branch 'wip-MDL-32036-MOODLE_22_STABLE' of git://github.com/marinaglancy/moodle into MOODLE_22_STABLE 2012-03-20 13:41:20 +13:00
Sam Hemelryk 26777ab2c3 Merge branch 'wip-MDL-32037-MOODLE_22_STABLE' of git://github.com/marinaglancy/moodle into MOODLE_22_STABLE 2012-03-20 13:33:17 +13:00
Sam Hemelryk e9d7fb3a88 Merge branch 'w12_MDL-32071_m22_dbfamily' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-03-20 11:40:01 +13:00
Sam Hemelryk e6c9fdb384 Merge branch 'w12_MDL-32079_m22_folderrev' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-03-20 11:34:09 +13:00
M Kassaei cff8f5db55 MDL-32053 question: Question bank table displayed inconsistently 2012-03-20 11:01:21 +13:00
M Kassaei 5691235ace MDL-32048 mod_quiz: Question bank select/deselect all shows strange behaviour in IE 2012-03-20 10:56:02 +13:00
Sam Hemelryk 33ce9928d8 Merge branch 'MDL-32064_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2012-03-20 10:37:27 +13:00
Sam Hemelryk 2cd9cfcc97 Merge branch 'MDL-32084_M22' of git://github.com/lazydaisy/moodle into MOODLE_22_STABLE 2012-03-19 20:38:14 +13:00
Sam Hemelryk a440a25c64 Merge branch 'w12_MDL-32090_m22_groupui' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-03-19 20:33:38 +13:00
Petr Skoda 59307a664c MDL-27553 admin: Fixed override bug 2012-03-19 20:21:52 +13:00
Rajesh Taneja 42ec1aa258 MDL-31640 course: removed extra error message, perpage is set properly, modulelink hidden field, and new context call is used. 2012-03-19 15:17:37 +08:00
Rajesh Taneja 246e844e5f MDL-31640 course: Move to, edit and search functionality in search.php is fixed with proper permission check 2012-03-19 15:17:31 +08:00
Petr Skoda ad6c9ad223 MDL-31703 allow serving of JavaScript from unsupported '/' dirroot 2012-03-19 20:16:49 +13:00
Sam Hemelryk 56f55380a9 Merge branch 'wip-mdl-26674-m22' of git://github.com/rajeshtaneja/moodle into MOODLE_22_STABLE 2012-03-19 20:06:28 +13:00
Sam Hemelryk aa7574545f MDL-31528 navigation: Fixed up missing break and optimised category.php 2012-03-19 19:32:43 +13:00
Sam Hemelryk 739d5c91b9 MDL-31984 Fixed whitespace during integration 2012-03-19 19:12:31 +13:00
Brian Jorgensen 2e83093eba MDL-31984: add debugging message if theme renderer file is missnamed 2012-03-19 19:12:30 +13:00
Rajesh Taneja 2e32076884 MDL-26674 wiki2.0: cleaned wiki event logging patch 2012-03-19 11:20:17 +08:00
Diane Villemure e10faa46a6 MDL-26674 wiki2.0: Fixed wiki activity log 2012-03-19 11:20:11 +08:00
Sam Hemelryk 8b66d25681 Merge branch 'wip-MDL-27064-stable22' of git://github.com/phalacee/moodle into MOODLE_22_STABLE 2012-03-19 15:48:52 +13:00
Andrew Robert Nicols 51ffccda4d MDL-32004 Set the defaultrequestcategory correctly when deleting/creating the default category 2012-03-19 14:38:48 +13:00
Sam Hemelryk fc109fac2d Merge branch 'MDL-28187_messaging_nav_22' of git://github.com/andyjdavis/moodle into MOODLE_22_STABLE 2012-03-19 14:14:17 +13:00
Sam Hemelryk 3905c1f75b Merge branch 'MDL-31835_recent_conversations_22' of git://github.com/andyjdavis/moodle into MOODLE_22_STABLE 2012-03-19 14:07:05 +13:00
AMOS bot 2c4e52a7df Automatically generated installer lang files 2012-03-19 00:31:50 +00:00
Sam Hemelryk fb2e8f82c9 Merge branch 'MDL-30890_m22' of git://github.com/rwijaya/moodle into MOODLE_22_STABLE 2012-03-19 10:27:22 +13:00
Mary Evans ce539ad701 MDL-32084 theme_fusion: removed default tagline in frontpage.php and changed configtextarea to configtext in settings.php 2012-03-17 21:46:52 +00:00
Andrew Davis 4bf46b6e96 MDL-28187 message: fixed up $PAGE->set_url() in /message/index.php so the nav highlighted properly 2012-03-17 11:59:29 +07:00
AMOS bot 5c1a9d64ac Automatically generated installer lang files 2012-03-17 00:31:43 +00:00
Petr Skoda 466b9bad29 MDL-32090 fix invalid group members url
Credit goes to Jean-Philippe Gaudreau.
2012-03-16 20:12:27 +01:00
Tim Hunt b1ddd85ca1 MDL-32064 quiz navigation: JS form submit must fire submit event handlers. 2012-03-16 15:00:51 +00:00
Petr Skoda 1f373dfef0 MDL-32071 fix incorrect get_dbfamily() call 2012-03-16 10:31:30 +01:00
Petr Skoda 69439955e6 MDL-32071 fix fatal problems in experimental forum_usetextsearches 2012-03-16 10:30:14 +01:00
Petr Skoda 96f953cbe2 MDL-32079 folder revision must be incremented after any file change 2012-03-16 10:11:40 +01:00
Ankit Agarwal 0ce936b081 MDL-28952 blocks: Fixing the extra escaping issue with profile links 2012-03-16 15:44:51 +08:00
Andrew Davis c232e12bf2 MDL-31835 message: added a view conversation type link after each conversation on the recent conversation screen 2012-03-16 13:28:08 +07:00
Sam Hemelryk fa0f103c89 MDL-31528 navigation: Tidied up page for viewing and managing categories 2012-03-16 10:35:53 +13:00
Sam Hemelryk fc08a60dc1 MDL-31528 navigation: Fixed up navbar generation when editing categories 2012-03-16 10:35:53 +13:00
Sam Hemelryk 51f205a7e3 MDL-31528 navigation: Fixed up generation for category contexts 2012-03-16 10:35:53 +13:00
Tim Hunt 7d0f9cef34 MDL-31594 question manual grading: did not handle comma as decimal. 2012-03-15 18:48:42 +00:00
Eloy Lafuente (stronk7) 832626da76 weekly release 2.2.2+ 2012-03-15 11:46:12 +01:00
Eloy Lafuente (stronk7) f51ba2033b Merge branch 'install_22_STABLE' of git://github.com/amosbot/moodle into MOODLE_22_STABLE 2012-03-15 11:42:06 +01:00
Rossiani Wijaya 3db8d8499e MDL-30890 accessibility compliance: add summary to calendar table 2012-03-15 17:09:34 +08:00
Aparup Banerjee be626b193e MDL-32028 Documentation : removed legacy 1.x documentation 2012-03-15 15:20:08 +08:00
Jason Fowler 658762de67 MDL-27064 - Blog - Changing the link text for different levels of blog entries 2012-03-15 08:52:46 +08:00
AMOS bot 494884fe7c Automatically generated installer lang files 2012-03-15 00:31:52 +00:00
Charles Fulton 104ed36274 MDL-26243 calendar: display correct number of repeated events 2012-03-15 00:41:10 +01:00
Eloy Lafuente (stronk7) 27c202c1c0 MDL-31911 admin tools: moved loop after tools admin category created 2012-03-15 00:27:41 +01:00
Eloy Lafuente (stronk7) 3ef24c6f3b MDL-28972 formslib: whitespace fixes 2012-03-14 18:11:24 +01:00
Marina Glancy 9616f3f71d MDL-32036: Repositories wikimedia and youtube lack paging
repositories wikimedia and youtube:
- save last search in
- process parameter 'page'
- remove buttons 'Refresh', 'Search' and 'Logout' since they don't have meaning
filepicker:
- allow unknown number of pages (['pages'] = -1), show one 'Next' page after the current (both JS and non-JS modes)
repository wikimedia:
- add non-AJAX search form to make it work with JS disabled
2012-03-14 14:26:21 +08:00
Marina Glancy e6be794910 MDL-32037: MDL-32037: After displaying error message filepicker could not send proper request to server
We need to make sure that code executed on error does not create more requests and
especially does not create the same request that resulted with error. So now by default
filepicker will clear the right side of the window if repository_ajax.php returned an
error.
Also fixed an 'invalidsesskey' error string.
2012-03-14 13:12:59 +08:00
Sam Hemelryk b87ca9b713 Merge branch 'wip-mdl-28972-m22' of git://github.com/rajeshtaneja/moodle into MOODLE_22_STABLE 2012-03-14 14:39:59 +13:00
Davo Smith 7f40235c18 MDL-31853 Fix pagelayout problem with admin_externalpage_setup 2012-03-14 09:24:51 +08:00
AMOS bot 378ef32da0 Automatically generated installer lang files 2012-03-14 00:31:53 +00:00
Davo Smith da9cfb9630 MDL-29147 Quickform fixed insertElementBefore to ignore duplicate unnamed elements 2012-03-14 11:54:42 +13:00
Sam Hemelryk 999e6901c8 Merge branch 'MDL-29440' of git://github.com/danpoltawski/moodle into MOODLE_22_STABLE 2012-03-14 11:30:06 +13:00
Kordan b2ace0016f MDL-31975 theme_formal_white: minor css cleanup 2012-03-14 11:24:01 +13:00
Ankit Agarwal d22a68bd18 MDL-28998 libraries: Using default value of 0 for userid during login 2012-03-14 10:47:40 +13:00
Eloy Lafuente (stronk7) a784430288 Merge branch 'MDL-31981_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2012-03-13 18:09:24 +01:00
Andrew Davis 08b6184488 MDL-31834 message: fixed up some not quite correct usage of moodle/site:readallmessages 2012-03-13 16:49:30 +01:00
Eloy Lafuente (stronk7) 3da552e27c Merge branch 'wip-MDL-31175-m22' of git://github.com/samhemelryk/moodle into MOODLE_22_STABLE 2012-03-13 16:16:18 +01:00
Eloy Lafuente (stronk7) 489981eaba MDL-31718 add a few more tests to check that lens and tags are properly handled
Conflicts:

	lib/simpletest/testmoodlelib.php
2012-03-13 13:16:47 +01:00
Eloy Lafuente (stronk7) 6014124ea3 Merge branch 'w11_MDL-31718_m22_shortentext' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-03-13 13:14:48 +01:00
Aparup Banerjee c04109fcb1 Merge branch 'wip-mdl-27862-m22' of git://github.com/rajeshtaneja/moodle into MOODLE_22_STABLE 2012-03-13 15:28:12 +08:00
Rossiani Wijaya 7f7aac7ad1 MDL-31266 Lesson module: Improve feedback so that the responses are concatenated instead of overwritten 2012-03-13 14:54:39 +08:00
Aparup Banerjee 298dd4ca5d Merge branch 'wip-mdl-30817-m22' of git://github.com/rajeshtaneja/moodle into MOODLE_22_STABLE 2012-03-13 11:51:54 +08:00
Aparup Banerjee 08ba77f32e Merge branch 'MDL-30867_m22' of git://github.com/rwijaya/moodle into MOODLE_22_STABLE 2012-03-13 11:32:29 +08:00
Mary Evans 33e69c39ef MDL-31008 themes: (base theme) reversed MDL-26712 by making dimmed objects grey and added new rule for dimmed activity label text to give 50% transparancy instead 2012-03-13 10:58:25 +08:00
Aparup Banerjee d047098e46 MDL-31910 Quiz : fixed whitespace 2012-03-13 10:15:30 +08:00
M Kassaei 52b26f8a5b MDL-31910 Quiz : Error on Manual Grading report 2012-03-13 10:15:24 +08:00
Davo Smith 66e23d6a6c MDL-31935 Fixed restore backup link in course search 2012-03-13 10:01:31 +08:00
Ruslan Kabalin e9f2ede177 MDL-31808 Upload assignment: fix user feedback display 2012-03-13 14:10:31 +13:00
Ruslan Kabalin 861de3cda1 MDL-31917 Improve assigment submission usability
Say 'View' if assignment has been graded via gradebook and changing
grades via submissions interface is not possible.
2012-03-13 14:05:08 +13:00
Ruslan Kabalin 2b6a38f5c2 MDL-31919 Fix assignment overview output to respect gradebook grading.
Currenly, if assigment has been graded in gradebook only, in the assigment
overview it is listed as not graded.
2012-03-13 14:01:04 +13:00
Eloy Lafuente (stronk7) 3ad6f443b4 Merge branch 'w11_MDL-31913_m22_tinymce' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-03-13 00:35:19 +01:00
Sam Hemelryk 22dde645f4 Merge branch 'w11_MDL-27457_m22_enrolnorecover' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-03-13 11:59:53 +13:00
Sam Hemelryk d254ae8cfe Merge branch 'MDL-30298_M22' of git://github.com/lazydaisy/moodle into MOODLE_22_STABLE 2012-03-13 11:56:18 +13:00
Sam Hemelryk ec2b87aede Merge branch 'MDL-31702_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2012-03-13 10:33:39 +13:00
Eloy Lafuente (stronk7) 0b1579b2d8 Merge branch 'w11_MDL-31956_m22_paypal' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-03-12 21:37:01 +01:00
Michael Aherne 07f641f250 MDL-31979 Typo in config-dist.php 2012-03-12 20:18:47 +01:00
Eloy Lafuente (stronk7) 33d1075328 Merge branch 'w11_MDL-31595_m22_enrolme' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-03-12 18:01:01 +01:00
Petr Skoda 1b75985a39 MDL-31595 improve enrol link comments 2012-03-12 16:49:22 +01:00
Eloy Lafuente (stronk7) 3e6e265d1a Merge branch 'w11_MDL-31815_m22_confirmemail' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-03-12 16:34:13 +01:00
Eloy Lafuente (stronk7) 7fabd5af5c Merge branch 'w11_MDL-31534_m22_pageinitroot' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-03-12 15:49:30 +01:00
Petr Skoda c81e5bc9cc MDL-31534 init PAGE before require_login() 2012-03-12 13:59:08 +01:00
Eloy Lafuente (stronk7) 13cd1994af Merge branch 'w11_MDL-31494_m22_adodblink' of git://github.com/skodak/moodle into MOODLE_22_STABLE 2012-03-12 13:38:40 +01:00
Mary Evans 6ac047c7de MDL-30298 report_progress: adds outer wrapper with class no-overflow to report table so as to enable horizontal scroll bar 2012-03-12 10:45:55 +00:00
Jason Fowler f29d40dc03 MDL-27064 - Blog - Changing the link text for different levels of blog entries 2012-03-12 15:28:21 +08:00
Sam Hemelryk b3fe3fb6c8 Merge branch 'm22_MDL-31888' of git://github.com/danmarsden/moodle into MOODLE_22_STABLE
Conflicts:
	mod/scorm/styles.css
2012-03-12 17:29:11 +13:00
Sam Hemelryk 12d0b6c5ae MDL-27304 mod_wiki: Fixed up phpdocs for globals 2012-03-12 17:20:48 +13:00
Sam Hemelryk 25ff180756 Merge branch 'MDL-27304-22' of https://github.com/mackensen/moodle into MOODLE_22_STABLE 2012-03-12 17:05:21 +13:00
Sam Hemelryk cbb8087b30 Merge branch 'MDL-31664-22' of https://github.com/mackensen/moodle into MOODLE_22_STABLE 2012-03-12 17:02:07 +13:00
Rajesh Taneja 030f323fbb MDL-28972 formslib: orignalvalue is considered and checkboxes are updated depending on orignalvalue of controller 2012-03-12 11:51:08 +08:00
Rajesh Taneja 10fd3cd054 MDL-28972 formslib: Checkbox controller will use yui to select and unselect checkboxes 2012-03-12 11:51:01 +08:00
Sam Hemelryk 840dc3cb94 Merge branch 'MDL-28997-m22' of git://github.com/ankitagarwal/moodle into MOODLE_22_STABLE 2012-03-12 15:26:21 +13:00
Rajesh Taneja 495baea515 MDL-27862 Themes: Device name first letter is capital and font is made similar to theme name font 2012-03-12 10:19:03 +08:00
Rajesh Taneja 7f2d783fad MDL-27862 Themes: clear theme cache button will redirect to the page on which it was pressed 2012-03-12 10:19:03 +08:00
Rajesh Taneja 1b99f0565a MDL-27862 Themes: replaced disabled use theme button with unset theme button 2012-03-12 10:19:03 +08:00
Rajesh Taneja f5ee52a7fe MDL-27862 Themes: Added button to un-select theme for devices, except default device 2012-03-12 10:19:03 +08:00
Rajesh Taneja 06d09486b5 MDL-27862 Themes: Strings updated on theme selection pages 2012-03-12 10:19:03 +08:00
Rajesh Taneja 337e7897de MDL-30817 activity_completion: Fixed title and alt string (on checkbox) to have module name prefixed 2012-03-12 10:17:12 +08:00
Andrew Robert Nicols aacacde221 MDL-31811 Add/Correct checks on activity read-only periods 2012-03-12 15:15:38 +13:00
Andrew Robert Nicols 0c1e3a753b MDL-31877 Correct get_users exception 2012-03-12 14:57:21 +13:00
Andrew Robert Nicols 15958e8677 MDL-31918 Use cached module info for activity completion report 2012-03-12 14:55:13 +13:00
Dan Poltawski eb1f147000 MDL-29440 calendar: iCal export don't allow html in description export 2012-03-12 09:51:07 +08:00
Andrew Robert Nicols cfaa50a61d MDL-31923 Correctly respect hiddenfields and capabilities 2012-03-12 14:46:34 +13:00
Sam Hemelryk 7ac10ac609 Merge branch 'MDL-31841_feedback_align_22' of git://github.com/andyjdavis/moodle into MOODLE_22_STABLE 2012-03-12 14:22:10 +13:00
Sam Hemelryk 113b864ffc Merge branch 'wip-MDL-30906-MOODLE_22_STABLE' of git://github.com/abgreeve/moodle into MOODLE_22_STABLE 2012-03-12 14:19:50 +13:00
Sam Hemelryk 7303944957 MDL-31175 backup: Fixed undefined in register_dependency 2012-03-12 09:43:00 +13:00
Petr Skoda dd21fb11f0 MDL-31718 utf-8 support in shorten_text() 2012-03-11 21:32:07 +01:00
Mary Evans 10a6003a3a MDL-30298 report_completion: adds outer wrapper with class no-overflow to report table so as to enable horizontal scroll bar 2012-03-11 15:17:59 +00:00
Mary Evans ed4a909035 MDL-30298 theme_binarius: adds horizontal scroll to report layout 2012-03-11 01:34:09 +00:00
Petr Skoda 2bf4996444 MDL-31956 fix enrol string components
Credit goes to Mark Nelson
2012-03-10 13:01:53 +01:00
Petr Skoda 4e68456832 MDL-31494 fix link to adodb driver docs
target="_bank" is valid again in html5, it does help a lot here no matter what legacy accessibility guides say…
2012-03-10 11:05:31 +01:00
Petr Skoda caec0405f4 MDL-31815 encode dots in confirm url which helps email clients with url highlighting 2012-03-10 10:47:19 +01:00
Petr Skoda 181918691c MDL-27457 fix JS error on enrol when grade history disabled 2012-03-10 09:59:58 +01:00
Petr Skoda 45962a179c MDL-31595 do not show enrolee link to guest account 2012-03-10 09:41:31 +01:00
Petr Skoda 61df8b24d2 MDL-30636 switch to new TinyMCE 3.4.9 2012-03-10 08:57:24 +01:00
Petr Skoda 5b585b8ddf MDL-30636 add TinyMCE 3.4.9 2012-03-10 08:57:24 +01:00
Tim Hunt 0aa433a054 MDL-31981 shortanswer qtype does not handle \* in correct response. 2012-03-09 19:01:59 +00:00
Tim Hunt 53e40ebe2d MDL-31702 quiz: clarify error message that has been confusing people. 2012-03-09 15:29:19 +00:00
Rossiani Wijaya f822433322 MDL-30867 Lesson module: fix lesson essay question formtting to be consistent with user selection 2012-03-09 17:36:44 +08:00
Ankit Agarwal 44b4c10a47 MDL-28998 libraries: Adding validation to customisable profile fields during signup 2012-03-09 14:51:29 +08:00
Charles Fulton b1f60fe2f7 MDL-27304 wiki: link to user's course profile 2012-03-08 05:07:06 -08:00
Andrew Davis 9d75f3a0b9 MDL-31841 grade: prevented the feedback column on the user report from being centered 2012-03-08 15:24:19 +07:00
Dan Marsden cbf6a4989e MDL-31888 SCORM prevent scrollbars on yui div 2012-03-07 09:03:14 +13:00
Adrian Greeve 35d565ad8f MDL-30906 - course - Changed the <hx> tags to follow a sequential order 2012-03-06 14:54:49 +08:00
Charles Fulton a7bc85ea03 MDL-29848 glossary: get proper context for comments on exported entry 2012-03-02 07:48:42 -08:00
Charles Fulton 3bb16960af MDL-31664 fix invalid boolean to string comparison 2012-02-17 13:19:25 -08:00
631 changed files with 7140 additions and 3595 deletions
+7 -1
View File
@@ -76,7 +76,13 @@ if (!empty($options['engine'])) {
}
echo str_pad($table->name, 40). " - ";
$DB->change_database_structure("ALTER TABLE {$table->name} ENGINE = $engine");
try {
$DB->change_database_structure("ALTER TABLE {$table->name} ENGINE = $engine");
} catch (moodle_exception $e) {
echo $e->getMessage()."\n";
$skipped++;
continue;
}
echo "DONE\n";
$converted++;
}
+2 -2
View File
@@ -50,7 +50,7 @@ class mnet_simple_host_form extends moodleform {
$this->add_action_buttons(false, get_string('addhost', 'mnet'));
}
function validation($data) {
function validation($data, $files) {
global $DB;
$wwwroot = $data['wwwroot'];
@@ -154,7 +154,7 @@ class mnet_review_host_form extends moodleform {
$this->add_action_buttons(false);
}
function validation($data) {
function validation($data, $files) {
$errors = array();
if ($data['oldpublickey'] == $data['public_key']) {
return;
+11 -2
View File
@@ -39,6 +39,15 @@ class mnet_profile_form extends moodleform {
global $CFG;
$mform =& $this->_form;
$mnetprofileimportfields = '';
if (isset($CFG->mnetprofileimportfields)) {
$mnetprofileimportfields = str_replace(',', ', ', $CFG->mnetprofileimportfields);
}
$mnetprofileexportfields = '';
if (isset($CFG->mnetprofileexportfields)) {
$mnetprofileexportfields = str_replace(',', ', ', $CFG->mnetprofileexportfields);
}
$mform->addElement('hidden', 'hostid', $this->_customdata['hostid']);
$fields = mnet_profile_field_options();
@@ -49,7 +58,7 @@ class mnet_profile_form extends moodleform {
$select = $mform->addElement('select', 'importfields', get_string('importfields', 'mnet'), $fields['optional']);
$select->setMultiple(true);
$mform->addElement('checkbox', 'importdefault', get_string('leavedefault', 'mnet'), str_replace(',', ', ', $CFG->mnetprofileimportfields));
$mform->addElement('checkbox', 'importdefault', get_string('leavedefault', 'mnet'), $mnetprofileimportfields);
// Fields to export ----------------------------------------------------
$mform->addElement('header', 'export', get_string('exportfields', 'mnet'));
@@ -57,7 +66,7 @@ class mnet_profile_form extends moodleform {
$select = $mform->addElement('select', 'exportfields', get_string('exportfields', 'mnet'), $fields['optional']);
$select->setMultiple(true);
$mform->addElement('checkbox', 'exportdefault', get_string('leavedefault', 'mnet'), str_replace(',', ', ', $CFG->mnetprofileexportfields));
$mform->addElement('checkbox', 'exportdefault', get_string('leavedefault', 'mnet'), $mnetprofileexportfields);
$this->add_action_buttons();
}
+1 -1
View File
@@ -36,7 +36,7 @@ class mnet_services_form extends moodleform {
function definition() {
$mform =& $this->_form;
$mnet_peer =& $this->_customdata['peer'];
$myservices =& mnet_get_service_info($mnet_peer);
$myservices = mnet_get_service_info($mnet_peer);
$mform->addElement('hidden', 'hostid', $mnet_peer->id);
+3 -1
View File
@@ -50,8 +50,10 @@ if ($course) {
// security first
require_login($course, false, $cm);
$safeoverridesonly = false;
if (!has_capability('moodle/role:override', $context)) {
require_capability('moodle/role:safeoverride', $context);
$safeoverridesonly = true;
}
$PAGE->set_url($url);
$PAGE->set_context($context);
@@ -119,7 +121,7 @@ if (empty($overridableroles[$roleid])) {
}
// If we are actually overriding a role, create the table object, and save changes if appropriate.
$overridestable = new override_permissions_table_advanced($context, $roleid, false);
$overridestable = new override_permissions_table_advanced($context, $roleid, $safeoverridesonly);
$overridestable->read_submitted_permissions();
if (optional_param('savechanges', false, PARAM_BOOL) && confirm_sesskey()) {
+27 -3
View File
@@ -92,8 +92,29 @@ if ($hassiteconfig
// Add a category for backups
$ADMIN->add('courses', new admin_category('backups', get_string('backups','admin')));
// Create a page for general backup defaults
// Create a page for general backups configuration and defaults.
$temp = new admin_settingpage('backupgeneralsettings', get_string('generalbackdefaults', 'backup'), 'moodle/backup:backupcourse');
// General configuration section.
$temp->add(new admin_setting_configselect('backup/loglifetime', get_string('loglifetime', 'backup'), get_string('configloglifetime', 'backup'), 30, array(
1 => get_string('numdays', '', 1),
2 => get_string('numdays', '', 2),
3 => get_string('numdays', '', 3),
5 => get_string('numdays', '', 5),
7 => get_string('numdays', '', 7),
10 => get_string('numdays', '', 10),
14 => get_string('numdays', '', 14),
20 => get_string('numdays', '', 20),
30 => get_string('numdays', '', 30),
60 => get_string('numdays', '', 60),
90 => get_string('numdays', '', 90),
120 => get_string('numdays', '', 120),
180 => get_string('numdays', '', 180),
365 => get_string('numdays', '', 365)
)));
// General defaults section.
$temp->add(new admin_setting_heading('generalsettings', get_string('generalsettings', 'backup'), ''));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_users', get_string('generalusers','backup'), get_string('configgeneralusers','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_anonymize', get_string('generalanonymize','backup'), get_string('configgeneralanonymize','backup'), array('value'=>0, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_role_assignments', get_string('generalroleassignments','backup'), get_string('configgeneralroleassignments','backup'), array('value'=>1, 'locked'=>0)));
@@ -106,8 +127,10 @@ if ($hassiteconfig
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_histories', get_string('generalhistories','backup'), get_string('configgeneralhistories','backup'), array('value'=>0, 'locked'=>0)));
$ADMIN->add('backups', $temp);
/// "backups" settingpage
// Create a page for automated backups configuration and defaults.
$temp = new admin_settingpage('automated', get_string('automatedsetup','backup'), 'moodle/backup:backupcourse');
// Automated configuration section.
$temp->add(new admin_setting_configselect('backup/backup_auto_active', get_string('active'), get_string('autoactivedescription', 'backup'), 0, array(
0 => get_string('autoactivedisabled', 'backup'),
1 => get_string('autoactiveenabled', 'backup'),
@@ -138,8 +161,9 @@ if ($hassiteconfig
400 => '400',
500 => '500');
$temp->add(new admin_setting_configselect('backup/backup_auto_keep', get_string('keep'), get_string('backupkeephelp'), 1, $keepoptoins));
$temp->add(new admin_setting_configcheckbox('backup/backup_shortname', get_string('backup_shortname', 'admin'), get_string('backup_shortnamehelp', 'admin'), 0));
// Automated defaults section.
$temp->add(new admin_setting_heading('automatedsettings', get_string('automatedsettings','backup'), ''));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_users', get_string('generalusers', 'backup'), get_string('configgeneralusers', 'backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_role_assignments', get_string('generalroleassignments','backup'), get_string('configgeneralroleassignments','backup'), 1));
+7 -7
View File
@@ -477,6 +477,13 @@ foreach ($pages as $page) {
$ADMIN->add('reportplugins', $page);
}
/// Add all admin tools
if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('tools', get_string('tools', 'admin')));
$ADMIN->add('tools', new admin_externalpage('managetools', get_string('toolsmanage', 'admin'),
$CFG->wwwroot . '/' . $CFG->admin . '/tools.php'));
}
// Now add various admin tools
foreach (get_plugin_list('tool') as $plugin => $plugindir) {
$settings_path = "$plugindir/settings.php";
@@ -485,13 +492,6 @@ foreach (get_plugin_list('tool') as $plugin => $plugindir) {
}
}
/// Add all admin tools
if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('tools', get_string('tools', 'admin')));
$ADMIN->add('tools', new admin_externalpage('managetools', get_string('toolsmanage', 'admin'),
$CFG->wwwroot . '/' . $CFG->admin . '/tools.php'));
}
/// Add all local plugins - must be always last!
if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('localplugins', get_string('localplugins')));
+7 -1
View File
@@ -46,11 +46,17 @@ if (data_submitted() and $confirm and confirm_sesskey()) {
echo $OUTPUT->notification('Please be patient and wait for this to complete...', 'notifysuccess');
set_time_limit(0);
if ($tables = $DB->get_tables()) {
$DB->set_debug(true);
foreach ($tables as $table) {
$fulltable = $DB->get_prefix().$table;
$DB->change_database_structure("ALTER TABLE $fulltable ENGINE=INNODB");
try {
$DB->change_database_structure("ALTER TABLE $fulltable ENGINE=INNODB");
} catch (moodle_exception $e) {
echo $OUTPUT->notification(s($e->getMessage()).'<br />'.s($e->debuginfo));
}
}
$DB->set_debug(false);
}
+7 -1
View File
@@ -5,7 +5,7 @@ With a lot of question attempts, doing the whole conversion on upgrade is very
slow. The plugin can help with that in various ways.
1. It provies a report of how much data there is to upgrade.
1. It provides a report of how much data there is to upgrade.
2. It can extract test-cases from the database. This can help you report bugs
in the upgrade process to the developers.
@@ -35,3 +35,9 @@ subsequently been modified) so you can re-upgrade them. This may allow you to
recover from a buggy upgrade.
9. Finally, you can still use the extract test-cases script to help report bugs.
Manual upgrades can be processed via the web interface or the command line tool
cliupgrade.php. To run cliupgrade.php, use a command similar to:
sudo -u www-data /usr/bin/php admin/tool/qeupgradehelper/cli/convert.php -h
The -h flag will show the options for running the tool.
+129
View File
@@ -0,0 +1,129 @@
<?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/>.
/**
* Script to allow upgrading of quizzes with attempts that were previously
* skipped.
*
* @package tool_qeupgradehelper
* @copyright 2012 Eric Merrill, Oakland Unversity
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require_once(dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/config.php');
require_once(dirname(dirname(__FILE__)) . '/locallib.php');
require_once(dirname(dirname(__FILE__)) . '/lib.php');
require_once($CFG->libdir.'/clilib.php'); // CLI only functions.
// Now get cli options.
list($options, $unrecognized) = cli_get_params(array('quiz'=>false, 'timelimit'=>false, 'countlimit'=>false, 'help'=>false),
array('c'=>'countlimit', 't'=>'timelimit', 'h'=>'help'));
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
if ($options['help']) {
$help =
"Question engine upgrade helper CLI tool.
Will upgrade all remaining question attempts if no options are specified.
Options:
-c, --countlimit=<n> Process n number of quizzes then exit
-t, --timelimit=<n> Process quizzes for n number of seconds, then exit. A quiz
currently in progress will not be interrupted.
--quiz=<quizid> Process quiz quizid only
-h, --help Print out this help
countlimit and timelimit can be used together. First one to trigger will stop execution.
Example:
\$sudo -u www-data /usr/bin/php admin/tool/qeupgradehelper/cliupgrade.php
";
echo $help;
die;
}
if (!tool_qeupgradehelper_is_upgraded()) {
mtrace('qeupgradehelper: site not yet upgraded. Doing nothing.');
return;
}
require_once(dirname(dirname(__FILE__)) . '/afterupgradelib.php');
$starttime = time();
// Setup the stop time.
if ($options['timelimit']) {
$stoptime = time() + $options['timelimit'];
} else {
$stoptime = false;
}
// If we are doing a quiz id, limit to one.
if ($options['quiz']) {
$options['countlimit'] = 1;
}
$count = 0;
mtrace('qeupgradehelper: processing ...');
/* This while statement does a few things
* Basically if an option is set to false, then that subsection will return
* true, and will short circuit the test condition for that option, and always
* being true. Both options are anded together, so either one can trigger to stop.
*/
while ((!$stoptime || (time() < $stoptime)) && (!$options['countlimit'] || ($count < $options['countlimit']))) {
if ($options['quiz']) {
$quizid = $options['quiz'];
} else {
$quiz = tool_qeupgradehelper_get_quiz_for_upgrade();
if (!$quiz) {
mtrace('qeupgradehelper: No more quizzes to process.');
break; // No more to do.
}
$quizid = $quiz->id;
}
$quizsummary = tool_qeupgradehelper_get_quiz($quizid);
if ($quizsummary) {
mtrace(' starting upgrade of attempts at quiz ' . $quizid);
$upgrader = new tool_qeupgradehelper_attempt_upgrader(
$quizsummary->id, $quizsummary->numtoconvert);
$upgrader->convert_all_quiz_attempts();
mtrace(' upgrade of quiz ' . $quizid . ' complete.');
} else {
mtrace('quiz ' . $quizid . ' not found or already upgraded.');
}
$count++;
}
mtrace('qeupgradehelper: Done. Processed '.$count.' quizes in '.(time()-$starttime).' seconds');
return;
@@ -48,16 +48,16 @@ $string['gotoindex'] = 'Back to the list of quizzes that can be upgraded';
$string['gotoquizreport'] = 'Go to the reports for this quiz, to check the upgrade';
$string['gotoresetlink'] = 'Go to the list of quizzes that can be reset';
$string['includedintheupgrade'] = 'Included in the upgrade?';
$string['invalidquizid'] = 'Invaid quiz id. Either the quiz does not exist, or it has no attempts to convert.';
$string['invalidquizid'] = 'Invalid quiz id. Either the quiz does not exist, or it has no attempts to convert.';
$string['listpreupgrade'] = 'List quizzes and attempts';
$string['listpreupgrade_desc'] = 'This will show a report of all the quizzes on the system and how many attempts they have. This will give you an idea of the scope of the upgrade you have to do.';
$string['listpreupgradeintro'] = 'These are the number of quiz attempts that will need to be processed when you upgrade your site. A few tens of thousands is no worry. Much beyond that and you need to think about how long the upgrade will take.';
$string['listtodo'] = 'List quizzes still to upgrade';
$string['listtodo_desc'] = 'This will show a report of all the quizzes on the system (if any) that have attempts that still need to be upgraded to the new question engine.';
$string['listtodointro'] = 'These are all the quizzes with attempt data that still needs to be converted. You can convert the attempts by clicking the link.';
$string['listupgraded'] = 'List already upgrade quizzes that can be reset';
$string['listupgraded'] = 'List already upgraded quizzes that can be reset';
$string['listupgraded_desc'] = 'This will show a report of all the quizzes on the system whose attempts have been upgraded, and where the old data is still present so the upgrade could be reset and redone.';
$string['listupgradedintro'] = 'These are all the quizzes that have attempts that were upgraded, and where the old attempt data is so there, so they could be reset, and the upgrade re-done.';
$string['listupgradedintro'] = 'These are all the quizzes that have attempts that were upgraded, and where the old attempt data is still there, so they could be reset, and the upgrade re-done.';
$string['noquizattempts'] = 'Your site does not have any quiz attempts at all!';
$string['nothingupgradedyet'] = 'No upgraded attempts that can be reset';
$string['notupgradedsiterequired'] = 'This script can only work before the site has been upgraded.';
@@ -80,4 +80,4 @@ $string['resettingquizattemptsprogress'] = 'Resetting attempt {$a->done} / {$a->
$string['upgradingquizattempts'] = 'Upgrading the attempts for quiz \'{$a->name}\' in course {$a->shortname}';
$string['upgradedsitedetected'] = 'This appears to be a site that has been upgraded to include the new question engine.';
$string['upgradedsiterequired'] = 'This script can only work after the site has been upgraded.';
$string['veryoldattemtps'] = 'Your site has {$a} quiz attempts that were never completely updated during the upgrade from Moodle 1.4 to Moodle 1.5. These attempts will be dealt wiht before the main upgrade. You need to to consider the extra time required for this.';
$string['veryoldattemtps'] = 'Your site has {$a} quiz attempts that were never completely updated during the upgrade from Moodle 1.4 to Moodle 1.5. These attempts will be dealt with before the main upgrade. You need to to consider the extra time required for this.';
+1 -1
View File
@@ -669,5 +669,5 @@ function tool_qeupgradehelper_get_quiz_for_upgrade() {
JOIN {course} c ON c.id = quiz.course
WHERE quiza.preview = 0 AND quiza.needsupgradetonewqe = 1
GROUP BY quiz.id, quiz.name, c.shortname, c.id
ORDER BY quiza.timemodified DESC", array(), IGNORE_MULTIPLE);
ORDER BY MAX(quiza.timemodified) DESC", array(), IGNORE_MULTIPLE);
}
@@ -23,7 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['configintrotimezones'] = 'This page will search for new information about world timezones (including daylight savings time rules) and update your local database with this information. These locations will be checked, in order: {$a} This procedure is generally very safe and can not break normal installations. Do you wish to update your timezones now?';
$string['configintrotimezones'] = 'This page will search for new information about world timezones (including daylight savings time rules) and update your local database with this information. These locations will be checked, in order: {$a} Do you wish to update your timezones now?';
$string['importtimezones'] = 'Update complete list of timezones';
$string['importtimezonescount'] = '{$a->count} entries imported from {$a->source}';
$string['importtimezonesfailed'] = 'No sources found! (Bad news)';
+2 -1
View File
@@ -63,6 +63,7 @@ class external_service_form extends moodleform {
$mform->addElement('text', 'name', get_string('name'));
$mform->addRule('name', get_string('required'), 'required', null, 'client');
$mform->setType('name', PARAM_TEXT);
$mform->addElement('advcheckbox', 'enabled', get_string('enabled', 'webservice'));
$mform->addElement('advcheckbox', 'restrictedusers',
get_string('restrictedusers', 'webservice'));
@@ -112,7 +113,7 @@ class external_service_form extends moodleform {
$mform->setType('id', PARAM_INT);
if (!empty($service->id)) {
$buttonlabel = get_string('editaservice', 'webservice');
$buttonlabel = get_string('savechanges');
} else {
$buttonlabel = get_string('addaservice', 'webservice');
}
+1 -1
View File
@@ -36,7 +36,7 @@ $confirm = optional_param('confirm', 0, PARAM_BOOL);
admin_externalpage_setup('externalservicefunctions');
//define nav bar
$PAGE->set_url('/' . $CFG->admin . '/websevice/service_functions.php', array('id' => $serviceid));
$PAGE->set_url('/' . $CFG->admin . '/webservice/service_functions.php', array('id' => $serviceid));
$node = $PAGE->settingsnav->find('externalservices', navigation_node::TYPE_SETTING);
if ($node) {
$node->make_active();
+2 -2
View File
@@ -1,11 +1,11 @@
<div class="loginbox clearfix">
<div class="loginpanel">
<div>
<a href="<?php echo $CFG->wwwroot.'/login/index.php?authCAS=CAS';?>"><?php print_string('accesCAS', 'auth_cas');?></a>
<a href="<?php echo get_login_url() . '?authCAS=CAS';?>"><?php print_string('accesCAS', 'auth_cas');?></a>
</div>
<br/>
<div>
<a href="<?php echo $CFG->wwwroot.'/login/index.php?authCAS=NOCAS';?>"><?php print_string('accesNOCAS', 'auth_cas');?></a>
<a href="<?php echo get_login_url() . '?authCAS=NOCAS';?>"><?php print_string('accesNOCAS', 'auth_cas');?></a>
</div>
</div>
</div>
+8 -8
View File
@@ -30,8 +30,8 @@ $string['auth_cas_baseuri'] = 'URI of the server (nothing if no baseUri)<br />Fo
$string['auth_cas_baseuri_key'] = 'Base URI';
$string['auth_cas_broken_password'] = 'You cannot proceed without changing your password, however there is no available page for changing it. Please contact your Moodle Administrator.';
$string['auth_cas_cantconnect'] = 'LDAP part of CAS-module cannot connect to server: {$a}';
$string['auth_cas_casversion'] = 'Version';
$string['auth_cas_certificate_check'] = 'Turn this to \'yes\' if you want to validate the server certificate';
$string['auth_cas_casversion'] = 'CAS protocol version';
$string['auth_cas_certificate_check'] = 'Select \'yes\' if you want to validate the server certificate';
$string['auth_cas_certificate_path_empty'] = 'If you turn on Server validation, you need to specify a certificate path';
$string['auth_cas_certificate_check_key'] = 'Server validation';
$string['auth_cas_certificate_path'] = 'Path of the CA chain file (PEM Format) to validate the server certificate';
@@ -44,22 +44,22 @@ $string['auth_cas_hostname'] = 'Hostname of the CAS server <br />eg: host.domain
$string['auth_cas_hostname_key'] = 'Hostname';
$string['auth_cas_changepasswordurl'] = 'Password-change URL';
$string['auth_cas_invalidcaslogin'] = 'Sorry, your login has failed - you could not be authorised';
$string['auth_cas_language'] = 'Selected language';
$string['auth_cas_language'] = 'Select language for authentication pages';
$string['auth_cas_language_key'] = 'Language';
$string['auth_cas_logincas'] = 'Secure connection access';
$string['auth_cas_logoutcas'] = 'Turn this to \'yes\' if you want to logout from CAS when you disconnect from Moodle';
$string['auth_cas_logoutcas_key'] = 'Logout CAS';
$string['auth_cas_multiauth'] = 'Turn this to \'yes\' if you want to have multi-authentication (CAS + other authentication)';
$string['auth_cas_logoutcas'] = 'Select \'yes\' if you want to logout from CAS when you disconnect from Moodle';
$string['auth_cas_logoutcas_key'] = 'CAS logout option';
$string['auth_cas_multiauth'] = 'Select \'yes\' if you want to have multi-authentication (CAS + other authentication)';
$string['auth_cas_multiauth_key'] = 'Multi-authentication';
$string['auth_casnotinstalled'] = 'Cannot use CAS authentication. The PHP LDAP module is not installed.';
$string['auth_cas_port'] = 'Port of the CAS server';
$string['auth_cas_port_key'] = 'Port';
$string['auth_cas_proxycas'] = 'Turn this to \'yes\' if you use CASin proxy-mode';
$string['auth_cas_proxycas'] = 'Select \'yes\' if you use CAS in proxy-mode';
$string['auth_cas_proxycas_key'] = 'Proxy mode';
$string['auth_cas_server_settings'] = 'CAS server configuration';
$string['auth_cas_text'] = 'Secure connection';
$string['auth_cas_use_cas'] = 'Use CAS';
$string['auth_cas_version'] = 'Version of CAS';
$string['auth_cas_version'] = 'CAS protocol version to use';
$string['CASform'] = 'Authentication choice';
$string['noldapserver'] = 'No LDAP server configured for CAS! Syncing disabled.';
$string['pluginname'] = 'CAS server (SSO)';
+1 -1
View File
@@ -57,7 +57,7 @@ $string['auth_dbsybasequoting'] = 'Use sybase quotes';
$string['auth_dbsybasequotinghelp'] = 'Sybase style single quote escaping - needed for Oracle, MS SQL and some other databases. Do not use for MySQL!';
$string['auth_dbtable'] = 'Name of the table in the database';
$string['auth_dbtable_key'] = 'Table';
$string['auth_dbtype'] = 'The database type (See the <a href="../lib/adodb/readme.htm#drivers">ADOdb documentation</a> for details)';
$string['auth_dbtype'] = 'The database type (See the <a href="http://phplens.com/adodb/supported.databases.html" target="_blank">ADOdb documentation</a> for details)';
$string['auth_dbtype_key'] = 'Database';
$string['auth_dbupdatinguser'] = 'Updating user {$a->name} id {$a->id}';
$string['auth_dbuser'] = 'Username with read access to the database';
+21 -8
View File
@@ -170,17 +170,22 @@ class backup_controller extends backup implements loggable {
}
public function set_status($status) {
$this->log('setting controller status to', backup::LOG_DEBUG, $status);
// TODO: Check it's a correct status
$this->status = $status;
// Ensure that, once set to backup::STATUS_AWAITING, controller is stored in DB
// Note: never save_controller() after STATUS_EXECUTING or the whole controller,
// Note: never save_controller() with the object info after STATUS_EXECUTING or the whole controller,
// containing all the steps will be sent to DB. 100% (monster) useless.
$this->log('setting controller status to', backup::LOG_DEBUG, $status);
// TODO: Check it's a correct status.
$this->status = $status;
// Ensure that, once set to backup::STATUS_AWAITING, controller is stored in DB.
if ($status == backup::STATUS_AWAITING) {
$this->save_controller();
$tbc = self::load_controller($this->backupid);
$this->logger = $tbc->logger; // wakeup loggers
$tbc->destroy(); // Clean temp controller structures
} else if ($status == backup::STATUS_FINISHED_OK) {
// If the operation has ended without error (backup::STATUS_FINISHED_OK)
// proceed by cleaning the object from database. MDL-29262.
$this->save_controller(false, true);
}
}
@@ -312,12 +317,20 @@ class backup_controller extends backup implements loggable {
backup_helper::log($message, $level, $a, $depth, $display, $this->logger);
}
public function save_controller() {
/**
* Save controller information
*
* @param bool $includeobj to decide if the object itself must be updated (true) or no (false)
* @param bool $cleanobj to decide if the object itself must be cleaned (true) or no (false)
*/
public function save_controller($includeobj = true, $cleanobj = false) {
// Going to save controller to persistent storage, calculate checksum for later checks and save it
// TODO: flag the controller as NA. Any operation on it should be forbidden util loaded back
$this->log('saving controller to db', backup::LOG_DEBUG);
$this->checksum = $this->calculate_checksum();
backup_controller_dbops::save_controller($this, $this->checksum);
if ($includeobj ) { // Only calculate checksum if we are going to include the object.
$this->checksum = $this->calculate_checksum();
}
backup_controller_dbops::save_controller($this, $this->checksum, $includeobj, $cleanobj);
}
public static function load_controller($backupid) {
+21 -8
View File
@@ -166,17 +166,22 @@ class restore_controller extends backup implements loggable {
}
public function set_status($status) {
$this->log('setting controller status to', backup::LOG_DEBUG, $status);
// TODO: Check it's a correct status
$this->status = $status;
// Ensure that, once set to backup::STATUS_AWAITING | STATUS_NEED_PRECHECK, controller is stored in DB
// Note: never save_controller() after STATUS_EXECUTING or the whole controller,
// Note: never save_controller() with the object info after STATUS_EXECUTING or the whole controller,
// containing all the steps will be sent to DB. 100% (monster) useless.
$this->log('setting controller status to', backup::LOG_DEBUG, $status);
// TODO: Check it's a correct status.
$this->status = $status;
// Ensure that, once set to backup::STATUS_AWAITING | STATUS_NEED_PRECHECK, controller is stored in DB.
if ($status == backup::STATUS_AWAITING || $status == backup::STATUS_NEED_PRECHECK) {
$this->save_controller();
$tbc = self::load_controller($this->restoreid);
$this->logger = $tbc->logger; // wakeup loggers
$tbc->destroy(); // Clean temp controller structures
} else if ($status == backup::STATUS_FINISHED_OK) {
// If the operation has ended without error (backup::STATUS_FINISHED_OK)
// proceed by cleaning the object from database. MDL-29262.
$this->save_controller(false, true);
}
}
@@ -363,12 +368,20 @@ class restore_controller extends backup implements loggable {
backup_helper::log($message, $level, $a, $depth, $display, $this->logger);
}
public function save_controller() {
/**
* Save controller information
*
* @param bool $includeobj to decide if the object itself must be updated (true) or no (false)
* @param bool $cleanobj to decide if the object itself must be cleaned (true) or no (false)
*/
public function save_controller($includeobj = true, $cleanobj = false) {
// Going to save controller to persistent storage, calculate checksum for later checks and save it
// TODO: flag the controller as NA. Any operation on it should be forbidden util loaded back
$this->log('saving controller to db', backup::LOG_DEBUG);
$this->checksum = $this->calculate_checksum();
restore_controller_dbops::save_controller($this, $this->checksum);
if ($includeobj ) { // Only calculate checksum if we are going to include the object.
$this->checksum = $this->calculate_checksum();
}
restore_controller_dbops::save_controller($this, $this->checksum, $includeobj, $cleanobj);
}
public static function load_controller($restoreid) {
@@ -161,7 +161,7 @@ class backup_controller_test extends UnitTestCase {
*/
class mock_backup_controller extends backup_controller {
public function save_controller() {
parent::save_controller();
public function save_controller($includeobj = true, $cleanobj = false) {
parent::save_controller($includeobj, $cleanobj);
}
}
@@ -142,6 +142,11 @@ abstract class backup_activity_task extends backup_task {
$this->add_step(new backup_activity_logs_structure_step('activity_logs', 'logs.xml'));
}
// Generate the calendar events file (conditionally)
if ($this->get_setting_value('calendarevents')) {
$this->add_step(new backup_calendarevents_structure_step('activity_calendar', 'calendar.xml'));
}
// Fetch all the activity grade items and put them to backup_ids
$this->add_step(new backup_activity_grade_items_to_ids('fetch_activity_grade_items'));
@@ -103,6 +103,11 @@ class backup_course_task extends backup_task {
$this->add_step(new backup_comments_structure_step('course_comments', 'comments.xml'));
}
// Generate the calender events file (conditionally)
if ($this->get_setting_value('calendarevents')) {
$this->add_step(new backup_calendarevents_structure_step('course_calendar', 'calendar.xml'));
}
// Generate the logs file (conditionally)
if ($this->get_setting_value('logs')) {
$this->add_step(new backup_course_logs_structure_step('course_logs', 'logs.xml'));
@@ -114,6 +114,12 @@ class backup_root_task extends backup_task {
$this->add_setting($comments);
$users->add_dependency($comments);
// Define calendar events (dependent of users)
$events = new backup_calendarevents_setting('calendarevents', base_setting::IS_BOOLEAN, true);
$events->set_ui(new backup_setting_ui_checkbox($events, get_string('rootsettingcalendarevents', 'backup')));
$this->add_setting($events);
$users->add_dependency($events);
// Define completion (dependent of users)
$completion = new backup_userscompletion_setting('userscompletion', base_setting::IS_BOOLEAN, true);
$completion->set_ui(new backup_setting_ui_checkbox($completion, get_string('rootsettinguserscompletion', 'backup')));
+7
View File
@@ -89,6 +89,13 @@ class backup_logs_setting extends backup_anonymize_setting {}
*/
class backup_comments_setting extends backup_anonymize_setting {}
/**
* root setting to control if backup will include
* calender events or no (any level), depends of @backup_users_setting
* exactly in the same way than @backup_anonymize_setting so we extend from it
*/
class backup_calendarevents_setting extends backup_anonymize_setting {}
/**
* root setting to control if backup will include
* users completion data or no (any level), depends of @backup_users_setting
+42
View File
@@ -767,6 +767,48 @@ class backup_comments_structure_step extends backup_structure_step {
}
}
/**
* structure step in charge of constructing the calender.xml file for all the events found
* in a given context
*/
class backup_calendarevents_structure_step extends backup_structure_step {
protected function define_structure() {
// Define each element separated
$events = new backup_nested_element('events');
$event = new backup_nested_element('event', array('id'), array(
'name', 'description', 'format', 'courseid', 'groupid', 'userid',
'repeatid', 'modulename', 'instance', 'eventtype', 'timestart',
'timeduration', 'visible', 'uuid', 'sequence', 'timemodified'));
// Build the tree
$events->add_child($event);
// Define sources
if ($this->name == 'course_calendar') {
$calendar_items_sql ="SELECT * FROM {event}
WHERE courseid = :courseid
AND (eventtype = 'course' OR eventtype = 'group')";
$calendar_items_params = array('courseid'=>backup::VAR_COURSEID);
$event->set_source_sql($calendar_items_sql, $calendar_items_params);
} else {
$event->set_source_table('event', array('courseid' => backup::VAR_COURSEID, 'instance' => backup::VAR_ACTIVITYID, 'modulename' => backup::VAR_MODNAME));
}
// Define id annotations
$event->annotate_ids('user', 'userid');
$event->annotate_ids('group', 'groupid');
$event->annotate_files('calendar', 'event_description', 'id');
// Return the root element (events)
return $events;
}
}
/**
* structure step in charge of constructing the gradebook.xml file for all the gradebook config in the course
* NOTE: the backup of the grade items themselves is handled by backup_activity_grades_structure_step
@@ -147,6 +147,11 @@ abstract class restore_activity_task extends restore_task {
$this->add_step(new restore_comments_structure_step('activity_comments', 'comments.xml'));
}
// Calendar events (conditionally)
if ($this->get_setting_value('calendarevents')) {
$this->add_step(new restore_calendarevents_structure_step('activity_calendar', 'calendar.xml'));
}
// Grades (module-related, rest of gradebook is restored later if possible: cats, calculations...)
$this->add_step(new restore_activity_grades_structure_step('activity_grades', 'grades.xml'));
@@ -84,6 +84,11 @@ class restore_course_task extends restore_task {
$this->add_step(new restore_comments_structure_step('course_comments', 'comments.xml'));
}
// Calendar events (conditionally)
if ($this->get_setting_value('calendarevents')) {
$this->add_step(new restore_calendarevents_structure_step('course_calendar', 'calendar.xml'));
}
// At the end, mark it as built
$this->built = true;
}
+5 -2
View File
@@ -55,8 +55,11 @@ class restore_final_task extends restore_task {
$this->add_step(new restore_gradebook_structure_step('gradebook_step','gradebook.xml'));
}
// Course completion
$this->add_step(new restore_course_completion_structure_step('course_completion', 'completion.xml'));
// Course completion, executed conditionally if restoring to new course
if ($this->get_target() !== backup::TARGET_CURRENT_ADDING &&
$this->get_target() !== backup::TARGET_EXISTING_ADDING) {
$this->add_step(new restore_course_completion_structure_step('course_completion', 'completion.xml'));
}
// Review all the module_availability records in backup_ids in order
// to match them with existing modules / grade items.
@@ -170,6 +170,19 @@ class restore_root_task extends restore_task {
$this->add_setting($comments);
$users->add_dependency($comments);
// Define Calendar events (dependent of users)
$defaultvalue = false; // Safer default
$changeable = false;
if (isset($rootsettings['calendarevents']) && $rootsettings['calendarevents']) { // Only enabled when available
$defaultvalue = true;
$changeable = true;
}
$events = new restore_calendarevents_setting('calendarevents', base_setting::IS_BOOLEAN, $defaultvalue);
$events->set_ui(new backup_setting_ui_checkbox($events, get_string('rootsettingcalendarevents', 'backup')));
$events->get_ui()->set_changeable($changeable);
$this->add_setting($events);
$users->add_dependency($events);
// Define completion (dependent of users)
$defaultvalue = false; // Safer default
$changeable = false;
+7
View File
@@ -58,6 +58,13 @@ class restore_activities_setting extends restore_generic_setting {}
*/
class restore_comments_setting extends restore_role_assignments_setting {}
/**
* root setting to control if restore will create
* events or no, depends of @restore_users_setting
* exactly in the same way than @restore_role_assignments_setting so we extend from it
*/
class restore_calendarevents_setting extends restore_role_assignments_setting {}
/**
* root setting to control if restore will create
* completion info or no, depends of @restore_users_setting
+70
View File
@@ -1566,6 +1566,76 @@ class restore_comments_structure_step extends restore_structure_step {
}
}
/**
* This structure steps restores the calendar events
*/
class restore_calendarevents_structure_step extends restore_structure_step {
protected function define_structure() {
$paths = array();
$paths[] = new restore_path_element('calendarevents', '/events/event');
return $paths;
}
public function process_calendarevents($data) {
global $DB;
$data = (object)$data;
$oldid = $data->id;
$restorefiles = true; // We'll restore the files
// Find the userid and the groupid associated with the event. Return if not found.
$data->userid = $this->get_mappingid('user', $data->userid);
if ($data->userid === false) {
return;
}
if (!empty($data->groupid)) {
$data->groupid = $this->get_mappingid('group', $data->groupid);
if ($data->groupid === false) {
return;
}
}
$params = array(
'name' => $data->name,
'description' => $data->description,
'format' => $data->format,
'courseid' => $this->get_courseid(),
'groupid' => $data->groupid,
'userid' => $data->userid,
'repeatid' => $data->repeatid,
'modulename' => $data->modulename,
'eventtype' => $data->eventtype,
'timestart' => $this->apply_date_offset($data->timestart),
'timeduration' => $data->timeduration,
'visible' => $data->visible,
'uuid' => $data->uuid,
'sequence' => $data->sequence,
'timemodified' => $this->apply_date_offset($data->timemodified));
if ($this->name == 'activity_calendar') {
$params['instance'] = $this->task->get_activityid();
} else {
$params['instance'] = 0;
}
$sql = 'SELECT id FROM {event} WHERE name = ? AND courseid = ? AND
repeatid = ? AND modulename = ? AND timestart = ? AND timeduration =?
AND ' . $DB->sql_compare_text('description', 255) . ' = ' . $DB->sql_compare_text('?', 255);
$arg = array ($params['name'], $params['courseid'], $params['repeatid'], $params['modulename'], $params['timestart'], $params['timeduration'], $params['description']);
$result = $DB->record_exists_sql($sql, $arg);
if (empty($result)) {
$newitemid = $DB->insert_record('event', $params);
$this->set_mapping('event_description', $oldid, $newitemid, $restorefiles);
}
}
protected function after_execute() {
// Add related files
$this->add_related_files('calendar', 'event_description', 'event_description');
}
}
class restore_course_completion_structure_step extends restore_structure_step {
/**
+13 -6
View File
@@ -168,9 +168,9 @@ abstract class backup_check {
$hasusercap = has_capability('moodle/backup:userinfo', $coursectx, $userid);
// If setting is enabled but user lacks permission
if (!$hasusercap && $prevvalue) { // If user has not the capability and setting is enabled
if (!$hasusercap) { // If user has not the capability
// Now analyse if we are allowed to apply changes or must stop with exception
if (!$apply) { // Cannot apply changes, throw exception
if (!$apply && $prevvalue) { // Cannot apply changes and the value is set, throw exception
$a = new stdclass();
$a->setting = 'users';
$a->value = $prevvalue;
@@ -178,7 +178,12 @@ abstract class backup_check {
throw new backup_controller_exception('backup_setting_value_wrong_for_capability', $a);
} else { // Can apply changes
$userssetting->set_value(false); // Set the value to false
// If it is already false, we don't want to try and set it again, because if it is
// already locked, and exception will occur. The side benifit is if it is true and locked
// we will get an exception...
if ($prevvalue) {
$userssetting->set_value(false); // Set the value to false
}
$userssetting->set_status(base_setting::LOCKED_BY_PERMISSION);// Set the status to locked by perm
}
}
@@ -191,9 +196,9 @@ abstract class backup_check {
$hasanoncap = has_capability('moodle/backup:anonymise', $coursectx, $userid);
// If setting is enabled but user lacks permission
if (!$hasanoncap && $prevvalue) { // If user has not the capability and setting is enabled
if (!$hasanoncap) { // If user has not the capability
// Now analyse if we are allowed to apply changes or must stop with exception
if (!$apply) { // Cannot apply changes, throw exception
if (!$apply && $prevvalue) { // Cannot apply changes and the value is set, throw exception
$a = new stdclass();
$a->setting = 'anonymize';
$a->value = $prevvalue;
@@ -201,7 +206,9 @@ abstract class backup_check {
throw new backup_controller_exception('backup_setting_value_wrong_for_capability', $a);
} else { // Can apply changes
$anonsetting->set_value(false); // Set the value to false
if ($prevvalue) { // If we try and set it back to false and it has already been locked, error will occur
$anonsetting->set_value(false); // Set the value to false
}
$anonsetting->set_status(base_setting::LOCKED_BY_PERMISSION);// Set the status to locked by perm
}
}
@@ -32,16 +32,30 @@
*/
abstract class backup_controller_dbops extends backup_dbops {
public static function save_controller($controller, $checksum) {
/**
* Send one backup controller to DB
*
* @param backup_controller $controller controller to send to DB
* @param string $checksum hash of the controller to be checked
* @param bool $includeobj to decide if the object itself must be updated (true) or no (false)
* @param bool $cleanobj to decide if the object itself must be cleaned (true) or no (false)
* @return int id of the controller record in the DB
* @throws backup_controller_exception|backup_dbops_exception
*/
public static function save_controller($controller, $checksum, $includeobj = true, $cleanobj = false) {
global $DB;
// Check we are going to save one backup_controller
if (! $controller instanceof backup_controller) {
throw new backup_controller_exception('backup_controller_expected');
}
// Check checksum is ok. Sounds silly but it isn't ;-)
if (!$controller->is_checksum_correct($checksum)) {
// Check checksum is ok. Only if we are including object info. Sounds silly but it isn't ;-).
if ($includeobj and !$controller->is_checksum_correct($checksum)) {
throw new backup_dbops_exception('backup_controller_dbops_saving_checksum_mismatch');
}
// Cannot request to $includeobj and $cleanobj at the same time.
if ($includeobj and $cleanobj) {
throw new backup_dbops_exception('backup_controller_dbops_saving_cannot_include_and_delete');
}
// Get all the columns
$rec = new stdclass();
$rec->backupid = $controller->get_backupid();
@@ -57,7 +71,11 @@ abstract class backup_controller_dbops extends backup_dbops {
$rec->executiontime= $controller->get_executiontime();
$rec->checksum = $checksum;
// Serialize information
$rec->controller = base64_encode(serialize($controller));
if ($includeobj) {
$rec->controller = base64_encode(serialize($controller));
} else if ($cleanobj) {
$rec->controller = '';
}
// Send it to DB
if ($recexists = $DB->get_record('backup_controllers', array('backupid' => $rec->backupid))) {
$rec->id = $recexists->id;
@@ -32,16 +32,30 @@
*/
abstract class restore_controller_dbops extends restore_dbops {
public static function save_controller($controller, $checksum) {
/**
* Send one restore controller to DB
*
* @param restore_controller $controller controller to send to DB
* @param string $checksum hash of the controller to be checked
* @param bool $includeobj to decide if the object itself must be updated (true) or no (false)
* @param bool $cleanobj to decide if the object itself must be cleaned (true) or no (false)
* @return int id of the controller record in the DB
* @throws backup_controller_exception|restore_dbops_exception
*/
public static function save_controller($controller, $checksum, $includeobj = true, $cleanobj = false) {
global $DB;
// Check we are going to save one backup_controller
if (! $controller instanceof restore_controller) {
throw new backup_controller_exception('restore_controller_expected');
}
// Check checksum is ok. Sounds silly but it isn't ;-)
if (!$controller->is_checksum_correct($checksum)) {
// Check checksum is ok. Only if we are including object info. Sounds silly but it isn't ;-).
if ($includeobj and !$controller->is_checksum_correct($checksum)) {
throw new restore_dbops_exception('restore_controller_dbops_saving_checksum_mismatch');
}
// Cannot request to $includeobj and $cleanobj at the same time.
if ($includeobj and $cleanobj) {
throw new restore_dbops_exception('restore_controller_dbops_saving_cannot_include_and_delete');
}
// Get all the columns
$rec = new stdclass();
$rec->backupid = $controller->get_restoreid();
@@ -57,7 +71,11 @@ abstract class restore_controller_dbops extends restore_dbops {
$rec->executiontime= $controller->get_executiontime();
$rec->checksum = $checksum;
// Serialize information
$rec->controller = base64_encode(serialize($controller));
if ($includeobj) {
$rec->controller = base64_encode(serialize($controller));
} else if ($cleanobj) {
$rec->controller = '';
}
// Send it to DB
if ($recexists = $DB->get_record('backup_controllers', array('backupid' => $rec->backupid))) {
$rec->id = $recexists->id;
@@ -356,7 +356,7 @@ abstract class backup_cron_automated_helper {
$dir = null;
}
if (!empty($dir) && $storage !== 0) {
$filename = backup_plan_dbops::get_default_backup_filename($format, $type, $course->id, $users, $anonymised, true);
$filename = backup_plan_dbops::get_default_backup_filename($format, $type, $course->id, $users, $anonymised, !$config->backup_shortname);
$outcome = $file->copy_content_to($dir.'/'.$filename);
if ($outcome && $storage === 1) {
$file->delete();
+1 -1
View File
@@ -294,7 +294,7 @@ abstract class base_setting {
if ($this->is_circular_reference($dependency->get_dependent_setting())) {
$a = new stdclass();
$a->alreadydependent = $this->name;
$a->main = $dependentsetting->get_name();
$a->main = $dependency->get_dependent_setting()->get_name();
throw new base_setting_exception('setting_circular_reference', $a);
}
$this->dependencies[$dependency->get_dependent_setting()->get_name()] = $dependency;
@@ -32,10 +32,12 @@ require_once($CFG->dirroot . '/backup/util/interfaces/checksumable.class.php');
require_once($CFG->dirroot . '/backup/backup.class.php');
require_once($CFG->dirroot . '/backup/util/settings/base_setting.class.php');
require_once($CFG->dirroot . '/backup/util/settings/backup_setting.class.php');
require_once($CFG->dirroot . '/backup/util/settings/setting_dependency.class.php');
require_once($CFG->dirroot . '/backup/util/settings/root/root_backup_setting.class.php');
require_once($CFG->dirroot . '/backup/util/settings/activity/activity_backup_setting.class.php');
require_once($CFG->dirroot . '/backup/util/settings/section/section_backup_setting.class.php');
require_once($CFG->dirroot . '/backup/util/settings/course/course_backup_setting.class.php');
require_once($CFG->dirroot . '/backup/util/ui/backup_ui_setting.class.php');
/*
* setting tests (all)
@@ -209,6 +211,21 @@ class setting_test extends UnitTestCase {
$this->assertEqual($e->a->alreadydependent, 'test4');
}
$bs1 = new mock_base_setting('test1', base_setting::IS_INTEGER, null);
$bs2 = new mock_base_setting('test2', base_setting::IS_INTEGER, null);
$bs1->register_dependency(new setting_dependency_disabledif_empty($bs1, $bs2));
try {
// $bs1 is already dependent on $bs2 so this should fail.
$bs2->register_dependency(new setting_dependency_disabledif_empty($bs2, $bs1));
$this->assertTrue(false, 'base_setting_exception expected');
} catch (exception $e) {
$this->assertTrue($e instanceof base_setting_exception);
$this->assertEqual($e->errorcode, 'setting_circular_reference');
$this->assertTrue($e->a instanceof stdclass);
$this->assertEqual($e->a->main, 'test1');
$this->assertEqual($e->a->alreadydependent, 'test2');
}
// Create 3 settings and observe between them, last one must
// automatically inherit all the settings defined in the main one
$bs1 = new mock_base_setting('test1', base_setting::IS_INTEGER, null);
+10 -3
View File
@@ -292,9 +292,16 @@ class blog_entry {
$contentcell->text .= $OUTPUT->container_start('commands');
if (blog_user_can_edit_entry($this) && empty($this->uniquehash)) {
$contentcell->text .= html_writer::link(new moodle_url('/blog/edit.php', array('action' => 'edit', 'entryid' => $this->id)), $stredit) . ' | ';
$contentcell->text .= html_writer::link(new moodle_url('/blog/edit.php', array('action' => 'delete', 'entryid' => $this->id)), $strdelete) . ' | ';
if (blog_user_can_edit_entry($this)) {
if (empty($this->uniquehash)) {
//External blog entries should not be edited
$contentcell->text .= html_writer::link(new moodle_url('/blog/edit.php',
array('action' => 'edit', 'entryid' => $this->id)),
$stredit) . ' | ';
}
$contentcell->text .= html_writer::link(new moodle_url('/blog/edit.php',
array('action' => 'delete', 'entryid' => $this->id)),
$strdelete) . ' | ';
}
$contentcell->text .= html_writer::link(new moodle_url('/blog/index.php', array('entryid' => $this->id)), get_string('permalink', 'blog'));
+3 -1
View File
@@ -164,7 +164,9 @@ function blog_rss_get_feed($context, $args) {
$item->title = $blog_entry->subject;
$item->pubdate = $blog_entry->lastmodified;
$item->link = $CFG->wwwroot.'/blog/index.php?entryid='.$blog_entry->id;
$item->description = format_text($blog_entry->summary, $blog_entry->format);
$summary = file_rewrite_pluginfile_urls($blog_entry->summary, 'pluginfile.php',
$sitecontext->id, 'blog', 'post', $blog_entry->id);
$item->description = format_text($summary, $blog_entry->format);
if ( !empty($CFG->usetags) && ($blogtags = tag_get_tags_array('post', $blog_entry->id)) ) {
if ($blogtags) {
$item->tags = $blogtags;
+5 -3
View File
@@ -133,14 +133,16 @@ class event_form extends moodleform {
$mform->setDefault('repeats', 1);
$mform->disabledIf('repeats','repeat','notchecked');
} else if ($repeatedevents > 0) {
} else if ($repeatedevents) {
$mform->addElement('hidden', 'repeatid');
$mform->setType('repeatid', PARAM_INT);
$mform->addElement('header', 'repeatedevents', get_string('repeatedevents', 'calendar'));
$mform->addElement('checkbox', 'repeateditall', null, get_string('repeateditall', 'calendar', $repeatedevents), 'repeat');
$mform->setDefault('repeateditall', 'checked');
$mform->addElement('radio', 'repeateditall', null, get_string('repeateditall', 'calendar', $this->_customdata->event->eventrepeats), 1);
$mform->addElement('radio', 'repeateditall', null, get_string('repeateditthis', 'calendar'), 0);
$mform->setDefault('repeateditall', 1);
}
+1 -1
View File
@@ -152,7 +152,7 @@ foreach($events as $event) {
$ev = new iCalendar_event;
$ev->add_property('uid', $event->id.'@'.$hostaddress);
$ev->add_property('summary', $event->name);
$ev->add_property('description', $event->description);
$ev->add_property('description', clean_param($event->description, PARAM_NOTAGS));
$ev->add_property('class', 'PUBLIC'); // PUBLIC / PRIVATE / CONFIDENTIAL
$ev->add_property('last-modified', Bennu::timestamp_to_datetime($event->timemodified));
$ev->add_property('dtstamp', Bennu::timestamp_to_datetime()); // now
+15
View File
@@ -1552,6 +1552,7 @@ function calendar_get_allowed_types(&$allowed, $course = null) {
}
if ($course->id != SITEID) {
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
$allowed->user = has_capability('moodle/calendar:manageownentries', $coursecontext);
if (has_capability('moodle/calendar:manageentries', $coursecontext)) {
$allowed->courses = array($course->id => 1);
@@ -2087,6 +2088,20 @@ class calendar_event {
// Delete the event
$DB->delete_records('event', array('id'=>$this->properties->id));
// If we are deleting parent of a repeated event series, promote the next event in the series as parent
if (($this->properties->id == $this->properties->repeatid) && !$deleterepeated) {
$newparent = $DB->get_field_sql("SELECT id from {event} where repeatid = ? order by id ASC", array($this->properties->id), IGNORE_MULTIPLE);
if (!empty($newparent)) {
$DB->execute("UPDATE {event} SET repeatid = ? WHERE repeatid = ?", array($newparent, $this->properties->id));
// Get all records where the repeatid is the same as the event being removed
$events = $DB->get_records('event', array('repeatid' => $newparent));
// For each of the returned events trigger the event_update hook.
foreach ($events as $event) {
self::calendar_event_hook('update_event', array($event, false));
}
}
}
// If the editor context hasn't already been set then set it now
if ($this->editorcontext === null) {
$this->editorcontext = $this->properties->context;
+17 -9
View File
@@ -135,7 +135,9 @@ class core_calendar_renderer extends plugin_renderer_base {
* @return string
*/
public function fake_block_filters($courseid, $day, $month, $year, $view, $courses) {
return html_writer::tag('div', calendar_filter_controls($this->page->url), array('class'=>'calendar_filters filters'));
$returnurl = $this->page->url;
$returnurl->param('course', $courseid);
return html_writer::tag('div', calendar_filter_controls($returnurl), array('class'=>'calendar_filters filters'));
}
/**
@@ -413,6 +415,8 @@ class core_calendar_renderer extends plugin_renderer_base {
$table = new html_table();
$table->attributes = array('class'=>'calendarmonth calendartable');
$time = make_timestamp($calendar->year, $calendar->month);
$table->summary = get_string('calendarheading', 'calendar', userdate($time, get_string('strftimemonthyear')));
$table->data = array();
$header = new html_table_row();
@@ -579,22 +583,24 @@ class core_calendar_renderer extends plugin_renderer_base {
// Global events
$link = new moodle_url(CALENDAR_URL.'set.php', array('var' => 'showglobal', 'return' => base64_encode($returnurl->out(false)), 'sesskey'=>sesskey()));
$strglobalevents = get_string('globalevents', 'calendar');
if (calendar_show_event_type(CALENDAR_EVENT_GLOBAL)) {
$output .= html_writer::tag('td', '', array('class'=>'calendar_event_global', 'style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', get_string('globalevents', 'calendar')).' '.get_string('shown', 'calendar').' ('.html_writer::link($link, get_string('clickhide', 'calendar')).')');
$output .= html_writer::tag('td', html_writer::tag('strong', $strglobalevents).' '.get_string('shown', 'calendar').' ('.html_writer::link($link, get_string('clickhide', 'calendar').'<span class="accesshide">'.$strglobalevents.'</span>').')');
} else {
$output .= html_writer::tag('td', '', array('style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', get_string('globalevents', 'calendar')).' '.get_string('hidden', 'calendar').' ('.html_writer::link($link, get_string('clickshow', 'calendar')).')');
$output .= html_writer::tag('td', html_writer::tag('strong', $strglobalevents).' '.get_string('hidden', 'calendar').' ('.html_writer::link($link, get_string('clickshow', 'calendar').'<span class="accesshide">'.$strglobalevents.'</span>').')');
}
// Course events
$link = new moodle_url(CALENDAR_URL.'set.php', array('var'=>'showcourses', 'return' => base64_encode($returnurl->out(false)), 'sesskey'=>sesskey()));
$strcourseevents = get_string('courseevents', 'calendar');
if (calendar_show_event_type(CALENDAR_EVENT_COURSE)) {
$output .= html_writer::tag('td', '', array('class'=>'calendar_event_course', 'style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', get_string('courseevents', 'calendar')).' '.get_string('shown', 'calendar').' ('.html_writer::link($link, get_string('clickhide', 'calendar')).')');
$output .= html_writer::tag('td', html_writer::tag('strong', $strcourseevents).' '.get_string('shown', 'calendar').' ('.html_writer::link($link, get_string('clickhide', 'calendar').'<span class="accesshide">'.$strcourseevents.'</span>').')');
} else {
$output .= html_writer::tag('td', '', array('style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', get_string('courseevents', 'calendar')).' '.get_string('hidden', 'calendar').' ('.html_writer::link($link, get_string('clickshow', 'calendar')).')');
$output .= html_writer::tag('td', html_writer::tag('strong', $strcourseevents).' '.get_string('hidden', 'calendar').' ('.html_writer::link($link, get_string('clickshow', 'calendar').'<span class="accesshide">'.$strcourseevents.'</span>').')');
}
$output .= html_writer::end_tag('tr');
@@ -602,21 +608,23 @@ class core_calendar_renderer extends plugin_renderer_base {
$output .= html_writer::start_tag('tr');
// Group events
$link = new moodle_url(CALENDAR_URL.'set.php', array('var'=>'showgroups', 'return' => base64_encode($returnurl->out(false)), 'sesskey'=>sesskey()));
$strgroupevents = get_string('groupevents', 'calendar');
if (calendar_show_event_type(CALENDAR_EVENT_GROUP)) {
$output .= html_writer::tag('td', '', array('class'=>'calendar_event_group', 'style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', get_string('groupevents', 'calendar')).' '.get_string('shown', 'calendar').' ('.html_writer::link($link, get_string('clickhide', 'calendar')).')');
$output .= html_writer::tag('td', html_writer::tag('strong', $strgroupevents).' '.get_string('shown', 'calendar').' ('.html_writer::link($link, get_string('clickhide', 'calendar').'<span class="accesshide">'.$strgroupevents.'</span>').')');
} else {
$output .= html_writer::tag('td', '', array('style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', get_string('groupevents', 'calendar')).' '.get_string('hidden', 'calendar').' ('.html_writer::link($link, get_string('clickshow', 'calendar')).')');
$output .= html_writer::tag('td', html_writer::tag('strong', $strgroupevents).' '.get_string('hidden', 'calendar').' ('.html_writer::link($link, get_string('clickshow', 'calendar').'<span class="accesshide">'.$strgroupevents.'</span>').')');
}
// User events
$link = new moodle_url(CALENDAR_URL.'set.php', array('var'=>'showuser', 'return' => base64_encode($returnurl->out(false)), 'sesskey'=>sesskey()));
$struserevents = get_string('userevents', 'calendar');
if (calendar_show_event_type(CALENDAR_EVENT_USER)) {
$output .= html_writer::tag('td', '', array('class'=>'calendar_event_user', 'style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', get_string('userevents', 'calendar')).' '.get_string('shown', 'calendar').' ('.html_writer::link($link, get_string('clickhide', 'calendar')).')');
$output .= html_writer::tag('td', html_writer::tag('strong', $struserevents).' '.get_string('shown', 'calendar').' ('.html_writer::link($link, get_string('clickhide', 'calendar').'<span class="accesshide">'.$struserevents.'</span>').')');
} else {
$output .= html_writer::tag('td', '', array('style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', get_string('userevents', 'calendar')).' '.get_string('hidden', 'calendar').' ('.html_writer::link($link, get_string('clickshow', 'calendar')).')');
$output .= html_writer::tag('td', html_writer::tag('strong', $struserevents).' '.get_string('hidden', 'calendar').' ('.html_writer::link($link, get_string('clickshow', 'calendar').'<span class="accesshide">'.$struserevents.'</span>').')');
}
$output .= html_writer::end_tag('tr');
}
+7 -2
View File
@@ -45,8 +45,13 @@ require_sesskey();
$var = required_param('var', PARAM_ALPHA);
$return = clean_param(base64_decode(required_param('return', PARAM_RAW)), PARAM_URL);
$url = new moodle_url('/calendar/set.php', array('return'=>base64_encode($return),'var'=>$var, 'sesskey'=>sesskey()));
$courseid = optional_param('id', -1, PARAM_INT);
if ($courseid != -1) {
$return = new moodle_url($return, array('course' => $courseid));
} else {
$return = new moodle_url($return);
}
$url = new moodle_url('/calendar/set.php', array('return'=>base64_encode($return->out(false)), 'course' => $courseid, 'var'=>$var, 'sesskey'=>sesskey()));
$PAGE->set_url($url);
$PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
+1 -1
View File
@@ -127,7 +127,7 @@ switch($view) {
echo $renderer->show_day($calendar);
break;
case 'month':
echo $renderer->show_month_detailed($calendar);
echo $renderer->show_month_detailed($calendar, $url);
break;
case 'upcoming':
$defaultlookahead = CALENDAR_DEFAULT_UPCOMING_LOOKAHEAD;
+1 -1
View File
@@ -49,7 +49,7 @@ class cohort_edit_form extends moodleform {
$mform->addElement('select', 'contextid', get_string('context', 'role'), $options);
$mform->addElement('text', 'idnumber', get_string('idnumber', 'cohort'), 'maxlength="254" size="50"');
$mform->setType('name', PARAM_RAW);
$mform->setType('name', PARAM_RAW); // idnumbers are plain text, must not be changed
$mform->addElement('editor', 'description_editor', get_string('description', 'cohort'), null, $editoroptions);
$mform->setType('description_editor', PARAM_RAW);
+1 -1
View File
@@ -98,7 +98,7 @@ $data = array();
foreach($cohorts['cohorts'] as $cohort) {
$line = array();
$line[] = format_string($cohort->name);
$line[] = $cohort->idnumber;
$line[] = s($cohort->idnumber); // plain text
$line[] = format_text($cohort->description, $cohort->descriptionformat);
$line[] = $DB->count_records('cohort_members', array('cohortid'=>$cohort->id));
+1 -1
View File
@@ -569,7 +569,7 @@ class comment {
$c->format = $u->cformat;
$c->timecreated = $u->ctimecreated;
$url = new moodle_url('/user/view.php', array('id'=>$u->id, 'course'=>$this->courseid));
$c->profileurl = $url->out();
$c->profileurl = $url->out(false);
$c->fullname = fullname($u);
$c->time = userdate($c->timecreated, get_string('strftimerecent', 'langconfig'));
$c->content = format_text($c->content, $c->format, $formatoptions);
+1 -1
View File
@@ -383,7 +383,7 @@ $CFG->admin = 'admin';
// memory limit to something higher.
// The value for the settings should be a valid PHP memory value. e.g. 512M, 1G
//
// $CFG->extramemorylimit = 1G;
// $CFG->extramemorylimit = '1G';
//
//=========================================================================
// 8. SETTINGS FOR DEVELOPMENT SERVERS - not intended for production use!!!
+407 -398
View File
@@ -1,445 +1,454 @@
<?php
// Displays the top level category or all courses
// In editing mode, allows the admin to edit a category,
// and rearrange courses
// 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/>.
require_once("../config.php");
require_once("lib.php");
/**
* Displays the top level category or all courses
* In editing mode, allows the admin to edit a category,
* and rearrange courses
*
* @package core
* @subpackage course
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$id = required_param('id', PARAM_INT); // Category id
$page = optional_param('page', 0, PARAM_INT); // which page to show
$perpage = optional_param('perpage', $CFG->coursesperpage, PARAM_INT); // how many per page
$categoryedit = optional_param('categoryedit', -1, PARAM_BOOL);
$hide = optional_param('hide', 0, PARAM_INT);
$show = optional_param('show', 0, PARAM_INT);
$moveup = optional_param('moveup', 0, PARAM_INT);
$movedown = optional_param('movedown', 0, PARAM_INT);
$moveto = optional_param('moveto', 0, PARAM_INT);
$resort = optional_param('resort', 0, PARAM_BOOL);
require_once("../config.php");
require_once($CFG->dirroot.'/course/lib.php');
$site = get_site();
$id = required_param('id', PARAM_INT); // Category id
$page = optional_param('page', 0, PARAM_INT); // which page to show
$perpage = optional_param('perpage', $CFG->coursesperpage, PARAM_INT); // how many per page
$categoryedit = optional_param('categoryedit', -1, PARAM_BOOL);
$hide = optional_param('hide', 0, PARAM_INT);
$show = optional_param('show', 0, PARAM_INT);
$moveup = optional_param('moveup', 0, PARAM_INT);
$movedown = optional_param('movedown', 0, PARAM_INT);
$moveto = optional_param('moveto', 0, PARAM_INT);
$resort = optional_param('resort', 0, PARAM_BOOL);
$sesskey = optional_param('sesskey', '', PARAM_RAW);
if (empty($id)) {
print_error("unknowcategory");
if (empty($id)) {
print_error("unknowcategory");
}
$PAGE->set_category_by_id($id);
$PAGE->set_url(new moodle_url('/course/category.php', array('id' => $id)));
// This is sure to be the category context
$context = $PAGE->context;
// And the object has been loaded for us no need for another DB call
$category = $PAGE->category;
$canedit = can_edit_in_category($category->id);
if ($canedit) {
if ($categoryedit !== -1) {
$USER->editing = $categoryedit;
}
$PAGE->set_category_by_id($id);
$urlparams = array('id' => $id);
if ($page) {
$urlparams['page'] = $page;
}
if ($perpage) {
$urlparams['perpage'] = $perpage;
}
$PAGE->set_url(new moodle_url('/course/category.php', array('id' => $id)));
navigation_node::override_active_url($PAGE->url);
$context = $PAGE->context;
$category = $PAGE->category;
$canedit = can_edit_in_category($category->id);
if ($canedit) {
if ($categoryedit !== -1) {
$USER->editing = $categoryedit;
}
require_login();
$editingon = $PAGE->user_is_editing();
} else {
if ($CFG->forcelogin) {
require_login();
$editingon = $PAGE->user_is_editing();
} else {
if ($CFG->forcelogin) {
require_login();
}
$editingon = false;
}
if (!$category->visible) {
require_capability('moodle/category:viewhiddencategories', $context);
}
$canmanage = has_capability('moodle/category:manage', $context);
$sesskeyprovided = !empty($sesskey) && confirm_sesskey($sesskey);
// Process any category actions.
if ($canmanage && $resort && $sesskeyprovided) {
// Resort the category if requested
if ($courses = get_courses($category->id, "fullname ASC", 'c.id,c.fullname,c.sortorder')) {
$i = 1;
foreach ($courses as $course) {
$DB->set_field('course', 'sortorder', $category->sortorder+$i, array('id'=>$course->id));
$i++;
}
$editingon = false;
fix_course_sortorder(); // should not be needed
}
}
if (!$category->visible) {
require_capability('moodle/category:viewhiddencategories', $context);
}
// Process any course actions.
if ($editingon && $sesskeyprovided) {
// Process any category actions.
if (has_capability('moodle/category:manage', $context)) {
/// Resort the category if requested
if ($resort and confirm_sesskey()) {
if ($courses = get_courses($category->id, "fullname ASC", 'c.id,c.fullname,c.sortorder')) {
$i = 1;
foreach ($courses as $course) {
$DB->set_field('course', 'sortorder', $category->sortorder+$i, array('id'=>$course->id));
$i++;
}
fix_course_sortorder(); // should not be needed
}
// Move a specified course to a new category
if (!empty($moveto) and $data = data_submitted()) {
// Some courses are being moved
// user must have category update in both cats to perform this
require_capability('moodle/category:manage', $context);
require_capability('moodle/category:manage', get_context_instance(CONTEXT_COURSECAT, $moveto));
if (!$destcategory = $DB->get_record('course_categories', array('id' => $data->moveto))) {
print_error('cannotfindcategory', '', '', $data->moveto);
}
}
// Process any course actions.
if ($editingon) {
/// Move a specified course to a new category
if (!empty($moveto) and $data = data_submitted() and confirm_sesskey()) { // Some courses are being moved
// user must have category update in both cats to perform this
require_capability('moodle/category:manage', $context);
require_capability('moodle/category:manage', get_context_instance(CONTEXT_COURSECAT, $moveto));
$courses = array();
foreach ($data as $key => $value) {
if (preg_match('/^c\d+$/', $key)) {
$courseid = substr($key, 1);
array_push($courses, $courseid);
if (!$destcategory = $DB->get_record('course_categories', array('id' => $data->moveto))) {
print_error('cannotfindcategory', '', '', $data->moveto);
}
$courses = array();
foreach ($data as $key => $value) {
if (preg_match('/^c\d+$/', $key)) {
$courseid = substr($key, 1);
array_push($courses, $courseid);
// check this course's category
if ($movingcourse = $DB->get_record('course', array('id'=>$courseid))) {
if ($movingcourse->category != $id ) {
print_error('coursedoesnotbelongtocategory');
}
} else {
print_error('cannotfindcourse');
// check this course's category
if ($movingcourse = $DB->get_record('course', array('id'=>$courseid))) {
if ($movingcourse->category != $id ) {
print_error('coursedoesnotbelongtocategory');
}
} else {
print_error('cannotfindcourse');
}
}
move_courses($courses, $data->moveto);
}
/// Hide or show a course
if ((!empty($hide) or !empty($show)) and confirm_sesskey()) {
if (!empty($hide)) {
$course = $DB->get_record('course', array('id' => $hide));
$visible = 0;
} else {
$course = $DB->get_record('course', array('id' => $show));
$visible = 1;
}
if ($course) {
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
require_capability('moodle/course:visibility', $coursecontext);
$DB->set_field('course', 'visible', $visible, array('id' => $course->id));
$DB->set_field('course', 'visibleold', $visible, array('id' => $course->id)); // we set the old flag when user manually changes visibility of course
}
}
/// Move a course up or down
if ((!empty($moveup) or !empty($movedown)) and confirm_sesskey()) {
require_capability('moodle/category:manage', $context);
// Ensure the course order has continuous ordering
fix_course_sortorder();
$swapcourse = NULL;
if (!empty($moveup)) {
if ($movecourse = $DB->get_record('course', array('id' => $moveup))) {
$swapcourse = $DB->get_record('course', array('sortorder' => $movecourse->sortorder - 1));
}
} else {
if ($movecourse = $DB->get_record('course', array('id' => $movedown))) {
$swapcourse = $DB->get_record('course', array('sortorder' => $movecourse->sortorder + 1));
}
}
if ($swapcourse and $movecourse) {
// check course's category
if ($movecourse->category != $id) {
print_error('coursedoesnotbelongtocategory');
}
$DB->set_field('course', 'sortorder', $swapcourse->sortorder, array('id' => $movecourse->id));
$DB->set_field('course', 'sortorder', $movecourse->sortorder, array('id' => $swapcourse->id));
}
}
} // End of editing stuff
// Print headings
$numcategories = $DB->count_records('course_categories');
$stradministration = get_string('administration');
$strcategories = get_string('categories');
$strcategory = get_string('category');
$strcourses = get_string('courses');
if ($editingon && can_edit_in_category()) {
// Integrate into the admin tree only if the user can edit categories at the top level,
// otherwise the admin block does not appear to this user, and you get an error.
require_once($CFG->libdir . '/adminlib.php');
admin_externalpage_setup('coursemgmt', '', $urlparams, $CFG->wwwroot . '/course/category.php');
$PAGE->set_context($context); // Ensure that we are actually showing blocks etc for the cat context
$settingsnode = $PAGE->settingsnav->find_active_node();
if ($settingsnode) {
$settingsnode->make_inactive();
$settingsnode->force_open();
$PAGE->navbar->add($settingsnode->text, $settingsnode->action);
}
echo $OUTPUT->header();
} else {
$PAGE->set_title("$site->shortname: $category->name");
$PAGE->set_heading($site->fullname);
$PAGE->set_button(print_course_search('', true, 'navbar'));
$PAGE->set_pagelayout('coursecategory');
echo $OUTPUT->header();
move_courses($courses, $data->moveto);
}
// Hide or show a course
if (!empty($hide) or !empty($show)) {
if (!empty($hide)) {
$course = $DB->get_record('course', array('id' => $hide));
$visible = 0;
} else {
$course = $DB->get_record('course', array('id' => $show));
$visible = 1;
}
if ($course) {
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
require_capability('moodle/course:visibility', $coursecontext);
// Set the visibility of the course. we set the old flag when user manually changes visibility of course.
$DB->update_record('course', array('id' => $course->id, 'visible' => $visible, 'visibleold' => $visible, 'timemodified' => time()));
}
}
// Move a course up or down
if (!empty($moveup) or !empty($movedown)) {
require_capability('moodle/category:manage', $context);
// Ensure the course order has continuous ordering
fix_course_sortorder();
$swapcourse = NULL;
if (!empty($moveup)) {
if ($movecourse = $DB->get_record('course', array('id' => $moveup))) {
$swapcourse = $DB->get_record('course', array('sortorder' => $movecourse->sortorder - 1));
}
} else {
if ($movecourse = $DB->get_record('course', array('id' => $movedown))) {
$swapcourse = $DB->get_record('course', array('sortorder' => $movecourse->sortorder + 1));
}
}
if ($swapcourse and $movecourse) {
// check course's category
if ($movecourse->category != $id) {
print_error('coursedoesnotbelongtocategory');
}
$DB->set_field('course', 'sortorder', $swapcourse->sortorder, array('id' => $movecourse->id));
$DB->set_field('course', 'sortorder', $movecourse->sortorder, array('id' => $swapcourse->id));
}
}
} // End of editing stuff
// Prepare the standard URL params for this page. We'll need them later.
$urlparams = array('id' => $id);
if ($page) {
$urlparams['page'] = $page;
}
if ($perpage) {
$urlparams['perpage'] = $perpage;
}
// Begin output
if ($editingon && can_edit_in_category()) {
// Integrate into the admin tree only if the user can edit categories at the top level,
// otherwise the admin block does not appear to this user, and you get an error.
require_once($CFG->libdir . '/adminlib.php');
admin_externalpage_setup('coursemgmt', '', $urlparams, $CFG->wwwroot . '/course/category.php');
$PAGE->set_context($context); // Ensure that we are actually showing blocks etc for the cat context
$settingsnode = $PAGE->settingsnav->find_active_node();
if ($settingsnode) {
$settingsnode->make_inactive();
$settingsnode->force_open();
$PAGE->navbar->add($settingsnode->text, $settingsnode->action);
}
echo $OUTPUT->header();
} else {
$site = get_site();
$PAGE->set_title("$site->shortname: $category->name");
$PAGE->set_heading($site->fullname);
$PAGE->set_button(print_course_search('', true, 'navbar'));
$PAGE->set_pagelayout('coursecategory');
echo $OUTPUT->header();
}
/// Print the category selector
$displaylist = array();
$notused = array();
make_categories_list($displaylist, $notused);
$displaylist = array();
$notused = array();
make_categories_list($displaylist, $notused);
echo '<div class="categorypicker">';
$select = new single_select(new moodle_url('category.php'), 'id', $displaylist, $category->id, null, 'switchcategory');
$select->set_label($strcategories.':');
echo $OUTPUT->render($select);
echo '</div>';
echo '<div class="categorypicker">';
$select = new single_select(new moodle_url('/course/category.php'), 'id', $displaylist, $category->id, null, 'switchcategory');
$select->set_label(get_string('categories').':');
echo $OUTPUT->render($select);
echo '</div>';
/// Print current category description
if (!$editingon && $category->description) {
echo $OUTPUT->box_start();
$options = new stdClass;
$options->noclean = true;
$options->para = false;
$options->overflowdiv = true;
if (!isset($category->descriptionformat)) {
$category->descriptionformat = FORMAT_MOODLE;
}
$text = file_rewrite_pluginfile_urls($category->description, 'pluginfile.php', $context->id, 'coursecat', 'description', null);
echo format_text($text, $category->descriptionformat, $options);
echo $OUTPUT->box_end();
if (!$editingon && $category->description) {
echo $OUTPUT->box_start();
$options = new stdClass;
$options->noclean = true;
$options->para = false;
$options->overflowdiv = true;
if (!isset($category->descriptionformat)) {
$category->descriptionformat = FORMAT_MOODLE;
}
$text = file_rewrite_pluginfile_urls($category->description, 'pluginfile.php', $context->id, 'coursecat', 'description', null);
echo format_text($text, $category->descriptionformat, $options);
echo $OUTPUT->box_end();
}
if ($editingon && $canmanage) {
echo $OUTPUT->container_start('buttons');
// Print button to update this category
$url = new moodle_url('/course/editcategory.php', array('id' => $category->id));
echo $OUTPUT->single_button($url, get_string('editcategorythis'), 'get');
// Print button for creating new categories
$url = new moodle_url('/course/editcategory.php', array('parent' => $category->id));
echo $OUTPUT->single_button($url, get_string('addsubcategory'), 'get');
echo $OUTPUT->container_end();
}
// Print out all the sub-categories
// In order to view hidden subcategories the user must have the viewhiddencategories
// capability in the current category.
if (has_capability('moodle/category:viewhiddencategories', $context)) {
$categorywhere = '';
} else {
$categorywhere = 'AND cc.visible = 1';
}
// We're going to preload the context for the subcategory as we know that we
// need it later on for formatting.
list($ctxselect, $ctxjoin) = context_instance_preload_sql('cc.id', CONTEXT_COURSECAT, 'ctx');
$sql = "SELECT cc.* $ctxselect
FROM {course_categories} cc
$ctxjoin
WHERE cc.parent = :parentid
$categorywhere
ORDER BY cc.sortorder ASC";
$subcategories = $DB->get_recordset_sql($sql, array('parentid' => $category->id));
// Prepare a table to display the sub categories.
$table = new html_table;
$table->attributes = array('border' => '0', 'cellspacing' => '2', 'cellpadding' => '4', 'class' => 'generalbox boxaligncenter category_subcategories');
$table->head = array(get_string('subcategories'));
$table->data = array();
$baseurl = new moodle_url('/course/category.php');
foreach ($subcategories as $subcategory) {
// Preload the context we will need it to format the category name shortly.
context_instance_preload($subcategory);
$context = get_context_instance(CONTEXT_COURSECAT, $subcategory->id);
// Prepare the things we need to create a link to the subcategory
$attributes = $subcategory->visible ? array() : array('class' => 'dimmed');
$text = format_string($subcategory->name, true, array('context' => $context));
// Add the subcategory to the table
$baseurl->param('id', $subcategory->id);
$table->data[] = array(html_writer::link($baseurl, $text, $attributes));
}
$subcategorieswereshown = (count($table->data) > 0);
if ($subcategorieswereshown) {
echo html_writer::table($table);
}
// Print out all the courses
$courses = get_courses_page($category->id, 'c.sortorder ASC',
'c.id,c.sortorder,c.shortname,c.fullname,c.summary,c.visible',
$totalcount, $page*$perpage, $perpage);
$numcourses = count($courses);
if (!$courses) {
if (empty($subcategorieswereshown)) {
echo $OUTPUT->heading(get_string("nocoursesyet"));
}
if ($editingon && has_capability('moodle/category:manage', $context)) {
echo $OUTPUT->container_start('buttons');
} else if ($numcourses <= COURSE_MAX_SUMMARIES_PER_PAGE and !$page and !$editingon) {
echo $OUTPUT->box_start('courseboxes');
print_courses($category);
echo $OUTPUT->box_end();
// Print button to update this category
$options = array('id' => $category->id);
echo $OUTPUT->single_button(new moodle_url('/course/editcategory.php', $options), get_string('editcategorythis'), 'get');
// Print button for creating new categories
$options = array('parent' => $category->id);
echo $OUTPUT->single_button(new moodle_url('/course/editcategory.php', $options), get_string('addsubcategory'), 'get');
echo $OUTPUT->container_end();
}
/// Print out all the sub-categories
if ($subcategories = $DB->get_records('course_categories', array('parent' => $category->id), 'sortorder ASC')) {
$firstentry = true;
foreach ($subcategories as $subcategory) {
if ($subcategory->visible || has_capability('moodle/category:viewhiddencategories', $context)) {
$subcategorieswereshown = true;
if ($firstentry) {
echo '<table border="0" cellspacing="2" cellpadding="4" class="generalbox boxaligncenter">';
echo '<tr><th scope="col">'.get_string('subcategories').'</th></tr>';
echo '<tr><td style="white-space: nowrap">';
$firstentry = false;
}
$catlinkcss = $subcategory->visible ? '' : ' class="dimmed" ';
echo '<a '.$catlinkcss.' href="category.php?id='.$subcategory->id.'">'.
format_string($subcategory->name, true, array('context' => get_context_instance(CONTEXT_COURSECAT, $subcategory->id))).'</a><br />';
}
}
if (!$firstentry) {
echo '</td></tr></table>';
echo '<br />';
}
}
/// Print out all the courses
$courses = get_courses_page($category->id, 'c.sortorder ASC',
'c.id,c.sortorder,c.shortname,c.fullname,c.summary,c.visible',
$totalcount, $page*$perpage, $perpage);
$numcourses = count($courses);
if (!$courses) {
if (empty($subcategorieswereshown)) {
echo $OUTPUT->heading(get_string("nocoursesyet"));
}
} else if ($numcourses <= COURSE_MAX_SUMMARIES_PER_PAGE and !$page and !$editingon) {
echo $OUTPUT->box_start('courseboxes');
print_courses($category);
echo $OUTPUT->box_end();
} else {
echo $OUTPUT->paging_bar($totalcount, $page, $perpage, "/course/category.php?id=$category->id&perpage=$perpage");
echo '<form id="movecourses" action="category.php" method="post"><div>';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<table border="0" cellspacing="2" cellpadding="4" class="generalbox boxaligncenter"><tr>';
echo '<th class="header" scope="col">'.get_string('courses').'</th>';
if ($editingon) {
echo '<th class="header" scope="col">'.get_string('edit').'</th>';
echo '<th class="header" scope="col">'.get_string('select').'</th>';
} else {
echo $OUTPUT->paging_bar($totalcount, $page, $perpage, "/course/category.php?id=$category->id&perpage=$perpage");
echo '<th class="header" scope="col">&nbsp;</th>';
}
echo '</tr>';
$strcourses = get_string('courses');
$strselect = get_string('select');
$stredit = get_string('edit');
$strdelete = get_string('delete');
$strbackup = get_string('backup');
$strrestore = get_string('restore');
$strmoveup = get_string('moveup');
$strmovedown = get_string('movedown');
$strupdate = get_string('update');
$strhide = get_string('hide');
$strshow = get_string('show');
$strsummary = get_string('summary');
$strsettings = get_string('settings');
$count = 0;
$abletomovecourses = false; // for now
echo '<form id="movecourses" action="category.php" method="post"><div>';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<table border="0" cellspacing="2" cellpadding="4" class="generalbox boxaligncenter"><tr>';
echo '<th class="header" scope="col">'.$strcourses.'</th>';
if ($editingon) {
echo '<th class="header" scope="col">'.$stredit.'</th>';
echo '<th class="header" scope="col">'.$strselect.'</th>';
// Checking if we are at the first or at the last page, to allow courses to
// be moved up and down beyond the paging border
if ($totalcount > $perpage) {
$atfirstpage = ($page == 0);
if ($perpage > 0) {
$atlastpage = (($page + 1) == ceil($totalcount / $perpage));
} else {
echo '<th class="header" scope="col">&nbsp;</th>';
}
echo '</tr>';
$count = 0;
$abletomovecourses = false; // for now
// Checking if we are at the first or at the last page, to allow courses to
// be moved up and down beyond the paging border
if ($totalcount > $perpage) {
$atfirstpage = ($page == 0);
if ($perpage > 0) {
$atlastpage = (($page + 1) == ceil($totalcount / $perpage));
} else {
$atlastpage = true;
}
} else {
$atfirstpage = true;
$atlastpage = true;
}
} else {
$atfirstpage = true;
$atlastpage = true;
}
foreach ($courses as $acourse) {
$coursecontext = get_context_instance(CONTEXT_COURSE, $acourse->id);
$baseurl = new moodle_url('/course/category.php', $urlparams + array('sesskey' => sesskey()));
foreach ($courses as $acourse) {
$coursecontext = get_context_instance(CONTEXT_COURSE, $acourse->id);
$count++;
$up = ($count > 1 || !$atfirstpage);
$down = ($count < $numcourses || !$atlastpage);
$count++;
$up = ($count > 1 || !$atfirstpage);
$down = ($count < $numcourses || !$atlastpage);
$linkcss = $acourse->visible ? '' : ' class="dimmed" ';
echo '<tr>';
$coursename = get_course_display_name_for_list($acourse);
echo '<td><a '.$linkcss.' href="view.php?id='.$acourse->id.'">'. format_string($coursename) .'</a></td>';
if ($editingon) {
echo '<td>';
if (has_capability('moodle/course:update', $coursecontext)) {
echo $OUTPUT->action_icon(new moodle_url('/course/edit.php',
array('id' => $acourse->id, 'category' => $id, 'returnto' => 'category')),
new pix_icon('t/edit', $strsettings));
}
// role assignment link
if (has_capability('moodle/course:enrolreview', $coursecontext)) {
echo $OUTPUT->action_icon(new moodle_url('/enrol/users.php', array('id' => $acourse->id)),
new pix_icon('i/users', get_string('enrolledusers', 'enrol')));
}
if (can_delete_course($acourse->id)) {
echo $OUTPUT->action_icon(new moodle_url('/course/delete.php', array('id' => $acourse->id)),
new pix_icon('t/delete', $strdelete));
}
// MDL-8885, users with no capability to view hidden courses, should not be able to lock themselves out
if (has_capability('moodle/course:visibility', $coursecontext) && has_capability('moodle/course:viewhiddencourses', $coursecontext)) {
if (!empty($acourse->visible)) {
echo $OUTPUT->action_icon(new moodle_url('/course/category.php',
array('id' => $category->id, 'page' => $page, 'perpage' => $perpage,
'hide' => $acourse->id, 'sesskey' => sesskey())),
new pix_icon('t/hide', $strhide));
} else {
echo $OUTPUT->action_icon(new moodle_url('/course/category.php',
array('id' => $category->id, 'page' => $page, 'perpage' => $perpage,
'show' => $acourse->id, 'sesskey' => sesskey())),
new pix_icon('t/show', $strshow));
}
}
if (has_capability('moodle/backup:backupcourse', $coursecontext)) {
echo $OUTPUT->action_icon(new moodle_url('/backup/backup.php', array('id' => $acourse->id)),
new pix_icon('t/backup', $strbackup));
}
if (has_capability('moodle/restore:restorecourse', $coursecontext)) {
echo $OUTPUT->action_icon(new moodle_url('/backup/restorefile.php', array('contextid' => $coursecontext->id)),
new pix_icon('t/restore', $strrestore));
}
if (has_capability('moodle/category:manage', $context)) {
if ($up) {
echo $OUTPUT->action_icon(new moodle_url('/course/category.php',
array('id' => $category->id, 'page' => $page, 'perpage' => $perpage,
'moveup' => $acourse->id, 'sesskey' => sesskey())),
new pix_icon('t/up', $strmoveup));
}
if ($down) {
echo $OUTPUT->action_icon(new moodle_url('/course/category.php',
array('id' => $category->id, 'page' => $page, 'perpage' => $perpage,
'movedown' => $acourse->id, 'sesskey' => sesskey())),
new pix_icon('t/down', $strmovedown));
}
$abletomovecourses = true;
}
echo '</td>';
echo '<td align="center">';
echo '<input type="checkbox" name="c'.$acourse->id.'" />';
echo '</td>';
} else {
echo '<td align="right">';
// print enrol info
if ($icons = enrol_get_course_info_icons($acourse)) {
foreach ($icons as $pix_icon) {
echo $OUTPUT->render($pix_icon);
}
}
if (!empty($acourse->summary)) {
$link = new moodle_url("/course/info.php?id=$acourse->id");
echo $OUTPUT->action_link($link, '<img alt="'.get_string('info').'" class="icon" src="'.$OUTPUT->pix_url('i/info') . '" />',
new popup_action('click', $link, 'courseinfo'), array('title'=>$strsummary));
}
echo "</td>";
$linkcss = $acourse->visible ? '' : ' class="dimmed" ';
echo '<tr>';
$coursename = get_course_display_name_for_list($acourse);
echo '<td><a '.$linkcss.' href="view.php?id='.$acourse->id.'">'. format_string($coursename) .'</a></td>';
if ($editingon) {
echo '<td>';
if (has_capability('moodle/course:update', $coursecontext)) {
$url = new moodle_url('/course/edit.php', array('id' => $acourse->id, 'category' => $id, 'returnto' => 'category'));
echo $OUTPUT->action_icon($url, new pix_icon('t/edit', get_string('settings')));
}
echo "</tr>";
// role assignment link
if (has_capability('moodle/course:enrolreview', $coursecontext)) {
$url = new moodle_url('/enrol/users.php', array('id' => $acourse->id));
echo $OUTPUT->action_icon($url, new pix_icon('i/users', get_string('enrolledusers', 'enrol')));
}
if (can_delete_course($acourse->id)) {
$url = new moodle_url('/course/delete.php', array('id' => $acourse->id));
echo $OUTPUT->action_icon($url, new pix_icon('t/delete', get_string('delete')));
}
// MDL-8885, users with no capability to view hidden courses, should not be able to lock themselves out
if (has_capability('moodle/course:visibility', $coursecontext) && has_capability('moodle/course:viewhiddencourses', $coursecontext)) {
if (!empty($acourse->visible)) {
$url = new moodle_url($baseurl, array('hide' => $acourse->id));
echo $OUTPUT->action_icon($url, new pix_icon('t/hide', get_string('hide')));
} else {
$url = new moodle_url($baseurl, array('show' => $acourse->id));
echo $OUTPUT->action_icon($url, new pix_icon('t/show', get_string('show')));
}
}
if (has_capability('moodle/backup:backupcourse', $coursecontext)) {
$url = new moodle_url('/backup/backup.php', array('id' => $acourse->id));
echo $OUTPUT->action_icon($url, new pix_icon('t/backup', get_string('backup')));
}
if (has_capability('moodle/restore:restorecourse', $coursecontext)) {
$url = new moodle_url('/backup/restorefile.php', array('contextid' => $coursecontext->id));
echo $OUTPUT->action_icon($url, new pix_icon('t/restore', get_string('restore')));
}
if ($canmanage) {
if ($up) {
$url = new moodle_url($baseurl, array('moveup' => $acourse->id));
echo $OUTPUT->action_icon($url, new pix_icon('t/up', get_string('moveup')));
}
if ($down) {
$url = new moodle_url($baseurl, array('movedown' => $acourse->id));
echo $OUTPUT->action_icon($url, new pix_icon('t/down', get_string('movedown')));
}
$abletomovecourses = true;
}
echo '</td>';
echo '<td align="center">';
echo '<input type="checkbox" name="c'.$acourse->id.'" />';
echo '</td>';
} else {
echo '<td align="right">';
// print enrol info
if ($icons = enrol_get_course_info_icons($acourse)) {
foreach ($icons as $pix_icon) {
echo $OUTPUT->render($pix_icon);
}
}
if (!empty($acourse->summary)) {
$url = new moodle_url("/course/info.php?id=$acourse->id");
echo $OUTPUT->action_link($url, '<img alt="'.get_string('info').'" class="icon" src="'.$OUTPUT->pix_url('i/info') . '" />',
new popup_action('click', $url, 'courseinfo'), array('title'=>get_string('summary')));
}
echo "</td>";
}
if ($abletomovecourses) {
$movetocategories = array();
$notused = array();
make_categories_list($movetocategories, $notused, 'moodle/category:manage');
$movetocategories[$category->id] = get_string('moveselectedcoursesto');
echo '<tr><td colspan="3" align="right">';
echo html_writer::select($movetocategories, 'moveto', $category->id, null, array('id'=>'movetoid'));
$PAGE->requires->js_init_call('M.util.init_select_autosubmit', array('movecourses', 'movetoid', false));
echo '<input type="hidden" name="id" value="'.$category->id.'" />';
echo '</td></tr>';
}
echo '</table>';
echo '</div></form>';
echo '<br />';
echo "</tr>";
}
echo '<div class="buttons">';
if (has_capability('moodle/category:manage', $context) and $numcourses > 1) {
/// Print button to re-sort courses by name
unset($options);
$options['id'] = $category->id;
$options['resort'] = 'name';
$options['sesskey'] = sesskey();
echo $OUTPUT->single_button(new moodle_url('category.php', $options), get_string('resortcoursesbyname'), 'get');
if ($abletomovecourses) {
$movetocategories = array();
$notused = array();
make_categories_list($movetocategories, $notused, 'moodle/category:manage');
$movetocategories[$category->id] = get_string('moveselectedcoursesto');
echo '<tr><td colspan="3" align="right">';
echo html_writer::select($movetocategories, 'moveto', $category->id, null, array('id'=>'movetoid'));
$PAGE->requires->js_init_call('M.util.init_select_autosubmit', array('movecourses', 'movetoid', false));
echo '<input type="hidden" name="id" value="'.$category->id.'" />';
echo '</td></tr>';
}
if (has_capability('moodle/course:create', $context)) {
/// Print button to create a new course
unset($options);
$options['category'] = $category->id;
$options['returnto'] = 'category';
echo $OUTPUT->single_button(new moodle_url('edit.php', $options), get_string('addnewcourse'), 'get');
}
echo '</table>';
echo '</div></form>';
echo '<br />';
}
if (!empty($CFG->enablecourserequests) && $category->id == $CFG->defaultrequestcategory) {
print_course_request_buttons(get_context_instance(CONTEXT_SYSTEM));
}
echo '</div>';
echo '<div class="buttons">';
if ($canmanage and $numcourses > 1) {
// Print button to re-sort courses by name
$url = new moodle_url('/course/category.php', array('id' => $category->id, 'resort' => 'name', 'sesskey' => sesskey()));
echo $OUTPUT->single_button($url, get_string('resortcoursesbyname'), 'get');
}
print_course_search();
if (has_capability('moodle/course:create', $context)) {
// Print button to create a new course
$url = new moodle_url('/course/edit.php', array('category' => $category->id, 'returnto' => 'category'));
echo $OUTPUT->single_button($url, get_string('addnewcourse'), 'get');
}
echo $OUTPUT->footer();
if (!empty($CFG->enablecourserequests) && $category->id == $CFG->defaultrequestcategory) {
print_course_request_buttons(get_context_instance(CONTEXT_SYSTEM));
}
echo '</div>';
print_course_search();
echo $OUTPUT->footer();
+14 -6
View File
@@ -18,17 +18,21 @@ M.core_completion.init = function(Y) {
} else {
var current = args.state.get('value');
var modulename = args.modulename.get('value');
if (current == 1) {
var altstr = M.str.completion['completion-alt-manual-y'].replace('{$a}', modulename);
var titlestr = M.str.completion['completion-title-manual-y'].replace('{$a}', modulename);
args.state.set('value', 0);
args.image.set('src', M.util.image_url('i/completion-manual-y', 'moodle'));
args.image.set('alt', M.str.completion['completion-alt-manual-y']);
args.image.set('title', M.str.completion['completion-title-manual-y']);
args.image.set('alt', altstr);
args.image.set('title', titlestr);
} else {
var altstr = M.str.completion['completion-alt-manual-n'].replace('{$a}', modulename);
var titlestr = M.str.completion['completion-title-manual-n'].replace('{$a}', modulename);
args.state.set('value', 1);
args.image.set('src', M.util.image_url('i/completion-manual-n', 'moodle'));
args.image.set('alt', M.str.completion['completion-alt-manual-n']);
args.image.set('title', M.str.completion['completion-title-manual-n']);
args.image.set('alt', altstr);
args.image.set('title', titlestr);
}
}
@@ -48,6 +52,7 @@ M.core_completion.init = function(Y) {
var completionstate = 0;
var state = null;
var image = null;
var modulename = null;
var inputs = Y.Node.getDOMNode(form).getElementsByTagName('input');
for (var i=0; i<inputs.length; i++) {
@@ -59,6 +64,9 @@ M.core_completion.init = function(Y) {
completionstate = inputs[i].value;
state = Y.one(inputs[i]);
break;
case 'modulename':
modulename = Y.one(inputs[i]);
break;
}
if (inputs[i].type == 'image') {
image = Y.one(inputs[i]);
@@ -76,7 +84,7 @@ M.core_completion.init = function(Y) {
success: handle_success,
failure: handle_failure
},
arguments: {state: state, image: image, ajax: ajax}
arguments: {state: state, image: image, ajax: ajax, modulename: modulename}
};
Y.use('io-base', function(Y) {
+35
View File
@@ -1,9 +1,29 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Page for creating or editing course category name/parent/description.
* When called with an id parameter, edits the category with that id.
* Otherwise it creates a new category with default parent from the parent
* parameter, which may be 0.
*
* @package core
* @subpackage course
* @copyright 2007 Nicolas Connault
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once('../config.php');
@@ -108,6 +128,21 @@ if ($mform->is_cancelled()) {
redirect('category.php?id='.$newcategory->id.'&categoryedit=on');
}
// Unfortunately the navigation never generates correctly for this page because technically
// this page doesn't actually exist on the navigation you get here through the course
// management page.
try {
// First up we'll try to make the course management page active seeing as that is
// where the user thinks they are.
// The big prolem here is that the course management page is a common page
// for both editing users and common users.
$PAGE->settingsnav->get('root')->get('courses')->get('coursemgmt')->make_active();
} catch (Exception $ex) {
// Failing that we'll override the URL, not as accurate and chances are things
// won't be 100% correct all the time but should work most times.
navigation_node::override_active_url(new moodle_url('/course/index.php', array('categoryedit' => 'on')));
}
$PAGE->set_title($title);
$PAGE->set_heading($fullname);
echo $OUTPUT->header();
+2 -1
View File
@@ -177,6 +177,7 @@ if (!$categories = get_categories()) { /// No category yet!
$tempcat->context = get_context_instance(CONTEXT_COURSECAT, $tempcat->id);
mark_context_dirty('/'.SYSCONTEXTID);
fix_course_sortorder(); // Required to build course_categories.depth and .path.
set_config('defaultrequestcategory', $tempcat->id);
}
/// Move a category to a new parent if required
@@ -394,4 +395,4 @@ function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $
print_category_edit($cat, $displaylist, $parentslist, $depth+1, $up, $down);
}
}
}
}
+5 -2
View File
@@ -1733,9 +1733,9 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
}
if ($completionicon) {
$imgsrc = $OUTPUT->pix_url('i/completion-'.$completionicon);
$imgalt = s(get_string('completion-alt-'.$completionicon, 'completion'));
$imgalt = s(get_string('completion-alt-'.$completionicon, 'completion', $mod->name));
if ($completion == COMPLETION_TRACKING_MANUAL && !$isediting) {
$imgtitle = s(get_string('completion-title-'.$completionicon, 'completion'));
$imgtitle = s(get_string('completion-title-'.$completionicon, 'completion', $mod->name));
$newstate =
$completiondata->completionstate==COMPLETION_COMPLETE
? COMPLETION_INCOMPLETE
@@ -1754,6 +1754,7 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
echo "
<form class='togglecompletion$extraclass' method='post' action='".$CFG->wwwroot."/course/togglecompletion.php'><div>
<input type='hidden' name='id' value='{$mod->id}' />
<input type='hidden' name='modulename' value='".s($mod->name)."' />
<input type='hidden' name='sesskey' value='".sesskey()."' />
<input type='hidden' name='completionstate' value='$newstate' />
<input type='image' src='$imgsrc' alt='$imgalt' title='$imgtitle' />
@@ -2855,6 +2856,8 @@ function delete_course_module($id) {
// very quick on an empty table)
$DB->delete_records('course_modules_completion', array('coursemoduleid' => $cm->id));
$DB->delete_records('course_modules_availability', array('coursemoduleid'=> $cm->id));
$DB->delete_records('course_completion_criteria', array('moduleinstance' => $cm->id,
'criteriatype' => COMPLETION_CRITERIA_TYPE_ACTIVITY));
delete_context(CONTEXT_MODULE, $cm->id);
return $DB->delete_records('course_modules', array('id'=>$cm->id));
+4 -4
View File
@@ -78,7 +78,7 @@ $PAGE->navbar->add($userinfo);
$PAGE->set_title("$course->shortname: $strrecentactivity");
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
echo $OUTPUT->heading(format_string($course->fullname) . ": $userinfo", 3);
echo $OUTPUT->heading(format_string($course->fullname) . ": $userinfo", 2);
$mform->display();
@@ -238,8 +238,8 @@ if (!empty($activities)) {
$modfullname = $modnames[$cm->modname];
$image = "<img src=\"" . $OUTPUT->pix_url('icon', $cm->modname) . "\" class=\"icon\" alt=\"$modfullname\" />";
echo "<h4>$image $modfullname".
" <a href=\"$CFG->wwwroot/mod/$cm->modname/view.php?id=$cm->id\" $linkformat>$name</a></h4>";
echo "<h3>$image $modfullname".
" <a href=\"$CFG->wwwroot/mod/$cm->modname/view.php?id=$cm->id\" $linkformat>$name</a></h3>";
}
} else {
@@ -269,7 +269,7 @@ if (!empty($activities)) {
} else {
echo '<h4><center>' . get_string('norecentactivity') . '</center></h2>';
echo '<h3><center>' . get_string('norecentactivity') . '</center></h3>';
}
+79 -62
View File
@@ -15,10 +15,19 @@
$blocklist = optional_param('blocklist', 0, PARAM_INT);
$modulelist= optional_param('modulelist', '', PARAM_PLUGIN);
$PAGE->set_url('/course/search.php', compact('search', 'page', 'perpage', 'blocklist', 'modulelist', 'edit'));
$PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
$search = trim(strip_tags($search)); // trim & clean raw searched string
// List of minimum capabilities which user need to have for editing/moving course
$capabilities = array('moodle/course:create', 'moodle/category:manage');
// List of category id's in which current user has course:create and category:manage capability.
$usercatlist = array();
// List of parent category id's
$catparentlist = array();
//Populate usercatlist with list of category id's with required capabilities.
make_categories_list($usercatlist, $catparentlist, $capabilities);
$search = trim(strip_tags($search)); // trim & clean raw searched string
if ($search) {
$searchterms = explode(" ", $search); // Search for words independently
foreach ($searchterms as $key => $searchterm) {
@@ -32,7 +41,7 @@
$site = get_site();
$urlparams = array();
foreach (array('search', 'page', 'blocklist', 'modulelist') as $param) {
foreach (array('search', 'page', 'blocklist', 'modulelist', 'edit') as $param) {
if (!empty($$param)) {
$urlparams[$param] = $$param;
}
@@ -41,24 +50,30 @@
$urlparams['perpage'] = $perpage;
}
$PAGE->set_url('/course/search.php', $urlparams);
$PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
$PAGE->set_context(context_system::instance());
$PAGE->set_pagelayout('standard');
if ($CFG->forcelogin) {
require_login();
}
if (can_edit_in_category()) {
//Editing is possible if user have system or category level create and manage capability
if (can_edit_in_category() || !empty($usercatlist)) {
if ($edit !== -1) {
$USER->editing = $edit;
}
$adminediting = $PAGE->user_is_editing();
// Set perpage if user can edit in category
if ($perpage != 99999) {
$perpage = 30;
}
} else {
$adminediting = false;
}
/// Editing functions
if (has_capability('moodle/course:visibility', get_context_instance(CONTEXT_SYSTEM))) {
if (has_capability('moodle/course:visibility', context_system::instance())) {
/// Hide or show a course
if ($hide or $show and confirm_sesskey()) {
if ($hide) {
@@ -74,11 +89,6 @@
}
}
$capabilities = array('moodle/course:create', 'moodle/category:manage');
if (has_any_capability($capabilities, get_context_instance(CONTEXT_SYSTEM)) && ($perpage != 99999)) {
$perpage = 30;
}
$displaylist = array();
$parentlist = array();
make_categories_list($displaylist, $parentlist);
@@ -94,7 +104,7 @@
$strfrontpage = get_string('frontpage', 'admin');
$strnovalidcourses = get_string('novalidcourses');
if (empty($search) and empty($blocklist) and empty($modulelist)) {
if (empty($search) and empty($blocklist) and empty($modulelist) and empty($moveto) and ($edit != -1)) {
$PAGE->navbar->add($strcourses, new moodle_url('/course/index.php'));
$PAGE->navbar->add($strsearch);
$PAGE->set_title("$site->fullname : $strsearch");
@@ -114,18 +124,28 @@
exit;
}
$courses = array();
if (!empty($moveto) and $data = data_submitted() and confirm_sesskey()) { // Some courses are being moved
if (! $destcategory = $DB->get_record("course_categories", array("id"=>$data->moveto))) {
print_error('cannotfindcategory', '', '', $data->moveto);
if (!$destcategory = $DB->get_record("course_categories", array("id" => $moveto))) {
print_error('cannotfindcategory', '', '', $moveto);
}
$courses = array();
//User should have manage and create capablity on destination category.
require_capability('moodle/category:manage', context_coursecat::instance($moveto));
require_capability('moodle/course:create', context_coursecat::instance($moveto));
foreach ( $data as $key => $value ) {
if (preg_match('/^c\d+$/', $key)) {
array_push($courses, substr($key, 1));
$courseid = substr($key, 1);
// user must have category:manage and course:create capability for the course to be moved.
$coursecontext = context_course::instance($courseid);
foreach ($capabilities as $capability) {
require_capability($capability, $coursecontext);
array_push($courses, $courseid);
}
}
}
move_courses($courses, $data->moveto);
move_courses($courses, $moveto);
}
// get list of courses containing blocks if required
@@ -148,9 +168,7 @@
foreach ($courses as $course) {
$courses[$course->id] = $course;
}
}
// get list of courses containing modules if required
elseif (!empty($modulelist) and confirm_sesskey()) {
} elseif (!empty($modulelist) and confirm_sesskey()) { // get list of courses containing modules
$modulename = $modulelist;
$sql = "SELECT DISTINCT c.id FROM {".$modulelist."} module, {course} c"
." WHERE module.course=c.id";
@@ -172,34 +190,26 @@
else {
$totalcount = 0;
}
}
else {
} else if (!empty($searchterm)) { //Donot do search for empty search request.
$courses = get_courses_search($searchterms, "fullname ASC",
$page, $perpage, $totalcount);
}
$searchform = print_course_search($search, true, "navbar");
if (!empty($courses) && has_capability('moodle/course:create', get_context_instance(CONTEXT_SYSTEM))) {
$searchform = '';
// not sure if this capability is the best here
if (has_capability('moodle/category:manage', get_context_instance(CONTEXT_SYSTEM))) {
if ($PAGE->user_is_editing()) {
$string = get_string("turneditingoff");
$edit = "off";
} else {
$string = get_string("turneditingon");
$edit = "on";
}
$aurl = new moodle_url("$CFG->wwwroot/course/search.php", array(
'edit' => $edit,
'sesskey' => sesskey(),
'search' => $search,
'page' => $page,
'perpage' => $perpage));
$searchform = $OUTPUT->single_button($aurl, $string, 'get');
$searchform = '';
//Turn editing should be visible if user have system or category level capability
if (!empty($courses) && (can_edit_in_category() || !empty($usercatlist))) {
if ($PAGE->user_is_editing()) {
$string = get_string("turneditingoff");
$edit = "off";
} else {
$string = get_string("turneditingon");
$edit = "on";
}
$params = array_merge($urlparams, array('sesskey' => sesskey(), 'edit' => $edit));
$aurl = new moodle_url("$CFG->wwwroot/course/search.php", $params);
$searchform = $OUTPUT->single_button($aurl, $string, 'get');
} else {
$searchform = print_course_search($search, true, "navbar");
}
$PAGE->navbar->add($strcourses, new moodle_url('/course/index.php'));
@@ -228,25 +238,30 @@
print_navigation_bar($totalcount, $page, $perpage, $encodedsearch, $modulelink);
if (!$adminediting) {
// Show list of courses
if (!$adminediting) { //Not editing mode
foreach ($courses as $course) {
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
$course->summary .= "<br /><p class=\"category\">";
$course->summary .= "$strcategory: <a href=\"category.php?id=$course->category\">";
$course->summary .= $displaylist[$course->category];
$course->summary .= "</a></p>";
// front page don't belong to any category and block can exist.
if ($course->category > 0) {
$course->summary .= "<br /><p class=\"category\">";
$course->summary .= "$strcategory: <a href=\"category.php?id=$course->category\">";
$course->summary .= $displaylist[$course->category];
$course->summary .= "</a></p>";
}
print_course($course, $search);
echo $OUTPUT->spacer(array('height'=>5, 'width'=>5, 'br'=>true)); // should be done with CSS instead
}
} else {
/// Show editing UI.
} else { //editing mode
echo "<form id=\"movecourses\" action=\"search.php\" method=\"post\">\n";
echo "<div><input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />\n";
echo "<input type=\"hidden\" name=\"search\" value=\"".s($search)."\" />\n";
echo "<input type=\"hidden\" name=\"page\" value=\"$page\" />\n";
echo "<input type=\"hidden\" name=\"perpage\" value=\"$perpage\" /></div>\n";
if (!empty($modulelist) and confirm_sesskey()) {
echo "<input type=\"hidden\" name=\"modulelist\" value=\"$modulelist\" /></div>\n";
} else if (!empty($blocklist) and confirm_sesskey()) {
echo "<input type=\"hidden\" name=\"blocklist\" value=\"$blocklist\" /></div>\n";
}
echo "<table border=\"0\" cellspacing=\"2\" cellpadding=\"4\" class=\"generalbox boxaligncenter\">\n<tr>\n";
echo "<th scope=\"col\">$strcourses</th>\n";
echo "<th scope=\"col\">$strcategory</th>\n";
@@ -255,7 +270,7 @@
foreach ($courses as $course) {
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
$coursecontext = context_course::instance($course->id);
$linkcss = $course->visible ? "" : " class=\"dimmed\" ";
@@ -278,9 +293,8 @@
echo "<td>".$displaylist[$course->category]."</td>\n";
echo "<td>\n";
// this is ok since this will get inherited from course category context
// if it is set
if (has_capability('moodle/category:manage', $coursecontext)) {
// If user has all required capabilities to move course then show selectable checkbox
if (has_all_capabilities($capabilities, $coursecontext)) {
echo "<input type=\"checkbox\" name=\"c$course->id\" />\n";
} else {
echo "<input type=\"checkbox\" name=\"c$course->id\" disabled=\"disabled\" />\n";
@@ -320,13 +334,15 @@
// checks whether user can do site backup
if (has_capability('moodle/backup:backupcourse', $coursecontext)) {
echo "<a title=\"".get_string("backup")."\" href=\"../backup/backup.php?id=$course->id\">\n<img".
$backupurl = new moodle_url('/backup/backup.php', array('id' => $course->id));
echo "<a title=\"".get_string("backup")."\" href=\"".$backupurl."\">\n<img".
" src=\"" . $OUTPUT->pix_url('t/backup') . "\" class=\"iconsmall\" alt=\"".get_string("backup")."\" /></a>\n ";
}
// checks whether user can do restore
if (has_capability('moodle/restore:restorecourse', $coursecontext)) {
echo "<a title=\"".get_string("restore")."\" href=\"../files/index.php?id=$course->id&amp;wdir=/backupdata\">\n<img".
$restoreurl = new moodle_url('/backup/restorefile.php', array('contextid' => $coursecontext->id));
echo "<a title=\"".get_string("restore")."\" href=\"".$restoreurl."\">\n<img".
" src=\"" . $OUTPUT->pix_url('t/restore') . "\" class=\"iconsmall\" alt=\"".get_string("restore")."\" /></a>\n ";
}
@@ -336,7 +352,8 @@
echo "<br />";
echo "<input type=\"button\" onclick=\"checkall()\" value=\"$strselectall\" />\n";
echo "<input type=\"button\" onclick=\"checknone()\" value=\"$strdeselectall\" />\n";
echo html_writer::select($displaylist, 'moveto', '', array(''=>get_string('moveselectedcoursesto')), array('id'=>'movetoid'));
//Select box should only show categories in which user has min capability to move course.
echo html_writer::select($usercatlist, 'moveto', '', array(''=>get_string('moveselectedcoursesto')), array('id'=>'movetoid'));
$PAGE->requires->js_init_call('M.util.init_select_autosubmit', array('movecourses', 'movetoid', false));
echo "</td>\n</tr>\n";
echo "</table>\n</form>";
@@ -382,7 +399,7 @@
$defaultperpage = 10;
//If user has course:create or category:manage capability the show 30 records.
$capabilities = array('moodle/course:create', 'moodle/category:manage');
if (has_any_capability($capabilities, get_context_instance(CONTEXT_SYSTEM))) {
if (has_any_capability($capabilities, context_system::instance())) {
$defaultperpage = 30;
}
+29
View File
@@ -0,0 +1,29 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Defines message providers (types of message sent) for the PayPal enrolment plugin.
*
* @package enrol_authorize
* @copyright 2012 Andrew Davis
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$messageproviders = array(
'authorize_enrolment' => array(),
);
@@ -144,6 +144,7 @@ $string['invalidacctype'] = 'Invalid account type';
$string['isbusinesschecking'] = 'Is business checking?';
$string['logindesc'] = 'This option must be ON. <br /><br />Please ensure that you have turned <a href="{$a->url}">loginhttps ON</a> in Admin >> Variables >> Security.<br /><br />Turning this on will make Moodle use a secure https connection just for the login and payment pages.';
$string['logininfo'] = 'When configuring your Authorize.Net account, the login name is required and you must enter <strong>either</strong> the transaction key <strong>or</strong> the password in the appropriate box. We recommend you enter the transaction key due to security precautions.';
$string['messageprovider:authorize_enrolment'] = 'Authorize.Net enrolment messages';
$string['methodcc'] = 'Credit card';
$string['methodccdesc'] = 'Select credit card and accepted types below';
$string['methodecheck'] = 'eCheck (ACH)';
+1 -1
View File
@@ -233,7 +233,7 @@ function send_welcome_messages($orderdata) {
$a->profileurl = "$CFG->wwwroot/user/view.php?id=$lastuserid";
$a->paymenturl = "$CFG->wwwroot/enrol/authorize/index.php?user=$lastuserid";
$emailmessage = get_string('welcometocoursesemail', 'enrol_authorize', $a);
$subject = get_string("enrolmentnew", '', format_string($SITE->shortname, true, array('context' => get_context_instance(CONTEXT_COURSE, SITEID))));
$subject = get_string("enrolmentnew", 'enrol', format_string($SITE->shortname, true, array('context' => get_context_instance(CONTEXT_COURSE, SITEID))));
$eventdata = new stdClass();
$eventdata->modulename = 'moodle';
+1 -1
View File
@@ -26,7 +26,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2011112902; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2011112900; // Requires this Moodle version
$plugin->component = 'enrol_authorize'; // Full name of the plugin (used for diagnostics)
$plugin->cron = 180;
+13
View File
@@ -689,6 +689,19 @@ class enrol_database_plugin extends enrol_plugin {
$newcourse->idnumber = $fields->idnumber;
$newcourse->category = $fields->category ? $fields->category : $defaultcategory;
// Detect duplicate data once again, above we can not find duplicates
// in external data using DB collation rules...
if ($DB->record_exists('course', array('shortname' => $newcourse->shortname))) {
if ($verbose) {
mtrace(" can not insert new course, duplicate shortname detected: ".$newcourse->shortname);
}
continue;
} else if (!empty($newcourse->idnumber) and $DB->record_exists('course', array('idnumber' => $newcourse->idnumber))) {
if ($verbose) {
mtrace(" can not insert new course, duplicate idnumber detected: ".$newcourse->idnumber);
}
continue;
}
$c = create_course($newcourse);
if ($verbose) {
mtrace(" creating course: $c->id, $c->fullname, $c->shortname, $c->idnumber, $c->category");
+29
View File
@@ -0,0 +1,29 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Defines message providers (types of message sent) for the PayPal enrolment plugin.
*
* @package enrol_flatfile
* @copyright 2012 Andrew Davis
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$messageproviders = array(
'flatfile_enrolment' => array(),
);
@@ -30,6 +30,7 @@ $string['location'] = 'File location';
$string['mailadmin'] = 'Notify admin by email';
$string['mailstudents'] = 'Notify students by email';
$string['mailteachers'] = 'Notify teachers by email';
$string['messageprovider:flatfile_enrolment'] = 'Flat file enrolment messages';
$string['mapping'] = 'Flat file mapping';
$string['pluginname'] = 'Flat file (CSV)';
$string['pluginname_desc'] = 'This method will repeatedly check for and process a specially-formatted text file in the location that you specify.
+1 -1
View File
@@ -26,7 +26,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2011112901; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2011112900; // Requires this Moodle version
$plugin->component = 'enrol_flatfile'; // Full name of the plugin (used for diagnostics)
$plugin->cron = 60;
+29
View File
@@ -0,0 +1,29 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Defines message providers (types of message sent) for the PayPal enrolment plugin.
*
* @package enrol_imsenterprise
* @copyright 2012 Andrew Davis
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$messageproviders = array(
'imsenterprise_enrolment' => array(),
);
@@ -54,6 +54,7 @@ $string['location'] = 'File location';
$string['logtolocation'] = 'Log file output location (blank for no logging)';
$string['mailadmins'] = 'Notify admin by email';
$string['mailusers'] = 'Notify users by email';
$string['messageprovider:imsenterprise_enrolment'] = 'IMS Enterprise enrolment messages';
$string['miscsettings'] = 'Miscellaneous';
$string['processphoto'] = 'Add user photo data to profile';
$string['processphotowarning'] = 'Warning: Image processing is likely to add a significant burden to the server. You are recommended not to activate this option if large numbers of students are expected to be processed.';
+1 -1
View File
@@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2011112901; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2011112900; // Requires this Moodle version
$plugin->component = 'enrol_imsenterprise'; // Full name of the plugin (used for diagnostics)
$plugin->cron = 60;
+41 -28
View File
@@ -764,20 +764,14 @@ class course_enrolment_manager {
$userroles = $this->get_other_users($sort, $direction, $page, $perpage);
$roles = $this->get_all_roles();
$courseid = $this->get_course()->id;
$context = $this->get_context();
$now = time();
$extrafields = get_extra_user_fields($context);
$users = array();
foreach ($userroles as $userrole) {
if (!array_key_exists($userrole->id, $users)) {
$users[$userrole->id] = array(
'userid' => $userrole->id,
'courseid' => $courseid,
'picture' => new user_picture($userrole),
'firstname' => fullname($userrole, true),
'email' => $userrole->email,
'roles' => array()
);
$users[$userrole->id] = $this->prepare_user_for_display($userrole, $extrafields, $now);
}
$a = new stdClass;
$a->role = $roles[$userrole->roleid]->localname;
@@ -800,6 +794,7 @@ class course_enrolment_manager {
break;
}
}
$users[$userrole->id]['roles'] = array();
$users[$userrole->id]['roles'][$userrole->roleid] = array(
'text' => $roletext,
'unchangeable' => !$changeable
@@ -825,7 +820,6 @@ class course_enrolment_manager {
$users = $this->get_users($sort, $direction, $page, $perpage);
$now = time();
$strnever = get_string('never');
$straddgroup = get_string('addgroup', 'group');
$strunenrol = get_string('unenrol', 'enrol');
$stredit = get_string('edit');
@@ -833,7 +827,6 @@ class course_enrolment_manager {
$allroles = $this->get_all_roles();
$assignable = $this->get_assignable_roles();
$allgroups = $this->get_all_groups();
$courseid = $this->get_course()->id;
$context = $this->get_context();
$canmanagegroups = has_capability('moodle/course:managegroups', $context);
@@ -842,36 +835,23 @@ class course_enrolment_manager {
$userdetails = array();
foreach ($users as $user) {
$details = array(
'userid' => $user->id,
'courseid' => $courseid,
'picture' => new user_picture($user),
'firstname' => fullname($user, true),
'lastseen' => $strnever,
'roles' => array(),
'groups' => array(),
'enrolments' => array()
);
foreach ($extrafields as $field) {
$details[$field] = $user->{$field};
}
if ($user->lastaccess) {
$details['lastseen'] = format_time($now - $user->lastaccess);
}
$details = $this->prepare_user_for_display($user, $extrafields, $now);
// Roles
$details['roles'] = array();
foreach ($this->get_user_roles($user->id) as $rid=>$rassignable) {
$details['roles'][$rid] = array('text'=>$allroles[$rid]->localname, 'unchangeable'=>(!$rassignable || !isset($assignable[$rid])));
}
// Users
$usergroups = $this->get_user_groups($user->id);
$details['groups'] = array();
foreach($usergroups as $gid=>$unused) {
$details['groups'][$gid] = $allgroups[$gid]->name;
}
// Enrolments
$details['enrolments'] = array();
foreach ($this->get_user_enrolments($user->id) as $ue) {
if ($ue->timestart and $ue->timeend) {
$period = get_string('periodstartend', 'enrol', array('start'=>userdate($ue->timestart), 'end'=>userdate($ue->timeend)));
@@ -898,6 +878,39 @@ class course_enrolment_manager {
return $userdetails;
}
/**
* Prepare a user record for display
*
* This function is called by both {@link get_users_for_display} and {@link get_other_users_for_display} to correctly
* prepare user fields for display
*
* Please note that this function does not check capability for moodle/coures:viewhiddenuserfields
*
* @param object $user The user record
* @param array $extrafields The list of fields as returned from get_extra_user_fields used to determine which
* additional fields may be displayed
* @param int $now The time used for lastaccess calculation
* @return array The fields to be displayed including userid, courseid, picture, firstname, lastseen and any
* additional fields from $extrafields
*/
private function prepare_user_for_display($user, $extrafields, $now) {
$details = array(
'userid' => $user->id,
'courseid' => $this->get_course()->id,
'picture' => new user_picture($user),
'firstname' => fullname($user, has_capability('moodle/site:viewfullnames', $this->get_context())),
'lastseen' => get_string('never'),
);
foreach ($extrafields as $field) {
$details[$field] = $user->{$field};
}
if ($user->lastaccess) {
$details['lastseen'] = format_time($now - $user->lastaccess);
}
return $details;
}
public function get_manual_enrol_buttons() {
$plugins = $this->get_enrolment_plugins();
$buttons = array();
+1 -1
View File
@@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2011112901; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2011112900; // Requires this Moodle version
$plugin->component = 'enrol_manual'; // Full name of the plugin (used for diagnostics)
+5 -1
View File
@@ -379,7 +379,11 @@ YUI.add('moodle-enrol_manual-quickenrolment', function(Y) {
params['role'] = this.get(UEP.BASE).one('.'+CSS.ENROLMENTOPTION+'.'+CSS.ROLE+' select').get('value');
params['startdate'] = this.get(UEP.BASE).one('.'+CSS.ENROLMENTOPTION+'.'+CSS.STARTDATE+' select').get('value');
params['duration'] = this.get(UEP.BASE).one('.'+CSS.ENROLMENTOPTION+'.'+CSS.DURATION+' select').get('value');
params['recovergrades'] = this.get(UEP.BASE).one('#'+CSS.RECOVERGRADES).get('checked')?1:0;
if (this.get(UEP.DISABLEGRADEHISTORY) != true) {
params['recovergrades'] = this.get(UEP.BASE).one('#'+CSS.RECOVERGRADES).get('checked')?1:0;
} else {
params['recovergrades'] = 0;
}
Y.io(M.cfg.wwwroot+this.get(UEP.AJAXURL), {
method:'POST',
+1 -1
View File
@@ -27,7 +27,7 @@
$string['error_multiplehost'] = 'Some instance of MNet enrolment plugin already exists for this host. Only one instance per host and/or one instance for \'All hosts\' is allowed.';
$string['instancename'] = 'Enrolment method name';
$string['instancename_help'] = 'You can optionally rename this instance of the MNet enrolment method. If you leave this field empty, the default instance name will be used, containing the name of the remote host and the assigned role for their users.';
$string['mnet_enrol_description'] = 'Publish this service to allow administrators at {$a} to enrol their students in courses you have created on your server.<br/><ul><li><em>Dependency</em>: You must also <strong>publish</strong> the SSO (Service Provider) service to {$a}.</li><li><em>Dependency</em>: You must also <strong>subscribe</strong> to the SSO (Identity Provider) service on {$a}.</li></ul><br/>Subscribe to this service to be able to enrol your students in courses on {$a}.<br/><ul><li><em>Dependency</em>: You must also <strong>subscribe</strong> to the SSO (Service Provider) service on {$a}.</li><li><em>Dependency</em>: You must also <strong>publish</strong> the SSO (Identity Provider) service to {$a}.</li></ul><br/>';
$string['mnet_enrol_description'] = 'Publish this service to allow administrators at {$a} to enrol their students in courses you have created on your server.<br/><ul><li><em>Dependency</em>: You must also <strong>subscribe</strong> to the SSO (Identity Provider) service on {$a}.</li><li><em>Dependency</em>: You must also <strong>publish</strong> the SSO (Service Provider) service to {$a}.</li></ul><br/>Subscribe to this service to be able to enrol your students in courses on {$a}.<br/><ul><li><em>Dependency</em>: You must also <strong>publish</strong> the SSO (Identity Provider) service to {$a}.</li><li><em>Dependency</em>: You must also <strong>subscribe</strong> to the SSO (Service Provider) service on {$a}.</li></ul><br/>';
$string['mnet_enrol_name'] = 'Remote enrolment service';
$string['pluginname'] = 'MNet remote enrolments';
$string['pluginname_desc'] = 'Allows remote MNet host to enrol their users into our courses.';
+19 -22
View File
@@ -48,33 +48,30 @@ $manager = new course_enrolment_manager($PAGE, $course, $filter);
$table = new course_enrolment_other_users_table($manager, $PAGE);
$PAGE->set_url('/enrol/otherusers.php', $manager->get_url_params()+$table->get_url_params());
/***
* Actions will go here
*/
$userdetails = array (
'picture' => false,
'firstname' => get_string('firstname'),
'lastname' => get_string('lastname'),
);
$extrafields = get_extra_user_fields($context);
foreach ($extrafields as $field) {
$userdetails[$field] = get_user_field_name($field);
}
/*$fields = array(
'userdetails' => array (
'picture' => false,
'firstname' => get_string('firstname'),
'lastname' => get_string('lastname'),
'email' => get_string('email')
),
'lastseen' => get_string('lastaccess'),
'role' => array(
'roles' => get_string('roles', 'role'),
'context' => get_string('context')
)
);*/
$fields = array(
'userdetails' => array (
'picture' => false,
'firstname' => get_string('firstname'),
'lastname' => get_string('lastname'),
'email' => get_string('email')
),
'userdetails' => $userdetails,
'lastseen' => get_string('lastaccess'),
'role' => get_string('roles', 'role')
);
// Remove hidden fields if the user has no access
if (!has_capability('moodle/course:viewhiddenuserfields', $context)) {
$hiddenfields = array_flip(explode(',', $CFG->hiddenuserfields));
if (isset($hiddenfields['lastaccess'])) {
unset($fields['lastseen']);
}
}
$table->set_fields($fields, $OUTPUT);
//$users = $manager->get_other_users($table->sort, $table->sortdirection, $table->page, $table->perpage);
+29
View File
@@ -0,0 +1,29 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Defines message providers (types of message sent) for the PayPal enrolment plugin.
*
* @package enrol_paypal
* @copyright 2012 Chris Follin
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$messageproviders = array(
'paypal_enrolment' => array(),
);
+5 -5
View File
@@ -243,7 +243,7 @@ while (!feof($fp)) {
$eventdata->name = 'paypal_enrolment';
$eventdata->userfrom = $teacher;
$eventdata->userto = $user;
$eventdata->subject = get_string("enrolmentnew", '', $shortname);
$eventdata->subject = get_string("enrolmentnew", 'enrol', $shortname);
$eventdata->fullmessage = get_string('welcometocoursetext', '', $a);
$eventdata->fullmessageformat = FORMAT_PLAIN;
$eventdata->fullmessagehtml = '';
@@ -262,8 +262,8 @@ while (!feof($fp)) {
$eventdata->name = 'paypal_enrolment';
$eventdata->userfrom = $user;
$eventdata->userto = $teacher;
$eventdata->subject = get_string("enrolmentnew", '', $shortname);
$eventdata->fullmessage = get_string('enrolmentnewuser', '', $a);
$eventdata->subject = get_string("enrolmentnew", 'enrol', $shortname);
$eventdata->fullmessage = get_string('enrolmentnewuser', 'enrol', $a);
$eventdata->fullmessageformat = FORMAT_PLAIN;
$eventdata->fullmessagehtml = '';
$eventdata->smallmessage = '';
@@ -281,8 +281,8 @@ while (!feof($fp)) {
$eventdata->name = 'paypal_enrolment';
$eventdata->userfrom = $user;
$eventdata->userto = $admin;
$eventdata->subject = get_string("enrolmentnew", '', $shortname);
$eventdata->fullmessage = get_string('enrolmentnewuser', '', $a);
$eventdata->subject = get_string("enrolmentnew", 'enrol', $shortname);
$eventdata->fullmessage = get_string('enrolmentnewuser', 'enrol', $a);
$eventdata->fullmessageformat = FORMAT_PLAIN;
$eventdata->fullmessagehtml = '';
$eventdata->smallmessage = '';
+1
View File
@@ -44,6 +44,7 @@ $string['enrolstartdate_help'] = 'If enabled, users can be enrolled from this da
$string['mailadmins'] = 'Notify admin';
$string['mailstudents'] = 'Notify students';
$string['mailteachers'] = 'Notify teachers';
$string['messageprovider:paypal_enrolment'] = 'PayPal enrolment messages';
$string['nocost'] = 'There is no cost associated with enrolling in this course!';
$string['paypal:config'] = 'Configure PayPal enrol instances';
$string['paypal:manage'] = 'Manage enrolled users';
+1 -1
View File
@@ -26,6 +26,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2011112900; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2011112901; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2011112900; // Requires this Moodle version
$plugin->component = 'enrol_paypal'; // Full name of the plugin (used for diagnostics)
+13 -1
View File
@@ -183,6 +183,18 @@ $fields = array(
'group' => get_string('groups', 'group'),
'enrol' => get_string('enrolmentinstances', 'enrol')
);
// Remove hidden fields if the user has no access
if (!has_capability('moodle/course:viewhiddenuserfields', $context)) {
$hiddenfields = array_flip(explode(',', $CFG->hiddenuserfields));
if (isset($hiddenfields['lastaccess'])) {
unset($fields['lastseen']);
}
if (isset($hiddenfields['groups'])) {
unset($fields['group']);
}
}
$table->set_fields($fields, $renderer);
$canassign = has_capability('moodle/role:assign', $manager->get_context());
@@ -202,4 +214,4 @@ $PAGE->set_heading($PAGE->title);
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('enrolledusers', 'enrol'));
echo $renderer->render($table);
echo $OUTPUT->footer();
echo $OUTPUT->footer();
+5 -7
View File
@@ -193,20 +193,18 @@ if ($mform->is_cancelled()) {
$data->feedbackformat = $old_grade_grade->feedbackformat;
}
// update final grade or feedback
// when we set override grade the first time, it happens here
$grade_item->update_final_grade($data->userid, $data->finalgrade, 'editgrade', $data->feedback, $data->feedbackformat);
$grade_grade = new grade_grade(array('userid'=>$data->userid, 'itemid'=>$grade_item->id), true);
$grade_grade->grade_item =& $grade_item; // no db fetching
if (has_capability('moodle/grade:manage', $context) or has_capability('moodle/grade:edit', $context)) {
if (!grade_floats_different($data->finalgrade, $old_grade_grade->finalgrade)
and $data->feedback === $old_grade_grade->feedback) {
// change overridden flag only if grade or feedback not changed
if (!isset($data->overridden)) {
$data->overridden = 0; // checkbox
}
$grade_grade->set_overridden($data->overridden);
// change overridden flag
if (!isset($data->overridden)) {
$data->overridden = 0; // checkbox unticked
}
$grade_grade->set_overridden($data->overridden);
}
if (has_capability('moodle/grade:manage', $context) or has_capability('moodle/grade:hide', $context)) {
+1 -1
View File
@@ -73,7 +73,7 @@ class edit_grade_form extends moodleform {
}
$mform->addElement('select', 'finalgrade', get_string('finalgrade', 'grades'), $scaleopt);
$mform->addHelpButton('finalgrade', 'finalgrade', 'finalgrade');
$mform->addHelpButton('finalgrade', 'finalgrade', 'grades');
$mform->disabledIf('finalgrade', 'overridden', 'notchecked');
}
+1 -1
View File
@@ -325,7 +325,7 @@ function grade_get_gradable_activities($courseid, $modulename='') {
$params = array($courseid, $modulename, GRADE_TYPE_NONE, $modulename);
$sql = "SELECT cm.*, m.name, md.name as modname
FROM {grade_items} gi, {course_modules} cm, {modules} md, {$modulename} m
FROM {grade_items} gi, {course_modules} cm, {modules} md, {{$modulename}} m
WHERE gi.courseid = ? AND
gi.itemtype = 'mod' AND
gi.itemmodule = ? AND
+1 -1
View File
@@ -46,7 +46,7 @@ switch ($action) {
if (!empty($userid) && !empty($itemid) && $newvalue !== false && !empty($type)) {
// Save the grade or feedback
if (!$grade_item = grade_item::fetch(array('id'=>$itemid, 'courseid'=>$courseid))) { // we must verify course id here!
print_error('invalidgradeitmeid');
print_error('invalidgradeitemid');
}
/**
+1 -7
View File
@@ -22,7 +22,6 @@ require_once $CFG->dirroot.'/grade/report/grader/lib.php';
$courseid = required_param('id', PARAM_INT); // course id
$page = optional_param('page', 0, PARAM_INT); // active page
$perpageurl = optional_param('perpage', 0, PARAM_INT);
$edit = optional_param('edit', -1, PARAM_BOOL); // sticky editting mode
$sortitemid = optional_param('sortitemid', 0, PARAM_ALPHANUM); // sort by which grade item
@@ -127,12 +126,6 @@ if ($data = data_submitted() and confirm_sesskey() and has_capability('moodle/gr
$warnings = array();
}
// Override perpage if set in URL
if ($perpageurl) {
$report->user_prefs['studentsperpage'] = $perpageurl;
}
// final grades MUST be loaded after the processing
$report->load_users();
$numusers = $report->get_numusers();
@@ -162,6 +155,7 @@ if ($USER->gradeediting[$course->id] && ($report->get_pref('showquickfeedback')
echo '<input type="hidden" value="'.s($courseid).'" name="id" />';
echo '<input type="hidden" value="'.sesskey().'" name="sesskey" />';
echo '<input type="hidden" value="grader" name="report"/>';
echo '<input type="hidden" value="'.$page.'" name="page"/>';
echo $reporthtml;
echo '<div class="submit"><input type="submit" value="'.s(get_string('update')).'" /></div>';
echo '</div></form>';
+5 -6
View File
@@ -135,12 +135,11 @@ class grade_report_grader extends grade_report {
$this->baseurl = new moodle_url('index.php', array('id' => $this->courseid));
$studentsperpage = $this->get_pref('studentsperpage');
if (!empty($studentsperpage)) {
$this->baseurl->params(array('perpage' => $studentsperpage, 'page' => $this->page));
if (!empty($this->page)) {
$this->baseurl->params(array('page' => $this->page));
}
$this->pbarurl = new moodle_url('/grade/report/grader/index.php', array('id' => $this->courseid, 'perpage' => $studentsperpage));
$this->pbarurl = new moodle_url('/grade/report/grader/index.php', array('id' => $this->courseid));
$this->setup_groups();
@@ -198,7 +197,7 @@ class grade_report_grader extends grade_report {
}
if (!$gradeitem = grade_item::fetch(array('id'=>$itemid, 'courseid'=>$this->courseid))) { // we must verify course id here!
print_error('invalidgradeitmeid');
print_error('invalidgradeitemid');
}
// Pre-process grade
@@ -778,7 +777,7 @@ class grade_report_grader extends grade_report {
$headerlink = $this->gtree->get_element_header($element, true, $this->get_pref('showactivityicons'), false);
$itemcell = new html_table_cell();
$itemcell->attributes['class'] = $type . ' ' . $catlevel . 'highlightable';
$itemcell->attributes['class'] = $type . ' ' . $catlevel . ' highlightable';
if ($element['object']->is_hidden()) {
$itemcell->attributes['class'] .= ' hidden';
+19 -3
View File
@@ -310,6 +310,7 @@ class grade_report_user extends grade_report {
$hidden = '';
$excluded = '';
$class = '';
$classfeedback = '';
// If this is a hidden grade category, hide it completely from the user
if ($type == 'category' && $grade_object->is_hidden() && !$this->canviewhidden && (
@@ -344,6 +345,17 @@ class grade_report_user extends grade_report {
($this->showhiddenitems == GRADE_REPORT_USER_HIDE_UNTIL && !$grade_grade->is_hiddenuntil()))) {
// return false;
} else {
// The grade object can be marked visible but still be hidden
// if "enablegroupmembersonly" is on and its an activity assigned to a grouping the user is not in
if (!empty($grade_object->itemmodule) && !empty($grade_object->iteminstance)) {
$instances = $this->gtree->modinfo->get_instances();
if (!empty($instances[$grade_object->itemmodule][$grade_object->iteminstance])) {
$cm = $instances[$grade_object->itemmodule][$grade_object->iteminstance];
if (!$cm->uservisible) {
return false;
}
}
}
/// Excluded Item
if ($grade_grade->is_excluded()) {
$fullname .= ' ['.get_string('excluded', 'grades').']';
@@ -366,6 +378,10 @@ class grade_report_user extends grade_report {
/// Actual Grade
$gradeval = $grade_grade->finalgrade;
if ($this->showfeedback) {
// Copy $class before appending itemcenter as feedback should not be centered
$classfeedback = $class;
}
$class .= " itemcenter ";
if ($this->showweight) {
$data['weight']['class'] = $class;
@@ -475,13 +491,13 @@ class grade_report_user extends grade_report {
// Feedback
if ($this->showfeedback) {
if ($grade_grade->overridden > 0 AND ($type == 'categoryitem' OR $type == 'courseitem')) {
$data['feedback']['class'] = $class.' feedbacktext';
$data['feedback']['class'] = $classfeedback.' feedbacktext';
$data['feedback']['content'] = get_string('overridden', 'grades').': ' . format_text($grade_grade->feedback, $grade_grade->feedbackformat);
} else if (empty($grade_grade->feedback) or (!$this->canviewhidden and $grade_grade->is_hidden())) {
$data['feedback']['class'] = $class.' feedbacktext';
$data['feedback']['class'] = $classfeedback.' feedbacktext';
$data['feedback']['content'] = '&nbsp;';
} else {
$data['feedback']['class'] = $class.' feedbacktext';
$data['feedback']['class'] = $classfeedback.' feedbacktext';
$data['feedback']['content'] = format_text($grade_grade->feedback, $grade_grade->feedbackformat);
}
}
+2 -2
View File
@@ -33,8 +33,8 @@
.user-grade td.item {border-left: 1px solid gray;border-right: 1px solid gray;}
.user-grade td.excluded {background-color: #666;}
.user-grade td.hidden {color: #aaa;}
.user-grade td.feedbacktext {max-width:600px;padding:0;}
.user-grade td.feedbacktext {max-width:600px;padding:2px 2px;}
.pagelayout-report .user-grade .feedbacktext .no-overflow {overflow:auto;padding:0.25em;}
table.user-grade td.feedbacktext {text-align:left;width: 40%;font-size: 0.8em;white-space:normal;}
table.user-grade td.itemcenter {text-align:center;}
table.user-grade td.itemcenter {text-align:center;}
+1 -1
View File
@@ -205,7 +205,7 @@ echo '<p><input type="submit" name="act_updatemembers" id="updatemembers" value=
. get_string('showmembersforgroup', 'group') . '" /></p>'."\n";
echo '<p><input type="submit" '. $showeditgroupsettingsform_disabled . ' name="act_showgroupsettingsform" id="showeditgroupsettingsform" value="'
. get_string('editgroupsettings', 'group') . '" /></p>'."\n";
echo '<p><input type="submit" '. $deletegroup_disabled . ' name="act_deletegroup" onclick="onDeleteGroup()" id="deletegroup" value="'
echo '<p><input type="submit" '. $deletegroup_disabled . ' name="act_deletegroup" id="deletegroup" value="'
. get_string('deleteselectedgroup', 'group') . '" /></p>'."\n";
echo '<p><input type="submit" name="act_showcreateorphangroupform" id="showcreateorphangroupform" value="'
+1 -1
View File
@@ -20,7 +20,7 @@ $cancel = optional_param('cancel', false, PARAM_BOOL);
$group = $DB->get_record('groups', array('id'=>$groupid), '*', MUST_EXIST);
$course = $DB->get_record('course', array('id'=>$group->courseid), '*', MUST_EXIST);
$PAGE->set_url('/groups/members.php', array('id'=>$groupid));
$PAGE->set_url('/group/members.php', array('group'=>$groupid));
$PAGE->set_pagelayout('standard');
require_login($course);
+9 -9
View File
@@ -34,6 +34,13 @@
redirect_if_major_upgrade_required();
$urlparams = array();
if (!empty($CFG->defaulthomepage) && ($CFG->defaulthomepage == HOMEPAGE_MY) && optional_param('redirect', 1, PARAM_BOOL) === 0) {
$urlparams['redirect'] = 0;
}
$PAGE->set_url('/', $urlparams);
$PAGE->set_course($SITE);
if ($CFG->forcelogin) {
require_login();
} else {
@@ -42,13 +49,6 @@
$hassiteconfig = has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
$urlparams = array();
if ($CFG->defaulthomepage == HOMEPAGE_MY && optional_param('redirect', 1, PARAM_BOOL) === 0) {
$urlparams['redirect'] = 0;
}
$PAGE->set_url('/', $urlparams);
$PAGE->set_course($SITE);
/// If the site is currently under maintenance, then print a message
if (!empty($CFG->maintenance_enabled) and !$hassiteconfig) {
print_maintenance_message();
@@ -62,9 +62,9 @@
// Redirect logged-in users to My Moodle overview if required
if (optional_param('setdefaulthome', false, PARAM_BOOL)) {
set_user_preference('user_home_page_preference', HOMEPAGE_SITE);
} else if ($CFG->defaulthomepage == HOMEPAGE_MY && optional_param('redirect', 1, PARAM_BOOL) === 1) {
} else if (!empty($CFG->defaulthomepage) && ($CFG->defaulthomepage == HOMEPAGE_MY) && optional_param('redirect', 1, PARAM_BOOL) === 1) {
redirect($CFG->wwwroot .'/my/');
} else if (!empty($CFG->defaulthomepage) && $CFG->defaulthomepage == HOMEPAGE_USER) {
} else if (!empty($CFG->defaulthomepage) && ($CFG->defaulthomepage == HOMEPAGE_USER)) {
$PAGE->settingsnav->get('usercurrentsettings')->add(get_string('makethismyhome'), new moodle_url('/', array('setdefaulthome'=>true)), navigation_node::TYPE_SETTING);
}
}
+1
View File
@@ -55,6 +55,7 @@ $string['memorylimithelp'] = '<p>El límit de memòria del PHP del vostre servid
<p><blockquote>php_value memory_limit 40M</blockquote></p>
<p>Tanmateix, en alguns servidors això farà que no funcioni <b>cap</b> pàgina PHP (es visualitzaran errors) en el qual cas hauríeu de suprimir el fitxer .htaccess.</p></li>
</ol>';
$string['pathssubdataroot'] = 'Necessiteu un espai on Moodle pugui desar els fitxers penjats. Aquest directori hauria de tenir permisos de lectura I ESCRIPTURA per a l\'usuari del servidor web (normalment \'nobody\' o \'apache\'), però no cal que sigui accessible directament via web. L\'instal·lador provarà de crear-lo si no existeix.';
$string['phpversion'] = 'Versió PHP';
$string['phpversionhelp'] = '<p>Moodle necessita la versió de PHP 4.1.0 o posterior.</p>
<p>A hores d\'ara esteu utilitzant la versió {$a}.</p>
+6 -6
View File
@@ -30,13 +30,13 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatelangdir'] = 'Verzeichnis "lang" kann nicht angelegt werden';
$string['cannotcreatetempdir'] = 'Das Verzeichnis "temp" kann nicht angelegt werden.';
$string['cannotdownloadcomponents'] = 'Einige Komponenten können nicht heruntergeladen werden.';
$string['cannotcreatelangdir'] = 'Verzeichnis \'lang\' wurde nicht angelegt';
$string['cannotcreatetempdir'] = 'Das Verzeichnis \'temp\' wurde nicht angelegt';
$string['cannotdownloadcomponents'] = 'Einige Komponenten können nicht geladen werden.';
$string['cannotdownloadzipfile'] = 'ZIP-Datei kann nicht heruntergeladen werden.';
$string['cannotfindcomponent'] = 'Eine Komponente kann nicht gefunden werden';
$string['cannotsavemd5file'] = 'Die md5-Datei kann nicht gespeichert werden';
$string['cannotsavezipfile'] = 'Die ZIP-Datei kann nicht gespeichert werden';
$string['cannotfindcomponent'] = 'Komponente wurde nicht gefunden';
$string['cannotsavemd5file'] = 'Die md5-Datei wurde nicht gespeichert';
$string['cannotsavezipfile'] = 'Die ZIP-Datei wurde nicht gespeichert';
$string['cannotunzipfile'] = 'Die Datei kann nicht entpackt werden';
$string['componentisuptodate'] = 'Die Komponente ist aktuell.';
$string['downloadedfilecheckfailed'] = 'Die Überprüfung der heruntergeladenen Datei ist gescheitert';
+35
View File
@@ -0,0 +1,35 @@
<?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/>.
/**
* Automatically generated strings for Moodle 2.2 installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = 'de_du';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Deutsch community';
+6
View File
@@ -32,7 +32,13 @@ defined('MOODLE_INTERNAL') || die();
$string['clianswerno'] = 'ei';
$string['cliansweryes'] = 'jah';
$string['cliincorrectvalueerror'] = 'Viga, vigane väärtus "{$a->value}" "{$a->option}"-le';
$string['cliincorrectvalueretry'] = 'Vale väärtus(value), palun proovige uuesti';
$string['clitypevalue'] = 'tüübi väärtus';
$string['clitypevaluedefault'] = 'sisesta väärtus, vajuta Enter kasutamaks vaikeväärtust ({$a})';
$string['cliunknowoption'] = 'Tundmatud valikud:
{$a}
Palun kasuta --help valikut.';
$string['cliyesnoprompt'] = 'kirjuta y (tähendab jah) või n (tähendab ei)';
$string['environmentrequireinstall'] = 'on nõutud, et oleks installeeritud ja võimaldatud';
$string['environmentrequireversion'] = 'versioon {$a->needed} on nõutud, Sinul on jooksmas versioon {$a->current}';
+2
View File
@@ -38,9 +38,11 @@ $string['cannotfindcomponent'] = 'Ei leia komponenti.';
$string['cannotsavemd5file'] = 'Ei saa salvestada md5 faili.';
$string['cannotsavezipfile'] = 'Ei saa salvestada ZIP faili.';
$string['cannotunzipfile'] = 'Ei saa lahti pakkida faili.';
$string['componentisuptodate'] = 'Komponent on ajakohane';
$string['downloadedfilecheckfailed'] = 'Alla laetud faili kontroll ebaõnnestus.';
$string['invalidmd5'] = 'Vigane md5';
$string['missingrequiredfield'] = 'Mõned nõutud väljad on puudu';
$string['remotedownloaderror'] = 'Komponendi alla tõmbamine serverisse ebaõnnestus, palun kontrolli proksi seadeid, PHP cURL laiendus on tungivalt soovitatav.<br /><br />Sa pead tõmbama <a href="{$a->url}">{$a->url}</a> faili käsitsi, kopeerima selle "{$a->dest}" oma serveris ja pakkima lahti sinna.';
$string['wrongdestpath'] = 'Vale sihtrada.';
$string['wrongsourcebase'] = 'Vale allika URL\'i baas.';
$string['wrongzipfilename'] = 'Vale ZIP failinimi.';
+18
View File
@@ -34,13 +34,18 @@ $string['admindirname'] = 'Administreerimiskataloog';
$string['availablelangs'] = 'Saadaval keelte nimekiri';
$string['chooselanguagehead'] = 'Keele valik';
$string['chooselanguagesub'] = 'Palun vali keel, mida kasutatakse AINULT installeerimise käigus. Hiljem saab valida õpikeskkonna ja kasutajate keelt.';
$string['clialreadyinstalled'] = 'Fail config.php juba eksisteerib, palun kasuta admin/cli/upgrade.php kui soovid uuendada oma saiti.';
$string['cliinstallheader'] = 'Moodle {$a} käsurea põhine installeerimise programm';
$string['databasehost'] = 'Andmebaasi host';
$string['databasename'] = 'Andmebaasi nimi';
$string['databasetypehead'] = 'Vali andmebaasi draiver';
$string['dataroot'] = 'Andmete kataloog';
$string['datarootpermission'] = 'Andmete kataloogide õigus';
$string['dbprefix'] = 'Tabeli eesliide';
$string['dirroot'] = 'Moodle kataloog';
$string['environmenthead'] = 'Keskkonna kontrollimine...';
$string['environmentsub2'] = 'Iga Moodle väljalaskel on oma minimaalne PHP versiooni nõue ja kohustuslikud PHP laiendused.
Täielik keskkonna kontroll tehakse enne iga installeerimist ja uuendamist. Palun võta ühendust serveri administraatoriga, kui sa ei sa kuidas installeerida või võimaldada PHP laiendusi.';
$string['errorsinenvironment'] = 'Keskkonna sobivuse kontroll ebaõnnestus!';
$string['installation'] = 'Installeerimine';
$string['langdownloaderror'] = 'Kahjuks keelt "{$a}" ei paigaldatud. Paigaldamine jätkub inglise keeles.';
@@ -58,6 +63,16 @@ See lubab Moodle\'il ise mälu limiiti määrata.</li>
$string['paths'] = 'Rajad';
$string['pathserrcreatedataroot'] = 'Andmete kataloogi ({$a->dataroot}) ei saa installeerija luua.';
$string['pathshead'] = 'Radade kinnitused';
$string['pathsrodataroot'] = 'Andmete juurkataloog (Dataroot) ei ole kirjutatav.';
$string['pathsroparentdataroot'] = 'Ülemkataloog ({$a->parent}) ei ole kirjutatav. Installeerija ei saanud andmete kataloogi ({$a->dataroot}) luua.';
$string['pathssubadmindir'] = 'Väga vähesed veebihostid kasutavad /admin spetsiaalse URL-na, et pääseda ligi kontrollpaneelile või millegile sarnasele. Kahjuks on see konfliktis Moodle administreerimislehtedega. Sa saad olukorda parandada, kui nimetad kataloogi admin ümber oma üaigalduses ning kirjutad selle uue nime siia. Näiteks: <em>moodleadmin</em>. See parandab administreerimisliidese lingid Moodle\'s.';
$string['pathssubdataroot'] = 'Sa pead näitama koha, kuhu Moodle saaks salvestada üles laetud failid. See kataloog peab olema loetav JA KIRJUTATAV veebiserveri kasutaja poolt (tavaliselt \'nobody\' or \'apache\'), samas see kataloog ei tohiks olla ligipääsetav otse veebi kaudu. Kui kataloogi ei eksisteeri, siis installeerija püüab selle ise luua.';
$string['pathssubdirroot'] = 'Täistee Moodle paigalduse kataloogile.';
$string['pathssubwwwroot'] = 'Täielik veebiaadress, kust kaudu Moodle\'le ligi pääsetakse.
Ei ole võimalik kasutada mitmest kohast kohast ligipääsu.
Kui Su sait omab mitut avalikku aadress, siis pead seadistama ümbersuunamised kõikidelt teistest aadressidelt.
Kui Su sait on ligipääsetav nii Internetist kui intranetist (sisevõrgust), siis kasuta Interneti ehk avalikku aadressi ja seadista DNS sellisellt, et intraneti kasutajad kasutaksid ka avalikku aadressi.
Kui aadress pole korrektne, siis palun muuda URL oma brauseris, et taasalustada installeerimist erineva väärtusega.';
$string['pathsunsecuredataroot'] = 'Andmete juurkataloogi asukoht pole turvamine';
$string['pathswrongadmindir'] = 'Admin kataloogi ei eksisteeri';
$string['phpextension'] = '{$a} PHP laiendus';
@@ -67,6 +82,9 @@ $string['phpversionhelp'] = '<p>Moodle vajab vähemalt PHP versiooni 4.1.0</p>
<p>Sa pead oma PHP-d uuendama või kolima hosti, kus on uuem PHP versioon!</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Sa näed seda lehte, sest oled edukalt installeerinud ja käivitanud <strong>{$a->packname} {$a->packversion}</strong> paketi Sinu arvutis. Õnnitleme!';
$string['welcomep30'] = 'See <strong>{$a->installername}</strong> väljalase rakendusi loomaks keskkonda, millel <strong>Moodle</strong> hakkab will operate, namely:';
$string['welcomep40'] = 'Pakett sisaldab ka <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
$string['welcomep50'] = 'Kasutamaks kõiki selle rakendusi selles paketis on kaetud nende vastavad litsentsid. Täielik <strong>{$a->installername}</strong> pakett on <a href="http://www.opensource.org/docs/definition_plain.html">avatud lähtekoodil</a> ja jaotatud <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> litsentsi alusel.';
$string['welcomep60'] = 'Järgnevatel lehtedel juhitakse sind läbi mõnede lihtsate sammude seadistamaks ja seadmaks üles <strong>Moodle</strong> oma arvutis. Sa võid nõustuda vaikeväärtustega või fakultatiivselt täiendada vastavalt oma vajadustele.';
$string['welcomep70'] = 'Vajuta "Järgmine" nuppu all jätkamaks <strong>Moodle</strong> paigaldamisega.';
$string['wwwroot'] = 'Veebiaadress';
+1
View File
@@ -30,5 +30,6 @@
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = '';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Eesti';
+4 -4
View File
@@ -86,10 +86,10 @@ $string['pathsunsecuredataroot'] = 'ספריית המידע (Data Directory) ל
$string['pathswrongadmindir'] = 'ספריית ה-admin לא קיימת';
$string['phpextension'] = 'הרחבת PHP {$a}';
$string['phpversion'] = 'גירסת PHP';
$string['phpversionhelp'] = '<p>גירסת PHP חייבת להיות לפחות 4.3.0 או 5.1.0 (בגירסאות 5.0.x קיימות מספר בעיות ידועות) </p>
<p> במערכת שלך פועלת כרגע גירסת {$a} </p>
<p> אתה חייב לשדרג את גירסת ה-PHP שלך או לעבור למחשב מארח עם עם גירסת PHP חדשה! <br/>
(במקרים של גרסת 5.0.x תוכל גם לרדת בגירסה ל- 4.4.x)
$string['phpversionhelp'] = '<p>גרסת PHP חייבת להיות לפחות 4.3.0 או 5.1.0 (בגרסאות 5.0.x קיימות מספר בעיות ידועות) </p>
<p> במערכת שלך פועלת כרגע גרסת {$a} </p>
<p> אתה חייב לשדרג את גרסת ה-PHP שלך או לעבור למחשב מארח עם עם גירסת PHP חדשה! <br/>
(במקרים של גרסת 5.0.x תוכל גם לרדת בגרסה ל- 4.4.x)
</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'הינך רואה את עמוד זה מפני שהתקנת והפעלת בהלכה את <strong>{$a->packname} {$a->packversion}</strong>
+1 -1
View File
@@ -35,7 +35,7 @@ $string['availablelangs'] = 'Popis dostupnih jezika';
$string['chooselanguagehead'] = 'Odaberite jezik';
$string['chooselanguagesub'] = 'Molimo odaberite jezik instalacije. Ovaj jezik će biti korišten kao zadani jezik sustava, a kasnije to možete lagano promijeniti.';
$string['clialreadyconfigured'] = 'Datoteka config.php već postoji. Upotrijebite naredbu admin/cli/install_database.php ako želite nastaviti instalaciju.';
$string['clialreadyinstalled'] = 'Datoteka config.php već postoji. Upotrijebite naredbu admin/cli/upgrade.php ako želite nadograditi svoj sustav.';
$string['clialreadyinstalled'] = 'Datoteka config.php već postoji. Upotrijebite naredbu admin/cli/upgrade.php ako želite nadograditi ovaj sustav.';
$string['cliinstallheader'] = 'Moodle {$a} program za instalaciju iz naredbenog retka';
$string['databasehost'] = 'Poslužitelj baze podataka (HOST)';
$string['databasename'] = 'Naziv baze podataka';
+1
View File
@@ -30,4 +30,5 @@
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = 'da';
$string['thislanguage'] = 'Kalaallisut';
+2
View File
@@ -34,12 +34,14 @@ $string['admindirname'] = 'Admin-map';
$string['availablelangs'] = 'Lijst met beschikbare talen';
$string['chooselanguagehead'] = 'Kies een taal';
$string['chooselanguagesub'] = 'Kies een taal voor de installatie. Deze taal zal ook als standaardtaal voor de site gebruikt worden, maar die instelling kun je later nog wijzigen.';
$string['clialreadyconfigured'] = 'Bestand config.php bestaat al, maak aub gebruik van admin/cli/install_database.php indien je deze site wenst te installeren.';
$string['clialreadyinstalled'] = 'Bestand config.php bestaat al. Gebruik admin/cil/upgrade.php om je site te upgraden.';
$string['cliinstallheader'] = 'Moodle {$a} command line installatieprogramma';
$string['databasehost'] = 'Databank host:';
$string['databasename'] = 'Datanbanknaam:';
$string['databasetypehead'] = 'Kies databankdriver';
$string['dataroot'] = 'Gegevensmap';
$string['datarootpermission'] = 'Toestemming datamappen';
$string['dbprefix'] = 'Tabelvoorvoegsel';
$string['dirroot'] = 'Moodle-map';
$string['environmenthead'] = 'Omgeving controleren ...';

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