Compare commits

..

1007 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 2713f92d62 Moodle release 2.3.4 2013-01-11 22:21:52 +01:00
Eloy Lafuente (stronk7) dbee98b2e6 weekly release 2.3.3+ 2013-01-11 12:33:07 +01:00
Eloy Lafuente (stronk7) 039cd4a52a Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2013-01-11 12:16:51 +01:00
Eloy Lafuente (stronk7) 0eda863c21 MDL-37420 rework pg schema (partial backport take2) 2013-01-11 11:36:48 +01:00
Eloy Lafuente (stronk7) fa02465c54 MDL-37420 rework pg schema (partial backport of 92b00c3) 2013-01-11 10:34:19 +01:00
Eloy Lafuente (stronk7) 72cb5eda5c Merge branch 'MDL-37467-blogs_23' of git://github.com/mudrd8mz/moodle into MOODLE_23_STABLE 2013-01-10 18:13:27 +01:00
David Mudrák 40440a5847 MDL-37467 Do not provide blog posts via RSS when blogging is disabled 2013-01-10 17:04:23 +01:00
Eloy Lafuente (stronk7) b15e5d7252 Merge branch 'MDL-36741_m23' of git://github.com/markn86/moodle into MOODLE_23_STABLE 2013-01-10 11:14:07 +01:00
Mark Nelson 6f003159a2 MDL-36741 mod_forum: fixed the function forum_rss_newstuff that was using count_records_sql incorrectly as well as generating RSS content when no data exists 2013-01-10 18:00:16 +08:00
Andrew Robert Nicols 6b16846e83 MDL-36600 Add missing sesskey check when previewing the message 2013-01-10 10:20:36 +08:00
Dan Poltawski 8b9929247e Revert "MDL-xxxx show appropriate instance status on user enrolments page"
This was incorrectly integrated

This reverts commit 0431cc0e16.
2013-01-10 09:40:19 +08:00
Dan Poltawski fdd6de9177 Merge branch 'wip-MDL-36367-s23' of git://github.com/phalacee/moodle into MOODLE_23_STABLE 2013-01-09 09:50:54 +08:00
Eloy Lafuente (stronk7) cd7802517f Merge branch 'w51_MDL-37420_m23_pgschema' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2013-01-09 01:33:20 +01:00
Andrew Robert Nicols 0cc875b7d0 MDL-36600 user: improve course messaging checks 2013-01-09 09:22:37 +13:00
Eloy Lafuente (stronk7) a2eaf8896d Merge branch 'w51_MDL-37152_m23_smtp' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2013-01-08 18:02:51 +01:00
Petr Škoda 090c684838 MDL-37420 add support for more PostgreSQL schemas 2013-01-08 17:46:54 +01:00
Dan Poltawski 7c333e0c6c Merge branch 'MDL-32639-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2013-01-08 14:46:34 +08:00
Petr Škoda 0431cc0e16 MDL-xxxx show appropriate instance status on user enrolments page 2013-01-08 14:22:59 +08:00
Jason Fowler a201a0ff4e MDL-36620 - Blog, RSS - Preventing Guests from viewing the RSS of site level blogs
Conflicts:
	blog/rsslib.php
2013-01-08 14:07:53 +08:00
Dan Poltawski 27b92b4a71 Merge branch 'w51_MDL-37191_m23_plugindelete' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2013-01-08 11:17:05 +08:00
Dan Poltawski 3de2dc19e1 Merge branch 'MDL-31641_drag_drop_help_23' of git://github.com/davosmith/moodle into MOODLE_23_STABLE 2013-01-08 10:54:24 +08:00
Charles Fulton 3ee53f7e7f MDL-35130 shibboleth: remove hard-coded string 2013-01-08 10:51:25 +08:00
Dan Poltawski b943d77cd2 Merge branch 'MDL-36456-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2013-01-08 10:31:10 +08:00
Dan Poltawski c7ad6f4504 Merge branch 'w51_MDL-37301_m23_coursecatinfoas' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2013-01-08 10:27:12 +08:00
Dan Poltawski 053f6ebc42 Merge branch 'w51_MDL-37254_m23_courseinfoas' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2013-01-08 10:24:21 +08:00
Sam Hemelryk b7af1eee2d Merge branch 'wip-mdl-36958-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2013-01-08 14:06:36 +13:00
David Mudrák 53499f8d35 MDL-36977 Be more picky when it comes to migrating files in moodle1 backups 2013-01-08 08:54:29 +08:00
David Mudrák 02a6f3b04f MDL-36977 Add more unit tests for moodle1 backup conversion 2013-01-08 08:54:29 +08:00
Eloy Lafuente (stronk7) 5050a19ff7 Merge branch 'MDL-35794_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-01-07 22:38:48 +01:00
Eloy Lafuente (stronk7) 0858993db8 Merge branch 'MDL-35792_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-01-07 22:36:29 +01:00
Davo Smith db529c2346 MDL-31641 filemanager - display help message when drag and drop upload is not supported 2013-01-07 08:16:35 +00:00
Didier Raboud 7db20e0073 MDL-37157: Normalize short answers before comparison
This ensures that ambiguous Unicode representations can be compared sanely.
Also add some tests to ensure it keeps working.

Thanks to Tim Hunt for the syntax check.
2013-01-07 14:00:26 +08:00
Dan Poltawski 1f1dc87fc1 Merge branch 'w51_MDL-37128_m23_rssrestore' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2013-01-07 13:57:10 +08:00
Dan Poltawski d068c79e48 Merge branch 'w51_MDL-36893_m23_mnetestrict' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2013-01-07 13:53:29 +08:00
Dan Poltawski b0c49cea12 Merge branch 'MDL-27884-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2013-01-07 13:30:43 +08:00
Damyon Wiese 7e57119342 MDL-37244 Assignment: Submission comments plugin does not implement comments callbacks.
This allows anyone to view or modify anyone elses submission comments.
2013-01-07 10:49:20 +08:00
Ankit Agarwal 77a7ed6535 MDL-33340 completion: Incorrect logic in hidden field check
Credit to Jody Steele
2013-01-07 10:37:38 +08:00
Simon Coggins 1e8335fb82 MDL-35991 - use PARAM_LOCALURL for local urls 2013-01-07 10:10:32 +08:00
Dan Poltawski 523dafe824 Merge branch 'MDL-36667-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2013-01-07 09:45:15 +08:00
Sam Hemelryk fc77cb3d85 Merge branch 'MDL-37161-moodle23' of https://github.com/StudiUM/moodle into MOODLE_23_STABLE 2013-01-07 14:14:28 +13:00
Sam Hemelryk 178a5b4102 Merge branch 'w51_MDL-36212_m23_entities' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2013-01-07 13:44:36 +13:00
Sam Hemelryk 52817fdbbc Merge branch 'MDL-37068_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-01-07 13:39:52 +13:00
Sam Hemelryk 757376d7dd Merge branch 'w51_MDL-37281_m23_othersnav' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2013-01-07 13:33:45 +13:00
Sam Hemelryk a68bc19fa6 Merge branch 'MDL-36855-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2013-01-07 12:04:51 +13:00
Charles Fulton c1fcc89f71 MDL-4781 forum: show discussion link when user has ability to view discussion
Conflicts:
	mod/forum/lib.php
2013-01-07 11:17:58 +13:00
Davo Smith 318b859ac8 MDL-35887 course dndupload - correct default used for completion tracking when resources created by drag and drop 2013-01-07 11:07:45 +13:00
Sam Hemelryk d9402acd03 Merge branch 'MDL-16730-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2013-01-07 10:14:54 +13:00
Mark Nelson 70badb4824 MDL-37359 groups: fixing typo in the web service function create_groupings_parameters 2013-01-07 09:47:49 +13:00
Sam Hemelryk a3a84720d3 Merge branch 'MDL-29327_none_23' of git://github.com/andyjdavis/moodle into MOODLE_23_STABLE 2013-01-07 09:34:52 +13:00
Sam Hemelryk a589b0dc77 Merge branch 'MDL-36741_m23' of git://github.com/markn86/moodle into MOODLE_23_STABLE 2013-01-07 09:15:34 +13:00
Jean-Philippe Gaudreau d71792da4f MDL-37161 Backup: Database error caused by grade book settings when importing or restoring a course 2013-01-04 09:53:03 -05:00
Damyon Wiese 3f1b2800ae MDL-36712: Assignment - Do not always send feedback available emails when grade is created
The entry in the assign_grades table contains grades feedback and other settings such as locked.
Only send the student an email about new feedback if it is actually grades or feedback that
has been added. This is done by using another state for the mailed flag (2) which means "unset".

Conflicts:

	mod/assign/feedback/file/importziplib.php
	mod/assign/feedback/file/locallib.php
	mod/assign/feedback/offline/locallib.php
	mod/assign/locallib.php
2013-01-04 15:02:50 +08:00
Andrew Davis d674a0e16f MDL-29327 core_grade: removing some code that is messing up the categories and items screen when no grade categories are used 2013-01-04 08:58:25 +08:00
Ankit Agarwal 7f7e18c3a2 MDL-36855 scorm: update to api get_scorm_question_count()
get_scorm_question_count() should return 0 not 1 when no attempt is made in a scorm by any student
2013-01-03 14:42:18 +08:00
Ankit Agarwal 2e505a05d1 MDL-27884 Implement proper username validation during csv import 2013-01-02 14:10:16 +08:00
Ankit Agarwal f439b4242c MDL-27884 blocks: Correcting config title string
AMOS BEGIN
 CPY [configtitle,block_html],[configtitle,block_tags]
AMOS END

Conflicts:

	blocks/tags/edit_form.php
	blocks/tags/lang/en/block_tags.php
2013-01-02 10:54:51 +08:00
AMOS bot c2f393b2b5 Automatically generated installer lang files 2013-01-01 00:43:01 +00:00
Eloy Lafuente (stronk7) 10ad21dc9a weekly release 2.3.3+ 2012-12-30 01:05:13 +01:00
Petr Škoda 00f9bca84a MDL-36893 fix mnet E_STRICT issue 2012-12-27 14:33:37 +01:00
Petr Škoda 575d91977e MDL-37128 fix E_STRICT rss restore issue 2012-12-27 13:41:20 +01:00
Petr Škoda a340e04df7 MDL-37301 fix missing AS in select
This was breaking pg 8.3. Credit goes to Thomas Robb, thanks.
2012-12-26 22:27:34 +01:00
Dan Poltawski 48d53d9fd6 Merge branch 'MDL-35569-m23' of git://github.com/sammarshallou/moodle into MOODLE_23_STABLE 2012-12-24 11:43:41 +08:00
Dan Poltawski cd665c200d Merge branch 'w51_MDL-37233_m23_skype' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-12-24 11:34:55 +08:00
Dan Poltawski 1cb195dabc Merge branch 'wip-MDL-37290-m23' of git://github.com/samhemelryk/moodle into MOODLE_23_STABLE 2012-12-24 10:55:37 +08:00
Dan Poltawski ca0cbfd4db Merge branch 'w51_MDL-37283_m23_spell' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-12-24 10:35:47 +08:00
Sam Hemelryk 76dee48562 MDL-37290 course: fixed up navbar when editing categories 2012-12-24 13:06:25 +13:00
Sam Hemelryk 185eff01fa Merge branch 'wip-MDL-35833-stable23' of git://github.com/phalacee/moodle into MOODLE_23_STABLE 2012-12-24 11:43:37 +13:00
Sam Hemelryk fec305739d Merge branch 'MDL-36966-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2012-12-24 11:16:07 +13:00
Sam Hemelryk 2c292b48da Merge branch 'wip-MDL-35653-MOODLE_23_STABLE' of git://github.com/abgreeve/moodle into MOODLE_23_STABLE 2012-12-24 09:40:36 +13:00
Petr Škoda a3243760c2 MDL-37283 import tinymce spellchecker 2.0.6.1 2012-12-22 16:48:13 +01:00
Tim Hunt 18651b0bfa MDL-37068 qformat_learnwise: fix UTF8 and other issues. 2012-12-22 15:15:20 +00:00
Thanh Le e349d18435 MDL-35794 quiz: config for whether Outcomes are advanced settings 2012-12-22 15:15:13 +00:00
Thanh Le 5b8d9521ee MDL-35792 question preview: way to update options without restarting.
It is useful, and possible, to update the display options without
restarting the question. You now only have to restart if you are
changing the maximum mark or the behaviour.
2012-12-22 15:15:06 +00:00
Petr Škoda 8d5769593d MDL-37281 fix other users current navigation node 2012-12-22 14:59:40 +01:00
Petr Škoda 92fc5a670d MDL-37152 remove bogus $mail->IsSMTP() breaking non-smtp mailing
Credit goes to Aurelijus Bruzas, thanks.
2012-12-22 14:48:47 +01:00
Petr Škoda c92a386ba4 MDL-37254 add missing AS keyword 2012-12-22 14:13:19 +01:00
Petr Škoda 7ea870a33e MDL-37233 do not show skype status icon on https sites
Funny that the same company that implemented the IE security warnings is unable to set up SSL on the Skype status server…
2012-12-21 17:28:05 +01:00
Petr Škoda 8cc55f3058 MDL-37191 do not timeout when uninstalling plugins 2012-12-21 16:00:59 +01:00
Petr Škoda ea0f9a277c MDL-36212 rework html entity conversions
This should resolve all html entity conversion problems in different PHP versions.
2012-12-20 22:49:20 +01:00
Eloy Lafuente (stronk7) 4a76321356 weekly release 2.3.3+ 2012-12-20 21:12:09 +01:00
Eloy Lafuente (stronk7) e84b8c3f5c Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2012-12-20 20:57:28 +01:00
Jason Fowler 0fa9c9ff12 MDL-35833 - Blocks - Adding alt and title attributes to the docked-block panel close button 2012-12-20 10:41:47 +08:00
Tim Hunt c0267dc549 MDL-32245 question bank: update URL after moving question between categories.
Also, improve the URL when you go to edit the questions in a category.
2012-12-20 12:12:37 +13:00
Andrew Robert Nicols 1365b07390 MDL-36934 Only set the autosubmit class on selects when required
The url_select class can optionally show a button (much like the non-JS
fallback). In this case, the autosubmit nature of the form shouldn't be
enforced and it should only submit on the button.
2012-12-19 12:27:17 +00:00
Adrian Greeve eb883f0fa4 MDL-35653 - mod/wiki: Force format now lets users edit wiki pages.
Thanks to Tõnis Tartes for part of this solution.

When force format was selected in the options, trying to view the
wiki would redirect to the front page with a message saying that
you do not have permission to edit this page. Students had no way
of viewing any entries or creating the first page.

When in force format it skips a page , which would be considered
uncessary for students, but this means that the group id is not set
and this is what is causing most of the problems.

I also have included a check to see if the title is default and whether
the user has permission to view all groups. In these situations the
intermediate page is displayed.
2012-12-19 08:54:12 +08:00
Eloy Lafuente (stronk7) 9af7c81879 Merge branch 'w50_MDL-36245_m23_convert' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-12-18 23:43:06 +01:00
Andrew Robert Nicols 5eadb30e07 MDL-35569 AJAX Move auto-submitting selects to separate YUI module
sam note: Some changes removed from 2.4 version (deprecation warning, lib/upgrade.txt).
2012-12-18 13:56:26 +00:00
Matt Oquist d032ed7b0c MDL-36958 Forum: Replaced hard-coded numbers with proper defines 2012-12-18 17:24:34 +08:00
Dan Poltawski 2ea7723c53 Merge branch 'MDL-37014_webdav_folders_23' of git://github.com/davosmith/moodle into MOODLE_23_STABLE 2012-12-18 14:52:41 +08:00
Dan Poltawski 568349fee7 MDL-36259 - change case of table alias to match definition 2012-12-18 14:27:13 +08:00
Dan Poltawski 60b5ffebf5 Merge branch 'MDL-36259_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-12-18 14:26:10 +08:00
Dan Poltawski 8d8158ea9c Merge branch 'MDL-30899_23' of git://github.com/dmonllao/moodle into MOODLE_23_STABLE 2012-12-18 09:11:31 +08:00
Raymond Wijaya 4c1d7cf9b6 MDL-36966 Assignment: Bug - Student submission appears graded by themselves.
Fix a bug when a student editing his submission after it has been graded, it changes the 'graded by' details to the student's name in the feeback summary
2012-12-18 08:47:14 +08:00
Dan Poltawski 2e791b966d Merge branch 'MDL-35740-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2012-12-18 08:45:48 +08:00
Eloy Lafuente (stronk7) af794e19f3 Merge branch 'MDL-36842_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-12-18 00:19:55 +01:00
Eloy Lafuente (stronk7) 877960cfdf Merge branch 'w50_MDL-37171_m23_outdatedexcel' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-12-18 00:14:04 +01:00
Adrian Fish 2ad0b3a12a MDL-37035 Pass user locale after course locale. 2012-12-18 10:32:29 +13:00
Sam Hemelryk 59fc0958d6 Merge branch 'w50_MDL-37111_m23_forumsinglefirst' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-12-18 10:24:32 +13:00
Sam Hemelryk b3f46160b4 Merge branch 'MDL-37176_23' of git://github.com/stronk7/moodle into MOODLE_23_STABLE 2012-12-18 10:12:11 +13:00
Sam Hemelryk 5c65ad28b4 Merge branch 'MDL-35530_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE 2012-12-18 10:07:03 +13:00
Sam Hemelryk 6c9a77ba0c Merge branch 'wip-MDL-35056-stable23' of git://github.com/phalacee/moodle into MOODLE_23_STABLE 2012-12-18 09:56:58 +13:00
Sam Hemelryk 20da16bb77 Merge branch 'MDL-32245_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-12-18 09:51:30 +13:00
Sam Hemelryk f6a3850949 MDL-36812 grader_report: Fixed whitespace on integration 2012-12-18 09:48:06 +13:00
Nadav Kavalerchik e83a4dcdd8 MDL-36812 - Enabling grade_report_fixedstudents, shows the user's list on the left side of the page, in RTL mode (theme/standard) 2012-12-18 09:48:05 +13:00
Sam Hemelryk c20213441e Merge branch 'MDL-29733_23' of git://github.com/andyjdavis/moodle into MOODLE_23_STABLE 2012-12-18 09:42:06 +13:00
Tim Hunt f4564374d7 MDL-37098 quiz: event handler fails deleting group with no overrides
This was a regression from MDL-35717.
2012-12-17 17:01:05 +00:00
Dan Poltawski 2144749571 MDL-35717|NOBUG - fix trailing whitespace problems 2012-12-17 17:01:04 +00:00
Matt Petro 30ef79639c MDL-35717 quiz: fix overdue attempt processing 2012-12-17 17:00:52 +00:00
David Monllao 1a4bfac4db MDL-30899 moodle-enrol-notification Overridding default footer padding 2012-12-17 15:36:40 +08:00
David Monllao 49ca31880c MDL-30899 moodle-enrol-notification Adding close button title for accessibility 2012-12-17 15:36:33 +08:00
Dan Poltawski c3e3fd380d Merge branch 'w50_MDL-36493_m23_mysql' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-12-17 15:29:18 +08:00
Dan Poltawski 4dd80797b5 Merge branch 'MDL-37114_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-12-17 15:25:30 +08:00
Andrew Davidson 139d78a828 MDL-37034 - Added appropriate name to category settings navigation node 2012-12-17 15:22:07 +08:00
Dan Poltawski 5c7c78db26 Merge branch 'w50_MDL-36597_m23_courselang' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-12-17 13:53:33 +08:00
Dan Poltawski 8e81a8eb2c Merge branch 'MDL-29334_m23' of git://github.com/markn86/moodle into MOODLE_23_STABLE 2012-12-17 13:48:25 +08:00
Dan Poltawski 160d3c6b8a Merge branch 'wip-mdl-36736-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2012-12-17 12:09:46 +08:00
Dan Poltawski 0869ef50f0 Merge branch 'wip-MDL-25928-m23' of git://github.com/samhemelryk/moodle into MOODLE_23_STABLE 2012-12-17 12:05:19 +08:00
Dan Poltawski 12a3697281 Merge branch 'wip-MDL-35874-stable23' of git://github.com/phalacee/moodle into MOODLE_23_STABLE 2012-12-17 11:53:08 +08:00
Dan Poltawski f28b5664eb Merge branch 'wip-MDL-35979-s23' of git://github.com/phalacee/moodle into MOODLE_23_STABLE 2012-12-17 11:48:47 +08:00
Dan Poltawski bda079183e Merge branch 'MDL-37078-m23' of git://github.com/sammarshallou/moodle into MOODLE_23_STABLE 2012-12-17 11:37:10 +08:00
Dan Poltawski 71c3eff427 Merge branch 'MDL-37165-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2012-12-17 11:30:35 +08:00
Sam Hemelryk 5f9106b7f2 MDL-25928 course: Fixed course info on the combo list to be a popup 2012-12-17 16:03:42 +13:00
Petr Škoda a530b69dd5 MDL-37171 fix multiple spreadsheet related PHP4isms 2012-12-15 12:41:02 +01:00
Petr Škoda 91438d7894 MDL-36245 add tests for the buggy utf-8 to utf-8 conversion 2012-12-15 11:51:21 +01:00
Petr Škoda f16a143872 MDL-36245 try to workaround buggy iconv() when converting text from utf-8 to utf-8 2012-12-15 11:51:21 +01:00
Petr Škoda 84b9192875 MDL-36493 improve timeout handling in mysql upgrade
Credit goes to Mark Nielsen, thanks.
2012-12-15 11:44:55 +01:00
Petr Škoda 4df8d1924d MDL-36493 improve performance of mysql unsigned/lob upgrade 2012-12-15 11:44:55 +01:00
Petr Škoda 372bfa208c MDL-37111 copy first post files in single type forum using intro options
This patch also removed the delete button from the first post in single
discussion type forum.

Edit button in the first post leads to the forum edit page now, this should
prevent other problems throwing first post and intro out of sync.
2012-12-15 11:24:56 +01:00
Petr Škoda fb5d7df075 MDL-36597 strip '_utf8' from all course.lang fields 2012-12-15 11:18:59 +01:00
Joseph Rezeau d057719e98 MDL-37114 quiz form validation: feedback boundaries.
The feedback boundaries must either be a number or a percentage.
We were not correctly validating the non-percentage case.
2012-12-15 10:07:58 +00:00
Thanh Le defbd5dd2c MDL-36259 course short names: ensure it displays when enabled in admin
Fixed 5 Moodle pages that does not display the course short name even if "Display extended course names" setting is on.  In fixing this, search.php also included related minor code to change to minimise DB calls to improve performance.
2012-12-15 10:07:40 +00:00
Tim Hunt c49b83bccc MDL-32245 question bank: fix coding style in categories.php 2012-12-15 10:07:09 +00:00
Thanh Le 99231022af MDL-32245 question bank: fix moving categories between contexts. 2012-12-15 10:07:08 +00:00
AMOS bot 188c725387 Automatically generated installer lang files 2012-12-15 00:42:08 +00:00
Eloy Lafuente (stronk7) cdfb784e52 MDL-37176 timezones: updated to 2012j 2012-12-14 20:08:45 +01:00
Eloy Lafuente (stronk7) 7d2c5cd0a0 weekly release 2.3.3+ 2012-12-14 13:30:25 +01:00
Eloy Lafuente (stronk7) 4e6157ca5f Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2012-12-14 13:20:49 +01:00
Frederic Massart 50cff3c0cb MDL-36456 repository: S3 handles errors in a nicer way 2012-12-14 17:57:02 +08:00
Damyon Wiese 63fd639d85 MDL-37165 Assignment: Oracle fix for count_submissions_with_status (and friends).
Oracle does not like the use of AS after a join.
2012-12-14 15:16:06 +08:00
Dan Poltawski 271bfb48b8 Merge branch 'MDL-36263-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2012-12-13 17:43:21 +08:00
Damyon Wiese 6a1bcbfdab MDL-36263 Assignment: Fix backport for counting submissions of unenrolled students 2012-12-13 17:41:17 +08:00
Eloy Lafuente (stronk7) 87e9ea1f67 Merge branch 'MDL-30700-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2012-12-13 10:32:38 +01:00
Jason Fowler e98a1a118e MDL-35874 - Blocks - Adding a label to the 'Add a block' block's select field 2012-12-13 15:10:18 +08:00
Jason Fowler d4f5439de2 MDL-35056 - Backup/Restore - Converting the 'Unmet Dependencies' Message to be a Developer Debug message to make moodle less confusing to the average user 2012-12-13 11:11:29 +08:00
Damyon Wiese 4d8125b1c7 MDL-30700 tablelib: Fixed get_sort_for_table to work with text sorting columns for oracle
This change stores the list of columns that require text sorting in the session,
so the static function "get_sort_for_table" can work without any additional parameters.
2012-12-13 09:59:04 +08:00
Dan Poltawski 137d63fe96 Merge branch 'MDL-36897_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-12-13 09:55:07 +08:00
sam marshall c520e08653 MDL-37078: Restore - section restore fails with multiple availability conditions 2012-12-12 12:19:59 +00:00
Davo Smith 4615b7b6ff MDL-37014 repository_webdav - strip the server URL from file & folder paths returned by webdav lib (if present) 2012-12-12 08:46:59 +00:00
Tim Hunt d8a7ef0e42 MDL-36897 quiz review: fixup previous commit. 2012-12-12 08:13:43 +00:00
Frederic Massart 03f8841d9b MDL-32639 files: Zipping a folder does not overwrite existing files 2012-12-12 14:41:08 +08:00
Frederic Massart aa4d973436 MDL-32639 files: Improved File Manager download and zip support
Conflicts:

	lib/filestorage/zip_packer.php
2012-12-12 14:41:04 +08:00
Mark Nelson f2f5a5fc0e MDL-29334 mod_data: if site-wide presets created in <= 1.9 exist convert them to 2.x 2012-12-12 13:07:03 +08:00
Dan Poltawski 9391d2f4cf Merge branch 'wip-MDL-33448-m23' of git://github.com/samhemelryk/moodle into MOODLE_23_STABLE 2012-12-12 09:38:03 +08:00
Cathal O'Riordan 18a0b829a4 MDL-36644 Assignment: prepend the course upload limit to the options array
Ensure that the course upload limit is the first option in the list of available choices for the Maximum submission size select.
2012-12-12 08:57:21 +08:00
Dan Poltawski 8869233e26 Merge branch 'm23_MDL-35737' of git://github.com/danmarsden/moodle into MOODLE_23_STABLE 2012-12-12 08:44:13 +08:00
AMOS bot bdefe732c5 Automatically generated installer lang files 2012-12-12 00:41:20 +00:00
Sam Hemelryk 3ad9a3fda3 Merge branch 'MDL-27619_23' of git://github.com/pauln/moodle into MOODLE_23_STABLE 2012-12-12 11:09:32 +13:00
Eloy Lafuente (stronk7) 106c4841a7 Merge branch 'MDL-32880_23_3' of git://github.com/pauln/moodle into MOODLE_23_STABLE 2012-12-11 22:50:08 +01:00
Sam Hemelryk 27f4a337a0 MDL-29805 redirect: added check REQUIRE_CORRECT_ACCESS is true 2012-12-12 09:47:00 +13:00
Sam Hemelryk 1b39edd662 Merge branch 'MDL-29805-23' of git://github.com/mouneyrac/moodle into MOODLE_23_STABLE 2012-12-12 09:45:03 +13:00
Sam Hemelryk 09fc0fde35 Merge branch 'MDL-35593-23' of git://github.com/mouneyrac/moodle into MOODLE_23_STABLE 2012-12-12 09:38:27 +13:00
Sam Hemelryk 6e89cdb35f Merge branch 'wip_23_mdl-37088_bad_operator_ldap_sync_user' of https://github.com/iarenaza/moodle into MOODLE_23_STABLE 2012-12-12 09:34:31 +13:00
Sam Hemelryk eb49335150 Merge branch 'MDL-36321_message_participants_23' of git://github.com/andyjdavis/moodle into MOODLE_23_STABLE 2012-12-12 09:28:58 +13:00
Eloy Lafuente (stronk7) ecdee4a925 Merge branch 'MDL-30700-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2012-12-11 19:58:19 +01:00
Dan Poltawski def1725853 Merge branch 'w49_MDL-36447_m23_gdtest' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-12-11 17:54:51 +08:00
Dan Poltawski 7350e439bf Merge branch 'MDL-36243_23' of git://github.com/jmvedrine/moodle into MOODLE_23_STABLE 2012-12-11 16:24:34 +08:00
Dan Poltawski eba170d8fc Merge branch 'wip-MDL-36108-stable23' of git://github.com/phalacee/moodle into MOODLE_23_STABLE 2012-12-11 16:03:41 +08:00
Damyon Wiese c8aa33ea2c MDL-35740 Assignment: Show students the status of own submission on overview page.
This is a minimal patch just for backporting to 23.
2012-12-11 16:01:23 +08:00
Jason Fowler a5dbb601ce MDL-36108 - Blocks - Online User block's user image's alt attribute is now empty to prevent repetition of text for screen readers 2012-12-11 15:49:27 +08:00
Damyon Wiese 0887f75587 MDL-30700 Assignment 2.2: Added text_sorting function to tablelib
Allows oracle to sort by text (clob) columns (should be used sparingly).
2012-12-11 15:41:56 +08:00
Dan Poltawski f2190bac6c Merge branch 'MDL-36712-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2012-12-11 14:01:14 +08:00
Dan Poltawski 1ff0a314c9 Merge branch 'MDL-36591-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2012-12-11 13:57:11 +08:00
Dan Poltawski 556f228a9e Merge branch 'MDL-36897_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-12-11 13:54:23 +08:00
Dan Poltawski a2f2dbb5dc Merge branch 'w49_MDL-36685_m23_tablecells' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-12-11 13:44:01 +08:00
Dan Poltawski f55f2e48ca Merge branch 'MDL-34791-MOODLE_23_STABLE' of git://git.luns.net.uk/moodle into MOODLE_23_STABLE 2012-12-11 13:23:08 +08:00
Dan Poltawski 1c570f9096 Merge branch 'MDL-36808-m23' of git://github.com/sammarshallou/moodle into MOODLE_23_STABLE 2012-12-11 12:19:46 +08:00
Petr Škoda 1d2b58b5dd MDL-36983 fix incorrect test method name
Credit goes to David Scotson, thanks.
2012-12-11 12:10:43 +08:00
Dan Poltawski a2577a7cc3 Merge branch 'w49_MDL-36892_m23_enrolreadme' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-12-11 12:07:22 +08:00
Dan Poltawski 957dfed5f2 Merge branch 'MDL-36845_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-12-11 11:58:54 +08:00
Aparup Banerjee 4e66b8908c Merge branch 'w49_MDL-36817_m23_composer' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-12-11 11:54:53 +08:00
Dan Poltawski f95ba651fc Merge branch 'MDL-36828_23' of https://github.com/aolley/moodle into MOODLE_23_STABLE 2012-12-11 11:44:40 +08:00
Dan Poltawski 10c8b7390c Merge branch 'wip-MDL-36110-s23' of git://github.com/phalacee/moodle into MOODLE_23_STABLE 2012-12-11 11:33:22 +08:00
Dan Poltawski 5d1dff532e Merge branch 'wip-MDL-35884-s23' of git://github.com/phalacee/moodle into MOODLE_23_STABLE 2012-12-11 11:17:43 +08:00
Jason Fowler 2874baa411 MDL-35884 - Course - Fixing bad whitespace/character return 2012-12-11 11:12:17 +08:00
Jason Fowler 4885064053 MDL-35884 - Course - Remove text from ALT attribute for activity chooser 2012-12-11 11:11:49 +08:00
Sam Hemelryk 39a36d7d7b Merge branch 'MDL-36650_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-12-11 16:11:08 +13:00
Dan Poltawski 3f358a021b Merge branch 'MDL-36025-negative-zero-MOODLE_23_STABLE' of git://github.com/mpetrowi/moodle into MOODLE_23_STABLE 2012-12-11 11:07:43 +08:00
Sam Hemelryk b54470f497 Merge branch 'w49_MDL-36731_m23_uploadestrict' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-12-11 16:04:13 +13:00
Sam Hemelryk 237ea8768c Merge branch 'MDL-36905_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE 2012-12-11 15:44:32 +13:00
Dan Poltawski b2fa6cfa93 Merge branch 'MDL-34052-23' of https://github.com/damyon/moodle into MOODLE_23_STABLE 2012-12-11 10:39:42 +08:00
Dan Poltawski 8f647f1d3a Merge branch 'w49_MDL-31424_m23_paypalcase' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-12-11 10:31:44 +08:00
Sam Hemelryk 2e6538382a Merge branch 'MDL-36942_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-12-11 15:04:17 +13:00
Sam Hemelryk b74804c8a8 Merge branch 'MDL-36954_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-12-11 14:59:50 +13:00
Dan Poltawski 14802ee558 Merge branch 'MDL-36773-23' of git://github.com/mouneyrac/moodle into MOODLE_23_STABLE 2012-12-11 09:56:47 +08:00
Petr Škoda 702ac0ce02 MDL-37061 always validate lang when setting session user
This should resolve problems with TinyMCE langs and some unknown MUCH caching issue.
2012-12-11 14:44:41 +13:00
Andrew Davis 72754427b6 MDL-36321 core_message: made the course participants list correctly show if course participants are contacts or not 2012-12-11 08:55:25 +08:00
Petr Škoda f6ca5cf303 MDL-29442 add missing utf-8 to entity html encoding and decoding 2012-12-11 10:23:12 +13:00
Sam Hemelryk 3c805e592c Merge branch 'MDL-36263-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2012-12-11 10:10:07 +13:00
Sam Hemelryk f1cf05cbbe Merge branch 'MDL-36601-MOODLE_23_STABLE' of git://git.luns.net.uk/moodle into MOODLE_23_STABLE 2012-12-11 09:41:49 +13:00
Sam Hemelryk 667dfa5e7c Merge branch 'MDL-36805-MOODLE_23_STABLE' of git://git.luns.net.uk/moodle into MOODLE_23_STABLE 2012-12-11 09:14:59 +13:00
Iñaki Arenaza c31d0566d7 MDL-37088 auth_ldap: bad operator in ldap sync_user() method 2012-12-10 16:48:14 +01:00
Andrew Robert Nicols 53e1e390f3 MDL-34791 AJAX Update a graded activity's title in the gradebook on rename 2012-12-10 14:15:27 +00:00
Andrew Robert Nicols 8fdecaa51a MDL-36805 Correct docs for workshop_grade_item_update in mod_workshop
The documentation suggested that the modname field should be present on the
$workshop parameter when this is not required. It is not used in any point
in the function and the $workshop variable is never passed to another
function which may use it.
2012-12-10 12:27:30 +00:00
Dan Poltawski 1423ab3709 Merge branch 'w49_MDL-36737_m23_glossstrict' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-12-10 19:37:41 +08:00
Vadim Dvorovenko 4dcae0d897 MDL-32639 files: Removing '0' start folder in archives created with filemanager
Signed-off-by: Vadim Dvorovenko <vadimon@mail.ru>
2012-12-10 18:10:58 +08:00
Dan Poltawski ae4e512f66 Merge branch 'MDL-36167-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2012-12-10 17:32:30 +08:00
Dan Poltawski b0473b9bf0 Merge branch 'MDL-36732_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-12-10 15:18:24 +08:00
Dan Poltawski 8bd7536090 Merge branch 'MDL-36742_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-12-10 14:41:48 +08:00
Dan Poltawski 870d2fff8e Merge branch 'MDL-36549_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE 2012-12-10 14:19:10 +08:00
Dan Poltawski 66586db224 Merge branch 'MDL-36835-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2012-12-10 14:02:24 +08:00
Dan Poltawski d4d6cce500 Merge branch 'MDL-36538_webdav_memory_23' of git://github.com/davosmith/moodle into MOODLE_23_STABLE 2012-12-10 13:13:11 +08:00
Dan Poltawski 6078f84d9f Merge branch 'w49_MDL-35456_m23_paypal' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-12-10 12:03:33 +08:00
Dan Poltawski 8ffe246d69 Merge branch 'MDL-35404_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-12-10 11:36:49 +08:00
Sam Hemelryk a9269beb9c Merge branch 'MDL-30961-23' of git://github.com/mouneyrac/moodle into MOODLE_23_STABLE 2012-12-10 14:59:31 +13:00
Dan Poltawski 1197b6163a Merge branch 'MDL-36680_hidden_23' of git://github.com/andyjdavis/moodle into MOODLE_23_STABLE 2012-12-10 09:57:10 +08:00
Sam Hemelryk e4a2de510c Merge branch 'MDL-34592_M23' of git://github.com/lazydaisy/moodle into MOODLE_23_STABLE 2012-12-10 14:28:24 +13:00
Sam Hemelryk 15e9d4c64a Merge branch 'MDL-36608_M23' of git://github.com/lazydaisy/moodle into MOODLE_23_STABLE 2012-12-10 14:24:10 +13:00
Sam Hemelryk b35e30e5bc Merge branch 'MDL-36978_M23' of git://github.com/lazydaisy/moodle into MOODLE_23_STABLE 2012-12-10 14:21:08 +13:00
Mark Nielsen ccca91bd9e MDL-36579: Adding missing fields in mod/lti backup 2012-12-10 14:16:36 +13:00
Sam Hemelryk 1f0e0ab503 Merge branch 'MDL-36607_dndBlocks' of https://github.com/moodlerooms/moodle into MOODLE_23_STABLE 2012-12-10 14:12:24 +13:00
Mary Evans 564b28731c MDL-34592 theme_magazine: Fixes the report grader fixed column misalignment in magazine/style/core.css theme, plus fixes all CORE themes with minor adjustment to grade/report/grader/style.css 2012-12-10 00:06:03 +00:00
Sam Hemelryk 2353df33a7 Merge branch 'MDL-36433' of git://github.com/itamart/moodle into MOODLE_23_STABLE 2012-12-10 12:13:10 +13:00
Dan Poltawski 8d0a31e6cf MDL-36764 ddl/oracle: fix misleading comment 2012-12-10 11:55:08 +13:00
Sam Hemelryk f382da5bf9 Merge branch 'MDL-36778-23' of git://github.com/danpoltawski/moodle into MOODLE_23_STABLE 2012-12-10 11:51:20 +13:00
Sam Hemelryk 0d76053893 Merge branch 'MDL-36887-23' of git://github.com/danpoltawski/moodle into MOODLE_23_STABLE 2012-12-10 11:47:44 +13:00
Sam Hemelryk 46210e38e8 Merge branch 'MDL-36640-MOODLE_23_STABLE' of git://git.luns.net.uk/moodle into MOODLE_23_STABLE 2012-12-10 11:42:35 +13:00
Andrew Robert Nicols 0c7f592819 MDL-36918 Decode HTML entities on ajax update title 2012-12-10 11:15:07 +13:00
Sam Hemelryk 532577bb97 Merge branch 'message_nav_23' of git://github.com/andyjdavis/moodle into MOODLE_23_STABLE 2012-12-10 10:58:50 +13:00
Sam Hemelryk 5b2b3bdaf8 Merge branch 'MDL-36761_loop_23' of git://github.com/andyjdavis/moodle into MOODLE_23_STABLE 2012-12-10 10:54:00 +13:00
Sam Hemelryk b88caf890d Merge branch 'MDL-34591_23' of git://github.com/grabs/moodle into MOODLE_23_STABLE 2012-12-10 10:48:33 +13:00
Sam Hemelryk 45fd888c52 Merge branch 'wip-MDL-35221-MOODLE_23_STABLE' of git://github.com/kwiliarty/moodle into MOODLE_23_STABLE 2012-12-10 10:41:20 +13:00
Sam Hemelryk f384987ead Merge branch 'wip-MDL-36906-MOODLE_23_STABLE' of git://github.com/abgreeve/moodle into MOODLE_23_STABLE 2012-12-10 10:33:33 +13:00
Sam Hemelryk 4dd8a25f5d Merge branch 'wip-MDL-36915-MOODLE_23_STABLE' of git://github.com/abgreeve/moodle into MOODLE_23_STABLE 2012-12-10 10:27:07 +13:00
Sam Hemelryk 289f5e85e7 Merge branch 'wip-MDL-37026-MOODLE_23_STABLE' of git://github.com/abgreeve/moodle into MOODLE_23_STABLE 2012-12-10 10:23:35 +13:00
Sam Hemelryk cf0451133f Merge branch 'MDL-33125_23' of git://github.com/aolley/moodle into MOODLE_23_STABLE 2012-12-10 10:19:22 +13:00
Petr Škoda 0f4db4574c MDL-36447 skip file preview test if GD not available 2012-12-09 19:23:52 +01:00
Andreas Grabs a0212e54f5 MDL-34591 - paypal does not allow unenrol 2012-12-09 19:08:17 +01:00
Mary Evans bf5886726f MDL-36978 theme_standardold: fixes misplaced block region check in layout/frontpage.php which, with hindsight should have been fixed in MDL-23226. 2012-12-08 22:53:36 +00:00
Jean-Michel Vedrine f62c457ece MDL-36243 question->questiontext and question->generalfeedback should always be strings 2012-12-08 20:47:32 +01:00
Petr Škoda b03f7353d0 MDL-36737 fix random glossary E_STRICT issue 2012-12-08 14:45:31 +01:00
Petr Škoda 408ef58fed MDL-31424 compare PayPal emails case-insensitively
Credit goes to Chris Follin, thanks!
2012-12-08 13:17:53 +01:00
Petr Škoda df93e51dcf MDL-35456 use HTTP 1.1 for PayPal IPN 2012-12-08 11:59:41 +01:00
Eloy Lafuente (stronk7) 5fa7d72064 weekly release 2.3.3+ 2012-12-08 02:55:28 +01:00
Eloy Lafuente (stronk7) ac10ff2459 Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2012-12-08 02:49:16 +01:00
Petr Škoda 0c1115480e MDL-36936 require phpunit as composer --dev only 2012-12-07 18:21:56 +01:00
Petr Škoda 3b3b7e68ab MDL-36892 delete outdated enrol info 2012-12-07 17:17:21 +01:00
Davo Smith fdf3274ff2 MDL-36538 repository_webdav - save files directly to local filesystem, rather than buffering in memory 2012-12-07 09:25:23 +00:00
AMOS bot 0935f03d7d Automatically generated installer lang files 2012-12-07 00:40:52 +00:00
Sam Hemelryk 467c1ad18d MDL-33448 enrol_manual: Reduced JS get_string calls for the yui widget 2012-12-07 09:52:55 +13:00
Sam Hemelryk 5c5b2999cb MDL-33448 enrol_manual: Reordered things to improve JS performance when enrolling users 2012-12-07 09:52:55 +13:00
Petr Škoda dc5496f2ae MDL-36685 add missing TinyMCE string 2012-12-06 13:18:29 +01:00
Petr Škoda ee152c0104 MDL-36731 fix E_STRICt issue when creating new groups in user upload 2012-12-06 13:16:14 +01:00
Petr Škoda 835ed7014e MDL-36701 add composer to phpunit readme
Thanks Aparup for reminding me!
2012-12-06 13:08:55 +01:00
Petr Škoda 1dd64dae7b MDL-36701 support for PHPUnit installation via Composer packaging system
See http://getcomposer.org/doc/00-intro.md
2012-12-06 13:08:54 +01:00
Adrian Greeve c154ce5a7f MDL-37026 - lib: The function user_can_assign() returns true for admins. 2012-12-06 11:07:20 +08:00
David Mudrák 783fcd0951 MDL-37003 Fix repeated line in update notification email
There was a problem experienced after 2.4.0 release because the version
of the 2.4.0 release was the same as 2.5dev release. So the version
value matched twice in the loop and the line was repeated in the email.
2012-12-06 00:03:25 +01:00
David Mudrák 5800832af8 MDL-36943 Do not notify about already installed updates
Before this patch, the available_update_checker::cron_notifications()
method accessed the availableupdates property. But for plugins, that property
basically contains the most recent version available. So we were missing
the check against the actual version installed.

The fix was simple - obtain available updates via the available_updates()
method that performs the check.
2012-12-05 23:47:54 +01:00
Jason Fowler 56f9a51bc3 MDL-35979 - Commenting - Adding an empty alt attribute to the javascript generated delete icon for comments 2012-12-05 10:04:04 +08:00
Jason Fowler e0971d8b42 MDL-36110 - Blocks - Community finder icon alt attribute is now empty 2012-12-04 15:17:55 +08:00
Jerome Mouneyrac 22e9de0ffd MDL-29805 add REQUIRE_CORRECT_ACCESS define + return error code when AJAX_SCRIPT fails 2012-12-04 13:43:54 +08:00
Eloy Lafuente (stronk7) 99584654ce weekly release 2.3.3+ 2012-12-03 23:26:00 +01:00
Eloy Lafuente (stronk7) b5cef3b9f5 Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2012-12-03 23:24:56 +01:00
Jason Fowler 4769f19ccd MDL-31824 - Calendar - Fixing HTML classes fopr calendar month view - patch provided by Mark Ward 2012-12-03 15:30:20 +08:00
Dan Poltawski b17858f991 Merge branch 'MDL-36914-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2012-12-03 14:45:49 +08:00
Jerome Mouneyrac c7a0750b8c MDL-35593 core_webservice_get_site_info returns version number set to PARAM_TEXT and PARAM_FLOAT 2012-12-03 10:17:03 +08:00
AMOS bot b052fa8da1 Automatically generated installer lang files 2012-12-01 00:43:07 +00:00
Tim Hunt 557d890cbb MDL-36954 question bank: stop centring question name.
This was a regression caused by MDL-21625. These CSS changes
put the display back to how it was, while leaving the table
cell as a TD  for accessibility.
2012-11-30 16:33:54 +00:00
Tim Hunt a0a83bd0bf MDL-36942 xml question import: don't add spaces.
They are not necessary anyway, there is a \n character at the end of
each line.

Thanks to Richard Lobb for fining the problem and how to fix it.
2012-11-30 15:53:30 +00:00
Tim Hunt 50c88ad26c MDL-36897 quiz: redirect teachers from summary to review page.
There is already logic like this at the top of attempt.php. If the
teacher arrives at one of these pages for a student's attempt, for
example by clicking a link in the logs, then they should be redirected
to the review page to see the students attempt in its current state.
2012-11-30 15:53:12 +00:00
Tim Hunt 832b653627 MDL-36845 excel export: don't output invalid sheet names.
We should clean any proposed worksheet name, to remove the characters
that Excel does not allow.
2012-11-30 15:52:54 +00:00
Tim Hunt 66a56d2548 MDL-36742 question bank: get rid of flicker during page load.
Thanks to Frédéric Massart for working out the fix to this.
2012-11-30 15:52:34 +00:00
Tim Hunt 5d0f5f861d MDL-36732 Cloze qtype: review marks should not depend on feedback.
The various review options should be independent.
2012-11-30 15:52:14 +00:00
Tim Hunt 94215aa40d MDL-35404 question export: make it work with slasharguments off.
Thanks to Brian King for working out the problem and how to fix it. I am
just committing his patch.
2012-11-30 15:51:33 +00:00
Eloy Lafuente (stronk7) 2a0ec98d6e Satisfy version checker requirements
In stable branches, 8 first digits of the backup version
must be >= than the 8 first digits of the main version.
2012-11-30 13:35:48 +01:00
Eloy Lafuente (stronk7) c5e41c035e weekly release 2.3.3+ 2012-11-30 13:25:29 +01:00
Eloy Lafuente (stronk7) 0139100af5 Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2012-11-30 12:48:29 +01:00
Damyon Wiese 40c1230f1f MDL-36263 Assignment: Do not count submissions of unenrolled users 2012-11-30 15:36:11 +08:00
Jerome Mouneyrac d872b3dc16 MDL-30961 get_course_contents: returned activity name should not be check against PARAM_TEXT, it could be anything 2012-11-30 14:24:22 +08:00
Damyon Wiese 46c678ab33 MDL-36908 Assignment: Additional fixes for preventing empty submissions
Conflicts:

	mod/assign/assignmentplugin.php
	mod/assign/locallib.php
	mod/assign/renderer.php
2012-11-30 12:46:25 +08:00
Dan Poltawski 4d1383bcf4 MDL-36778 course - prevent undefined index warnings
When logged in as a guest the mform didn't set userid.
2012-11-30 12:28:56 +08:00
Dan Poltawski dceeeb29e0 MDL-36887 quiz: reorder upgrade.txt's 2012-11-30 11:44:33 +08:00
Andrew Davis b10a46738a MDL-36761 core_grade:shifted a call to count() out of a loop 2012-11-30 11:09:58 +08:00
Jerome Mouneyrac b64f16a6fb MDL-36773 timezone inconsistency => some number support decimal other don\'t - Original patch author: Nathan Mares 2012-11-30 10:13:25 +08:00
Adrian Greeve 691cd371f0 MDL-36915 - mod/data: A database with no entries no longer displays the export to portfolio button. 2012-11-30 10:09:48 +08:00
Damyon Wiese 4f6e4a5b75 MDL-36835 Assignment: Do not show javascript warning when toggling quickgrading 2012-11-30 10:05:40 +08:00
Dan Poltawski 96b96229f1 Revert "MDL-36838 moodle->mahara mnet SSO failure in FF17"
Firefox have now decided to reverse their UA change (since integration)
and this patch has some minor drawbacks.

This reverts commit 166d3b60d3.
2012-11-30 09:25:10 +08:00
Kevin Wiliarty d3da4d8c1a MDL-35221 mod_feedback: replace checkbox with advcheckbox for all requirable feedback question types 2012-11-29 12:30:20 -05:00
Andrew Robert Nicols be56898193 MDL-36601 Ensure that reports remember all days setting
All Days was set as the nothing value, but this nothing value was used.
Additionally, an insufficient comparison meant that the selecteddate then
became Today.
2012-11-29 09:57:09 +00:00
Damyon Wiese 16d31e2376 MDL-36914: Assignment upgrade. Clean up patch to include outcomes in the upgrade
Thanks to Nathan Mares for reporting this issue.
2012-11-29 16:11:04 +08:00
Nathan Mares fb9c26d092 MDL-36914: Re-associate all grade_item records when upgrading assignments to prevent data loss 2012-11-29 16:11:03 +08:00
Rossiani Wijaya e8dd799570 MDL-36905 accessibility for assignment grading: add label for grading actions and operations select options 2012-11-29 15:11:34 +08:00
Adrian Greeve 85094b8fa4 MDL-36906 - mod_data: Latitude and Logitude error fix.
Thanks to Marcus Boon for providing a patch for this issue.

mod/data/field/latlong/kml.php was missing a context variable.
This was causing an error when trying to download a kml file for
google earth. This variable has now been included.
2012-11-29 14:50:16 +08:00
Dan Marsden 1c951c4649 MDL-36858 SCORM: improve lang help for attempts grading to warn about failed status. 2012-11-29 12:53:51 +08:00
Sam Hemelryk a5af780bce MDL-36878 course: fixed issue with module metadata cache
Credit goes to Sam Chaffee.
2012-11-29 12:57:31 +13:00
Dan Poltawski 78601ea6fe Merge branch 'MDL-36838-FF17-MNETSSO-23' of git://github.com/peterbulmer/moodle into MOODLE_23_STABLE 2012-11-28 17:36:09 +08:00
Dan Poltawski a38a5cefb3 Merge branch 'MDL-35966-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2012-11-28 14:15:41 +08:00
Damyon Wiese 8abd89f17e MDL-36591 Assignment - rewrite image urls in online text summaries 2012-11-28 10:19:47 +08:00
Dan Poltawski ab690341b2 Merge branch 'MDL-36752-MOODLE_23_STABLE-2' of git://git.luns.net.uk/moodle into MOODLE_23_STABLE 2012-11-28 09:41:30 +08:00
Andrew Davis 8d3b868068 MDL-36680 core_grade: fixed grade_report::blank_hidden_total() and added unit tests 2012-11-28 09:12:14 +08:00
Sam Hemelryk 0b7a458885 Merge branch 'MDL-36336_MOODLE_23_STABLE' of git://github.com/moodlerooms/moodle into MOODLE_23_STABLE 2012-11-28 11:47:53 +13:00
Sam Hemelryk 01afb8024f Merge branch 'wip-mdl-36238-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2012-11-28 11:41:35 +13:00
Sam Hemelryk 03af084b52 Merge branch 'wip-MDL-34530_MOODLE_23_STABLE' of git://github.com/jason-platts/moodle into MOODLE_23_STABLE 2012-11-28 11:24:56 +13:00
Sam Hemelryk 4254a7495c Merge branch 'MDL-36012-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2012-11-28 11:12:30 +13:00
Andrew Robert Nicols 1ca16a9b59 MDL-36752 Be more specific about tooltip selectors 2012-11-27 14:51:05 +00:00
sam marshall 8b6aeff8ea MDL-36808 Completion: Incorrect escaping for activity name in completion tickbox 2012-11-27 12:54:23 +00:00
Aparup Banerjee f6183fa162 Merge branch 'MDL-36865_m23' of git://github.com/markn86/moodle into MOODLE_23_STABLE 2012-11-27 16:26:08 +08:00
Damyon Wiese 2dd7131e1e MDL-35966 Assignment - Localisation issue - use userdate not strftime
This is causing a database error (reported on MySQL) when strftime returns
non-utf8 characters.  This occurs when sending assignment notifications.

This was reported and a solution provided by Chien Wen-Chang(簡文章).
2012-11-27 16:18:15 +08:00
Mark Nelson 47acfc3db9 MDL-36865 filepicker: ensuring the dnd arrow displays in the center of the filepicker for all supported browsers 2012-11-27 16:00:09 +08:00
David Monllao 429a5a5b33 MDL-30899 moodle-enrol-notification Adding focus to non modal windows 2012-11-27 14:57:07 +08:00
David Monllao a3fc03f616 MDL-30899 moodle-enrol-notification Adding H1 to notifications headers 2012-11-27 14:57:07 +08:00
David Monllao 99b8393174 MDL-30899 block_community Changing from overlay to panel references 2012-11-27 14:57:07 +08:00
David Monllao 2a88835d5a MDL-30899 modchooser Changing from overlay to panel references 2012-11-27 14:57:07 +08:00
David Monllao 64cd465f13 MDL-30899 moodle-enrol-notification Replacing Y.Overlay for Y.Panel
References to lightbox are still there to maintain the same
external API but are converted to a modal attribute internally,
same with closeButton, not it uses the Y.Panel close button
2012-11-27 14:57:06 +08:00
Aparup Banerjee 7cde2573d7 Merge branch 'MDL-36841_m23' of git://github.com/markn86/moodle into MOODLE_23_STABLE 2012-11-27 14:56:36 +08:00
Dan Poltawski c9368a425a Merge branch 'MDL-34695_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE 2012-11-27 14:23:44 +08:00
Dan Poltawski db7f46ad3a Merge branch 'MDL-36302-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2012-11-27 14:10:06 +08:00
Damyon Wiese 520b7df1a5 MDL-36302 course: Set correct URL on settings page for navigation. 2012-11-27 14:04:07 +08:00
Dan Poltawski 89ac5e8782 Merge branch 'MDL-36184-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2012-11-27 13:58:29 +08:00
Luke Tucker 42e0a59d5b MDL-34052 assignment - Disable submission and feedback plugins based on assign type when upgrading 2012-11-27 13:39:53 +08:00
Dan Poltawski 148c786f7c Merge branch 'MDL-36752-MOODLE_23_STABLE' of git://git.luns.net.uk/moodle into MOODLE_23_STABLE 2012-11-27 13:32:47 +08:00
Dan Poltawski 6ac0d92d5b Merge branch 'MDL-36806_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-11-27 13:26:46 +08:00
Mark Nelson 487ec8a912 MDL-36841 portfolio: ensure variables in parent function match those of childs to prevent strict standard error 2012-11-27 12:41:58 +08:00
Aparup Banerjee f441ec2564 Merge branch 'wip-mdl-36767-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2012-11-27 12:20:25 +08:00
Rajesh Taneja e006de414e MDL-36767 Administration: user_filter_yesno use different name for sql filter
user_filter_yesno extends user_filter_simpleselect, so if user bulk action filter has both
user_filter_simpleselect and user_filter_yesno, they use the same filter name but counter is
different as they are different classes. Hence using different filter name will avoid confilts
2012-11-27 11:55:57 +08:00
Aparup Banerjee 4505720f3e Merge branch 'MDL-36305-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-11-27 11:53:09 +08:00
Peter Bulmer 166d3b60d3 MDL-36838 moodle->mahara mnet SSO failure in FF17
In MDL-36838 Firefox 17 users are unable to sso from moodle to mahara.

Firefox 17 uses a different user agent (UA) string for Moodle sites than it
does for Mahara or other sites.
This patch relaxes the check which previously required that the UA string
being presented to the SP on landing matched the UA string presented to the IP
when jumping.
Likewise, checks associated with logout calls have been relaxed
2012-11-27 16:19:38 +13:00
Sam Hemelryk 13669ef4d8 Merge branch 'wip-MDL-36795-MOODLE_23_STABLE' of git://github.com/abgreeve/moodle into MOODLE_23_STABLE 2012-11-27 11:21:55 +13:00
Sam Hemelryk 77f3688b2f Merge branch 'MDL-35760_m23' of git://github.com/markn86/moodle into MOODLE_23_STABLE 2012-11-27 11:10:25 +13:00
Sam Hemelryk 4c14127cdb Merge branch 'MDL-36760_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-11-27 10:40:57 +13:00
Paul Nicholls 134ede3476 MDL-27619: Prevent teachers from turning course Outcomes into site-wide ones
Similar to the issue which allowed teachers to create site-wide scales by editing a course-specific scale (MDL-24682), teachers could also promote a course-specific scale to a site-wide (standard) by editing it.  As with MDL-24682, removing the course ID check (leaving just the capability check) prevents this unauthorised creation of site-wide (standard) outcomes.
2012-11-27 09:48:16 +13:00
Adrian Greeve d22b5faae8 MDL-36795 - lib / administration: maxsections now limits the default setting for numsections.
In the default course settings, setting the maximum number topics / weeks  to 0 would not
change the default number of sections on the same page as any other number would.
A more appropriate check has been put in place.

This also incorporates a fix for MDL-28584. The course edit screen now also checks to see
if maxsections is set or numeric. If it is not set or numeric then it defaults to 52.
2012-11-26 15:54:49 +08:00
Adam Olley 63945c8de2 MDL-36828: mod_scorm: Allow deletion of scorm modules if no scorm_scoes data exists 2012-11-26 15:33:16 +10:30
Adam Olley 69b0d17436 MDL-33125: core_backup: Prevent import/activity duplication from duplicating manual grade items 2012-11-26 12:28:00 +10:30
Sam Hemelryk 55f8a9c766 Merge branch 'MDL-36609_m23' of git://github.com/markn86/moodle into MOODLE_23_STABLE 2012-11-26 14:57:57 +13:00
Sam Hemelryk f9fa262aa9 Merge branch 'wip-MDL-36551-MOODLE_23_STABLE' of git://github.com/abgreeve/moodle into MOODLE_23_STABLE 2012-11-26 14:44:27 +13:00
Sam Hemelryk 8f718da437 Merge branch 'MDL-36763-MOODLE_23_STABLE' of git://git.luns.net.uk/moodle into MOODLE_23_STABLE 2012-11-26 11:42:13 +13:00
Sam Hemelryk 703b86eefb Merge branch 'MDL-35963-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2012-11-26 10:31:57 +13:00
AMOS bot 2afa81e6de Automatically generated installer lang files 2012-11-24 00:42:52 +00:00
Tim Hunt 36ab57f922 MDL-36806 question files: fix unnecessary require_login call.
quiz_question_pluginfile later does the correct check. Doing this
other check first means you get an error about changing $PAGE->context.
2012-11-23 15:56:46 +00:00
Tim Hunt 500c73ba1e MDL-36760 formslib: fix frozen elements with [] in name.
This was a regression caused by MDL-30845 or, to be precise, the related
issue MDL-32785.

Form elements with names like multipier[0] require special handling,
such as is present in HTML_QuickForm_element::_prepareValue. I have
added equivalent handling to MoodleQuickForm::exportValues. I am afraid
that I could not think of a way to do this reliably without duplicating
code.
2012-11-23 11:31:20 +00:00
Tim Hunt d4eec64dc6 MDL-36650 don't change question timecreated or timemodified on restore. 2012-11-23 10:50:26 +00:00
Mark Nelson 6e726489e7 MDL-36741 mod_forum: fixed SQL that was generated when either timed posts or groups were enabled 2012-11-23 17:03:10 +08:00
Dan Poltawski 5f1d8f2a8f weekly release 2.3.3+ 2012-11-23 15:20:23 +08:00
Dan Poltawski 0d80d00494 Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2012-11-23 15:12:29 +08:00
Dan Poltawski cc00f721d1 Merge branch 'MDL-36204-files-with-spaces_23' of git://github.com/mudrd8mz/moodle into MOODLE_23_STABLE 2012-11-23 11:20:04 +08:00
David Mudrák 045053f641 MDL-36204 Improve moodle1 conversion of embedded files
URL of files referenced in HTML fields via $@FILEPHP$@ are usually
encoded if they were linked using the HTML editor. So if they contain
spaces or plus signs in the name, their URL is encoded to use %20 and
%2B respectively.

Sometimes, for example when the HTML was edited manually in 1.9 without
the editor, non-encoded file names may be put into the HTML text. Such a
link used to work in 1.9 so we add an explicit support for it, too.

However, we do not support partially encoded URLs (e.g. only spaces are
encoded while plus signs are not). Such links are unmodified and will
rely on Legacy files support.
2012-11-23 03:51:55 +01:00
Paul Nicholls d09fffbefb MDL-32880: Add moodle1 backup converter for rss_client block.
Creates a shell rss_client.xml file, which contains no feeds.  This makes it behave the same as restoring a Moodle 1.9 backup into a different 1.9 site - the block is created, its title is as per the original course, but it has no feeds selected (and none are added to the site's feed list).
2012-11-23 09:01:59 +13:00
Paul Nicholls 6eb4a954a6 MDL-32880: Add moodle1 backup converter for html block.
This converter processes the HTML block's content, migrating any referenced files.
2012-11-23 09:01:47 +13:00
Paul Nicholls afaabdaf27 MDL-32880: moodle1 backup converter: add generic block handler
This handler will automatically be used for any block which does not provide its own handler, and should be subclassed by any block which needs to do anything extra (or different).

This commit incorporates contributions from Mike Churchward and API design suggestions from David Mudrak.
2012-11-23 09:01:35 +13:00
Andrew Robert Nicols 0e88b7d94f MDL-35819 Improve performance of help tooltip
Rather than using an event handler for each help link, we add the
'helpicon' class to them and delegate the display function.

In order for this to work, we modify the way that Y.io fetches the help to
use the intended target of the anchor rather than a value provided in the
add call. We also no longer modify this URL and instead add the ajaxurl
parameter to it using the Y.io data parameter.

This change is backwards compatible with people calling it without using
the help icon renderer.
2012-11-22 11:45:34 +00:00
Andrew Robert Nicols 355b4f9dfa MDL-36763 Remove onclick event when creating activity left indent link
The left indent onclick is now handled by a Y.delegate so there is no need
for a seperate event handler.
2012-11-22 10:56:20 +00:00
AMOS bot f4a048d771 Automatically generated installer lang files 2012-11-22 09:05:24 +00:00
Rajesh Taneja aae9605228 MDL-36736 course: Availability information should not be visible for hidden modules
If user is viewing hidden module, availability information should only be visible to
user when editing and module is visible. If editing and module is hidden, then hide
availablilty information as it's invalid.
When user is not editing and activity is hidden then don't add availability information.
2012-11-22 15:13:26 +08:00
Rajesh Taneja c1ac572d9c MDL-36736 course: Availability information will use hide class for hidding 2012-11-22 15:13:26 +08:00
Dan Poltawski 64ae757ee5 Merge branch 'wip-MDL-36668-MOODLE_23_STABLE' of git://github.com/abgreeve/moodle into MOODLE_23_STABLE 2012-11-22 10:33:15 +08:00
Petr Škoda 2b78a895fe MDL-36753 fix invalid sectionid in backup tests 2012-11-21 12:40:17 +01:00
Damyon Wiese dba42c3390 MDL-36712: Assignment grading with custom scale is affected by the current language 2012-11-21 15:35:44 +08:00
Dan Poltawski bbeafdbed1 Merge branch 'w47_MDL-36547_m23_sectiongen' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-11-21 15:34:22 +08:00
Dan Poltawski 105562e682 Merge branch 'MDL-30884_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-11-21 15:19:24 +08:00
Damyon Wiese 85b5e20cde MDL-35963: Assignment - do not accept empty submissions
Conflicts:

	mod/assign/locallib.php
2012-11-21 13:53:34 +08:00
Mark Nelson 03e403414e MDL-35760 filemanager: ensuring the dnd arrow displays in the center of the filemanager for all supported browsers 2012-11-21 12:03:54 +08:00
Damyon Wiese 80238a3cc2 MDL-36012: Assignment, Accessibility - Add user information to alt text for grade icon in grading table.
Conflicts:

	mod/assign/lang/en/assign.php
2012-11-21 12:03:45 +08:00
Dan Poltawski c41d292bce Merge branch 'MDL-35675-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-11-21 12:02:58 +08:00
Dan Poltawski 19d964e07a Merge branch 'MDL-36289-m23' of git://github.com/netspotau/moodle-mod_assign into MOODLE_23_STABLE 2012-11-21 12:01:03 +08:00
Dan Poltawski 8fb4c6e7c3 Merge branch 'MDL-30377_m23' of git://github.com/markn86/moodle into MOODLE_23_STABLE 2012-11-21 11:53:21 +08:00
Dan Poltawski 97c7facfe0 Merge branch 'MDL-36170_m23' of https://github.com/jfilip/moodle into MOODLE_23_STABLE 2012-11-21 11:47:39 +08:00
Rossiani Wijaya 879766ade2 MDL-36549 Lesson module: fixed strict standards errors 2012-11-21 11:32:42 +08:00
Damyon Wiese fbd336f810 MDL-36184: Assignment quickgrading should only update lastmodified dates for modified submissions 2012-11-21 11:14:29 +08:00
Adrian Greeve 0c5bd8349d MDL-36551 - mod_data: Onsite presets now retain the advanced search template.
Presets that were saved to the site would lose the advanced search template when being used.
The previous check was put in place to see if the advanced search template existed or not (presets pre 1.9),
This checked external files properly but not onsite files.

Now checks are being done on both internal and external preset files.
2012-11-21 10:03:00 +08:00
Damyon Wiese 7cc7277064 MDL-36167: Assignment quickgrading fix when there is no grade (ensure feedback still saves)
This patch modifies the previous on by Luke Tucker so that the lastmodified hidden field
is always added to the quickgrading form even if there is no grade for the assignment. This
ensures that the lastmodified checks still work (to prevent teachers overwriting each
others feedback) and feedback is saved when there is no grade.

Conflicts:

	mod/assign/locallib.php
2012-11-21 09:33:14 +08:00
Luke Tucker 9e494233b0 MDL-36167: Update all users in assignment quickgrade form to ensure feedback is saved 2012-11-21 09:31:20 +08:00
Sam Hemelryk fa99332779 Merge branch 'MDL-25552_m23' of git://github.com/markn86/moodle into MOODLE_23_STABLE 2012-11-21 09:00:17 +13:00
Justin Filip 0c665d0063 MDL-36170 - mod/data - Don't display the blocks editing button within table HTML, use a standard API to create it. 2012-11-20 09:04:34 -05:00
Tim Hunt a9258e46ae MDL-30884 quiz: ARIA attribute for the coutdown timer. 2012-11-20 12:14:27 +00:00
Mark Nelson 13f8c06414 MDL-25552 mod_lesson: changing filepicker element to filemanager to allow the deletion of a file 2012-11-20 17:42:28 +08:00
Aparup Banerjee 8626068001 Merge branch 'wip-mdl-36707-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2012-11-20 16:28:00 +08:00
Dan Poltawski 3ec8f9f74a Merge branch 'MDL-33863_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-11-20 16:16:41 +08:00
Dan Poltawski 728b702f4e Merge branch 'MDL-36022-MOODLE_23_STABLE' of git://git.luns.net.uk/moodle into MOODLE_23_STABLE 2012-11-20 16:04:19 +08:00
Dan Poltawski a91c6103f3 Merge branch 'MDL-30731-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-11-20 15:31:38 +08:00
Dan Poltawski 0299d83bc0 Merge branch 'MDL-36646_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-11-20 15:12:00 +08:00
Dan Poltawski 254d78b75f Merge branch 'MDL-36571_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-11-20 15:01:38 +08:00
Frederic Massart ac247b4e84 MDL-30731 calendar: Fixed display of images in event descriptions 2012-11-20 14:59:23 +08:00
Dan Poltawski 21082f7aed Merge branch 'MDL-36548_23' of git://github.com/pauln/moodle into MOODLE_23_STABLE 2012-11-20 14:45:04 +08:00
Dan Poltawski d7aec7342d Merge branch 'wip-MDL-36453-MOODLE_23_STABLE' of git://github.com/abgreeve/moodle into MOODLE_23_STABLE 2012-11-20 14:32:05 +08:00
Frederic Massart f54b485abc MDL-36305 theme: Forum reply button is not removed using MyMobile 2012-11-20 13:57:03 +08:00
Rajesh Taneja 84e47a8a3b MDL-36707 Course: set conditionalhidden class properly, so it doesn't overlap with dimmed class 2012-11-20 13:45:11 +08:00
Dan Poltawski d338726097 Merge branch 'MDL-36204_23' of git://github.com/pauln/moodle into MOODLE_23_STABLE 2012-11-20 12:45:32 +08:00
Dan Poltawski 81d1026d1c Merge branch 'm23_MDL-36168' of git://github.com/danmarsden/moodle into MOODLE_23_STABLE 2012-11-20 12:38:33 +08:00
Dan Poltawski aaf19f1ca3 Merge branch 'MDL-35158-23' of git://github.com/grabs/moodle into MOODLE_23_STABLE 2012-11-20 12:28:59 +08:00
Dan Poltawski 042a79870c Merge branch 'MDL-32865_23' of git://github.com/jmvedrine/moodle into MOODLE_23_STABLE 2012-11-20 12:05:46 +08:00
Dan Poltawski e81c1ad987 Merge branch 'MDL-30871-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-11-20 11:47:26 +08:00
Dan Poltawski 04821272ab Merge branch 'MDL-26439_message_search_23' of git://github.com/andyjdavis/moodle into MOODLE_23_STABLE 2012-11-20 11:20:51 +08:00
Eloy Lafuente (stronk7) c7dcaf1324 Merge branch 'MDL-36683_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-11-20 01:33:49 +01:00
Jean-Michel Vedrine e2ba9a1d70 MDL-33863 question restore: better hint identification.
This is very similar to what MDL-30018 did for question_answers.
2012-11-19 23:29:32 +00:00
Tim Hunt f88bd546eb MDL-36683 qtype match restore: better subq indentification.
This is very similar to what MDL-30018 did for question_answers.
2012-11-19 23:06:16 +00:00
Tim Hunt 4c1a35e34c MDL-36571 qtype multichoice: don't corrupt unicode characters.
It seems that \s includes non-breaking space, and the typical one-byte
representation of that is the same as some parts of multibyte unicode
characters. Therefore, you need to include the u modifer on the regular
expressions.

Also, remove any number of <br /> at the end of the answer.

Thanks to Joseph Rézeau and Jean-Michel Vedrine for working out what the
problem was, and how to fix it.
2012-11-19 18:20:38 +00:00
Dan Poltawski 358f8debde Merge branch 'MDL-36696-MOODLE_23_STABLE' of git://github.com/mrverrall/moodle into MOODLE_23_STABLE 2012-11-20 00:03:56 +08:00
Paul Verrall 4ca66b68f8 MDL-36696 - filepicker: remove superfluous comma
It causes problems with older versions of IE.
2012-11-19 15:48:23 +00:00
Mark Nelson 302808a37f MDL-36609 javascript: ensure HTML element exists before attempting to perform JS functionality 2012-11-19 15:43:12 +08:00
Dan Poltawski 21c255093d Merge branch 'MDL-36655-m23' of git://github.com/netspotau/moodle-mod_assign into MOODLE_23_STABLE 2012-11-19 15:01:54 +08:00
Dan Poltawski 682661d87a Merge branch 'MDL-34204_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-11-19 10:33:31 +08:00
Adrian Greeve 92aa8fe491 MDL-36668 - mod/data: Removed duplicate data_content join in simple searches.
Thanks to Patrick Pollet (patrick.pollet@insa-lyon.fr) for his patch
2012-11-19 10:13:04 +08:00
Sam Hemelryk 99072482f6 Merge branch 'MDL-36589_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE 2012-11-19 14:55:22 +13:00
Jean-Michel Vedrine 58310f8845 MDL-32865 CLOZE Questions imported from another course end up with broken image links 2012-11-17 16:45:40 +01:00
Andreas Grabs 8199b8748e MDL-35158 - Random Glossary block returns an error when you delete the linked glossary 2012-11-17 12:03:58 +01:00
Petr Škoda 2ded89d564 MDL-36547 fix section handling in precreate_course_module() 2012-11-17 09:06:12 +01:00
Petr Škoda 996db2f7ac MDL-36547 add test for section number when generating modules 2012-11-17 09:06:11 +01:00
Andrew Robert Nicols a0dd5e65b9 MDL-36640 Logging: Correct testing of log->info.
log->info sometimes contains additional information which can be looked up
from other tables. This should only be attempted if the field is numeric,
but the CSV, XLS, and ODS outputs were not making this check.

There is an additional case for the print_mnet_log function which has not
been covered - this is because the mnet logging is currently broken beyond
the scope of this bug rendering this section untestable. These issues are
raised in MDL-36642.
2012-11-16 11:18:05 +00:00
Dan Poltawski 6548ce0915 weekly release 2.3.3+ 2012-11-16 15:36:21 +08:00
Dan Poltawski 099c7f61da Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2012-11-16 15:32:33 +08:00
Frederic Massart 0b674ddb42 MDL-26660 libraries: Improved XML validation before parsing 2012-11-16 12:14:04 +08:00
Damyon Wiese 62d70e07bc MDL-36655: Assignment - do not add empty group to grading form when there is only one student 2012-11-16 11:00:05 +08:00
AMOS bot 01944afa45 Automatically generated installer lang files 2012-11-15 21:29:40 +00:00
Tim Hunt 877b243fed MDL-36646 unit tests should not assume number of contexts. 2012-11-15 14:36:32 +00:00
Tim Hunt 1b36a754d0 MDL-34204 grader report: static call to non-static method. 2012-11-15 13:47:36 +00:00
Mary Evans a94316030f MDL-36608 theme_sky_high: Fixes missing background in sdmin pages by removing incorrect CSS in style/admin.css 2012-11-15 11:22:31 +00:00
Dan Poltawski 153f5eb3c7 MDL-36061 - remove master-only unit tests 2012-11-15 15:19:28 +08:00
Dan Poltawski 43c6aa915e Merge branch 'MDL-36331_redirect_23' of git://github.com/andyjdavis/moodle into MOODLE_23_STABLE 2012-11-15 14:40:56 +08:00
Dan Poltawski f73a131980 Merge branch 'MDL-36061_userid_23' of git://github.com/andyjdavis/moodle into MOODLE_23_STABLE 2012-11-15 14:32:59 +08:00
Andrew Davis 168a941104 MDL-36061 core_grade: added some unit tests related to refresh_grades() 2012-11-15 11:19:34 +08:00
Matt Switlik 76ab64b07e MDL-36061 gradebook: grade_item->refresh_grades doesn't propagate $userid 2012-11-15 11:19:20 +08:00
Andrew Davis 11694f391e MDL-36331 core_grade: fixed up 2 incorrect default return URLs 2012-11-15 10:48:50 +08:00
Dan Poltawski 05c7471b5c Merge branch 'wip-MDL-36576-m23' of git://github.com/amygroshek/moodle into MOODLE_23_STABLE 2012-11-15 08:57:02 +08:00
Adrian Greeve f6cdef58cb MDL-36453 - mod_data: Presets now load in a Windows environment.
Thanks to Michael de Raadt for this patch.
2012-11-15 08:56:15 +08:00
Mark Nielsen c85164da32 MDL-36607: Improve block drag and drop
* Adding support for subpage
* Adding support for regions that do not start with "side-"
2012-11-14 15:35:14 -08:00
Paul Nicholls bdc69570f5 MDL-36204: moodle1 backup converter: add unit test to cover this issue 2012-11-15 11:16:31 +13:00
Paul Nicholls 0dfc910131 MDL-36204: moodle1 backup converter: urldecode filenames from links
If filenames are not run through urldecode(), those that contain spaces (or other url-encoded characters) will not be handled, as they can't be found in the backup file.
2012-11-15 11:09:58 +13:00
Amy Groshek 02e5529bd5 MDL-36576 - change generalbox classname to generaltable to fix rounded corners on the table background color 2012-11-14 12:32:30 -06:00
Mark Nielsen c9af37c4ab MDL-36336: Prevent duplicate grade items on restore
During restore, lti_add_instance() was being called
and this could generate a grade item.  This would
produce a duplicate item because the restore
process would automatically generate the grade item.
2012-11-14 09:38:42 -08:00
Mark Nelson 73d13b1e43 MDL-30377 forum: do not allow users to view not yet started or expired discussions 2012-11-14 21:01:19 +08:00
Rossiani Wijaya effbfda526 MDL-36589 Lesson Module: set correct answer_jump to next page in question import. 2012-11-14 16:18:00 +08:00
Dan Poltawski f5c074b60a Merge branch 'w46_MDL-36283_m23_cohortmembers' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-11-14 11:26:05 +08:00
Dan Poltawski 89a55cd9e0 Merge branch 'MDL-35358_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE 2012-11-14 11:17:00 +08:00
Dan Poltawski 83ee1d4a43 Merge branch 'MDL-26660-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-11-14 10:33:54 +08:00
Dan Poltawski 40a639fa62 Merge branch 'MDL-34520-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2012-11-14 09:56:03 +08:00
Amy Groshek e0fa7911e2 MDL-36540 - Survey language pack typo 2012-11-14 09:45:51 +08:00
Aparup Banerjee b459897d8f MDL-24736 anotating tinymce changes to readme 2012-11-14 09:41:34 +08:00
Dan Poltawski b1a7fcf2b3 Merge branch 'wip-MDL-36413-MOODLE_23_STABLE' of https://github.com/nicolasconnault/moodle into MOODLE_23_STABLE 2012-11-14 09:18:33 +08:00
Aparup Banerjee 4093331bad Merge branch 'wip_23_mdl-25736_tinymce_spellchecker_frech_issues' of https://github.com/iarenaza/moodle into MOODLE_23_STABLE 2012-11-14 09:13:30 +08:00
Michael Aherne b622d36f13 MDL-34762 course Hide system archetypes from mod chooser 2012-11-14 09:06:33 +08:00
Paul Nicholls 04fa1da315 MDL-36548: Major performance boost to Detail (list) view in file picker
Pass the data (filelist) into the DataTable when initialising it, rather than rendering an empty DataTable and then pushing all of the data into it via addRows().

It's also slightly more efficient to just pass the node in, rather than fetching the node and passing its ID in, as DataTable.render() will just re-select the node if given the ID. [Spotted by Andrew Nicols]
2012-11-14 12:40:08 +13:00
Dan Poltawski 5ac25e0ccb MDL-30545 messaging - remove DISTINCT from union statement 2012-11-13 22:35:35 +08:00
Dan Poltawski 675ea3231c MDL-30545 - messagelib: use $DB->sql_concat() 2012-11-13 15:09:14 +08:00
Dan Poltawski 1f5205b344 MDL-30545 tests - use mod_assignment data generator
mod_assign doens't exist yet..!
2012-11-13 14:13:37 +08:00
Petr Škoda 95f6a022ca MDL-30545/ MDL-36199 reset plugin manager singletons 2012-11-13 14:08:28 +08:00
Dan Poltawski af698e64d2 Merge branch 'w46_MDL-36169_m23_enrolsort' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-11-13 13:40:28 +08:00
Dan Poltawski 3517201801 Merge branch 'MDL-30545_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-11-13 13:22:47 +08:00
Damyon Wiese dc99b426e9 MDL-36509: Assignment grading table rownum offset is wrong by one. 2012-11-13 09:59:11 +08:00
David Mudrák 03d9c19db9 MDL-35422 Fix the confusing submit button label 2012-11-12 10:36:41 +08:00
AMOS bot 073ba0c872 Automatically generated installer lang files 2012-11-12 00:35:49 +00:00
Petr Škoda de06ba901f MDL-36283 use accesscontext when assigning cohort members 2012-11-10 20:44:38 +01:00
Iñaki Arenaza 6cd89c8fd2 MDL-25736 TinyMce Spellchecker French issues
GoogleSpell checker already returns data un UTF8, so there's no need
to use utf8_encode (in fact, using it completely mangles the string).

All credit goes to David Quintal for finding the issue and proposing
the fix.
2012-11-10 20:02:03 +01:00
AMOS bot 9b213b3b5f Automatically generated installer lang files 2012-11-10 00:36:24 +00:00
Petr Škoda 3952908d5c MDL-36169 fix enrolled users sorting by alphanumerical column
Credit goes to Nicholas Koeppen, thanks!
2012-11-09 19:49:57 +01:00
Eloy Lafuente (stronk7) ff63a3ad58 Moodle release 2.3.3 2012-11-09 19:35:55 +01:00
Dan Poltawski ce44bf4441 weekly release 2.3.2+ 2012-11-09 17:58:34 +08:00
Dan Poltawski 53118fe1ea Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2012-11-09 17:53:20 +08:00
Aparup Banerjee 60c7fc96b2 Merge branch 'WIP-MDL-35512-M23' of git://github.com/nadavkav/moodle into MOODLE_23_STABLE 2012-11-09 14:15:07 +08:00
Aparup Banerjee 3d9514b363 Merge branch 'MDL-35510_M23' of git://github.com/lazydaisy/moodle into MOODLE_23_STABLE 2012-11-09 14:11:42 +08:00
Aparup Banerjee 79d86ffcdb Merge branch 'MDL-35571_M23' of git://github.com/lazydaisy/moodle into MOODLE_23_STABLE 2012-11-09 10:27:32 +08:00
AMOS bot c4d19c8789 Automatically generated installer lang files 2012-11-09 00:38:56 +00:00
Dan Poltawski b99ee21bfc Merge branch 'MDL-35349_m23' of git://github.com/markn86/moodle into MOODLE_23_STABLE 2012-11-08 18:55:10 +08:00
Dan Poltawski bc7fdb4279 Merge branch 'w45_MDL-36196_m23_vercheck' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-11-08 15:13:18 +08:00
Dan Poltawski 282183647b Merge branch 'MDL-36051_23' of git://github.com/rlorenzo/moodle into MOODLE_23_STABLE 2012-11-08 15:10:06 +08:00
Aparup Banerjee edd4257a1a Merge branch 'MDL-27824_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE 2012-11-08 13:32:27 +08:00
Rossiani Wijaya a46405df3a MDL-27824 course categories: remove trailing whitespace 2012-11-08 12:32:01 +08:00
Rossiani Wijaya 9bc298d287 MDL-27824 course categories: change isset() to empty() 2012-11-08 12:31:03 +08:00
Rossiani Wijaya 74b266a332 MDL-27824 course categories: Added @todo comments to remove the temporary fix 2012-11-08 12:31:03 +08:00
Rossiani Wijaya eabdc81c40 MDL-27824 - course category: add check test for ->coursesperpage value. 2012-11-08 12:31:03 +08:00
Dan Poltawski 6211ff4c12 Merge branch 'MDL-36422-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-11-08 11:08:06 +08:00
Frederic Massart 8a73556f8d MDL-36422 question: Fixed malformed HTML in manual marking 2012-11-08 10:26:44 +08:00
Rex Lorenzo 3bcff38015 MDL-36051 - Quick Grading in Assignment module does not turn on in some circumstances
* Fixed bug with quick grading when file submission is turned off
2012-11-07 16:28:02 -08:00
Itamar Tzadok 322965e245 MDL-36433 Forms lib - Added dash escaping to validation script getter. 2012-11-07 19:15:25 -05:00
Mark Nelson d8e550e4ac MDL-33791 Portfolio: Fixed security issue with passing file paths. 2012-11-08 00:26:40 +01:00
Mary Evans 845cfc3389 MDL-36197 theme_fusion: Fix for "Your progress" overlaps completion tracking checkbox 2012-11-08 11:33:49 +13:00
Sam Hemelryk 62d543748d Merge branch 'MDL-36271_m23' of https://github.com/markn86/moodle into MOODLE_23_STABLE 2012-11-08 11:06:58 +13:00
Nadav Kavalerchik a5b62b8f31 MDL-35249 - Move Grading popmenu "userid" column after "scale" column (workaround)
Conflicts:

	mod/assign/gradingtable.php
2012-11-08 11:00:49 +13:00
Adrian Greeve 9b025da732 MDL-35558 mod_data: Show only own entries while there are required pending. 2012-11-07 19:50:15 +01:00
Petr Škoda da427d1e51 MDL-36196 hardcode the required PHP version in installer 2012-11-07 13:04:51 +01:00
Eloy Lafuente (stronk7) f87d5a71ef NOBUG: Trivial whitespace fix to quickly fix ongoing CI status. 2012-11-07 11:51:24 +01:00
Dan Poltawski 48fb811b4c Merge branch 'MDL-36092-MOODLE_23_STABLE' of git://git.luns.net.uk/moodle into MOODLE_23_STABLE 2012-11-07 16:56:19 +08:00
Nicolas Connault 3522c1dca4 MDL-36413 Added "this->" to exclude variable assignment
The this-> keyword was missing from the $exclude = array() statement.
2012-11-07 14:52:09 +08:00
Dan Poltawski e4224a5ae1 Merge branch 'MDL-36346_23' of git://github.com/pauln/moodle into MOODLE_23_STABLE 2012-11-07 09:27:53 +08:00
Paul Nicholls c4851e8085 MDL-36346 - YUI2 SWF vulnerability, part 2 2012-11-07 14:09:20 +13:00
AMOS bot 04678efd11 Automatically generated installer lang files 2012-11-07 00:36:31 +00:00
Andrew Davis 84fad57f1c MDL-35762 core_grade: altered the code that determines whether an activity is visible on the user report 2012-11-06 16:42:00 +01:00
Andrew Robert Nicols 3a8714c3c6 MDL-36023 AJAX Fix reference to chooserdiaogue jumplink 2012-11-06 10:16:28 +00:00
Dan Poltawski cb2829dea3 Merge branch 'MDL-36346_23' of git://github.com/pauln/moodle into MOODLE_23_STABLE 2012-11-06 16:20:14 +08:00
David Mudrák 77283f1812 MDL-36266 Improve update notification message subject 2012-11-06 11:59:48 +08:00
Paul Nicholls c43e6006e7 MDL-36346 - YUI2 SWF vulnerability 2012-11-06 14:55:48 +13:00
Dan Poltawski 2dab9d1943 Merge branch 'wip-MDL-36379-m23' of git://github.com/samhemelryk/moodle into MOODLE_23_STABLE 2012-11-06 09:50:23 +08:00
Dan Poltawski 485ddbd611 Merge branch 'MDL-36347_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-11-06 09:42:11 +08:00
Dan Poltawski aafded3f42 Merge branch 'MDL-36023-MOODLE_23_STABLE' of git://git.luns.net.uk/moodle into MOODLE_23_STABLE 2012-11-06 09:36:08 +08:00
Sam Hemelryk e3ac126161 MDL-36379 user_view: fixed issue with page layout when editing was on 2012-11-06 14:01:30 +13:00
Petr Škoda 89fbf2e874 MDL-35381 limit teachers to do permissions checks of enrolled users only 2012-11-06 00:49:25 +01:00
Sam Hemelryk b733b0ac71 Merge branch 'MDL-31629-MOODLE_23_STABLE' of git://github.com/micaherne/moodle into MOODLE_23_STABLE 2012-11-06 10:08:31 +13:00
Frederic Massart 9e5fea4d2d MDL-35675 forms: Remove constrain to viewport for popup calendar 2012-11-05 16:43:22 +08:00
Didier Raboud 0e892b8b65 MDL-35675 forms: Popup calendar is not constrained any more 2012-11-05 16:43:22 +08:00
Dan Poltawski a7e956b403 MDL-34527 - fix trailing whitespace 2012-11-05 13:27:35 +08:00
Dan Poltawski 44999a9ed2 Merge branch 'wip-MDL-34527-m23' of git://github.com/samhemelryk/moodle into MOODLE_23_STABLE 2012-11-05 13:25:18 +08:00
Dan Poltawski f7c197eddb Merge branch 'WIP-MDL-36069-M23' of git://github.com/nadavkav/moodle into MOODLE_23_STABLE 2012-11-05 11:31:55 +08:00
Sam Hemelryk f9e009a744 MDL-21625 question: Fixed phpdocs 2012-11-05 16:29:38 +13:00
Sam Hemelryk 18f6238b88 Merge branch 'MDL-21625_b_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE 2012-11-05 16:27:30 +13:00
Dan Poltawski 906ad7d27a Merge branch 'MDL-33621_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE 2012-11-05 11:12:41 +08:00
Dan Poltawski df79fff95b Merge branch 'wip-mdl-35787-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2012-11-05 10:58:59 +08:00
Sam Hemelryk a82535f068 Merge branch 'MDL-36107b-23' of git://github.com/srynot4sale/moodle into MOODLE_23_STABLE 2012-11-05 15:07:00 +13:00
Tim Hunt 917cea604c MDL-36347 quiz: formchangechecker should not obstruct auto-submit.
When the quiz time limit runs out, the quiz should be submitted
automatically, withouth formchangechecker popping up a dialogue.
2012-11-03 22:34:53 +11:00
Matt Petro 2cae75aacc MDL-36025 qtype calculated: Fix handling of "-0" 2012-11-02 12:11:01 -04:00
Mark Nelson 4aaac325f2 MDL-35349 paypal: Fixing return page so that it now declares page context 2012-11-02 15:33:59 +08:00
Dan Poltawski 0d79d96566 Merge branch 'w42_MDL-35469_m23_geckover' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-11-02 12:07:16 +08:00
Sam Hemelryk 561bd396c1 MDL-34527 forum: Fixed up a couple of SQL queries causing issues in Oracle. 2012-11-02 10:49:43 +13:00
Nadav Kavalerchik c4b521116f MDL-36069 - Right align TEXTAREA "Format selector" listbox, when in RTL mode (theme/standard) 2012-11-01 20:18:04 +02:00
Nadav Kavalerchik 152dbe5d52 MDL-35512 - Two left pointing arrows appear after clicking "left indent activity/resource" arrow, when in RTL mode 2012-11-01 20:12:37 +02:00
Huy Hoang 71ff0a2f85 MDL-34695 Wiki Module: add prevention to create new record when userid is 0 2012-11-01 17:42:45 +08:00
Ankit Agarwal 95b877b9b1 MDL-34520 gradebook: Missing droplow setting in gradebook backup 2012-11-01 15:53:23 +08:00
Andrew Robert Nicols 37ceb6cbed MDL-36092 Course/AJAX Ensure that dropdown resource pickers are shown when JS is disabled 2012-11-01 07:51:33 +00:00
Mark Nelson 1139dff6ef MDL-36271 feedback: Fixed variable typo 2012-11-01 15:47:26 +08:00
Dan Poltawski d402e05ba7 weekly release 2.3.2+ 2012-11-01 14:16:33 +08:00
Dan Poltawski 87ea3f04df Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2012-11-01 14:13:50 +08:00
Rajesh Taneja 05d1f6cb9d MDL-36238 Blocks: Logs page close session write, so editing is set before 2012-11-01 12:17:33 +08:00
Jonathon Fowler ec07ff69f2 MDL-34695 wiki: ensure the correct individual subwiki is used/created for a user 2012-11-01 11:49:17 +08:00
Dan Poltawski 35ce18a8b1 Merge branch 'MDL-36315_23' of git://github.com/stronk7/moodle into MOODLE_23_STABLE 2012-11-01 10:03:19 +08:00
Andrew Davis b4a8ab2daa MDL-36162 core_message: removed the unnecessary and confusing course URL parameter as well as fixing the broken breadcrumb 2012-11-01 09:44:51 +08:00
Eloy Lafuente (stronk7) 391f8b395a MDL-36315 backup: reduce the DST tests failing-window
This reduces the period of time that some of the unit tests
for calculate_next_automated_backup() are failing right now
(from 1week to just some hours around the DST changes).

Note it's not the final solution because they will still fail
when New_York or Brussels DST changes are about to happen, but
to get this completely fixed we'll need to wait to switch from
current custom TZ/DST support to PHP built-in one.
2012-11-01 02:42:08 +01:00
Andrew Davis b32086390f MDL-26439 core_message: switched the message search over to displaying smallmessage instead of fullmessage which contains boilerplate we dont want 2012-11-01 08:47:50 +08:00
AMOS bot f1c3b5b3b3 Automatically generated installer lang files 2012-11-01 00:36:39 +00:00
Eloy Lafuente (stronk7) b5b882df60 MDL-36304 - Left align "marked out of" in RTL Q preview
Credit goes to Nadav Kavalerchik for fixing it @ MDL-36033
2012-10-31 19:33:39 +01:00
Andrew Robert Nicols 1438358686 MDL-36022 AJAX Remove shim on chooser dialogues 2012-10-31 16:39:36 +00:00
Adam Olley 93efeb5352 MDL-36130: mod_assign: migrate logs when migrating from mod_assignment 2012-10-31 14:52:47 +08:00
Dan Poltawski 881d1d8aed Merge branch 'MDL-28235-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-10-31 13:42:23 +08:00
Frederic Massart 9740e053f2 MDL-28235 form: Removed reference to unexisting close button in help popup 2012-10-31 13:00:12 +08:00
Frederic Massart b27daf9e73 MDL-28235 form: Removed close icon of help icon popups 2012-10-31 13:00:08 +08:00
Frederic Massart d0d6d5fc72 MDL-28235 form: Help button popup close accessibility improved
AMOS BEGIN
 CPY [close,editor],[close,form]
AMOS END
2012-10-31 13:00:08 +08:00
Dan Poltawski 5aa4e27404 Merge branch 'wip-mdl-29762-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2012-10-31 10:50:53 +08:00
Damyon Wiese 5f845b3e66 MDL-36289: Assignment - Prevent feedback files being copied to the next user when using "Save and next".
Conflicts:

	mod/assign/feedback/file/locallib.php
2012-10-31 10:37:42 +08:00
Aparup Banerjee 046c9872a6 Merge branch 'MDL-31708-moodle23' of git://github.com/StudiUM/moodle into MOODLE_23_STABLE 2012-10-31 10:05:26 +08:00
AMOS bot edf170c341 Automatically generated installer lang files 2012-10-31 00:36:35 +00:00
Sam Hemelryk ee8c1abcea Merge branch 'MDL-31934_M23' of git://github.com/lazydaisy/moodle into MOODLE_23_STABLE 2012-10-31 10:15:29 +13:00
Mary Evans 3fd76b3de5 MDL-31934 mod/forum: Added CSS fix to mod/forum/styles.css for unread forumposts also reversed a previous commit in theme/base/core.css. 2012-10-30 11:43:09 +00:00
Dan Poltawski 6f7eeb3775 Merge branch 'wip-MDL-32326-m23' of git://github.com/samhemelryk/moodle into MOODLE_23_STABLE 2012-10-30 13:40:33 +08:00
Sam Hemelryk 3b6796e0f4 Merge branch 'MDL-28235-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-10-30 17:36:45 +13:00
Dan Poltawski 59d01f93cd Merge branch 'wip-mdl-35489-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2012-10-30 12:11:52 +08:00
Michael de Raadt 254fef3a9c MDL-35358 Lesson Module: fixed teacher grade essays display when lesson is only available for group members only 2012-10-30 11:05:50 +08:00
Frederic Massart 440dec9c27 MDL-30871 enrol: Flat file does not fail when notifications are enabled 2012-10-30 11:03:44 +08:00
Sam Hemelryk aa7d8ef61f Merge branch 'MDL-35889-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2012-10-30 15:48:49 +13:00
Dan Poltawski c64d22325e Merge branch 'MDL-36015_23' of git://git.catalyst.net.nz/moodle-r2 into MOODLE_23_STABLE 2012-10-30 10:19:26 +08:00
Dan Poltawski 33abc6e173 Merge branch 'wip-mdl-35910-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2012-10-30 10:00:21 +08:00
Frederic Massart 1dfcc6eade MDL-26660 libraries: Do not try to parse non-valid XML 2012-10-30 09:23:40 +08:00
Andrew Davis b7b04c2dfe MDL-29733 grade: SQL and comment cleanup 2012-10-30 09:02:41 +08:00
Jonathan Champ c2539fc41d MDL-29733 grade: Query for Identifying Grade Grades to Precreate is SLOW 2012-10-30 09:02:06 +08:00
Andrew Robert Nicols 272dfda3cf MDL-35959 Correct footer for M.core.dialogue 2012-10-30 13:33:42 +13:00
Sam Hemelryk e61d57b5c1 Merge branch 'WIP-MDL-36070-M23' of git://github.com/nadavkav/moodle into MOODLE_23_STABLE
Conflicts:
	mod/quiz/styles.css
2012-10-30 13:02:07 +13:00
Sam Hemelryk 1d6d520a5a Merge branch 'MDL-36076_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-10-30 12:59:12 +13:00
Michael Aherne 41db2a5afc MDL-36101 auth_shibboleth Show appropriate error message for suspended accounts 2012-10-30 12:55:26 +13:00
Sam Hemelryk 3b5513528e Merge branch 'MDL-36103_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-10-30 12:51:44 +13:00
Charles Fulton 33407de5b6 MDL-36105 grades: use consistent icon classs 2012-10-30 12:34:54 +13:00
Sam Hemelryk efd2f83e4a Merge branch 'wip-mdl-36131-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2012-10-30 12:24:19 +13:00
Sam Hemelryk b9697365a1 Merge branch 'MDL-36137_M23' of git://github.com/lazydaisy/moodle into MOODLE_23_STABLE 2012-10-30 12:16:50 +13:00
Rossiani Wijaya 69a6b638a7 MDL-35530 Lesson Module: Add question text to facilitate grading 2012-10-29 17:03:15 +08:00
Dan Poltawski 6b0ada1e6e Merge branch 'm23_MDL-35215' of git://github.com/totara/moodle into MOODLE_23_STABLE 2012-10-29 15:33:53 +08:00
Dan Poltawski c2ef0e4982 Merge branch 'MDL-34363_m23' of git://github.com/merrill-oakland/moodle into MOODLE_23_STABLE 2012-10-29 15:21:48 +08:00
Dan Poltawski 35776aab75 Merge branch 'WIP-MDL-36033-M23' of git://github.com/nadavkav/moodle into MOODLE_23_STABLE 2012-10-29 14:59:57 +08:00
Dan Poltawski 9416bcf43d Merge branch 'wip-MDL-36075_MOODLE_23_STABLE' of git://github.com/jason-platts/moodle into MOODLE_23_STABLE 2012-10-29 14:57:24 +08:00
Dan Poltawski 80311cabde Merge branch 'MDL-35880-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2012-10-29 14:35:28 +08:00
Dan Poltawski 418a22905c Merge branch 'MDL-34837-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-10-29 13:55:14 +08:00
Dan Poltawski ff203527e7 Merge branch 'MDL-35297_23' of git://github.com/stronk7/moodle into MOODLE_23_STABLE 2012-10-29 09:54:12 +08:00
AMOS bot c777ad2785 Automatically generated installer lang files 2012-10-28 00:34:02 +00:00
AMOS bot 502821bbcc Automatically generated installer lang files 2012-10-27 00:34:37 +00:00
Dan Marsden 64100280a0 MDL-35737 SCORM: when scorm_parse is called and external scorm manifest use always update the package. 2012-10-26 15:36:03 +13:00
Andrew Robert Nicols 238d0ca1cd MDL-35836 Rewrite doctonewwindow handling to use delegation instead of individual events 2012-10-26 09:10:45 +08:00
Andrew Robert Nicols 8516492cc4 MDL-36023 AJAX Move the instantiation of the dialogue to display time 2012-10-26 09:09:13 +08:00
Andrew Robert Nicols 1754dc2cb6 MDL-35836 Rewrite doctonewwindow handling to use delegation instead of individual events 2012-10-26 09:08:54 +08:00
Dan Marsden b7ed59c326 MDL-36168 SCORM: fix reset of course completion settings. 2012-10-25 17:15:38 +13:00
Andrew Davis (andyjdavis) 06661a5541 MDL-30545 messaging prefs: add Andy's extra unit tests. 2012-10-25 10:46:30 +08:00
Tim Hunt 20d10190d7 MDL-30545 messaging prefs: show all relevant message providers.
Some message providers have an associated capability. For example
the mod/quiz:emailconfirmsubmission capability. At the moment,
we only show the preferences for the capabilities that the user
has in the system context.

That does not work for the example capability above. Typically
the capability will be overridden in one quiz, to allow for
Students, and the user will have the Student role in the course
context. Therefore, this message type does not appear on the
preferences page.

This fix corrects the logic, so that all message types that are
to the current user are displayed.
2012-10-25 10:46:17 +08:00
AMOS bot 9b5de362cf Automatically generated installer lang files 2012-10-25 00:34:52 +00:00
Jason Platts b44d2b689a MDL-34530 Calendar: Can create an event for any group, but cannot view
it
2012-10-23 09:50:23 +01:00
Eloy Lafuente (stronk7) 8be3d5ab03 MDL-35297 book: replay some steps lost when book landed to core
This commit replays, conditionally, all the upgrade steps from
MOODLE_19_STABLE to MOODLE_23_STABLE in the mod_book activity. That
guarentees that any site using the mod_book before landing to core,
no matter if it was the latest or an outdated one will upgrade
perfectly to the expected current version.

As a general rule, everytime one contrib plugin lands to core, its
complete upgrade code must be kept, at least until the core version
that introduced it, is out completely from the upgrade requirement
conditions.

In this case, with the missing upgrade code being added to 2.4, it
will be safe to delete the upgrade steps once 2.5 (or upwards) become
a requirement. Never always.

Conflicts:
	mod/book/version.php
2012-10-21 17:58:10 +08:00
Mary Evans db16ec2753 MDL-31934 theme_base: Adds highlight color to unread forum posts. 2012-10-21 01:39:30 +01:00
AMOS bot 691b9c81cb Automatically generated installer lang files 2012-10-20 00:34:52 +00:00
AMOS bot 8434e7de85 Merge branch 'MOODLE_23_STABLE' into install_23_STABLE 2012-10-20 00:34:51 +00:00
Mary Evans cd2ae155de MDL-36137 theme_magazine: changed forum and description info from center to left aligned. 2012-10-19 23:49:16 +01:00
Mary Evans d5fd21b6ef MDL-35571 theme_magazine: RTL fixes - WIKI title headings, ajax frontpage category/course chooser, right align logo, left align course name, left align login & user info. 2012-10-19 22:29:47 +01:00
Eloy Lafuente (stronk7) 98197952cc weekly release 2.3.2+ (fix!) 2012-10-19 19:56:32 +08:00
Rajesh Taneja 8648334966 MDL-36131 AJAX: Conditional activities will behave same as in non-ajax mode 2012-10-19 17:15:43 +08:00
Tim Hunt 2878842742 MDL-36103 tablelib: links to user profiles are wrong in courses. 2012-10-19 16:50:58 +08:00
Nadav Kavalerchik 00c7657edf MDL-36033 - Left align Numeric value fields in Calculated and Numeric question, when in RTL mode 2012-10-19 10:24:46 +02:00
Nadav Kavalerchik 44da3c50fe MDL-36070 - Points label hides UP and Down ordering arrows and Delete Icon on Quiz edit page, in RTL mode (theme/standard) 2012-10-19 10:20:54 +02:00
Rajesh Taneja ea67a0679d MDL-35910 Assignment 2.2: Fixed included files in assignment zip.
If Marking button is enabled, assignment is open and is not finalized, then don't add file to zip
2012-10-19 16:09:52 +08:00
Rossiani Wijaya 75441ef5b2 MDL-21625 Question bank: fixing whitespace 2012-10-19 15:46:09 +08:00
Aaron Barnes 3a15a7519c MDL-36107 scorm: Fix non-static method call 2012-10-19 18:55:39 +13:00
Rossiani Wijaya d2d17341e8 MDL-21625 Question bank: Add accessibility to table layout for viewing question list 2012-10-19 13:32:11 +08:00
AMOS bot 09725180cf Automatically generated installer lang files 2012-10-19 00:35:15 +00:00
Mary Evans c8ee9dde60 MDL-35510 theme_mymobile: RTL fixes for course and category names in style/jmobile11_rtl.css 2012-10-18 15:49:41 +01:00
Gilles-Philippe Leblanc e2694e9dd6 MDL-31708 wiki: Wiki 2.0 non-group member can see edit option in navigation block 2012-10-18 08:51:51 -04:00
Aparup Banerjee b1c5155cbc weekly release 2.3.3+ 2012-10-18 19:43:28 +08:00
Aparup Banerjee 1025a9123f Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2012-10-18 19:21:29 +08:00
Rajesh Taneja 4e15f69cb1 MDL-35489 users: Check added before using form data 2012-10-18 17:23:41 +08:00
David Tang c034e59bee MDL-31629 auth_shibboleth Use correct language string location 2012-10-18 08:53:11 +01:00
AMOS bot dd5e3ac222 Automatically generated installer lang files 2012-10-18 00:34:55 +00:00
Tim Hunt db05d59534 MDL-36076 qtype multichoice: validation fails on '0' answer. 2012-10-17 13:55:52 +08:00
Aparup Banerjee dde33d64a2 Merge branch 'MDL-28965-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2012-10-17 10:40:03 +08:00
AMOS bot 6ab522802f Automatically generated installer lang files 2012-10-17 00:34:38 +00:00
Jason Platts 9081825ea3 MDL-36075 Forms: Date selector in forms errors in IE7 2012-10-16 12:09:51 +01:00
Sam Hemelryk 777354509d Merge branch 'MDL-35412-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-10-16 17:41:31 +08:00
Frederic Massart 456352585a MDL-35412 phpunit: date_format_string() is case insensitive 2012-10-16 17:21:37 +08:00
Frederic Massart 335636f55d MDL-35412 core: Moving get_string out of if statement 2012-10-16 17:21:36 +08:00
Frederic Massart 98268916ff MDL-35171 Forms: Date selector always gets UTF-8 strings 2012-10-16 17:21:36 +08:00
Dan Poltawski ac2b4fb66a Merge branch 'wip-mdl-30691-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2012-10-16 16:27:51 +08:00
Dan Poltawski e191c71d55 MDL-34228 - version.php - bump for new capability 2012-10-16 16:20:12 +08:00
Dan Poltawski 9d53135aaf Merge branch 'MDL-34228-m23' of git://github.com/sammarshallou/moodle into MOODLE_23_STABLE 2012-10-16 16:19:33 +08:00
Dan Poltawski 48a8f1c7a0 Merge branch 'wip-mdl-27309-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2012-10-16 14:59:15 +08:00
Dan Poltawski 760cab0695 Merge branch 'wip-mdl-32218-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2012-10-16 14:35:37 +08:00
Ankit Agarwal 16ab3642e7 MDL-35880 user: Adding a heading to profile edit page 2012-10-16 14:18:44 +08:00
Sam Hemelryk 1ffbad6404 MDL-33857 fixed up whitespace 2012-10-16 13:32:46 +08:00
Sam Hemelryk 4740c0a64f Merge branch 'wip-MDL-33857-MOODLE_23_STABLE' of git://github.com/marinaglancy/moodle into MOODLE_23_STABLE 2012-10-16 13:31:31 +08:00
Rajesh Taneja 672bea4cfe MDL-29762 Blocks: Modified checks to show image in html block 2012-10-16 11:38:54 +08:00
Sam Hemelryk c35fa27c89 Merge branch 'MDL-35198-MOODLE_23_STABLE' of git://github.com/mouneyrac/moodle into MOODLE_23_STABLE 2012-10-16 11:23:02 +08:00
Dan Poltawski d50d615d7f Merge branch 'MDL-33815_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE 2012-10-16 11:09:06 +08:00
Adrian Greeve 0c09da65ce MDL-35265 - blog - Update code for removing orphaned blog association data.
Conflicts:
	version.php
2012-10-16 10:55:49 +08:00
Dan Poltawski 6244126d6d Merge branch 'wip-MDL-32184-s23' of http://github.com/phalacee/moodle into MOODLE_23_STABLE 2012-10-16 10:46:49 +08:00
Sam Hemelryk 52d2556ee5 Merge branch 'MDL-35664-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-10-16 10:42:42 +08:00
Sam Hemelryk 86606ad75d Merge branch 'MDL-35892-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-10-16 10:31:51 +08:00
Dan Poltawski 25ba0f4839 MDL-21801 - mod_lesson: version bump
To reflect the new (ppt-less) state
2012-10-16 10:30:31 +08:00
Dan Poltawski a83497790f Merge branch 'MDL-21801_b_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE 2012-10-16 10:30:00 +08:00
Sam Hemelryk 5004ad85b7 Merge branch 'MDL-35726-m23' of git://github.com/netspotau/moodle-mod_assign into MOODLE_23_STABLE 2012-10-16 10:16:19 +08:00
Adrian Greeve caa0e70577 MDL-25275 - mod/data - Added a check box to eliminate date searches if desired. 2012-10-16 10:09:24 +08:00
Mark Nielsen 6e763244ed MDL-34837 backup: Restore does not fail when some courses have the same name 2012-10-15 17:19:37 +08:00
Mark Nielsen 46ba9fded8 MDL-33621 rating: fixed view help error for global scale rating 2012-10-15 16:52:17 +08:00
Dan Poltawski 59d9b1b99d Merge branch 'w42_MDL-35854_m23_usergenerator' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-10-15 16:03:59 +08:00
Dan Poltawski 2558abe170 Merge branch 'w42_MDL-35917_m23_cohortdoc' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-10-15 15:59:15 +08:00
Aparup Banerjee 60e1dfd078 Merge branch 'MDL-31010-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2012-10-15 15:53:40 +08:00
Aparup Banerjee 226398e7d0 Merge branch 'MDL-35986' of git://github.com/lazydaisy/moodle into MOODLE_23_STABLE 2012-10-15 14:16:06 +08:00
Dan Poltawski 0f46bd4550 Merge branch 'wip-MDL-35661-MOODLE_23_STABLE' of git://github.com/marinaglancy/moodle into MOODLE_23_STABLE 2012-10-15 13:31:22 +08:00
Ankit Agarwal 4981d12420 MDL-35889 blocks: Adding a legend to the fieldset 2012-10-15 11:24:13 +08:00
Frederic Massart 4f977aea5e MDL-35892 repository: prepare_listing recursively prepares the data 2012-10-15 09:46:00 +08:00
Frederic Massart 82525f5963 MDL-35664 filepicker: Filepicker knows about the current path and uses it 2012-10-15 09:45:59 +08:00
AMOS bot 887d6e175e Automatically generated installer lang files 2012-10-15 00:34:57 +00:00
Eloy Lafuente (stronk7) 6738413b33 weekly release 2.3.2+ 2012-10-15 00:20:33 +02:00
Eloy Lafuente (stronk7) 92e9c3d09f Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2012-10-15 00:07:39 +02:00
Eloy Lafuente (stronk7) 8d800a1b8e Revert "MDL-31968 Make NTLM REMOTE_USER format configurable by the admin"
This reverts commit af861e14dc.

Note that MDL-31968 will be in charge of backporting this to stables
if everything goes well under master (once MDL-31968 is tested and closed)
2012-10-14 23:22:08 +02:00
Petr Škoda b66c3031f6 MDL-35917 fix cohort phpdocs
Credit goes to Brian Kremer, thanks!
2012-10-13 17:55:59 +02:00
Petr Škoda a4848f6ef7 MDL-35469 test for the new Gecko user agent handling 2012-10-13 10:00:05 +02:00
Petr Škoda ad7d20c380 MDL-35469 fix Gecko based browser checks
The problem is that latest firefox versions stopped using dates because they lost the meaning over the time.
2012-10-13 10:00:05 +02:00
Petr Škoda 7358b1742f MDL-35854 fix username generator
This eliminates infinite loop and also fixes potentially invalid email derived from usernames created from unicode first/last name.
2012-10-13 09:56:48 +02:00
Mary Evans cc3f17d86d MDL-35986 theme_canvas: add custommenu and block-region to layout files general.php, frontpage.php and report.php to fix regression in theme/serenity since MDL-33110. 2012-10-12 22:57:39 +01:00
Damyon Wiese 0e8aa5027e MDL-35726: Use a different form identifier for each form when using "Save and next"
This prevents a bug where the next student feedback will default to the values that
were on the last submitted form. This is a similar case to having multiple instances
of the same form on the same page - each one needs a unique identifier to distinguish
between them. In this case I include the $rownum which changes as you go to each student
in the list.
2012-10-12 12:07:19 +08:00
Jonathan Harker 84b3cbab33 MDL-36015 lib/bennu: use static functions correctly. 2012-10-12 13:34:19 +13:00
Eloy Lafuente (stronk7) f2c33d0b69 Merge branch 'MDL-35858-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-10-12 02:18:03 +02:00
Rossiani Wijaya 696527c0fe MDL-21801 Lesson Module: Removing import power point functionality 2012-10-11 16:11:58 +08:00
Rossiani Wijaya 2c484717e1 MDL-33815 Online Users block: Add query condition to filter out deleted users and lastaccess date greater than now 2012-10-11 16:06:00 +08:00
Ankit Agarwal 0cb1a22cba MDL-28965 administration: Updating description string for the setting navshowallcourses 2012-10-11 14:25:45 +08:00
Ankit Agarwal 437637a11d MDL-31010 comments: setup_course should update if passed courseid is different from the cached one 2012-10-11 10:58:26 +08:00
Eloy Lafuente (stronk7) 5ba6db698d Merge branch 'MDL-35715-MOODLE_23_STABLE' of git://git.luns.net.uk/moodle into MOODLE_23_STABLE 2012-10-11 01:54:17 +02:00
Aparup Banerjee ca93b3af4e Merge branch 'MDL-35231_M23' of git://github.com/lazydaisy/moodle into MOODLE_23_STABLE 2012-10-10 13:03:23 +08:00
Aparup Banerjee 1778232f45 Merge branch 'w41_MDL-35839_m23_enroldeletecleanup' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-10-10 10:32:02 +08:00
AMOS bot c5c735f00e Automatically generated installer lang files 2012-10-10 00:34:20 +00:00
Simon Coggins d01c6b269b MDL-35581 lib: Help popups misaligned for right-to-left languages 2012-10-10 08:56:29 +13:00
Eloy Lafuente (stronk7) 86b1d0eb5f MDL-35898 test reset: Tidyup comment 2012-10-09 11:59:46 +02:00
Eloy Lafuente (stronk7) 5553d3d60f Merge branch 'w41_MDL-35898_m23_coursereset' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-10-09 11:58:35 +02:00
Aparup Banerjee aedc642091 MDL-35587 fixed up whitespaces 2012-10-09 16:36:20 +08:00
Aparup Banerjee e72606c83f Merge branch 'MDL-35587_23' of git://github.com/rlorenzo/moodle into MOODLE_23_STABLE 2012-10-09 16:28:49 +08:00
Frederic Massart ad87b3a2cc MDL-35858 question: Fixed display of feedback in cloze questions 2012-10-09 16:13:33 +08:00
Petr Škoda e22cff45ab MDL-35898 include static course caches in test resets 2012-10-09 10:10:19 +02:00
Rajesh Taneja 18f9ad377f MDL-35787 Mnet: If student role is not defined then throw error 2012-10-09 15:35:04 +08:00
Rajesh Taneja add569ebe0 MDL-35787 Mnet: fixed php strict standards warnings 2012-10-09 15:35:03 +08:00
Aparup Banerjee 50cef6aa36 Merge branch 'wip-MDL-30754-m23' of git://github.com/samhemelryk/moodle into MOODLE_23_STABLE 2012-10-09 14:32:31 +08:00
Aparup Banerjee 976a9da987 Merge branch 'WIP-MDL-35724-M23_quiz' of git://github.com/nadavkav/moodle into MOODLE_23_STABLE 2012-10-09 14:11:32 +08:00
Aparup Banerjee 34983250b1 Merge branch 'MDL-35776_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-10-09 11:53:43 +08:00
Aparup Banerjee ae48ff8a17 Merge branch 'MDL-35837-M23' of git://github.com/nadavkav/moodle into MOODLE_23_STABLE 2012-10-09 10:25:33 +08:00
Rajesh Taneja 8715a53d90 MDL-30691 Adminstration: Added css to break long word in filter table 2012-10-09 10:02:45 +08:00
AMOS bot 5364f9c7cd Automatically generated installer lang files 2012-10-09 00:34:42 +00:00
Eloy Lafuente (stronk7) f5ba035015 Merge branch 'wip-MDL-26348-m23' of git://github.com/samhemelryk/moodle into MOODLE_23_STABLE 2012-10-09 01:38:22 +02:00
Eloy Lafuente (stronk7) 5cb3d27681 Merge branch 'MDL-35141-m23' of git://github.com/sammarshallou/moodle into MOODLE_23_STABLE 2012-10-09 00:47:11 +02:00
Eloy Lafuente (stronk7) 57ca2e4375 Merge branch 'wip-mdl-35397-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2012-10-09 00:40:14 +02:00
Eloy Lafuente (stronk7) 2689298c8f Merge branch 'MDL-35395_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-10-09 00:26:49 +02:00
Iñaki Arenaza af861e14dc MDL-31968 Make NTLM REMOTE_USER format configurable by the admin
Signed-off-by: Iñaki Arenaza <iarenaza@mondragon.edu>
2012-10-09 00:17:35 +02:00
Eloy Lafuente (stronk7) 859d840627 Merge branch 'MDL-34794_M23' of git://github.com/raymondAntonio/moodle into MOODLE_23_STABLE 2012-10-09 00:08:26 +02:00
Eloy Lafuente (stronk7) 8b1cb823de Merge branch 'wip-mdl-35047-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2012-10-08 23:57:11 +02:00
Eloy Lafuente (stronk7) 3e0e4917d8 Merge branch 'w41_MDL-35382_m23_reordertest' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-10-08 23:54:51 +02:00
Eloy Lafuente (stronk7) 7516f96676 Merge branch 'MDL-35519_book_cancel_23' of git://github.com/andyjdavis/moodle into MOODLE_23_STABLE 2012-10-08 23:08:02 +02:00
Eloy Lafuente (stronk7) 2ed34366f6 Revert "MDL-34894 course ws unit tests: fix windows problem."
This reverts commit 40d651bbbb.

With MDL-35714, each test gets gc_collect_cycles() called, so
no need to call it "manually".
2012-10-08 22:54:33 +02:00
Eloy Lafuente (stronk7) 85b1e97857 Merge branch 'w41_MDL-35714_m23_testgc' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-10-08 22:52:12 +02:00
Nadav Kavalerchik aae3d3445e MDL-35724 - Move Question Marks block to the left (Question Bank page),in RTL mode 2012-10-08 11:35:59 +02:00
Nadav Kavalerchik 92bff8685c MDL-35724 - Right align "Question Type" label in Quiz Editing page, when in RTL mode 2012-10-08 11:35:58 +02:00
Aparup Banerjee c116bd70a0 Merge branch '23STABLE-wip-MDL-35694' of git://github.com/jennymgray/moodle into MOODLE_23_STABLE 2012-10-08 17:26:45 +08:00
Aparup Banerjee e4feb70b66 Merge branch 'WIP-MDL-35723-M23_quiz' of git://github.com/nadavkav/moodle into MOODLE_23_STABLE 2012-10-08 17:16:12 +08:00
Aparup Banerjee 785bc3bca9 Merge branch 'w41_MDL-35739_m23_cliinstall' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-10-08 17:06:43 +08:00
Aparup Banerjee e7afca9468 Merge branch 'wip-MDL-34448-MOODLE_23_STABLE' of git://github.com/abgreeve/moodle into MOODLE_23_STABLE 2012-10-08 15:28:37 +08:00
Adrian Greeve 768a2ceafd MDL-34448 - mod/data - Fixing separate groups viewing all entries. 2012-10-08 14:50:27 +08:00
Marina Glancy 2741c017cb MDL-35661 local plugins do not have general settings URL 2012-10-08 11:34:10 +08:00
Sam Hemelryk cafabb5fd0 Merge branch 'MDL-35634-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-10-08 11:36:21 +13:00
Davo Smith cd2a0bf715 MDL-35288 drag and drop upload - adjust error message text when attempting to upload a folder 2012-10-08 11:19:48 +13:00
Sam Hemelryk fff33fd66d Merge branch 'MDL-35211_M23' of git://github.com/kordan/moodle into MOODLE_23_STABLE 2012-10-08 11:02:33 +13:00
Sam Hemelryk 30939d2a9a Merge branch 'MDL-35763-m23' of git://github.com/netspotau/moodle-mod_assign into MOODLE_23_STABLE 2012-10-08 10:44:18 +13:00
Sam Hemelryk 8c2eca7d16 Merge branch 'MDL-33646-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2012-10-08 10:22:06 +13:00
Sam Hemelryk f605b97aa4 Merge branch 'MDL-35667_extra_credit_loop_23' of git://github.com/andyjdavis/moodle into MOODLE_23_STABLE 2012-10-08 10:15:37 +13:00
Sam Hemelryk b855945836 Merge branch 'MDL-35730_23' of https://github.com/aolley/moodle into MOODLE_23_STABLE 2012-10-08 10:06:12 +13:00
Sam Hemelryk f062a78344 MDL-32326 dock: Clarified use of CSS rotation 2012-10-08 09:45:27 +13:00
Didier Raboud 67728fe717 MDL-30754: Make sure to always display breadcrumbs when browsing categories. 2012-10-08 09:37:37 +13:00
Sam Hemelryk 77957668cc MDL-26348 tool_customlang: Fixed up SQL causing issues in Oracle 2012-10-08 09:22:24 +13:00
Petr Škoda e9c9610f8b MDL-35739 show langs on separate lines in CLI installer
This fixes column width issues and compatibility with RTL languages.
2012-10-07 21:04:57 +02:00
Petr Škoda 6f0f18a4d4 MDL-35839 fix invalid enrol instance delete cleanup 2012-10-06 19:26:37 +02:00
Nadav Kavalerchik 26d2edcc82 MDL-35245 - Missing scrollbar in Activity Chooser, when in RTL mode 2012-10-06 13:45:33 +02:00
Petr Skoda f31ee1292a MDL-35382 fix random course test failures 2012-10-06 13:28:27 +02:00
Petr Škoda 2104c9fdc3 MDL-35714 run gc before test reset 2012-10-06 10:04:32 +02:00
AMOS bot 7c6d4ed0a7 Automatically generated installer lang files 2012-10-06 00:34:00 +00:00
Mary Evans 33b59af020 MDL-35231 theme_serenity: fixed misalignment and styling of mod/assignment/action/edit by updating custommenu css in theme/serenity/style/core.css 2012-10-06 01:31:19 +01:00
Tim Hunt eccf42746c MDL-35395 formslib: a method to disable formchangechecker for a form. 2012-10-05 17:45:07 +01:00
Eloy Lafuente (stronk7) 562dbe408e weekly release 2.3.2+ 2012-10-05 13:38:50 +02:00
Eloy Lafuente (stronk7) 035997329a Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2012-10-05 13:33:02 +02:00
Eloy Lafuente (stronk7) 4abc5a1a2c Revert "MDL-34257 quiz 'secure' mode: PAGE initialisation order issues."
This reverts commit d205afe662.
2012-10-05 13:10:06 +02:00
Dan Poltawski db8e84ae1a Revert "MDL-33117 grade: added some smarts to the user report method inject_rowspans() to deal with activity conditional availability"
This reverts commit 60b6b6280b.
2012-10-05 16:20:52 +08:00
Jenny Gray 077fde5dc5 MDL-35694 logs: extend course log report downloads with action url 2012-10-05 09:05:18 +01:00
Jason Fowler 8cfc92afdd MDL-32184 - Course - Fixing incorrect redirect when toggling course edit while inside an activity -- Patch provided by Kanika Goyal 2012-10-05 15:27:51 +08:00
Ankit Agarwal 5747c6bccd MDL-33646 book: Adding a notice instead of error when there is no content in the book 2012-10-05 13:41:44 +08:00
sam marshall 5c3cb55b5d MDL-34228 Completion: Add capability that controls if a user is shown in reports 2012-10-04 10:51:29 +01:00
Rajesh Taneja d1085311c9 MDL-32218 Blocks: allowblockstodock is also checked for region dock status 2012-10-04 17:27:05 +08:00
Dan Poltawski 5e6f2cda64 Merge branch 'MDL-35767-MOODLE_23_STABLE' of git://git.luns.net.uk/moodle into MOODLE_23_STABLE 2012-10-04 16:57:57 +08:00
Ruslan Kabalin e6b958d4db MDL-35767 Fix missing target event group check
Prevent interfering between items from different groups (and no groups)
2012-10-04 09:52:38 +01:00
Rajesh Taneja 90c6925bdb MDL-27309 Blocks: command node is taken from dockitem during restore 2012-10-04 15:26:22 +08:00
AMOS bot 0a1c7a188a Automatically generated installer lang files 2012-10-04 00:35:00 +00:00
Tim Hunt 13815377b5 MDL-35776 user ajax: fix sort order in chrome.
It seems that Chrome orders fields of objects in order of array key.
Therefore we must stop using user.id in the PHP arrays, and instead
ensure that we use sequential numbers.

This commit fixes the enrol UI.
2012-10-03 19:14:47 +01:00
Tim Hunt ea29e3141a MDL-35776 user ajax: fix sort order in chrome.
It seems that Chrome orders fields of objects in order of array key.
Therefore we must stop using user.id in the PHP arrays, and instead
ensure that we use sequential numbers.

This commit fixes the user selector.

Conflicts:
	user/selector/module.js
	user/selector/search.php
2012-10-03 19:14:41 +01:00
Frederic Massart 1c409bfe80 MDL-35634 course: Restored alt attribute on module icons 2012-10-03 17:04:16 +08:00
Andrew Davis 113f51d7c9 MDL-35519 mod_book: fixed the cancel import redirect URL 2012-10-03 12:48:36 +08:00
Damyon Wiese 36c7b8665f MDL-35763: Add ignoredirty class to drop down lists in assignment grading options form. 2012-10-03 11:57:25 +08:00
Dan Poltawski aaed6d7800 Merge branch 'MDL-35754-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-10-03 10:26:22 +08:00
Frederic Massart 1e5b1d6dad MDL-35754 libraries: openpopup() does not fail when window name is not set 2012-10-03 09:58:31 +08:00
Eloy Lafuente (stronk7) a8d7f5cf15 Merge branch 'MDL-35744_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-10-03 00:40:35 +02:00
Sam Hemelryk c67ed6adfe Merge branch 'MDL-33829_23' of https://github.com/andyjdavis/moodle into MOODLE_23_STABLE 2012-10-03 10:07:16 +13:00
Sam Hemelryk 9289c14e0c Merge branch 'MDL-35654_M23' of git://github.com/lazydaisy/moodle into MOODLE_23_STABLE 2012-10-03 09:53:11 +13:00
Nadav Kavalerchik 1c1455f29a MDL-35723 - Align to center the "Quiz Feedback" label,when in RTL mode 2012-10-02 21:49:10 +02:00
Eloy Lafuente (stronk7) 9228a5d347 Merge branch 'm23_MDL-35227' of git://github.com/danmarsden/moodle into MOODLE_23_STABLE 2012-10-02 21:40:58 +02:00
Eloy Lafuente (stronk7) fc0f1c3cbc Merge branch 'm23_MDL-35557' of git://github.com/danmarsden/moodle into MOODLE_23_STABLE 2012-10-02 20:28:13 +02:00
Tim Hunt db1052ce5c MDL-35744 quiz: fix review options for Never submitted attempts 2012-10-02 15:53:59 +01:00
Eloy Lafuente (stronk7) 0a7db801f3 Merge branch 'm23_MDL-35562' of git://github.com/danmarsden/moodle into MOODLE_23_STABLE 2012-10-02 15:59:09 +02:00
Ruslan Kabalin 1a2b345232 MDL-35715 course dragdrop Fix the ability to drag back to the empty section 2012-10-02 14:55:48 +01:00
Frederic Massart 80f497ea40 MDL-28235 form: Removed close icon of help icon popups 2012-10-02 14:36:30 +08:00
Frederic Massart bbb553e077 MDL-28235 form: Help button popup close accessibility improved
AMOS BEGIN
 CPY [close,editor],[close,form]
AMOS END
2012-10-02 14:36:30 +08:00
Rajesh Taneja 08363c5c80 MDL-35047 tool_xmldb: Added missing strings for xmldb 2012-10-02 14:21:01 +08:00
Dan Poltawski 845cc02904 Merge branch 'MDL-34570-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-10-02 13:57:00 +08:00
Rajesh Taneja 5735b5a2ac MDL-35397 Administration: changed link for 'many other contributors'
Previously 'many other contributors' was pointing to http://docs.moodle.org/dev/Credits
now, it will point to http://moodle.org/dev.
2012-10-02 13:43:47 +08:00
Adam Olley 8c4fcc0e1a enrol_manual: Set context correctly in manual enrolment user selector 2012-10-02 14:59:58 +09:30
Dan Poltawski d9cada0a9d Merge branch 'MDL-35370_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-10-02 12:09:36 +08:00
Dan Poltawski d0154d2996 Merge branch 'MDL-35693_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-10-02 11:47:57 +08:00
Dan Poltawski 05ab3435c0 Merge branch 'MDL-35665' of git://github.com/raymondAntonio/moodle into MOODLE_23_STABLE 2012-10-02 11:45:32 +08:00
Dan Poltawski 09e49e5c6e Merge branch 'MDL-35698_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-10-02 11:40:23 +08:00
Dan Poltawski 8aaf7adccb Merge branch 'WIP-MDL-35708-M23_quiz' of git://github.com/nadavkav/moodle into MOODLE_23_STABLE 2012-10-02 11:36:56 +08:00
Dan Poltawski e1361139d9 Merge branch 'w40_MDL-35619_m23_otheravatars' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-10-02 10:41:58 +08:00
Dan Poltawski 373d3178e4 Merge branch 'MDL-35680_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-10-02 09:52:35 +08:00
Jody Steele bda487868e MDL-33933 mod_forum: fix incorrect capability check 2012-10-02 09:44:19 +08:00
Dan Poltawski 2cbbf5d829 Merge branch 'MDL-33117_grade_display_23' of git://github.com/andyjdavis/moodle into MOODLE_23_STABLE 2012-10-02 09:33:09 +08:00
Eloy Lafuente (stronk7) 54dd6ee750 MDL-35669 gravatar amend and complete gravatar tests. 2012-10-02 01:35:50 +02:00
Eloy Lafuente (stronk7) ba804c9ea9 MDL-35669 gravatar Fix secure image urls. 2012-10-02 01:35:40 +02:00
Sam Hemelryk 577777cf03 Merge branch 'm23_MDL-35472' of git://github.com/totara/moodle into MOODLE_23_STABLE 2012-10-02 11:10:24 +13:00
Sam Hemelryk 500ade05cb Merge branch 'MDL-34257_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-10-02 10:45:51 +13:00
Michael Aherne 30c9794aec MDL-35669 gravatar Provide default image URL to Gravatar 2012-10-01 23:44:31 +02:00
Sam Hemelryk 4891199f10 Merge branch 'MDL-30885_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-10-02 10:31:08 +13:00
Sam Hemelryk 50b252cdde Merge branch 'MDL-35547_23' of git://github.com/enovation/moodle into MOODLE_23_STABLE 2012-10-02 10:15:30 +13:00
Eloy Lafuente (stronk7) 50e8e4d00b Merge branch 'MDL-34931-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-10-01 13:37:12 +02:00
Eloy Lafuente (stronk7) aa63be7f5f Merge branch 'MDL-35637_m23' of git://github.com/markn86/moodle into MOODLE_23_STABLE 2012-10-01 13:19:22 +02:00
Eloy Lafuente (stronk7) 4df574f9e5 Merge branch 'wip-MDL-34234-m23' of git://github.com/samhemelryk/moodle into MOODLE_23_STABLE 2012-10-01 13:10:06 +02:00
Jerome Mouneyrac b843f7aee2 MDL-34971 PHPunit test: user/externallib.php 2012-10-01 12:56:41 +02:00
Eloy Lafuente (stronk7) 198178ff2a Merge branch 'MDL-35644-MOODLE_23_STABLE' of git://github.com/mouneyrac/moodle into MOODLE_23_STABLE 2012-10-01 12:46:26 +02:00
Eloy Lafuente (stronk7) 35e19e2acd Merge branch 'MDL-34894_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-10-01 11:08:14 +02:00
Petr Škoda 50675bf549 MDL-35619 fix invalid avatars on other users page 2012-10-01 09:51:12 +02:00
Andrew Davis 7ad8f46848 MDL-35667 core_grade: added a new test for grade_category::apply_limit_rules() 2012-10-01 12:59:49 +08:00
Andrew Davis 410d0dc243 MDL-31782 core_grade: fixed a potential infinite loop 2012-10-01 12:59:27 +08:00
Nadav Kavalerchik af277cc994 MDL-35708 - Right align user's information in quiz attempt review page , when in RTL mode (theme/standard & base) 2012-09-30 23:53:01 +02:00
Sam Hemelryk 194e79536e MDL-34234 course: Fixed notice causing issues in JS when upgrade settings for 2.3+ not run 2012-10-01 09:57:58 +13:00
Tomasz Muras d0bb10027b MDL-35547 Fetch more sub-categories with one SQL query. 2012-09-30 19:29:54 +02:00
Tomasz Muras 2ade1b52f9 MDL-35547 Detect loops in question categories. 2012-09-30 19:29:53 +02:00
Tomasz Muras 24d9d1811f MDL-35547 Detect question category pointing to itself as a parent. 2012-09-30 19:29:52 +02:00
Andrew Davis 88852071b5 MDL-33829 mod_glossary: added some smarts so glossary entries with an image in their description are classed as richhtml instead of plainhtml 2012-09-30 11:11:29 +08:00
Jason Fowler d695785710 MDL-33829 - Glossary - Adding Rich Portfolio Export support 2012-09-30 11:11:29 +08:00
Tim Hunt 2d04a1fe31 MDL-35698 quiz cron: group overrides not computed correctly
Thanks to Matt Petro for finding the bug in this monster SQL statement.
2012-09-29 09:37:20 +01:00
AMOS bot 6b7cd710cd Automatically generated installer lang files 2012-09-29 00:34:18 +00:00
Tim Hunt 0222cd9545 MDL-35693 question engine: set id when saving a new question_attempt 2012-09-28 15:29:57 +01:00
Raymond Wijaya 10839ace75 MDL-34794_M23: Add reset course feature in mod_assign (new assignment) 2012-09-28 16:25:55 +08:00
Raymond Wijaya b865c07b69 MDL-35665: Cherry-pick MDL-35389 : Fix an error when changing locked state of a assignment is changed 2012-09-28 12:30:30 +08:00
Andrew Davis 60b6b6280b MDL-33117 grade: added some smarts to the user report method inject_rowspans() to deal with activity conditional availability 2012-09-28 12:14:45 +08:00
Frederic Massart d3187c299a MDL-34570 Accessibility: Adding labels on text inputs and selects to questions 2012-09-28 11:39:32 +08:00
Rossiani Wijaya daa3c5ff1b MDL-34570 accessibility compliance for question: edit string label 2012-09-28 11:39:32 +08:00
Frederic Massart 7765e94f5e MDL-34931 core_grade: Fixed grades hidden when activity is hidden 2012-09-28 11:39:20 +08:00
Mary Evans 14a695f607 MDL-35654 theme_anomaly: Added custom menu renderer to aid RTL styling of menu 2012-09-28 02:57:54 +01:00
Dan Marsden 31fabbdbaa MDL-35562 enrol_database: enrolment_sync - don't halt sync on failed search for course. 2012-09-28 09:07:29 +12:00
Dan Marsden add494f1af MDL-35557 enrol/database: use distinct call when getting list of courses that should be added. 2012-09-28 09:05:52 +12:00
Dan Marsden 860c7e82bd MDL-35227 SCORM: set completion in correct location. 2012-09-28 09:03:54 +12:00
Tim Hunt 28c9348405 MDL-35680 user selector: more usable when queries are slow.
The problem is to do when you pause a bit, so a search starts, and then
type a bit more before the search finishes. It was behaving like this:

1. Type a bit, then pause.
2. First search request sent.
3. Type a bit more, then pause.
4. Second search request sent.
5. First search request completes.
6. You try to select one result.
7. Second search request comples, overwriting what you are selecting.

This fix works by cancelling the first request before sending the
second.
2012-09-27 19:10:41 +01:00
Tim Hunt 40d651bbbb MDL-34894 course ws unit tests: fix windows problem.
This fixes a weird windows-only failure, as explained in the tracker
issue.
2012-09-27 18:59:50 +01:00
Tim Hunt 022a3555d1 MDL-30885 quiz: use formchangechecker during quiz attempts.
To avoid the possiblity of dataloss if a student tries to navigate away
having changed some answers.
2012-09-27 14:15:37 +01:00
Tim Hunt f0f2014316 MDL-35620 question engine: should distinguish NULL and 0.
This only matters in an obscure edge case, but it is an edge case we hit
with one of the OU question types.

This load data code is processing the results of a LEFT JOIN, so is_null
is the correct logic.
2012-09-27 12:35:55 +01:00
Tim Hunt ad1a52e07c MDL-35370 cloze qtype: distinguish wrong & unanswered subqs
This affects the subquestions that appear as an embedded text input box.

There are three cases:
1. Input for subq left blank
2. Input for subq was wrong, and matched by a * wildcard.
3. Input for subq was wrong, and did not match any answer.

2. and 3. should look identical, apart from any feedback in case 2.

1. is different. The state should be displayed as "Not answered" even
though the mark for this part is still shown as 0.

There are some new unit tests for these cases.

Also, we slighly improve handling of , for decimal point in multianswer,
although there are still issues.

While working on this, I made some minor clean-ups in shortanswer and
numerical qtypes.
2012-09-27 12:35:35 +01:00
Tim Hunt d205afe662 MDL-34257 quiz 'secure' mode: PAGE initialisation order issues. 2012-09-27 12:34:51 +01:00
Dan Poltawski 9273bd1abb weekly release 2.3.2+ 2012-09-27 18:51:24 +08:00
Dan Poltawski 11d19d4cfb Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2012-09-27 18:47:34 +08:00
Jerome Mouneyrac 786b831653 MDL-35198 replace key_exists by array_key_exists 2012-09-27 15:34:48 +08:00
Mark Nelson 40755f9584 MDL-35637 group: Fix form submission error that occurs when GD version is not set. 2012-09-27 11:58:47 +08:00
Dan Poltawski 12f9c36df8 Revert "MDL-32184 - Course - Fixing incorrect redirect when toggling course edit while inside an activity -- Patch provided by Kanika Goyal"
This reverts commit a1db00dd1a.
2012-09-27 11:32:02 +08:00
AMOS bot 66652c60c0 Automatically generated installer lang files 2012-09-27 00:34:44 +00:00
Nadav Kavalerchik 20a1f8a9c5 MDL-35481 - Invert "search option" listbox "open" arrow, when in RTL mode (page: manual user course registration ) and Personal Blog page 2012-09-27 00:10:37 +02:00
Nadav Kavalerchik 2a8690dab5 MDL-35246 - Invert all action arrows in Question Bank categories management, when in RTL mode 2012-09-26 23:54:10 +02:00
Nadav Kavalerchik 68164ad218 MDL-35527 - Left justify CLOSE button on modal dialog boxes, when in RTL mode 2012-09-26 21:50:46 +02:00
Eloy Lafuente (stronk7) 249d073058 MDL-35578 - Also justify email2, used in signup 2012-09-26 19:49:26 +02:00
Nadav Kavalerchik 3147b59c8a MDL-35578 - Left justify LTR Form input fields (email, idnumber, url, phone...), when in RTL mode 2012-09-26 19:37:43 +02:00
Dan Poltawski 0a99c77ede Merge branch 'wip-MDL-35276-MOODLE_23_STABLE' of git://github.com/marinaglancy/moodle into MOODLE_23_STABLE 2012-09-26 15:21:36 +08:00
Marina Glancy 25878bcd22 MDL-35276 fix redirect to course/section pages 2012-09-26 15:17:14 +08:00
Jerome Mouneyrac 3f676aa5bd MDL-35644 user_get_details: admin should be able to see description 2012-09-26 14:29:21 +08:00
Sam Hemelryk 41a5203c2a Merge branch 'wip-MDL-35276-MOODLE_23_STABLE' of git://github.com/marinaglancy/moodle into MOODLE_23_STABLE 2012-09-26 15:13:33 +12:00
Marina Glancy 583c0cf67f MDL-35276 fix redirect to course/section pages 2012-09-26 10:58:03 +08:00
Jason Fowler f0f3338000 MDL-34476 - Blocks - Fixing context issue 2012-09-26 14:40:24 +12:00
Sam Hemelryk 678e90a080 Merge branch 'MDL-34573_accessibility_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE 2012-09-26 10:10:23 +12:00
Sam Hemelryk 1172c2bd2f Merge branch 'wip-MDL-34476-stable23' of git://github.com/phalacee/moodle into MOODLE_23_STABLE 2012-09-26 08:32:52 +12:00
Sam Hemelryk 792a3c4ea9 MDL-31976 course: Better alt for edit section icon 2012-09-26 08:24:06 +12:00
Sam Hemelryk 4c6962068a Merge branch 'MDL-31976-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-09-26 08:20:37 +12:00
Dan Poltawski 2d39f72b59 Merge branch 'MDL-34328-MOODLE_23_STABLE-2' of git://git.luns.net.uk/moodle into MOODLE_23_STABLE 2012-09-25 16:37:32 +08:00
Dan Poltawski 790ad23dd6 Merge branch 'MDL-34778_accessibility_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE 2012-09-25 13:43:34 +08:00
Dan Poltawski 00d62e135d Merge branch 'MDL-35252_M23' of git://github.com/raymondAntonio/moodle into MOODLE_23_STABLE 2012-09-25 13:14:45 +08:00
Dan Poltawski 700bbb5fb9 Merge branch 'MDL-34571_accessibility_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE 2012-09-25 13:11:10 +08:00
Raymond Wijaya ff61f14c04 MDL-35252: Fix a bug that creates unneccessary rows in grade_grades table when unchecking 'overridden' check box in gradebook update 2012-09-25 12:19:07 +08:00
Dan Poltawski 125759ddf4 Merge branch 'MDL-35202-m23' of git://github.com/netspotau/moodle-mod_assign into MOODLE_23_STABLE 2012-09-25 11:43:05 +08:00
Dan Poltawski df87119b5a Merge branch 'MDL-35321-MOODLE_23_STABLE' of git://github.com/micaherne/moodle into MOODLE_23_STABLE 2012-09-25 11:32:34 +08:00
Nadav Kavalerchik a2b837e5be MDL-35576 - Right padding is missing on Date field/element, when in RTL mode (minor fix) 2012-09-25 01:17:28 +02:00
Nadav Kavalerchik 2bb3259fc3 MDL-35537 - Right align registration text on login page, when in RTL mode 2012-09-25 00:36:37 +02:00
Sam Hemelryk 6b69bf463a MDL-34607 files: post integration version bump 2012-09-25 09:56:11 +12:00
Sam Hemelryk 8a7cc012fd Merge branch 'MDL-34607-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-09-25 09:52:00 +12:00
Sam Hemelryk fd0758da1b Merge branch 'MDL-35375-m23' of git://github.com/netspotau/moodle-mod_assign into MOODLE_23_STABLE 2012-09-25 09:23:27 +12:00
Dan Poltawski 675c2b8543 Merge branch 'wip-MDL-32184-s23' of http://github.com/phalacee/moodle into MOODLE_23_STABLE 2012-09-24 15:36:04 +08:00
Dan Poltawski 7e0deaf3fd Merge branch 'MDL-26940-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-09-24 15:32:31 +08:00
Frederic Massart fede879cf2 MDL-31499 Javascript: Handle invalid window names in openpopup 2012-09-24 15:24:30 +08:00
Jason Fowler a1db00dd1a MDL-32184 - Course - Fixing incorrect redirect when toggling course edit while inside an activity -- Patch provided by Kanika Goyal 2012-09-24 15:04:06 +08:00
Dan Poltawski bb6b275906 Merge branch 'wip-MDL-35542-MOODLE_23_STABLE' of git://github.com/marinaglancy/moodle into MOODLE_23_STABLE 2012-09-24 14:37:49 +08:00
Damyon Wiese b666bddae2 MDL-35375: Ensure the assignment grading table is always sorted by at least one unique column
Conflicts:

	mod/assign/gradingtable.php
2012-09-24 12:38:24 +08:00
Sam Hemelryk e1a809b36f Merge branch 'MDL-35312-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-09-24 15:53:48 +12:00
Sam Hemelryk 1e112f8801 Merge branch 'MDL-35517_23' of git://github.com/stronk7/moodle into MOODLE_23_STABLE 2012-09-24 15:21:28 +12:00
Ruslan Kabalin 3e8d7ca16e MDL-35442 Add settings and uninstall link for local plugins 2012-09-24 11:19:50 +08:00
Dan Poltawski daccc92d9e Merge branch 'MDL-35242-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-09-24 11:08:18 +08:00
Sam Hemelryk 3c6510c106 Merge branch 'MDL-30889-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2012-09-24 15:05:44 +12:00
Sam Hemelryk 91cb7bdab5 Merge branch 'MDL-35398-m23' of git://github.com/netspotau/moodle-mod_assign into MOODLE_23_STABLE 2012-09-24 15:03:26 +12:00
Damyon Wiese 2b7024847d MDL-35427: Remove resetting of $_POST - use $mform->setConstant to force update to rownum instead.
Conflicts:

	mod/assign/locallib.php
2012-09-24 15:02:17 +12:00
Rex Lorenzo e36ab38642 MDL-35587 - Display grouping name for Drag and Dropped resources 2012-09-23 01:15:11 -07:00
Andrew Robert Nicols cffbc80ac7 MDL-34328 Correct usage of e.drop when catching missed drag/drop events 2012-09-21 15:25:29 +01:00
Paul Nicholls 3f6970bf92 MDL-34328: block dragdrop - disallow dragging from show/hide and dock icons
Tell the YUI drag/drop delegate that the show/hide and dock icons are not valid drag handles.  Otherwise, a drag can be initiated by showing or hiding a block (probably not from docking one, but better safe than sorry).  Not strictly related to MDL-34328, but likely to be encountered whilst testing - and closely related to another patch for MDL-34328.

Note that the "invalid" config option for the delegate takes a string - not an array - but can have multiple selectors separated by commas.
2012-09-21 15:25:29 +01:00
Paul Nicholls 65c8ccc02e MDL-34328: block dragdrop - performance rewrite
Use YUI's DragDrop delegates for block dragdrop - one per block region - rather than initialising a Drag object for each individual block.
2012-09-21 15:25:29 +01:00
Paul Nicholls a573a5157e MDL-34328: course section "toolboxes" - performance rewrite
Use YUI event delegation to handle events in course section "toolboxes" (visibility and highlight toggles) rather than attaching event handlers to each individual button we care about.  Also remove the (now unused) replace_button() function.
2012-09-21 15:25:29 +01:00
Paul Nicholls e4db46b4d9 MDL-34328: course resource "toolboxes" - performance rewrite
Use YUI event delegation to handle events in course resource "toolboxes" (sets of editing icons) rather than attaching event handlers to each individual button we care about.  Don't waste time setting the CSS cursor to what it already is, use .all() rather than replace_button() if we just need the node.

Section toolboxes could probably also be done this way to some extent, but the payoff may not be worth the effort - they're so minimal that they don't tend to cause issues.
2012-09-21 15:25:29 +01:00
Paul Nicholls 99cd723af5 MDL-34328: course dragdrop - performance rewrite
Use YUI's DragDrop delegates for course dragdrop, rather than initialising a Drag object for each individual section and each individual activity/resource.  Also, clone a single drag handle for activities/resources, rather than repeatedly creating a whole new one with the same parameters for each activity/resource.
2012-09-21 15:25:28 +01:00
Jason Fowler 94167a2dee MDL-34476 - Course Completeion, Blocks - Allowing teachers to access the Full Course Report from the Course Completion Block -- Initial patch provided by Nadav Kavalerchik 2012-09-21 15:21:18 +08:00
Ankit Agarwal 7cdb725081 MDL-30889 calendar: Adding focus and blur events to calendar renderer 2012-09-21 14:34:51 +08:00
Frederic Massart 05daea0f6d MDL-31976 Accessbility: Action icons on course page do not need title attributes 2012-09-21 11:30:51 +08:00
Frederic Massart 6b15d50a60 MDL-35312 Web Services: Fixed typo in capability of course update 2012-09-21 09:57:45 +08:00
Frederic Massart aa57854075 MDL-35242 Web Services: Removed translation causing error in add_to_log 2012-09-21 09:57:34 +08:00
Frederic Massart 7ae2136b3f MDL-34607 Folder: Remove any sort order during upgrade 2012-09-21 09:56:52 +08:00
Frederic Massart 7be6c09db5 MDL-34607 File API: Removed ordering by sortorder in area tree 2012-09-21 09:56:52 +08:00
AMOS bot 58f8b73f26 Automatically generated installer lang files 2012-09-21 00:34:52 +00:00
Michael Aherne 7ab5b064a6 MDL-35321 course sections Enable reset of grouping access 2012-09-20 16:22:29 +01:00
Eloy Lafuente (stronk7) 2974030611 MDL-35517 course: Handle non-existing $course->maxbytes on course creation. 2012-09-20 10:20:21 +02:00
Marina Glancy a7783bf260 MDL-35542 Fixed a bug when trying to directly link to a file from Dropbox 2012-09-20 15:50:28 +08:00
Marina Glancy 093825d81e MDL-35001 added unit test for function convert_to_array() 2012-09-20 15:50:12 +08:00
Marina Glancy 7116aca6af MDL-35001 removed cycle detection from convert_to_array because it causes error in data 2012-09-20 15:50:11 +08:00
Marina Glancy ed7e6a7356 MDL-33857 Increase performance of queries for Server files repository (small improvements) 2012-09-20 15:49:01 +08:00
Dan Poltawski c366bea3cf weekly release 2.3.2+ 2012-09-20 14:10:34 +08:00
Dan Poltawski 33672ace5f Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2012-09-20 14:05:52 +08:00
AMOS bot 5fc1b61a88 Automatically generated installer lang files 2012-09-20 00:34:31 +00:00
Eloy Lafuente (stronk7) 2ed38452aa MDL-33166 forum: fetch cmid to be used by capability checks. 2012-09-19 21:42:14 +02:00
Dan Poltawski ed78617491 Merge branch 'wip-mdl-30833-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2012-09-19 09:52:18 +08:00
AMOS bot 9b65e5841e Automatically generated installer lang files 2012-09-19 00:34:24 +00:00
Eloy Lafuente (stronk7) b04027c0cf MDL-33166 Forum: whitespace fix 2012-09-19 00:53:05 +02:00
Eloy Lafuente (stronk7) e6084683c8 Merge branch 'wip-mdl-33166-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2012-09-19 00:39:08 +02:00
Simon Coggins 119b5fdc8b MDL-35472: Prevent html tags appearing in page titles
Only a problem when formatstringstriptags is disabled
2012-09-19 09:07:33 +12:00
Eloy Lafuente (stronk7) b437a680d2 Merge branch 'MDL-33198-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2012-09-18 20:06:03 +02:00
Eloy Lafuente (stronk7) 631aedabb4 Merge branch 'w38_MDL-32572_m23_authdbduplicates' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-09-18 19:51:38 +02:00
Petr Škoda 88fbc9a7ef MDL-32572 fix notice when changing internal auth_db passwords 2012-09-18 13:18:18 +02:00
Petr Škoda 3f22e75663 MDL-32572 skip problematic users in auth_db sync 2012-09-18 12:41:07 +02:00
Rajesh Taneja 9ac00a5394 MDL-30833 Accessibility: Added aria-expanded attribute on navigation nodes 2012-09-18 17:29:00 +08:00
Petr Škoda 45a6d31c4f MDL-32572 always lookpup passwords only in records from current auth plugin
This bug should not be creating any problems thanks to our design of login process, but it should be fixed anyway.
2012-09-18 10:38:29 +02:00
Damyon Wiese ce86eb4d08 MDL-35202: Allow for language files that contain non-ascii for actions in assignment 2012-09-18 15:27:58 +08:00
Dan Poltawski 85aa469960 Merge branch 'MDL-30909-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-09-18 15:08:00 +08:00
Frederic Massart 6d3249780b MDL-30909 Accessibility: Improved access to reply form in forums 2012-09-18 14:57:20 +08:00
Damyon Wiese 97b53d6c05 MDL-35398: Quick grading feedback is now pushed to the gradebook 2012-09-18 14:54:01 +08:00
Dan Poltawski bb67dc33e1 Merge branch 'wip-mdl-30831-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2012-09-18 14:51:33 +08:00
Ankit Agarwal ec5c45c4ed MDL-33198 book: Adding h tags to book title to increase accessibility 2012-09-18 09:46:21 +08:00
Ankit Agarwal 58ee763bfb MDL-33198 book: Adding h tags to book titles to increase accessibility while printing a book 2012-09-18 09:46:21 +08:00
Dan Poltawski 05165a7f60 Merge branch 'm23_MDL-34644' of git://github.com/danmarsden/moodle into MOODLE_23_STABLE 2012-09-18 09:27:19 +08:00
Eloy Lafuente (stronk7) 0671db29ce Merge branch 'MDL-32688-m23' of git://github.com/itamart/moodle into MOODLE_23_STABLE 2012-09-18 01:53:50 +02:00
Eloy Lafuente (stronk7) c59d51b67d Merge branch 'MDL-35419_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-09-18 01:28:46 +02:00
Eloy Lafuente (stronk7) b050380df1 Merge branch 'MDL-32230-23' of https://github.com/mackensen/moodle into MOODLE_23_STABLE 2012-09-18 01:20:45 +02:00
Eloy Lafuente (stronk7) 0f5c4b8397 Merge branch 'MDL-34841_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-09-18 01:15:31 +02:00
Eloy Lafuente (stronk7) a0a02f4e0d Merge branch 'w38_MDL-35129_m23_dbmigration' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-09-18 01:12:34 +02:00
David Mudrák 1530136c20 MDL-35344 Ignore available updates info with invalid format
Previously when the server response validation had failed, the property
available_update_checker::recentresponse was left as NULL. This caused
problems in available_update_checker::compare_responses() that expects
proper arrays passed.

This patch makes invalid data being ignored by setting the property to
an empty array as if no data have been fetched yet. A debugging message
is thrown so the admins will be able to diagnose eventual problems in
the future.
2012-09-17 18:04:17 +02:00
Dan Poltawski 07a145dcfc Merge branch 'MDL-33982-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-09-17 16:03:35 +08:00
Dan Poltawski 947d7759bb Merge branch 'MDL-35376_23' of git://github.com/rlorenzo/moodle into MOODLE_23_STABLE 2012-09-17 12:47:53 +08:00
Dan Poltawski 4edc94cbf3 Merge branch 'MDL-30847_23' of git://github.com/dmonllao/moodle into MOODLE_23_STABLE 2012-09-17 12:40:02 +08:00
Rossiani Wijaya 83fbe988f0 MDL-34571 accessibility compliance for report: Add label to select and input text form 2012-09-17 12:15:05 +08:00
Rossiani Wijaya 7a054265dc MDL-34778 enrol: add a space 2012-09-17 12:14:22 +08:00
Rossiani Wijaya b7f0b0b12b MDL-34778 accessibility compliance for enrol: add label tag for input text 2012-09-17 12:14:20 +08:00
Dan Poltawski 614ac18b11 Merge branch 'MDL-34975-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-09-17 11:59:51 +08:00
Dan Poltawski 8673ce8201 Merge branch 'MDL-35374_23' of git://github.com/rlorenzo/moodle into MOODLE_23_STABLE 2012-09-17 11:47:35 +08:00
Dan Poltawski 7056f36f3c Merge branch 'w38_MDL-35454_m23_bogusmaxsize' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-09-17 11:44:45 +08:00
Dan Poltawski bde7deec36 Merge branch 'MDL-35163-MOODLE_23_STABLE' of git://github.com/micaherne/moodle into MOODLE_23_STABLE 2012-09-17 10:51:40 +08:00
Rajesh Taneja 29a33233fc MDL-30831 Accessibility: Added aria role and attributes to dock block 2012-09-17 10:13:18 +08:00
Rex Lorenzo fd7255ace0 MDL-33166 Forum: Adding capability mod/forum:allowforcesubscribe
Conflicts:

	mod/forum/version.php
2012-09-17 10:07:28 +08:00
Frederic Massart 8e977618f8 MDL-34975 Accessibility: Collapsible areas captions can be clicked to expand/collapse 2012-09-17 09:45:36 +08:00
Frederic Massart befd59097b MDL-33982 TinyMCE: Media preview supports external URLs 2012-09-17 09:44:44 +08:00
David Monllao e4c9460c0b MDL-30847 core Adding ARIA attribute to help windows 2012-09-17 09:27:11 +08:00
Petr Škoda 28ac357f86 MDL-35454 ignore invalid $custombytes in get_max_upload_sizes()
This fixes installation and phpunit init regression.
2012-09-17 00:08:36 +02:00
Eric Merrill 1077bf7086 MDL-35411 assign Include plugin (submission/feedback) info, even when there is no user data.
assign_plugin_config data was only included in backups/imports if user data was included in
the backup. This patch moves it out with the standard structure of the assign backup.
2012-09-16 17:57:26 -04:00
Petr Škoda fe5a985c0e MDL-35129 implement new export_table_recordset()
This is necessary because MySQL get_recordset_sql() stores the data in memory, unfortunately the alternative resultset iteration blocks concurrent access - that is why we need new method for export.
2012-09-15 12:03:24 +02:00
Petr Škoda 250b340003 MDL-35129 add missing recordset closing in db transfer 2012-09-14 23:54:56 +02:00
Itamar Tzadok e7f72fb5d6 MDL-32688 My Moodle - Fixed fatal error in guest access to My Moodle 2012-09-14 15:12:17 -04:00
Eloy Lafuente (stronk7) 32efb09e62 weekly release 2.3.2+ 2012-09-14 19:10:43 +02:00
Eloy Lafuente (stronk7) b5b8aac98a Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2012-09-14 19:03:20 +02:00
Michael Aherne 6b3177344d MDL-35163 quiz Make quiz report options available to attempts form 2012-09-14 10:17:17 +01:00
Eloy Lafuente (stronk7) b92083421c Revert "MDL-32125 mod_forum: updating subscription mode not reflected"
This reverts commit b4271570c6.
2012-09-14 10:38:17 +02:00
Eloy Lafuente (stronk7) 77393dec21 Revert "MDL-32125 mod_forum: updating subscription mode not reflected"
This reverts commit fa501712c7.
2012-09-14 10:38:12 +02:00
AMOS bot 9844498b0a Automatically generated installer lang files 2012-09-14 00:34:18 +00:00
Tim Hunt c21f901559 MDL-35419 question manual grading: valdiation must handle 0,5
Yet another , as decimal separator issue!

To fix this nicely, I refactored some code into question_utils.
2012-09-13 16:40:02 +01:00
Simon Coggins a698454089 MDL-34644 SCORM fix completion when only completion on view is selected. 2012-09-13 14:39:12 +12:00
AMOS bot b3557ac52d Automatically generated installer lang files 2012-09-13 00:34:33 +00:00
Kanika Goyal fa501712c7 MDL-32125 mod_forum: updating subscription mode not reflected 2012-09-13 11:27:48 +12:00
Kanika Goyal b4271570c6 MDL-32125 mod_forum: updating subscription mode not reflected 2012-09-13 11:27:47 +12:00
Sam Hemelryk 77ef5e06f9 Merge branch 'wip-mdl-30667-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2012-09-13 11:18:20 +12:00
Sam Hemelryk cdf30c74d8 Merge branch 'MDL-29872_c_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE 2012-09-13 11:12:47 +12:00
Tim Hunt 5df0a6b47e MDL-34841 error importing questions with long names.
The problem was with the non-UTF-8-safe way that a question name
was being constructed from the question text.

I have done a proper fix with methods in the base class to
carefully construct a question name that is reasonable, and
which will fit in the database column. Then I have changed all
importers to use the new methods.

I also remembered not to break the lesson in the process.
2012-09-12 17:38:40 +01:00
Eloy Lafuente (stronk7) bd390545b1 Merge branch 'MDL-34082_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-09-12 17:20:48 +02:00
Tim Hunt b06143c5c2 MDL-34082 course restrict modules: typo in MDL-19125 upgrade code. 2012-09-12 16:15:38 +01:00
David Monllao 7737d24b92 MDL-35264 mod_chat Bigger frame for text input 2012-09-12 14:54:16 +08:00
Sam Hemelryk 561cbb8967 Merge branch 'wip-MDL-34223-MOODLE_23_STABLE' of git://github.com/marinaglancy/moodle into MOODLE_23_STABLE 2012-09-12 10:33:35 +12:00
Sam Hemelryk bdd6847fc2 Merge branch 'MDL-30829-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-09-12 10:27:54 +12:00
Rex Lorenzo 102d0bd05b MDL-35376 - Shortcut/alias not working for Private file repo 2012-09-11 14:24:02 -07:00
Rex Lorenzo 6b43759eff MDL-35374 - Cannot delete blocks off frontpage 2012-09-11 12:28:18 -07:00
Eloy Lafuente (stronk7) 6588886965 Merge branch 'MDL-34984_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE 2012-09-11 16:30:44 +02:00
Jason Fowler e0c567c3be MDL-29463 - Chat - Change socket_setopt to socket_set_options 2012-09-11 14:49:33 +08:00
Sam Hemelryk d5e317882d Merge branch 'MDL-35190-MOODLE_23_STABLE' of git://github.com/mouneyrac/moodle into MOODLE_23_STABLE 2012-09-11 16:45:45 +12:00
Frederic Massart ceed31ad6b MDL-34765 Course: Fixed missing argument in course reordering 2012-09-11 16:41:37 +12:00
Sam Hemelryk 6ab9c3e2ad Merge branch 'MDL-34765-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2012-09-11 15:31:20 +12:00
Sam Hemelryk bbd89d7b10 Merge branch 'MDL-30018_23' of https://github.com/stronk7/moodle into MOODLE_23_STABLE 2012-09-11 15:21:59 +12:00
Sam Hemelryk 08153276ac Merge branch 'MDL-10259_23' of git://github.com/dmonllao/moodle into MOODLE_23_STABLE 2012-09-11 15:18:40 +12:00
Sam Hemelryk d27a76c3e3 Merge branch 'MDL-30857_23' of git://github.com/dmonllao/moodle into MOODLE_23_STABLE 2012-09-11 15:10:48 +12:00
Sam Hemelryk 6d661aa2f1 Merge branch 'm23_MDL-34755' of git://github.com/danmarsden/moodle into MOODLE_23_STABLE 2012-09-11 15:02:26 +12:00
Marina Glancy 1ab628b72e MDL-34223 increased performance in forum_get_file_info() for admins 2012-09-11 10:48:21 +08:00
Marina Glancy c84b70456a MDL-33857 Increase performance of queries for Server files repository
- file_info class now has new methods get_non_empty_children and count_non_empty_children; added default implementation;
- all core classes extending file_info have their implementation of those methods;
- class repository_local_file used for caching get_children() results is removed;
- class repository_local rewritten to use new methods from file_info;
- added caching of retrieved modules in file_browser::get_file_info_context_module() - this query is slow and executed multiple times on big servers
2012-09-11 10:48:13 +08:00
Eloy Lafuente (stronk7) 11a3dd0c0e Merge branch 'MDL-35134_23' of git://github.com/pauln/moodle into MOODLE_23_STABLE 2012-09-11 02:50:29 +02:00
Eloy Lafuente (stronk7) a59f0f25cd Merge branch 'm23_MDL-35156' of git://github.com/danmarsden/moodle into MOODLE_23_STABLE 2012-09-11 02:48:22 +02:00
Eloy Lafuente (stronk7) 35eb1a0f0c Merge branch 'MDL-35171_m23' of git://github.com/merrill-oakland/moodle into MOODLE_23_STABLE 2012-09-11 02:44:56 +02:00
Eloy Lafuente (stronk7) 7189c6102f MDL-34338 mod_folder: delete unused $browser var. 2012-09-11 02:20:17 +02:00
Eloy Lafuente (stronk7) 2e4678332a Merge branch 'wip-MDL-34338-MOODLE_23_STABLE' of git://github.com/marinaglancy/moodle into MOODLE_23_STABLE 2012-09-11 02:19:48 +02:00
Sam Hemelryk cb3a1e355b Merge branch 'm23_MDL-35255' of git://github.com/danmarsden/moodle into MOODLE_23_STABLE 2012-09-11 12:10:55 +12:00
Raymond Wijaya cfe32be822 MDL-34660: Fix SQL error in assignments module with Oracle Database I by replacing 'offline' with 'nosubmissions' 2012-09-11 02:08:54 +02:00
Sam Hemelryk 654338074e Merge branch 'MDL-34916_M23' of git://github.com/kordan/moodle into MOODLE_23_STABLE 2012-09-11 12:06:14 +12:00
Eloy Lafuente (stronk7) c0eee4898a Merge branch 'm23_MDL-35123' of git://github.com/danmarsden/moodle into MOODLE_23_STABLE 2012-09-11 02:03:10 +02:00
Eloy Lafuente (stronk7) 3a3120e206 Merge branch 'm23_MDL-35208' of git://github.com/danmarsden/moodle into MOODLE_23_STABLE 2012-09-11 01:57:21 +02:00
Eloy Lafuente (stronk7) f34cb5797c Merge branch 'MDL-35257' of git://github.com/danpoltawski/moodle into MOODLE_23_STABLE 2012-09-11 01:53:35 +02:00
Eloy Lafuente (stronk7) 8146d3f12d Merge branch 'w37_MDL-35270_m23_oracohort' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-09-11 01:48:55 +02:00
Sam Hemelryk 74fae5244c Merge branch 'MDL-27786-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2012-09-11 11:15:25 +12:00
Sam Hemelryk 1595c976dd Merge branch 'MDL-33374-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2012-09-11 11:10:26 +12:00
Sam Hemelryk 5a05aa9633 Merge branch 'MDL-35007-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2012-09-11 11:07:25 +12:00
David Mudrák babf5f522e MDL-35272 Fix typo in qformat_blackboard_six.php
Credit goes to German Valero for spotting and reporting this.
2012-09-11 01:03:22 +02:00
Adrian Greeve 919105e5d1 MDL-32785 - lib - Ignorning hard frozen fields when submitting data. 2012-09-11 10:48:07 +12:00
Charles Fulton cc17d246e4 MDL-32230 block_rss_client: remove extra cleaning step 2012-09-10 12:31:39 -07:00
Eloy Lafuente (stronk7) ab88177b5e Merge branch 'w37_MDL-35289_m23_tinymcelangs' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2012-09-10 19:53:24 +02:00
Eloy Lafuente (stronk7) f58585807c Merge branch 'MDL-35343_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-09-10 16:41:56 +02:00
Tim Hunt 817fcbb549 MDL-35343 JavaScript visible in multichoice choice feedback.
Also, Match correct answer, and calculated multi and multianswer
feedback.
2012-09-10 13:08:14 +01:00
Frederic Massart 5371fa1928 MDL-30829 Accessibility: Docking a block disables the accessible anchors 2012-09-10 17:22:17 +08:00
Aparup Banerjee 6c990952c9 Merge branch 'MDL-34944-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2012-09-10 17:15:31 +08:00
Aparup Banerjee 1b1c35541a Merge branch 'MDL-35223-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2012-09-10 17:00:47 +08:00
David Monllao 360769aa0f MDL-30857 block_community Removing comments hardcoded height 2012-09-10 15:00:46 +08:00
Aparup Banerjee 49d9947914 Merge branch 'MDL-35264_23' of git://github.com/dmonllao/moodle into MOODLE_23_STABLE 2012-09-10 14:39:01 +08:00
Aparup Banerjee 4ad7bc830e Merge branch 'MDL-27398_23' of git://github.com/dmonllao/moodle into MOODLE_23_STABLE 2012-09-10 14:30:57 +08:00
David Monllao 799de15145 MDL-27398 mod_chat Removing PAGE references 2012-09-10 14:10:26 +08:00
David Monllao f4dfb810c8 MDL-27398 mod_chat Adding file basic doc 2012-09-10 14:10:26 +08:00
David Monllao c8cac02c99 MDL-27398 mod_chat Removing deprecated calls and moving dependencies
Credit to Jorge Villalon
2012-09-10 14:10:18 +08:00
David Monllao 879c31c1ba MDL-27398 mod_chat Adding CLI_SCRIPT to chat daemon
Credit to Jorge Villalon
2012-09-10 14:09:57 +08:00
Aparup Banerjee 9111b11b7b Merge branch 'MDL-34068_23' of git://github.com/dmonllao/moodle into MOODLE_23_STABLE 2012-09-10 13:42:36 +08:00
Eloy Lafuente (stronk7) 8722439751 MDL-30018 restore: better answer matching. Credit goes to Tyler Bannister, thanks!
On backup, contents are cleaned to be safe utf8. That was leading to
some matching problems on restore against not cleaned DB contents (for
already existing questions). This commit adds one fallback method to
perform the match against cleaned DB contents.
2012-09-09 20:30:02 +02:00
Petr Škoda bafffec181 MDL-35270 fix ambiguously defined column
Credit goes to Sara Arjona, thanks.
2012-09-08 10:49:49 +02:00
Petr Škoda 9cd1f8ffe6 MDL-35289 add missing charmap usage info string 2012-09-07 10:30:24 +02:00
Rossiani Wijaya cd029574b6 MDL-29872 Dropbox repository: add message handler to filepicker header and add message to logout from dropbox.
When user clicked on logout button from dropbox repository, it will also logging them out from dropbox site through a popup window
2012-09-07 15:44:08 +08:00
Rossiani Wijaya 14d15f125e MDL-34573 - add label for search tag input text 2012-09-07 15:43:44 +08:00
Rossiani Wijaya 2afda054e8 MDL-34573 Tag: update label for suggested tag 2012-09-07 15:43:44 +08:00
Rossiani Wijaya 5c0c094f3c MDL-34573 accessibility compliance for tag: Add forform input text and select tag 2012-09-07 15:43:43 +08:00
Rossiani Wijaya 689a3bcd17 MDL-34984 admin setting: fixed labeling and shortname display for admin setting 2012-09-07 15:43:09 +08:00
Frederic Massart d37de5e0df MDL-34765 Course: Re-sorting courses uses natural order 2012-09-07 14:13:50 +08:00
David Monllao a08d03a2c0 MDL-34068 mod_chat Sending text/html headers when sending the messages frame output for the first time 2012-09-07 12:11:11 +08:00
David Monllao a2d928b143 MDL-35264 mod_chat Changing the input frame of chat daemon method to a embedded page layout 2012-09-07 12:08:15 +08:00
David Monllao 2904faa0eb MDL-10259 core Adding a search courses box if there are too many courses 2012-09-07 11:29:44 +08:00
Dan Poltawski bd916ad1ee MDL-35257 lib: if $CFG->logguests is disabled, avoid some log actions
This is for performance, else there can be great contention on the guest
user record as we've seen on moodle.org.
2012-09-07 10:24:50 +08:00
Ankit Agarwal e81507f6b6 MDL-27786 calendar: Changing the eventname string for accessibility 2012-09-07 10:22:02 +08:00
Ankit Agarwal 800abd6faf MDL-33374 profile: Use correct text for buttons when creating a new user 2012-09-07 10:19:34 +08:00
Ankit Agarwal bb7f95f830 MDL-34944 book: Implementing reset framework for book 2012-09-07 10:17:13 +08:00
Ankit Agarwal 41b997b1ff MDL-35007 book: Adding rule to parse links to book chapters from 1.9 backups
Conflicts:

	mod/book/version.php
2012-09-07 10:13:09 +08:00
Ankit Agarwal 6d89ac64ab MDL-35223 book: use chapter names in page titles 2012-09-07 10:09:52 +08:00
Marina Glancy f4671476ff MDL-34338: renderer for mod_folder should not use file_info 2012-09-07 09:36:19 +08:00
Dan Marsden fa3a1652bf MDL-35123 SCORM: cleaner version of get_last_attempt and get_last_completed_attempt, fixes support for MS Sql driver 2012-09-06 18:45:43 +12:00
Jerome Mouneyrac a66863c357 MDL-35190 random failures in course externallib test 2012-09-06 11:30:43 +08:00
Dan Marsden 4d48a65159 MDL-35255 mod_assign plagiarism api shift update_status call to after header has been printed. 2012-09-05 12:45:52 +12:00
Kordan e765d3c396 MDL-34916 theme_formal_white: added support for relative path of logos 2012-09-04 09:49:51 +02:00
Kordan 2f9ac3fe1e MDL-35211 theme_formal_white: updated descriptions involved in MDL-34916 2012-09-04 09:11:01 +02:00
Simon Coggins b91833db8a MDL-34755 SCORM: pop-up not loading in IE7/IE8 compat mode 2012-09-04 13:12:34 +12:00
Dan Marsden 70c2ec0ba2 MDL-35208 mod_choice: respect order of options when running backup 2012-09-04 11:02:15 +12:00
Rajesh Taneja 2f2242efa2 MDl-30667 Course: Maxbytes list will show current value, if it's lower then maxbytes 2012-09-03 14:44:23 +08:00
Dan Marsden 43b135e598 MDL-35156 remove references to non-existant options 2012-09-03 12:42:26 +12:00
Eric Merrill e0b818cde0 MDL-35171 formslib Updating date config array to fix problems with month jumping.
Based on https://bugs.php.net/bug.php?id=49115, if you request a month, but do not
specify a date, it will use your current date, which may be beyon a date in the month
requested, causing the return of the next month. This patch specifies the date (1st).
2012-09-01 10:14:51 -04:00
sam marshall d6d63941d7 MDL-35141 Filelib: No icon for epub filetype 2012-08-30 12:20:44 +01:00
Paul Nicholls 130dd42130 MDL-35134: course/format/weeks: remove trailing comma in object definition
IE doesn't like trailing commas in object (or array) definitions, and will cease processing JavaScript when it hits one.
2012-08-30 11:25:35 +12:00
Eric Merrill 35870a76db MDL-34363 gradebook Adding check to prevent incorrect override when a blank feedback is submitted. 2012-08-21 00:26:55 -04:00
564 changed files with 12954 additions and 6366 deletions
+5 -1
View File
@@ -25,4 +25,8 @@ CVS
/.project
/.buildpath
/.cache
phpunit.xml
phpunit.xml
# Composer support - only composer.json is to be in git, the rest is installed in each checkout.
composer.phar
composer.lock
/vendor/
+2 -12
View File
@@ -240,18 +240,8 @@ echo get_string('cliinstallheader', 'install', $CFG->target_release)."\n";
if ($interactive) {
cli_separator();
$languages = get_string_manager()->get_list_of_translations();
// format the langs nicely - 3 per line
$c = 0;
$langlist = '';
foreach ($languages as $key=>$lang) {
$c++;
$length = iconv_strlen($lang, 'UTF-8');
$padded = $lang.str_repeat(' ', 38-$length);
$langlist .= $padded;
if ($c % 3 == 0) {
$langlist .= "\n";
}
}
// Do not put the langs into columns because it is not compatible with RTL.
$langlist = implode("\n", $languages);
$default = $CFG->lang;
cli_heading(get_string('availablelangs', 'install'));
echo $langlist."\n";
+1 -1
View File
@@ -470,7 +470,7 @@ class core_admin_renderer extends plugin_renderer_base {
$copyrighttext = '<a href="http://moodle.org/">Moodle</a> '.
'<a href="http://docs.moodle.org/dev/Releases" title="'.$CFG->version.'">'.$CFG->release.'</a><br />'.
'Copyright &copy; 1999 onwards, Martin Dougiamas<br />'.
'and <a href="http://docs.moodle.org/dev/Credits">many other contributors</a>.<br />'.
'and <a href="http://moodle.org/dev">many other contributors</a>.<br />'.
'<a href="http://docs.moodle.org/dev/License">GNU Public License</a>';
//////////////////////////////////////////////////////////////////////////////////////////////////
+5 -10
View File
@@ -59,16 +59,11 @@ $courseid = $course->id;
$contextname = print_context_name($context);
// Get the user_selector we will need.
// Teachers within a course just get to see the same list of people they can
// assign roles to. Admins (people with moodle/role:manage) can run this report for any user.
$options = array('context' => $context, 'roleid' => 0);
if (has_capability('moodle/role:manage', $context)) {
$userselector = new potential_assignees_course_and_above('reportuser', $options);
} else {
$userselector = roles_get_potential_user_selector($context, 'reportuser', $options);
}
$userselector->set_multiselect(false);
$userselector->set_rows(10);
// Teachers within a course just get to see the same list of enrolled users.
// Admins (people with moodle/role:manage) can run this report for any user.
$options = array('accesscontext' => $context);
$userselector = new role_check_users_selector('reportuser', $options);
$userselector->set_rows(20);
// Work out an appropriate page title.
$title = get_string('checkpermissionsin', 'role', $contextname);
+128
View File
@@ -1076,6 +1076,134 @@ class potential_assignees_below_course extends role_assign_user_selector_base {
}
}
/**
* User selector subclass for the selection of users in the check permissions page.
*
* @copyright 2012 Petr Skoda {@link http://skodak.org}
*/
class role_check_users_selector extends user_selector_base {
const MAX_ENROLLED_PER_PAGE = 100;
const MAX_POTENTIAL_PER_PAGE = 100;
/** @var bool limit listing of users to enrolled only */
var $onlyenrolled;
/**
* Constructor.
*
* @param string $name the control name/id for use in the HTML.
* @param array $options other options needed to construct this selector.
* You must be able to clone a userselector by doing new get_class($us)($us->get_name(), $us->get_options());
*/
public function __construct($name, $options) {
if (!isset($options['multiselect'])) {
$options['multiselect'] = false;
}
parent::__construct($name, $options);
$coursecontext = $this->accesscontext->get_course_context(false);
if ($coursecontext and $coursecontext->id != SITEID and !has_capability('moodle/role:manage', $coursecontext)) {
// Prevent normal teachers from looking up all users.
$this->onlyenrolled = true;
} else {
$this->onlyenrolled = false;
}
}
public function find_users($search) {
global $DB;
list($wherecondition, $params) = $this->search_sql($search, 'u');
$fields = 'SELECT ' . $this->required_fields_sql('u');
$countfields = 'SELECT COUNT(1)';
$coursecontext = $this->accesscontext->get_course_context(false);
if ($coursecontext and $coursecontext != SITEID) {
$sql1 = " FROM {user} u
JOIN {user_enrolments} ue ON (ue.userid = u.id)
JOIN {enrol} e ON (e.id = ue.enrolid AND e.courseid = :courseid1)
WHERE $wherecondition";
$params['courseid1'] = $coursecontext->instanceid;
if ($this->onlyenrolled) {
$sql2 = null;
} else {
$sql2 = " FROM {user} u
LEFT JOIN ({user_enrolments} ue
JOIN {enrol} e ON (e.id = ue.enrolid AND e.courseid = :courseid2)) ON (ue.userid = u.id)
WHERE $wherecondition
AND ue.id IS NULL";
$params['courseid2'] = $coursecontext->instanceid;
}
} else {
if ($this->onlyenrolled) {
// Bad luck, current user may not view only enrolled users.
return array();
}
$sql1 = null;
$sql2 = " FROM {user} u
WHERE $wherecondition";
}
$order = " ORDER BY lastname ASC, firstname ASC";
$params['contextid'] = $this->accesscontext->id;
$result = array();
if ($search) {
$groupname1 = get_string('enrolledusersmatching', 'enrol', $search);
$groupname2 = get_string('potusersmatching', 'role', $search);
} else {
$groupname1 = get_string('enrolledusers', 'enrol');
$groupname2 = get_string('potusers', 'role');
}
if ($sql1) {
$enrolleduserscount = $DB->count_records_sql($countfields . $sql1, $params);
if (!$this->is_validating() and $enrolleduserscount > $this::MAX_ENROLLED_PER_PAGE) {
$result[$groupname1] = array();
$toomany = $this->too_many_results($search, $enrolleduserscount);
$result[implode(' - ', array_keys($toomany))] = array();
} else {
$enrolledusers = $DB->get_records_sql($fields . $sql1 . $order, $params);
if ($enrolledusers) {
$result[$groupname1] = $enrolledusers;
}
}
if ($sql2) {
$result[''] = array();
}
}
if ($sql2) {
$otheruserscount = $DB->count_records_sql($countfields . $sql2, $params);
if (!$this->is_validating() and $otheruserscount > $this::MAX_POTENTIAL_PER_PAGE) {
$result[$groupname2] = array();
$toomany = $this->too_many_results($search, $otheruserscount);
$result[implode(' - ', array_keys($toomany))] = array();
} else {
$otherusers = $DB->get_records_sql($fields . $sql2 . $order, $params);
if ($otherusers) {
$result[$groupname2] = $otherusers;
}
}
}
return $result;
}
protected function get_options() {
global $CFG;
$options = parent::get_options();
$options['file'] = $CFG->admin . '/roles/lib.php';
return $options;
}
}
/**
* User selector subclass for the list of potential users on the assign roles page,
* when we are assigning in a context at or above the course level. In this case we
+3 -2
View File
@@ -35,10 +35,11 @@ if ($hassiteconfig
$temp->add(new admin_setting_configselect('moodlecourse/showgrades', new lang_string('showgrades'), new lang_string('coursehelpshowgrades'), 1,array(0 => new lang_string('no'), 1 => new lang_string('yes'))));
$temp->add(new admin_setting_configselect('moodlecourse/showreports', new lang_string('showreports'), '', 0,array(0 => new lang_string('no'), 1 => new lang_string('yes'))));
$currentmaxbytes = get_config('moodlecourse', 'maxbytes');
if (isset($CFG->maxbytes)) {
$choices = get_max_upload_sizes($CFG->maxbytes);
$choices = get_max_upload_sizes($CFG->maxbytes, 0, 0, $currentmaxbytes);
} else {
$choices = get_max_upload_sizes();
$choices = get_max_upload_sizes(0, 0, 0, $currentmaxbytes);
}
$temp->add(new admin_setting_configselect('moodlecourse/maxbytes', new lang_string('maximumupload'), new lang_string('coursehelpmaximumupload'), key($choices), $choices));
+1
View File
@@ -150,6 +150,7 @@ if ($hassiteconfig
'institution' => new lang_string('institution'),
)));
$temp->add(new admin_setting_configcheckbox('enablegravatar', new lang_string('enablegravatar', 'admin'), new lang_string('enablegravatar_help', 'admin'), 0));
$temp->add(new admin_setting_configtext('gravatardefaulturl', new lang_string('gravatardefaulturl', 'admin'), new lang_string('gravatardefaulturl_help', 'admin'), 'mm'));
}
$ADMIN->add('roles', $temp);
+1 -1
View File
@@ -488,7 +488,7 @@ class tool_customlang_translator implements renderable {
list($insql, $inparams) = $DB->get_in_or_equal($filter->component, SQL_PARAMS_NAMED);
$csql = "SELECT COUNT(*)";
$fsql = "SELECT s.id, s.*, c.name AS component";
$fsql = "SELECT s.*, c.name AS component";
$sql = " FROM {tool_customlang_components} c
JOIN {tool_customlang} s ON s.componentid = c.id
WHERE s.lang = :lang
+4
View File
@@ -67,3 +67,7 @@
#page-admin-tool-customlang-index .continuebutton {
margin-top: 1em;
}
.path-admin-tool-customlang #translator .standard.master.cell.c2 {
word-break: break-all;
}
+5 -18
View File
@@ -39,7 +39,6 @@ list($options, $unrecognized) = cli_get_params(
'buildconfig' => false,
'buildcomponentconfigs' => false,
'diag' => false,
'phpunitdir' => false,
'run' => false,
'help' => false,
),
@@ -48,24 +47,12 @@ list($options, $unrecognized) = cli_get_params(
)
);
if ($options['phpunitdir']) {
// nasty skodak's hack for testing of future PHPUnit versions - intentionally not documented
if (!file_exists($options['phpunitdir'])) {
cli_error('Invalid custom PHPUnit lib location');
}
$files = scandir($options['phpunitdir']);
foreach ($files as $file) {
$path = $options['phpunitdir'].'/'.$file;
if (!is_dir($path) or strpos($file, '.') === 0) {
continue;
}
ini_set('include_path', $path . PATH_SEPARATOR . ini_get('include_path'));
}
unset($files);
unset($file);
if (file_exists(__DIR__.'/../../../../vendor/autoload.php')) {
// Composer packages present.
require_once(__DIR__.'/../../../../vendor/autoload.php');
}
// verify PHPUnit libs are loaded
// Verify PHPUnit libs can be loaded.
if (!include_once('PHPUnit/Autoload.php')) {
phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITMISSING);
}
@@ -75,7 +62,7 @@ if ($options['run']) {
unset($unrecognized);
foreach ($_SERVER['argv'] as $k=>$v) {
if (strpos($v, '--run') === 0 or strpos($v, '--phpunitdir') === 0) {
if (strpos($v, '--run') === 0) {
unset($_SERVER['argv'][$k]);
$_SERVER['argc'] = $_SERVER['argc'] - 1;
}
+10 -2
View File
@@ -285,7 +285,11 @@ if ($formdata = $mform2->is_cancelled()) {
$userserrors++;
continue;
}
if ($user->username !== clean_param($user->username, PARAM_USERNAME)) {
$upt->track('status', get_string('invalidusername', 'error', 'username'), 'error');
$upt->track('username', $errorstr, 'error');
$userserrors++;
}
if ($existinguser = $DB->get_record('user', array('username'=>$user->username, 'mnethostid'=>$CFG->mnet_localhost_id))) {
$upt->track('id', $existinguser->id, 'normal', false);
}
@@ -900,7 +904,11 @@ if ($formdata = $mform2->is_cancelled()) {
$newgroupdata = new stdClass();
$newgroupdata->name = $addgroup;
$newgroupdata->courseid = $ccache[$shortname]->id;
if ($ccache[$shortname]->groups[$addgroup]->id = groups_create_group($newgroupdata)){
$newgroupdata->description = '';
$gid = groups_create_group($newgroupdata);
if ($gid){
$ccache[$shortname]->groups[$addgroup] = new stdClass();
$ccache[$shortname]->groups[$addgroup]->id = $gid;
$ccache[$shortname]->groups[$addgroup]->name = $newgroupdata->name;
} else {
$upt->track('enrolments', get_string('unknowngroup', 'error', s($addgroup)), 'error');
+3
View File
@@ -111,10 +111,13 @@ $string['checkindexes'] = 'Check indexes';
$string['check_indexes'] = 'Look for missing DB indexes';
$string['checkoraclesemantics'] = 'Check semantics';
$string['check_oracle_semantics'] = 'Look for incorrect length semantics';
$string['duplicateindexname'] = 'Duplicate index name';
$string['incorrectfieldname'] = 'Incorrect name';
$string['index'] = 'Index';
$string['indexes'] = 'Indexes';
$string['indexnameempty'] = 'Index name is empty';
$string['integerincorrectlength'] = 'Incorrect length for integer field';
$string['incorrectindexname'] = 'Incorrect index name';
$string['incorrectkeyname'] = 'Incorrect key name';
$string['incorrecttablename'] = 'Incorrect table name';
$string['key'] = 'Key';
+2 -2
View File
@@ -81,7 +81,7 @@ function user_download_ods($fields) {
$worksheet = array();
$worksheet[0] =& $workbook->add_worksheet('');
$worksheet[0] = $workbook->add_worksheet('');
$col = 0;
foreach ($fields as $fieldname) {
$worksheet[0]->write(0, $col, $fieldname);
@@ -119,7 +119,7 @@ function user_download_xls($fields) {
$worksheet = array();
$worksheet[0] =& $workbook->add_worksheet('');
$worksheet[0] = $workbook->add_worksheet('');
$col = 0;
foreach ($fields as $fieldname) {
$worksheet[0]->write(0, $col, $fieldname);
+1 -1
View File
@@ -97,7 +97,7 @@ $usersmissingcaps = $webservicemanager->get_missing_capabilities_by_users($allow
//add the missing capabilities to the allowed users object to be displayed by renderer
foreach ($allowedusers as &$alloweduser) {
if (!is_siteadmin($alloweduser->id) and key_exists($alloweduser->id, $usersmissingcaps)) {
if (!is_siteadmin($alloweduser->id) and array_key_exists($alloweduser->id, $usersmissingcaps)) {
$alloweduser->missingcapabilities = implode(', ', $usersmissingcaps[$alloweduser->id]);
}
}
+21 -7
View File
@@ -65,7 +65,7 @@ class auth_plugin_db extends auth_plugin_base {
$authdb->Close();
// user exists externally
// check username/password internally
if ($user = $DB->get_record('user', array('username'=>$username, 'mnethostid'=>$CFG->mnet_localhost_id))) {
if ($user = $DB->get_record('user', array('username'=>$username, 'mnethostid'=>$CFG->mnet_localhost_id, 'auth'=>$this->authtype))) {
return validate_internal_user_password($user, $password);
}
} else {
@@ -191,8 +191,16 @@ class auth_plugin_db extends auth_plugin_base {
* @return bool True on success
*/
function user_update_password($user, $newpassword) {
global $DB;
if ($this->is_internal()) {
return update_internal_user_password($user, $newpassword);
$puser = $DB->get_record('user', array('id'=>$user->id), '*', MUST_EXIST);
if (update_internal_user_password($puser, $newpassword)) {
$user->password = $puser->password;
return true;
} else {
return false;
}
} else {
// we should have never been called!
return false;
@@ -346,7 +354,7 @@ class auth_plugin_db extends auth_plugin_base {
if ($verbose) {
mtrace(get_string('auth_dbuserstoadd','auth_db',count($add_users)));
}
$transaction = $DB->start_delegated_transaction();
// Do not use transactions around this foreach, we want to skip problematic users, not revert everything.
foreach($add_users as $user) {
$username = $user;
$user = $this->get_userinfo_asobj($user);
@@ -372,9 +380,16 @@ class auth_plugin_db extends auth_plugin_base {
} else {
$user->timecreated = time();
$user->timemodified = $user->timecreated;
$id = $DB->insert_record ('user', $user); // it is truly a new user
if ($verbose) {
mtrace("\t".get_string('auth_dbinsertuser', 'auth_db', array('name'=>$user->username, 'id'=>$id)));
try {
$id = $DB->insert_record('user', $user); // it is truly a new user
if ($verbose) {
mtrace("\t".get_string('auth_dbinsertuser', 'auth_db', array('name'=>$user->username, 'id'=>$id)));
}
} catch (moodle_exception $e) {
if ($verbose) {
mtrace("\t".get_string('auth_dbinsertusererror', 'auth_db', $user->username));
}
continue;
}
// if relevant, tag for password generation
if ($this->is_internal()) {
@@ -383,7 +398,6 @@ class auth_plugin_db extends auth_plugin_base {
}
}
}
$transaction->allow_commit();
unset($add_users); // free mem
}
return 0;
+1 -1
View File
@@ -685,7 +685,7 @@ class auth_plugin_ldap extends auth_plugin_base {
/// User removal
// Find users in DB that aren't in ldap -- to be removed!
// this is still not as scalable (but how often do we mass delete?)
if ($this->config->removeuser !== AUTH_REMOVEUSER_KEEP) {
if ($this->config->removeuser != AUTH_REMOVEUSER_KEEP) {
$sql = 'SELECT u.*
FROM {user} u
LEFT JOIN {tmp_extuser} e ON (u.username = e.username AND u.mnethostid = e.mnethostid)
+21 -16
View File
@@ -378,23 +378,28 @@ class auth_plugin_mnet extends auth_plugin_base {
$extra = $DB->get_records_sql($sql);
$keys = array_keys($courses);
$defaultrole = reset(get_archetype_roles('student'));
//$defaultrole = get_default_course_role($ccache[$shortname]); //TODO: rewrite this completely, there is no default course role any more!!!
foreach ($keys AS $id) {
if ($courses[$id]->visible == 0) {
unset($courses[$id]);
continue;
}
$courses[$id]->cat_id = $courses[$id]->category;
$courses[$id]->defaultroleid = $defaultrole->id;
unset($courses[$id]->category);
unset($courses[$id]->visible);
$studentroles = get_archetype_roles('student');
if (!empty($studentroles)) {
$defaultrole = reset($studentroles);
//$defaultrole = get_default_course_role($ccache[$shortname]); //TODO: rewrite this completely, there is no default course role any more!!!
foreach ($keys AS $id) {
if ($courses[$id]->visible == 0) {
unset($courses[$id]);
continue;
}
$courses[$id]->cat_id = $courses[$id]->category;
$courses[$id]->defaultroleid = $defaultrole->id;
unset($courses[$id]->category);
unset($courses[$id]->visible);
$courses[$id]->cat_name = $extra[$id]->cat_name;
$courses[$id]->cat_description = $extra[$id]->cat_description;
$courses[$id]->defaultrolename = $defaultrole->name;
// coerce to array
$courses[$id] = (array)$courses[$id];
$courses[$id]->cat_name = $extra[$id]->cat_name;
$courses[$id]->cat_description = $extra[$id]->cat_description;
$courses[$id]->defaultrolename = $defaultrole->name;
// coerce to array
$courses[$id] = (array)$courses[$id];
}
} else {
throw new moodle_exception('unknownrole', 'error', '', 'student');
}
} else {
// if the array is empty, send it anyway
+7 -6
View File
@@ -25,7 +25,7 @@
// Check whether Shibboleth is configured properly
if (empty($pluginconfig->user_attribute)) {
print_error('shib_not_set_up_error', 'auth');
print_error('shib_not_set_up_error', 'auth_shibboleth');
}
/// If we can find the Shibboleth attribute, save it in session and return to main login page
@@ -38,9 +38,9 @@
/// Check if the user has actually submitted login data to us
if ($shibbolethauth->user_login($frm->username, $frm->password)) {
if ($shibbolethauth->user_login($frm->username, $frm->password)
&& $user = authenticate_user_login($frm->username, $frm->password)) {
$user = authenticate_user_login($frm->username, $frm->password);
enrol_check_plugins($user);
session_set_user($user);
@@ -84,16 +84,17 @@
}
else {
// For some weird reason the Shibboleth user couldn't be authenticated
// The Shibboleth user couldn't be mapped to a valid Moodle user
print_error('shib_invalid_account_error', 'auth_shibboleth');
}
}
// If we can find any (user independent) Shibboleth attributes but no user
// attributes we probably didn't receive any user attributes
elseif (!empty($_SERVER['HTTP_SHIB_APPLICATION_ID']) || !empty($_SERVER['Shib-Application-ID'])) {
print_error('shib_no_attributes_error', 'auth' , '', '\''.$pluginconfig->user_attribute.'\', \''.$pluginconfig->field_map_firstname.'\', \''.$pluginconfig->field_map_lastname.'\' and \''.$pluginconfig->field_map_email.'\'');
print_error('shib_no_attributes_error', 'auth_shibboleth' , '', '\''.$pluginconfig->user_attribute.'\', \''.$pluginconfig->field_map_firstname.'\', \''.$pluginconfig->field_map_lastname.'\' and \''.$pluginconfig->field_map_email.'\'');
} else {
print_error('shib_not_set_up_error', 'auth');
print_error('shib_not_set_up_error', 'auth_shibboleth');
}
+1 -2
View File
@@ -40,8 +40,7 @@ if ($show_instructions) {
</form>
<p>
<?php
print_string("auth_shibboleth_contact_administrator", "auth_shibboleth");
echo '<a href="mailto:'.get_admin()->email.'"> Moodle Administrator</a>.';
print_string("auth_shib_contact_administrator", "auth_shibboleth", get_admin()->email);
?>
</p>
</div>
@@ -25,6 +25,7 @@
$string['auth_shib_auth_method'] = 'Authentication method name';
$string['auth_shib_auth_method_description'] = 'Provide a name for the Shibboleth authentication method that is familiar to your users. This could be the name of your Shibboleth federation, e.g. <tt>SWITCHaai Login</tt> or <tt>InCommon Login</tt> or similar.';
$string['auth_shib_contact_administrator'] = 'In case you are not associated with the given organizations and you need access to a course on this server, please contact the <a href="mailto:{$a}">Moodle Administrator</a>.';
$string['auth_shibboleth_contact_administrator'] = 'In case you are not associated with the given organizations and you need access to a course on this server, please contact the';
$string['auth_shibbolethdescription'] = 'Using this method users are created and authenticated using <a href="http://shibboleth.internet2.edu/">Shibboleth</a>.<br />Be sure to read the <a href="../auth/shibboleth/README.txt">README</a> for Shibboleth on how to set up your Moodle with Shibboleth';
$string['auth_shibboleth_errormsg'] = 'Please select the organization you are member of!';
@@ -51,6 +52,7 @@ $string['auth_shib_no_organizations_warning'] = 'If you want to use the integrat
$string['auth_shib_only'] = 'Shibboleth only';
$string['auth_shib_only_description'] = 'Check this option if a Shibboleth authentication shall be enforced';
$string['auth_shib_username_description'] = 'Name of the webserver Shibboleth environment variable that shall be used as Moodle username';
$string['shib_invalid_account_error'] = 'You seem to be Shibboleth authenticated but Moodle has no valid account for your username. Your account may not exist or it may have been suspended.';
$string['shib_no_attributes_error'] = 'You seem to be Shibboleth authenticated but Moodle didn\'t receive any user attributes. Please check that your Identity Provider releases the necessary attributes ({$a}) to the Service Provider Moodle is running on or inform the webmaster of this server.';
$string['shib_not_all_attributes_error'] = 'Moodle needs certain Shibboleth attributes which are not present in your case. The attributes are: {$a}<br />Please contact the webmaster of this server or your Identity Provider.';
$string['shib_not_set_up_error'] = 'Shibboleth authentication doesn\'t seem to be set up correctly because no Shibboleth environment variables are present for this page. Please consult the <a href="README.txt">README</a> for further instructions on how to set up Shibboleth authentication or contact the webmaster of this Moodle installation.';
+1 -1
View File
@@ -109,7 +109,7 @@ abstract class backup implements checksumable {
const OPERATION_RESTORE ='restore';// We are performing one restore
// Version (to keep CFG->backup_version (and release) updated automatically)
const VERSION = 2012061800;
const VERSION = 2012062500;
const RELEASE = '2.3';
}
+1 -1
View File
@@ -98,7 +98,7 @@ $PAGE->navbar->add($backup->get_stage_name());
$renderer = $PAGE->get_renderer('core','backup');
echo $OUTPUT->header();
if ($backup->enforce_changed_dependencies()) {
echo $renderer->dependency_notification(get_string('dependenciesenforced','backup'));
debugging('Your settings have been altered due to unmet dependencies', DEBUG_DEVELOPER);
}
echo $renderer->progress_bar($backup->get_progress_bar());
echo $backup->display($renderer);
+1 -1
View File
@@ -33,7 +33,7 @@ $currentcontext = required_param('currentcontext', PARAM_INT);
// file parameters
$component = optional_param('component', null, PARAM_COMPONENT);
$filearea = optional_param('filearea', null, PARAM_AREA);
$returnurl = optional_param('returnurl', null, PARAM_URL);
$returnurl = optional_param('returnurl', null, PARAM_LOCALURL);
list($context, $course, $cm) = get_context_info_array($currentcontext);
$filecontext = get_context_instance_by_id($contextid);
+89 -2
View File
@@ -88,10 +88,13 @@ abstract class moodle1_handlers_factory {
foreach ($plugins as $name => $dir) {
$handlerfile = $dir . '/backup/moodle1/lib.php';
$handlerclass = "moodle1_{$type}_{$name}_handler";
if (!file_exists($handlerfile)) {
if (file_exists($handlerfile)) {
require_once($handlerfile);
} elseif ($type == 'block') {
$handlerclass = "moodle1_block_generic_handler";
} else {
continue;
}
require_once($handlerfile);
if (!class_exists($handlerclass)) {
throw new moodle1_convert_exception('missing_handler_class', $handlerclass);
@@ -1989,9 +1992,93 @@ abstract class moodle1_resource_successor_handler extends moodle1_mod_handler {
*/
abstract class moodle1_block_handler extends moodle1_plugin_handler {
public function get_paths() {
$blockname = strtoupper($this->pluginname);
return array(
new convert_path('block', "/MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/{$blockname}"),
);
}
public function process_block(array $data) {
$newdata = $this->convert_common_block_data($data);
$this->write_block_xml($newdata, $data);
$this->write_inforef_xml($newdata, $data);
$this->write_roles_xml($newdata, $data);
return $data;
}
protected function convert_common_block_data(array $olddata) {
$newdata = array();
$newdata['blockname'] = $olddata['name'];
$newdata['parentcontextid'] = $this->converter->get_contextid(CONTEXT_COURSE, 0);
$newdata['showinsubcontexts'] = 0;
$newdata['pagetypepattern'] = $olddata['pagetype'].='-*';
$newdata['subpagepattern'] = null;
$newdata['defaultregion'] = ($olddata['position']=='l')?'side-pre':'side-post';
$newdata['defaultweight'] = $olddata['weight'];
$newdata['configdata'] = $this->convert_configdata($olddata);
return $newdata;
}
protected function convert_configdata(array $olddata) {
return $olddata['configdata'];
}
protected function write_block_xml($newdata, $data) {
$contextid = $this->converter->get_contextid(CONTEXT_BLOCK, $data['id']);
$this->open_xml_writer("course/blocks/{$data['name']}_{$data['id']}/block.xml");
$this->xmlwriter->begin_tag('block', array('id' => $data['id'], 'contextid' => $contextid));
foreach ($newdata as $field => $value) {
$this->xmlwriter->full_tag($field, $value);
}
$this->xmlwriter->begin_tag('block_positions');
$this->xmlwriter->begin_tag('block_position', array('id' => 1));
$this->xmlwriter->full_tag('contextid', $newdata['parentcontextid']);
$this->xmlwriter->full_tag('pagetype', $data['pagetype']);
$this->xmlwriter->full_tag('subpage', '');
$this->xmlwriter->full_tag('visible', $data['visible']);
$this->xmlwriter->full_tag('region', $newdata['defaultregion']);
$this->xmlwriter->full_tag('weight', $newdata['defaultweight']);
$this->xmlwriter->end_tag('block_position');
$this->xmlwriter->end_tag('block_positions');
$this->xmlwriter->end_tag('block');
$this->close_xml_writer();
}
protected function write_inforef_xml($newdata, $data) {
$this->open_xml_writer("course/blocks/{$data['name']}_{$data['id']}/inforef.xml");
$this->xmlwriter->begin_tag('inforef');
// Subclasses may provide inforef contents if needed
$this->xmlwriter->end_tag('inforef');
$this->close_xml_writer();
}
protected function write_roles_xml($newdata, $data) {
// This is an empty shell, as the moodle1 converter doesn't handle user data.
$this->open_xml_writer("course/blocks/{$data['name']}_{$data['id']}/roles.xml");
$this->xmlwriter->begin_tag('roles');
$this->xmlwriter->full_tag('role_overrides', '');
$this->xmlwriter->full_tag('role_assignments', '');
$this->xmlwriter->end_tag('roles');
$this->close_xml_writer();
}
}
/**
* Base class for block generic handler
*/
class moodle1_block_generic_handler extends moodle1_block_handler {
}
/**
* Base class for the activity modules' subplugins
*/
+21 -7
View File
@@ -254,7 +254,7 @@ class moodle1_converter extends base_converter {
$path = '/MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/' . $this->currentblock;
} else if (strpos($path, '/MOODLE_BACKUP/COURSE/BLOCKS/BLOCK') === 0) {
$path = str_replace('/MOODLE_BACKUP/COURSE/BLOCKS/BLOCK', '/MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/' . $this->currentmod, $path);
$path = str_replace('/MOODLE_BACKUP/COURSE/BLOCKS/BLOCK', '/MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/' . $this->currentblock, $path);
}
if ($path !== $data['path']) {
@@ -350,12 +350,12 @@ class moodle1_converter extends base_converter {
}
if ($path === '/MOODLE_BACKUP/COURSE/BLOCKS/BLOCK') {
$this->currentmod = null;
$this->currentblock = null;
$forbidden = true;
} else if (strpos($path, '/MOODLE_BACKUP/COURSE/BLOCKS/BLOCK') === 0) {
// expand the BLOCK paths so that they contain the module name
$path = str_replace('/MOODLE_BACKUP/COURSE/BLOCKS/BLOCK', '/MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/' . $this->currentmod, $path);
$path = str_replace('/MOODLE_BACKUP/COURSE/BLOCKS/BLOCK', '/MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/' . $this->currentblock, $path);
}
if (empty($this->pathelements[$path])) {
@@ -397,7 +397,7 @@ class moodle1_converter extends base_converter {
$path = '/MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/' . $this->currentblock;
} else if (strpos($path, '/MOODLE_BACKUP/COURSE/BLOCKS/BLOCK') === 0) {
$path = str_replace('/MOODLE_BACKUP/COURSE/BLOCKS/BLOCK', '/MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/' . $this->currentmod, $path);
$path = str_replace('/MOODLE_BACKUP/COURSE/BLOCKS/BLOCK', '/MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/' . $this->currentblock, $path);
}
if (empty($this->pathelements[$path])) {
@@ -640,7 +640,10 @@ class moodle1_converter extends base_converter {
return $files;
}
foreach ($matches[2] as $match) {
$files[] = str_replace(array('$@FILEPHP@$', '$@SLASH@$', '$@FORCEDOWNLOAD@$'), array('', '/', ''), $match);
$file = str_replace(array('$@FILEPHP@$', '$@SLASH@$', '$@FORCEDOWNLOAD@$'), array('', '/', ''), $match);
if ($file === clean_param($file, PARAM_PATH)) {
$files[] = rawurldecode($file);
}
}
return array_unique($files);
@@ -657,9 +660,16 @@ class moodle1_converter extends base_converter {
public static function rewrite_filephp_usage($text, array $files) {
foreach ($files as $file) {
// Expect URLs properly encoded by default.
$parts = explode('/', $file);
$encoded = implode('/', array_map('rawurlencode', $parts));
$fileref = '$@FILEPHP@$'.str_replace('/', '$@SLASH@$', $encoded);
$text = str_replace($fileref.'$@FORCEDOWNLOAD@$', '@@PLUGINFILE@@'.$encoded.'?forcedownload=1', $text);
$text = str_replace($fileref, '@@PLUGINFILE@@'.$encoded, $text);
// Add support for URLs without any encoding.
$fileref = '$@FILEPHP@$'.str_replace('/', '$@SLASH@$', $file);
$text = str_replace($fileref.'$@FORCEDOWNLOAD@$', '@@PLUGINFILE@@'.$file.'?forcedownload=1', $text);
$text = str_replace($fileref, '@@PLUGINFILE@@'.$file, $text);
$text = str_replace($fileref.'$@FORCEDOWNLOAD@$', '@@PLUGINFILE@@'.$encoded.'?forcedownload=1', $text);
$text = str_replace($fileref, '@@PLUGINFILE@@'.$encoded, $text);
}
return $text;
@@ -1201,6 +1211,10 @@ class moodle1_file_manager implements loggable {
$sourcefullpath = $this->basepath.'/'.$sourcepath;
if ($sourcefullpath !== clean_param($sourcefullpath, PARAM_PATH)) {
throw new moodle1_convert_exception('file_invalid_path', $sourcefullpath);
}
if (!is_readable($sourcefullpath)) {
throw new moodle1_convert_exception('file_not_readable', $sourcefullpath);
}
+41 -1
View File
@@ -273,6 +273,15 @@ class moodle1_converter_testcase extends advanced_testcase {
$fileids = $fileman->get_fileids();
$this->assertEquals(gettype($fileids), 'array');
$this->assertEquals(0, count($fileids));
// try to migrate an invalid file
$fileman->itemid = 1;
$thrown = false;
try {
$fileman->migrate_file('/../../../../../../../../../../../../../../etc/passwd');
} catch (moodle1_convert_exception $e) {
$thrown = true;
}
$this->assertTrue($thrown);
// migrate a single file
$fileman->itemid = 4;
$fileman->migrate_file('moddata/unittest/4/icon.gif');
@@ -435,6 +444,8 @@ class moodle1_converter_testcase extends advanced_testcase {
$text = 'This is a text containing links to file.php
as it is parsed from the backup file. <br /><br /><img border="0" width="110" vspace="0" hspace="0" height="92" title="News" alt="News" src="$@FILEPHP@$$@SLASH@$pics$@SLASH@$news.gif" /><a href="$@FILEPHP@$$@SLASH@$pics$@SLASH@$news.gif$@FORCEDOWNLOAD@$">download image</a><br />
<div><a href=\'$@FILEPHP@$/../../../../../../../../../../../../../../../etc/passwd\'>download passwords</a></div>
<div><a href=\'$@FILEPHP@$$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$etc$@SLASH@$shadow\'>download shadows</a></div>
<br /><a href=\'$@FILEPHP@$$@SLASH@$MANUAL.DOC$@FORCEDOWNLOAD@$\'>download manual</a><br />';
$files = moodle1_converter::find_referenced_files($text);
@@ -443,12 +454,41 @@ as it is parsed from the backup file. <br /><br /><img border="0" width="110" vs
$this->assertTrue(in_array('/pics/news.gif', $files));
$this->assertTrue(in_array('/MANUAL.DOC', $files));
$text = moodle1_converter::rewrite_filephp_usage($text, array('/pics/news.gif', '/another/file/notused.txt'), $files);
$text = moodle1_converter::rewrite_filephp_usage($text, array('/pics/news.gif', '/another/file/notused.txt'));
$this->assertEquals($text, 'This is a text containing links to file.php
as it is parsed from the backup file. <br /><br /><img border="0" width="110" vspace="0" hspace="0" height="92" title="News" alt="News" src="@@PLUGINFILE@@/pics/news.gif" /><a href="@@PLUGINFILE@@/pics/news.gif?forcedownload=1">download image</a><br />
<div><a href=\'$@FILEPHP@$/../../../../../../../../../../../../../../../etc/passwd\'>download passwords</a></div>
<div><a href=\'$@FILEPHP@$$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$etc$@SLASH@$shadow\'>download shadows</a></div>
<br /><a href=\'$@FILEPHP@$$@SLASH@$MANUAL.DOC$@FORCEDOWNLOAD@$\'>download manual</a><br />');
}
public function test_referenced_files_urlencoded() {
$text = 'This is a text containing links to file.php
as it is parsed from the backup file. <br /><br /><img border="0" width="110" vspace="0" hspace="0" height="92" title="News" alt="News" src="$@FILEPHP@$$@SLASH@$pics$@SLASH@$news.gif" /><a href="$@FILEPHP@$$@SLASH@$pics$@SLASH@$news.gif$@FORCEDOWNLOAD@$">no space</a><br />
<br /><a href=\'$@FILEPHP@$$@SLASH@$pics$@SLASH@$news%20with%20spaces.gif$@FORCEDOWNLOAD@$\'>with urlencoded spaces</a><br />
<a href="$@FILEPHP@$$@SLASH@$illegal%20pics%2Bmovies$@SLASH@$romeo%2Bjuliet.avi">Download the full AVI for free! (space and plus encoded)</a>
<a href="$@FILEPHP@$$@SLASH@$illegal pics+movies$@SLASH@$romeo+juliet.avi">Download the full AVI for free! (none encoded)</a>
<a href="$@FILEPHP@$$@SLASH@$illegal%20pics+movies$@SLASH@$romeo+juliet.avi">Download the full AVI for free! (only space encoded)</a>
<a href="$@FILEPHP@$$@SLASH@$illegal pics%2Bmovies$@SLASH@$romeo%2Bjuliet.avi">Download the full AVI for free! (only plus)</a>';
$files = moodle1_converter::find_referenced_files($text);
$this->assertEquals(gettype($files), 'array');
$this->assertEquals(3, count($files));
$this->assertTrue(in_array('/pics/news.gif', $files));
$this->assertTrue(in_array('/pics/news with spaces.gif', $files));
$this->assertTrue(in_array('/illegal pics+movies/romeo+juliet.avi', $files));
$text = moodle1_converter::rewrite_filephp_usage($text, $files);
$this->assertEquals('This is a text containing links to file.php
as it is parsed from the backup file. <br /><br /><img border="0" width="110" vspace="0" hspace="0" height="92" title="News" alt="News" src="@@PLUGINFILE@@/pics/news.gif" /><a href="@@PLUGINFILE@@/pics/news.gif?forcedownload=1">no space</a><br />
<br /><a href=\'@@PLUGINFILE@@/pics/news%20with%20spaces.gif?forcedownload=1\'>with urlencoded spaces</a><br />
<a href="@@PLUGINFILE@@/illegal%20pics%2Bmovies/romeo%2Bjuliet.avi">Download the full AVI for free! (space and plus encoded)</a>
<a href="@@PLUGINFILE@@/illegal%20pics%2Bmovies/romeo%2Bjuliet.avi">Download the full AVI for free! (none encoded)</a>
<a href="$@FILEPHP@$$@SLASH@$illegal%20pics+movies$@SLASH@$romeo+juliet.avi">Download the full AVI for free! (only space encoded)</a>
<a href="$@FILEPHP@$$@SLASH@$illegal pics%2Bmovies$@SLASH@$romeo%2Bjuliet.avi">Download the full AVI for free! (only plus)</a>', $text);
}
public function test_question_bank_conversion() {
global $CFG;
+1 -1
View File
@@ -154,7 +154,7 @@ $PAGE->navbar->add($backup->get_stage_name());
// Display the current stage
echo $OUTPUT->header();
if ($backup->enforce_changed_dependencies()) {
echo $renderer->dependency_notification(get_string('dependenciesenforced','backup'));
debugging('Your settings have been altered due to unmet dependencies', DEBUG_DEVELOPER);
}
echo $renderer->progress_bar($backup->get_progress_bar());
echo $backup->display($renderer);
+1 -1
View File
@@ -859,7 +859,7 @@ class backup_gradebook_structure_step extends backup_structure_step {
$grade_category = new backup_nested_element('grade_category', array('id'), array(
//'courseid',
'parent', 'depth', 'path', 'fullname', 'aggregation', 'keephigh',
'dropload', 'aggregateonlygraded', 'aggregateoutcomes', 'aggregatesubcats',
'droplow', 'aggregateonlygraded', 'aggregateoutcomes', 'aggregatesubcats',
'timecreated', 'timemodified', 'hidden'));
$letters = new backup_nested_element('grade_letters');
@@ -154,6 +154,22 @@ abstract class restore_qtype_plugin extends restore_plugin {
AND ' . $DB->sql_compare_text('answer', 255) . ' = ' . $DB->sql_compare_text('?', 255);
$params = array($newquestionid, $data->answertext);
$newitemid = $DB->get_field_sql($sql, $params);
// Not able to find the answer, let's try cleaning the answertext
// of all the question answers in DB as slower fallback. MDL-30018.
if (!$newitemid) {
$params = array('question' => $newquestionid);
$answers = $DB->get_records('question_answers', $params, '', 'id, answer');
foreach ($answers as $answer) {
// Clean in the same way than {@link xml_writer::xml_safe_utf8()}.
$clean = preg_replace('/[\x-\x8\xb-\xc\xe-\x1f\x7f]/is','', $answer->answer); // Clean CTRL chars.
$clean = preg_replace("/\r\n|\r/", "\n", $clean); // Normalize line ending.
if ($clean === $data->answertext) {
$newitemid = $data->id;
}
}
}
// If we haven't found the newitemid, something has gone really wrong, question in DB
// is missing answers, exception
if (!$newitemid) {
+35 -8
View File
@@ -190,6 +190,15 @@ class restore_gradebook_structure_step extends restore_structure_step {
$data->id = $newitemid = $existinggradeitem->id;
$DB->update_record('grade_items', $data);
}
} else if ($data->itemtype == 'manual') {
// Manual items aren't assigned to a cm, so don't go duplicating them in the target if one exists.
$gi = array(
'itemtype' => $data->itemtype,
'courseid' => $data->courseid,
'itemname' => $data->itemname,
'categoryid' => $data->categoryid,
);
$newitemid = $DB->get_field('grade_items', 'id', $gi);
}
if (empty($newitemid)) {
@@ -288,8 +297,13 @@ class restore_gradebook_structure_step extends restore_structure_step {
$data->courseid = $this->get_courseid();
$newitemid = $DB->insert_record('grade_settings', $data);
//$this->set_mapping('grade_setting', $oldid, $newitemid);
if (!$DB->record_exists('grade_settings', array('courseid' => $data->courseid, 'name' => $data->name))) {
$newitemid = $DB->insert_record('grade_settings', $data);
} else {
$newitemid = $data->id;
}
$this->set_mapping('grade_setting', $oldid, $newitemid);
}
/**
@@ -1151,11 +1165,11 @@ class restore_section_structure_step extends restore_structure_step {
$sectionid = $this->get_task()->get_sectionid();
// Get data object for current section availability (if any).
$data = $DB->get_record('course_sections_availability',
array('coursesectionid' => $sectionid), 'id, sourcecmid, gradeitemid', IGNORE_MISSING);
$records = $DB->get_records('course_sections_availability',
array('coursesectionid' => $sectionid), 'id, sourcecmid, gradeitemid');
// If it exists, update mappings.
if ($data) {
foreach ($records as $data) {
// Only update mappings for entries which are created by this restore.
// Otherwise, when you restore to an existing course, it will mess up
// existing section availability entries.
@@ -2904,9 +2918,6 @@ class restore_create_categories_and_questions extends restore_structure_step {
$data->penalty = 1;
}
$data->timecreated = $this->apply_date_offset($data->timecreated);
$data->timemodified = $this->apply_date_offset($data->timemodified);
$userid = $this->get_mappingid('user', $data->createdby);
$data->createdby = $userid ? $userid : $this->task->get_userid();
@@ -2960,6 +2971,22 @@ class restore_create_categories_and_questions extends restore_structure_step {
AND ' . $DB->sql_compare_text('hint', 255) . ' = ' . $DB->sql_compare_text('?', 255);
$params = array($newquestionid, $data->hint);
$newitemid = $DB->get_field_sql($sql, $params);
// Not able to find the hint, let's try cleaning the hint text
// of all the question's hints in DB as slower fallback. MDL-33863.
if (!$newitemid) {
$potentialhints = $DB->get_records('question_hints',
array('questionid' => $newquestionid), '', 'id, hint');
foreach ($potentialhints as $potentialhint) {
// Clean in the same way than {@link xml_writer::xml_safe_utf8()}.
$cleanhint = preg_replace('/[\x-\x8\xb-\xc\xe-\x1f\x7f]/is','', $potentialhint->hint); // Clean CTRL chars.
$cleanhint = preg_replace("/\r\n|\r/", "\n", $cleanhint); // Normalize line ending.
if ($cleanhint === $data->hint) {
$newitemid = $data->id;
}
}
}
// If we haven't found the newitemid, something has gone really wrong, question in DB
// is missing hints, exception
if (!$newitemid) {
+1 -1
View File
@@ -61,7 +61,7 @@ $PAGE->navbar->add($restore->get_stage_name());
$renderer = $PAGE->get_renderer('core','backup');
echo $OUTPUT->header();
if (!$restore->is_independent() && $restore->enforce_changed_dependencies()) {
echo $renderer->dependency_notification(get_string('dependenciesenforced','backup'));
debugging('Your settings have been altered due to unmet dependencies', DEBUG_DEVELOPER);
}
echo $renderer->progress_bar($restore->get_progress_bar());
echo $restore->display($renderer);
+1 -1
View File
@@ -50,7 +50,7 @@ class backup_check_testcase extends advanced_testcase {
$coursemodule = $DB->get_record('course_modules', array('id'=>$page->cmid));
$this->moduleid = $coursemodule->id;
$this->sectionid = $DB->get_field("course_sections", 'id', array("section"=>$coursemodule->section, "course"=>$course->id));
$this->sectionid = $coursemodule->section;
$this->courseid = $coursemodule->course;
$this->userid = 2; // admin
+2 -1
View File
@@ -1505,7 +1505,8 @@ abstract class restore_dbops {
}
$currentfullname = $fullname.$suffixfull;
$currentshortname = substr($shortname, 0, 100 - strlen($suffixshort)).$suffixshort; // < 100cc
$coursefull = $DB->get_record_select('course', 'fullname = ? AND id != ?', array($currentfullname, $courseid));
$coursefull = $DB->get_record_select('course', 'fullname = ? AND id != ?',
array($currentfullname, $courseid), '*', IGNORE_MULTIPLE);
$courseshort = $DB->get_record_select('course', 'shortname = ? AND id != ?', array($currentshortname, $courseid));
$counter++;
} while ($coursefull || $courseshort);
+22 -4
View File
@@ -281,9 +281,13 @@ class backup_cron_helper_testcase extends advanced_testcase {
$this->assertEquals(date('w-15:00', strtotime('tomorrow')), date('w-H:i', $next));
// Let's have a Belgian beer! (UTC+1 / UTC+2 DST).
// Warning: Some of these tests will fail if executed "around"
// 'Europe/Brussels' DST changes (last Sunday in March and
// last Sunday in October right now - 2012). Once Moodle
// moves to PHP TZ support this could be fixed properly.
date_default_timezone_set('Europe/Brussels');
$now = strtotime('18:00:00');
$dst = date('I');
$dst = date('I', $now);
$timezone = -10.0; // 7am for the user.
$next = backup_cron_automated_helper::calculate_next_automated_backup($timezone, $now);
@@ -321,9 +325,13 @@ class backup_cron_helper_testcase extends advanced_testcase {
$this->assertEquals($expected, date('w-H:i', $next));
// The big apple! (UTC-5 / UTC-4 DST).
// Warning: Some of these tests will fail if executed "around"
// 'America/New_York' DST changes (2nd Sunday in March and
// 1st Sunday in November right now - 2012). Once Moodle
// moves to PHP TZ support this could be fixed properly.
date_default_timezone_set('America/New_York');
$now = strtotime('18:00:00');
$dst = date('I');
$dst = date('I', $now);
$timezone = -10.0; // 1pm for the user.
$next = backup_cron_automated_helper::calculate_next_automated_backup($timezone, $now);
@@ -365,9 +373,14 @@ class backup_cron_helper_testcase extends advanced_testcase {
set_config('backup_auto_hour', '20', 'backup');
set_config('backup_auto_minute', '00', 'backup');
// Note: These tests should not fail because they are "unnafected"
// by DST changes, as far as execution always happens on Monday and
// Saturday and those week days are not, right now, the ones rulez
// to peform the DST changes (Sunday is). This may change if rules
// are modified in the future.
date_default_timezone_set('Europe/Brussels');
$now = strtotime('next Monday 18:00:00');
$dst = date('I');
$dst = date('I', $now);
$timezone = -12.0; // 1pm for the user.
$next = backup_cron_automated_helper::calculate_next_automated_backup($timezone, $now);
@@ -404,9 +417,14 @@ class backup_cron_helper_testcase extends advanced_testcase {
set_config('backup_auto_hour', '02', 'backup');
set_config('backup_auto_minute', '00', 'backup');
// Note: These tests should not fail because they are "unnafected"
// by DST changes, as far as execution always happens on Monday and
// Saturday and those week days are not, right now, the ones rulez
// to peform the DST changes (Sunday is). This may change if rules
// are modified in the future.
date_default_timezone_set('America/New_York');
$now = strtotime('next Monday 04:00:00');
$dst = date('I');
$dst = date('I', $now);
$timezone = -12.0; // 8pm for the user.
$next = backup_cron_automated_helper::calculate_next_automated_backup($timezone, $now);
+1 -1
View File
@@ -75,7 +75,7 @@ class file_logger extends base_logger {
if (substr($this->fullpath, -5) !== '.html') {
$content = $prefix . str_repeat(' ', $depth) . $message . PHP_EOL;
} else {
$content = $prefix . str_repeat('&nbsp;&nbsp;', $depth) . htmlentities($message, ENT_QUOTES) . '<br/>' . PHP_EOL;
$content = $prefix . str_repeat('&nbsp;&nbsp;', $depth) . htmlentities($message, ENT_QUOTES, 'UTF-8') . '<br/>' . PHP_EOL;
}
if (false === fwrite($this->fhandle, $content)) {
throw new base_logger_exception('error_writing_file', $this->fullpath);
@@ -38,7 +38,7 @@ class output_indented_logger extends base_logger {
if (defined('STDOUT')) {
echo $prefix . str_repeat(' ', $depth) . $message . PHP_EOL;
} else {
echo $prefix . str_repeat('&nbsp;&nbsp;', $depth) . htmlentities($message, ENT_QUOTES) . '<br/>' . PHP_EOL;
echo $prefix . str_repeat('&nbsp;&nbsp;', $depth) . htmlentities($message, ENT_QUOTES, 'UTF-8') . '<br/>' . PHP_EOL;
}
flush();
return true;
@@ -37,7 +37,7 @@ class output_text_logger extends base_logger {
if (defined('STDOUT')) {
echo $prefix . $message . PHP_EOL;
} else {
echo $prefix . htmlentities($message, ENT_QUOTES) . '<br/>' . PHP_EOL;
echo $prefix . htmlentities($message, ENT_QUOTES, 'UTF-8') . '<br/>' . PHP_EOL;
}
flush();
return true;
+1
View File
@@ -322,6 +322,7 @@ abstract class base_moodleform extends moodleform {
$config->question = get_string('confirmcancelquestion', 'backup');
$config->yesLabel = get_string('confirmcancelyes', 'backup');
$config->noLabel = get_string('confirmcancelno', 'backup');
$config->closeButtonTitle = get_string('close', 'editor');
$PAGE->requires->yui_module('moodle-backup-confirmcancel', 'M.core_backup.watch_cancel_buttons', array($config));
$PAGE->requires->yui_module('moodle-backup-backupselectall', 'M.core_backup.select_all_init',
+1 -1
View File
@@ -69,7 +69,7 @@ class block_community extends block_list {
}
$icon = html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/group'),
'class' => 'icon', 'alt' => get_string('addcourse', 'block_community')));
'class' => 'icon', 'alt' => ""));
$addcourseurl = new moodle_url('/blocks/community/communitycourse.php',
array('add' => true, 'courseid' => $this->page->course->id));
$searchlink = html_writer::tag('a', $icon . '&nbsp;' . get_string('addcourse', 'block_community'),
+2 -2
View File
@@ -228,10 +228,10 @@ if (!empty($courses)) {
}
}
$PAGE->requires->yui_module('moodle-block_community-comments', 'M.blocks_community.init_comments',
array(array('commentids' => $commentedcourseids)));
array(array('commentids' => $commentedcourseids, 'closeButtonTitle' => get_string('close', 'editor'))));
$PAGE->requires->yui_module('moodle-block_community-imagegallery', 'M.blocks_community.init_imagegallery',
array(array('imageids' => $courseids, 'imagenumbers' => $courseimagenumbers,
'huburl' => $huburl)));
'huburl' => $huburl, 'closeButtonTitle' => get_string('close', 'editor'))));
echo highlight($search, $renderer->course_list($courses, $huburl, $courseid));
+1 -1
View File
@@ -140,7 +140,7 @@ class community_hub_search_form extends moodleform {
$options = array();
$firsthub = false;
foreach ($hubs as $hub) {
if (key_exists('id', $hub)) {
if (array_key_exists('id', $hub)) {
$params = array('hubid' => $hub['id'],
'filetype' => HUB_HUBSCREENSHOT_FILE_TYPE);
$imgurl = new moodle_url(HUB_HUBDIRECTORYURL .
+3 -2
View File
@@ -213,6 +213,7 @@
background-color:#F6F6F6;
border:1px solid #CCCCCC;
overflow: auto;
padding: 7px 6px;
}
#page-blocks-community-communitycourse .moodle-dialogue-base .moodle-dialogue-bd {
@@ -222,5 +223,5 @@
#page-blocks-community-communitycourse .moodle-dialogue-base .closebutton {
margin-top:4px;
width:30px;
}
margin-right: 4px;
}
+28 -20
View File
@@ -9,8 +9,8 @@ YUI.add('moodle-block_community-comments', function(Y) {
Y.extend(COMMENTS, Y.Base, {
event:null,
overlayevent:null,
overlays: [], //all the comment boxes
panelevent: null,
panels: [], //all the comment boxes
initializer : function(params) {
@@ -18,18 +18,19 @@ YUI.add('moodle-block_community-comments', function(Y) {
for (var i=0;i<this.get('commentids').length;i++)
{
var commentid = this.get('commentids')[i];
this.overlays[commentid] = new M.core.dialogue({
headerContent:Y.one('#commentoverlay-'+commentid+' .commenttitle').get('innerHTML'),
this.panels[commentid] = new M.core.dialogue({
headerContent:Y.Node.create('<h1>')
.append(Y.one('#commentoverlay-'+commentid+' .commenttitle').get('innerHTML')),
bodyContent:Y.one('#commentoverlay-'+commentid).get('innerHTML'),
visible: false, //by default it is not displayed
lightbox : false,
zIndex:100,
height: '350px'
closeButtonTitle: this.get('closeButtonTitle')
});
this.overlays[commentid].get('contentBox').one('.commenttitle').remove();
this.overlays[commentid].render();
this.overlays[commentid].hide();
this.panels[commentid].get('contentBox').one('.commenttitle').remove();
this.panels[commentid].render();
this.panels[commentid].hide();
Y.one('#comments-'+commentid).on('click', this.show, this, commentid);
}
@@ -38,34 +39,37 @@ YUI.add('moodle-block_community-comments', function(Y) {
show : function (e, commentid) {
//hide all overlays
// Hide all panels.
for (var i=0;i<this.get('commentids').length;i++)
{
this.hide(e, this.get('commentids')[i]);
}
this.overlays[commentid].show(); //show the overlay
this.panels[commentid].show(); //show the panel
e.halt(); // we are going to attach a new 'hide overlay' event to the body,
e.halt(); // we are going to attach a new 'hide panel' event to the body,
// because javascript always propagate event to parent tag,
// we need to tell Yahoo to stop to call the event on parent tag
// otherwise the hide event will be call right away.
//we add a new event on the body in order to hide the overlay for the next click
// We add a new event on the body in order to hide the panel for the next click.
this.event = Y.one(document.body).on('click', this.hide, this, commentid);
//we add a new event on the overlay in order to hide the overlay for the next click (touch device)
this.overlayevent = Y.one("#commentoverlay-"+commentid).on('click', this.hide, this, commentid);
// We add a new event on the panel in order to hide the panel for the next click (touch device).
this.panelevent = Y.one("#commentoverlay-"+commentid).on('click', this.hide, this, commentid);
// Focus on the close button
this.panels[commentid].get('buttons').header[0].focus();
},
hide : function (e, commentid) {
this.overlays[commentid].hide(); //hide the overlay
this.panels[commentid].hide(); //hide the panel
if (this.event != null) {
this.event.detach(); //we need to detach the body hide event
//Note: it would work without but create js warning everytime
//we click on the body
}
if (this.overlayevent != null) {
this.overlayevent.detach(); //we need to detach the overlay hide event
if (this.panelevent != null) {
this.panelevent.detach(); //we need to detach the panel hide event
//Note: it would work without but create js warning everytime
//we click on the body
}
@@ -75,7 +79,11 @@ YUI.add('moodle-block_community-comments', function(Y) {
}, {
NAME : COMMENTSNAME,
ATTRS : {
commentids: {}
commentids: {},
closeButtonTitle : {
validator : Y.Lang.isString,
value : 'Close'
}
}
});
@@ -85,5 +93,5 @@ YUI.add('moodle-block_community-comments', function(Y) {
}
}, '@VERSION@', {
requires:['base','overlay', 'moodle-enrol-notification']
});
requires:['base', 'moodle-enrol-notification']
});
+48 -41
View File
@@ -11,8 +11,8 @@ YUI.add('moodle-block_community-imagegallery', function(Y) {
event:null,
previousevent:null,
nextevent:null,
overlayevent:null,
overlay:null, //all the comment boxes
panelevent: null,
panel: null, //all the images boxes
imageidnumbers: [],
imageloadingevent: null,
loadingimage: null,
@@ -26,15 +26,15 @@ YUI.add('moodle-block_community-imagegallery', function(Y) {
+'</div>');
objBody.append(this.loadingimage);
/// create the div for overlay
// Create the div for panel.
var objBody = Y.one(document.body);
var overlaytitle = Y.Node.create('<div id="imagetitleoverlay" class="hiddenoverlay"></div>');
objBody.append(overlaytitle);
var overlay = Y.Node.create('<div id="imageoverlay" class="hiddenoverlay"></div>');
objBody.append(overlay);
var paneltitle = Y.Node.create('<div id="imagetitleoverlay" class="hiddenoverlay"></div>');
objBody.append(paneltitle);
var panel = Y.Node.create('<div id="imageoverlay" class="hiddenoverlay"></div>');
objBody.append(panel);
/// create the overlay
this.overlay = new M.core.dialogue({
/// Create the panel.
this.panel = new M.core.dialogue({
headerContent:Y.one('#imagetitleoverlay').get('innerHTML'),
bodyContent:Y.one('#imageoverlay').get('innerHTML'),
visible: false, //by default it is not displayed
@@ -42,8 +42,8 @@ YUI.add('moodle-block_community-imagegallery', function(Y) {
zIndex:100
});
this.overlay.render();
this.overlay.hide();
this.panel.render();
this.panel.hide();
//attach a show event on the image divs (<tag id='image-X'>)
for (var i=0;i<this.get('imageids').length;i++)
@@ -85,31 +85,31 @@ YUI.add('moodle-block_community-imagegallery', function(Y) {
var maxheight = windowheight - 150;
//load the title + link to next image
var overlaytitle = Y.one('#imagetitleoverlay');
var paneltitle = Y.one('#imagetitleoverlay');
var previousimagelink = "<div id=\"previousarrow\" class=\"imagearrow\">←</div>";
var nextimagelink = "<div id=\"nextarrow\" class=\"imagearrow\">→</div>";
/// need to load the images in the overlay
var overlay = Y.one('#imageoverlay');
overlay.setContent('');
// Need to load the images in the panel.
var panel = Y.one('#imageoverlay');
panel.setContent('');
overlay.append(Y.Node.create('<div style="text-align:center"><img id=\"imagetodisplay\" src="' + url
panel.append(Y.Node.create('<div style="text-align:center"><img id=\"imagetodisplay\" src="' + url
+ '" style="max-height:' + maxheight + 'px;"></div>'));
this.overlay.destroy();
this.overlay = new M.core.dialogue({
headerContent:previousimagelink + '<div id=\"imagenumber\" class=\"imagetitle\"> Image '
+ screennumber + ' / ' + this.imageidnumbers[imageid] + ' </div>' + nextimagelink,
this.panel.destroy();
this.panel = new M.core.dialogue({
headerContent:previousimagelink + '<div id=\"imagenumber\" class=\"imagetitle\"><h1> Image '
+ screennumber + ' / ' + this.imageidnumbers[imageid] + ' </h1></div>' + nextimagelink,
bodyContent:Y.one('#imageoverlay').get('innerHTML'),
visible: false, //by default it is not displayed
lightbox : false,
zIndex:100
zIndex:100,
closeButtonTitle: this.get('closeButtonTitle')
});
this.overlay.render();
this.overlay.hide(); //show the overlay
this.overlay.set("centered", true);
this.panel.render();
this.panel.hide(); //show the panel
this.panel.set("centered", true);
e.halt(); // we are going to attach a new 'hide overlay' event to the body,
e.halt(); // we are going to attach a new 'hide panel' event to the body,
// because javascript always propagate event to parent tag,
// we need to tell Yahoo to stop to call the event on parent tag
// otherwise the hide event will be call right away.
@@ -123,14 +123,17 @@ YUI.add('moodle-block_community-imagegallery', function(Y) {
var screenshot = new Image();
screenshot.src = url;
var overlaywidth = windowwidth - 100;
if(overlaywidth > screenshot.width) {
overlaywidth = screenshot.width;
var panelwidth = windowwidth - 100;
if(panelwidth > screenshot.width) {
panelwidth = screenshot.width;
}
this.overlay.set('width', overlaywidth);
this.overlay.set("centered", true);
this.overlay.show();
this.panel.set('width', panelwidth);
this.panel.set("centered", true);
this.panel.show();
// Focus on the close button
this.panel.get('buttons').header[0].focus();
}, this, url);
@@ -147,12 +150,12 @@ YUI.add('moodle-block_community-imagegallery', function(Y) {
Y.one('#nextarrow').on('click', this.show, this, imageid, nextnumber);
Y.one('#imagenumber').on('click', this.show, this, imageid, nextnumber);
//we add a new event on the body in order to hide the overlay for the next click
//we add a new event on the body in order to hide the panel for the next click
this.event = Y.one(document.body).on('click', this.hide, this);
//we add a new event on the overlay in order to hide the overlay for the next click (touch device)
this.overlayevent = Y.one("#imageoverlay").on('click', this.hide, this);
//we add a new event on the panel in order to hide the panel for the next click (touch device)
this.panelevent = Y.one("#imageoverlay").on('click', this.hide, this);
this.overlay.on('visibleChange',function(e){
this.panel.on('visibleChange',function(e){
if(e.newVal == 0){
this.get('maskNode').remove()
}
@@ -167,14 +170,14 @@ YUI.add('moodle-block_community-imagegallery', function(Y) {
//hide the loading image
Y.one('#hubloadingimage').setStyle('display', 'none');
this.overlay.hide(); //hide the overlay
this.panel.hide(); //hide the panel
if (this.event != null) {
this.event.detach(); //we need to detach the body hide event
//Note: it would work without but create js warning everytime
//we click on the body
}
if (this.overlayevent != null) {
this.overlayevent.detach(); //we need to detach the overlay hide event
if (this.panelevent != null) {
this.panelevent.detach(); //we need to detach the panel hide event
//Note: it would work without but create js warning everytime
//we click on the body
}
@@ -185,7 +188,11 @@ YUI.add('moodle-block_community-imagegallery', function(Y) {
ATTRS : {
imageids: {},
imagenumbers: {},
huburl: {}
huburl: {},
closeButtonTitle : {
validator : Y.Lang.isString,
value : 'Close'
}
}
});
@@ -195,5 +202,5 @@ YUI.add('moodle-block_community-imagegallery', function(Y) {
}
}, '@VERSION@', {
requires:['base','node','overlay', 'moodle-enrol-notification']
requires:['base','node', 'moodle-enrol-notification']
});
+136 -137
View File
@@ -51,8 +51,10 @@ class block_completionstatus extends block_base {
// Create empty content
$this->content = new stdClass();
$context = get_context_instance(CONTEXT_COURSE, $course->id);
// Can edit settings?
$can_edit = has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id));
$can_edit = has_capability('moodle/course:update', $context);
// Get course completion data
$info = new completion_info($course);
@@ -83,148 +85,145 @@ class block_completionstatus extends block_base {
}
// Check this user is enroled
if (!$info->is_tracked_user($USER->id)) {
// If not enrolled, but are can view the report:
if (has_capability('report/completion:view', get_context_instance(CONTEXT_COURSE, $course->id))) {
$report = new moodle_url('/report/completion/index.php', array('course' => $course->id));
$this->content->text = '<a href="'.$report->out().'">'.get_string('viewcoursereport', 'completion').'</a>';
return $this->content;
if ($info->is_tracked_user($USER->id)) {
// Generate markup for criteria statuses
$shtml = '';
// For aggregating activity completion
$activities = array();
$activities_complete = 0;
// For aggregating course prerequisites
$prerequisites = array();
$prerequisites_complete = 0;
// Flag to set if current completion data is inconsistent with
// what is stored in the database
$pending_update = false;
// Loop through course criteria
foreach ($completions as $completion) {
$criteria = $completion->get_criteria();
$complete = $completion->is_complete();
if (!$pending_update && $criteria->is_pending($completion)) {
$pending_update = true;
}
// Activities are a special case, so cache them and leave them till last
if ($criteria->criteriatype == COMPLETION_CRITERIA_TYPE_ACTIVITY) {
$activities[$criteria->moduleinstance] = $complete;
if ($complete) {
$activities_complete++;
}
continue;
}
// Prerequisites are also a special case, so cache them and leave them till last
if ($criteria->criteriatype == COMPLETION_CRITERIA_TYPE_COURSE) {
$prerequisites[$criteria->courseinstance] = $complete;
if ($complete) {
$prerequisites_complete++;
}
continue;
}
$shtml .= '<tr><td>';
$shtml .= $criteria->get_title();
$shtml .= '</td><td style="text-align: right">';
$shtml .= $completion->get_status();
$shtml .= '</td></tr>';
}
// Otherwise, show error
// Aggregate activities
if (!empty($activities)) {
$shtml .= '<tr><td>';
$shtml .= get_string('activitiescompleted', 'completion');
$shtml .= '</td><td style="text-align: right">';
$a = new stdClass();
$a->first = $activities_complete;
$a->second = count($activities);
$shtml .= get_string('firstofsecond', 'block_completionstatus', $a);
$shtml .= '</td></tr>';
}
// Aggregate prerequisites
if (!empty($prerequisites)) {
$phtml = '<tr><td>';
$phtml .= get_string('prerequisitescompleted', 'completion');
$phtml .= '</td><td style="text-align: right">';
$a = new stdClass();
$a->first = $prerequisites_complete;
$a->second = count($prerequisites);
$phtml .= get_string('firstofsecond', 'block_completionstatus', $a);
$phtml .= '</td></tr>';
$shtml = $phtml . $shtml;
}
// Display completion status
$this->content->text = '<table width="100%" style="font-size: 90%;"><tbody>';
$this->content->text .= '<tr><td colspan="2"><b>'.get_string('status').':</b> ';
// Is course complete?
$coursecomplete = $info->is_course_complete($USER->id);
// Load course completion
$params = array(
'userid' => $USER->id,
'course' => $course->id
);
$ccompletion = new completion_completion($params);
// Has this user completed any criteria?
$criteriacomplete = $info->count_course_user_data($USER->id);
if ($pending_update) {
$this->content->text .= '<i>'.get_string('pending', 'completion').'</i>';
} else if ($coursecomplete) {
$this->content->text .= get_string('complete');
} else if (!$criteriacomplete && !$ccompletion->timestarted) {
$this->content->text .= '<i>'.get_string('notyetstarted', 'completion').'</i>';
} else {
$this->content->text .= '<i>'.get_string('inprogress','completion').'</i>';
}
$this->content->text .= '</td></tr>';
$this->content->text .= '<tr><td colspan="2">';
// Get overall aggregation method
$overall = $info->get_aggregation_method();
if ($overall == COMPLETION_AGGREGATION_ALL) {
$this->content->text .= get_string('criteriarequiredall', 'completion');
} else {
$this->content->text .= get_string('criteriarequiredany', 'completion');
}
$this->content->text .= ':</td></tr>';
$this->content->text .= '<tr><td><b>'.get_string('requiredcriteria', 'completion').'</b></td><td style="text-align: right"><b>'.get_string('status').'</b></td></tr>';
$this->content->text .= $shtml.'</tbody></table>';
// Display link to detailed view
$details = new moodle_url('/blocks/completionstatus/details.php', array('course' => $course->id));
$this->content->footer = '<br><a href="'.$details->out().'">'.get_string('moredetails', 'completion').'</a>';
} else {
// If user is not enrolled, show error
$this->content->text = get_string('notenroled', 'completion');
return $this->content;
}
// Generate markup for criteria statuses
$shtml = '';
// For aggregating activity completion
$activities = array();
$activities_complete = 0;
// For aggregating course prerequisites
$prerequisites = array();
$prerequisites_complete = 0;
// Flag to set if current completion data is inconsistent with
// what is stored in the database
$pending_update = false;
// Loop through course criteria
foreach ($completions as $completion) {
$criteria = $completion->get_criteria();
$complete = $completion->is_complete();
if (!$pending_update && $criteria->is_pending($completion)) {
$pending_update = true;
}
// Activities are a special case, so cache them and leave them till last
if ($criteria->criteriatype == COMPLETION_CRITERIA_TYPE_ACTIVITY) {
$activities[$criteria->moduleinstance] = $complete;
if ($complete) {
$activities_complete++;
}
continue;
}
// Prerequisites are also a special case, so cache them and leave them till last
if ($criteria->criteriatype == COMPLETION_CRITERIA_TYPE_COURSE) {
$prerequisites[$criteria->courseinstance] = $complete;
if ($complete) {
$prerequisites_complete++;
}
continue;
}
$shtml .= '<tr><td>';
$shtml .= $criteria->get_title();
$shtml .= '</td><td style="text-align: right">';
$shtml .= $completion->get_status();
$shtml .= '</td></tr>';
if (has_capability('report/completion:view', $context)) {
$report = new moodle_url('/report/completion/index.php', array('course' => $course->id));
$this->content->footer .= '<br /><a href="'.$report->out().'">'.get_string('viewcoursereport', 'completion').'</a>';
}
// Aggregate activities
if (!empty($activities)) {
$shtml .= '<tr><td>';
$shtml .= get_string('activitiescompleted', 'completion');
$shtml .= '</td><td style="text-align: right">';
$a = new stdClass();
$a->first = $activities_complete;
$a->second = count($activities);
$shtml .= get_string('firstofsecond', 'block_completionstatus', $a);
$shtml .= '</td></tr>';
}
// Aggregate prerequisites
if (!empty($prerequisites)) {
$phtml = '<tr><td>';
$phtml .= get_string('prerequisitescompleted', 'completion');
$phtml .= '</td><td style="text-align: right">';
$a = new stdClass();
$a->first = $prerequisites_complete;
$a->second = count($prerequisites);
$phtml .= get_string('firstofsecond', 'block_completionstatus', $a);
$phtml .= '</td></tr>';
$shtml = $phtml . $shtml;
}
// Display completion status
$this->content->text = '<table width="100%" style="font-size: 90%;"><tbody>';
$this->content->text .= '<tr><td colspan="2"><b>'.get_string('status').':</b> ';
// Is course complete?
$coursecomplete = $info->is_course_complete($USER->id);
// Load course completion
$params = array(
'userid' => $USER->id,
'course' => $course->id
);
$ccompletion = new completion_completion($params);
// Has this user completed any criteria?
$criteriacomplete = $info->count_course_user_data($USER->id);
if ($pending_update) {
$this->content->text .= '<i>'.get_string('pending', 'completion').'</i>';
} else if ($coursecomplete) {
$this->content->text .= get_string('complete');
} else if (!$criteriacomplete && !$ccompletion->timestarted) {
$this->content->text .= '<i>'.get_string('notyetstarted', 'completion').'</i>';
} else {
$this->content->text .= '<i>'.get_string('inprogress','completion').'</i>';
}
$this->content->text .= '</td></tr>';
$this->content->text .= '<tr><td colspan="2">';
// Get overall aggregation method
$overall = $info->get_aggregation_method();
if ($overall == COMPLETION_AGGREGATION_ALL) {
$this->content->text .= get_string('criteriarequiredall', 'completion');
} else {
$this->content->text .= get_string('criteriarequiredany', 'completion');
}
$this->content->text .= ':</td></tr>';
$this->content->text .= '<tr><td><b>'.get_string('requiredcriteria', 'completion').'</b></td><td style="text-align: right"><b>'.get_string('status').'</b></td></tr>';
$this->content->text .= $shtml.'</tbody></table>';
// Display link to detailed view
$details = new moodle_url('/blocks/completionstatus/details.php', array('course' => $course->id));
$this->content->footer = '<br><a href="'.$details->out().'">'.get_string('moredetails', 'completion').'</a>';
return $this->content;
}
}
+21 -5
View File
@@ -164,7 +164,7 @@ M.core_dock.init = function(Y) {
var dock = Y.one('#dock');
if (!dock) {
// Start the construction of the dock
dock = Y.Node.create('<div id="dock" class="'+css.dock+' '+css.dock+'_'+this.cfg.position+'_'+this.cfg.orientation+'"></div>')
dock = Y.Node.create('<div id="dock" role="menubar" class="'+css.dock+' '+css.dock+'_'+this.cfg.position+'_'+this.cfg.orientation+'"></div>')
.append(Y.Node.create('<div class="'+css.buttonscontainer+'"></div>')
.append(Y.Node.create('<div class="'+css.dockeditemcontainer+'"></div>')));
this.nodes.body.append(dock);
@@ -505,7 +505,7 @@ M.core_dock.fixTitleOrientation = function(item, title, text) {
break;
}
if (Y.UA.ie > 7) {
if (Y.UA.ie == 8) {
// IE8 can flip the text via CSS but not handle SVG
title.setContent(text);
title.setAttribute('style', 'writing-mode: tb-rl; filter: flipV flipH;display:inline;');
@@ -863,6 +863,12 @@ M.core_dock.genericblock.prototype = {
return;
}
// Disable the skip anchor when docking
var skipanchor = node.previous();
if (skipanchor.hasClass('skip-block')) {
skipanchor.hide();
}
var blockclass = (function(classes){
var r = /(^|\s)(block_[a-zA-Z0-9_]+)(\s|$)/;
var m = r.exec(classes);
@@ -910,7 +916,7 @@ M.core_dock.genericblock.prototype = {
}, this);
// Add a close icon
// Must set the image src seperatly of we get an error with XML strict headers
var closeicon = Y.Node.create('<span class="hidepanelicon" tabindex="0"><img alt="" style="width:11px;height:11px;cursor:pointer;" /></span>');
var closeicon = Y.Node.create('<span class="hidepanelicon" tabindex="0"><img alt="'+M.str.block.hidepanel+'" title="'+M.str.block.hidedockpanel+'" style="width:11px;height:11px;cursor:pointer;"/></span>');
closeicon.one('img').setAttribute('src', M.util.image_url('t/dockclose', 'moodle'));
closeicon.on('forceclose|click', this.hide, this);
closeicon.on('dock:actionkey',this.hide, this, {actions:{enter:true,toggle:true}});
@@ -937,6 +943,12 @@ M.core_dock.genericblock.prototype = {
return_to_block : function(dockitem) {
var placeholder = this.Y.one('#content_placeholder_'+this.id);
// Enable the skip anchor when going back to block mode
var skipanchor = placeholder.previous();
if (skipanchor.hasClass('skip-block')) {
skipanchor.show();
}
if (this.cachedcontentnode.one('.header')) {
this.cachedcontentnode.one('.header').insert(dockitem.contents, 'after');
} else {
@@ -946,7 +958,7 @@ M.core_dock.genericblock.prototype = {
placeholder.replace(this.Y.Node.getDOMNode(this.cachedcontentnode));
this.cachedcontentnode = this.Y.one('#'+this.cachedcontentnode.get('id'));
var commands = this.cachedcontentnode.one('.title .commands');
var commands = dockitem.commands;
if (commands) {
commands.all('.hidepanelicon').remove();
commands.all('.moveto').remove();
@@ -1024,7 +1036,7 @@ M.core_dock.item.prototype = {
var Y = this.Y;
var css = M.core_dock.css;
this.nodes.docktitle = Y.Node.create('<div id="dock_item_'+this.id+'_title" class="'+css.dockedtitle+'"></div>');
this.nodes.docktitle = Y.Node.create('<div id="dock_item_'+this.id+'_title" role="menu" aria-haspopup="true" class="'+css.dockedtitle+'"></div>');
this.nodes.docktitle.append(this.title);
this.nodes.dockitem = Y.Node.create('<div id="dock_item_'+this.id+'" class="'+css.dockeditem+'" tabindex="0"></div>');
this.nodes.dockitem.on('dock:actionkey', this.toggle, this);
@@ -1053,6 +1065,8 @@ M.core_dock.item.prototype = {
this.active = true;
// Add active item class first up
this.nodes.docktitle.addClass(css.activeitem);
// Set aria-exapanded property to true.
this.nodes.docktitle.set('aria-expanded', "true");
this.fire('dockeditem:showcomplete');
M.core_dock.resize();
return true;
@@ -1069,6 +1083,8 @@ M.core_dock.item.prototype = {
this.nodes.docktitle.removeClass(css.activeitem);
// Hide the panel
M.core_dock.getPanel().hide();
// Set aria-exapanded property to false
this.nodes.docktitle.set('aria-expanded', "false");
this.fire('dockeditem:hidecomplete');
},
/**
@@ -129,11 +129,6 @@ class block_glossary_random extends block_base {
$course = $this->page->course;
$modinfo = get_fast_modinfo($course);
$glossaryid = $this->config->glossary;
$cm = $modinfo->instances['glossary'][$glossaryid];
if (!has_capability('mod/glossary:view', get_context_instance(CONTEXT_MODULE, $cm->id))) {
return '';
}
if (!isset($modinfo->instances['glossary'][$glossaryid])) {
// we can get here if the glossary has been deleted, so
@@ -142,11 +137,18 @@ class block_glossary_random extends block_base {
$this->config->cache = '';
$this->instance_config_commit();
$this->content = new stdClass();
$this->content->text = get_string('notyetconfigured','block_glossary_random');
$this->content->footer = '';
return $this->content;
}
$cm = $modinfo->instances['glossary'][$glossaryid];
if (!has_capability('mod/glossary:view', get_context_instance(CONTEXT_MODULE, $cm->id))) {
return '';
}
if (empty($this->config->cache)) {
$this->config->cache = '';
}
+46
View File
@@ -0,0 +1,46 @@
<?php
/**
* Provides support for the conversion of moodle1 backup to the moodle2 format
*
* @package block_html
* @copyright 2012 Paul Nicholls
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Block conversion handler for html
*/
class moodle1_block_html_handler extends moodle1_block_handler {
private $fileman = null;
protected function convert_configdata(array $olddata) {
$instanceid = $olddata['id'];
$contextid = $this->converter->get_contextid(CONTEXT_BLOCK, $olddata['id']);
$configdata = unserialize(base64_decode($olddata['configdata']));
// get a fresh new file manager for this instance
$this->fileman = $this->converter->get_file_manager($contextid, 'block_html');
// convert course files embedded in the block content
$this->fileman->filearea = 'content';
$this->fileman->itemid = 0;
$configdata->text = moodle1_converter::migrate_referenced_files($configdata->text, $this->fileman);
$configdata->format = FORMAT_HTML;
return base64_encode(serialize($configdata));
}
protected function write_inforef_xml($newdata, $data) {
$this->open_xml_writer("course/blocks/{$data['name']}_{$data['id']}/inforef.xml");
$this->xmlwriter->begin_tag('inforef');
$this->xmlwriter->begin_tag('fileref');
foreach ($this->fileman->get_fileids() as $fileid) {
$this->write_xml('file', array('id' => $fileid));
}
$this->xmlwriter->end_tag('fileref');
$this->xmlwriter->end_tag('inforef');
$this->close_xml_writer();
}
}
+19 -2
View File
@@ -30,15 +30,32 @@
* @param bool $forcedownload whether or not force download
* @param array $options additional options affecting the file serving
* @return bool
* @todo MDL-36050 improve capability check on stick blocks, so we can check user capability before sending images.
*/
function block_html_pluginfile($course, $birecord_or_cm, $context, $filearea, $args, $forcedownload, array $options=array()) {
global $SCRIPT;
global $DB, $CFG;
if ($context->contextlevel != CONTEXT_BLOCK) {
send_file_not_found();
}
require_course_login($course);
// If block is in course context, then check if user has capability to access course.
if ($context->get_course_context(false)) {
require_course_login($course);
} else if ($CFG->forcelogin) {
require_login();
} else {
// Get parent context and see if user have proper permission.
$parentcontext = $context->get_parent_context();
if ($parentcontext->contextlevel === CONTEXT_COURSECAT) {
// Check if category is visible and user can view this category.
$category = $DB->get_record('course_categories', array('id' => $parentcontext->instanceid), '*', MUST_EXIST);
if (!$category->visible) {
require_capability('moodle/category:viewhiddencategories', $parentcontext);
}
}
// At this point there is no way to check SYSTEM or USER context, so ignoring it.
}
if ($filearea !== 'content') {
send_file_not_found();
+3 -1
View File
@@ -121,18 +121,20 @@ class block_navigation_renderer extends plugin_renderer_base {
// this applies to the li item which contains all child lists too
$liclasses = array($item->get_css_type(), 'depth_'.$depth);
$liexpandable = array();
if ($item->has_children() && (!$item->forceopen || $item->collapse)) {
$liclasses[] = 'collapsed';
}
if ($isbranch) {
$liclasses[] = 'contains_branch';
$liexpandable = array('aria-expanded' => in_array('collapsed', $liclasses) ? "false" : "true");
} else if ($hasicon) {
$liclasses[] = 'item_with_icon';
}
if ($item->isactive === true) {
$liclasses[] = 'current_branch';
}
$liattr = array('class'=>join(' ',$liclasses));
$liattr = array('class' => join(' ',$liclasses)) + $liexpandable;
// class attribute on the div item which only contains the item content
$divclasses = array('tree_item');
if ($isbranch) {
+6
View File
@@ -162,16 +162,20 @@ TREE.prototype = {
switch (e.action) {
case 'expand' :
target.removeClass('collapsed');
target.set('aria-expanded', true);
break;
case 'collapse' :
target.addClass('collapsed');
target.set('aria-expanded', false);
break;
default :
target.toggleClass('collapsed');
target.set('aria-expanded', !target.hasClass('collapsed'));
}
e.halt();
} else {
target.toggleClass('collapsed');
target.set('aria-expanded', !target.hasClass('collapsed'));
}
}
@@ -180,6 +184,7 @@ TREE.prototype = {
target.siblings('li').each(function(){
if (this.get('id') !== target.get('id') && !this.hasClass('collapsed')) {
this.addClass('collapsed');
this.set('aria-expanded', false);
}
});
}
@@ -287,6 +292,7 @@ BRANCH.prototype = {
}
if (isbranch) {
branchli.addClass('collapsed').addClass('contains_branch');
branchli.set('aria-expanded', false);
branchp.addClass('branch');
}
+21 -10
View File
@@ -31,7 +31,8 @@ class block_online_users extends block_base {
if (isset($CFG->block_online_users_timetosee)) {
$timetoshowusers = $CFG->block_online_users_timetosee * 60;
}
$timefrom = 100 * floor((time()-$timetoshowusers) / 100); // Round to nearest 100 seconds for better query cache
$now = time();
$timefrom = 100 * floor(($now - $timetoshowusers) / 100); // Round to nearest 100 seconds for better query cache
//Calculate if we are in separate groups
$isseparategroups = ($this->page->course->groupmode == SEPARATEGROUPS
@@ -53,18 +54,23 @@ class block_online_users extends block_base {
}
$userfields = user_picture::fields('u', array('username'));
$params['now'] = $now;
$params['timefrom'] = $timefrom;
if ($this->page->course->id == SITEID or $this->page->context->contextlevel < CONTEXT_COURSE) { // Site-level
$sql = "SELECT $userfields, MAX(u.lastaccess) AS lastaccess
FROM {user} u $groupmembers
WHERE u.lastaccess > $timefrom
WHERE u.lastaccess > :timefrom
AND u.lastaccess <= :now
AND u.deleted = 0
$groupselect
GROUP BY $userfields
ORDER BY lastaccess DESC ";
$csql = "SELECT COUNT(u.id)
FROM {user} u $groupmembers
WHERE u.lastaccess > $timefrom
WHERE u.lastaccess > :timefrom
AND u.lastaccess <= :now
AND u.deleted = 0
$groupselect";
} else {
@@ -77,9 +83,11 @@ class block_online_users extends block_base {
$sql = "SELECT $userfields, MAX(ul.timeaccess) AS lastaccess
FROM {user_lastaccess} ul $groupmembers, {user} u
JOIN ($esqljoin) euj ON euj.id = u.id
WHERE ul.timeaccess > $timefrom
WHERE ul.timeaccess > :timefrom
AND u.id = ul.userid
AND ul.courseid = :courseid
AND ul.timeaccess <= :now
AND u.deleted = 0
$groupselect
GROUP BY $userfields
ORDER BY lastaccess DESC";
@@ -87,9 +95,11 @@ class block_online_users extends block_base {
$csql = "SELECT COUNT(u.id)
FROM {user_lastaccess} ul $groupmembers, {user} u
JOIN ($esqljoin) euj ON euj.id = u.id
WHERE ul.timeaccess > $timefrom
WHERE ul.timeaccess > :timefrom
AND u.id = ul.userid
AND ul.courseid = :courseid
AND ul.timeaccess <= :now
AND u.deleted = 0
$groupselect";
$params['courseid'] = $this->page->course->id;
@@ -138,15 +148,16 @@ class block_online_users extends block_base {
}
foreach ($users as $user) {
$this->content->text .= '<li class="listentry">';
$timeago = format_time(time() - $user->lastaccess); //bruno to calculate correctly on frontpage
$timeago = format_time($now - $user->lastaccess); //bruno to calculate correctly on frontpage
if (isguestuser($user)) {
$this->content->text .= '<div class="user">'.$OUTPUT->user_picture($user, array('size'=>16));
$this->content->text .= '<div class="user">'.$OUTPUT->user_picture($user, array('size'=>16, 'alttext'=>false));
$this->content->text .= get_string('guestuser').'</div>';
} else {
$this->content->text .= '<div class="user">'.$OUTPUT->user_picture($user, array('size'=>16));
$this->content->text .= '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&amp;course='.$this->page->course->id.'" title="'.$timeago.'">'.$user->fullname.'</a></div>';
$this->content->text .= '<div class="user">';
$this->content->text .= '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&amp;course='.$this->page->course->id.'" title="'.$timeago.'">';
$this->content->text .= $OUTPUT->user_picture($user, array('size'=>16, 'alttext'=>false, 'link'=>false)) .$user->fullname.'</a></div>';
}
if ($canshowicon and ($USER->id != $user->id) and !isguestuser($user)) { // Only when logged in and messaging active etc
$anchortagcontents = '<img class="iconsmall" src="'.$OUTPUT->pix_url('t/message') . '" alt="'. get_string('messageselectadd') .'" />';
+34
View File
@@ -0,0 +1,34 @@
<?php
/**
* Provides support for the conversion of moodle1 backup to the moodle2 format
*
* @package block_rss_client
* @copyright 2012 Paul Nicholls
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Block conversion handler for rss_client
*/
class moodle1_block_rss_client_handler extends moodle1_block_handler {
public function process_block(array $data) {
parent::process_block($data);
$instanceid = $data['id'];
$contextid = $this->converter->get_contextid(CONTEXT_BLOCK, $data['id']);
// Moodle 1.9 backups do not include sufficient data to restore feeds, so we need an empty shell rss_client.xml
// for the restore process to find
$this->open_xml_writer("course/blocks/{$data['name']}_{$instanceid}/rss_client.xml");
$this->xmlwriter->begin_tag('block', array('id' => $instanceid, 'contextid' => $contextid, 'blockname' => 'rss_client'));
$this->xmlwriter->begin_tag('rss_client', array('id' => $instanceid));
$this->xmlwriter->full_tag('feeds', '');
$this->xmlwriter->end_tag('rss_client');
$this->xmlwriter->end_tag('block');
$this->close_xml_writer();
return $data;
}
}
@@ -78,6 +78,9 @@ class restore_rss_client_block_structure_step extends restore_structure_step {
$configdata = $DB->get_field('block_instances', 'configdata', array('id' => $this->task->get_blockid()));
// Extract configdata
$config = unserialize(base64_decode($configdata));
if (empty($config)) {
$config = new stdClass();
}
// Set array of used rss feeds
$config->rssid = $feedsarr;
// Serialize back the configdata
+1 -1
View File
@@ -239,7 +239,7 @@
$r = html_writer::start_tag('li');
$r.= html_writer::start_tag('div',array('class'=>'link'));
$r.= html_writer::link(clean_param($link,PARAM_URL), s($title), array('onclick'=>'this.target="_blank"'));
$r.= html_writer::link($link, s($title), array('onclick'=>'this.target="_blank"'));
$r.= html_writer::end_tag('div');
if($this->config->display_description && !empty($description)){
@@ -27,6 +27,7 @@ class block_search_forums extends block_base {
$this->content->text = '<div class="searchform">';
$this->content->text .= '<form action="'.$CFG->wwwroot.'/mod/forum/search.php" style="display:inline"><fieldset class="invisiblefieldset">';
$this->content->text .= '<legend class="accesshide">'.$strsearch.'</legend>';
$this->content->text .= '<input name="id" type="hidden" value="'.$this->page->course->id.'" />'; // course
$this->content->text .= '<label class="accesshide" for="searchform_search">'.$strsearch.'</label>'.
'<input id="searchform_search" name="search" type="text" size="16" />';
+3 -1
View File
@@ -40,18 +40,20 @@ class block_settings_renderer extends plugin_renderer_base {
// this applies to the li item which contains all child lists too
$liclasses = array($item->get_css_type());
$liexpandable = array();
if (!$item->forceopen || (!$item->forceopen && $item->collapse) || ($item->children->count()==0 && $item->nodetype==navigation_node::NODETYPE_BRANCH)) {
$liclasses[] = 'collapsed';
}
if ($isbranch) {
$liclasses[] = 'contains_branch';
$liexpandable = array('aria-expanded' => in_array('collapsed', $liclasses) ? "false" : "true");
} else if ($hasicon) {
$liclasses[] = 'item_with_icon';
}
if ($item->isactive === true) {
$liclasses[] = 'current_branch';
}
$liattr = array('class'=>join(' ',$liclasses));
$liattr = array('class' => join(' ',$liclasses)) + $liexpandable;
// class attribute on the div item which only contains the item content
$divclasses = array('tree_item');
if ($isbranch) {
+1 -1
View File
@@ -34,7 +34,7 @@ class block_tags_edit_form extends block_edit_form {
// Fields for editing HTML block title and contents.
$mform->addElement('header', 'configheader', get_string('blocksettings', 'block'));
$mform->addElement('text', 'config_title', get_string('pluginname', 'block_tags'));
$mform->addElement('text', 'config_title', get_string('configtitle', 'block_tags'));
$mform->setType('config_title', PARAM_MULTILANG);
$mform->setDefault('config_title', get_string('pluginname', 'block_tags'));
+2
View File
@@ -31,6 +31,7 @@ $string['arrowtitle'] = 'Click here to enter the suggested text (grey letters).'
$string['communitytags'] = 'Community tags:';
$string['communitytags1'] = 'community tags';
$string['communitytags2'] = 'Show all user created course tags';
$string['configtitle'] = 'Block title';
$string['coursetags'] = 'Course tags:';
$string['coursetags1'] = 'course tags';
$string['coursetags2'] = 'Show tags for this course';
@@ -82,6 +83,7 @@ $string['pluginname'] = 'Tags';
$string['select'] = 'Select...';
$string['showcoursetags'] = 'Show course tags';
$string['showcoursetagsdef'] = 'Display the course tagging features in the tags block, allowing students to tag courses.';
$string['suggestedtagthisunit'] = 'Suggested tag to this course:';
$string['tags'] = 'tags';
$string['tagthisunit'] = 'Tag this course:';
$string['tagunits'] = 'to tag your favourite courses';
+12
View File
@@ -158,11 +158,23 @@ function blog_rss_get_params($filters) {
function blog_rss_get_feed($context, $args) {
global $CFG, $SITE, $DB;
if (empty($CFG->bloglevel)) {
debugging('Blogging disabled on this site, RSS feeds are not available');
return null;
}
if (empty($CFG->enablerssfeeds)) {
debugging('Sorry, RSS feeds are disabled on this site');
return '';
}
if ($CFG->bloglevel == BLOG_SITE_LEVEL) {
if (isguestuser()) {
debugging(get_string('nopermissiontoshow','error'));
return '';
}
}
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
if (!has_capability('moodle/blog:view', $sitecontext)) {
return null;
+19 -7
View File
@@ -1721,11 +1721,19 @@ function calendar_get_allowed_types(&$allowed, $course = null) {
$allowed->courses = array($course->id => 1);
if ($course->groupmode != NOGROUPS || !$course->groupmodeforce) {
$allowed->groups = groups_get_all_groups($course->id);
if (has_capability('moodle/site:accessallgroups', $coursecontext)) {
$allowed->groups = groups_get_all_groups($course->id);
} else {
$allowed->groups = groups_get_all_groups($course->id, $USER->id);
}
}
} else if (has_capability('moodle/calendar:managegroupentries', $coursecontext)) {
if($course->groupmode != NOGROUPS || !$course->groupmodeforce) {
$allowed->groups = groups_get_all_groups($course->id);
if (has_capability('moodle/site:accessallgroups', $coursecontext)) {
$allowed->groups = groups_get_all_groups($course->id);
} else {
$allowed->groups = groups_get_all_groups($course->id, $USER->id);
}
}
}
}
@@ -2080,24 +2088,22 @@ class calendar_event {
if ($usingeditor) {
switch ($this->properties->eventtype) {
case 'user':
$this->editorcontext = $this->properties->context;
$this->properties->courseid = 0;
$this->properties->course = 0;
$this->properties->groupid = 0;
$this->properties->userid = $USER->id;
break;
case 'site':
$this->editorcontext = $this->properties->context;
$this->properties->courseid = SITEID;
$this->properties->course = SITEID;
$this->properties->groupid = 0;
$this->properties->userid = $USER->id;
break;
case 'course':
$this->editorcontext = $this->properties->context;
$this->properties->groupid = 0;
$this->properties->userid = $USER->id;
break;
case 'group':
$this->editorcontext = $this->properties->context;
$this->properties->userid = $USER->id;
break;
default:
@@ -2107,6 +2113,13 @@ class calendar_event {
break;
}
// If we are actually using the editor, we recalculate the context because some default values
// were set when calculate_context() was called from the constructor.
if ($usingeditor) {
$this->properties->context = $this->calculate_context($this->properties);
$this->editorcontext = $this->properties->context;
}
$editor = $this->properties->description;
$this->properties->format = $this->properties->description['format'];
$this->properties->description = $this->properties->description['text'];
@@ -2125,7 +2138,6 @@ class calendar_event {
$this->editoroptions,
$editor['text'],
$this->editoroptions['forcehttps']);
$DB->set_field('event', 'description', $this->properties->description, array('id'=>$this->properties->id));
}
+5 -5
View File
@@ -460,7 +460,7 @@ class core_calendar_renderer extends plugin_renderer_base {
// Paddding (the first week may have blank days in the beginning)
for($i = $display->minwday; $i < $startwday; ++$i) {
$cell = new html_table_cell('&nbsp;');
$cell->attributes = array('class'=>'nottoday');
$cell->attributes = array('class'=>'nottoday dayblank');
$row->cells[] = $cell;
}
@@ -519,10 +519,10 @@ class core_calendar_renderer extends plugin_renderer_base {
}
// Special visual fx for today
if($display->thismonth && $calendar->day == $calendar->day) {
$cellclasses[] = 'today';
if ($display->thismonth && $calendar->day == $date['mday']) {
$cellclasses[] = 'day today';
} else {
$cellclasses[] = 'nottoday';
$cellclasses[] = 'day nottoday';
}
$cell->attributes = array('class'=>join(' ',$cellclasses));
@@ -553,7 +553,7 @@ class core_calendar_renderer extends plugin_renderer_base {
// Paddding (the last week may have blank days at the end)
for($i = $dayweek; $i <= $display->maxwday; ++$i) {
$cell = new html_table_cell('&nbsp;');
$cell->attributes = array('class'=>'nottoday');
$cell->attributes = array('class'=>'nottoday dayblank');
$row->cells[] = $cell;
}
$table->data[] = $row;
+2
View File
@@ -24,6 +24,8 @@ YUI.add('moodle-calendar-eventmanager', function(Y) {
this.publish('hideevent');
td.on('mouseenter', this.startShow, this);
td.on('mouseleave', this.startHide, this);
td.on('focus', this.startShow, this);
td.on('blur', this.startHide, this);
return true;
},
initPanel : function() {
+2 -2
View File
@@ -70,8 +70,8 @@ echo $OUTPUT->heading(get_string('assignto', 'cohort', format_string($cohort->na
echo $OUTPUT->notification(get_string('removeuserwarning', 'core_cohort'));
// Get the user_selector we will need.
$potentialuserselector = new cohort_candidate_selector('addselect', array('cohortid'=>$cohort->id));
$existinguserselector = new cohort_existing_selector('removeselect', array('cohortid'=>$cohort->id));
$potentialuserselector = new cohort_candidate_selector('addselect', array('cohortid'=>$cohort->id, 'accesscontext'=>$context));
$existinguserselector = new cohort_existing_selector('removeselect', array('cohortid'=>$cohort->id, 'accesscontext'=>$context));
// Process incoming user assignments to the cohort
+2 -2
View File
@@ -126,7 +126,7 @@ function cohort_delete_category($category) {
}
/**
* Remove cohort member
* Add cohort member
* @param int $cohortid
* @param int $userid
* @return void
@@ -143,7 +143,7 @@ function cohort_add_member($cohortid, $userid) {
}
/**
* Add cohort member
* Remove cohort member
* @param int $cohortid
* @param int $userid
* @return void
+14 -8
View File
@@ -184,7 +184,7 @@ bodyContent: '<div class="comment-delete-confirm"><a href="#" id="confirmdelete-
val = val.replace('___name___', list[i].fullname);
}
if (list[i]['delete']||newcmt) {
list[i].content = '<div class="comment-delete"><a href="#" id ="comment-delete-'+this.client_id+'-'+list[i].id+'" title="'+M.str.moodle.deletecomment+'"><img src="'+M.util.image_url('t/delete', 'core')+'" /></a></div>' + list[i].content;
list[i].content = '<div class="comment-delete"><a href="#" id ="comment-delete-'+this.client_id+'-'+list[i].id+'" title="'+M.str.moodle.deletecomment+'"><img alt="" src="'+M.util.image_url('t/delete', 'core')+'" /></a></div>' + list[i].content;
}
val = val.replace('___time___', list[i].time);
val = val.replace('___picture___', list[i].avatar);
@@ -309,16 +309,16 @@ bodyContent: '<div class="comment-delete-confirm"><a href="#" id="confirmdelete-
CommentHelper.confirmoverlay.set('xy', [e.pageX-width-5, e.pageY]);
CommentHelper.confirmoverlay.set('visible', true);
Y.one('#canceldelete-'+scope.client_id).on('click', function(e) {
e.preventDefault();
e.preventDefault();
scope.cancel_delete();
});
Y.Event.purgeElement('#confirmdelete-'+scope.client_id, false, 'click');
Y.one('#confirmdelete-'+scope.client_id).on('click', function(e) {
e.preventDefault();
if (commentid[1]) {
scope.dodelete(commentid[1]);
}
});
e.preventDefault();
if (commentid[1]) {
scope.dodelete(commentid[1]);
}
});
}, scope, node);
}
);
@@ -361,7 +361,13 @@ bodyContent: '<div class="comment-delete-confirm"><a href="#" id="confirmdelete-
} else {
// hide
container.setStyle('display', 'none');
img.set('src', M.util.image_url('t/collapsed', 'core'));
var collapsedimage = 't/collapsed'; // ltr mode
if ( Y.one(document.body).hasClass('dir-rtl') ) {
collapsedimage = 't/collapsed_rtl';
} else {
collapsedimage = 't/collapsed';
}
img.set('src', M.util.image_url(collapsedimage, 'core'));
if (ta) {
ta.set('value','');
}
+1 -1
View File
@@ -38,7 +38,7 @@ $action = optional_param('action', '', PARAM_ALPHA);
$area = optional_param('area', '', PARAM_AREA);
$content = optional_param('content', '', PARAM_RAW);
$itemid = optional_param('itemid', '', PARAM_INT);
$returnurl = optional_param('returnurl', '/', PARAM_URL);
$returnurl = optional_param('returnurl', '/', PARAM_LOCALURL);
$component = optional_param('component', '', PARAM_COMPONENT);
// Currently this script can only add comments
+7 -1
View File
@@ -422,8 +422,14 @@ class comment {
if ($this->displaytotalcount) {
$countstring = '('.$this->count().')';
}
$collapsedimage= 't/collapsed';
if (right_to_left()) {
$collapsedimage= 't/collapsed_rtl';
} else {
$collapsedimage= 't/collapsed';
}
$html .= html_writer::start_tag('a', array('class' => 'comment-link', 'id' => 'comment-link-'.$this->cid, 'href' => '#'));
$html .= html_writer::empty_tag('img', array('id' => 'comment-img-'.$this->cid, 'src' => $OUTPUT->pix_url('t/collapsed'), 'alt' => $this->linktext, 'title' => $this->linktext));
$html .= html_writer::empty_tag('img', array('id' => 'comment-img-'.$this->cid, 'src' => $OUTPUT->pix_url($collapsedimage), 'alt' => $this->linktext, 'title' => $this->linktext));
$html .= html_writer::tag('span', $this->linktext.' '.$countstring, array('id' => 'comment-link-text-'.$this->cid));
$html .= html_writer::end_tag('a');
}
+1 -1
View File
@@ -94,7 +94,7 @@ class comment_manager {
*/
private function setup_course($courseid) {
global $PAGE, $DB;
if (!empty($this->course)) {
if (!empty($this->course) && $this->course->id == $courseid) {
// already set, stop
return;
}
+6
View File
@@ -0,0 +1,6 @@
{
"require-dev": {
"phpunit/phpunit": "3.7.*",
"phpunit/dbUnit": "1.2.*"
}
}
+19 -4
View File
@@ -27,10 +27,10 @@
require_once("../config.php");
require_once($CFG->dirroot.'/course/lib.php');
require_once($CFG->libdir.'/textlib.class.php');
$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);
@@ -40,6 +40,16 @@ $moveto = optional_param('moveto', 0, PARAM_INT);
$resort = optional_param('resort', 0, PARAM_BOOL);
$sesskey = optional_param('sesskey', '', PARAM_RAW);
// MDL-27824 - This is a temporary fix until we have the proper
// way to check/initialize $CFG value.
// @todo MDL-35138 remove this temporary solution
if (!empty($CFG->coursesperpage)) {
$defaultperpage = $CFG->coursesperpage;
} else {
$defaultperpage = 20;
}
$perpage = optional_param('perpage', $defaultperpage, PARAM_INT); // how many per page
if (empty($id)) {
print_error("unknowcategory");
}
@@ -75,7 +85,8 @@ $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')) {
if ($courses = get_courses($category->id, '', 'c.id,c.fullname,c.sortorder')) {
collatorlib::asort_objects_by_property($courses, 'fullname', collatorlib::SORT_NATURAL);
$i = 1;
foreach ($courses as $course) {
$DB->set_field('course', 'sortorder', $category->sortorder+$i, array('id'=>$course->id));
@@ -180,6 +191,7 @@ 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');
navigation_node::override_active_url(new moodle_url('/course/category.php', array('id' => $id)));
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
@@ -423,8 +435,11 @@ if (!$courses) {
$movetocategories[$category->id] = get_string('moveselectedcoursesto');
echo '<tr><td colspan="3" align="right">';
echo html_writer::label(get_string('moveselectedcoursesto'), 'movetoid', false, array('class' => 'accesshide'));
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 html_writer::select($movetocategories, 'moveto', $category->id, null, array('id'=>'movetoid', 'class' => 'autosubmit'));
$PAGE->requires->yui_module('moodle-core-formautosubmit',
'M.core.init_formautosubmit',
array(array('selectid' => 'movetoid', 'nothing' => $category->id))
);
echo '<input type="hidden" name="id" value="'.$category->id.'" />';
echo '</td></tr>';
}
+18
View File
@@ -445,6 +445,7 @@ M.course_dndupload = {
a: document.createElement('a'),
icon: document.createElement('img'),
namespan: document.createElement('span'),
groupingspan: document.createElement('span'),
progressouter: document.createElement('span'),
progress: document.createElement('span')
};
@@ -469,6 +470,9 @@ M.course_dndupload = {
resel.div.appendChild(document.createTextNode(' '));
resel.groupingspan.className = 'groupinglabel';
resel.div.appendChild(resel.groupingspan);
resel.progressouter.className = 'dndupload-progress-outer';
resel.progress.className = 'dndupload-progress-inner';
resel.progress.innerHTML = '&nbsp;';
@@ -724,6 +728,13 @@ M.course_dndupload = {
resel.icon.src = result.icon;
resel.a.href = result.link;
resel.namespan.innerHTML = result.name;
if (result.groupingname) {
resel.groupingspan.innerHTML = '(' + result.groupingname + ')';
} else {
resel.div.removeChild(resel.groupingspan);
}
resel.div.removeChild(resel.progressouter);
resel.li.id = result.elementid;
resel.div.innerHTML += result.commands;
@@ -904,6 +915,13 @@ M.course_dndupload = {
resel.icon.src = result.icon;
resel.a.href = result.link;
resel.namespan.innerHTML = result.name;
if (result.groupingname) {
resel.groupingspan.innerHTML = '(' + result.groupingname + ')';
} else {
resel.div.removeChild(resel.groupingspan);
}
resel.div.removeChild(resel.progressouter);
resel.li.id = result.elementid;
resel.div.innerHTML += result.commands;
+15
View File
@@ -555,6 +555,15 @@ class dndupload_ajax_processor {
$this->cm->groupmode = $this->course->groupmode;
$this->cm->groupingid = $this->course->defaultgroupingid;
// Set the correct default for completion tracking.
$this->cm->completion = COMPLETION_TRACKING_NONE;
$completion = new completion_info($this->course);
if ($completion->is_enabled()) {
if (plugin_supports('mod', $this->cm->modulename, FEATURE_MODEDIT_DEFAULT_COMPLETION, true)) {
$this->cm->completion = COMPLETION_TRACKING_MANUAL;
}
}
if (!$this->cm->id = add_course_module($this->cm)) {
throw new coding_exception("Unable to create the course module");
}
@@ -667,6 +676,12 @@ class dndupload_ajax_processor {
$resp->commands = make_editing_buttons($mod, true, true, 0, $mod->sectionnum);
$resp->onclick = $mod->get_on_click();
// if using groupings, then display grouping name
if (!empty($mod->groupingid) && has_capability('moodle/course:managegroups', $this->context)) {
$groupings = groups_get_all_groupings($this->course->id);
$resp->groupingname = format_string($groupings[$mod->groupingid]->name);
}
echo $OUTPUT->header();
echo json_encode($resp);
die();
+5 -3
View File
@@ -32,7 +32,11 @@ $categoryid = optional_param('category', 0, PARAM_INT); // course category - can
$returnto = optional_param('returnto', 0, PARAM_ALPHANUM); // generic navigation return page switch
$PAGE->set_pagelayout('admin');
$PAGE->set_url('/course/edit.php');
$pageparams = array('id'=>$id);
if (empty($id)) {
$pageparams = array('category'=>$categoryid);
}
$PAGE->set_url('/course/edit.php', $pageparams);
// basic access control checks
if ($id) { // editing course
@@ -46,7 +50,6 @@ if ($id) { // editing course
$category = $DB->get_record('course_categories', array('id'=>$course->category), '*', MUST_EXIST);
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
require_capability('moodle/course:update', $coursecontext);
$PAGE->url->param('id',$id);
} else if ($categoryid) { // creating new course in this category
$course = null;
@@ -54,7 +57,6 @@ if ($id) { // editing course
$category = $DB->get_record('course_categories', array('id'=>$categoryid), '*', MUST_EXIST);
$catcontext = get_context_instance(CONTEXT_COURSECAT, $category->id);
require_capability('moodle/course:create', $catcontext);
$PAGE->url->param('category',$categoryid);
$PAGE->set_context($catcontext);
} else {
+10 -2
View File
@@ -126,7 +126,11 @@ class course_edit_form extends moodleform {
$mform->addHelpButton('coursedisplay', 'coursedisplay');
$mform->setDefault('coursedisplay', $courseconfig->coursedisplay);
for ($i = 0; $i <= $courseconfig->maxsections; $i++) {
$max = $courseconfig->maxsections;
if (!isset($max) || !is_numeric($max)) {
$max = 52;
}
for ($i = 0; $i <= $max; $i++) {
$sectionmenu[$i] = "$i";
}
$mform->addElement('select', 'numsections', get_string('numberweeks'), $sectionmenu);
@@ -156,7 +160,11 @@ class course_edit_form extends moodleform {
$mform->addHelpButton('showreports', 'showreports');
$mform->setDefault('showreports', $courseconfig->showreports);
$choices = get_max_upload_sizes($CFG->maxbytes);
// Handle non-existing $course->maxbytes on course creation.
$coursemaxbytes = !isset($course->maxbytes) ? null : $course->maxbytes;
// Let's prepare the maxbytes popup.
$choices = get_max_upload_sizes($CFG->maxbytes, 0, 0, $coursemaxbytes);
$mform->addElement('select', 'maxbytes', get_string('maximumupload'), $choices);
$mform->addHelpButton('maxbytes', 'maximumupload');
$mform->setDefault('maxbytes', $courseconfig->maxbytes);
+1 -1
View File
@@ -78,7 +78,7 @@ if ($mform->is_cancelled()){
if (!empty($CFG->enableavailability)) {
$section->availablefrom = $data->availablefrom;
$section->availableuntil = $data->availableuntil;
if (!empty($data->groupingid)) {
if (isset($data->groupingid)) {
$section->groupingid = $data->groupingid;
}
$section->showavailability = $data->showavailability;
+6 -6
View File
@@ -212,7 +212,7 @@ class core_course_external extends external_api {
array(
'id' => new external_value(PARAM_INT, 'activity id'),
'url' => new external_value(PARAM_URL, 'activity url', VALUE_OPTIONAL),
'name' => new external_value(PARAM_TEXT, 'activity module name'),
'name' => new external_value(PARAM_RAW, 'activity module name'),
'description' => new external_value(PARAM_RAW, 'activity description', VALUE_OPTIONAL),
'visible' => new external_value(PARAM_INT, 'is the module visible', VALUE_OPTIONAL),
'modicon' => new external_value(PARAM_URL, 'activity icon url'),
@@ -285,7 +285,7 @@ class core_course_external extends external_api {
array('options' => $options));
//retrieve courses
if (!key_exists('ids', $params['options'])
if (!array_key_exists('ids', $params['options'])
or empty($params['options']['ids'])) {
$courses = $DB->get_records('course');
} else {
@@ -523,12 +523,12 @@ class core_course_external extends external_api {
require_capability('moodle/course:create', $context);
// Make sure lang is valid
if (key_exists('lang', $course) and empty($availablelangs[$course['lang']])) {
if (array_key_exists('lang', $course) and empty($availablelangs[$course['lang']])) {
throw new moodle_exception('errorinvalidparam', 'webservice', '', 'lang');
}
// Make sure theme is valid
if (key_exists('forcetheme', $course)) {
if (array_key_exists('forcetheme', $course)) {
if (!empty($CFG->allowcoursethemes)) {
if (empty($availablethemes[$course['forcetheme']])) {
throw new moodle_exception('errorinvalidparam', 'webservice', '', 'forcetheme');
@@ -547,10 +547,10 @@ class core_course_external extends external_api {
//set default value for completion
$courseconfig = get_config('moodlecourse');
if (completion_info::is_enabled_for_site()) {
if (!key_exists('enablecompletion', $course)) {
if (!array_key_exists('enablecompletion', $course)) {
$course['enablecompletion'] = $courseconfig->enablecompletion;
}
if (!key_exists('completionstartonenrol', $course)) {
if (!array_key_exists('completionstartonenrol', $course)) {
$course['completionstartonenrol'] = $courseconfig->completionstartonenrol;
}
} else {
+15 -13
View File
@@ -65,8 +65,9 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
*/
public function section_title($section, $course) {
$title = get_section_name($course, $section);
if ($section->section != 0 && $course->coursedisplay == COURSE_DISPLAY_MULTIPAGE) {
$title = html_writer::link(course_get_url($course, $section->section), $title);
$url = course_get_url($course, $section->section, array('navigation' => true));
if ($url) {
$title = html_writer::link($url, $title);
}
return $title;
}
@@ -125,7 +126,7 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
* @param int $sectionreturn The section to return to after an action
* @return string HTML to output.
*/
protected function section_header($section, $course, $onsectionpage, $sectionreturn=0) {
protected function section_header($section, $course, $onsectionpage, $sectionreturn=null) {
global $PAGE;
$o = '';
@@ -168,7 +169,8 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
if ($PAGE->user_is_editing() && has_capability('moodle/course:update', $context)) {
$url = new moodle_url('/course/editsection.php', array('id'=>$section->id, 'sr'=>$sectionreturn));
$o.= html_writer::link($url,
html_writer::empty_tag('img', array('src' => $this->output->pix_url('t/edit'), 'class' => 'iconsmall edit')),
html_writer::empty_tag('img', array('src' => $this->output->pix_url('t/edit'),
'class' => 'iconsmall edit', 'alt' => get_string('edit'))),
array('title' => get_string('editsummary')));
}
$o.= html_writer::end_tag('div');
@@ -413,7 +415,7 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
* @param int $sectionno The section number in the coruse which is being dsiplayed
* @return string HTML to output.
*/
protected function course_activity_clipboard($course, $sectionno = 0) {
protected function course_activity_clipboard($course, $sectionno = null) {
global $USER;
$o = '';
@@ -642,7 +644,7 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
echo $this->output->heading($this->page_title(), 2, 'accesshide');
// Copy activity clipboard..
echo $this->course_activity_clipboard($course);
echo $this->course_activity_clipboard($course, 0);
// Now the list of sections..
echo $this->start_section_list();
@@ -651,10 +653,10 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
$thissection = $sections[0];
unset($sections[0]);
if ($thissection->summary or $thissection->sequence or $PAGE->user_is_editing()) {
echo $this->section_header($thissection, $course, false);
print_section($course, $thissection, $mods, $modnamesused, true);
echo $this->section_header($thissection, $course, false, 0);
print_section($course, $thissection, $mods, $modnamesused, true, "100%", false, 0);
if ($PAGE->user_is_editing()) {
print_section_add_menus($course, 0, $modnames);
print_section_add_menus($course, 0, $modnames, false, false, 0);
}
echo $this->section_footer();
}
@@ -693,11 +695,11 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
// Display section summary only.
echo $this->section_summary($thissection, $course, $mods);
} else {
echo $this->section_header($thissection, $course, false);
echo $this->section_header($thissection, $course, false, 0);
if ($thissection->uservisible) {
print_section($course, $thissection, $mods, $modnamesused);
print_section($course, $thissection, $mods, $modnamesused, true, "100%", false, 0);
if ($PAGE->user_is_editing()) {
print_section_add_menus($course, $section, $modnames);
print_section_add_menus($course, $section, $modnames, false, false, 0);
}
}
echo $this->section_footer();
@@ -714,7 +716,7 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
continue;
}
echo $this->stealth_section_header($section);
print_section($course, $thissection, $mods, $modnamesused);
print_section($course, $thissection, $mods, $modnamesused, true, "100%", false, $displaysection);
echo $this->stealth_section_footer();
}
+1 -1
View File
@@ -36,7 +36,7 @@ M.course.format.get_config = function() {
M.course.format.swap_sections = function(Y, node1, node2) {
var CSS = {
COURSECONTENT : 'course-content',
SECTIONADDMENUS : 'section_add_menus',
SECTIONADDMENUS : 'section_add_menus'
};
var sectionlist = Y.Node.all('.'+CSS.COURSECONTENT+' '+M.course.format.get_section_selector(Y));
+1 -1
View File
@@ -254,7 +254,7 @@ $parentlist = array();
$displaylist[0] = get_string('top');
make_categories_list($displaylist, $parentlist);
echo '<table class="generalbox editcourse boxaligncenter"><tr class="header">';
echo '<table class="generaltable editcourse boxaligncenter"><tr class="header">';
echo '<th class="header" scope="col">'.$strcategories.'</th>';
echo '<th class="header" scope="col">'.$strcourses.'</th>';
echo '<th class="header" scope="col">'.$stredit.'</th>';
+110 -60
View File
@@ -531,7 +531,7 @@ function print_mnet_log($hostid, $course, $user=0, $date=0, $order="l.time ASC",
function print_log_csv($course, $user, $date, $order='l.time DESC', $modname,
$modid, $modaction, $groupid) {
global $DB;
global $DB, $CFG;
$text = get_string('course')."\t".get_string('time')."\t".get_string('ip_address')."\t".
get_string('fullnameuser')."\t".get_string('action')."\t".get_string('info');
@@ -583,7 +583,7 @@ function print_log_csv($course, $user, $date, $order='l.time DESC', $modname,
$ld = $DB->get_record('log_display', array('module'=>$log->module, 'action'=>$log->action));
$ldcache[$log->module][$log->action] = $ld;
}
if ($ld && !empty($log->info)) {
if ($ld && is_numeric($log->info)) {
// ugly hack to make sure fullname is shown correctly
if (($ld->mtable == 'user') and ($ld->field == $DB->sql_concat('firstname', "' '" , 'lastname'))) {
$log->info = fullname($DB->get_record($ld->mtable, array('id'=>$log->info)), true);
@@ -600,6 +600,8 @@ function print_log_csv($course, $user, $date, $order='l.time DESC', $modname,
$firstField = format_string($courses[$log->course], true, array('context' => $coursecontext));
$fullname = fullname($log, has_capability('moodle/site:viewfullnames', $coursecontext));
$row = array($firstField, userdate($log->time, $strftimedatetime), $log->ip, $fullname, $log->module.' '.$log->action, $log->info);
$actionurl = $CFG->wwwroot. make_log_url($log->module,$log->url);
$row = array($firstField, userdate($log->time, $strftimedatetime), $log->ip, $fullname, $log->module.' '.$log->action.' ('.$actionurl.')', $log->info);
$text = implode("\t", $row);
echo $text." \n";
}
@@ -653,7 +655,7 @@ function print_log_xls($course, $user, $date, $order='l.time DESC', $modname,
// Creating worksheets
for ($wsnumber = 1; $wsnumber <= $nroPages; $wsnumber++) {
$sheettitle = get_string('logs').' '.$wsnumber.'-'.$nroPages;
$worksheet[$wsnumber] =& $workbook->add_worksheet($sheettitle);
$worksheet[$wsnumber] = $workbook->add_worksheet($sheettitle);
$worksheet[$wsnumber]->set_column(1, 1, 30);
$worksheet[$wsnumber]->write_string(0, 0, get_string('savedat').
userdate(time(), $strftimedatetime));
@@ -682,7 +684,7 @@ function print_log_xls($course, $user, $date, $order='l.time DESC', $modname,
$ld = $DB->get_record('log_display', array('module'=>$log->module, 'action'=>$log->action));
$ldcache[$log->module][$log->action] = $ld;
}
if ($ld && !empty($log->info)) {
if ($ld && is_numeric($log->info)) {
// ugly hack to make sure fullname is shown correctly
if (($ld->mtable == 'user') and ($ld->field == $DB->sql_concat('firstname', "' '" , 'lastname'))) {
$log->info = fullname($DB->get_record($ld->mtable, array('id'=>$log->info)), true);
@@ -710,7 +712,8 @@ function print_log_xls($course, $user, $date, $order='l.time DESC', $modname,
$myxls->write($row, 2, $log->ip, '');
$fullname = fullname($log, has_capability('moodle/site:viewfullnames', $coursecontext));
$myxls->write($row, 3, $fullname, '');
$myxls->write($row, 4, $log->module.' '.$log->action, '');
$actionurl = $CFG->wwwroot. make_log_url($log->module,$log->url);
$myxls->write($row, 4, $log->module.' '.$log->action.' ('.$actionurl.')', '');
$myxls->write($row, 5, $log->info, '');
$row++;
@@ -766,7 +769,7 @@ function print_log_ods($course, $user, $date, $order='l.time DESC', $modname,
// Creating worksheets
for ($wsnumber = 1; $wsnumber <= $nroPages; $wsnumber++) {
$sheettitle = get_string('logs').' '.$wsnumber.'-'.$nroPages;
$worksheet[$wsnumber] =& $workbook->add_worksheet($sheettitle);
$worksheet[$wsnumber] = $workbook->add_worksheet($sheettitle);
$worksheet[$wsnumber]->set_column(1, 1, 30);
$worksheet[$wsnumber]->write_string(0, 0, get_string('savedat').
userdate(time(), $strftimedatetime));
@@ -795,7 +798,7 @@ function print_log_ods($course, $user, $date, $order='l.time DESC', $modname,
$ld = $DB->get_record('log_display', array('module'=>$log->module, 'action'=>$log->action));
$ldcache[$log->module][$log->action] = $ld;
}
if ($ld && !empty($log->info)) {
if ($ld && is_numeric($log->info)) {
// ugly hack to make sure fullname is shown correctly
if (($ld->mtable == 'user') and ($ld->field == $DB->sql_concat('firstname', "' '" , 'lastname'))) {
$log->info = fullname($DB->get_record($ld->mtable, array('id'=>$log->info)), true);
@@ -823,7 +826,8 @@ function print_log_ods($course, $user, $date, $order='l.time DESC', $modname,
$myxls->write_string($row, 2, $log->ip);
$fullname = fullname($log, has_capability('moodle/site:viewfullnames', $coursecontext));
$myxls->write_string($row, 3, $fullname);
$myxls->write_string($row, 4, $log->module.' '.$log->action);
$actionurl = $CFG->wwwroot. make_log_url($log->module,$log->url);
$myxls->write_string($row, 4, $log->module.' '.$log->action.' ('.$actionurl.')');
$myxls->write_string($row, 5, $log->info);
$row++;
@@ -1384,7 +1388,7 @@ function get_print_section_cm_text(cm_info $cm, $course) {
* @param int $sectionreturn The section to return to
* @return void
*/
function print_section($course, $section, $mods, $modnamesused, $absolute=false, $width="100%", $hidecompletion=false, $sectionreturn=0) {
function print_section($course, $section, $mods, $modnamesused, $absolute=false, $width="100%", $hidecompletion=false, $sectionreturn=null) {
global $CFG, $USER, $DB, $PAGE, $OUTPUT;
static $initialised;
@@ -1480,15 +1484,16 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
$modcontext = context_module::instance($mod->id);
$canviewhidden = has_capability('moodle/course:viewhiddenactivities', $modcontext);
$accessiblebutdim = false;
$conditionalhidden = false;
if ($canviewhidden) {
$accessiblebutdim = !$mod->visible;
if (!empty($CFG->enableavailability)) {
$accessiblebutdim = $accessiblebutdim ||
$mod->availablefrom > time() ||
$conditionalhidden = $mod->availablefrom > time() ||
($mod->availableuntil && $mod->availableuntil < time()) ||
count($mod->conditionsgrade) > 0 ||
count($mod->conditionscompletion) > 0;
}
$accessiblebutdim = $conditionalhidden || $accessiblebutdim;
}
$liclasses = array();
@@ -1546,6 +1551,10 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
if ($accessiblebutdim) {
$linkclasses .= ' dimmed';
$textclasses .= ' dimmed_text';
if ($conditionalhidden) {
$linkclasses .= ' conditionalhidden';
$textclasses .= ' conditionalhidden';
}
$accesstext = '<span class="accesshide">'.
get_string('hiddenfromstudents').': </span>';
} else {
@@ -1572,8 +1581,7 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
// Display link itself
echo '<a ' . $linkcss . $mod->extra . $onclick .
' href="' . $url . '"><img src="' . $mod->get_icon_url() .
'" class="activityicon" alt="' .
$modulename . '" /> ' .
'" class="activityicon" alt="' . $modulename . '" /> ' .
$accesstext . '<span class="instancename">' .
$instancename . $altname . '</span></a>';
@@ -1608,9 +1616,7 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
// Display greyed-out text of link
echo '<div ' . $textcss . $mod->extra .
' >' . '<img src="' . $mod->get_icon_url() .
'" class="activityicon" alt="' .
$modulename .
'" /> <span>'. $instancename . $altname .
'" class="activityicon" alt="" /> <span>'. $instancename . $altname .
'</span></div>';
// Do not display content after link when it is greyed out like this.
@@ -1704,14 +1710,25 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
} else {
$extraclass = '';
}
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' />
</div></form>";
echo html_writer::start_tag('form', array(
'class' => 'togglecompletion' . $extraclass,
'method' => 'post',
'action' => $CFG->wwwroot . '/course/togglecompletion.php'));
echo html_writer::start_tag('div');
echo html_writer::empty_tag('input', array(
'type' => 'hidden', 'name' => 'id', 'value' => $mod->id));
echo html_writer::empty_tag('input', array(
'type' => 'hidden', 'name' => 'modulename',
'value' => $mod->name));
echo html_writer::empty_tag('input', array(
'type' => 'hidden', 'name' => 'sesskey', 'value' => sesskey()));
echo html_writer::empty_tag('input', array(
'type' => 'hidden', 'name' => 'completionstate',
'value' => $newstate));
echo html_writer::empty_tag('input', array(
'type' => 'image', 'src' => $imgsrc, 'alt' => $imgalt, 'title' => $imgtitle));
echo html_writer::end_tag('div');
echo html_writer::end_tag('form');
} else {
// In auto mode, or when editing, the icon is just an image
echo "<span class='autocompletion'>";
@@ -1730,14 +1747,21 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
// see the activity itself, or for staff)
if (!$mod->uservisible) {
echo '<div class="availabilityinfo">'.$mod->availableinfo.'</div>';
} else if ($canviewhidden && !empty($CFG->enableavailability) && $mod->visible) {
$ci = new condition_info($mod);
$fullinfo = $ci->get_full_information();
if($fullinfo) {
echo '<div class="availabilityinfo">'.get_string($mod->showavailability
? 'userrestriction_visible'
: 'userrestriction_hidden','condition',
$fullinfo).'</div>';
} else if ($canviewhidden && !empty($CFG->enableavailability)) {
// Don't add availability information if user is not editing and activity is hidden.
if ($mod->visible || $PAGE->user_is_editing()) {
$hidinfoclass = '';
if (!$mod->visible) {
$hidinfoclass = 'hide';
}
$ci = new condition_info($mod);
$fullinfo = $ci->get_full_information();
if($fullinfo) {
echo '<div class="availabilityinfo '.$hidinfoclass.'">'.get_string($mod->showavailability
? 'userrestriction_visible'
: 'userrestriction_hidden','condition',
$fullinfo).'</div>';
}
}
}
@@ -1765,14 +1789,14 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
* Prints the menus to add activities and resources.
*
* @param stdClass $course The course
* @param stdClass $section The section
* @param int $section relative section number (field course_sections.section)
* @param array $modnames An array containing the list of modules and their names
* @param bool $vertical Vertical orientation
* @param bool $return Return the menus or send them to output
* @param int $sectionreturn The section to link back to
* @return void|string depending on $return
*/
function print_section_add_menus($course, $section, $modnames, $vertical=false, $return=false, $sectionreturn=0) {
function print_section_add_menus($course, $section, $modnames, $vertical=false, $return=false, $sectionreturn=null) {
global $CFG, $OUTPUT;
// check to see if user can add menus
@@ -1781,7 +1805,7 @@ function print_section_add_menus($course, $section, $modnames, $vertical=false,
}
// Retrieve all modules with associated metadata
$modules = get_module_metadata($course, $modnames);
$modules = get_module_metadata($course, $modnames, $sectionreturn);
// We'll sort resources and activities into two lists
$resources = array();
@@ -1859,7 +1883,7 @@ function print_section_add_menus($course, $section, $modnames, $vertical=false,
// The module chooser link
$modchooser = html_writer::start_tag('div', array('class' => 'mdl-right'));
$modchooser.= html_writer::start_tag('div', array('class' => 'section-modchooser'));
$icon = $OUTPUT->pix_icon('t/add', $straddeither);
$icon = $OUTPUT->pix_icon('t/add', '');
$span = html_writer::tag('span', $straddeither, array('class' => 'section-modchooser-text'));
$modchooser .= html_writer::tag('span', $icon . $span, array('class' => 'section-modchooser-link'));
$modchooser.= html_writer::end_tag('div');
@@ -1871,8 +1895,9 @@ function print_section_add_menus($course, $section, $modnames, $vertical=false,
$output = html_writer::tag('div', $output, array('class' => 'hiddenifjs addresourcedropdown'));
$modchooser = html_writer::tag('div', $modchooser, array('class' => 'visibleifjs addresourcemodchooser'));
} else {
$output = html_writer::tag('div', $output, array('class' => 'visibleifjs addresourcedropdown'));
$modchooser = html_writer::tag('div', $modchooser, array('class' => 'hiddenifjs addresourcemodchooser'));
// If the module chooser is disabled, we need to ensure that the dropdowns are shown even if javascript is disabled
$output = html_writer::tag('div', $output, array('class' => 'show addresourcedropdown'));
$modchooser = html_writer::tag('div', $modchooser, array('class' => 'hide addresourcemodchooser'));
}
$output = $modchooser . $output;
}
@@ -1894,7 +1919,7 @@ function print_section_add_menus($course, $section, $modnames, $vertical=false,
* @return array A list of stdClass objects containing metadata about each
* module
*/
function get_module_metadata($course, $modnames, $sectionreturn = 0) {
function get_module_metadata($course, $modnames, $sectionreturn = null) {
global $CFG, $OUTPUT;
// get_module_metadata will be called once per section on the page and courses may show
@@ -1910,7 +1935,7 @@ function get_module_metadata($course, $modnames, $sectionreturn = 0) {
if (!course_allowed_module($course, $modname)) {
continue;
}
if (isset($modlist[$modname])) {
if (isset($modlist[$course->id][$modname])) {
// This module is already cached
$return[$modname] = $modlist[$course->id][$modname];
continue;
@@ -1969,7 +1994,7 @@ function get_module_metadata($course, $modnames, $sectionreturn = 0) {
if ($sm->string_exists('modulename_link', $modname)) { // Link to further info in Moodle docs
$link = get_string('modulename_link', $modname);
$linktext = get_string('morehelp');
$module->help .= html_writer::tag('div', $OUTPUT->doc_link($link, $linktext), array('class' => 'helpdoclink'));
$module->help .= html_writer::tag('div', $OUTPUT->doc_link($link, $linktext, true), array('class' => 'helpdoclink'));
}
}
$module->archetype = plugin_supports('mod', $modname, FEATURE_MOD_ARCHETYPE, MOD_ARCHETYPE_OTHER);
@@ -3153,7 +3178,7 @@ function moveto_module($mod, $section, $beforemod=NULL) {
* @param int $section The section to link back to
* @return string XHTML for the editing buttons
*/
function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $moveselect = true, $indent=-1, $section=-1) {
function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $moveselect = true, $indent=-1, $section=null) {
global $CFG, $OUTPUT, $COURSE;
static $str;
@@ -3195,7 +3220,7 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
$baseurl = new moodle_url('/course/mod.php', array('sesskey' => sesskey()));
if ($section >= 0) {
if ($section !== null) {
$baseurl->param('sr', $section);
}
$actions = array();
@@ -3204,7 +3229,7 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
if ($mod->modname !== 'label' && $hasmanageactivities && course_ajax_enabled($COURSE)) {
$actions[] = new action_link(
new moodle_url($baseurl, array('update' => $mod->id)),
new pix_icon('t/editstring', $str->edittitle, 'moodle', array('class' => 'iconsmall visibleifjs')),
new pix_icon('t/editstring', $str->edittitle, 'moodle', array('class' => 'iconsmall visibleifjs', 'title' => '')),
null,
array('class' => 'editing_title', 'title' => $str->edittitle)
);
@@ -3223,7 +3248,7 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
if ($indent > 0) {
$actions[] = new action_link(
new moodle_url($baseurl, array('id' => $mod->id, 'indent' => '-1')),
new pix_icon($leftarrow, $str->moveleft, 'moodle', array('class' => 'iconsmall')),
new pix_icon($leftarrow, $str->moveleft, 'moodle', array('class' => 'iconsmall', 'title' => '')),
null,
array('class' => 'editing_moveleft', 'title' => $str->moveleft)
);
@@ -3231,7 +3256,7 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
if ($indent >= 0) {
$actions[] = new action_link(
new moodle_url($baseurl, array('id' => $mod->id, 'indent' => '1')),
new pix_icon($rightarrow, $str->moveright, 'moodle', array('class' => 'iconsmall')),
new pix_icon($rightarrow, $str->moveright, 'moodle', array('class' => 'iconsmall', 'title' => '')),
null,
array('class' => 'editing_moveright', 'title' => $str->moveright)
);
@@ -3243,20 +3268,20 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
if ($moveselect) {
$actions[] = new action_link(
new moodle_url($baseurl, array('copy' => $mod->id)),
new pix_icon('t/move', $str->move, 'moodle', array('class' => 'iconsmall')),
new pix_icon('t/move', $str->move, 'moodle', array('class' => 'iconsmall', 'title' => '')),
null,
array('class' => 'editing_move', 'title' => $str->move)
);
} else {
$actions[] = new action_link(
new moodle_url($baseurl, array('id' => $mod->id, 'move' => '-1')),
new pix_icon('t/up', $str->moveup, 'moodle', array('class' => 'iconsmall')),
new pix_icon('t/up', $str->moveup, 'moodle', array('class' => 'iconsmall', 'title' => '')),
null,
array('class' => 'editing_moveup', 'title' => $str->moveup)
);
$actions[] = new action_link(
new moodle_url($baseurl, array('id' => $mod->id, 'move' => '1')),
new pix_icon('t/down', $str->movedown, 'moodle', array('class' => 'iconsmall')),
new pix_icon('t/down', $str->movedown, 'moodle', array('class' => 'iconsmall', 'title' => '')),
null,
array('class' => 'editing_movedown', 'title' => $str->movedown)
);
@@ -3267,7 +3292,7 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
if ($hasmanageactivities) {
$actions[] = new action_link(
new moodle_url($baseurl, array('update' => $mod->id)),
new pix_icon('t/edit', $str->update, 'moodle', array('class' => 'iconsmall')),
new pix_icon('t/edit', $str->update, 'moodle', array('class' => 'iconsmall', 'title' => '')),
null,
array('class' => 'editing_update', 'title' => $str->update)
);
@@ -3277,7 +3302,7 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
if (has_all_capabilities($dupecaps, $coursecontext) && plugin_supports('mod', $mod->modname, FEATURE_BACKUP_MOODLE2)) {
$actions[] = new action_link(
new moodle_url($baseurl, array('duplicate' => $mod->id)),
new pix_icon('t/copy', $str->duplicate, 'moodle', array('class' => 'iconsmall')),
new pix_icon('t/copy', $str->duplicate, 'moodle', array('class' => 'iconsmall', 'title' => '')),
null,
array('class' => 'editing_duplicate', 'title' => $str->duplicate)
);
@@ -3287,7 +3312,7 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
if ($hasmanageactivities) {
$actions[] = new action_link(
new moodle_url($baseurl, array('delete' => $mod->id)),
new pix_icon('t/delete', $str->delete, 'moodle', array('class' => 'iconsmall')),
new pix_icon('t/delete', $str->delete, 'moodle', array('class' => 'iconsmall', 'title' => '')),
null,
array('class' => 'editing_delete', 'title' => $str->delete)
);
@@ -3298,14 +3323,14 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
if ($mod->visible) {
$actions[] = new action_link(
new moodle_url($baseurl, array('hide' => $mod->id)),
new pix_icon('t/hide', $str->hide, 'moodle', array('class' => 'iconsmall')),
new pix_icon('t/hide', $str->hide, 'moodle', array('class' => 'iconsmall', 'title' => '')),
null,
array('class' => 'editing_hide', 'title' => $str->hide)
);
} else {
$actions[] = new action_link(
new moodle_url($baseurl, array('show' => $mod->id)),
new pix_icon('t/show', $str->show, 'moodle', array('class' => 'iconsmall')),
new pix_icon('t/show', $str->show, 'moodle', array('class' => 'iconsmall', 'title' => '')),
null,
array('class' => 'editing_show', 'title' => $str->show)
);
@@ -3336,7 +3361,7 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
if ($mod->groupmodelink) {
$actions[] = new action_link(
new moodle_url($baseurl, array('id' => $mod->id, 'groupmode' => $groupmode)),
new pix_icon($groupimage, $grouptitle, 'moodle', array('class' => 'iconsmall')),
new pix_icon($groupimage, $grouptitle, 'moodle', array('class' => 'iconsmall', 'title' => '')),
null,
array('class' => $groupclass, 'title' => $grouptitle)
);
@@ -3349,7 +3374,7 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
if (has_capability('moodle/role:assign', $modcontext)){
$actions[] = new action_link(
new moodle_url('/'.$CFG->admin.'/roles/assign.php', array('contextid' => $modcontext->id)),
new pix_icon('i/roles', $str->assign, 'moodle', array('class' => 'iconsmall')),
new pix_icon('i/roles', $str->assign, 'moodle', array('class' => 'iconsmall', 'title' => '')),
null,
array('class' => 'editing_assign', 'title' => $str->assign)
);
@@ -4531,6 +4556,7 @@ function include_course_ajax($course, $usedmodules = array(), $enabledmodules =
'courseid' => $course->id,
'pagetype' => $PAGE->pagetype,
'pagelayout' => $PAGE->pagelayout,
'subpage' => $PAGE->subpage,
'regions' => $PAGE->blocks->get_regions(),
);
$PAGE->requires->yui_module('moodle-core-blocks', 'M.core_blocks.init_dragdrop', array($params), null, true);
@@ -4573,7 +4599,7 @@ function include_course_ajax($course, $usedmodules = array(), $enabledmodules =
// Add the module chooser
$PAGE->requires->yui_module('moodle-course-modchooser',
'M.course.init_chooser',
array(array('courseid' => $course->id))
array(array('courseid' => $course->id, 'closeButtonTitle' => get_string('close', 'editor')))
);
$PAGE->requires->strings_for_js(array(
'addresourceoractivity',
@@ -4589,15 +4615,39 @@ function include_course_ajax($course, $usedmodules = array(), $enabledmodules =
*
* @param stdClass $course The course to get the section name for
* @param int $sectionno The section number to return a link to
* if omitted the course view page is returned
* @param array $options options for view URL. At the moment core uses:
* 'navigation' (bool) if true and section has no separate page, the function returns null
* 'sr' (int) used by multipage formats to specify to which section to return
* @return moodle_url The url of course
*/
function course_get_url($course, $sectionno = null) {
function course_get_url($course, $sectionno = null, $options = array()) {
if ($course->id == SITEID) {
return new moodle_url('/');
}
$url = new moodle_url('/course/view.php', array('id' => $course->id));
if (!is_null($sectionno)) {
if ($course->coursedisplay == COURSE_DISPLAY_MULTIPAGE) {
$sr = null;
if (array_key_exists('sr', $options)) {
$sr = $options['sr'];
}
if ($sectionno !== null) {
if ($sr !== null) {
if ($sr) {
$usercoursedisplay = COURSE_DISPLAY_MULTIPAGE;
$sectionno = $sr;
} else {
$usercoursedisplay = COURSE_DISPLAY_SINGLEPAGE;
}
} else {
$usercoursedisplay = $course->coursedisplay;
}
if ($sectionno != 0 && $usercoursedisplay == COURSE_DISPLAY_MULTIPAGE) {
$url->param('section', $sectionno);
} else {
if (!empty($options['navigation'])) {
return null;
}
$url->set_anchor('section-'.$sectionno);
}
}
+14 -34
View File
@@ -26,7 +26,7 @@
require("../config.php");
require_once("lib.php");
$sectionreturn = optional_param('sr', 0, PARAM_INT);
$sectionreturn = optional_param('sr', null, PARAM_INT);
$add = optional_param('add', '', PARAM_ALPHA);
$type = optional_param('type', '', PARAM_ALPHA);
$indent = optional_param('indent', 0, PARAM_INT);
@@ -50,9 +50,7 @@ foreach (compact('indent','update','hide','show','copy','moveto','movetosection'
$url->param($key, $value);
}
}
if ($sectionreturn) {
$url->param('sr', $sectionreturn);
}
$url->param('sr', $sectionreturn);
if ($add !== '') {
$url->param('add', $add);
}
@@ -109,7 +107,7 @@ if (!empty($add)) {
get_string('continue'),
'post'),
new single_button(
course_get_url($course, $sectionreturn),
course_get_url($course, $cm->sectionnum, array('sr' => $sectionreturn)),
get_string('cancel'),
'get')
);
@@ -126,7 +124,7 @@ if (!empty($add)) {
$modcontext = get_context_instance(CONTEXT_MODULE, $cm->id);
require_capability('moodle/course:manageactivities', $modcontext);
$return = course_get_url($course, $sectionreturn);
$return = course_get_url($course, $cm->sectionnum, array('sr' => $sectionreturn));
if (!$confirm or !confirm_sesskey()) {
$fullmodulename = get_string('modulename', $cm->modname);
@@ -234,11 +232,7 @@ if ((!empty($movetosection) or !empty($moveto)) and confirm_sesskey()) {
rebuild_course_cache($section->course);
if (SITEID == $section->course) {
redirect($CFG->wwwroot);
} else {
redirect(course_get_url($course, $sectionreturn));
}
redirect(course_get_url($course, $section->section, array('sr' => $sectionreturn)));
} else if (!empty($indent) and confirm_sesskey()) {
$id = required_param('id', PARAM_INT);
@@ -261,11 +255,7 @@ if ((!empty($movetosection) or !empty($moveto)) and confirm_sesskey()) {
rebuild_course_cache($cm->course);
if (SITEID == $cm->course) {
redirect($CFG->wwwroot);
} else {
redirect(course_get_url($course, $sectionreturn));
}
redirect(course_get_url($course, $cm->sectionnum, array('sr' => $sectionreturn)));
} else if (!empty($hide) and confirm_sesskey()) {
$cm = get_coursemodule_from_id('', $hide, 0, true, MUST_EXIST);
@@ -280,11 +270,7 @@ if ((!empty($movetosection) or !empty($moveto)) and confirm_sesskey()) {
rebuild_course_cache($cm->course);
if (SITEID == $cm->course) {
redirect($CFG->wwwroot);
} else {
redirect(course_get_url($course, $sectionreturn));
}
redirect(course_get_url($course, $cm->sectionnum, array('sr' => $sectionreturn)));
} else if (!empty($show) and confirm_sesskey()) {
$cm = get_coursemodule_from_id('', $show, 0, true, MUST_EXIST);
@@ -304,11 +290,7 @@ if ((!empty($movetosection) or !empty($moveto)) and confirm_sesskey()) {
rebuild_course_cache($cm->course);
}
if (SITEID == $cm->course) {
redirect($CFG->wwwroot);
} else {
redirect(course_get_url($course, $sectionreturn));
}
redirect(course_get_url($course, $section->section, array('sr' => $sectionreturn)));
} else if ($groupmode > -1 and confirm_sesskey()) {
$id = required_param('id', PARAM_INT);
@@ -325,11 +307,7 @@ if ((!empty($movetosection) or !empty($moveto)) and confirm_sesskey()) {
rebuild_course_cache($cm->course);
if (SITEID == $cm->course) {
redirect($CFG->wwwroot);
} else {
redirect(course_get_url($course, $sectionreturn));
}
redirect(course_get_url($course, $cm->sectionnum, array('sr' => $sectionreturn)));
} else if (!empty($copy) and confirm_sesskey()) { // value = course module
$cm = get_coursemodule_from_id('', $copy, 0, true, MUST_EXIST);
@@ -347,18 +325,20 @@ if ((!empty($movetosection) or !empty($moveto)) and confirm_sesskey()) {
$USER->activitycopyname = $cm->name;
$USER->activitycopysectionreturn = $sectionreturn;
redirect(course_get_url($course, $sectionreturn));
redirect(course_get_url($course, $section->section, array('sr' => $sectionreturn)));
} else if (!empty($cancelcopy) and confirm_sesskey()) { // value = course module
$courseid = $USER->activitycopycourse;
$course = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST);
$cm = get_coursemodule_from_id('', $USER->activitycopy, 0, true, IGNORE_MISSING);
$sectionreturn = $USER->activitycopysectionreturn;
unset($USER->activitycopy);
unset($USER->activitycopycourse);
unset($USER->activitycopyname);
redirect(course_get_url($course, $sectionreturn));
unset($USER->activitycopysectionreturn);
redirect(course_get_url($course, $cm->sectionnum, array('sr' => $sectionreturn)));
} else {
print_error('unknowaction');
}
+8 -7
View File
@@ -34,7 +34,7 @@ require_once($CFG->libdir . '/filelib.php');
$cmid = required_param('cmid', PARAM_INT);
$courseid = required_param('course', PARAM_INT);
$sectionreturn = optional_param('sr', 0, PARAM_INT);
$sectionreturn = optional_param('sr', null, PARAM_INT);
$course = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST);
$cm = get_coursemodule_from_id('', $cmid, $course->id, true, MUST_EXIST);
@@ -61,8 +61,8 @@ $a->modtype = get_string('modulename', $cm->modname);
$a->modname = format_string($cm->name);
if (!plugin_supports('mod', $cm->modname, FEATURE_BACKUP_MOODLE2)) {
$url = new moodle_url('/course/view.php#section-' . $cm->sectionnum, array('id' => $course->id));
print_error('duplicatenosupport', 'core', $url, $a);
$url = course_get_url($course, $cm->sectionnum, array('sr' => $sectionreturn));
print_error('duplicatenosupport', 'error', $url, $a);
}
// backup the activity
@@ -91,7 +91,8 @@ if (!$rc->execute_precheck()) {
echo $output->header();
echo $output->precheck_notices($precheckresults);
echo $output->continue_button(new moodle_url('/course/view.php', array('id' => $course->id)));
$url = course_get_url($course, $cm->sectionnum, array('sr' => $sectionreturn));
echo $output->continue_button($url);
echo $output->footer();
die();
}
@@ -133,18 +134,18 @@ if ($newcmid) {
echo $output->confirm(
get_string('duplicatesuccess', 'core', $a),
new single_button(
new moodle_url('/course/modedit.php', array('update' => $newcmid)),
new moodle_url('/course/modedit.php', array('update' => $newcmid, 'sr' => $sectionreturn)),
get_string('duplicatecontedit'),
'get'),
new single_button(
course_get_url($course, $sectionreturn),
course_get_url($course, $cm->sectionnum, array('sr' => $sectionreturn)),
get_string('duplicatecontcourse'),
'get')
);
} else {
echo $output->notification(get_string('duplicatesuccess', 'core', $a), 'notifysuccess');
echo $output->continue_button(course_get_url($course, $sectionreturn));
echo $output->continue_button(course_get_url($course, $cm->sectionnum, array('sr' => $sectionreturn)));
}
echo $output->footer();
+3 -3
View File
@@ -35,7 +35,7 @@ $add = optional_param('add', '', PARAM_ALPHA); // module name
$update = optional_param('update', 0, PARAM_INT);
$return = optional_param('return', 0, PARAM_BOOL); //return to course/view.php if false or mod/modname/view.php if true
$type = optional_param('type', '', PARAM_ALPHANUM); //TODO: hopefully will be removed in 2.0
$sectionreturn = optional_param('sr', 0, PARAM_INT);
$sectionreturn = optional_param('sr', null, PARAM_INT);
$url = new moodle_url('/course/modedit.php');
$url->param('sr', $sectionreturn);
@@ -264,7 +264,7 @@ if ($mform->is_cancelled()) {
if ($return && !empty($cm->id)) {
redirect("$CFG->wwwroot/mod/$module->name/view.php?id=$cm->id");
} else {
redirect(course_get_url($course, $sectionreturn));
redirect(course_get_url($course, $cw->section, array('sr' => $sectionreturn)));
}
} else if ($fromform = $mform->get_data()) {
if (empty($fromform->coursemodule)) {
@@ -633,7 +633,7 @@ if ($mform->is_cancelled()) {
redirect($gradingman->get_management_url($returnurl));
}
} else {
redirect(course_get_url($course, $sectionreturn));
redirect(course_get_url($course, $cw->section, array('sr' => $sectionreturn)));
}
exit;
+1 -1
View File
@@ -78,7 +78,7 @@ if ($backup->get_stage() !== backup_ui::STAGE_COMPLETE) {
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('publishcourseon', 'hub', !empty($hubname)?$hubname:$huburl), 3, 'main');
if ($backup->enforce_changed_dependencies()) {
echo $renderer->dependency_notification(get_string('dependenciesenforced', 'backup'));
debugging('Your settings have been altered due to unmet dependencies', DEBUG_DEVELOPER);
}
echo $renderer->progress_bar($backup->get_progress_bar());
echo $backup->display($renderer);
+3
View File
@@ -99,6 +99,9 @@ class recent_form extends moodleform {
$mform->addElement('select', 'user', get_string('participants'), $options);
$mform->setAdvanced('user');
} else {
// Default to no user.
$mform->addElement('hidden', 'user', 0);
}
$options = array(''=>get_string('allactivities'));
+10 -6
View File
@@ -123,6 +123,7 @@ class core_course_renderer extends plugin_renderer_base {
if ($hascourses) {
$content .= html_writer::start_tag('div', array('class'=>'courses'));
$coursecount = 0;
$strinfo = new lang_string('info');
foreach ($category->courses as $course) {
$classes = array('course');
$linkclass = 'course_link';
@@ -143,8 +144,9 @@ class core_course_renderer extends plugin_renderer_base {
}
if ($course->summary) {
$url = new moodle_url('/course/info.php', array('id' => $course->id));
$image = html_writer::empty_tag('img', array('src'=>$this->output->pix_url('i/info'), 'alt'=>$this->strings->summary));
$content .= html_writer::link(new moodle_url('/course/info.php', array('id'=>$course->id)), $image, array('title'=>$this->strings->summary));
$content .= $this->action_link($url, $image, new popup_action('click', $url, 'courseinfo'), array('title' => $this->strings->summary));
}
$content .= html_writer::end_tag('div');
$content .= html_writer::end_tag('div');
@@ -188,17 +190,19 @@ class core_course_renderer extends plugin_renderer_base {
// Put all options into one tag 'alloptions' to allow us to handle scrolling
$formcontent .= html_writer::start_tag('div', array('class' => 'alloptions'));
// Activities
$activities = array_filter($modules,
create_function('$mod', 'return ($mod->archetype !== MOD_CLASS_RESOURCE);'));
// Activities
$activities = array_filter($modules, function($mod) {
return ($mod->archetype !== MOD_ARCHETYPE_RESOURCE && $mod->archetype !== MOD_ARCHETYPE_SYSTEM);
});
if (count($activities)) {
$formcontent .= $this->course_modchooser_title('activities');
$formcontent .= $this->course_modchooser_module_types($activities);
}
// Resources
$resources = array_filter($modules,
create_function('$mod', 'return ($mod->archetype === MOD_CLASS_RESOURCE);'));
$resources = array_filter($modules, function($mod) {
return ($mod->archetype === MOD_ARCHETYPE_RESOURCE);
});
if (count($resources)) {
$formcontent .= $this->course_modchooser_title('resources');
$formcontent .= $this->course_modchooser_module_types($resources);
+8 -1
View File
@@ -150,6 +150,7 @@ switch($requestmethod) {
break;
case 'updatetitle':
require_capability('moodle/course:manageactivities', $modcontext);
require_once($CFG->libdir . '/gradelib.php');
$cm = get_coursemodule_from_id('', $id, 0, false, MUST_EXIST);
$module = new stdClass();
$module->id = $cm->instance;
@@ -167,10 +168,16 @@ switch($requestmethod) {
$module->name = $cm->name;
}
// Attempt to update the grade item if relevant
$grademodule = $DB->get_record($cm->modname, array('id' => $cm->instance));
$grademodule->cmidnumber = $cm->idnumber;
$grademodule->modname = $cm->modname;
grade_update_mod_grades($grademodule);
// We need to return strings after they've been through filters for multilang
$stringoptions = new stdClass;
$stringoptions->context = $coursecontext;
echo json_encode(array('instancename' => format_string($module->name, true, $stringoptions)));
echo json_encode(array('instancename' => html_entity_decode(format_string($module->name, true, $stringoptions))));
break;
}
rebuild_course_cache($course->id);
+22 -22
View File
@@ -175,13 +175,11 @@ if (!empty($moveto) and $data = data_submitted() and confirm_sesskey()) { // S
if (!empty($blocklist) and confirm_sesskey()) {
$blockname = $DB->get_field('block', 'name', array('id' => $blocklist));
$courses = array();
$courses = $DB->get_records_sql("
SELECT * FROM {course} WHERE id IN (
SELECT DISTINCT ctx.instanceid
FROM {context} ctx
JOIN {block_instances} bi ON bi.parentcontextid = ctx.id
WHERE ctx.contextlevel = " . CONTEXT_COURSE . " AND bi.blockname = ?)",
array($blockname));
list($select, $join) = context_instance_preload_sql('c.id', CONTEXT_COURSE, 'ctx');
$sql = "SELECT c.* $select FROM {course} c
$join JOIN {block_instances} bi ON bi.parentcontextid = ctx.id
WHERE bi.blockname = ?";
$courses = $DB->get_records_sql($sql, array($blockname));
$totalcount = count($courses);
// Keep only chunk of array which you want to display
if ($totalcount > $perpage) {
@@ -193,26 +191,24 @@ if (!empty($blocklist) 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";
$courseids = $DB->get_records_sql($sql);
list($select, $join) = context_instance_preload_sql('c.id', CONTEXT_COURSE, 'ctx');
$sql = "SELECT c.* $select FROM {course} c $join
WHERE c.id IN (SELECT DISTINCT cc.id FROM {".$modulelist."} module, {course} cc
WHERE module.course = cc.id)";
$courselist = $DB->get_records_sql($sql);
$courses = array();
if (!empty($courseids)) {
if (!empty($courselist)) {
$firstcourse = $page*$perpage;
$lastcourse = $page*$perpage + $perpage -1;
$i = 0;
foreach ($courseids as $courseid) {
foreach ($courselist as $course) {
if ($i >= $firstcourse && $i <= $lastcourse) {
$courses[$courseid->id] = $DB->get_record('course', array('id'=> $courseid->id));
$courses[$course->id] = $course;
}
$i++;
}
$totalcount = count($courseids);
}
else {
$totalcount = 0;
}
$totalcount = count($courselist);
} else if (!empty($searchterm)) {
// Donot do search for empty search request.
$courses = get_courses_search($searchterms, "fullname ASC", $page, $perpage, $totalcount);
@@ -294,6 +290,7 @@ if ($courses) {
foreach ($courses as $course) {
context_helper::preload_from_record($course);
$coursecontext = context_course::instance($course->id);
$linkcss = $course->visible ? "" : " class=\"dimmed\" ";
@@ -313,7 +310,7 @@ if ($courses) {
echo "<tr>\n";
echo "<td><a $linkcss href=\"view.php?id=$course->id\">"
. highlight($search, format_string($course->fullname)) . "</a></td>\n";
. highlight($search, $coursecontext->get_context_name(false)) . "</a></td>\n";
echo "<td>".$displaylist[$course->category]."</td>\n";
echo "<td>\n";
@@ -378,8 +375,11 @@ if ($courses) {
echo "<input type=\"button\" onclick=\"checknone()\" value=\"$strdeselectall\" />\n";
// Select box should only show categories in which user has min capability to move course.
echo html_writer::label(get_string('moveselectedcoursesto'), 'movetoid', false, array('class' => 'accesshide'));
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 html_writer::select($usercatlist, 'moveto', '', array(''=>get_string('moveselectedcoursesto')), array('id'=>'movetoid', 'class' => 'autosubmit'));
$PAGE->requires->yui_module('moodle-core-formautosubmit',
'M.core.init_formautosubmit',
array(array('selectid' => 'movetoid', 'nothing' => false))
);
echo "</td>\n</tr>\n";
echo "</table>\n</form>";
@@ -432,4 +432,4 @@ function print_navigation_bar($totalcount, $page, $perpage, $encodedsearch, $mod
echo "<a href=\"search.php?search=$encodedsearch".$modulelink."&amp;perpage=".$defaultperpage."\">".get_string("showperpage", "", $defaultperpage)."</a>";
echo "</p></center>";
}
}
}
+2 -2
View File
@@ -35,7 +35,7 @@ require_once($CFG->dirroot.'/course/lib.php');
$id = required_param('id', PARAM_INT);
$switchrole = optional_param('switchrole',-1, PARAM_INT);
$returnurl = optional_param('returnurl', false, PARAM_URL);
$returnurl = optional_param('returnurl', false, PARAM_LOCALURL);
$PAGE->set_url('/course/switchrole.php', array('id'=>$id));
@@ -86,4 +86,4 @@ if ($returnurl === false) {
$returnurl = new moodle_url('/course/view.php', array('id' => $course->id));
}
redirect($returnurl);
redirect($returnurl);
+1 -1
View File
@@ -36,7 +36,7 @@ class courselib_testcase extends advanced_testcase {
$course = $this->getDataGenerator()->create_course(array('numsections'=>10), array('createsections'=>true));
$oldsections = array();
$sections = array();
foreach ($DB->get_records('course_sections', array('course'=>$course->id)) as $section) {
foreach ($DB->get_records('course_sections', array('course'=>$course->id), 'id') as $section) {
$oldsections[$section->section] = $section->id;
$sections[$section->id] = $section->section;
}
+46 -32
View File
@@ -165,20 +165,28 @@ class core_course_external_testcase extends externallib_advanced_testcase {
global $DB;
$this->resetAfterTest(true);
$generatedcats = array();
$category1data['idnumber'] = 'idnumbercat1';
$category1data['name'] = 'Category 1 for PHPunit test';
$category1data['description'] = 'Category 1 description';
$category1data['descriptionformat'] = FORMAT_MOODLE;
$category1 = self::getDataGenerator()->create_category($category1data);
$generatedcats[$category1->id] = $category1;
$category2 = self::getDataGenerator()->create_category(
array('parent' => $category1->id));
$generatedcats[$category2->id] = $category2;
$category6 = self::getDataGenerator()->create_category(
array('parent' => $category1->id, 'visible' => 0));
$generatedcats[$category6->id] = $category6;
$category3 = self::getDataGenerator()->create_category();
$generatedcats[$category3->id] = $category3;
$category4 = self::getDataGenerator()->create_category(
array('parent' => $category3->id));
$generatedcats[$category4->id] = $category4;
$category5 = self::getDataGenerator()->create_category(
array('parent' => $category4->id));
$generatedcats[$category5->id] = $category5;
// Set the required capabilities by the external function.
$context = context_system::instance();
@@ -193,11 +201,13 @@ class core_course_external_testcase extends externallib_advanced_testcase {
$this->assertEquals(2, count($categories));
// Check the return values
$this->assertEquals($categories[0]['id'], $category1->id);
$this->assertEquals($categories[0]['idnumber'], $category1->idnumber);
$this->assertEquals($categories[0]['name'], $category1->name);
$this->assertEquals($categories[0]['description'], $category1->description);
$this->assertEquals($categories[0]['descriptionformat'], FORMAT_HTML);
foreach ($categories as $category) {
$generatedcat = $generatedcats[$category['id']];
$this->assertEquals($category['idnumber'], $generatedcat->idnumber);
$this->assertEquals($category['name'], $generatedcat->name);
$this->assertEquals($category['description'], $generatedcat->description);
$this->assertEquals($category['descriptionformat'], FORMAT_HTML);
}
// Check different params.
$categories = core_course_external::get_categories(array(
@@ -440,13 +450,17 @@ class core_course_external_testcase extends externallib_advanced_testcase {
$this->resetAfterTest(true);
$generatedcourses = array();
$coursedata['idnumber'] = 'idnumbercourse1';
$coursedata['fullname'] = 'Course 1 for PHPunit test';
$coursedata['summary'] = 'Course 1 description';
$coursedata['summaryformat'] = FORMAT_MOODLE;
$course1 = self::getDataGenerator()->create_course($coursedata);
$generatedcourses[$course1->id] = $course1;
$course2 = self::getDataGenerator()->create_course();
$generatedcourses[$course2->id] = $course2;
$course3 = self::getDataGenerator()->create_course();
$generatedcourses[$course3->id] = $course3;
// Set the required capabilities by the external function.
$context = context_system::instance();
@@ -464,33 +478,33 @@ class core_course_external_testcase extends externallib_advanced_testcase {
// Check we retrieve the good total number of categories.
$this->assertEquals(2, count($courses));
// Check the return values for course 1
$dbcourse = $DB->get_record('course', array('id' => $course1->id));
$this->assertEquals($courses[0]['id'], $dbcourse->id);
$this->assertEquals($courses[0]['idnumber'], $coursedata['idnumber']);
$this->assertEquals($courses[0]['fullname'], $coursedata['fullname']);
$this->assertEquals($courses[0]['summary'], $coursedata['summary']);
$this->assertEquals($courses[0]['summaryformat'], FORMAT_HTML);
$this->assertEquals($courses[0]['shortname'], $dbcourse->shortname);
$this->assertEquals($courses[0]['categoryid'], $dbcourse->category);
$this->assertEquals($courses[0]['format'], $dbcourse->format);
$this->assertEquals($courses[0]['showgrades'], $dbcourse->showgrades);
$this->assertEquals($courses[0]['newsitems'], $dbcourse->newsitems);
$this->assertEquals($courses[0]['startdate'], $dbcourse->startdate);
$this->assertEquals($courses[0]['numsections'], $dbcourse->numsections);
$this->assertEquals($courses[0]['maxbytes'], $dbcourse->maxbytes);
$this->assertEquals($courses[0]['showreports'], $dbcourse->showreports);
$this->assertEquals($courses[0]['visible'], $dbcourse->visible);
$this->assertEquals($courses[0]['hiddensections'], $dbcourse->hiddensections);
$this->assertEquals($courses[0]['groupmode'], $dbcourse->groupmode);
$this->assertEquals($courses[0]['groupmodeforce'], $dbcourse->groupmodeforce);
$this->assertEquals($courses[0]['defaultgroupingid'], $dbcourse->defaultgroupingid);
$this->assertEquals($courses[0]['completionnotify'], $dbcourse->completionnotify);
$this->assertEquals($courses[0]['lang'], $dbcourse->lang);
$this->assertEquals($courses[0]['forcetheme'], $dbcourse->theme);
$this->assertEquals($courses[0]['completionstartonenrol'], $dbcourse->completionstartonenrol);
$this->assertEquals($courses[0]['enablecompletion'], $dbcourse->enablecompletion);
$this->assertEquals($courses[0]['completionstartonenrol'], $dbcourse->completionstartonenrol);
foreach ($courses as $course) {
$dbcourse = $generatedcourses[$course['id']];
$this->assertEquals($course['idnumber'], $dbcourse->idnumber);
$this->assertEquals($course['fullname'], $dbcourse->fullname);
$this->assertEquals($course['summary'], $dbcourse->summary);
$this->assertEquals($course['summaryformat'], FORMAT_HTML);
$this->assertEquals($course['shortname'], $dbcourse->shortname);
$this->assertEquals($course['categoryid'], $dbcourse->category);
$this->assertEquals($course['format'], $dbcourse->format);
$this->assertEquals($course['showgrades'], $dbcourse->showgrades);
$this->assertEquals($course['newsitems'], $dbcourse->newsitems);
$this->assertEquals($course['startdate'], $dbcourse->startdate);
$this->assertEquals($course['numsections'], $dbcourse->numsections);
$this->assertEquals($course['maxbytes'], $dbcourse->maxbytes);
$this->assertEquals($course['showreports'], $dbcourse->showreports);
$this->assertEquals($course['visible'], $dbcourse->visible);
$this->assertEquals($course['hiddensections'], $dbcourse->hiddensections);
$this->assertEquals($course['groupmode'], $dbcourse->groupmode);
$this->assertEquals($course['groupmodeforce'], $dbcourse->groupmodeforce);
$this->assertEquals($course['defaultgroupingid'], $dbcourse->defaultgroupingid);
$this->assertEquals($course['completionnotify'], $dbcourse->completionnotify);
$this->assertEquals($course['lang'], $dbcourse->lang);
$this->assertEquals($course['forcetheme'], $dbcourse->theme);
$this->assertEquals($course['completionstartonenrol'], $dbcourse->completionstartonenrol);
$this->assertEquals($course['enablecompletion'], $dbcourse->enablecompletion);
$this->assertEquals($course['completionstartonenrol'], $dbcourse->completionstartonenrol);
}
// Get all courses in the DB
$courses = core_course_external::get_courses(array());
+5
View File
@@ -20,6 +20,7 @@
$marker = optional_param('marker',-1 , PARAM_INT);
$switchrole = optional_param('switchrole',-1, PARAM_INT);
$modchooser = optional_param('modchooser', -1, PARAM_BOOL);
$return = optional_param('return', 0, PARAM_LOCALURL);
$params = array();
if (!empty($name)) {
@@ -139,6 +140,8 @@
// Redirect to site root if Editing is toggled on frontpage
if ($course->id == SITEID) {
redirect($CFG->wwwroot .'/?redirect=0');
} else if (!empty($return)) {
redirect($CFG->wwwroot . $return);
} else {
$url = new moodle_url($PAGE->url, array('notifyeditingon' => 1));
redirect($url);
@@ -152,6 +155,8 @@
// Redirect to site root if Editing is toggled on frontpage
if ($course->id == SITEID) {
redirect($CFG->wwwroot .'/?redirect=0');
} else if (!empty($return)) {
redirect($CFG->wwwroot . $return);
} else {
redirect($PAGE->url);
}
+45 -34
View File
@@ -41,6 +41,26 @@ YUI.add('moodle-course-dragdrop', function(Y) {
if (this.sectionlistselector) {
this.sectionlistselector = '.'+CSS.COURSECONTENT+' '+this.sectionlistselector;
this.setup_for_section(this.sectionlistselector);
// Make each li element in the lists of sections draggable
var nodeselector = this.sectionlistselector.slice(CSS.COURSECONTENT.length+2);
var del = new Y.DD.Delegate({
container: '.'+CSS.COURSECONTENT,
nodes: nodeselector,
target: true,
handles: ['.'+CSS.LEFT],
dragConfig: {groups: this.groups}
});
del.dd.plug(Y.Plugin.DDProxy, {
// Don't move the node at the end of the drag
moveOnEnd: false
});
del.dd.plug(Y.Plugin.DDConstrained, {
// Keep it inside the .course-content
constrain: '#'+CSS.PAGECONTENT,
stickY: true
});
del.dd.plug(Y.Plugin.DDWinScroll);
}
},
@@ -76,22 +96,6 @@ YUI.add('moodle-course-dragdrop', function(Y) {
if (movedown) {
movedown.remove();
}
// Make each li element in the lists of sections draggable
var dd = new Y.DD.Drag({
node: sectionnode,
// Make each li a Drop target too
groups: this.groups,
target: true,
handles: ['.'+CSS.LEFT]
}).plug(Y.Plugin.DDProxy, {
// Don't move the node at the end of the drag
moveOnEnd: false
}).plug(Y.Plugin.DDConstrained, {
// Keep it inside the .course-content
constrain: '#'+CSS.PAGECONTENT,
stickY: true
}).plug(Y.Plugin.DDWinScroll);
}
}
}, this);
@@ -244,12 +248,33 @@ YUI.add('moodle-course-dragdrop', function(Y) {
this.groups = ['resource'];
this.samenodeclass = CSS.ACTIVITY;
this.parentnodeclass = CSS.SECTION;
this.resourcedraghandle = this.get_drag_handle(M.str.moodle.move, CSS.EDITINGMOVE, CSS.ICONCLASS);
// Go through all sections
var sectionlistselector = M.course.format.get_section_selector(Y);
if (sectionlistselector) {
sectionlistselector = '.'+CSS.COURSECONTENT+' '+sectionlistselector;
this.setup_for_section(sectionlistselector);
// Initialise drag & drop for all resources/activities
var nodeselector = sectionlistselector.slice(CSS.COURSECONTENT.length+2)+' li.'+CSS.ACTIVITY;
var del = new Y.DD.Delegate({
container: '.'+CSS.COURSECONTENT,
nodes: nodeselector,
target: true,
handles: ['.' + CSS.EDITINGMOVE],
dragConfig: {groups: this.groups}
});
del.dd.plug(Y.Plugin.DDProxy, {
// Don't move the node at the end of the drag
moveOnEnd: false
});
del.dd.plug(Y.Plugin.DDConstrained, {
// Keep it inside the .course-content
constrain: '#'+CSS.PAGECONTENT
});
del.dd.plug(Y.Plugin.DDWinScroll);
M.course.coursebase.register_module(this);
M.course.dragres = this;
}
@@ -270,14 +295,14 @@ YUI.add('moodle-course-dragdrop', function(Y) {
resources.addClass(CSS.SECTION);
sectionnode.one('.'+CSS.CONTENT+' div.'+CSS.SUMMARY).insert(resources, 'after');
}
// Define each ul as droptarget, so that item could be moved to empty list
// Define empty ul as droptarget, so that item could be moved to empty list
var tar = new Y.DD.Drop({
node: resources,
groups: this.groups,
padding: '20 0 20 0'
});
// Go through each li element and make them draggable
// Initialise each resource/activity in this section
this.setup_for_resource('#'+sectionnode.get('id')+' li.'+CSS.ACTIVITY);
}, this);
},
@@ -292,21 +317,7 @@ YUI.add('moodle-course-dragdrop', function(Y) {
// Replace move icons
var move = resourcesnode.one('a.'+CSS.EDITINGMOVE);
if (move) {
move.replace(this.get_drag_handle(M.str.moodle.move, CSS.EDITINGMOVE, CSS.ICONCLASS));
// Make each li element in the lists of sections draggable
var dd = new Y.DD.Drag({
node: resourcesnode,
groups: this.groups,
// Make each li a Drop target too
target: true,
handles: ['.' + CSS.EDITINGMOVE]
}).plug(Y.Plugin.DDProxy, {
// Don't move the node at the end of the drag
moveOnEnd: false
}).plug(Y.Plugin.DDConstrained, {
// Keep it inside the .course-content
constrain: '#'+CSS.PAGECONTENT
}).plug(Y.Plugin.DDWinScroll);
move.replace(this.resourcedraghandle.cloneNode(true));
}
}, this);
},
-32
View File
@@ -28,44 +28,12 @@ YUI.add('moodle-course-modchooser', function(Y) {
};
this.setup_chooser_dialogue(dialogue, header, params);
this.jumplink = this.container.one('#jump');
// Initialize existing sections and register for dynamically created sections
this.setup_for_section();
M.course.coursebase.register_module(this);
// Catch the page toggle
Y.all('.block_settings #settingsnav .type_course .modchoosertoggle a').on('click', this.toggle_mod_chooser, this);
// Ensure that help links are opened in an appropriate popup
this.container.all('div.helpdoclink a').on('click', function(e) {
var anchor = e.target.ancestor('a', true);
var args = {
'name' : 'popup',
'url' : anchor.getAttribute('href'),
'option' : ''
};
var options = [
'height=600',
'width=800',
'top=0',
'left=0',
'menubar=0',
'location=0',
'scrollbars',
'resizable',
'toolbar',
'status',
'directories=0',
'fullscreen=0',
'dependent'
]
args.options = options.join(',');
// Note: openpopup is provided by lib/javascript-static.js
openpopup(e, args);
});
},
/**
* Update any section areas within the scope of the specified
+60 -67
View File
@@ -33,7 +33,11 @@ YUI.add('moodle-course-toolboxes', function(Y) {
SECTIONIDPREFIX : 'section-',
SECTIONLI : 'li.section',
SHOW : 'a.editing_show',
SHOWHIDE : 'a.editing_showhide'
SHOWHIDE : 'a.editing_showhide',
CONDITIONALHIDDEN : 'conditionalhidden',
AVAILABILITYINFODIV : 'div.availabilityinfo',
SHOWCLASS : 'editing_show',
HIDECLASS : 'hide'
};
/**
@@ -49,32 +53,9 @@ YUI.add('moodle-course-toolboxes', function(Y) {
Y.extend(TOOLBOX, Y.Base, {
/**
* Replace the button click at the selector with the specified
* callback
*
* @param toolboxtarget The selector of the working area
* @param selector The 'button' to replace
* @param callback The callback to apply
* @param cursor An optional cursor style to apply
* Toggle the visibility and availability for the specified
* resource show/hide button
*/
replace_button : function(toolboxtarget, selector, callback, cursor) {
if (!cursor) {
// Set the default cursor type to pointer to match the
// anchor
cursor = 'pointer';
}
var button = Y.one(toolboxtarget).all(selector)
.setStyle('cursor', cursor);
// on isn't chainable and will return an event
button.on('click', callback, this);
return button;
},
/**
* Toggle the visibility and availability for the specified
* resource show/hide button
*/
toggle_hide_resource_ui : function(button) {
var element = button.ancestor(CSS.ACTIVITYLI);
var hideicon = button.one('img');
@@ -91,27 +72,35 @@ YUI.add('moodle-course-toolboxes', function(Y) {
var status = '';
var value;
if (dimarea.hasClass(toggle_class)) {
if (button.hasClass(CSS.SHOWCLASS)) {
status = 'hide';
value = 1;
} else {
status = 'show';
value = 0;
}
// Change the UI
dimarea.toggleClass(toggle_class);
// We need to toggle dimming on the description too
element.all(CSS.CONTENTAFTERLINK).toggleClass(CSS.DIMMEDTEXT);
// Update button info.
var newstring = M.util.get_string(status, 'moodle');
hideicon.setAttrs({
'alt' : newstring,
'title' : newstring,
'src' : M.util.image_url('t/' + status)
});
button.set('title', newstring);
button.set('className', 'editing_'+status);
// If activity is conditionally hidden, then don't toggle.
if (!dimarea.hasClass(CSS.CONDITIONALHIDDEN)) {
// Change the UI.
dimarea.toggleClass(toggle_class);
// We need to toggle dimming on the description too.
element.all(CSS.CONTENTAFTERLINK).toggleClass(CSS.DIMMEDTEXT);
}
// Toggle availablity info for conditional activities.
var availabilityinfo = element.one(CSS.AVAILABILITYINFODIV);
if (availabilityinfo) {
availabilityinfo.toggleClass(CSS.HIDECLASS);
}
return value;
},
/**
@@ -241,6 +230,17 @@ YUI.add('moodle-course-toolboxes', function(Y) {
initializer : function(config) {
this.setup_for_resource();
M.course.coursebase.register_module(this);
var prefix = CSS.ACTIVITYLI + ' ' + CSS.COMMANDSPAN + ' ';
Y.delegate('click', this.edit_resource_title, CSS.PAGECONTENT, prefix + CSS.EDITTITLE, this);
Y.delegate('click', this.move_left, CSS.PAGECONTENT, prefix + CSS.MOVELEFT, this);
Y.delegate('click', this.move_right, CSS.PAGECONTENT, prefix + CSS.MOVERIGHT, this);
Y.delegate('click', this.delete_resource, CSS.PAGECONTENT, prefix + CSS.DELETE, this);
Y.delegate('click', this.toggle_hide_resource, CSS.PAGECONTENT, prefix + CSS.HIDE, this);
Y.delegate('click', this.toggle_hide_resource, CSS.PAGECONTENT, prefix + CSS.SHOW, this);
Y.delegate('click', this.toggle_groupmode, CSS.PAGECONTENT, prefix + CSS.GROUPSNONE, this);
Y.delegate('click', this.toggle_groupmode, CSS.PAGECONTENT, prefix + CSS.GROUPSSEPARATE, this);
Y.delegate('click', this.toggle_groupmode, CSS.PAGECONTENT, prefix + CSS.GROUPSVISIBLE, this);
},
/**
@@ -252,27 +252,16 @@ YUI.add('moodle-course-toolboxes', function(Y) {
*/
setup_for_resource : function(baseselector) {
if (!baseselector) {
var baseselector = CSS.PAGECONTENT + ' ' + CSS.ACTIVITYLI;;
var baseselector = CSS.PAGECONTENT + ' ' + CSS.ACTIVITYLI;
}
Y.all(baseselector).each(this._setup_for_resource, this);
},
_setup_for_resource : function(toolboxtarget) {
// Edit Title
this.replace_button(toolboxtarget, CSS.COMMANDSPAN + ' ' + CSS.EDITTITLE, this.edit_resource_title);
// Move left and right
this.replace_button(toolboxtarget, CSS.COMMANDSPAN + ' ' + CSS.MOVELEFT, this.move_left);
this.replace_button(toolboxtarget, CSS.COMMANDSPAN + ' ' + CSS.MOVERIGHT, this.move_right);
// Delete
this.replace_button(toolboxtarget, CSS.COMMANDSPAN + ' ' + CSS.DELETE, this.delete_resource);
// Show/Hide
var showhide = this.replace_button(toolboxtarget, CSS.COMMANDSPAN + ' ' + CSS.HIDE, this.toggle_hide_resource);
var shown = this.replace_button(toolboxtarget, CSS.COMMANDSPAN + ' ' + CSS.SHOW, this.toggle_hide_resource);
showhide = showhide.concat(shown);
toolboxtarget = Y.one(toolboxtarget);
// "Disable" show/hide icons (change cursor to not look clickable) if section is hidden
var showhide = toolboxtarget.all(CSS.COMMANDSPAN + ' ' + CSS.HIDE);
showhide.concat(toolboxtarget.all(CSS.COMMANDSPAN + ' ' + CSS.SHOW));
showhide.each(function(node) {
var section = node.ancestor(CSS.SECTIONLI);
if (section && section.hasClass(CSS.SECTIONHIDDENCLASS)) {
@@ -280,15 +269,15 @@ YUI.add('moodle-course-toolboxes', function(Y) {
}
});
// Change Group Mode
// Set groupmode attribute for use by this.toggle_groupmode()
var groups;
groups = this.replace_button(toolboxtarget, CSS.COMMANDSPAN + ' ' + CSS.GROUPSNONE, this.toggle_groupmode);
groups = toolboxtarget.all(CSS.COMMANDSPAN + ' ' + CSS.GROUPSNONE);
groups.setAttribute('groupmode', this.GROUPS_NONE);
groups = this.replace_button(toolboxtarget, CSS.COMMANDSPAN + ' ' + CSS.GROUPSSEPARATE, this.toggle_groupmode);
groups = toolboxtarget.all(CSS.COMMANDSPAN + ' ' + CSS.GROUPSSEPARATE);
groups.setAttribute('groupmode', this.GROUPS_SEPARATE);
groups = this.replace_button(toolboxtarget, CSS.COMMANDSPAN + ' ' + CSS.GROUPSVISIBLE, this.toggle_groupmode);
groups = toolboxtarget.all(CSS.COMMANDSPAN + ' ' + CSS.GROUPSVISIBLE);
groups.setAttribute('groupmode', this.GROUPS_VISIBLE);
},
move_left : function(e) {
@@ -405,6 +394,7 @@ YUI.add('moodle-course-toolboxes', function(Y) {
};
var spinner = M.util.add_spinner(Y, element.one(CSS.SPINNERCOMMANDSPAN));
this.send_request(data, spinner);
return false; // Need to return false to stop the delegate for the new state firing
},
toggle_groupmode : function(e) {
// Prevent the default button action
@@ -446,7 +436,6 @@ YUI.add('moodle-course-toolboxes', function(Y) {
// Change the UI
icon.setAttrs({
'alt' : newtitle,
'title' : newtitle,
'src' : iconsrc
});
button.setAttribute('title', newtitle);
@@ -460,6 +449,7 @@ YUI.add('moodle-course-toolboxes', function(Y) {
};
var spinner = M.util.add_spinner(Y, element.one(CSS.SPINNERCOMMANDSPAN));
this.send_request(data, spinner);
return false; // Need to return false to stop the delegate for the new state firing
},
/**
* Add the moveleft button
@@ -469,11 +459,16 @@ YUI.add('moodle-course-toolboxes', function(Y) {
*/
add_moveleft : function(target) {
var left_string = M.util.get_string('moveleft', 'moodle');
var moveimage = 't/left'; // ltr mode
if ( Y.one(document.body).hasClass('dir-rtl') ) {
moveimage = 't/right';
} else {
moveimage = 't/left';
}
var newicon = Y.Node.create('<img />')
.addClass(CSS.GENERICICONCLASS)
.setAttrs({
'src' : M.util.image_url('t/left', 'moodle'),
'title' : left_string,
'src' : M.util.image_url(moveimage, 'moodle'),
'alt' : left_string
});
var moveright = target.one(CSS.MOVERIGHT);
@@ -484,7 +479,6 @@ YUI.add('moodle-course-toolboxes', function(Y) {
.setAttribute('href', newlink)
.setAttribute('title', left_string);
anchor.appendChild(newicon);
anchor.on('click', this.move_left, this);
moveright.insert(anchor, 'before');
},
/**
@@ -632,6 +626,11 @@ YUI.add('moodle-course-toolboxes', function(Y) {
initializer : function(config) {
this.setup_for_section();
M.course.coursebase.register_module(this);
// Section Highlighting
Y.delegate('click', this.toggle_highlight, CSS.PAGECONTENT, CSS.SECTIONLI + ' ' + CSS.HIGHLIGHT, this);
// Section Visibility
Y.delegate('click', this.toggle_hide_section, CSS.PAGECONTENT, CSS.SECTIONLI + ' ' + CSS.SHOWHIDE, this);
},
/**
* Update any section areas within the scope of the specified
@@ -641,18 +640,15 @@ YUI.add('moodle-course-toolboxes', function(Y) {
* @return void
*/
setup_for_section : function(baseselector) {
if (!baseselector) {
// Left here for potential future use - not currently needed due to YUI delegation in initializer()
/*if (!baseselector) {
var baseselector = CSS.PAGECONTENT;
}
Y.all(baseselector).each(this._setup_for_section, this);
Y.all(baseselector).each(this._setup_for_section, this);*/
},
_setup_for_section : function(toolboxtarget) {
// Section Highlighting
this.replace_button(toolboxtarget, CSS.RIGHTSIDE + ' ' + CSS.HIGHLIGHT, this.toggle_highlight);
// Section Visibility
this.replace_button(toolboxtarget, CSS.RIGHTSIDE + ' ' + CSS.SHOWHIDE, this.toggle_hide_section);
// Left here for potential future use - not currently needed due to YUI delegation in initializer()
},
toggle_hide_section : function(e) {
// Prevent the default button action
@@ -682,7 +678,6 @@ YUI.add('moodle-course-toolboxes', function(Y) {
var newstring = M.util.get_string(status + 'fromothers', 'format_' + this.get('format'));
hideicon.setAttrs({
'alt' : newstring,
'title' : newstring,
'src' : M.util.image_url('i/' + status)
});
button.set('title', newstring);
@@ -740,7 +735,6 @@ YUI.add('moodle-course-toolboxes', function(Y) {
.set('title', old_string);
Y.one(CSS.PAGECONTENT)
.all(M.course.format.get_section_selector(Y) + '.current ' + CSS.HIGHLIGHT + ' img')
.set('title', old_string)
.set('alt', old_string)
.set('src', M.util.image_url('i/marker'));
@@ -756,7 +750,6 @@ YUI.add('moodle-course-toolboxes', function(Y) {
button
.set('title', new_string);
buttonicon
.set('title', new_string)
.set('alt', new_string)
.set('src', M.util.image_url('i/marked'));
}
+3 -98
View File
@@ -3,102 +3,7 @@ ENROLMENT MODULES
(Yes, that's the correct English spelling ;-) )
enrol.class.php contains a simple 'factory' method that
will instantiate your class when called. For an example
of a complete class, take a look at the 'manual' class.
Each plugin is in a subfolder here.
Except for the configuration methods, most methods
defined in the API are optional -- callers will use
method_exists() to determine whether your plugin offers
the functionality they are after.
Mandatory methods
=================
config_form()
process_config()
Login-time methods
==================
Before Moodle 1.7
-----------------
get_student_courses()
get_teacher_courses()
You probably will want to offer at least get_student_courses().
These methods are triggered when a user logs in successfully,
and they are expected to populate $USER->student and
$USER->teacher arrays and maintain (add/delete) entries from
user_students and user_teachers.
These methods are relevant for most plugins, and are the main
interest for plugins that work with a read-only backend such
as LDAP or a database.
Note that with the multi-enrol infrastructure two things have
changed. We now have an 'enrol' field in those tables, and
each plugin must maintain only its own enrolment records.
Conversely, the $USER->student and ->teacher arrays have the
enrolment type as value, like
$USER->student = array ( $courseid => $plugintype );
Moodle 1.7 and later
--------------------
setup_enrolments()
With the advent of roles, there could well not be students and
teachers any more, so enrolment plugins have to be more flexible
about how they map outside data to the internal roles.
This one method should do everything, calling functions from
lib/accesslib.php as necessary to set up relationships.
Interactive enrolment methods
=============================
print_entry()
check_entry()
check_group_entry()
get_access_icons()
These methods are for enrolment plugins that allow for user
driven enrolment. These methods are relevant for plugins
that implement payment gateways (credit card, paypal),
as well as "magic password" schemes.
Only one interactive enrolment method can be active for
a given course. The site default can be set from
Admin->Enrolment, and then individual courses can be
set to specific interactive enrolment methods.
Cron
====
If your class offers a cron() method, it will be invoked by
the standard Moodle cron every time it is called. Note that if the
tasks are not lightweight you must control how frequently they
execute, perhaps offering a config option.
For really heavy cron processing, an alternative is to have
a separate script to be called separately. Currently the LDAP
and DB plugins have external scripts.
Guilty Parties
--------------
Martin Dougiamas and Shane Elliott, Moodle.com
Martin Langhoff and Patrick Li, Catalyst IT
All enrolment modules must extend base class enrol_plugin
which is defined in lib/enrollib.php. You can find documentation
of each method in the base class.
+6 -2
View File
@@ -54,9 +54,9 @@ echo $OUTPUT->header(); // send headers
$manager = new course_enrolment_manager($PAGE, $course);
$outcome = new stdClass;
$outcome = new stdClass();
$outcome->success = true;
$outcome->response = new stdClass;
$outcome->response = new stdClass();
$outcome->error = '';
switch ($action) {
@@ -99,6 +99,10 @@ switch ($action) {
$user->fullname = fullname($user);
unset($user->id);
}
// Chrome will display users in the order of the array keys, so we need
// to ensure that the results ordered array keys. Fortunately, the JavaScript
// does not care what the array keys are. It uses user.id where necessary.
$outcome->response['users'] = array_values($outcome->response['users']);
$outcome->success = true;
break;
default:
+2 -2
View File
@@ -415,8 +415,8 @@ function authorize_print_order($orderid)
}
$a = new stdClass;
$a->upto = $upto;
$extrahtml = get_string('howmuch', 'enrol_authorize') .
' <input type="text" size="5" name="amount" value="'.$amount.'" /> ' .
$extrahtml = '<label for="amount">'.get_string('howmuch', 'enrol_authorize').'</label> ' .
'<input id="amount" type="text" size="5" name="amount" value="'.$amount.'" /> ' .
get_string('canbecredit', 'enrol_authorize', $a) . '<br />';
$table->data[] = array("<b>$strs->confirm:</b>",
authorize_print_action_button($orderid, ORDER_REFUND, 0, true, $authstrs->unenrolstudent, $strs->no, $extrahtml));
+2 -2
View File
@@ -51,8 +51,8 @@ class enrol_cohort_handler {
$sql = "SELECT e.*, r.id as roleexists
FROM {enrol} e
LEFT JOIN {role} r ON (r.id = e.roleid)
WHERE customint1 = :cohortid AND enrol = 'cohort'
ORDER BY id ASC";
WHERE e.customint1 = :cohortid AND e.enrol = 'cohort'
ORDER BY e.id ASC";
if (!$instances = $DB->get_records_sql($sql, array('cohortid'=>$ca->cohortid))) {
return true;
}

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