Compare commits

...

637 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) b7d2ed3004 Moodle release 2.9.2 2015-09-12 02:03:09 +02:00
Eloy Lafuente (stronk7) 14c9b43005 weekly release 2.9.1+ 2015-09-10 11:10:07 +02:00
Eloy Lafuente (stronk7) 60aeac00a5 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-09-10 11:10:02 +02:00
rajesh Taneja 60cab07485 MDL-50516 behat: Back/next button reloads page
When next/back button is pressed in phantomjs/browserkit
it reload page, so adding a bug_phantomjs, so that we can
test the lesson re-attempt scenario
2015-09-10 14:52:14 +08:00
Andrew Nicols 9a386ebbbe Merge branch 'MDL-50852-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2015-09-09 15:38:47 +08:00
Jun Pataleta a259be942b MDL-50852 formslib: Fixed client-side form validation problem.
This patch fixes the problem of client validation being broken when
shortforms is not enabled. This issue is caused by moodle-core-event
module not being loaded and the broadcast parameter in the
Y.Global.publish set to 2 instead of true.
2015-09-09 15:36:31 +08:00
Mark Nelson 20b5f693a5 MDL-50516 mod_lesson: changes to existing behat tests 2015-09-09 15:28:47 +08:00
Mark Nelson a5ff17de21 MDL-50516 mod_lesson: added behat tests 2015-09-09 15:28:46 +08:00
Mark Nelson 73fede1b48 MDL-50516 core_behat: added ability to go back, forward and reload the browser 2015-09-09 15:28:46 +08:00
Mark Nelson 9fd1342692 MDL-50516 mod_lesson: fixed issue with grade not using minquestions
It's possible to reach the end of the lesson, get your result,
click back until you get to the last question, answer it correctly
and then be awarded a result of 100%. This was because the grade
calculation would only include the questions answered, rather than
all of them in the lesson. However, you can not fix this by always
grading by the amount of questions in the lesson as some lessons
bypass certain questions depending on the answer to previous ones.
The minquestion setting can now successfully be used to prevent this
behaviour by rewording the misleading string and adding logic.
2015-09-09 15:28:46 +08:00
Mark Nelson 343ed5b929 MDL-50516 mod_lesson: prevented deletion of previous attempts
The 'startlastseen' flag was removing any previous attempts
the user had from the DB. This meant that the user could
simply re-answer the question, regardless of the number
of attempts allowed.
2015-09-09 15:28:46 +08:00
Mark Nelson f9cc721dfd MDL-50516 mod_lesson: prevented user from repeating question
It was possible in the lesson module for a user to
answer a question, get the result, then click back
in the browser and re-answer it, even if they exceeded
the number of attempts allowed per question.
2015-09-09 15:28:46 +08:00
Eloy Lafuente (stronk7) 7647c6eabe Merge branch 'wip-mdl-51322-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-09-09 08:23:36 +02:00
Ankit Agarwal fa57105063 MDL-50173 ratings: Use proper checks to ensure ratings are viewable.
Mainly to verify groups visibility this new callback has been created.

Note this was originally 3 commits but for amending purposes they have
been squashed.
2015-09-09 04:14:00 +02:00
Andrew Nicols 62f72f8ba9 Merge branch 'wip-MDL-34938-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-09-09 09:45:48 +08:00
Dan Poltawski fbfe01cbb2 Merge branch 'MDL-51194_M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE 2015-09-08 13:29:20 +01:00
John Okely ae6b18a934 MDL-50709 groups: Prevent XSS in grouping description 2015-09-08 12:49:53 +02:00
Dan Poltawski ac470f3721 Merge branch 'wip-MDL-50323-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2015-09-08 09:14:12 +01:00
Dan Poltawski e33ff30b44 Merge branch 'MDL-51307-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2015-09-08 09:11:55 +01:00
Andrew Nicols e6adcaf3c6 Merge branch 'MDL-51281-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-09-08 14:20:25 +08:00
Andrew Nicols 7fc9fe32a7 Merge branch 'MDL-51325-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-09-08 12:56:29 +08:00
Cameron Ball b2f0dc9d10 MDL-51307 navigation: hide message button 2015-09-08 12:13:40 +08:00
Marina Glancy 7d4a741216 MDL-34938 enrol_meta: sync enrolment start/end dates 2015-09-08 10:27:57 +08:00
Andrew Nicols cba5940f2e Merge branch 'MDL-51245_29' of git://github.com/stronk7/moodle into MOODLE_29_STABLE 2015-09-08 10:00:01 +08:00
Adrian Greeve 9cd25ae9a7 MDL-50323 themes: Course unordered lists correctly styled.
Thank you to Ann Adamcik for providing this patch.
2015-09-08 09:42:26 +08:00
Eloy Lafuente (stronk7) edbfa27218 MDL-51245 sqlsrv: Diagnose missing READ_COMMITTED_SNAPSHOT mode
Without it, transactions are executed in standard READ_COMMITED
mode, without snapshoting/row versioning, leading to update
conflicts under high concurrency.
2015-09-08 03:02:27 +02:00
Eloy Lafuente (stronk7) 2edfa4a1f9 MDL-51245 mssql: Diagnose missing READ_COMMITTED_SNAPSHOT mode
Without it, transactions are executed in standard READ_COMMITED
mode, without snapshoting/row versioning, leading to update conflicts
under high concurrency.
2015-09-08 03:02:24 +02:00
Petr Skoda 289bc7f9e3 MDL-50860 core: improve creation of random strings 2015-09-08 01:08:57 +02:00
Tim Lock 5536fee5a5 MDL-42670 mod_assign: Fix recent activity block when blind marking is on 2015-09-07 22:44:29 +02:00
Marina Glancy ab006d43e4 MDL-50744 enrol_meta: fix incorrect role assign 2015-09-07 10:29:05 +01:00
Adrian Greeve 037e05e8b2 MDL-48371 editors: Option for removing managefiles
We want to remove the managefiles button from the
editors in the wiki so that students don't delete
each others files.
2015-09-07 09:59:33 +01:00
rajesh Taneja 58ffa95a15 MDL-51322 behat: ensure the window is properly closed
This is to ensure we have other window closed
so there is no race-around condition
2015-09-07 16:52:48 +08:00
lazydaisy e7444eb62e MDL-51194 theme_bootstrapbase: Move CSS classes from /less/moodle.less 2015-09-04 22:50:27 +01:00
Juan Leyva d8c9588662 MDL-51325 notes: Fix external get_course_notes to return site notes 2015-09-04 11:05:47 +02:00
AMOS bot 28987b3c9d Automatically generated installer lang files 2015-09-04 00:04:09 +08:00
Juan Leyva 0fce1a1a6b MDL-51281 completion: Fixed incorrect returned parameter type
Parameter status in external function get_course_completion_status
2015-09-03 15:57:39 +02:00
Dan Poltawski a64e1f3684 weekly release 2.9.1+ 2015-09-03 12:31:58 +01:00
Dan Poltawski 2da85b88b9 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-09-03 12:31:56 +01:00
rajesh Taneja dec22fcdf6 MDL-51090 behat: switch to main window 2015-09-03 10:26:50 +01:00
David Monllao 37cec3335b Merge branch 'MDL-51179-29' of git://github.com/damyon/moodle into MOODLE_29_STABLE
Conflicts:
	lib/upgrade.txt
2015-09-03 10:35:38 +02:00
Ryan Wyllie 956f281bd6 MDL-49536 theme_clean: update help text for logo
Updated the help text on the theme settings page to
mention that the theme logo will only be displayed on
the front page and login page.
2015-09-03 10:32:01 +02:00
Tim Hunt 3e280b70e6 MDL-51090 question manual grading: fixing for testing issues 2015-09-02 15:09:48 +08:00
David Monllao cd232214c2 MDL-51172 core_files: Using an invented file format 2015-09-02 10:37:23 +08:00
Ramindu Deshapriya 4b58bce051 MDL-51172 core_files: Added Behat test to automate MDLQA-8166 2015-09-02 10:37:19 +08:00
David Monllao d3b8ae917a Merge branch 'MDL-51090_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-09-02 09:49:46 +08:00
David Monllao ca36c9eecb Merge branch 'MDL-50971-m29' of git://github.com/NeillM/moodle into MOODLE_29_STABLE 2015-09-02 09:39:49 +08:00
David Monllao 0c9d44b050 Merge branch 'MDL-50920-2.9' of git://github.com/sk-unikent/moodle into MOODLE_29_STABLE 2015-09-02 08:45:01 +08:00
Eloy Lafuente (stronk7) 7a43fe824c Merge branch 'MDL-50641-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-09-02 01:53:22 +02:00
Tim Hunt 5b203b3edb MDL-51090 question: further refinements to validating manual grades 2015-09-01 23:09:08 +01:00
Nelson Moller 9f3a76cb07 MDL-51090: mod_quiz grading validation of an essay question
An invalid format is casted to 0 (if a string) or to some truncated value in other cases (ex: 10..5).
2015-09-01 23:09:07 +01:00
Dan Poltawski 758e773b97 MDL-50690 themes: fix commenting coding style
(See also CONTRIB-5891)
2015-09-01 21:12:33 +01:00
Dan Poltawski 301bb0954a Merge branch 'wip_MDL-50690_m29' of git://github.com/gjb2048/moodle into MOODLE_29_STABLE 2015-09-01 20:59:58 +01:00
AMOS bot ca8260190a Automatically generated installer lang files 2015-09-02 00:05:33 +08:00
Dan Poltawski 3652b59313 Merge branch 'MDL-51236-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-09-01 15:33:02 +01:00
David Monllao 7d98676efc Merge branch 'MDL-51234-M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2015-09-01 18:34:16 +08:00
David Monllao d1dd5d0c20 Merge branch 'MDL-51109-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-09-01 18:31:40 +08:00
Dan Poltawski c378540995 MDL-51109 task: more debug info for failed scheduled tasks 2015-09-01 11:00:36 +01:00
Dan Poltawski b11c542a13 Merge branch 'MDL-45841_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-09-01 10:14:45 +01:00
David Monllao a7b1ab1629 Merge branch 'wip-mdl-50963-m29' of git://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-09-01 16:06:29 +08:00
rajesh Taneja 5fa0153289 MDL-50963 behat: fixed error string in behat 2015-09-01 14:43:52 +08:00
David Monllao 9067f9b0d4 Merge branch 'MDL-50999-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-09-01 14:35:42 +08:00
Damyon Wiese 3dcdac00a1 MDL-51179 Atto: Extend autosave fix to cover text changes
Added new functions to editor api - set/get_text so the
original form text can be determined from an editor.

When calling use_editor() you should first call set_text() with
the text that will be inserted in the form element.

There is also a new scheduled task for cleaning Atto autosave drafts.
2015-09-01 13:39:24 +08:00
Damyon Wiese db50734bd6 MDL-51179 Atto: Add a behat test for autosave 2015-09-01 13:39:24 +08:00
Damyon Wiese 9314b26c12 MDL-51179 Atto: When a resume is aborted - create a fresh draft for future saves. 2015-09-01 13:39:24 +08:00
Damyon Wiese b94dcc42c0 MDL-51179 Atto: Abort autosave if there are more recent changes to the files
If the files in the draft area have been modified more recently than the timestamp
of the draft - do not restore the files, or you will delete any newer files. We
cannot really guess here - merging the 2 lists of files will be wrong.
2015-09-01 13:39:24 +08:00
Marina Glancy 7964285dd5 MDL-50791 auth: add heading on signup form page 2015-09-01 01:58:48 +02:00
Marina Glancy 18bc684a56 MDL-50791 forms: make server validation errors accessible 2015-09-01 01:58:48 +02:00
Clement Smith 492d18b67d MDL-50963 lang/en/grades.php: Improve bad grade error message
The error message received when inputting a grade value that is too
low indicates that zero is a valid grade value. This is incorrect as
the lowest valid grade value is 1. This updates the error message to
indicate the minimum acceptable grade value is 1, not 0.
2015-09-01 01:45:47 +02:00
Eloy Lafuente (stronk7) 78e0a308da Merge branch 'MDL-49536-29' of git://github.com/ryanwyllie/moodle into MOODLE_29_STABLE 2015-08-31 20:48:28 +02:00
Eloy Lafuente (stronk7) 3b96fd4c4d Merge branch 'MDL-50677-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2015-08-31 20:31:40 +02:00
David Monllao 3daf01d5c4 Merge branch 'MDL-51131-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-08-31 14:08:03 +08:00
David Monllao e56cf432d7 Merge branch 'MDL-51084-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-08-31 12:54:22 +08:00
Michael Aherne 121ab83eb5 MDL-51181 config: Correct documentation of lock_factory 2015-08-31 10:55:40 +08:00
David Monllao 258bd55190 Merge branch 'MDL-51215-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-08-31 10:45:32 +08:00
lazydaisy 4df0cdb191 MDL-51234 theme_bootstrapbase: hover hardly visible on invert/collapse 2015-08-30 20:04:27 +01:00
Kevin Wiliarty 38458cc314 MDL-51229 theme: display docked block on top of fixed navbar 2015-08-30 09:41:51 -04:00
Neill Magill b1c395be36 MDL-50971 ActionMenu: Action menus cause page to jump when closing
This patch changes the behavior of open action menus when using a mouse.

Before this patch when clicking on the page with an open action menu the focus would be
returned to the action menu's call button. This could cause the page to jump when a
mouse user did not close an action menu, scrolled and then tried to perform another
action on the page.

After this patch when clicking the focus will not be returned to the action menu's call button.
The behavior of the script will not be changed when using the keyboard.
2015-08-28 12:15:01 +01:00
Marina Glancy 875b5d8adf MDL-51084 tool_customlang: return to the same page after submit 2015-08-28 16:20:59 +08:00
Dan Poltawski f563d2066d weekly release 2.9.1+ 2015-08-28 07:38:15 +01:00
Andrew Nicols d7caed18da MDL-51236 phpunit: Prevent testsuite name conflicts
The testsuite name is fed straight into a class_exists() in
PHPUnit_Framework_TestSuite. In some cases, e.g. cachestore_static, the
class does exist, it's then fed into a ReflectionClass, and the test fails.

The testsuite needs to not conflict with any classes which could be
autoloaded in Moodle core.
2015-08-28 14:26:55 +08:00
Ryan Wyllie 067ff3bdb6 MDL-49536 theme_clean: logo only on front and login
The logo for the clean and more themes will only be
displayed on the front page and login page as it was
replacing the header information on other pages within
Moodle, causing users to lose information on the page.
2015-08-28 02:41:38 +00:00
Gareth J Barnard 6e9edacd2c MDL-50690 themes: Theme cache SVG images are not created. 2015-08-27 15:38:08 +01:00
Dan Poltawski c1c0a3e5cd MDL-49826 grade: hide singleview links when no permissions
Singleview only supports grade editors not viewers at this time.
2015-08-27 13:17:15 +02:00
Eloy Lafuente (stronk7) 2a5e171e38 Merge branch 'MDL-51148-29-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2015-08-27 12:55:07 +02:00
Frederic Massart ef9291481f MDL-50677 user: Prefix custom fields node name in profile tree 2015-08-27 17:49:21 +08:00
Marina Glancy 4966e4ba41 MDL-51215 course: redirect to manage appropriate category 2015-08-27 17:04:49 +08:00
Helen Foster 389065d313 MDL-51148 lang: Merge English strings from the en_fix language pack 2015-08-26 17:17:56 +02:00
Dan Poltawski c7fab83ae6 MDL-50641 rss: fix front page rss links
Fallback to guest user token when no user is specified in rss_get_url
rather than generating a junk token which is no use to anyone, this
matches existing logic which has been in place in forum for a while
and avoids custom handling all over the place.
2015-08-26 08:10:08 +01:00
David Monllao 0a9b9f2192 Merge branch 'wip_MDL-50869_m29' of git://github.com/gjb2048/moodle into MOODLE_29_STABLE 2015-08-26 09:45:11 +08:00
Marina Glancy 124e381eeb MDL-50923 themes: content-only class added before region-only 2015-08-26 03:41:38 +02:00
Marina Glancy 9898944941 MDL-50923 theme: add missing content-only css class 2015-08-25 11:35:14 +02:00
David Monllao 1d6945afc5 Merge branch 'MDL-50933_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-08-25 14:28:23 +08:00
David Monllao f892e8e0ba Merge branch 'MDL-50996_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-08-25 14:27:01 +08:00
Marina Glancy b929c12f9e MDL-51131 tags: remove instances when course is deleted 2015-08-25 13:15:15 +08:00
Marina Glancy 3b6e267b24 MDL-50973 admin: do not throw exception on /admin/ 2015-08-25 10:15:46 +08:00
Clement Smith a8af89ac13 MDL-50957 grade/report/user: Fix division by zero
When using "sum of grades" and $grademax is zero, a division by zero
error occurs in fill_contributions_column() in
grade/report/user/lib.php.
2015-08-25 10:09:00 +08:00
Eloy Lafuente (stronk7) c592c17e96 Merge branch 'MDL-50714-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-08-25 00:06:12 +02:00
Tim Hunt 4a0e7a2a80 MDL-45841 forum: show unread posts on blog-style forum front page 2015-08-24 21:45:33 +01:00
Dan Poltawski 1eca49da48 Merge branch 'MDL-49701_29' of git://github.com/jmvedrine/moodle into MOODLE_29_STABLE 2015-08-24 15:14:15 +01:00
Dan Poltawski 0908a7c14d Merge branch 'MDL-40179-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-08-24 13:40:13 +01:00
Davo Smith 6b610880dc MDL-49826 gradereport_singleview: fix permission check
Users with capability 'moodle/grade:edit' should be able to edit grade values
- 'moodle/grade:manage' is not needed, as grade items are not being changed.
2015-08-24 10:39:41 +01:00
Dan Poltawski 5f4980811d Merge branch 'MDL-47450-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2015-08-24 10:25:32 +01:00
Tim Hunt fc2a25837f MDL-50996 quiz: fix review error with unusual permissions 2015-08-24 09:59:36 +01:00
David Monllao ed05747ed5 Merge branch 'MDL-50958-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-08-24 15:40:29 +08:00
David Monllao 13897daf53 Merge branch 'MDL-51184-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-08-24 15:31:56 +08:00
Marina Glancy d4f8522545 MDL-51184 themes: correctly check $CFG->svgicons
Thanks to Ralf Wiederhold for pointing out the bug
2015-08-24 11:11:46 +08:00
Bruce Silver 576aa6bbda MDL-50958 block_messages: declare missing stdClass object 2015-08-24 10:34:36 +08:00
Damyon Wiese b9705008a1 MDL-51116 Mustache: Caching issue exists with mustache templates
The first ajax load fetches the template and puts it in localstorage + a js var

The second load gets it from local storage, but does not put it in the js var.

The pix_icon helper expects it to be in the js var always.
2015-08-24 10:17:29 +08:00
Tim Hunt bf76e3fd7f MDL-50933 quiz: improve completion behat tests
These now use the faster set-up methods.
2015-08-21 17:56:31 +01:00
Andrew Nicols 78fdc72794 MDL-50714 mod_forum: Add tests for all groupmodes 2015-08-21 08:21:19 +08:00
Andrew Nicols 6f1dc75492 MDL-50714 mod_forum: Correct use of movedicussions cap when posting
The ability to view the group dropdown was too closely related to the
movediscussions capability when posting, or editing a forum post.

The movedicussions capability should only be considered for some parts of
this logic. Users should be able to select the group to post to when
writing message, as long as they have access to that group.
2015-08-21 08:21:15 +08:00
Gareth J Barnard fcda61ba37 MDL-50869 themes: Quiz feedback colours are not accessible. 2015-08-20 16:50:54 +01:00
Dan Poltawski 8fb6ac2cb7 weekly release 2.9.1+ 2015-08-20 14:24:36 +01:00
Dan Poltawski c4e1aae15e Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-08-20 14:24:34 +01:00
Andrew Nicols e1c41f3c70 MDL-42634 theme: Increase margin on activity instance to not cover controls
Conflicts:
	theme/bootstrapbase/style/moodle.css
2015-08-20 15:43:23 +08:00
Marina Glancy eb7adebc48 MDL-50880 message: correctly compare with empty string
Thanks to David Herney Bernal for providing a fix
2015-08-20 10:32:04 +08:00
David Monllao c395cb2dbb MDL-50391 mod_lti: Fixing indentation 2015-08-20 09:49:29 +08:00
Eloy Lafuente (stronk7) ecdacbfc97 Merge branch 'MDL-50801_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-08-19 20:50:01 +02:00
Simey Lameze 9130e94980 MDL-40179 auth_cas: change is_proxybypass parameter to use server url 2015-08-19 14:32:05 +08:00
Andrew Nicols 116ae934c2 MDL-42634 theme: Increase margin on sectionname to not cover controls 2015-08-19 04:48:12 +02:00
Eloy Lafuente (stronk7) 4b1dd6e471 Merge branch 'MDL-49085_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-08-19 01:05:56 +02:00
Eloy Lafuente (stronk7) bb1744fb50 Merge branch 'MDL-46078-29' of git://github.com/damyon/moodle into MOODLE_29_STABLE 2015-08-19 00:59:57 +02:00
AMOS bot 852f1a8646 Automatically generated installer lang files 2015-08-19 00:04:20 +08:00
Dan Poltawski 2b4fd22388 Merge branch 'wip-MDL-30315-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2015-08-18 13:19:59 +01:00
Eloy Lafuente (stronk7) 3d05b9f57a Merge branch 'MDL-47449-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-08-18 13:35:56 +02:00
Dan Poltawski c65835a156 MDL-46387 shifter: missing built changes 2015-08-18 12:32:54 +01:00
Dan Poltawski a3ef8e4744 Merge branch 'MDL-46387-m29-master' of https://github.com/dthies/moodle into MOODLE_29_STABLE 2015-08-18 12:22:16 +01:00
Dan Poltawski 2b3795a55f Merge branch 'MDL-49841-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-08-18 11:02:57 +01:00
Adrian Greeve fc607b307a MDL-30315 grades: Unit test for grade import. 2015-08-18 17:04:17 +08:00
Adrian Greeve efa7a8a9e4 MDL-30315 gradebook: Uploading feedback doesn't override grades. 2015-08-18 17:04:16 +08:00
Dan Poltawski 471d59d053 Merge branch 'MDL-50127-29-squashed' of git://github.com/xow/moodle into MOODLE_29_STABLE 2015-08-18 09:54:06 +01:00
David Monllao 3f2e092c9f Merge branch 'MDL-50391-MOODLE_29' of git://github.com/aspark21/moodle into MOODLE_29_STABLE 2015-08-18 12:12:48 +08:00
David Monllao c32a27e5e8 MDL-49085 block_tag_youtube: Using Youtube data api v3 2015-08-18 11:11:20 +08:00
David Monllao 58c274dcb3 Merge branch 'MDL-51102-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-08-18 10:25:32 +08:00
Dan Poltawski 629975a563 Merge branch 'MDL-44828-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2015-08-17 14:24:58 +01:00
Dan Poltawski 8bfbebcc56 Merge branch 'MDL-42634-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-08-17 11:45:09 +01:00
David Monllao df5222b3ac Merge branch 'wip-MDL-50962-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2015-08-17 14:56:44 +08:00
David Monllao 315939d98c Merge branch 'MDL-51016-m29' of git://github.com/micaherne/moodle into MOODLE_29_STABLE 2015-08-17 14:22:07 +08:00
David Monllao 1426599d63 Merge branch 'MDL-50637-2.9' of git://github.com/sk-unikent/moodle into MOODLE_29_STABLE 2015-08-17 13:56:42 +08:00
David Monllao eb6cfca764 Merge branch 'wip-MDL-51095-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-08-17 12:07:35 +08:00
David Monllao f315095e42 Merge branch 'wip-MDL-50881-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-08-17 12:03:49 +08:00
David Monllao a7da0416b2 Merge branch 'MDL-50911-moodle29' of git://github.com/StudiUM/moodle into MOODLE_29_STABLE 2015-08-17 11:59:06 +08:00
Marina Glancy d4f667ed1e MDL-50932 cache: fix bug in prescanned file store
Thanks to Mark Nielsen for providing a patch
2015-08-17 11:45:39 +08:00
Bruce Silver 654c69c08b MDL-50962 user: Profile fields display properly
The department and idnumber fields were not displaying
properly on the user profile pages.
2015-08-17 10:35:46 +08:00
David Monllao 7923a04c42 Merge branch 'MDL-51057-M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE 2015-08-17 09:54:32 +08:00
David Monllao 5e325f5dce Merge branch 'MDL-51077-m29' of git://github.com/sammarshallou/moodle into MOODLE_29_STABLE 2015-08-17 09:46:38 +08:00
David Monllao b4173ea1ad Merge branch 'MDL-51088-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-08-17 09:26:20 +08:00
David Monllao e30c799185 Merge branch 'wip-mdl-51106-m29' of git://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-08-17 09:02:03 +08:00
David Monllao 285ca6ffbf Merge branch 'MDL-51100-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-08-17 08:51:16 +08:00
Andrew Nicols 14d54450e7 MDL-51102 behat: Add a non-JS version of wait 2015-08-17 08:12:57 +08:00
Daniel Thies 2ed920e774 MDL-46387 editor_atto: Add behat test for sub/sup 2015-08-16 16:00:03 -05:00
sam marshall a73b0208ea MDL-51077 Availability: Date restriction unit test static not cleared 2015-08-14 10:52:40 +01:00
Frederic Massart 47699db7f4 MDL-50127 mod_data: RTL styles for the required image 2015-08-14 16:47:51 +08:00
John Okely d03817a4eb MDL-50127 mod_data: Fix required icons in add entry screen 2015-08-14 16:47:51 +08:00
Andrew Nicols d0741e9791 MDL-47449 completion: Ignore timemodified when comparing 2015-08-14 10:54:20 +08:00
Andrew Nicols 4dcaaed6e0 MDL-47449 phpunit: Add comparitor for isEqual with exceptions
We often do isEqual tests but where a field, may have a single exception.
Ordinarily we can handle this easily by breaking the test down, but when
dealing with mocked objects we can only pass an instance of a
PHPUnit_Framework_Constraint, or a single value (which is cast to an
instance of PHPUnit_Framework_Constraint_IsEqual).

To deal with instances of time-based exception, we need to be able to
compare simple objects and classes where one or two values may be
different.
2015-08-14 10:54:19 +08:00
Andrew Nicols 28268cb20e MDL-49841 testing: Correct composer incantation 2015-08-14 10:29:12 +08:00
Jun Pataleta aed2279b50 MDL-44828 filelib: Fix open error for force-downloaded files in mobile
Allow guessing of file's MIME type by default. Fallback to
application/octet-stream if MIME type cannot be determined.
2015-08-14 09:55:13 +08:00
Rajesh Taneja 8c89201543 MDL-51100 behat: Remove javascript tag from usermenu steps 2015-08-14 08:57:11 +08:00
Andrew Nicols a746101872 MDL-51100 behat: Remove javascript tag from usermenu steps
These tests only needed the javascript tag because of the user menu.
Now that issue has been resolved, they do not need it.

Note: Some were also not using the singleselect feature, so would fail
without changes to use this too as they were not handling proper selection
of the singleselect element.
2015-08-14 08:57:11 +08:00
Andrew Nicols 2635b929d9 MDL-51100 behat: Correct javascript requirement of user menu step 2015-08-14 08:57:10 +08:00
Andrew Nicols cdf311cd4f MDL-51088 mod_forum: Improve mod_forum behat performance 2015-08-14 07:57:59 +08:00
Andrew Nicols 1a7fcb9d52 MDL-51088 completion: Do not require hover to confirm xpath 2015-08-14 07:57:59 +08:00
lazydaisy 0dde4b7536 MDL-51057 theme_base: RTL fix adds missing padding to block header h2. 2015-08-14 00:32:30 +01:00
Daniel Thies 265cf9f7c7 MDL-46387 editor-atto: Toggle sub/sup tags using rangy
In order to have a consistant browser behavior and prevent nesting of
subscripts and superscripts, tags are converted to CSS classes and then
the CSS classes in the selection are toggeled using the rangy crossbrowser
selection library already included in Atto without using an execCommand.
2015-08-13 15:50:24 -05:00
Alistair Spark 7ae86a915c MDL-50391 format_singleactivity: fix LTI Tool opens in existing window 2015-08-13 14:12:13 +01:00
Marina Glancy a0f2d25ccd MDL-50391 format_singleactivity: fix activity_has_subtypes() 2015-08-13 14:12:13 +01:00
Dan Poltawski 47b5927c10 MDL-51110 badges: prevent duplicate award of badges
Previously duplicate users could be returned when they had
done duplicate badge criteria - this would lead to a duplicate
constraint being hit as they were attempted to be awarded twice.
2015-08-13 13:28:12 +01:00
Eloy Lafuente (stronk7) f5e48d21ec weekly release 2.9.1+ 2015-08-13 12:17:02 +02:00
Eloy Lafuente (stronk7) e805a8afcb Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-08-13 12:16:57 +02:00
Rajesh Taneja d744140220 MDL-51106 behat: Fixed misuse of javascript tag 2015-08-13 13:26:17 +08:00
Andrew Nicols 4aae37f7a7 MDL-51100 behat: Remove javascript tag where not required
These tests only needed the javascript tag because of the user menu.
Now that issue has been resolved, they do not need it.

Note: Some were also not using the singleselect feature, so would fail
without changes to use this too as they were not handling proper selection
of the singleselect element.
2015-08-13 13:17:50 +08:00
Andrew Nicols 9fe1f70c4d MDL-51100 behat: Correct javascript requirement of user menu step 2015-08-13 13:17:50 +08:00
Marina Glancy 9b7c56ed0d MDL-51095 enrol_meta: add missing include
Thanks to Shaun Meyer for providing a patch
2015-08-13 12:30:01 +08:00
AMOS bot f799599c76 Automatically generated installer lang files 2015-08-13 00:04:25 +08:00
AMOS bot 3bd64b35db Automatically generated installer lang files 2015-08-13 00:04:25 +08:00
Skylar Kelty 2492e22a3b MDL-50920 enrol: Remove pointless DB update in enrol_meta 2015-08-12 11:55:07 +01:00
David Monllao 27384b2589 Merge branch 'MDL-46860-29' of git://github.com/ryanwyllie/moodle into MOODLE_29_STABLE 2015-08-12 10:46:10 +08:00
David Monllao b995470d68 Merge branch 'MDL-51053-m29' of git://github.com/sammarshallou/moodle into MOODLE_29_STABLE 2015-08-12 08:23:57 +08:00
Eloy Lafuente (stronk7) 9a45788698 Merge branch 'MDL-50062-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2015-08-12 01:47:17 +02:00
Eloy Lafuente (stronk7) c1e6db4538 Merge branch 'MDL-50446-29' of git://github.com/ryanwyllie/moodle into MOODLE_29_STABLE 2015-08-12 00:15:52 +02:00
Eloy Lafuente (stronk7) a75c62d090 Merge branch 'MDL-50307-29-3' of git://github.com/xow/moodle into MOODLE_29_STABLE 2015-08-11 23:45:10 +02:00
Andrew Nicols 8856004b3a MDL-49293 db: Pass sql_concat_join to sql_concat 2015-08-11 23:08:39 +02:00
Andrew Nicols f95118c1ee MDL-49293 db: Test sql_concat_join with more conditions 2015-08-11 23:08:38 +02:00
Eloy Lafuente (stronk7) 9ac618ebfe Merge branch 'MDL-50642_29' of https://github.com/ecampbell/moodle into MOODLE_29_STABLE 2015-08-11 22:38:01 +02:00
Alain Benoit 24c9c630cb MDL-50911 Quiz: edit settings page not responsive 2015-08-11 09:18:19 -04:00
sam marshall c237ec4c29 MDL-51053 Restore: Static cache breaks unit tests 2015-08-11 14:08:25 +01:00
Eloy Lafuente (stronk7) 3c78c0df57 Merge branch 'MDL-50894_29' of https://github.com/gedion/moodle into MOODLE_29_STABLE 2015-08-11 14:18:42 +02:00
Eloy Lafuente (stronk7) 79f47fd1b3 Merge branch 'm29_MDL-51015' of git://github.com/danmarsden/moodle into MOODLE_29_STABLE 2015-08-11 14:09:49 +02:00
Frederic Massart e85112f074 MDL-42634 theme: Action menu is displayed correctly with hidden elements 2015-08-11 14:54:37 +08:00
David Monllao 19b6e5512f Merge branch 'MDL-51014-m29' of git://github.com/sammarshallou/moodle into MOODLE_29_STABLE 2015-08-11 13:09:30 +08:00
Marina Glancy e53efac19c MDL-50881 calendar: do not throw exception without sesskey 2015-08-11 12:52:26 +08:00
John Okely b61a30c5ff MDL-50307 auth_db: Stop using AS to prevent error with some drivers 2015-08-11 12:13:33 +08:00
John Okely 1dd3f049e0 MDL-50307 auth_db: Fix associative fetching in ADODB 2.19 2015-08-11 12:13:32 +08:00
AMOS bot f969608c68 Automatically generated installer lang files 2015-08-11 00:04:06 +08:00
Mark Johnson 4575ba6f34 MDL-51014 behat: Wait for filepicker to load repository 2015-08-10 13:37:51 +01:00
David Monllao 593f2842e7 Merge branch 'wip-MDL-51062-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-08-10 14:24:08 +08:00
Marina Glancy 02bc23c784 MDL-51062 behat: permission steps should work without js 2015-08-10 11:58:43 +08:00
David Monllao cba771a588 Merge branch 'MDL-50992-29' of git://github.com/damyon/moodle into MOODLE_29_STABLE 2015-08-10 11:17:59 +08:00
David Monllao eea7fbc292 Merge branch 'MDL-51007-m29' of git://github.com/sammarshallou/moodle into MOODLE_29_STABLE 2015-08-10 11:08:16 +08:00
David Monllao 33d551abbb MDL-50801 atto_table: Closing caption tag 2015-08-10 10:53:19 +08:00
Ryan Wyllie 4f43ea59c8 MDL-46860 filepicker: change responsive styling
Changed the filepicker's responsive styling to kick in
on screen width less than 768px (which is the bootstrap
standard) rather than 873px. This allows the standard
styling to apply within an iframe.
2015-08-10 02:20:40 +00:00
Ryan Wyllie c7007d2c20 MDL-46860 filepicker: iframe context aware
The filepicker now checks if it's within an iframe when
creating the dialogue, if so it will set the dialogue width
to fit within the iframe and disable dragging.
2015-08-10 02:19:48 +00:00
Andrew Nicols 09ae51738f MDL-50949 cache: Improve cache performance tests 2015-08-10 08:19:44 +08:00
Andrew Nicols 35728d3595 Merge branch 'MDL-50949-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2015-08-10 08:14:19 +08:00
Frederic Massart fd7f843022 MDL-47450 blocks: Blocks can be moved on the site profile 2015-08-07 15:10:54 +08:00
AMOS bot fb892eb383 Automatically generated installer lang files 2015-08-07 00:04:05 +08:00
Eoin Campbell 894d2d2b3b MDL-50642 qformat_xml: fix import of tags in Cloze questions 2015-08-06 16:02:05 +01:00
Michael Aherne af4266eac7 MDL-51016 messaging: Fix email attachments on Windows 2015-08-06 13:02:16 +01:00
Dan Marsden f6597fa087 MDL-51015 mod_scorm: tidy up messy code, remove use of eval() 2015-08-06 22:21:26 +12:00
Andrew Nicols 49fa660aca weekly release 2.9.1+ 2015-08-06 12:11:44 +08:00
Andrew Nicols ff7896adc7 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-08-06 12:11:33 +08:00
Frederic Massart a42d0d98fb MDL-50062 behat: Handle category mapping for grade items generator 2015-08-06 12:01:09 +08:00
Frederic Massart b26f764754 MDL-50062 grades: Behat tests for aggregation changes 2015-08-06 12:01:08 +08:00
Frederic Massart 5e0af40734 MDL-50062 grades: Fix false positives in Behat tests 2015-08-06 12:01:08 +08:00
Frederic Massart 0ba8e843b1 MDL-50062 grades: Tests for item::set_aggregation_fields_for_aggregation 2015-08-06 12:01:08 +08:00
Frederic Massart 488ba5c1ef MDL-50062 grades: Carry agg. settings between categories when possible 2015-08-06 12:01:08 +08:00
Dave Cooper b8ca7925c0 MDL-50062 gradebook: Fixed behaviour when changing aggregation mathods. 2015-08-06 12:01:08 +08:00
Eloy Lafuente (stronk7) a4209ab67a Merge branch 'MDL-44840-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-08-05 20:47:39 +02:00
Eloy Lafuente (stronk7) a74ead4260 Merge branch 'MDL-50816-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-08-05 18:21:36 +02:00
AMOS bot 411a4b4082 Automatically generated installer lang files 2015-08-06 00:04:15 +08:00
AMOS bot 1aa3ead079 Automatically generated installer lang files 2015-08-06 00:04:15 +08:00
Eloy Lafuente (stronk7) b963701081 Merge branch 'MDL-48970_2.9' of https://github.com/andrewhancox/moodle into MOODLE_29_STABLE 2015-08-05 16:20:47 +02:00
sam marshall bdf512f2c1 MDL-51007 Availability: Unit test fails with extra plugins 2015-08-05 14:30:01 +01:00
Eloy Lafuente (stronk7) 89a762ca8c Merge branch 'MDL-38230_29' of git://github.com/jmvedrine/moodle into MOODLE_29_STABLE 2015-08-05 12:39:31 +02:00
Andrew Nicols 9241c64f97 MDL-50999 dock: Stop adding commands to DOM
The commands div should not be added to the DOM. The version shown in the
dock is different to the standard version in the block, and is manually
added to the dock panel when it is displayed.

The docked version contains additional actions (e.g. the undock button).

The original version of the dock should ideally remain untouched.

Note: A duplicate delegation was discovered when fixing this issue. This
was previosuly not triggered because the watched Node was removed
before the delegation took effect.
2015-08-05 10:08:16 +08:00
Andrew Nicols 4baad0fd5c Merge branch 'MDL-48202-M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE 2015-08-05 09:09:15 +08:00
Eloy Lafuente (stronk7) 71c6272dfe MDL-35027 mod_forum: verify forced subscriptions cannot be edited
This commit adds a new scenario to verify that the option
to turn edition of subscribers is not available anymore
for forced-subscription activities.

It also gets rid of the @javascript tag in a just introduced
scenario not needing it.
2015-08-05 02:09:04 +02:00
Eloy Lafuente (stronk7) 1e0cc67b0e Merge branch 'MDL-35027-B-29' of https://github.com/bostelm/moodle into MOODLE_29_STABLE 2015-08-05 02:08:54 +02:00
Eloy Lafuente (stronk7) 6532dc07f5 Merge branch 'MDL-50416-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-08-04 20:03:19 +02:00
Eloy Lafuente (stronk7) c7d4aa10ce MDL-46963 env: adding missing check_database_tables_row_format check 2015-08-04 19:47:03 +02:00
Eloy Lafuente (stronk7) 6f91dc9497 MDL-50624 env: adding missing restrict_php_version_7 check 2015-08-04 19:30:11 +02:00
Bruce Silver 0ff0722b2f MDL-50992 lti: Fix debugging warning when creating a new tool 2015-08-04 22:25:51 +08:00
Andrew Nicols e2bbadf137 Merge branch 'MDL-50893_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-08-04 16:00:10 +08:00
Andrew Nicols 7daf0d32d0 Merge branch 'MDL-45113-29' of https://github.com/mackensen/moodle into MOODLE_29_STABLE 2015-08-04 15:22:32 +08:00
Andrew Nicols a6f919b8c8 Merge branch 'MDL-43709-29' of https://github.com/pauln/moodle into MOODLE_29_STABLE 2015-08-04 12:44:21 +08:00
Andrew Nicols bd7a798d11 Merge branch 'MDL-50532-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2015-08-04 12:13:49 +08:00
Andrew Nicols d6802fd4a7 MDL-50493 mod_forum: Correct style issues 2015-08-04 11:55:31 +08:00
Andrew Nicols 2e173e6a23 Merge branch 'MDL-50493-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-08-04 11:54:55 +08:00
Andrew Nicols 8854ba9bda Merge branch 'MDL-50771_29' of git://github.com/stronk7/moodle into MOODLE_29_STABLE 2015-08-04 10:28:16 +08:00
Andrew Nicols f47b39cbea Merge branch 'MDL-42626-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-08-04 10:10:36 +08:00
Andrew Nicols db526aa03a Merge branch 'MDL-45772-29-4' of git://github.com/xow/moodle into MOODLE_29_STABLE 2015-08-04 10:01:33 +08:00
John Okely 56b63c4151 MDL-45772 admin: Stop browsers from autofilling passwords incorrectly 2015-08-04 09:54:56 +08:00
Simey Lameze 78b0d423b1 MDL-50416 environment: add missing slasharguments checks 2015-08-04 09:44:50 +08:00
Eloy Lafuente (stronk7) 9d4c7b6573 Merge branch 'MDL-50515_29' of git://github.com/jmvedrine/moodle into MOODLE_29_STABLE 2015-08-04 01:28:09 +02:00
AMOS bot eb644d98b5 Automatically generated installer lang files 2015-08-04 00:04:23 +08:00
Henning Bostelmann add21c5f20 MDL-35027 mod_forum: Fix subscriber list in hidden forums
If the forum is force-subscribed and hidden, only subscribers that can
view hidden activities will be shown in the subscriber list.
2015-08-03 12:13:31 +01:00
Eloy Lafuente (stronk7) 4893167372 MDL-50771 oracle: Bind long (>4000byte) text as CLOB
While we already were detecting @ normalise_value()
both BLOBs and CLOBs properly on insert and update
statements (by introspectind the column specs), when
a long TEXT is being passed as part of an arbitrary
SQL, or within the conditions... it was being bound
as VARCHAR, leading to problems if used in combination
with DBMS_LOB functions.

This patch just ensures that any TEXT > 4000 bytes not
detected by normalise_value() will be, always, bound as CLOB,
unconditionally.

Covered with tests both covering its use with DBMS_LOB (the
reported bug) and also in general raw statements.
2015-08-03 10:52:00 +02:00
Jean-Michel Vedrine 313bba607a MDL-38230 mod_quiz: Create UI for removing of quiz access rule addons 2015-08-03 09:00:44 +02:00
Andrew Nicols 1c548b8006 Merge branch 'wip-MDL-22819-m29' of https://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-08-03 10:23:12 +08:00
Andrew Nicols 1fcd127797 Merge branch 'MDL-49864-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2015-08-03 09:43:59 +08:00
Andrew Nicols bee6faa8ac Merge branch 'MDL-50624-29' of git://github.com/ryanwyllie/moodle into MOODLE_29_STABLE 2015-08-03 09:20:25 +08:00
Jun Pataleta 3999a761eb MDL-49864 mod_assign: Fix missing annotations when viewing PDF
Added 'draft = 1' criteria for the delete query in
page_editor::set_annotations in order to prevent the deletion of non-draft
annotations while the PDF is being edited.
2015-08-03 09:11:32 +08:00
Ryan Wyllie d4c0adb685 MDL-50624 environment: add PHP7 as unsupported version
Added PHP7 as an unsupported version for Moodle 2.8 and 2.9 in
the environment checks
2015-08-03 01:02:27 +00:00
lazydaisy 0b91dd902a MDL-48202 theme_bootstrapbase: blocks are 6px taller after undocking. 2015-08-02 21:39:19 +01:00
Jean-Michel Vedrine e4e72baa5d MDL-49701 mod_lesson: open time should be before close time 2015-08-02 10:35:30 +02:00
Jean-Michel Vedrine 67de7818ba MDL-50515 mod_lesson: Can't remove content buttons from content page 2015-08-02 09:47:40 +02:00
Charles Fulton e5ca803a40 MDL-45113 auth: add is_configured method and convert auth_db to use it 2015-07-31 15:18:07 +00:00
Simey Lameze 13a140400c MDL-50416 environment: remove slasharguments warning from install 2015-07-31 11:37:14 +08:00
Andrew Nicols eb1d954cda weekly release 2.9.1+ 2015-07-30 14:42:15 +08:00
Andrew Nicols c39133315e Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-07-30 14:42:09 +08:00
Ryan Wyllie 92434b8f2b MDL-50446 block_site_main_menu: Test add URL resource
Behat tests to confirm that adding a URL resource to
the main menu block doens't break the javascript.
2015-07-30 04:34:29 +00:00
Ryan Wyllie d2d6ab4f88 MDL-50446 block_site_main_menu: Fix the onclick property handling 2015-07-30 04:34:21 +00:00
AMOS bot caede15d09 Automatically generated installer lang files 2015-07-30 00:04:06 +08:00
Frederic Massart 4ca8a308d6 MDL-50949 cache: Tests for performance debugging of cache usage 2015-07-29 14:39:28 +08:00
Frederic Massart e92750abc2 MDL-50949 cache: Performance debug keeps track of hits/misses/sets 2015-07-29 14:39:27 +08:00
Mark Nelson 0ae2f41141 MDL-50535 core_grades: fixed behat failing 2015-07-29 14:23:35 +08:00
Frederic Massart 9f970d338d MDL-50532 tasks: Delete obsolete tasks during upgrade 2015-07-29 11:25:54 +08:00
Jean-Michel Vedrine ad70c80da3 MDL-44840 mod_lesson: fix import of truefalse questions 2015-07-29 11:05:50 +08:00
Tim Hunt 670344b164 MDL-50893 questions: cannot create a question with name 0 2015-07-28 18:19:30 +01:00
Dan Poltawski a2cefb4228 Merge branch 'MDL-50535_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2015-07-28 13:14:27 +01:00
Barbara Ramiro 56b35937fa MDL-50370 Icons: Filetype icon for ePub 2015-07-28 12:43:33 +01:00
Dan Poltawski b3b49df108 Merge branch 'MDL-50833-29' of git://github.com/merrill-oakland/moodle into MOODLE_29_STABLE 2015-07-28 12:38:52 +01:00
Dan Poltawski 3718b75234 Merge branch 'MDL-50868-29' of git://github.com/jethac/moodle into MOODLE_29_STABLE 2015-07-28 12:19:09 +01:00
spvickers 6504c740b6 MDL-49629 mod_lti: Add icon fields
Icon fields added to input form when defining an external tool at the
admin level.  The icon for a tool derived from a tool proxy can be
overridden.  Course cache is cleared if current icon value is changed.

Add text boxes to edit form for entering icon URLs.
2015-07-28 12:04:35 +01:00
Andrew Nicols 6edb0474e3 Merge branch 'wip-MDL-50874-m29' of https://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-07-28 15:01:55 +08:00
Andrew Nicols 9923f33a1a Merge branch 'MDL-50295-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-07-28 14:04:15 +08:00
Andrew Nicols bdf1e4e617 Merge branch 'MDL-44962_29' of https://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-07-28 11:29:48 +08:00
Andrew Nicols 6e8ca5db5a Merge branch 'MDL-35148-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2015-07-28 11:07:48 +08:00
Frederic Massart 6f7fc58710 MDL-35148 themes: Updated checks deciding when mobile themes are used
Now, if a site-theme is set for tablet/phone AND the user is using
a tablet/phone that site-theme will be used, always. In any other
case the normal theme resolution will be used: course, category, ...
2015-07-28 11:01:54 +08:00
Damyon Wiese 57b6aa814e MDL-46078 Assign: Completion is not using assignment API.
Should not be directly querying the DB to get the submission, use the API!
2015-07-28 10:28:43 +08:00
Juan Leyva 443d5b3aa5 MDL-42626 messages: Hide deleted users in contact/blocked list 2015-07-27 16:34:32 +02:00
Charles Fulton 3a68038421 MDL-41598 auth_shibboleth: don't override wantsurl 2015-07-27 15:25:15 +01:00
Dan Poltawski 0d8674d771 Merge branch 'MDL-43785-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-07-27 14:49:40 +01:00
Dan Poltawski 1fc557af41 Merge branch 'MDL-49360-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-07-27 12:08:47 +01:00
Dan Poltawski 1f42924fdd Merge branch 'wip-MDL-50649-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-07-27 12:00:02 +01:00
Andrew Nicols e54053e712 Merge branch 'MDL-46232-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2015-07-27 15:58:04 +08:00
Frederic Massart 1a29f44649 MDL-46232 user: Handle bulk delete of users without email addresses 2015-07-27 15:48:42 +08:00
Andrew Nicols 462104b7b4 MDL-43785 lib: Improve session timeout warnings 2015-07-27 14:30:24 +08:00
Simey Lameze ac62233074 MDL-49360 core_lib: add new method get_local_referer()
This commit also replace all usages of $_SERVER['HTTP_REFERER'] and get_referer().
2015-07-27 11:59:28 +08:00
AMOS bot 5dd4dd5e24 Automatically generated installer lang files 2015-07-26 00:04:04 +08:00
Mark Nelson 9aa6d6a434 MDL-50535 core_course: disabled 'gradepass' field when no ratings set 2015-07-24 13:48:01 -07:00
Gedion Woldeselassie 28b91e26c1 MDL-50894 lib/conditionlib: Occasional cron error
Inhibit division by zero error warnings when rawgrademax and rawgrademin are
equal. The change does not affect existing functional behavior.
2015-07-24 11:16:57 -05:00
David Monllao 358cd4e54a MDL-44962 mod_wiki: No input filter
Thanks to Tim Lock for the partial fix.
2015-07-24 16:34:29 +02:00
Marina Glancy c3bf02945a MDL-22819 tags: fix breadcrumb on manage tags page 2015-07-24 21:28:17 +08:00
Marina Glancy e2b49dde9e MDL-50649 report: query optimisation 2015-07-24 17:39:01 +08:00
Jetha Chan f4935dd9fe MDL-50868 weblib: add unit test for ruby support 2015-07-24 14:12:01 +09:00
Jetha Chan 841fe2b2e8 MDL-50868 weblib: add ruby support to purify_html 2015-07-24 14:12:01 +09:00
AMOS bot a3f0e47c49 Automatically generated installer lang files 2015-07-24 00:04:20 +08:00
Dan Poltawski cd02b264bd weekly release 2.9.1+ 2015-07-22 20:43:03 +01:00
Dan Poltawski d821b4a848 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-07-22 20:43:00 +01:00
Andrew Nicols f23a44de04 Merge branch 'MDL-50563-m29' of https://github.com/NeillM/moodle into MOODLE_29_STABLE 2015-07-22 09:19:32 +08:00
Andrew Nicols 7dd47eec3e Merge branch 'MDL-50762-MOODLE29' of https://github.com/luryus/moodle into MOODLE_29_STABLE 2015-07-22 09:12:50 +08:00
Andrew Nicols d1c480c72d Merge branch 'MDL-50699-29' of https://github.com/pauln/moodle into MOODLE_29_STABLE 2015-07-22 09:07:54 +08:00
Andrew Nicols 0964d538fe Merge branch 'MDL-50525_2.9' of https://github.com/andrewhancox/moodle into MOODLE_29_STABLE 2015-07-22 08:58:39 +08:00
Andrew Nicols ca719d2df8 Merge branch 'MDL-50523_2.9' of https://github.com/andrewhancox/moodle into MOODLE_29_STABLE 2015-07-22 08:46:56 +08:00
Dan Poltawski cce7558a9f MDL-50663 blocks: minor style fixes 2015-07-21 15:41:39 +01:00
Dan Poltawski 2d87c112f8 Merge branch 'MDL-50663' of https://github.com/sk-unikent/moodle into MOODLE_29_STABLE 2015-07-21 15:40:16 +01:00
Dan Poltawski 106fd4f300 Merge branch 'MDL-50293_29' of https://github.com/Syxton/moodle into MOODLE_29_STABLE 2015-07-21 12:51:58 +01:00
Marina Glancy e6e6926103 MDL-50874 block: basic tests for tag-related blocks 2015-07-21 17:01:21 +08:00
Dan Poltawski 52788d744e Merge branch 'MDL-50639_mod_book_fontsize_M29' of https://github.com/barrysspace/moodle into MOODLE_29_STABLE 2015-07-21 09:08:14 +01:00
Andrew Nicols 6fb892c16f Merge branch 'MDL-49618-m29' of https://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-07-21 12:16:46 +08:00
Andrew Nicols c5d7c66e51 Merge branch 'MDL-47230_M29' of https://github.com/barrysspace/moodle into MOODLE_29_STABLE 2015-07-21 11:23:00 +08:00
Andrew Nicols f7b362485c Merge branch 'wip-MDL-41650-m29' of https://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-07-21 09:37:08 +08:00
Andrew Hancox 3439fa1a22 MDL-50523 mod_assign: Conditionally disable activity setting
On activity settings form if "Students submit in groups" is set to no then
disable "Require group to make submission" setting.
2015-07-20 19:45:28 +01:00
Andrew Hancox bd103e4288 MDL-50525 mod_assign: Moved preventsubmissionnotingroup
Moved preventsubmissionnotingroup to between teamsubmission and
requireallteammemberssubmit to keep all settings related to
group submissions together.
2015-07-20 19:43:01 +01:00
AMOS bot 35b097d9fa Automatically generated installer lang files 2015-07-21 00:04:37 +08:00
pau.ferrer-ocana a457117ca8 MDL-49440 lib: Date picker duplicated week day names repaired
Thanks Marc Català for the patch
2015-07-20 14:03:07 +01:00
Dan Poltawski 54588deffa Merge branch 'wip-MDL-50678-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-07-20 13:54:02 +01:00
Dan Poltawski 496955cc9f Merge branch 'wip-MDL-50612-m29' of https://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-07-20 10:12:25 +01:00
AMOS bot 3d4c68aa36 Automatically generated installer lang files 2015-07-20 00:05:01 +08:00
apsdehal b6852df791 MDL-41650 Tags: Changed css classes of errors and success notice 2015-07-19 20:23:35 +08:00
AMOS bot b1f85cb018 Automatically generated installer lang files 2015-07-18 00:05:22 +08:00
Lauri Koskela 6532e2871e MDL-50762 tool_capability: Do not hide first capability in list 2015-07-17 15:32:53 +03:00
Neill Magill bb4bab30bd MDL-50563 blocks: A hidden block that is dropped should be dimmed
Before this patch when dragging and dropping a hidden block it would display as though visible when it was dropped.

This is only a display issue, as a page refresh caused it to be dimmed in its new position.
2015-07-17 09:24:11 +01:00
Barry Oosthuizen aa7742e105 MDL-50639 mod_book: Remove 0.8em font sizes 2015-07-17 08:48:14 +01:00
AMOS bot 9d2c5fb75b Automatically generated installer lang files 2015-07-17 00:05:06 +08:00
Syxton f1f4daba91 MDL-50293 navigation: File name not wrapping
A long File name doesn't always wrap correctly in the Navigation block.
2015-07-16 10:24:34 -04:00
Michael Aherne 8621a178a1 MDL-50490 cron: Prevent tasks from leaving uncommitted transactions 2015-07-16 11:43:35 +01:00
Dan Poltawski 7fa73576b5 weekly release 2.9.1+ 2015-07-16 08:16:21 +01:00
Juan Leyva fc0103cc80 MDL-50816 notes: Delete never met condition code 2015-07-15 15:27:33 +02:00
Eric Merrill 141ce827df MDL-50833 report: Still make a chart if there are no logs 2015-07-15 09:13:58 -04:00
Barry Oosthuizen a00cff0291 MDL-47230 mod_book: Sub chapter bullet formatting 2015-07-15 09:35:56 +01:00
Marina Glancy c82ce1017b MDL-50678 mod_glossary: removed extra login check 2015-07-15 14:19:26 +08:00
Dan Poltawski 9d5e9a3d4d Merge branch 'MDL-37832-M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE 2015-07-14 10:14:13 +01:00
Dan Poltawski 30ce935ea8 Merge branch 'MDL-50814-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-07-14 08:55:07 +01:00
Mary Evans e842d0538d MDL-37832 theme: Improved "My Moodle" expandable/collapsible caption. 2015-07-14 08:53:31 +01:00
Marina Glancy 12b24e0893 MDL-50612 grades: remove gradepass if there is no grading 2015-07-14 13:15:08 +08:00
Pierre GUINOISEAU 82860ddf9a MDL-50612 grades: do not remove grade box if gradepass field exists 2015-07-14 13:15:08 +08:00
Dan Poltawski 4d12cb69e4 Merge branch 'MDL-50711_M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE 2015-07-13 16:14:17 +01:00
Dan Poltawski 3721921799 Merge branch 'MDL-50799-29' of git://github.com/merrill-oakland/moodle into MOODLE_29_STABLE 2015-07-13 16:08:20 +01:00
Damyon Wiese 60b6746994 MDL-50784 ajax: Require a sesskey for all ajax requests.
This needs to be done before we can expose any webservices that
change state, or return private info to ajax (to prevent CSRF).

Currently there are no webservices exposed to ajax that meet these
criteria - so this issue is to prevent future security issues.
2015-07-13 16:49:04 +02:00
Juan Leyva d1c463d65e MDL-50814 badges: Fix incorrect default ordering 2015-07-13 15:09:59 +02:00
Dan Poltawski 2f238bcf59 Merge branch 'MDL-50806-29' of git://github.com/merrill-oakland/moodle into MOODLE_29_STABLE 2015-07-13 13:45:58 +01:00
Dan Poltawski 34ab3eea77 Merge branch 'MDL-50798-29' of git://github.com/merrill-oakland/moodle into MOODLE_29_STABLE 2015-07-13 13:35:31 +01:00
Dan Poltawski 9908ce7f04 Merge branch 'MDL29-50800' of https://github.com/dkleto/moodle into MOODLE_29_STABLE 2015-07-13 13:27:39 +01:00
Dan Poltawski 6066cb4f1d Merge branch 'm29_MDL-49647' of https://github.com/danmarsden/moodle into MOODLE_29_STABLE 2015-07-13 10:05:26 +01:00
Paul Nicholls 2d858fb001 MDL-43709 Forum: Reset forums not working with multiple forum types
The SQL being generated from the selected forum types on the course reset
form was using AND, resulting in never matching anything if more than one
forum type was selected for resetting (as each forum can only have one
type).  This should use $DB->get_in_or_equal() to generate sensible SQL.
2015-07-13 16:18:49 +12:00
Adam Riddell 5ca31b1621 MDL-50800 question: Add missing make_answer method
question/type/calculatedmulti/questiontype.php:
        - Add public make_answer method so that apply_attempt_state
          method in qtype_multichoice_base does not cause a fatal
          error when attempting to call make_answer.
2015-07-13 09:45:32 +10:00
Mary Evans bba5f72513 MDL-50711 theme_bootstrapbase: Added inverse horizontal divider colors. 2015-07-12 02:54:28 +01:00
Eloy Lafuente (stronk7) c736b82694 weekly release 2.9.1+ 2015-07-10 18:11:30 +02:00
Eric Merrill 9aa4a14744 MDL-50806 questions: Allow more memory when doing a question import 2015-07-09 12:46:41 -04:00
Dan Marsden 1a4957d59d MDL-49647 mod_scorm: correct escaping of javascript content. 2015-07-09 16:57:36 +12:00
Eric Merrill a47e912d14 MDL-50799 question: Improve Show all text to be more accurate 2015-07-08 22:03:11 -04:00
Marina Glancy eed580748c MDL-49618 forum: apply format_string 2015-07-09 08:02:52 +08:00
Eric Merrill f39d3f94b8 MDL-50798 question: Raise time limit when rendering questions
Rendering a large number of questions may be quite slow, so we want to
raise the limit.

We don’t call raise() in the loop because the quiz buffer captures this
function for a AJAX script, and we should only call raise if we expect
a corresponding output to the users browser. This helps to prevent
unexpected load balancer disconnects. See core_php_time_limit::raise()
for more details.
2015-07-08 15:49:48 -04:00
Eloy Lafuente (stronk7) a09d176ea9 Merge branch 'MDL-50489-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-07-07 19:13:08 +02:00
Eloy Lafuente (stronk7) f9f4fe80e6 Merge branch 'MDL-49185-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-07-07 16:59:17 +02:00
Dan Poltawski 25717253d6 MDL-50466 logstore: bump version to load new task definitions 2015-07-07 15:09:24 +01:00
Dan Poltawski a3acae963d MDL-50295 output: prevent 'emoji' arrows
We need to append U+FE0E VARIATION SELECTOR-15 to the arrow to ensure
our l/rarrows are displayed as text icons, not 'emoji' icons.

See http://unicode.org/reports/tr51/#Diversity for more details of why
this changed in iOS 8.3+.
2015-07-07 14:26:54 +01:00
Michael Aherne 200ff69b41 MDL-50466 tasks: Specific minute values for log cleanup 2015-07-07 09:39:05 +01:00
Dan Poltawski 5a178ce23c MDL-50653 myprofilelib: fix stray ending dl tag
(That is outputing content, rest of function is not!)
2015-07-07 08:54:15 +01:00
Dan Poltawski cccef4ca28 Merge branch 'MDL-50653-m29' of https://github.com/bmbrands/moodle into MOODLE_29_STABLE 2015-07-07 08:54:11 +01:00
Dan Poltawski c746755c15 MDL-50749 js: add some TODOs to some small hacks 2015-07-07 08:50:40 +01:00
Dan Poltawski 564f346e12 Merge branch 'MDL-50749-29' of https://github.com/mackensen/moodle into MOODLE_29_STABLE 2015-07-07 08:50:33 +01:00
Bas Brands 2aeb97163e MDL-50653 user: forgotten closing div tag on the page
The /user/view.php was missing a closing div for the <div class="description">
causing the page grid to break on any Bootstrap 3 based theme.
2015-07-06 09:39:11 +02:00
Charles Fulton e50d52bd3a MDL-50749 course: add fake element for behat compatibility 2015-07-03 19:54:45 +00:00
Eloy Lafuente (stronk7) c948f378b9 Moodle release 2.9.1 2015-07-03 13:38:26 +02:00
Eloy Lafuente (stronk7) 9ecb4e3abd Merge branch 'MDL-50757-29' of git://github.com/damyon/moodle into MOODLE_29_STABLE 2015-07-03 11:27:17 +02:00
Damyon Wiese 17bb213dd3 MDL-50757 upgrade: Unset config value that will never be used again 2015-07-03 16:46:01 +08:00
Adrian Greeve 3c23a2cd2e MDL-50757 gradebook: Update fix for pre 2.8 upgrades.
Moodle installations that updated before the 2.8 grade push
were being flagged for a gradebook freeze. This was resulting in
calculated grades being shown as different to how they were
displayed before the upgrade. This fix retains the original
grade value.
2015-07-03 13:16:29 +08:00
Dan Poltawski 461f479dde weekly release 2.9+ 2015-07-02 14:26:11 +01:00
Dan Poltawski 8946171eca Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-07-02 14:26:06 +01:00
Juan Leyva 54f5401149 MDL-50489 forum: Handle qanda forums in get_forum_discussions_paginated
I removed the last qanda checks in forum_user_can_see_discussion because they are not necessary and
they make the external function fail.

A user in a qanda forum can always see a discussion (he needs to see the discussion to be able to reply).
What he cannot see are the other user posts unless he has replied to the discussion once and the edition period
(usually 30 minutes) has ended.

Note also that forum_user_can_see_discussion was originally only used when displaying forums in blog format
in order to display the button show more or not, this is the reason this wasn't detected before.
2015-07-02 10:54:50 +02:00
Marina Glancy 038b33f0fd MDL-48239 grades: corrected docs url for calculation changes 2015-07-02 15:49:59 +08:00
Marina Glancy ff6fe05733 MDL-48239 grades: fix notification class 2015-07-02 15:49:56 +08:00
Adrian Greeve 9ca6dcd3ba MDL-48239 gradebook: Oracle fix for string compare.
Update to upgradelib.php where string comparisions cause
phpunit failures in Oracle.
2015-07-02 12:30:33 +08:00
Eloy Lafuente (stronk7) 7d803c4c52 Merge branch 'wip-MDL-48239-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2015-07-02 05:42:23 +02:00
Adrian Greeve 5ab9f04410 MDL-48239 gradebook: Change to calculated grade item min and max.
Regardless of the setting 'Min and max grades used in calculation'
Calculated grade items will always update the min and max raw grade.
2015-07-02 11:27:12 +08:00
Adrian Greeve 9b84c81dfd MDL-48239 gradebook: Unit test for upgrade function. 2015-07-02 11:27:12 +08:00
Adrian Greeve 4a6ed0cf53 MDL-48239 gradebook: Behat tests for calculated grade items. 2015-07-02 11:27:11 +08:00
Adrian Greeve c81c8a2ae8 MDL-48239 gradebook: Calculated grades maxgrade now able to be set. 2015-07-02 11:27:11 +08:00
Andrew Hancox 4d0d11b6d6 MDL-48970 groups: Fix hover description on groups overview page
If a course exists within multiple groupings then the description
should display when you mouseover any instance of it on the overview
page.
2015-07-01 21:27:40 +01:00
Rajesh Taneja e6ad444ea1 MDL-50481 behat: SingleSelect can be urlselect and should support id/name 2015-07-01 11:23:33 +08:00
David Monllao e87f4d63c3 Merge branch 'MDL-50497-M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2015-07-01 08:56:08 +08:00
Juan Leyva a809a8dcce MDL-50130 users: Filter profile fields data in external functions 2015-06-30 19:51:38 +02:00
AMOS bot 6314335c49 Automatically generated installer lang files 2015-07-01 00:04:59 +08:00
Dan Poltawski 3cb39c2a04 Merge branch 'wip-mdl-50481-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-06-30 12:25:53 +02:00
Dan Poltawski 30e59bbc21 Merge branch 'MDL-33765_m29_offset' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2015-06-30 12:20:09 +02:00
Dan Poltawski e228ce6e04 Merge branch 'MDL-47787-m29' of https://github.com/tbannister/moodle into MOODLE_29_STABLE 2015-06-30 10:25:15 +02:00
David Monllao d2cb356582 MDL-50569 backup: Missing get_target call 2015-06-30 10:33:14 +08:00
Dan Marsden 46460a2303 MDL-50614 mod_scorm: Improve validation on currentorg 2015-06-30 10:14:12 +08:00
David Monllao 0b715c77f2 Merge branch 'MDL-50569-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2015-06-30 09:32:31 +08:00
Mark Nelson adb234e19d MDL-50220 mod_forum: added missing capability check 2015-06-29 18:49:21 +02:00
Eloy Lafuente (stronk7) 5656fdb9c9 Merge branch 'wip-mdl-50675-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-06-29 18:33:08 +02:00
Eloy Lafuente (stronk7) 5710353976 MDL-50688 lib: small cleanup + http/https coverage. 2015-06-29 17:49:41 +02:00
Petr Skoda 9580c08e9e MDL-50688 lib: fix local url validation bug
Change-Id: I350bb8c9ace5cc0403f083f728c100097be7aa7e
Reviewed-on: https://review.totaralms.com/8101
Tested-by: Jenkins Automation <jenkins@totaralms.com>
Reviewed-by: Sam Hemelryk <sam.hemelryk@totaralms.com>
Reviewed-by: Alastair Munro <alastair.munro@totaralms.com>
2015-06-29 17:49:38 +02:00
Skylar Kelty 27478ecd47 MDL-50663 blocks: Fix /my/ page when in non-user context 2015-06-29 11:34:10 +01:00
Nadav Kavalerchik a2f36ceef5 MDL-50708 SCORM: Right align menu item folder icon, when in RTL mode. 2015-06-29 15:58:13 +08:00
Frederic Massart d3e9d99ccb MDL-50569 grades: Restore as merge always ignores minmaxtouse 2015-06-29 14:25:58 +08:00
Frederic Massart a603cb5af4 MDL-50569 grades: Handle minmaxtouse in backup/restore 2015-06-29 14:25:58 +08:00
David Monllao f9b6810d4e Merge branch 'MDL-50646-29-preflang' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2015-06-29 13:36:27 +08:00
David Monllao 0b89c8dd85 Merge branch 'MDL-50652_29' of git://github.com/reskit/moodle into MOODLE_29_STABLE 2015-06-29 13:02:06 +08:00
Mark Nelson f521c1e769 MDL-33765 filter_glossary: fixed jshint warning 2015-06-28 21:45:44 -07:00
Martin Mastny 4ca8ff532b MDL-33765 filter_glossary: Stacking JS windows with offset 2015-06-28 21:45:44 -07:00
Martin Mastny d5720db41e MDL-33765 mod_glossary: Concept in ajax request not linking to itself 2015-06-28 21:45:44 -07:00
David Monllao b04406e697 Merge branch 'wip_MDL-50659_m29' of git://github.com/gjb2048/moodle into MOODLE_29_STABLE 2015-06-29 11:48:12 +08:00
Rajesh Taneja 064cfdff92 MDL-50675 repository_wikimedia: Fixed title varaible 2015-06-29 09:57:03 +08:00
Rajesh Taneja dfec225a37 MDL-50675 repository_wikimedia: Wikimedia is using https and not http 2015-06-29 09:57:02 +08:00
Mary Evans b4faba939d MDL-50497 theme_bootstrapbase: Divider colours look wrong when inverted 2015-06-26 22:49:54 +01:00
Gareth J Barnard 5409b5a7ec MDL-50659 themes: Regression: Drag a link makes icons move. 2015-06-26 11:43:53 +01:00
Paul Nicholls b930cd1515 MDL-50699 Lesson: "Link to next activity" empty until Lesson saved
Due to a logic bug, the "Link to next activity" dropdown was empty (only
contains the "None" option) until the Lesson had been saved.  This minor
change allows a "next activity" to be specified when initially creating
the Lesson whilst still preventing the user from choosing the Lesson as its
own next activity.
2015-06-26 15:53:31 +12:00
Tyler Bannister 8f683efff3 MDL-47787 course: Added question delete to cm delete. 2015-06-25 16:37:52 -04:00
Marc Català d68806edf9 MDL-50652 workshop: Workshop module allows duplicated ID number 2015-06-25 14:26:29 +02:00
Marina Glancy a8646c70fa MDL-49257 grades: apply freeze when restoring with contents deleting 2015-06-25 14:40:36 +08:00
David Monllao d783a8fba7 weekly release 2.9+ 2015-06-25 13:50:14 +08:00
David Monllao 147aca3043 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-06-25 13:50:12 +08:00
Rajesh Taneja 532acaf5ac MDL-50481 core_grades: Fixed behat feature and step to work with non-js
xPath used in step is not using proper oring
and fails with goutee driver. Also, feature don't
really need to be executed in js, so setting that
as non-js
2015-06-25 13:14:08 +08:00
Rajesh Taneja bc7b926591 MDL-50481 behat: Press go button for given single select in non-js
For non-js mode, ensure we press the go button
for the specified single select, as there can be
multiple single selects on the page with go button
2015-06-25 13:14:08 +08:00
Marina Glancy b3892e62a5 MDL-49257 grades: strings adjustments 2015-06-25 10:00:02 +08:00
Eloy Lafuente (stronk7) e09d38647b MDL-49022 auth_ldap: keep method visibility unmodified. 2015-06-24 03:07:21 +02:00
Eloy Lafuente (stronk7) 005ead1f8a Merge branch 'wip-mdl-49022-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-06-24 03:03:07 +02:00
Eloy Lafuente (stronk7) c5bc16fe8a MDL-49497 curl: keep api private and test it using reflection.
While strictly we should not be testing private APIs, in order
to get this backported to stables without changing visibility
we use reflection to access to such private properties and methods.

Also added one exttest to verify user agent is properly sent.

Finally, fix some wrong whitespace and changed the helper class name
to better alternative.
2015-06-23 16:25:53 +01:00
Dan Poltawski cdca00ca81 Merge branch 'MDL-49497-29' of git://github.com/gurgus/moodle into MOODLE_29_STABLE 2015-06-23 16:25:40 +01:00
Dan Poltawski b29b31dc12 Merge branch 'MDL-50533-29' of git://github.com/jethac/moodle into MOODLE_29_STABLE 2015-06-23 14:13:13 +01:00
Dan Poltawski 4342a37310 Merge branch 'wip-MDL-49257-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-06-23 11:20:28 +01:00
Rajesh Taneja 824bbbcb3f MDL-49022 auth_ldap: Updated unit test, checking sync_user events 2015-06-23 17:02:36 +08:00
Mark Ward fd954ad01b MDL-49022 auth_ldap: trigger event when required.
When calling update_user_record() for auth_ldap the method
now has option to trigger event core\event\user_updated when
syncing with domain controller.
This means that the event will be triggered by sync_users()
but not by user_signup().
2015-06-23 17:02:36 +08:00
Marina Glancy 5edd9315d1 MDL-49257 grades: behat tests for extra credit 2015-06-23 14:24:37 +08:00
Marina Glancy 9c4b068082 MDL-49257 grades: fix bugs with extra credit weights
When we adjust the weights in natural grading (setup screen), the extra credit items
should not depend on other overrides. If extra credit item's weight was overriden, it stays as it is.
Otherwise it is calculated as itemgrademax / totalgrademax (total excludes extra credit items)
2015-06-23 14:24:37 +08:00
Marina Glancy e806e2c9f7 MDL-49257 grades: introduce calculation freeze
In order to prevent changes in the existing grades when we fix bugs
we are introducing the gradebook code versioning. Each course may
"freeze" the code version to the older date. Freezing is usually done
during upgrade or restore and can be removed by the teacher by pressing
the button and accepting potential grade changes. There is no visible
setting and not possible to change the version back manually.

See MDL-50432 and MDL-50522
2015-06-23 14:24:33 +08:00
David Monllao ba0e10425f MDL-50611 testing: Extra http status code checking 2015-06-23 10:38:00 +08:00
David Monllao 0c2db45a76 Merge branch 'MDL-50611-29' of git://github.com/LukeCarrier/moodle into MOODLE_29_STABLE 2015-06-23 10:28:19 +08:00
spvickers bfebfd5b28 MDL-49185 mod_lti: Check for all capabilities
Added check for explicit and implicit enabled capabilities when parsing
a custom parameter.
2015-06-23 10:26:18 +08:00
Eloy Lafuente (stronk7) 3f33350e0d Merge branch 'MDL-50171-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-06-23 01:43:08 +02:00
Eloy Lafuente (stronk7) c9f8064b23 Merge branch 'MDL-50089-29' of git://github.com/merrill-oakland/moodle into MOODLE_29_STABLE 2015-06-22 19:59:14 +02:00
Eloy Lafuente (stronk7) e107f6227c Merge branch 'MDL-50583_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-06-22 19:22:48 +02:00
Eric Merrill f5273c374f MDL-50089 grades: Use grade item min/max in exports 2015-06-22 12:59:30 -04:00
Luke Carrier 0e1a2090b8 MDL-50611 test: use cURL extension to download Composer
The curl binary is nowhere near as common in Windows environments as it is
in Linux and Mac ones. In order to encourage more users to adopt Behat and
PHPUnit for their testing, we should avoid introducing unnecessary
hurdles.
2015-06-22 15:50:46 +01:00
Dan Poltawski 1ee0876d3d Merge branch 'MDL-50460_M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE 2015-06-22 13:29:12 +01:00
Dan Poltawski a6640dcbe5 Merge branch 'MDL-50091_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-06-22 12:06:50 +01:00
David Monllao 73441dca38 Merge branch 'MDL-50622-29-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2015-06-22 17:44:31 +08:00
David Monllao f8cc4ea4a1 Merge branch 'MDL-50561-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-06-22 16:04:10 +08:00
David Monllao 9d1d7caafd Merge branch 'wip-MDL-50568-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-06-22 15:33:28 +08:00
David Monllao d88fa5e681 Merge branch 'wip-MDL-50580-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-06-22 12:50:29 +08:00
Tim Hunt 76ef7726e2 MDL-50648 grader report: columns misaligned with some permissions
If a user can see the grader report and singleview report, but not
the user report ($CFG->grade_profilereport) then the colspans
were wrong and so the columns did not line up under the right headers.
2015-06-19 12:37:24 +01:00
David Mudrák 5ac3194c6f MDL-50646 admin: Use site default lang as new user's preferred lang
As a result of MDL-49632, the preferred language is no longer part of
the "Add a new user" form. So the lang property is not passed to the
user_create_user() when creating a new user and the value always falls
back to "en" (which is the default defined in the database for this
column).

This patch makes sure that the site default language is used in such
case.
2015-06-19 13:17:52 +02:00
Helen Foster 497e490a6b MDL-50622 lang: Merge English strings from the en_fix language pack 2015-06-19 12:13:48 +02:00
Juan Leyva 5b41ec52f7 MDL-50561 messages: Add missing __isset magic method 2015-06-19 09:44:59 +02:00
Juan Leyva 45ced3d17d MDL-50171 data: Fixed incorrect text formatting in external functions 2015-06-19 09:44:07 +02:00
Mary Evans 200e4da537 MDL-50460 theme_bootstrapbase: Profile image overlays docked blocks. 2015-06-19 02:50:38 +01:00
AMOS bot 11189884a8 Automatically generated installer lang files 2015-06-19 00:04:11 +08:00
Dan Poltawski ca587e8819 weekly release 2.9+ 2015-06-18 14:03:11 +01:00
Dan Poltawski bffd9c6ad2 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-06-18 14:03:09 +01:00
Skylar Kelty dc4e443256 MDL-50637 calendar: Fix subscription table layout 2015-06-18 13:23:27 +01:00
Tim Hunt 0aa98ebda1 MDL-50091 grade singleview: use standard API to build the link
Acutally the necessary code was already there. There was just some
unnecessary code that was added with the issue number MDL-47746. I have
just stripped out the unused code, which fixes the bug where a missing
activity caused a fatal error.
2015-06-17 13:56:31 +01:00
Eloy Lafuente (stronk7) 78c315db76 Merge branch 'MDL-50004-M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE 2015-06-17 00:59:05 +02:00
Eloy Lafuente (stronk7) 8ceecd98a8 Merge branch 'MDL-50107-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-06-17 00:16:34 +02:00
AMOS bot 775f5d6a9f Automatically generated installer lang files 2015-06-17 00:04:02 +08:00
AMOS bot 99f4c550f2 Automatically generated installer lang files 2015-06-17 00:04:02 +08:00
Dan Poltawski f102573e45 Merge branch 'MDL-49959_course_dnd_message_MDL29' of https://github.com/barrysspace/moodle into MOODLE_29_STABLE 2015-06-16 13:08:40 +01:00
Martin Mastny b848eeacc8 MDL-49744 JavaScript: Glossary term window is draggable 2015-06-16 10:19:23 +01:00
Jetha Chan c74f2c3e70 MDL-50533 theme_bootstrapbase: retarget collapse styles 2015-06-16 16:29:12 +08:00
Andrew Nicols 95554b45b6 Merge branch 'wip-MDL-50216-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2015-06-16 12:22:28 +08:00
Andrew Nicols 2bea2a1918 MDL-39353 xmlrpc: Add note to upgrde.txt regarding proxybypass 2015-06-16 11:34:21 +08:00
Andrew Nicols f934fdf46c Merge branch 'MDL-39353-29' of https://github.com/rtcn2/moodle into MOODLE_29_STABLE 2015-06-16 11:33:16 +08:00
Martin Mastny 7d1d36e036 MDL-50216 JavaScript: Default visibility of M.core.info set to false 2015-06-16 11:20:51 +08:00
Andrew Nicols ca4c8b1942 Merge branch 'MDL-50380-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-06-16 07:58:16 +08:00
Dan Poltawski d0a5d336f7 Merge branch 'MDL-49368_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-06-15 12:33:30 +01:00
Marina Glancy 893d5e69a0 MDL-50580 signup: move recaptcha outside of category 2015-06-15 17:14:59 +08:00
Andrew Nicols f74ae05201 Merge branch 'MDL-50459-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-06-15 16:03:38 +08:00
Andrew Nicols 14e7f3c3b7 Merge branch 'wip-MDL-50222-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-06-15 15:17:04 +08:00
GeekSmith 7c6d8dd8e0 MDL-50583 upgrade: Optimize upgrade_minmaxgrade
Reverse join order to use existing database keys. Changed query to use the
more easily read NOT IN.
2015-06-15 10:39:26 +08:00
Andrew Nicols e82c2eb2b1 Merge branch 'MDL-50438-29' of git://github.com/mastnym/moodle into MOODLE_29_STABLE 2015-06-15 10:21:13 +08:00
Andrew Nicols 87cd84ddb7 Merge branch 'MDL-50509-29-vartypo' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2015-06-15 09:59:25 +08:00
Andrew Nicols 531908df75 MDL-50554 themes: Rebuild of bootstrapbase 2015-06-15 09:46:29 +08:00
Andrew Nicols ced7d04d07 Merge branch 'MDL-50520-29' of git://github.com/jethac/moodle into MOODLE_29_STABLE 2015-06-15 09:26:36 +08:00
Mary Evans d16724b42b MDL-50004 theme: Fixes frontpage coursename and enrolment icons. 2015-06-15 00:25:56 +01:00
Gareth J Barnard e0a114e4f5 MDL-50554 themes: Drag a link move mouse makes icons move in Chrome. 2015-06-14 21:40:16 +01:00
Dan Poltawski 0d7f387b37 weekly release 2.9+ 2015-06-12 10:24:43 +01:00
Dan Poltawski b8e8cbf3bb Merge branch 'MDL-48618_29-test-calculated' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-06-12 10:19:31 +01:00
Eloy Lafuente (stronk7) 887d0618cc MDL-50176 repository_youtube: delay loading google service stuff
Loading Google client services is a little monster, eating around
2MB (opcache enabled) of memory. As far as we instantiate the
repository instances really early, no matter they are not used
later (editor, file picker, admin...).. we are delaying the
load of the service until we know we are going to use it.

Surely applying this very same (sort of lazy load) techinque
to other repositories could lead to a nice memory reduction
in lots of pages.

MDL-50176 repository_youtube: also delay the inclusion of client.

While memory was fixed with previous commit, still some extra included
files where being reported, so go crazy and move all the stuff to
the new init delayed method.
2015-06-12 10:29:03 +02:00
David Monllao ab4665046a MDL-48618 grades: Testing calculated items with minmaxtouse 2015-06-12 14:06:18 +08:00
Marina Glancy 72e0a56673 MDL-50568 navigation: correct cap check 2015-06-12 10:48:08 +08:00
Frederic Massart eaf0d255b4 MDL-48618 grades: Do not run minmax upgrade for fresh installs 2015-06-11 17:16:40 +08:00
Rajesh Taneja ebae161cdf MDL-49659 theme_clean: Add login info in the nav bar 2015-06-11 10:00:30 +01:00
David Monllao 691c2913bb MDL-48618 upgrade: Matching conditions and upgrade savepoints 2015-06-11 15:03:19 +08:00
David Monllao fce1153108 MDL-48618 grades: Forcing new upgrade savepoint 2015-06-11 14:34:25 +08:00
David Monllao 2817ff06ae Merge branch 'MDL-48618-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2015-06-11 14:22:27 +08:00
Juan Leyva 61c8747a39 MDL-50107 webservices: Enable CORS in login/token.php 2015-06-10 11:36:28 +02:00
Rod Norfor 6e0401d61f MDL-39353 xmlrpc: Add proxy support 2015-06-10 08:19:39 +01:00
Frederic Massart 3391ece9f8 MDL-48618 grades: Test for the minmax upgrade step 2015-06-10 12:42:57 +08:00
Frederic Massart 6be25bc988 MDL-48618 grades: Behat tests to cover min/max grade changes
The values provided as part of this test are similar to values
that can be found in 2.7. This is to ensure that users will not
experience changes in grades.
2015-06-10 12:42:57 +08:00
Frederic Massart 3eb9b4a316 MDL-48618 grades: Unit tests for grade_grade::get_min/max_grade() 2015-06-10 12:42:56 +08:00
Frederic Massart f872eef1e9 MDL-48618 grades: Handling of inconsistencies due to min/max grades 2015-06-10 12:42:54 +08:00
Eric Merrill 0624b774d0 MDL-48618 gradebook: Only use individual min/max for aggrigate grades 2015-06-10 12:37:09 +08:00
Eloy Lafuente (stronk7) 3783dde956 Merge branch 'MDL-47480-29' of git://github.com/ankitagarwal/moodle into MOODLE_29_STABLE 2015-06-10 00:33:20 +02:00
Eloy Lafuente (stronk7) 98a8ef2777 Merge branch 'MDL-50145_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2015-06-09 20:43:01 +02:00
Eloy Lafuente (stronk7) e3cd190100 Merge branch 'm29_MDL-50415_Add_PHP_Variables_In_PHPInfo_Admin_Page' of https://github.com/scara/moodle into MOODLE_29_STABLE 2015-06-09 20:37:19 +02:00
Eloy Lafuente (stronk7) 9b1539c5d6 Merge branch 'wip-mdl-50179-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-06-09 20:33:04 +02:00
Eloy Lafuente (stronk7) d4990e4c94 Merge branch 'MDL-50176_29' of git://github.com/aolley/moodle into MOODLE_29_STABLE
Fixed the plugin version to have sticky YYYYMMDD
2015-06-09 20:17:45 +02:00
Ramindu Deshapriya 99422f333b MDL-43731 mod_book: Added Behat test to automate MDLQA-1791 2015-06-09 15:01:31 +01:00
Dan Poltawski 128a866390 Merge branch 'MDL-49659_M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE 2015-06-09 14:42:04 +01:00
Marina Glancy 1187ce03ec MDL-50222 admin: do not use deprecated print_textarea() 2015-06-09 20:58:32 +08:00
Andrew Davis 8f1d67ea09 MDL-49885 core_blocks: fixed course_overview block applicable_formats() 2015-06-09 13:57:44 +01:00
Martin Mastny 97c9eaefa8 MDL-50186 forms: Removed special characters from id attribute 2015-06-09 13:32:59 +01:00
Mark Nelson ca0042ca80 MDL-50145 mod_lesson: added behat test for multiple dashboard lessons 2015-06-09 00:49:19 -07:00
Mark Nelson bc10960447 MDL-50145 mod_lesson: fixed issue with duplicate values 2015-06-09 00:49:18 -07:00
Jetha Chan 7d0bdbe264 MDL-50520 templates: fix helpers not firing inside pix helper 2015-06-09 15:23:43 +08:00
Rajesh Taneja 4c07dea461 MDL-50179 lesson: Get student/attempts only when showing overview 2015-06-09 09:35:02 +08:00
Rajesh Taneja b09e7b4c7d MDL-50179 behat: Use %d for windows compatibility 2015-06-09 09:34:52 +08:00
Eloy Lafuente (stronk7) c0be92c749 Merge branch 'MDL-50394_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2015-06-08 18:40:38 +02:00
Eloy Lafuente (stronk7) ee4c6f78c6 Merge branch 'MDL-50408_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-06-08 15:49:16 +02:00
Juan Leyva e003e65ea8 MDL-50459 messages: Handle deleted users in external functions 2015-06-08 14:38:43 +02:00
David Mudrák b25bb3cf29 MDL-50509 datalib: Fix the typo in the variable name
The line is supposed to sanitize the function parameter.
2015-06-08 11:16:39 +02:00
Dave Cooper 5d8cfda315 MDL-49497 curl: Add configurable User-Agent unit tests. 2015-06-08 17:02:54 +08:00
Dave Cooper 1f2fbac207 MDL-49497 curl: Allow configurable User-Agent.
Thanks to Kartik Yadav for assistance with this patch.
2015-06-08 17:02:54 +08:00
Barry Oosthuizen 7955318e45 MDL-49959 course: Fix hidden drag and drop message 2015-06-08 09:35:59 +01:00
David Monllao 2799e8f70e MDL-50408 tool_log: Extra deprecation tip
Adding a debugging message and returning alternative data to keep backwards
compatibility as get_readers is a widely used function.
2015-06-08 15:57:41 +08:00
Eloy Lafuente (stronk7) 69ece23a48 Merge branch 'MDL-50456-29' of git://github.com/damyon/moodle into MOODLE_29_STABLE 2015-06-07 21:56:37 +02:00
Juan Leyva 1eb297becf MDL-50493 forum: Handle correctly qanda forums in get_discussion_posts 2015-06-06 00:01:34 +02:00
Mary Evans a81d590726 MDL-49659 theme: Removed home link and limited login info in secure.php
Credits: Thanks go to Andreas Hruska [https://github.com/ahruska] for the original patch for this issue.
2015-06-04 17:45:51 +01:00
Eloy Lafuente (stronk7) c3661ca0cc weekly release 2.9+ 2015-06-04 12:09:15 +02:00
Eloy Lafuente (stronk7) 5be5d4d2c9 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-06-04 12:09:10 +02:00
Rajesh Taneja 629f298ce7 MDL-47995 lib: encode title properly, before additing it to image title 2015-06-04 12:56:20 +08:00
Matteo Scaramuccia 8172729a07 MDL-50415 Admin: added the PHP Variables section in the PHPinfo page. 2015-06-03 21:19:07 +02:00
Eloy Lafuente (stronk7) 78285d5c9c Merge branch 'MDL-47995-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-06-03 11:10:57 +02:00
Simey Lameze 1fab00298d MDL-50380 mod_wiki: fix missing parameter on wiki edit files page
Also fixing a typo on the $referer variable.
2015-06-03 16:46:25 +08:00
Damyon Wiese e27f30b7c8 MDL-50456 Javascript: Fix simple logic error in core/url amd module 2015-06-03 15:59:53 +08:00
Mark Nelson 3af357dd2c MDL-50394 core_course: fixed form validation of 'gradepass' 2015-06-03 00:36:13 -07:00
Dan Poltawski c5e83ccab0 Merge branch 'MDL-49323-29' of git://github.com/nmoller/moodle into MOODLE_29_STABLE 2015-06-02 13:23:29 +01:00
Dan Poltawski ea20d927ad Merge branch 'MDL-46927_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2015-06-02 09:03:53 +01:00
Martin Mastny 6964dc6e73 MDL-50438 filter_glossary: Added missing exception classes 2015-06-02 14:22:43 +08:00
Mark Nelson 80f8e00bd7 MDL-46927 core_files: fixed issue with system course restores
When clicking on 'Restore' next to a file in the 'Course
backup area' in the system context the message 'Sorry,
the requested file could not be found' was displayed.
This fix adds missing functionality to the class
'file_info_context_system' so that the file information
is correctly returned.
2015-06-01 23:09:17 -07:00
Ankit Agarwal 53f0b8ae3c MDL-47480 tasks: Define order for getting tasks 2015-06-02 08:18:42 +05:30
AMOS bot 377ec4c107 Automatically generated installer lang files 2015-06-02 00:04:16 +08:00
Nelson Moller 659c60614b MDL-49323 mod_assign: Fixed numeric validation in grade form.
The behat test for another decimal separator was incorporated.
2015-06-01 11:00:12 -04:00
Dan Poltawski f0a7bbcd14 Merge branch 'MDL-50341_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-06-01 15:03:42 +01:00
Dan Poltawski 3372a99e13 MDL-50322 forum: add basic split post behat coverage
Also bump version for autoloading new class.
2015-06-01 14:59:41 +01:00
Martin Mastny 6f7bf269b2 MDL-50322 mod_forum: Added validation when spliting discussions 2015-06-01 14:56:31 +01:00
Dan Poltawski a48f97d414 Merge branch 'MDL-50304_29' of https://github.com/jinhofer/moodle into MOODLE_29_STABLE 2015-06-01 13:21:55 +01:00
Dan Poltawski 8f4a31ce65 MDL-50406 less: build css 2015-06-01 12:01:07 +01:00
Dan Poltawski 4f27bea28b Merge branch 'MDL-50406_M29' of git://github.com/nadavkav/moodle into MOODLE_29_STABLE 2015-06-01 11:42:23 +01:00
Dan Poltawski caaf4113ce Merge branch 'MDL-50309_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2015-06-01 10:26:50 +01:00
Dan Poltawski 5ed79f4e97 Merge branch 'MDL-49707-29' of git://github.com/ankitagarwal/moodle into MOODLE_29_STABLE 2015-06-01 10:19:37 +01:00
Ankit Agarwal 1f797413d4 MDL-49707 inbound: localpart should be < 15 2015-06-01 10:10:39 +05:30
Adam Olley 28e427c0f9 MDL-50176 repository_youtube: Switch to using YouTube Data API
As of April 20, 2015, the old API used by repository_youtube is no longer
accessible. This change switches over to using the standard Google Data
API v3.

Unfortunately this means that to search YouTube, a developer api key is now
*required*.

Special thanks to UNSW for sponsoring this work.
2015-06-01 09:40:14 +09:30
Tim Hunt 71b448e27d MDL-50341 quiz statistics: non-attempted questions broke first-try stats
For behaviours that allow multiple tries, and when the teacher had chosen to
generate statistics for the first tries only, and when a student had not
attempted one question, then an error occurred. It should have been classified
as no response.
2015-05-31 13:53:08 +01:00
AMOS bot 47596be087 Automatically generated installer lang files 2015-05-31 00:03:58 +08:00
Nadav Kavalerchik 199fbeb647 MDL-50406 Messages: Right align messages menu box, in RTL mode. 2015-05-30 12:13:16 +03:00
AMOS bot 8389e416a4 Automatically generated installer lang files 2015-05-30 00:04:06 +08:00
AMOS bot 3143816be1 Automatically generated installer lang files 2015-05-29 00:03:59 +08:00
jinhofer 5a561e90c3 MDL-50304 atto/plugins/table: Fixed _addRowAfter function 2015-05-28 07:55:26 -05:00
AMOS bot 314eb4342c Automatically generated installer lang files 2015-05-28 14:21:58 +08:00
Mark Nelson b73491b280 MDL-50309 core_upgrade: fixed undefined '$customusermenuitems' notice 2015-05-27 22:43:25 -07:00
David Monllao d91491569c weekly release 2.9+ 2015-05-28 10:55:09 +08:00
David Monllao a38b6660e4 Merge branch 'MDL-50373_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-05-28 09:28:10 +08:00
Tim Hunt 18dd4e5d9b MDL-50373 questions: random Qs must not pick deleted or sub- questions
This was a regression caused by MDL-6340. I missed the necessary
    AND parent = 0 AND hidden = 0
in one query of the question table.
2015-05-27 20:35:24 +01:00
Eloy Lafuente (stronk7) 3d944b0454 Merge branch 'wip-mdl-49806-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-05-27 12:36:49 +02:00
David Monllao a8b977172a MDL-50330 blog: Make other users blogs accessible 2015-05-27 14:10:20 +08:00
David Monllao deb125fa6d Merge branch 'MDL-50340-29' of git://github.com/ankitagarwal/moodle into MOODLE_29_STABLE 2015-05-27 11:58:41 +08:00
Rajesh Taneja 1cb3091780 MDL-49772 behat: Removed optimization as it's not required
This api is called very few times in behat
initilisation process, so such optimization
is an over engineer. Hence removing it.
2015-05-27 11:51:34 +08:00
Rajesh Taneja 3ac8f0c5e3 MDL-49806 behat: Ensure user is marked complete before runnning cron 2015-05-27 09:25:47 +08:00
Aaron Barnes 7ee737690a MDL-49611 completion: Update dangling err_nocriteria lang strings 2015-05-27 08:49:46 +08:00
Eloy Lafuente (stronk7) e600df800c Merge branch 'wip-mdl-49772-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-05-27 01:45:50 +02:00
Eloy Lafuente (stronk7) b77a45c3a2 Merge branch 'wip-MDL-50191-m29' of https://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-05-26 18:19:49 +02:00
Dan Poltawski 0e0e83abdf Merge branch 'MDL-50318-29-courseresources' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2015-05-26 13:05:06 +01:00
Dan Poltawski 777f822fad Merge branch 'MDL-49787_email_attachments_symlink_fix_29' of https://github.com/iamandrew/moodle into MOODLE_29_STABLE 2015-05-26 12:56:31 +01:00
Dan Poltawski a694acd9b8 Merge branch 'MDL-49776-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-05-26 11:53:46 +01:00
Marina Glancy 0676b9c186 MDL-49560 webservice: avoid recursion in soap
Thanks to El Leonidych for providing a patch
2015-05-26 11:33:42 +01:00
Dan Poltawski 5c5fb8bd8f Merge branch 'MDL-50271-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-05-26 11:31:48 +01:00
David Monllao cdd1fcbf45 Merge branch 'MDL-50344-29' of git://github.com/ankitagarwal/moodle into MOODLE_29_STABLE 2015-05-26 17:29:38 +08:00
Jetha Chan 55cf90e9db MDL-48664 output: change paging_bar to not use non-breaking spaces 2015-05-26 14:46:12 +08:00
Ankit Agarwal f59d6a6fcf MDL-50340 adminstration: Fix restore course links 2015-05-26 12:04:41 +05:30
David Monllao ad9131d75d Merge branch 'MDL-46550-29' of git://github.com/ankitagarwal/moodle into MOODLE_29_STABLE 2015-05-26 12:29:17 +08:00
David Monllao 6e54261fe8 Merge branch 'MDL-50289-29-notes' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2015-05-26 12:23:34 +08:00
Dan Poltawski fdfea113b5 Merge branch 'MDL-50313-29-featureidnumber' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2015-05-25 13:54:06 +01:00
Dan Poltawski 267238bac4 Merge branch 'MDL-50321-29-modupgradetxt' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2015-05-25 12:30:34 +01:00
Nadav Kavalerchik 83a061c8e8 MDL-40592 assign/grading: Display default user picture, if none is set. 2015-05-25 12:28:49 +01:00
Martin Mastny e1cd01e60e MDL-49493 backup: Implemented missing methods for anonymous backup 2015-05-25 12:02:02 +01:00
David Mudrák 32eb50d49b MDL-50289 notes: No navigation to notes if the feature is disabled 2015-05-25 12:36:10 +02:00
David Monllao c3b65cc9e9 Merge branch 'wip-MDL-49572-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-05-25 17:54:31 +08:00
Damien Bezborodov 544a4f57ec MDL-50285 gradereport_user: Grade categories calculate wrong with suspended users (Student's view) 2015-05-25 17:44:09 +08:00
Ankit Agarwal 44ad175eda MDL-50344 restore: Make restore file required 2015-05-25 12:08:51 +05:30
spvickers 628bee355e MDL-49776 mod_lti: Set parameter in privacy check
Moved sending of the lis_result_sourcedid parameter to within the block
which checks that grades are being accepted for the link.
2015-05-25 13:02:11 +08:00
iclearn fcd6880e1e MDL-47995 mod_url: add proper title encoding on url mod 2015-05-25 12:55:22 +08:00
iclearn 159a8fda78 MDL-47995 mod_resource: properly encode resource title 2015-05-25 12:55:22 +08:00
Juan Leyva ecdadf2a18 MDL-50271 webservices: Allow to load multiple themes in WS_SERVER mode 2015-05-22 13:27:14 +02:00
Adrian Greeve c1813cf5d9 MDL-50330 blog: Behat test for blog visibility. 2015-05-22 16:15:59 +08:00
Adrian Greeve ed97ad100b MDL-50330 blog: Fixed fatal error accessing blogs. 2015-05-22 16:15:46 +08:00
Tim Hunt 609e3cfc0b MDL-49368 qtypes match & multichice: cope with editing after attempt
Teachers should not radically edit a question after it has been
attempted. However, if they do, we should handle it gracefully, rather
than triggering PHP errors.
2015-05-21 18:17:40 +01:00
David Mudrák f2a6afba21 MDL-50321 docs: Add info about deprecated method into mod/upgrade.txt
This was forgotten in MDL-49101.
2015-05-21 18:03:26 +02:00
David Mudrák 60fa8157f2 MDL-50318 course: Fix the URL of embedded images at resources overview
Not only mod_resource instances are listed here. All modules that
declare their FEATURE_MOD_ARCHETYPE as MOD_ARCHETYPE_RESOURCE (well, all
but those without own view page, such as mod_label) are listed. So we
must use the real plugin name when rendering the intro field.
2015-05-21 17:22:42 +02:00
David Mudrák 723f9b73eb MDL-50313 docs: Fix the documentation for the FEATURE_IDNUMBER constant
The constant is used by course/moodleform_mod.php to decide whether the
field 'ID number' (cmidnumber) should be included in the common module
settings section of the activity settings form. Activity modules that do
not use grades (such as the Label) can explicitly return false when
checking for this feature support. By default, all activity modules are
supposed to support it.
2015-05-21 16:51:31 +02:00
Eloy Lafuente (stronk7) 4cf3969700 weekly release 2.9+ 2015-05-21 12:37:27 +02:00
Rajesh Taneja 73cc1d04c9 MDL-49772 behat: Added support to updatestep file by parallel run 2015-05-21 14:46:13 +08:00
Marina Glancy bd13927c47 MDL-50191 cohorts: check manage cap to display hide icon 2015-05-21 11:11:42 +08:00
Andrew Nicols 198c3fb3f0 MDL-50277 Javascript: Hardcode nodejs dependencies
In order to produce a consistent build across the board, we must hardcode
several package versions. We must additionally specify compatible
versions for any sub-dependency that we have a requirement upon.

In this instance, the only sub-dependency which has an effect upon the
overall output is grunt-contrib-uglify's dependency upon uglify-js.

Since change in uglify-js may lead to changes in the generated output, we
must specify a fixed version of that dependency. That version must be
compatible with the dependency signature for grunt-contrib-uglify or the
dependency manager will just download a different version.

This issue also bumps the version of uglify-js to a version which changes
the output. This is the latest version at time of commit.
2015-05-20 11:09:25 +02:00
Marina Glancy 690725416b MDL-49572 cache: correctly purge cache on event 2015-05-20 14:07:11 +08:00
Rajesh Taneja 058b07958b MDL-49061 behat: Fixed input name to use full activity name 2015-05-20 10:18:53 +08:00
Eloy Lafuente (stronk7) d5307d89e3 Merge branch 'wip-mdl-50259-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-05-19 18:02:43 +02:00
Marina Glancy d5df44623f MDL-49061 reports: call format_string on activities names 2015-05-19 15:00:46 +01:00
Dan Poltawski dfa7e964c5 Merge branch 'wip-mdl-50203-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-05-19 12:38:58 +01:00
Ankit Agarwal 7c964c9fac MDL-50276 forums: Add a new line in forum emails 2015-05-19 15:47:02 +08:00
Dan Poltawski d014bdea09 Merge branch 'wip-mdl-50116-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-05-19 08:27:56 +01:00
Rajesh Taneja 5c57e2ad47 MDL-50259 behat: Use strict activity name checking
contains might select wrong activity
so using strict activity text checking
2015-05-19 14:47:24 +08:00
Rajesh Taneja 7e41013038 MDL-50116 behat: Fixed xpath for selecting table row 2015-05-19 13:36:07 +08:00
Skylar Kelty 35a0d15031 MDL-50169: Fix grade report SQL logic 2015-05-19 02:03:30 +02:00
Eloy Lafuente (stronk7) aff87a12e2 Merge branch 'MDL-50280_29' of https://github.com/sk-unikent/moodle into MOODLE_29_STABLE 2015-05-19 01:43:13 +02:00
Eric Merrill 954626a2b9 MDL-48467 atto: Clean the textarea during submission when in HTML mode 2015-05-19 01:38:29 +02:00
Eloy Lafuente (stronk7) 41c398aa5c Merge branch 'MDL-50197_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-05-19 00:35:40 +02:00
Eloy Lafuente (stronk7) 0809c38938 Merge branch 'MDL-50245_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-05-19 00:33:15 +02:00
Skylar Kelty 69afba56e6 MDL-50280 WebCT import scripts don't always clean up 2015-05-18 16:47:25 +01:00
Martin Mastny 44be211cb2 MDL-49949 grader: Using method to determine item name 2015-05-18 15:34:06 +01:00
Dan Poltawski 3dd7be272f Merge branch 'MDL-49764_29' of https://github.com/jinhofer/moodle into MOODLE_29_STABLE 2015-05-18 15:28:59 +01:00
Dan Poltawski ea3f6e2b75 Merge branch 'MDL-49906-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-05-18 14:04:12 +01:00
Dan Poltawski 22d4ded11f Merge branch 'MDL-50092_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-05-18 13:58:21 +01:00
jinhofer 0161f4f957 MDL-49764 grade/report/grader: Fixed height issue for IE 2015-05-18 07:48:43 -05:00
Damyon Wiese 383aa049c0 MDL-50254 Mustache: Missing alias for namespaced class in mustache
Thanks to Francesco Bigiarini for the report and suggested fix.
2015-05-18 13:09:54 +01:00
Dan Poltawski 3257b829a8 Merge branch 'MDL-50177_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-05-18 13:03:25 +01:00
Andrew Davidson 38a659dc10 MDL-49787 email: Updated email attachement path check to use realpath() in order to allow for symlinked temp directories 2015-05-18 12:03:40 +01:00
Ankit Agarwal 356c4ae63e MDL-46550 logs: Fix incorrect url
Thanks to Nadav Kavalerchik for the suggestion on patch
2015-05-18 12:02:48 +05:30
Adrian Greeve 3f87e8e54b MDL-49742 lib: Removed additional names on tables for sorting.
When additional names are disabled, they are no longer shown as
sortable headings in the enrolment and admin user tables.
2015-05-15 15:45:04 +08:00
Rajesh Taneja 859aac85c4 MDL-50116 behat: updated symfony/symfony version 2015-05-15 10:10:13 +08:00
Tim Hunt 55f468ff62 MDL-50245 quiz: fix CSS of search options in the qbank dialogue 2015-05-14 14:41:14 +01:00
David Monllao 2138e7eddc weekly release 2.9+ 2015-05-14 11:34:32 +08:00
Rajesh Taneja f47d844c68 MDL-50203 behat: Click on link in student 1 row 2015-05-13 15:21:00 +08:00
Simey Lameze f007447294 MDL-49906 core_user: add require login exception message 2015-05-13 13:54:48 +08:00
Damyon Wiese 4590d1be1e MDL-25138 core_tags: remove duplicated related tags 2015-05-13 10:25:17 +08:00
Simey Lameze a236699367 MDL-25138 core_tag: fix correlated tags query unique error 2015-05-13 10:25:11 +08:00
David Monllao f461827532 MDL-50187 docs: Including all x.y releases 2015-05-12 09:51:55 +02:00
David Monllao 406af5521c MDL-50177 completion: Also accepting cm integer strings 2015-05-12 12:21:39 +08:00
David Monllao a229c2fb0f Merge branch 'MDL-34102' of git://github.com/jmvedrine/moodle into MOODLE_29_STABLE 2015-05-12 12:09:06 +08:00
Eloy Lafuente (stronk7) 057cf60bd7 MDL-50183 upgrade: add 2.9.0 separation line to all upgrade scripts 2015-05-12 00:23:59 +02:00
Tim Hunt cd3cd9ffc3 MDL-50197 quiz editing: fix dialogue titles at the end of the quiz 2015-05-11 17:21:02 +01:00
David Monllao 5e236840b0 MDL-50092 enrol_imsenterprise: Fixing wrong field name
Thanks to JD for the fix.
2015-05-11 14:55:22 +08:00
Jean-Michel Vedrine 2107531f3c MDL-34102 mod_lesson: display feedback
Feedback for incorrect answer was not diplayed when
Provide option to try a question again was set to Yes.
2015-05-02 15:01:17 +02:00
651 changed files with 13337 additions and 2457 deletions
@@ -0,0 +1,103 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This script fixes orphaned question categories.
*
* Orphaned question categories have had their associated context deleted
* but the category itself remains in the database with an invalid context.
*
* @package core
* @subpackage cli
* @copyright 2013 Tyler Bannister (tyler.bannister@remote-learner.net)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require(__DIR__.'/../../config.php');
require_once($CFG->libdir.'/clilib.php');
require_once($CFG->libdir.'/questionlib.php');
$long = array('fix' => false, 'help' => false);
$short = array('f' => 'fix', 'h' => 'help');
// Now get cli options.
list($options, $unrecognized) = cli_get_params($long, $short);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
if ($options['help']) {
$help =
"Fix orphaned question categories.
This scripts detects question categories that have had their
context deleted, thus severing them from their original purpose.
This script will find the orphaned categories and delete the unused
questions in each category found. Used questions will not be
deleted, instead they will be moved to a rescue question category.
Options:
-h, --help Print out this help
-f, --fix Fix the orphaned question categories in the DB.
If not specified only check and report problems to STDERR.
Example:
\$sudo -u www-data /usr/bin/php admin/cli/fix_orphaned_question_categories.php
\$sudo -u www-data /usr/bin/php admin/cli/fix_orphaned_question_categories.php -f
";
echo $help;
die;
}
cli_heading('Checking for orphaned categories');
$sql = 'SELECT qc.id, qc.contextid, qc.name
FROM {question_categories} qc
LEFT JOIN {context} c ON qc.contextid = c.id
WHERE c.id IS NULL';
$categories = $DB->get_recordset_sql($sql);
$i = 0;
foreach ($categories as $category) {
$i += 1;
echo "Found orphaned category: {$category->name}\n";
if (!empty($options['fix'])) {
echo "Cleaning...";
// One transaction per category.
$transaction = $DB->start_delegated_transaction();
question_category_delete_safe($category);
$transaction->allow_commit();
echo " Done!\n";
}
}
if (($i > 0) && !empty($options['fix'])) {
echo "Found and removed {$i} orphaned question categories\n";
} else if ($i > 0) {
echo "Found {$i} orphaned question categories. To fix, run:\n";
echo "\$sudo -u www-data /usr/bin/php admin/cli/fix_orphaned_question_categories.php --fix\n";
} else {
echo "No orphaned question categories found.\n";
}
$categories->close();
+23
View File
@@ -1027,6 +1027,7 @@
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.4.4" level="required">
<RESTRICT function="restrict_php_version_7" message="unsupportedphpversion7" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -1134,6 +1135,16 @@
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="2.8" requires="2.2">
@@ -1150,6 +1161,7 @@
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.4.4" level="required">
<RESTRICT function="restrict_php_version_7" message="unsupportedphpversion7" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -1257,6 +1269,16 @@
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="2.9" requires="2.2">
@@ -1273,6 +1295,7 @@
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.4.4" level="required">
<RESTRICT function="restrict_php_version_7" message="unsupportedphpversion7" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
+9 -1
View File
@@ -513,7 +513,15 @@ if (isguestuser()) {
redirect(get_login_url());
}
$context = context_system::instance();
require_capability('moodle/site:config', $context);
if (!has_capability('moodle/site:config', $context)) {
// Do not throw exception display an empty page with administration menu if visible for current user.
$PAGE->set_title($SITE->fullname);
$PAGE->set_heading($SITE->fullname);
echo $OUTPUT->header();
echo $OUTPUT->footer();
exit;
}
// check that site is properly customized
$site = get_site();
+1 -1
View File
@@ -11,7 +11,7 @@
echo '<div class="phpinfo">';
ob_start();
phpinfo(INFO_GENERAL + INFO_CONFIGURATION + INFO_MODULES);
phpinfo(INFO_GENERAL + INFO_CONFIGURATION + INFO_MODULES + INFO_VARIABLES);
$html = ob_get_contents();
ob_end_clean();
@@ -472,7 +472,9 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
}
protected function get_description_field($id) {
return print_textarea(true, 10, 50, 50, 10, 'description', $this->role->description, 0, true);
return '<textarea class="form-textarea" id="'. s($id) .'" name="description" rows="10" cols="50">' .
htmlspecialchars($this->role->description) .
'</textarea>';
}
protected function get_archetype_field($id) {
+2
View File
@@ -46,6 +46,8 @@ $resultshtml = admin_search_settings_html($query); // case insensitive search on
echo '<form action="' . $PAGE->url->out(true) . '" method="post" id="adminsettings">';
echo '<div>';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
// HACK to prevent browsers from automatically inserting the user's password into the wrong fields.
echo prevent_form_autofill_password();
echo '</div>';
echo '<fieldset>';
echo '<div class="clearer"><!-- --></div>';
+4
View File
@@ -77,6 +77,8 @@ if (empty($SITE->fullname)) {
echo html_writer::input_hidden_params($PAGE->url);
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<input type="hidden" name="return" value="'.$return.'" />';
// HACK to prevent browsers from automatically inserting the user's password into the wrong fields.
echo prevent_form_autofill_password();
echo $settingspage->output_html();
@@ -119,6 +121,8 @@ if (empty($SITE->fullname)) {
echo html_writer::input_hidden_params($PAGE->url);
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<input type="hidden" name="return" value="'.$return.'" />';
// HACK to prevent browsers from automatically inserting the user's password into the wrong fields.
echo prevent_form_autofill_password();
echo $OUTPUT->heading($settingspage->visiblename);
echo $settingspage->output_html();
+1 -1
View File
@@ -46,7 +46,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$ADMIN->add('courses',
new admin_externalpage('restorecourse', new lang_string('restorecourse', 'admin'),
new moodle_url('/backup/restorefile.php', array('contextid' => context_system::instance()->id)),
array('moodle/course:create')
array('moodle/restore:restorecourse')
)
);
+2
View File
@@ -76,6 +76,8 @@ if (has_capability('moodle/grade:manage', $systemcontext)
$temp->add(new admin_setting_special_gradepointdefault());
$temp->add(new admin_setting_special_grademinmaxtouse());
$temp->add(new admin_setting_my_grades_report());
$temp->add(new admin_setting_configtext('gradereport_mygradeurl', new lang_string('externalurl', 'grades'),
+21 -1
View File
@@ -97,7 +97,7 @@ if (!empty($options['help'])) {
$cwd = getcwd();
// For drop option check if parallel site.
if ((empty($options['parallel'])) && $options['drop']) {
if ((empty($options['parallel'])) && ($options['drop']) || $options['updatesteps']) {
// Get parallel run info from first run.
$options['parallel'] = behat_config_manager::get_parallel_test_runs($options['fromrun']);
}
@@ -172,6 +172,26 @@ if ($options['diag'] || $options['enable'] || $options['disable']) {
}
}
} else if ($options['updatesteps']) {
// Rewrite config file to ensure we have all the features covered.
if (empty($options['parallel'])) {
behat_config_manager::update_config_file();
} else {
// Update config file, ensuring we have up-to-date behat.yml.
for ($i = $options['fromrun']; $i <= $options['torun']; $i++) {
$CFG->behatrunprocess = $i;
behat_config_manager::update_config_file();
}
unset($CFG->behatrunprocess);
}
// Do it sequentially as it's fast and need to be displayed nicely.
foreach (array_chunk($cmds, 1, true) as $cmd) {
$processes = cli_execute_parallel($cmd, __DIR__);
print_sequential_output($processes);
}
exit(0);
} else {
// We should never reach here.
echo $help;
+4 -3
View File
@@ -199,9 +199,6 @@ if ($options['install']) {
exit(1);
}
// Rewrite config file to ensure we have all the features covered.
behat_config_manager::update_config_file();
// Run behat command to get steps in feature files.
$featurestepscmd = behat_command::get_behat_command(true);
$featurestepscmd .= ' --config ' . behat_config_manager::get_behat_cli_config_filepath();
@@ -263,6 +260,10 @@ function print_update_step_output($process, $featurestepfile) {
$steps[$step[0]] = $step[1];
}
}
if ($existing = @json_decode(file_get_contents($featurestepfile), true)) {
$steps = array_merge($existing, $steps);
}
arsort($steps);
if (!@file_put_contents($featurestepfile, json_encode($steps, JSON_PRETTY_PRINT))) {
@@ -15,7 +15,6 @@ Feature: Edit capabilities
| user | course | role |
| teacher1 | C1 | editingteacher |
@javascript
Scenario: Default system capabilities modification
Given I log in as "admin"
And I set the following system permissions of "Teacher" role:
@@ -30,7 +29,6 @@ Feature: Edit capabilities
And "moodle/grade:managesharedforms" capability has "Prevent" permission
And "moodle/course:request" capability has "Prohibit" permission
@javascript
Scenario: Course capabilities overrides
Given I log in as "teacher1"
And I follow "Course 1"
@@ -41,11 +39,11 @@ Feature: Edit capabilities
| mod/forum:editanypost | Prevent |
| mod/forum:addquestion | Allow |
When I set the field "Advanced role override" to "Student (3)"
And I press "Go"
Then "mod/forum:deleteanypost" capability has "Prohibit" permission
And "mod/forum:editanypost" capability has "Prevent" permission
And "mod/forum:addquestion" capability has "Allow" permission
@javascript
Scenario: Module capabilities overrides
Given I log in as "teacher1"
And I follow "Course 1"
@@ -60,6 +58,7 @@ Feature: Edit capabilities
| mod/forum:editanypost | Prevent |
| mod/forum:addquestion | Allow |
When I set the field "Advanced role override" to "Student (3)"
And I press "Go"
Then "mod/forum:deleteanypost" capability has "Prohibit" permission
And "mod/forum:editanypost" capability has "Prevent" permission
And "mod/forum:addquestion" capability has "Allow" permission
@@ -13,7 +13,6 @@ Feature: Transform steps arguments
And I follow "Preferences" in the user menu
And I follow "Edit profile"
@javascript
Scenario: Use nasty strings on steps arguments
When I set the field "Surname" to "$NASTYSTRING1"
And I set the field "Description" to "$NASTYSTRING2"
@@ -24,7 +23,6 @@ Feature: Transform steps arguments
And the field "Surname" matches value "$NASTYSTRING1"
And the field "City/town" matches value "$NASTYSTRING3"
@javascript
Scenario: Use nasty strings on table nodes
When I set the following fields to these values:
| Surname | $NASTYSTRING1 |
@@ -36,7 +34,6 @@ Feature: Transform steps arguments
And the field "Surname" matches value "$NASTYSTRING1"
And the field "City/town" matches value "$NASTYSTRING3"
@javascript
Scenario: Use double quotes
When I set the following fields to these values:
| First name | va"lue1 |
@@ -49,7 +46,6 @@ Feature: Transform steps arguments
And the field "Description" matches value "va\\"lue2"
And the field "City/town" matches value "va\"lue3"
@javascript
Scenario: Nasty strings with other contents
When I set the field "First name" to "My Firstname $NASTYSTRING1"
And I set the following fields to these values:
@@ -83,7 +83,6 @@ SEARCH.prototype = {
div.append(label).append(this.input);
this.select.insert(div, 'before');
this.select.one('option').setStyle('display', 'none');
this.input.on('keyup', this.typed, this);
this.select.on('change', this.validate, this);
@@ -1 +1 @@
YUI.add("moodle-tool_capability-search",function(e,t){var n=function(){n.superclass.constructor.apply(this,arguments)};n.prototype={form:null,select:null,selectoptions:{},input:null,button:null,lastsearch:null,initializer:function(){this.form=e.one("#capability-overview-form"),this.select=this.form.one("select[data-search=capability]"),this.select.setStyle("minWidth",this.select.get("offsetWidth")),this.select.get("options").each(function(e){var t=e.get("value");this.selectoptions[t]=e},this),this.button=this.form.all("input[type=submit]"),this.lastsearch=this.form.one("input[name=search]");var t=e.Node.create('<div id="capabilitysearchui"></div>'),n=e.Node.create('<label for="capabilitysearch">'+this.get("strsearch")+"</label>");this.input=e.Node.create('<input type="text" id="capabilitysearch" />'),t.append(n).append(this.input),this.select.insert(t,"before"),this.select.one("option").setStyle("display","none"),this.input.on("keyup",this.typed,this),this.select.on("change",this.validate,this),this.lastsearch&&(this.input.set("value",this.lastsearch.get("value")),this.typed(),this.select.one("option[selected]")&&this.select.set("scrollTop",this.select.one("option[selected]").get("getX"))),this.validate()},validate:function(){this.button.set("disabled",this.select.get("value")==="")},typed:function(){var e=this.input.get("value"),t=0,n=null,r;this.lastsearch&&this.lastsearch.set("value",e),this.select.all("option").remove();for(r in this.selectoptions)r.indexOf(e)>=0&&(t++,n=this.selectoptions[r],this.select.append(this.selectoptions[r]));t===0?this.input.addClass("error"):(this.input.removeClass("error"),t===1&&n.set("selected",!0)),this.validate()}},e.extend(n,e.Base,n.prototype,{NAME:"tool_capability-search",ATTRS:{strsearch:{}}}),M.tool_capability=M.tool_capability||{},M.tool_capability.init_capability_search=function(e){new n(e)}},"@VERSION@",{requires:["base","node"]});
YUI.add("moodle-tool_capability-search",function(e,t){var n=function(){n.superclass.constructor.apply(this,arguments)};n.prototype={form:null,select:null,selectoptions:{},input:null,button:null,lastsearch:null,initializer:function(){this.form=e.one("#capability-overview-form"),this.select=this.form.one("select[data-search=capability]"),this.select.setStyle("minWidth",this.select.get("offsetWidth")),this.select.get("options").each(function(e){var t=e.get("value");this.selectoptions[t]=e},this),this.button=this.form.all("input[type=submit]"),this.lastsearch=this.form.one("input[name=search]");var t=e.Node.create('<div id="capabilitysearchui"></div>'),n=e.Node.create('<label for="capabilitysearch">'+this.get("strsearch")+"</label>");this.input=e.Node.create('<input type="text" id="capabilitysearch" />'),t.append(n).append(this.input),this.select.insert(t,"before"),this.input.on("keyup",this.typed,this),this.select.on("change",this.validate,this),this.lastsearch&&(this.input.set("value",this.lastsearch.get("value")),this.typed(),this.select.one("option[selected]")&&this.select.set("scrollTop",this.select.one("option[selected]").get("getX"))),this.validate()},validate:function(){this.button.set("disabled",this.select.get("value")==="")},typed:function(){var e=this.input.get("value"),t=0,n=null,r;this.lastsearch&&this.lastsearch.set("value",e),this.select.all("option").remove();for(r in this.selectoptions)r.indexOf(e)>=0&&(t++,n=this.selectoptions[r],this.select.append(this.selectoptions[r]));t===0?this.input.addClass("error"):(this.input.removeClass("error"),t===1&&n.set("selected",!0)),this.validate()}},e.extend(n,e.Base,n.prototype,{NAME:"tool_capability-search",ATTRS:{strsearch:{}}}),M.tool_capability=M.tool_capability||{},M.tool_capability.init_capability_search=function(e){new n(e)}},"@VERSION@",{requires:["base","node"]});
@@ -83,7 +83,6 @@ SEARCH.prototype = {
div.append(label).append(this.input);
this.select.insert(div, 'before');
this.select.one('option').setStyle('display', 'none');
this.input.on('keyup', this.typed, this);
this.select.on('change', this.validate, this);
-1
View File
@@ -81,7 +81,6 @@ SEARCH.prototype = {
div.append(label).append(this.input);
this.select.insert(div, 'before');
this.select.one('option').setStyle('display', 'none');
this.input.on('keyup', this.typed, this);
this.select.on('change', this.validate, this);
+3
View File
@@ -51,5 +51,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -63,7 +63,7 @@ if ($translatorsubmitted) {
$checkin = optional_param('savecheckin', false, PARAM_RAW);
if ($checkin === false) {
$nexturl = $PAGE->url;
$nexturl = new moodle_url($PAGE->url, array('p' => $currentpage));
} else {
$nexturl = new moodle_url('/admin/tool/customlang/index.php', array('action'=>'checkin', 'lng' => $lng, 'sesskey'=>sesskey()));
}
+1
View File
@@ -133,6 +133,7 @@ class tool_customlang_renderer extends plugin_renderer_base {
$output .= html_writer::start_tag('div');
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'translatorsubmitted', 'value'=>1));
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'sesskey', 'value'=>sesskey()));
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'p', 'value'=>$translator->currentpage));
$save1 = html_writer::empty_tag('input', array('type'=>'submit', 'name'=>'savecontinue', 'value'=>get_string('savecontinue', 'tool_customlang')));
$save2 = html_writer::empty_tag('input', array('type'=>'submit', 'name'=>'savecheckin', 'value'=>get_string('savecheckin', 'tool_customlang')));
$output .= html_writer::tag('fieldset', $save1.$save2, array('class'=>'buttonsbar'));
+1 -1
View File
@@ -23,7 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['healthnoproblemsfound'] = 'There is no health problem found!';
$string['healthnoproblemsfound'] = 'No health problems were found!';
$string['healthproblemsdetected'] = 'Health problems detected!';
$string['healthproblemsolution'] = 'Health problem solution';
$string['healthreturntomain'] = 'Continue';
+33
View File
@@ -106,7 +106,40 @@ class manager implements \core\log\manager {
if (empty($interface) || ($reader instanceof $interface)) {
$return[$plugin] = $reader;
}
// TODO MDL-49291 These conditions should be removed as part of the 2nd stage deprecation.
if ($reader instanceof \core\log\sql_internal_reader) {
debugging('\core\log\sql_internal_reader has been deprecated in favour of \core\log\sql_internal_table_reader.' .
' Update ' . get_class($reader) . ' to use the new interface.', DEBUG_DEVELOPER);
} else if ($reader instanceof \core\log\sql_select_reader) {
debugging('\core\log\sql_select_reader has been deprecated in favour of \core\log\sql_reader. Update ' .
get_class($reader) . ' to use the new interface.', DEBUG_DEVELOPER);
}
}
// TODO MDL-49291 This section below (until the final return) should be removed as part of the 2nd stage deprecation.
$isselectreader = (ltrim($interface, '\\') === 'core\log\sql_select_reader');
$isinternalreader = (ltrim($interface, '\\') === 'core\log\sql_internal_reader');
if ($isselectreader || $isinternalreader) {
if ($isselectreader) {
$alternative = '\core\log\sql_reader';
} else {
$alternative = '\core\log\sql_internal_table_reader';
}
if (count($return) === 0) {
// If there are no classes implementing the provided interface and the provided interface is one of
// the deprecated ones, we return the non-deprecated alternatives. It should be safe as the new interface
// is adding a new method but not changing the existing ones.
debugging($interface . ' has been deprecated in favour of ' . $alternative . '. Returning ' . $alternative .
' instances instead. Please call get_readers() using the new interface.', DEBUG_DEVELOPER);
$return = $this->get_readers($alternative);
} else {
debugging($interface . ' has been deprecated in favour of ' . $alternative .
'. Please call get_readers() using the new interface.', DEBUG_DEVELOPER);
}
}
return $return;
}
+3
View File
@@ -49,5 +49,8 @@ function xmldb_tool_log_upgrade($oldversion) {
// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -39,5 +39,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -28,7 +28,7 @@ $tasks = array(
array(
'classname' => '\logstore_legacy\task\cleanup_task',
'blocking' => 0,
'minute' => '*',
'minute' => 'R',
'hour' => '5',
'day' => '*',
'dayofweek' => '*',
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2015051100; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2015051101; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2015050500; // Requires this Moodle version.
$plugin->component = 'logstore_legacy'; // Full name of the plugin (used for diagnostics).
+1 -1
View File
@@ -28,7 +28,7 @@ $tasks = array(
array(
'classname' => '\logstore_standard\task\cleanup_task',
'blocking' => 0,
'minute' => '*',
'minute' => 'R',
'hour' => '4',
'day' => '*',
'dayofweek' => '*',
@@ -117,5 +117,8 @@ function xmldb_logstore_standard_upgrade($oldversion) {
// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2015051100; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2015051101; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2015050500; // Requires this Moodle version.
$plugin->component = 'logstore_standard'; // Full name of the plugin (used for diagnostics).
+2 -2
View File
@@ -41,9 +41,9 @@ if ($hassiteconfig) {
$settings->add(new admin_setting_heading('messageinbound_mailboxconfiguration',
new lang_string('mailboxconfiguration', 'tool_messageinbound'),
new lang_string('messageinboundmailboxconfiguration_desc', 'tool_messageinbound'), ''));
$settings->add(new admin_setting_configtext('messageinbound_mailbox',
$settings->add(new admin_setting_configtext_with_maxlength('messageinbound_mailbox',
new lang_string('mailbox', 'tool_messageinbound'),
null, '', PARAM_RAW));
null, '', PARAM_RAW, null, 15));
$settings->add(new admin_setting_configtext('messageinbound_domain',
new lang_string('domain', 'tool_messageinbound'),
null, '', PARAM_RAW));
+3
View File
@@ -53,5 +53,8 @@ function xmldb_tool_monitor_upgrade($oldversion) {
// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+8
View File
@@ -149,6 +149,14 @@ if ($execute = $options['execute']) {
mtrace("... used " . ($DB->perf_get_queries() - $predbqueries) . " dbqueries");
mtrace("... used " . (microtime(true) - $pretime) . " seconds");
mtrace("Task failed: " . $e->getMessage());
if ($CFG->debugdeveloper) {
if (!empty($e->debuginfo)) {
mtrace("Debug info:");
mtrace($e->debuginfo);
}
mtrace("Backtrace:");
mtrace(format_backtrace($e->getTrace(), true));
}
\core\task\manager::scheduled_task_failed($task);
get_mailer('close');
exit(1);
+2
View File
@@ -63,6 +63,8 @@ echo '<form action="upgradesettings.php" method="post" id="adminsettings">';
echo '<div>';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<input type="hidden" name="return" value="'.$return.'" />';
// HACK to prevent browsers from automatically inserting the user's password into the wrong fields.
echo prevent_form_autofill_password();
echo '<fieldset>';
echo '<div class="clearer"><!-- --></div>';
echo $newsettingshtml;
+7 -2
View File
@@ -190,9 +190,14 @@
// We don't need to check the fullnamedisplay setting here as the fullname function call further down has
// the override parameter set to true.
$fullnamesetting = $CFG->alternativefullnameformat;
// If we are using language or it is empty, then retrieve all of the user's names.
// If we are using language or it is empty, then retrieve the default user names of just 'firstname' and 'lastname'.
if ($fullnamesetting == 'language' || empty($fullnamesetting)) {
$fullnamesetting = implode(' ', $allusernamefields);
// Set $a variables to return 'firstname' and 'lastname'.
$a = new stdClass();
$a->firstname = 'firstname';
$a->lastname = 'lastname';
// Getting the fullname display will ensure that the order in the language file is maintained.
$fullnamesetting = get_string('fullnamedisplay', null, $a);
}
// Order in string will ensure that the name columns are in the correct order.
+1 -1
View File
@@ -187,7 +187,7 @@ class auth_plugin_cas extends auth_plugin_ldap {
}
// If Moodle is configured to use a proxy, phpCAS needs some curl options set.
if (!empty($CFG->proxyhost) && !is_proxybypass($this->config->hostname)) {
if (!empty($CFG->proxyhost) && !is_proxybypass(phpCAS::getServerLoginURL())) {
phpCAS::setExtraCurlOption(CURLOPT_PROXY, $CFG->proxyhost);
if (!empty($CFG->proxyport)) {
phpCAS::setExtraCurlOption(CURLOPT_PROXYPORT, $CFG->proxyport);
+3
View File
@@ -71,5 +71,8 @@ function xmldb_auth_cas_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2014111001, 'auth', 'cas');
}
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+35 -10
View File
@@ -58,6 +58,11 @@ class auth_plugin_db extends auth_plugin_base {
function user_login($username, $password) {
global $CFG, $DB;
if ($this->is_configured() === false) {
debugging(get_string('auth_notconfigured', 'auth', $this->authtype));
return false;
}
$extusername = core_text::convert($username, 'utf-8', $this->config->extencoding);
$extpassword = core_text::convert($password, 'utf-8', $this->config->extencoding);
@@ -105,7 +110,7 @@ class auth_plugin_db extends auth_plugin_base {
$authdb = $this->db_init();
$rs = $authdb->Execute("SELECT {$this->config->fieldpass} AS userpass
$rs = $authdb->Execute("SELECT {$this->config->fieldpass}
FROM {$this->config->table}
WHERE {$this->config->fielduser} = '".$this->ext_addslashes($extusername)."'");
if (!$rs) {
@@ -120,7 +125,7 @@ class auth_plugin_db extends auth_plugin_base {
}
$fields = array_change_key_case($rs->fields, CASE_LOWER);
$fromdb = $fields['userpass'];
$fromdb = $fields[strtolower($this->config->fieldpass)];
$rs->Close();
$authdb->Close();
@@ -144,8 +149,13 @@ class auth_plugin_db extends auth_plugin_base {
* Connect to external database.
*
* @return ADOConnection
* @throws moodle_exception
*/
function db_init() {
if ($this->is_configured() === false) {
throw new moodle_exception('auth_dbcantconnect', 'auth_db');
}
// Connect to the external database (forcing new connection).
$authdb = ADONewConnection($this->config->type);
if (!empty($this->config->debugauthdb)) {
@@ -207,18 +217,21 @@ class auth_plugin_db extends auth_plugin_base {
if ($selectfields) {
$select = array();
foreach ($selectfields as $localname=>$externalname) {
$select[] = "$externalname AS $localname";
$select[] = "$externalname";
}
$select = implode(', ', $select);
$sql = "SELECT $select
FROM {$this->config->table}
WHERE {$this->config->fielduser} = '".$this->ext_addslashes($extusername)."'";
if ($rs = $authdb->Execute($sql)) {
if (!$rs->EOF) {
$fields_obj = $rs->FetchObj();
$fields_obj = (object)array_change_key_case((array)$fields_obj , CASE_LOWER);
foreach ($selectfields as $localname=>$externalname) {
$result[$localname] = core_text::convert($fields_obj->{strtolower($localname)}, $this->config->extencoding, 'utf-8');
$fields = $rs->FetchRow();
// Convert the associative array to an array of its values so we don't have to worry about the case of its keys.
$fields = array_values($fields);
foreach (array_keys($selectfields) as $index => $localname) {
$value = $fields[$index];
$result[$localname] = core_text::convert($value, $this->config->extencoding, 'utf-8');
}
}
$rs->Close();
@@ -477,15 +490,15 @@ class auth_plugin_db extends auth_plugin_base {
$authdb = $this->db_init();
// Fetch userlist.
$rs = $authdb->Execute("SELECT {$this->config->fielduser} AS username
$rs = $authdb->Execute("SELECT {$this->config->fielduser}
FROM {$this->config->table} ");
if (!$rs) {
print_error('auth_dbcantconnect','auth_db');
} else if (!$rs->EOF) {
while ($rec = $rs->FetchRow()) {
$rec = (object)array_change_key_case((array)$rec , CASE_LOWER);
array_push($result, $rec->username);
$rec = array_change_key_case((array)$rec, CASE_LOWER);
array_push($result, $rec[strtolower($this->config->fielduser)]);
}
}
@@ -661,6 +674,18 @@ class auth_plugin_db extends auth_plugin_base {
return ($this->config->passtype === 'internal');
}
/**
* Returns false if this plugin is enabled but not configured.
*
* @return bool
*/
public function is_configured() {
if (!empty($this->config->type)) {
return true;
}
return false;
}
/**
* Indicates if moodle should automatically update internal user
* records with data from external sources using the information
+18 -12
View File
@@ -534,6 +534,7 @@ class auth_plugin_ldap extends auth_plugin_base {
*
* @param object $user new user object
* @param boolean $notify print notice with link and terminate
* @return boolean success
*/
function user_signup($user, $notify=true) {
global $CFG, $DB, $PAGE, $OUTPUT;
@@ -889,7 +890,7 @@ class auth_plugin_ldap extends auth_plugin_base {
foreach ($users as $user) {
echo "\t"; print_string('auth_dbupdatinguser', 'auth_db', array('name'=>$user->username, 'id'=>$user->id));
if (!$this->update_user_record($user->username, $updatekeys)) {
if (!$this->update_user_record($user->username, $updatekeys, true)) {
echo ' - '.get_string('skipped');
}
echo "\n";
@@ -987,8 +988,11 @@ class auth_plugin_ldap extends auth_plugin_base {
*
* @param string $username username
* @param boolean $updatekeys true to update the local record with the external LDAP values.
* @param bool $triggerevent set false if user_updated event should not be triggered.
* This will not affect user_password_updated event triggering.
* @return stdClass|bool updated user record or false if there is no new info to update.
*/
function update_user_record($username, $updatekeys = false) {
function update_user_record($username, $updatekeys = false, $triggerevent = false) {
global $CFG, $DB;
// Just in case check text case
@@ -1030,7 +1034,7 @@ class auth_plugin_ldap extends auth_plugin_base {
}
}
}
user_update_user($newuser, false, false);
user_update_user($newuser, false, $triggerevent);
}
} else {
return false;
@@ -1638,7 +1642,7 @@ class auth_plugin_ldap extends auth_plugin_base {
if (($_SERVER['REQUEST_METHOD'] === 'GET' // Only on initial GET of loginpage
|| ($_SERVER['REQUEST_METHOD'] === 'POST'
&& (get_referer() != strip_querystring(qualified_me()))))
&& (get_local_referer() != strip_querystring(qualified_me()))))
// Or when POSTed from another place
// See MDL-14071
&& !empty($this->config->ntlmsso_enabled) // SSO enabled
@@ -1649,13 +1653,15 @@ class auth_plugin_ldap extends auth_plugin_base {
// First, let's remember where we were trying to get to before we got here
if (empty($SESSION->wantsurl)) {
$SESSION->wantsurl = (array_key_exists('HTTP_REFERER', $_SERVER) &&
$_SERVER['HTTP_REFERER'] != $CFG->wwwroot &&
$_SERVER['HTTP_REFERER'] != $CFG->wwwroot.'/' &&
$_SERVER['HTTP_REFERER'] != $CFG->httpswwwroot.'/login/' &&
$_SERVER['HTTP_REFERER'] != $CFG->httpswwwroot.'/login/index.php' &&
clean_param($_SERVER['HTTP_REFERER'], PARAM_LOCALURL) != '')
? $_SERVER['HTTP_REFERER'] : NULL;
$SESSION->wantsurl = null;
$referer = get_local_referer(false);
if ($referer &&
$referer != $CFG->wwwroot &&
$referer != $CFG->wwwroot . '/' &&
$referer != $CFG->httpswwwroot . '/login/' &&
$referer != $CFG->httpswwwroot . '/login/index.php') {
$SESSION->wantsurl = $referer;
}
}
// Now start the whole NTLM machinery.
@@ -1680,7 +1686,7 @@ class auth_plugin_ldap extends auth_plugin_base {
// we don't want to use at all. As we can't get rid of it, just point
// $SESSION->wantsurl to $CFG->wwwroot (after all, we came from there).
if (empty($SESSION->wantsurl)
&& (get_referer() == $CFG->httpswwwroot.'/auth/ldap/ntlmsso_finish.php')) {
&& (get_local_referer() == $CFG->httpswwwroot.'/auth/ldap/ntlmsso_finish.php')) {
$SESSION->wantsurl = $CFG->wwwroot;
}
+3
View File
@@ -61,5 +61,8 @@ function xmldb_auth_ldap_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2014111001, 'auth', 'ldap');
}
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+66
View File
@@ -136,9 +136,25 @@ class auth_ldap_plugin_testcase extends advanced_testcase {
$auth = get_auth_plugin('ldap');
ob_start();
$sink = $this->redirectEvents();
$auth->sync_users(true);
$events = $sink->get_events();
$sink->close();
ob_end_clean();
// Check events, 5 users created with 2 users having roles.
$this->assertCount(7, $events);
foreach ($events as $index => $event) {
$usercreatedindex = array(0, 2, 4, 5, 6);
$roleassignedindex = array (1, 3);
if (in_array($index, $usercreatedindex)) {
$this->assertInstanceOf('\core\event\user_created', $event);
}
if (in_array($index, $roleassignedindex)) {
$this->assertInstanceOf('\core\event\role_assigned', $event);
}
}
$this->assertEquals(5, $DB->count_records('user', array('auth'=>'ldap')));
$this->assertEquals(2, $DB->count_records('role_assignments'));
$this->assertEquals(2, $DB->count_records('role_assignments', array('roleid'=>$creatorrole->id)));
@@ -150,9 +166,15 @@ class auth_ldap_plugin_testcase extends advanced_testcase {
$this->delete_ldap_user($connection, $topdn, 1);
ob_start();
$sink = $this->redirectEvents();
$auth->sync_users(true);
$events = $sink->get_events();
$sink->close();
ob_end_clean();
// Check events, no new event.
$this->assertCount(0, $events);
$this->assertEquals(5, $DB->count_records('user', array('auth'=>'ldap')));
$this->assertEquals(0, $DB->count_records('user', array('suspended'=>1)));
$this->assertEquals(0, $DB->count_records('user', array('deleted'=>1)));
@@ -166,9 +188,17 @@ class auth_ldap_plugin_testcase extends advanced_testcase {
$auth = get_auth_plugin('ldap');
ob_start();
$sink = $this->redirectEvents();
$auth->sync_users(true);
$events = $sink->get_events();
$sink->close();
ob_end_clean();
// Check events, 1 user got updated.
$this->assertCount(1, $events);
$event = reset($events);
$this->assertInstanceOf('\core\event\user_updated', $event);
$this->assertEquals(5, $DB->count_records('user', array('auth'=>'ldap')));
$this->assertEquals(0, $DB->count_records('user', array('auth'=>'nologin', 'username'=>'username1')));
$this->assertEquals(1, $DB->count_records('user', array('auth'=>'ldap', 'suspended'=>'1', 'username'=>'username1')));
@@ -179,9 +209,17 @@ class auth_ldap_plugin_testcase extends advanced_testcase {
$this->create_ldap_user($connection, $topdn, 1);
ob_start();
$sink = $this->redirectEvents();
$auth->sync_users(true);
$events = $sink->get_events();
$sink->close();
ob_end_clean();
// Check events, 1 user got updated.
$this->assertCount(1, $events);
$event = reset($events);
$this->assertInstanceOf('\core\event\user_updated', $event);
$this->assertEquals(5, $DB->count_records('user', array('auth'=>'ldap')));
$this->assertEquals(0, $DB->count_records('user', array('suspended'=>1)));
$this->assertEquals(0, $DB->count_records('user', array('deleted'=>1)));
@@ -191,9 +229,17 @@ class auth_ldap_plugin_testcase extends advanced_testcase {
$DB->set_field('user', 'auth', 'nologin', array('username'=>'username1'));
ob_start();
$sink = $this->redirectEvents();
$auth->sync_users(true);
$events = $sink->get_events();
$sink->close();
ob_end_clean();
// Check events, 1 user got updated.
$this->assertCount(1, $events);
$event = reset($events);
$this->assertInstanceOf('\core\event\user_updated', $event);
$this->assertEquals(5, $DB->count_records('user', array('auth'=>'ldap')));
$this->assertEquals(0, $DB->count_records('user', array('suspended'=>1)));
$this->assertEquals(0, $DB->count_records('user', array('deleted'=>1)));
@@ -208,9 +254,19 @@ class auth_ldap_plugin_testcase extends advanced_testcase {
$this->delete_ldap_user($connection, $topdn, 1);
ob_start();
$sink = $this->redirectEvents();
$auth->sync_users(true);
$events = $sink->get_events();
$sink->close();
ob_end_clean();
// Check events, 2 events role_unassigned and user_deleted.
$this->assertCount(2, $events);
$event = array_pop($events);
$this->assertInstanceOf('\core\event\user_deleted', $event);
$event = array_pop($events);
$this->assertInstanceOf('\core\event\role_unassigned', $event);
$this->assertEquals(5, $DB->count_records('user', array('auth'=>'ldap')));
$this->assertEquals(0, $DB->count_records('user', array('username'=>'username1')));
$this->assertEquals(0, $DB->count_records('user', array('suspended'=>1)));
@@ -221,9 +277,19 @@ class auth_ldap_plugin_testcase extends advanced_testcase {
$this->create_ldap_user($connection, $topdn, 1);
ob_start();
$sink = $this->redirectEvents();
$auth->sync_users(true);
$events = $sink->get_events();
$sink->close();
ob_end_clean();
// Check events, 2 events role_assigned and user_created.
$this->assertCount(2, $events);
$event = array_pop($events);
$this->assertInstanceOf('\core\event\role_assigned', $event);
$event = array_pop($events);
$this->assertInstanceOf('\core\event\user_created', $event);
$this->assertEquals(6, $DB->count_records('user', array('auth'=>'ldap')));
$this->assertEquals(1, $DB->count_records('user', array('username'=>'username1')));
$this->assertEquals(0, $DB->count_records('user', array('suspended'=>1)));
+4
View File
@@ -0,0 +1,4 @@
This files describes API changes in the auth_ldap code.
=== 2.9.1 ===
* auth_plugin_ldap::update_user_record() accepts an additional (optional) param
to trigger update event.
+3
View File
@@ -53,5 +53,8 @@ function xmldb_auth_manual_upgrade($oldversion) {
// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -53,5 +53,8 @@ function xmldb_auth_mnet_upgrade($oldversion) {
// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -10,7 +10,7 @@
// Support for WAYFless URLs.
$target = optional_param('target', '', PARAM_LOCALURL);
if (!empty($target)) {
if (!empty($target) && empty($SESSION->wantsurl)) {
$SESSION->wantsurl = $target;
}
@@ -53,8 +53,8 @@ class condition extends \core_availability\condition {
*/
public function __construct($structure) {
// Get cmid.
if (isset($structure->cm) && is_int($structure->cm)) {
$this->cmid = $structure->cm;
if (isset($structure->cm) && is_number($structure->cm)) {
$this->cmid = (int)$structure->cm;
} else {
throw new \coding_exception('Missing or invalid ->cm for completion condition');
}
@@ -228,7 +228,9 @@ class condition extends \core_availability\condition {
WHERE
gi.courseid = ?', array($userid, $courseid));
foreach ($rs as $record) {
if (is_null($record->finalgrade)) {
// This function produces division by zero error warnings when rawgrademax and rawgrademin
// are equal. Below change does not affect function behavior, just avoids the warning.
if (is_null($record->finalgrade) || $record->rawgrademax == $record->rawgrademin) {
// No grade = false.
$cachedgrades[$record->id] = false;
} else {
@@ -249,7 +251,9 @@ class condition extends \core_availability\condition {
// Just get current grade.
$record = $DB->get_record('grade_grades', array(
'userid' => $userid, 'itemid' => $gradeitemid));
if ($record && !is_null($record->finalgrade)) {
// This function produces division by zero error warnings when rawgrademax and rawgrademin
// are equal. Below change does not affect function behavior, just avoids the warning.
if ($record && !is_null($record->finalgrade) && $record->rawgrademax != $record->rawgrademin) {
$score = (($record->finalgrade - $record->rawgrademin) * 100) /
($record->rawgrademax - $record->rawgrademin);
} else {
+6 -2
View File
@@ -49,7 +49,11 @@ class core_availability_component_testcase extends advanced_testcase {
// fail, but it's obvious when running test at least.
$pluginmanager = core_plugin_manager::instance();
$list = $pluginmanager->get_enabled_plugins('availability');
$this->assertEquals(array('completion', 'date', 'grade', 'group', 'grouping', 'profile'),
array_keys($list));
$this->assertArrayHasKey('completion', $list);
$this->assertArrayHasKey('date', $list);
$this->assertArrayHasKey('grade', $list);
$this->assertArrayHasKey('group', $list);
$this->assertArrayHasKey('grouping', $list);
$this->assertArrayHasKey('profile', $list);
}
}
+20 -1
View File
@@ -939,6 +939,7 @@ class backup_gradebook_structure_step extends backup_structure_step {
}
protected function define_structure() {
global $CFG, $DB;
// are we including user info?
$userinfo = $this->get_setting_value('users');
@@ -999,6 +1000,13 @@ class backup_gradebook_structure_step extends backup_structure_step {
$gradebook->add_child($grade_settings);
$grade_settings->add_child($grade_setting);
// Add attribute with gradebook calculation freeze date if needed.
$gradebookcalculationfreeze = get_config('core', 'gradebook_calculations_freeze_' . $this->get_courseid());
if ($gradebookcalculationfreeze) {
$gradebook->add_attributes(array('calculations_freeze'));
$gradebook->get_attribute('calculations_freeze')->set_value($gradebookcalculationfreeze);
}
// Define sources
//Include manual, category and the course grade item
@@ -1023,7 +1031,18 @@ class backup_gradebook_structure_step extends backup_structure_step {
$letter->set_source_table('grade_letters', array('contextid' => backup::VAR_CONTEXTID));
$grade_setting->set_source_table('grade_settings', array('courseid' => backup::VAR_COURSEID));
// Set the grade settings source, forcing the inclusion of minmaxtouse if not present.
$settings = array();
$rs = $DB->get_recordset('grade_settings', array('courseid' => $this->get_courseid()));
foreach ($rs as $record) {
$settings[$record->name] = $record;
}
$rs->close();
if (!isset($settings['minmaxtouse'])) {
$settings['minmaxtouse'] = (object) array('name' => 'minmaxtouse', 'value' => $CFG->grade_minmaxtouse);
}
$grade_setting->set_source_array($settings);
// Annotations (both as final as far as they are going to be exported in next steps)
$grade_item->annotate_ids('scalefinal', 'scaleid'); // Straight as scalefinal because it's > 0
+130 -5
View File
@@ -142,6 +142,18 @@ class restore_gradebook_structure_step extends restore_structure_step {
}
protected function process_gradebook($data) {
// For non-merge restore types:
// Unset 'gradebook_calculations_freeze_' in the course and replace with the one from the backup.
$target = $this->get_task()->get_target();
if ($target == backup::TARGET_CURRENT_DELETING || $target == backup::TARGET_EXISTING_DELETING) {
set_config('gradebook_calculations_freeze_' . $this->get_courseid(), null);
}
if (!empty($data['calculations_freeze'])) {
if ($target == backup::TARGET_NEW_COURSE || $target == backup::TARGET_CURRENT_DELETING ||
$target == backup::TARGET_EXISTING_DELETING) {
set_config('gradebook_calculations_freeze_' . $this->get_courseid(), $data['calculations_freeze']);
}
}
}
protected function process_grade_item($data) {
@@ -323,13 +335,23 @@ class restore_gradebook_structure_step extends restore_structure_step {
$data->courseid = $this->get_courseid();
$target = $this->get_task()->get_target();
if ($data->name == 'minmaxtouse' &&
($target == backup::TARGET_CURRENT_ADDING || $target == backup::TARGET_EXISTING_ADDING)) {
// We never restore minmaxtouse during merge.
return;
}
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);
if (!empty($oldid)) {
// In rare cases (minmaxtouse), it is possible that there wasn't any ID associated with the setting.
$this->set_mapping('grade_setting', $oldid, $newitemid);
}
}
/**
@@ -451,9 +473,104 @@ class restore_gradebook_structure_step extends restore_structure_step {
}
$rs->close();
// Check what to do with the minmaxtouse setting.
$this->check_minmaxtouse();
// Freeze gradebook calculations if needed.
$this->gradebook_calculation_freeze();
// Restore marks items as needing update. Update everything now.
grade_regrade_final_grades($this->get_courseid());
}
/**
* Freeze gradebook calculation if needed.
*
* This is similar to various upgrade scripts that check if the freeze is needed.
*/
protected function gradebook_calculation_freeze() {
global $CFG;
$gradebookcalculationsfreeze = get_config('core', 'gradebook_calculations_freeze_' . $this->get_courseid());
preg_match('/(\d{8})/', $this->get_task()->get_info()->moodle_release, $matches);
$backupbuild = (int)$matches[1];
// Extra credits need adjustments only for backups made between 2.8 release (20141110) and the fix release (20150619).
if (!$gradebookcalculationsfreeze && $backupbuild >= 20141110 && $backupbuild < 20150619) {
require_once($CFG->libdir . '/db/upgradelib.php');
upgrade_extra_credit_weightoverride($this->get_courseid());
}
// Calculated grade items need recalculating for backups made between 2.8 release (20141110) and the fix release (20150627).
if (!$gradebookcalculationsfreeze && $backupbuild >= 20141110 && $backupbuild < 20150627) {
require_once($CFG->libdir . '/db/upgradelib.php');
upgrade_calculated_grade_items($this->get_courseid());
}
}
/**
* Checks what should happen with the course grade setting minmaxtouse.
*
* This is related to the upgrade step at the time the setting was added.
*
* @see MDL-48618
* @return void
*/
protected function check_minmaxtouse() {
global $CFG, $DB;
require_once($CFG->libdir . '/gradelib.php');
$userinfo = $this->task->get_setting_value('users');
$settingname = 'minmaxtouse';
$courseid = $this->get_courseid();
$minmaxtouse = $DB->get_field('grade_settings', 'value', array('courseid' => $courseid, 'name' => $settingname));
$version28start = 2014111000.00;
$version28last = 2014111006.05;
$version29start = 2015051100.00;
$version29last = 2015060400.02;
$target = $this->get_task()->get_target();
if ($minmaxtouse === false &&
($target != backup::TARGET_CURRENT_ADDING && $target != backup::TARGET_EXISTING_ADDING)) {
// The setting was not found because this setting did not exist at the time the backup was made.
// And we are not restoring as merge, in which case we leave the course as it was.
$version = $this->get_task()->get_info()->moodle_version;
if ($version < $version28start) {
// We need to set it to use grade_item, but only if the site-wide setting is different. No need to notice them.
if ($CFG->grade_minmaxtouse != GRADE_MIN_MAX_FROM_GRADE_ITEM) {
grade_set_setting($courseid, $settingname, GRADE_MIN_MAX_FROM_GRADE_ITEM);
}
} else if (($version >= $version28start && $version < $version28last) ||
($version >= $version29start && $version < $version29last)) {
// They should be using grade_grade when the course has inconsistencies.
$sql = "SELECT gi.id
FROM {grade_items} gi
JOIN {grade_grades} gg
ON gg.itemid = gi.id
WHERE gi.courseid = ?
AND (gi.itemtype != ? AND gi.itemtype != ?)
AND (gg.rawgrademax != gi.grademax OR gg.rawgrademin != gi.grademin)";
// The course can only have inconsistencies when we restore the user info,
// we do not need to act on existing grades that were not restored as part of this backup.
if ($userinfo && $DB->record_exists_sql($sql, array($courseid, 'course', 'category'))) {
// Display the notice as we do during upgrade.
set_config('show_min_max_grades_changed_' . $courseid, 1);
if ($CFG->grade_minmaxtouse != GRADE_MIN_MAX_FROM_GRADE_GRADE) {
// We need set the setting as their site-wise setting is not GRADE_MIN_MAX_FROM_GRADE_GRADE.
// If they are using the site-wide grade_grade setting, we only want to notice them.
grade_set_setting($courseid, $settingname, GRADE_MIN_MAX_FROM_GRADE_GRADE);
}
}
} else {
// This should never happen because from now on minmaxtouse is always saved in backups.
}
}
}
}
/**
@@ -1311,6 +1428,15 @@ class restore_process_categories_and_questions extends restore_execution_step {
* as needed, rebuilding course cache and other friends
*/
class restore_section_structure_step extends restore_structure_step {
/** @var array Cache: Array of id => course format */
private static $courseformats = array();
/**
* Resets a static cache of course formats. Required for unit testing.
*/
public static function reset_caches() {
self::$courseformats = array();
}
protected function define_structure() {
global $CFG;
@@ -1483,14 +1609,13 @@ class restore_section_structure_step extends restore_structure_step {
public function process_course_format_options($data) {
global $DB;
static $courseformats = array();
$courseid = $this->get_courseid();
if (!array_key_exists($courseid, $courseformats)) {
if (!array_key_exists($courseid, self::$courseformats)) {
// It is safe to have a static cache of course formats because format can not be changed after this point.
$courseformats[$courseid] = $DB->get_field('course', 'format', array('id' => $courseid));
self::$courseformats[$courseid] = $DB->get_field('course', 'format', array('id' => $courseid));
}
$data = (array)$data;
if ($courseformats[$courseid] === $data['format']) {
if (self::$courseformats[$courseid] === $data['format']) {
// Import section format options only if both courses (the one that was backed up
// and the one we are restoring into) have same formats.
$params = array(
@@ -105,7 +105,7 @@ class core_backup_moodle2_course_format_testcase extends advanced_testcase {
'numdaystocomplete' => 2);
$courseobject->update_section_format_options($data);
$this->backup_and_restore($course, $course);
$this->backup_and_restore($course, $course, backup::TARGET_EXISTING_ADDING);
$sectionoptions = $courseobject->get_format_options(1);
$this->assertArrayHasKey('numdaystocomplete', $sectionoptions);
@@ -126,37 +126,49 @@ class core_backup_moodle2_course_format_testcase extends advanced_testcase {
$this->resetAfterTest(true);
$this->setAdminUser();
$CFG->enableavailability = true;
$CFG->enablecompletion = true;
// Create a course with some availability data set.
// Create a source course using the test_cs2_options format.
$generator = $this->getDataGenerator();
$course = $generator->create_course(
array('format' => 'test_cs2_options', 'numsections' => 3,
'enablecompletion' => COMPLETION_ENABLED),
array('createsections' => true));
// Create a target course using test_cs_options format.
$newcourse = $generator->create_course(
array('format' => 'test_cs_options', 'numsections' => 3,
'enablecompletion' => COMPLETION_ENABLED),
array('createsections' => true));
// Set section 2 to have both options, and a name.
$courseobject = format_base::instance($course->id);
$section = $DB->get_record('course_sections',
array('course' => $course->id, 'section' => 1), '*', MUST_EXIST);
array('course' => $course->id, 'section' => 2), '*', MUST_EXIST);
$data = array('id' => $section->id,
'numdaystocomplete' => 2,
'secondparameter' => 8);
'secondparameter' => 8
);
$courseobject->update_section_format_options($data);
// Backup and restore it.
$this->backup_and_restore($course, $newcourse);
$DB->set_field('course_sections', 'name', 'Frogs', array('id' => $section->id));
// Backup and restore to the new course using 'add to existing' so it
// keeps the current (test_cs_options) format.
$this->backup_and_restore($course, $newcourse, backup::TARGET_EXISTING_ADDING);
// Check that the section contains the options suitable for the new
// format and that even the one with the same name as from the old format
// has NOT been set.
$newcourseobject = format_base::instance($newcourse->id);
$sectionoptions = $newcourseobject->get_format_options(1);
$sectionoptions = $newcourseobject->get_format_options(2);
$this->assertArrayHasKey('numdaystocomplete', $sectionoptions);
$this->assertArrayHasKey('secondparameter', $sectionoptions);
$this->assertArrayNotHasKey('secondparameter', $sectionoptions);
$this->assertEquals(0, $sectionoptions['numdaystocomplete']);
$this->assertEquals(0, $sectionoptions['secondparameter']);
// However, the name should have been changed, as this does not depend
// on the format.
$modinfo = get_fast_modinfo($newcourse->id);
$section = $modinfo->get_section_info(2);
$this->assertEquals('Frogs', $section->name);
}
/**
@@ -164,9 +176,11 @@ class core_backup_moodle2_course_format_testcase extends advanced_testcase {
*
* @param stdClass $srccourse Course object to backup
* @param stdClass $dstcourse Course object to restore into
* @param int $target Target course mode (backup::TARGET_xx)
* @return int ID of newly restored course
*/
protected function backup_and_restore($srccourse, $dstcourse = null) {
protected function backup_and_restore($srccourse, $dstcourse = null,
$target = backup::TARGET_NEW_COURSE) {
global $USER, $CFG;
// Turn off file logging, otherwise it can't delete the file (Windows).
@@ -190,7 +204,7 @@ class core_backup_moodle2_course_format_testcase extends advanced_testcase {
}
$rc = new restore_controller($backupid, $newcourseid,
backup::INTERACTIVE_NO, backup::MODE_GENERAL, $USER->id,
backup::TARGET_NEW_COURSE);
$target);
$this->assertTrue($rc->execute_precheck());
$rc->execute_plan();
@@ -226,6 +240,12 @@ class format_test_cs_options extends format_topics {
class format_test_cs2_options extends format_test_cs_options {
public function section_format_options($foreditform = false) {
return array(
'numdaystocomplete' => array(
'type' => PARAM_INT,
'label' => 'Test days',
'element_type' => 'text',
'default' => 0,
),
'secondparameter' => array(
'type' => PARAM_INT,
'label' => 'Test Parmater',
+1
View File
@@ -30,6 +30,7 @@ class course_restore_form extends moodleform {
$mform->addElement('hidden', 'contextid', $contextid);
$mform->setType('contextid', PARAM_INT);
$mform->addElement('filepicker', 'backupfile', get_string('files'));
$mform->addRule('backupfile', get_string('required'), 'required');
$submit_string = get_string('restore');
$this->add_action_buttons(false, $submit_string);
}
@@ -167,4 +167,48 @@ class backup_anonymizer_helper {
public static function process_user_imagealt($value) {
return ''; // No user imagealt
}
/**
* Anonymises user's phonetic name field
* @param string $value value of the user field
* @return string anonymised phonetic name
*/
public static function process_user_firstnamephonetic($value) {
static $counter = 0;
$counter++;
return 'anonfirstnamephonetic' . $counter; // Just a counter.
}
/**
* Anonymises user's phonetic last name field
* @param string $value value of the user field
* @return string anonymised last phonetic name
*/
public static function process_user_lastnamephonetic($value) {
static $counter = 0;
$counter++;
return 'anonlastnamephonetic' . $counter; // Just a counter.
}
/**
* Anonymises user's middle name field
* @param string $value value of the user field
* @return string anonymised middle name
*/
public static function process_user_middlename($value) {
static $counter = 0;
$counter++;
return 'anonmiddlename' . $counter; // Just a counter.
}
/**
* Anonymises user's alternate name field
* @param string $value value of the user field
* @return string anonymised alternate name
*/
public static function process_user_alternatename($value) {
static $counter = 0;
$counter++;
return 'anonalternatename' . $counter; // Just a counter.
}
}
+1 -1
View File
@@ -196,7 +196,7 @@ Feature: Award badges
And I follow "Course completion"
And I set the field "id_overall_aggregation" to "2"
And I click on "Condition: Activity completion" "link"
And I set the field "Assign - Test assignment name" to "1"
And I set the field "Assignment - Test assignment name" to "1"
And I press "Save changes"
And I follow "Course 1"
And I navigate to "Add a new badge" node in "Course administration > Badges"
+1 -1
View File
@@ -48,7 +48,7 @@ if (!in_array($sortby, array('name', 'dateissued'))) {
}
if ($sorthow != 'ASC' && $sorthow != 'DESC') {
$sorthow = 'ACS';
$sorthow = 'ASC';
}
if ($page < 0) {
+3
View File
@@ -76,5 +76,8 @@ function xmldb_block_badges_upgrade($oldversion, $block) {
// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -0,0 +1,51 @@
@block @block_blog_tag @core_blog @core_tag
Feature: Adding blog tag block
In order to search blog post by tag
As a user
I need to be able to use block blog tag
Scenario: Adding block blog tag to the course
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist:
| fullname | shortname |
| Course 1 | c1 |
And the following "tags" exist:
| name | tagtype |
| Neverusedtag | official |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | c1 | editingteacher |
| student1 | c1 | student |
When I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I add the "Blog tags" block
And I navigate to "Course blogs" node in "Current course > c1 > Participants"
And I follow "Blog about this Course"
And I set the following fields to these values:
| Entry title | Blog post from teacher |
| Blog entry body | Teacher blog post content |
| Other tags (enter tags separated by commas) | Cats, dogs |
And I press "Save changes"
And I log out
And I log in as "student1"
And I follow "Course 1"
And I navigate to "Course blogs" node in "Current course > c1 > Participants"
And I follow "Blog about this Course"
And I set the following fields to these values:
| Entry title | Blog post from student |
| Blog entry body | Student blog post content |
| Other tags (enter tags separated by commas) | DOGS, mice |
And I press "Save changes"
And I follow "c1"
Then I should see "Cats" in the "Blog tags" "block"
And I should see "dogs" in the "Blog tags" "block"
And I should see "mice" in the "Blog tags" "block"
And I click on "Cats" "link" in the "Blog tags" "block"
And I should see "Blog post from teacher"
And I should see "Teacher blog post content"
And I log out
+3
View File
@@ -76,5 +76,8 @@ function xmldb_block_calendar_month_upgrade($oldversion, $block) {
// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -76,5 +76,8 @@ function xmldb_block_calendar_upcoming_upgrade($oldversion, $block) {
// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -66,5 +66,8 @@ function xmldb_block_community_upgrade($oldversion) {
// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -73,5 +73,8 @@ function xmldb_block_completionstatus_upgrade($oldversion, $block) {
// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -133,7 +133,7 @@ if (empty($completions)) {
echo html_writer::start_tag('tr');
echo html_writer::start_tag('td', array('colspan' => '2'));
echo html_writer::start_tag('br');
echo $OUTPUT->box(get_string('err_nocriteria', 'completion'), 'noticebox');
echo $OUTPUT->box(get_string('nocriteriaset', 'completion'), 'noticebox');
echo html_writer::end_tag('td');
echo html_writer::end_tag('tr');
echo html_writer::end_tag('tbody');
@@ -112,7 +112,7 @@ class block_course_overview extends block_base {
* @return array
*/
public function applicable_formats() {
return array('my-index' => true);
return array('my' => true);
}
/**
@@ -125,4 +125,4 @@ class block_course_overview extends block_base {
$config = get_config('block_course_overview');
return !empty($config->showwelcomearea);
}
}
}
+3
View File
@@ -77,5 +77,8 @@ function xmldb_block_course_summary_upgrade($oldversion, $block) {
// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -53,5 +53,8 @@ function xmldb_block_html_upgrade($oldversion) {
// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+2
View File
@@ -31,7 +31,9 @@ class block_messages extends block_base {
global $USER, $CFG, $DB, $OUTPUT;
if (!$CFG->messaging) {
$this->content = new stdClass;
$this->content->text = '';
$this->content->footer = '';
if ($this->page->user_is_editing()) {
$this->content->text = get_string('disabled', 'message');
}
+3
View File
@@ -78,5 +78,8 @@ function xmldb_block_navigation_upgrade($oldversion, $block) {
// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -115,7 +115,7 @@ class block_navigation_renderer extends plugin_renderer_base {
} else if ($item->action instanceof action_link) {
//TODO: to be replaced with something else
$link = $item->action;
$link->text = $icon.$link->text;
$link->text = $icon.html_writer::span($link->text, 'item-content-wrap');
$link->attributes = array_merge($link->attributes, $attributes);
$content = $this->output->render($link);
} else if ($item->action instanceof moodle_url) {
+3
View File
@@ -101,5 +101,8 @@ function xmldb_block_quiz_results_upgrade($oldversion, $block) {
// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -87,5 +87,8 @@ function xmldb_block_recent_activity_upgrade($oldversion, $block) {
// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -89,5 +89,8 @@ function xmldb_block_section_links_upgrade($oldversion, $block) {
// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -77,5 +77,8 @@ function xmldb_block_selfcompletion_upgrade($oldversion, $block) {
// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -78,5 +78,8 @@ function xmldb_block_settings_upgrade($oldversion, $block) {
// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -73,8 +73,9 @@ class block_site_main_menu extends block_list {
$attrs['title'] = $cm->modfullname;
$attrs['class'] = $cm->extraclasses . ' activity-action';
if ($cm->onclick) {
$attrs['id'] = html_writer::random_id('onclick');
$OUTPUT->add_action_handler(new component_action('click', $cm->onclick), $attrs['id']);
// Get on-click attribute value if specified and decode the onclick - it
// has already been encoded for display.
$attrs['onclick'] = htmlspecialchars_decode($cm->onclick);
}
if (!$cm->visible) {
$attrs['class'] .= ' dimmed';
@@ -161,8 +162,9 @@ class block_site_main_menu extends block_list {
$attrs['title'] = $mod->modfullname;
$attrs['class'] = $mod->extraclasses . ' activity-action';
if ($mod->onclick) {
$attrs['id'] = html_writer::random_id('onclick');
$OUTPUT->add_action_handler(new component_action('click', $mod->onclick), $attrs['id']);
// Get on-click attribute value if specified and decode the onclick - it
// has already been encoded for display.
$attrs['onclick'] = htmlspecialchars_decode($mod->onclick);
}
if (!$mod->visible) {
$attrs['class'] .= ' dimmed';
@@ -0,0 +1,18 @@
@block @block_main_menu
Feature: Add URL to main menu block
In order to add helpful resources for students
As a admin
I need to add URLs to the main menu block and check it works.
@javascript
Scenario: Add a URL in menu block and ensure it appears
Given I log in as "admin"
And I am on site homepage
And I navigate to "Turn editing on" node in "Front page settings"
When I add a "URL" to section "0" and I fill the form with:
| Name | google |
| Description | gooooooooogle |
| External URL | http://www.google.com |
| id_display | In pop-up |
Then "google" "link" should exist in the "Main menu" "block"
And "Add an activity or resource" "link" should exist in the "Main menu" "block"
+187 -46
View File
@@ -26,14 +26,29 @@ define('DEFAULT_NUMBER_OF_VIDEOS', 5);
class block_tag_youtube extends block_base {
/**
* @var Google_Service_Youtube
*/
protected $service = null;
function init() {
$this->title = get_string('pluginname','block_tag_youtube');
$this->config = new stdClass();
}
function applicable_formats() {
return array('tag' => true);
}
/**
* It can be configured.
*
* @return bool
*/
public function has_config() {
return true;
}
function specialization() {
$this->title = !empty($this->config->title) ? $this->config->title : get_string('pluginname', 'block_tag_youtube');
// Convert numeric categories (old YouTube API) to
@@ -56,6 +71,14 @@ class block_tag_youtube extends block_base {
return $this->content;
}
$this->content = new stdClass();
$this->content->footer = '';
if (!$this->get_service()) {
$this->content->text = $this->get_error_message();
return $this->content;
}
$text = '';
if(!empty($this->config->playlist)){
//videos from a playlist
@@ -72,31 +95,41 @@ class block_tag_youtube extends block_base {
}
}
$this->content = new stdClass;
$this->content->text = $text;
$this->content->footer = '';
return $this->content;
}
function get_videos_by_playlist(){
if (!$service = $this->get_service()) {
return $this->get_error_message();
}
$numberofvideos = DEFAULT_NUMBER_OF_VIDEOS;
if( !empty($this->config->numberofvideos)) {
$numberofvideos = $this->config->numberofvideos;
}
$request = 'http://gdata.youtube.com/feeds/api/playlists/' .
$this->config->playlist .
'?start-index=1&max-results=' .
$numberofvideos .
'&format=5';
try {
$response = $service->playlistItems->listPlaylistItems('id,snippet', array(
'playlistId' => $this->config->playlist,
'maxResults' => $numberofvideos
));
} catch (Google_Service_Exception $e) {
debugging('Google service exception: ' . $e->getMessage(), DEBUG_DEVELOPER);
return $this->get_error_message(get_string('requesterror', 'block_tag_youtube'));
}
return $this->fetch_request($request);
return $this->render_items($response);
}
function get_videos_by_tag(){
if (!$service = $this->get_service()) {
return $this->get_error_message();
}
$tagid = optional_param('id', 0, PARAM_INT); // tag id - for backware compatibility
$tag = optional_param('tag', '', PARAM_TAG); // tag
@@ -117,17 +150,26 @@ class block_tag_youtube extends block_base {
$numberofvideos = $this->config->numberofvideos;
}
$request = 'http://gdata.youtube.com/feeds/api/videos?vq=' .
$querytag .
'&start-index=1&max-results=' .
$numberofvideos .
'&format=5';
try {
$response = $service->search->listSearch('id,snippet', array(
'q' => $querytag,
'type' => 'video',
'maxResults' => $numberofvideos
));
} catch (Google_Service_Exception $e) {
debugging('Google service exception: ' . $e->getMessage(), DEBUG_DEVELOPER);
return $this->get_error_message(get_string('requesterror', 'block_tag_youtube'));
}
return $this->fetch_request($request);
return $this->render_items($response);
}
function get_videos_by_tag_and_category(){
if (!$service = $this->get_service()) {
return $this->get_error_message();
}
$tagid = optional_param('id', 0, PARAM_INT); // tag id - for backware compatibility
$tag = optional_param('tag', '', PARAM_TAG); // tag
@@ -148,19 +190,32 @@ class block_tag_youtube extends block_base {
$numberofvideos = $this->config->numberofvideos;
}
$request = 'http://gdata.youtube.com/feeds/api/videos?category=' .
$this->config->category .
'&vq=' .
$querytag .
'&start-index=1&max-results=' .
$numberofvideos .
'&format=5';
try {
$response = $service->search->listSearch('id,snippet', array(
'q' => $querytag,
'type' => 'video',
'maxResults' => $numberofvideos,
'videoCategoryId' => $this->config->category
));
} catch (Google_Service_Exception $e) {
debugging('Google service exception: ' . $e->getMessage(), DEBUG_DEVELOPER);
return $this->get_error_message(get_string('requesterror', 'block_tag_youtube'));
}
return $this->fetch_request($request);
return $this->render_items($response);
}
function fetch_request($request){
/**
* Sends a request to fetch data.
*
* @see block_tag_youtube::service
* @deprecated since Moodle 2.8.8, 2.9.2 and 3.0 MDL-49085 - please do not use this function any more.
* @param string $request
* @throws coding_exception
*/
public function fetch_request($request) {
throw new coding_exception('Sorry, this function has been deprecated in Moodle 2.8.8, 2.9.2 and 3.0. Use block_tag_youtube::get_service instead.');
$c = new curl(array('cache' => true, 'module_cache'=>'tag_youtube'));
$c->setopt(array('CURLOPT_TIMEOUT' => 3, 'CURLOPT_CONNECTTIMEOUT' => 3));
@@ -170,32 +225,118 @@ class block_tag_youtube extends block_base {
return $this->render_video_list($xml);
}
/**
* Renders the video list.
*
* @see block_tag_youtube::render_items
* @deprecated since Moodle 2.8.8, 2.9.2 and 3.0 MDL-49085 - please do not use this function any more.
* @param SimpleXMLElement $xml
* @throws coding_exception
*/
function render_video_list(SimpleXMLElement $xml){
throw new coding_exception('Sorry, this function has been deprecated in Moodle 2.8.8, 2.9.2 and 3.0. Use block_tag_youtube::render_items instead.');
}
$text = '';
$text .= '<ul class="yt-video-entry unlist img-text">';
/**
* Returns an error message.
*
* Useful when the block is not properly set or something goes wrong.
*
* @param string $message The message to display.
* @return string HTML
*/
protected function get_error_message($message = null) {
global $OUTPUT;
foreach($xml->entry as $entry){
$media = $entry->children('http://search.yahoo.com/mrss/');
$playerattrs = $media->group->player->attributes();
$url = s($playerattrs['url']);
$thumbattrs = $media->group->thumbnail[0]->attributes();
$thumbnail = s($thumbattrs['url']);
$title = s($media->group->title);
$yt = $media->children('http://gdata.youtube.com/schemas/2007');
$secattrs = $yt->duration->attributes();
$seconds = $secattrs['seconds'];
$text .= '<li>';
$text .= '<div class="clearfix">';
$text .= '<a href="'. $url . '">';
$text .= '<img alt="" class="youtube-thumb" src="'. $thumbnail .'" /></a>';
$text .= '</div><span><a href="'. $url . '">'. $title .'</a></span>';
$text .= '<div>';
$text .= format_time($seconds);
$text .= "</div></li>\n";
if (empty($message)) {
$message = get_string('apierror', 'block_tag_youtube');
}
$text .= "</ul><div class=\"clearer\"></div>\n";
return $OUTPUT->notification($message);
}
/**
* Gets the youtube service object.
*
* @return Google_Service_YouTube
*/
protected function get_service() {
global $CFG;
if (!$apikey = get_config('block_tag_youtube', 'apikey')) {
return false;
}
// Wrapped in an if in case we call different get_videos_* multiple times.
if (!isset($this->service)) {
require_once($CFG->libdir . '/google/lib.php');
$client = get_google_client();
$client->setDeveloperKey($apikey);
$client->setScopes(array(Google_Service_YouTube::YOUTUBE_READONLY));
$this->service = new Google_Service_YouTube($client);
}
return $this->service;
}
/**
* Renders the list of items.
*
* @param array $videosdata
* @return string HTML
*/
protected function render_items($videosdata) {
if (!$videosdata || empty($videosdata->items)) {
if (!empty($videosdata->error)) {
debugging('Error fetching data from youtube: ' . $videosdata->error->message, DEBUG_DEVELOPER);
}
return '';
}
// If we reach that point we already know that the API key is set.
$service = $this->get_service();
$text = html_writer::start_tag('ul', array('class' => 'yt-video-entry unlist img-text'));
foreach ($videosdata->items as $video) {
// Link to the video included in the playlist if listing a playlist.
if (!empty($video->snippet->resourceId)) {
$id = $video->snippet->resourceId->videoId;
$playlist = '&list=' . $video->snippet->playlistId;
} else {
$id = $video->id->videoId;
$playlist = '';
}
$thumbnail = $video->snippet->getThumbnails()->getDefault();
$url = 'http://www.youtube.com/watch?v=' . $id . $playlist;
$videodetails = $service->videos->listVideos('id,contentDetails', array('id' => $id));
if ($videodetails && !empty($videodetails->items)) {
// We fetch by id so we just use the first one.
$details = $videodetails->items[0];
$start = new DateTime('@0');
$start->add(new DateInterval($details->contentDetails->duration));
$seconds = $start->format('U');
}
$text .= html_writer::start_tag('li');
$imgattrs = array('class' => 'youtube-thumb', 'src' => $thumbnail->url, 'alt' => $video->snippet->title);
$thumbhtml = html_writer::empty_tag('img', $imgattrs);
$link = html_writer::tag('a', $thumbhtml, array('href' => $url));
$text .= html_writer::tag('div', $link, array('class' => 'clearfix'));
$text .= html_writer::tag('span', html_writer::tag('a', $video->snippet->title, array('href' => $url)));
if (!empty($seconds)) {
$text .= html_writer::tag('div', format_time($seconds));
}
$text .= html_writer::end_tag('li');
}
$text .= html_writer::end_tag('ul');
return $text;
}
@@ -23,6 +23,9 @@
*/
$string['anycategory'] = 'Any category';
$string['apierror'] = 'The Youtube API key is not set. Contact your administrator.';
$string['apikey'] = 'API key';
$string['apikeyinfo'] = 'Get a <a href="https://developers.google.com/youtube/v3/getting-started">Google API key</a> for your Moodle site.';
$string['autosvehicles'] = 'Autos &amp; Vehicles';
$string['category'] = 'Category';
$string['comedy'] = 'Comedy';
@@ -38,8 +41,9 @@ $string['newspolitics'] = 'News &amp; Politics';
$string['numberofvideos'] = 'Number of videos';
$string['peopleblogs'] = 'People &amp; Blogs';
$string['petsanimals'] = 'Pets &amp; Animals';
$string['pluginname'] = 'Youtube';
$string['pluginname'] = 'YouTube';
$string['requesterror'] = 'Data could not be obtained from the server. Contact your administrator if the problem persist.';
$string['scienceandtech'] = 'Science &amp; Tech';
$string['sports'] = 'Sports';
$string['tag_youtube:addinstance'] = 'Add a new youtube block';
$string['tag_youtube:addinstance'] = 'Add a new YouTube block';
$string['travel'] = 'Travel &amp; Places';
+30
View File
@@ -0,0 +1,30 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Settings for the RSS client block.
*
* @package block_tag_youtube
* @copyright 2015 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die;
if ($ADMIN->fulltree) {
$settings->add(new admin_setting_configtext('block_tag_youtube/apikey', get_string('apikey', 'block_tag_youtube'),
get_string('apikeyinfo', 'block_tag_youtube'), '', PARAM_RAW_TRIMMED, 40));
}
+8
View File
@@ -0,0 +1,8 @@
This files describes API changes in the block tag_youtube code.
=== 2.9.2 ===
* Due to the final YouTube API v2.0 deprecation we needed to adapt the current
code to YouTube Data API v3. block_tag_youtube::fetch_request and
block_tag_youtube::render_video_list have been deprecated as they can not be
used any more.
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2015051100; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2015051101; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2015050500; // Requires this Moodle version
$plugin->component = 'block_tag_youtube'; // Full name of the plugin (used for diagnostics)
@@ -0,0 +1,64 @@
@block @block_tags @core_tag
Feature: Block tags displaying course tags
In order to tag courses
As a user
I need to be able to use the block tags
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist:
| fullname | shortname |
| Course 1 | c1 |
And the following "tags" exist:
| name | tagtype |
| Neverusedtag | official |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | c1 | editingteacher |
| student1 | c1 | student |
| student2 | c1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Show course tags | 1 |
And I log out
Scenario: Add Tags block to tag courses in a course
When I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I add the "Tags" block
And I log out
And I log in as "student1"
And I follow "Course 1"
And I should not see "Neverusedtag" in the "Tags" "block"
And I click on "more..." "link" in the "Tags" "block"
And I should not see "Neverusedtag"
And I follow "c1"
And I set the field "coursetag_new_tag" to "Dogs, Mice"
And I press "Add"
And I should see "Dogs" in the "Tags" "block"
And I should see "Mice" in the "Tags" "block"
And I log out
And I log in as "student2"
And I follow "Course 1"
And I should see "Dogs" in the "Tags" "block"
And I set the field "coursetag_new_tag" to "Cats, Dogs"
And I press "Add"
And I should see "Dogs" in the "Tags" "block"
And I should see "Cats" in the "Tags" "block"
And I click on "more..." "link" in the "Tags" "block"
And "Cats" "link" should appear before "Dogs" "link"
And "Dogs" "link" should appear before "Mice" "link"
And I follow "My tags"
And I should see "Dogs"
And I should see "Cats"
And I should not see "Mice"
And I follow "All tags"
And I follow "Popularity"
And "Mice" "link" should appear before "Dogs" "link"
And I should not see "Neverusedtag"
And I log out
+57
View File
@@ -0,0 +1,57 @@
@block @block_tags @core_tag
Feature: Block tags displaying tag cloud
In order to view system tags
As a user
I need to be able to use the block tags
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist:
| fullname | shortname |
| Course 1 | c1 |
And the following "tags" exist:
| name | tagtype |
| Neverusedtag | official |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | c1 | editingteacher |
| student1 | c1 | student |
And I log in as "teacher1"
And I follow "Preferences" in the user menu
And I follow "Edit profile"
And I expand all fieldsets
And I set the field "Enter tags separated by commas" to "Dogs, Cats"
And I press "Update profile"
And I log out
Scenario: Add Tags block on a front page
When I log in as "admin"
And I am on site homepage
And I follow "Turn editing on"
And I add the "Tags" block
And I log out
And I am on site homepage
Then I should see "Dogs" in the "Tags" "block"
And I should see "Cats" in the "Tags" "block"
And I should not see "Neverusedtag" in the "Tags" "block"
And I click on "Dogs" "link" in the "Tags" "block"
And I should see "Log in to the site" in the ".breadcrumb" "css_element"
Scenario: Add Tags block in a course
When I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I add the "Tags" block
And I log out
And I log in as "student1"
And I follow "Course 1"
Then I should see "Dogs" in the "Tags" "block"
And I should see "Cats" in the "Tags" "block"
And I should not see "Neverusedtag" in the "Tags" "block"
And I click on "Dogs" "link" in the "Tags" "block"
And I should see "Users tagged with \"Dogs\": 1"
And I should see "Teacher 1"
And I log out
@@ -24,7 +24,6 @@ Feature: Allowed blocks controls
Then I should see "Activities" in the "Activities" "block"
And I should see "Course completion status" in the "Course completion status" "block"
@javascript
Scenario: Blocks can not be added when the admin restricts the permissions
Given I log in as "admin"
And I set the following system permissions of "Teacher" role:
+3 -1
View File
@@ -76,7 +76,9 @@ $sitecontext = context_system::instance();
if (isset($userid) && $USER->id == $userid) {
$blognode = $PAGE->navigation->find('siteblog', null);
$blognode->make_inactive();
if ($blognode) {
$blognode->make_inactive();
}
}
// Check basic permissions.
+4
View File
@@ -1023,12 +1023,16 @@ function blog_page_type_list($pagetype, $parentcontext, $currentcontext) {
* @return bool
*/
function core_blog_myprofile_navigation(core_user\output\myprofile\tree $tree, $user, $iscurrentuser, $course) {
global $CFG;
if (!blog_is_enabled_for_user() || isguestuser($user)) {
// The guest user cannot post, so it is not possible to view any posts.
// Also blogs might be disabled.
// May as well just bail aggressively here.
return true;
}
if (!blog_user_can_view_user_entry($user->id)) {
return true;
}
$url = new moodle_url("/blog/index.php", array('userid' => $user->id));
if (!empty($course)) {
$url->param('courseid', $course->id);
+36
View File
@@ -0,0 +1,36 @@
@core @core_blog
Feature: Blogs can be set to be only visible by the author.
In order to make blogs personal only
As a user
I need to set the blog level to Users can only see their own blogs.
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| testuser | Test | User | moodle@example.com |
| testuser2 | Test2 | User2 | moodle2@example.com |
And the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist:
| user | course | role |
| testuser | C1 | student |
| testuser2 | C1 | student |
And I log in as "admin"
And I am on site homepage
And I navigate to "Blog" node in "Site administration > Appearance"
And I set the following fields to these values:
| Blog visibility | Users can only see their own blog |
And I press "Save changes"
And I log out
Scenario: A student can not see another student's blog entries.
Given I log in as "testuser"
And I follow "Course 1"
And I follow "Participants"
And I follow "Test2 User2"
And I should see "Miscellaneous"
Then I should not see "Blog entries"
And I follow "Profile" in the user menu
And I follow "Blog entries"
And I should see "User blog: Test User"
+4 -2
View File
@@ -318,6 +318,8 @@ class cache_helper {
$definitionkey = $definition->get_component().'/'.$definition->get_area();
if (isset($inuse[$definitionkey])) {
$inuse[$definitionkey]->purge();
} else {
cache::make($definition->get_component(), $definition->get_area())->purge();
}
// We should only log events for application and session caches.
@@ -352,7 +354,7 @@ class cache_helper {
protected static function ensure_ready_for_stats($store, $definition, $mode = cache_store::MODE_APPLICATION) {
// This function is performance-sensitive, so exit as quickly as possible
// if we do not need to do anything.
if (isset(self::$stats[$definition][$store])) {
if (isset(self::$stats[$definition]['stores'][$store])) {
return;
}
if (!array_key_exists($definition, self::$stats)) {
@@ -366,7 +368,7 @@ class cache_helper {
)
)
);
} else if (!array_key_exists($store, self::$stats[$definition])) {
} else if (!array_key_exists($store, self::$stats[$definition]['stores'])) {
self::$stats[$definition]['stores'][$store] = array(
'hits' => 0,
'misses' => 0,
+2 -2
View File
@@ -341,8 +341,8 @@ class cachestore_file extends cache_store implements cache_is_key_aware, cache_i
$maxtime = cache::now() - $ttl;
}
$readfile = false;
if ($this->prescan && array_key_exists($key, $this->keys)) {
if (!$ttl || $this->keys[$filename] >= $maxtime && file_exists($file)) {
if ($this->prescan && array_key_exists($filename, $this->keys)) {
if ((!$ttl || $this->keys[$filename] >= $maxtime) && file_exists($file)) {
$readfile = true;
} else {
$this->delete($key);
+30
View File
@@ -44,4 +44,34 @@ class cachestore_file_test extends cachestore_tests {
protected function get_class_name() {
return 'cachestore_file';
}
/**
* Testing cachestore_file::get with prescan enabled and with
* deleting the cache between the prescan and the call to get.
*
* The deleting of cache simulates some other process purging
* the cache.
*/
public function test_cache_get_with_prescan_and_purge() {
global $CFG;
$definition = cache_definition::load_adhoc(cache_store::MODE_REQUEST, 'cachestore_file', 'phpunit_test');
$name = 'File test';
$path = make_cache_directory('cachestore_file_test');
$cache = new cachestore_file($name, array('path' => $path, 'prescan' => true));
$cache->initialise($definition);
$cache->set('testing', 'value');
$path = make_cache_directory('cachestore_file_test');
$cache = new cachestore_file($name, array('path' => $path, 'prescan' => true));
$cache->initialise($definition);
// Let's pretend that some other process purged caches.
remove_dir($CFG->cachedir.'/cachestore_file_test', true);
make_cache_directory('cachestore_file_test');
$cache->get('testing');
}
}
+151
View File
@@ -1840,4 +1840,155 @@ class core_cache_testcase extends advanced_testcase {
$this->assertEquals('A', $cache->phpunit_static_acceleration_get('a'));
$this->assertEquals('A', $cache->get('a'));
}
public function test_performance_debug() {
global $CFG;
$this->resetAfterTest(true);
$CFG->perfdebug = 15;
$instance = cache_config_testing::instance();
$applicationid = 'phpunit/applicationperf';
$instance->phpunit_add_definition($applicationid, array(
'mode' => cache_store::MODE_APPLICATION,
'component' => 'phpunit',
'area' => 'applicationperf'
));
$sessionid = 'phpunit/sessionperf';
$instance->phpunit_add_definition($sessionid, array(
'mode' => cache_store::MODE_SESSION,
'component' => 'phpunit',
'area' => 'sessionperf'
));
$requestid = 'phpunit/requestperf';
$instance->phpunit_add_definition($requestid, array(
'mode' => cache_store::MODE_REQUEST,
'component' => 'phpunit',
'area' => 'requestperf'
));
$application = cache::make('phpunit', 'applicationperf');
$session = cache::make('phpunit', 'sessionperf');
$request = cache::make('phpunit', 'requestperf');
// Check that no stats are recorded for these definitions yet.
$stats = cache_helper::get_stats();
$this->assertArrayNotHasKey($applicationid, $stats);
$this->assertArrayHasKey($sessionid, $stats); // Session cache sets a key on construct.
$this->assertArrayNotHasKey($requestid, $stats);
// Check that stores register misses.
$this->assertFalse($application->get('missMe'));
$this->assertFalse($application->get('missMe'));
$this->assertFalse($session->get('missMe'));
$this->assertFalse($session->get('missMe'));
$this->assertFalse($session->get('missMe'));
$this->assertFalse($request->get('missMe'));
$this->assertFalse($request->get('missMe'));
$this->assertFalse($request->get('missMe'));
$this->assertFalse($request->get('missMe'));
$endstats = cache_helper::get_stats();
$this->assertEquals(2, $endstats[$applicationid]['stores']['cachestore_file']['misses']);
$this->assertEquals(0, $endstats[$applicationid]['stores']['cachestore_file']['hits']);
$this->assertEquals(0, $endstats[$applicationid]['stores']['cachestore_file']['sets']);
$this->assertEquals(3, $endstats[$sessionid]['stores']['cachestore_session']['misses']);
$this->assertEquals(0, $endstats[$sessionid]['stores']['cachestore_session']['hits']);
$this->assertEquals(1, $endstats[$sessionid]['stores']['cachestore_session']['sets']);
$this->assertEquals(4, $endstats[$requestid]['stores']['cachestore_static']['misses']);
$this->assertEquals(0, $endstats[$requestid]['stores']['cachestore_static']['hits']);
$this->assertEquals(0, $endstats[$requestid]['stores']['cachestore_static']['sets']);
$startstats = cache_helper::get_stats();
// Check that stores register sets.
$this->assertTrue($application->set('setMe1', 1));
$this->assertTrue($application->set('setMe2', 2));
$this->assertTrue($session->set('setMe1', 1));
$this->assertTrue($session->set('setMe2', 2));
$this->assertTrue($session->set('setMe3', 3));
$this->assertTrue($request->set('setMe1', 1));
$this->assertTrue($request->set('setMe2', 2));
$this->assertTrue($request->set('setMe3', 3));
$this->assertTrue($request->set('setMe4', 4));
$endstats = cache_helper::get_stats();
$this->assertEquals(0, $endstats[$applicationid]['stores']['cachestore_file']['misses'] -
$startstats[$applicationid]['stores']['cachestore_file']['misses']);
$this->assertEquals(0, $endstats[$applicationid]['stores']['cachestore_file']['hits'] -
$startstats[$applicationid]['stores']['cachestore_file']['hits']);
$this->assertEquals(2, $endstats[$applicationid]['stores']['cachestore_file']['sets'] -
$startstats[$applicationid]['stores']['cachestore_file']['sets']);
$this->assertEquals(0, $endstats[$sessionid]['stores']['cachestore_session']['misses'] -
$startstats[$sessionid]['stores']['cachestore_session']['misses']);
$this->assertEquals(0, $endstats[$sessionid]['stores']['cachestore_session']['hits'] -
$startstats[$sessionid]['stores']['cachestore_session']['hits']);
$this->assertEquals(3, $endstats[$sessionid]['stores']['cachestore_session']['sets'] -
$startstats[$sessionid]['stores']['cachestore_session']['sets']);
$this->assertEquals(0, $endstats[$requestid]['stores']['cachestore_static']['misses'] -
$startstats[$requestid]['stores']['cachestore_static']['misses']);
$this->assertEquals(0, $endstats[$requestid]['stores']['cachestore_static']['hits'] -
$startstats[$requestid]['stores']['cachestore_static']['hits']);
$this->assertEquals(4, $endstats[$requestid]['stores']['cachestore_static']['sets'] -
$startstats[$requestid]['stores']['cachestore_static']['sets']);
$startstats = cache_helper::get_stats();
// Check that stores register hits.
$this->assertEquals($application->get('setMe1'), 1);
$this->assertEquals($application->get('setMe2'), 2);
$this->assertEquals($session->get('setMe1'), 1);
$this->assertEquals($session->get('setMe2'), 2);
$this->assertEquals($session->get('setMe3'), 3);
$this->assertEquals($request->get('setMe1'), 1);
$this->assertEquals($request->get('setMe2'), 2);
$this->assertEquals($request->get('setMe3'), 3);
$this->assertEquals($request->get('setMe4'), 4);
$endstats = cache_helper::get_stats();
$this->assertEquals(0, $endstats[$applicationid]['stores']['cachestore_file']['misses'] -
$startstats[$applicationid]['stores']['cachestore_file']['misses']);
$this->assertEquals(2, $endstats[$applicationid]['stores']['cachestore_file']['hits'] -
$startstats[$applicationid]['stores']['cachestore_file']['hits']);
$this->assertEquals(0, $endstats[$applicationid]['stores']['cachestore_file']['sets'] -
$startstats[$applicationid]['stores']['cachestore_file']['sets']);
$this->assertEquals(0, $endstats[$sessionid]['stores']['cachestore_session']['misses'] -
$startstats[$sessionid]['stores']['cachestore_session']['misses']);
$this->assertEquals(3, $endstats[$sessionid]['stores']['cachestore_session']['hits'] -
$startstats[$sessionid]['stores']['cachestore_session']['hits']);
$this->assertEquals(0, $endstats[$sessionid]['stores']['cachestore_session']['sets'] -
$startstats[$sessionid]['stores']['cachestore_session']['sets']);
$this->assertEquals(0, $endstats[$requestid]['stores']['cachestore_static']['misses'] -
$startstats[$requestid]['stores']['cachestore_static']['misses']);
$this->assertEquals(4, $endstats[$requestid]['stores']['cachestore_static']['hits'] -
$startstats[$requestid]['stores']['cachestore_static']['hits']);
$this->assertEquals(0, $endstats[$requestid]['stores']['cachestore_static']['sets'] -
$startstats[$requestid]['stores']['cachestore_static']['sets']);
$startstats = cache_helper::get_stats();
// Check that stores register through get_many.
$application->get_many(array('setMe1', 'setMe2'));
$session->get_many(array('setMe1', 'setMe2', 'setMe3'));
$request->get_many(array('setMe1', 'setMe2', 'setMe3', 'setMe4'));
$endstats = cache_helper::get_stats();
$this->assertEquals(0, $endstats[$applicationid]['stores']['cachestore_file']['misses'] -
$startstats[$applicationid]['stores']['cachestore_file']['misses']);
$this->assertEquals(2, $endstats[$applicationid]['stores']['cachestore_file']['hits'] -
$startstats[$applicationid]['stores']['cachestore_file']['hits']);
$this->assertEquals(0, $endstats[$applicationid]['stores']['cachestore_file']['sets'] -
$startstats[$applicationid]['stores']['cachestore_file']['sets']);
$this->assertEquals(0, $endstats[$sessionid]['stores']['cachestore_session']['misses'] -
$startstats[$sessionid]['stores']['cachestore_session']['misses']);
$this->assertEquals(3, $endstats[$sessionid]['stores']['cachestore_session']['hits'] -
$startstats[$sessionid]['stores']['cachestore_session']['hits']);
$this->assertEquals(0, $endstats[$sessionid]['stores']['cachestore_session']['sets'] -
$startstats[$sessionid]['stores']['cachestore_session']['sets']);
$this->assertEquals(0, $endstats[$requestid]['stores']['cachestore_static']['misses'] -
$startstats[$requestid]['stores']['cachestore_static']['misses']);
$this->assertEquals(4, $endstats[$requestid]['stores']['cachestore_static']['hits'] -
$startstats[$requestid]['stores']['cachestore_static']['hits']);
$this->assertEquals(0, $endstats[$requestid]['stores']['cachestore_static']['sets'] -
$startstats[$requestid]['stores']['cachestore_static']['sets']);
}
}
+1 -1
View File
@@ -612,7 +612,7 @@ class core_calendar_renderer extends plugin_renderer_base {
if (empty($subscriptions)) {
$cell = new html_table_cell(get_string('nocalendarsubscriptions', 'calendar'));
$cell->colspan = 4;
$cell->colspan = 5;
$table->data[] = new html_table_row(array($cell));
}
$strnever = new lang_string('never', 'calendar');
+6 -2
View File
@@ -41,8 +41,6 @@
require_once('../config.php');
require_once($CFG->dirroot.'/calendar/lib.php');
require_sesskey();
$var = required_param('var', PARAM_ALPHA);
$return = clean_param(base64_decode(required_param('return', PARAM_RAW)), PARAM_LOCALURL);
$courseid = optional_param('id', -1, PARAM_INT);
@@ -51,6 +49,12 @@ if ($courseid != -1) {
} else {
$return = new moodle_url($return);
}
if (!confirm_sesskey()) {
// Do not call require_sesskey() since this page may be accessed without session (for example by bots).
redirect($return);
}
$url = new moodle_url('/calendar/set.php', array('return'=>base64_encode($return->out_as_local_url(false)), 'course' => $courseid, 'var'=>$var, 'sesskey'=>sesskey()));
$PAGE->set_url($url);
$PAGE->set_context(context_system::instance());
+3 -1
View File
@@ -106,7 +106,9 @@ class behat_calendar extends behat_base {
* @return Given[]
*/
public function i_hover_over_today_in_the_calendar() {
$todaysday = trim(strftime('%e'));
// For window's compatibility, using %d and not %e.
$todaysday = trim(strftime('%d'));
$todaysday = ltrim($todaysday, '0');
return $this->i_hover_over_day_of_this_month_in_calendar($todaysday);
}
}
+23 -11
View File
@@ -118,6 +118,7 @@ echo $search;
echo $OUTPUT->paging_bar($cohorts['totalcohorts'], $page, 25, $baseurl);
$data = array();
$editcolumnisempty = true;
foreach($cohorts['cohorts'] as $cohort) {
$line = array();
$cohortcontext = context::instance_by_id($cohort->contextid);
@@ -148,27 +149,29 @@ foreach($cohorts['cohorts'] as $cohort) {
$urlparams = array('id' => $cohort->id, 'returnurl' => $baseurl->out_as_local_url());
$showhideurl = new moodle_url('/cohort/edit.php', $urlparams + array('sesskey' => sesskey()));
if ($cohort->visible) {
$showhideurl->param('hide', 1);
$visibleimg = html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('t/hide'), 'alt' => get_string('hide'), 'class' => 'iconsmall'));
$buttons[] = html_writer::link($showhideurl, $visibleimg, array('title' => get_string('hide')));
} else {
$showhideurl->param('show', 1);
$visibleimg = html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('t/show'), 'alt' => get_string('show'), 'class' => 'iconsmall'));
$buttons[] = html_writer::link($showhideurl, $visibleimg, array('title' => get_string('show')));
}
if ($cohortmanager) {
if ($cohort->visible) {
$showhideurl->param('hide', 1);
$visibleimg = html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('t/hide'), 'alt' => get_string('hide'), 'class' => 'iconsmall'));
$buttons[] = html_writer::link($showhideurl, $visibleimg, array('title' => get_string('hide')));
} else {
$showhideurl->param('show', 1);
$visibleimg = html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('t/show'), 'alt' => get_string('show'), 'class' => 'iconsmall'));
$buttons[] = html_writer::link($showhideurl, $visibleimg, array('title' => get_string('show')));
}
$buttons[] = html_writer::link(new moodle_url('/cohort/edit.php', $urlparams + array('delete' => 1)),
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('t/delete'), 'alt' => get_string('delete'), 'class' => 'iconsmall')),
array('title' => get_string('delete')));
$buttons[] = html_writer::link(new moodle_url('/cohort/edit.php', $urlparams),
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('t/edit'), 'alt' => get_string('edit'), 'class' => 'iconsmall')),
array('title' => get_string('edit')));
$editcolumnisempty = false;
}
if ($cohortcanassign) {
$buttons[] = html_writer::link(new moodle_url('/cohort/assign.php', $urlparams),
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/users'), 'alt' => get_string('assign', 'core_cohort'), 'class' => 'iconsmall')),
array('title' => get_string('assign', 'core_cohort')));
$editcolumnisempty = false;
}
}
$line[] = implode(' ', $buttons);
@@ -180,12 +183,21 @@ foreach($cohorts['cohorts'] as $cohort) {
}
$table = new html_table();
$table->head = array(get_string('name', 'cohort'), get_string('idnumber', 'cohort'), get_string('description', 'cohort'),
get_string('memberscount', 'cohort'), get_string('component', 'cohort'), get_string('edit'));
$table->colclasses = array('leftalign name', 'leftalign id', 'leftalign description', 'leftalign size','centeralign source', 'centeralign action');
get_string('memberscount', 'cohort'), get_string('component', 'cohort'));
$table->colclasses = array('leftalign name', 'leftalign id', 'leftalign description', 'leftalign size','centeralign source');
if ($showall) {
array_unshift($table->head, get_string('category'));
array_unshift($table->colclasses, 'leftalign category');
}
if (!$editcolumnisempty) {
$table->head[] = get_string('edit');
$table->colclasses[] = 'centeralign action';
} else {
// Remove last column from $data.
foreach ($data as $row) {
array_pop($row->cells);
}
}
$table->id = 'cohorts';
$table->attributes['class'] = 'admintable generaltable';
$table->data = $data;
+2 -2
View File
@@ -301,7 +301,7 @@ class core_completion_external extends external_api {
$completions = $info->get_completions($user->id);
if (empty($completions)) {
throw new moodle_exception('err_nocriteria', 'completion');
throw new moodle_exception('nocriteriaset', 'completion');
}
// Load course completion.
@@ -365,7 +365,7 @@ class core_completion_external extends external_api {
'type' => new external_value(PARAM_TEXT, 'Type description'),
'criteria' => new external_value(PARAM_RAW, 'Criteria description'),
'requirement' => new external_value(PARAM_TEXT, 'Requirement description'),
'status' => new external_value(PARAM_TEXT, 'Status description'),
'status' => new external_value(PARAM_RAW, 'Status description, can be anything'),
), 'details'),
), 'Completions'
), ''
@@ -60,7 +60,11 @@ class completion_criteria_activity extends completion_criteria {
* @param stdClass $data details of various modules
*/
public function config_form_display(&$mform, $data = null) {
$mform->addElement('checkbox', 'criteria_activity['.$data->id.']', ucfirst(self::get_mod_name($data->module)).' - '.$data->name);
$modnames = get_module_types_names();
$mform->addElement('checkbox', 'criteria_activity['.$data->id.']',
$modnames[self::get_mod_name($data->module)].
' - '.
format_string($data->name));
if ($this->id) {
$mform->setDefault('criteria_activity['.$data->id.']', 1);
@@ -177,7 +181,8 @@ class completion_criteria_activity extends completion_criteria {
$module = $DB->get_record('course_modules', array('id' => $this->moduleinstance));
$activity = $DB->get_record($this->module, array('id' => $module->instance));
return shorten_text(urldecode($activity->name));
return shorten_text(format_string($activity->name, true,
array('context' => context_module::instance($module->id))));
}
/**
+4 -3
View File
@@ -27,7 +27,8 @@
require_once(__DIR__ . '/../../../lib/behat/behat_base.php');
use Behat\Behat\Context\Step\Given as Given,
use Behat\Behat\Context\Step\Given,
Behat\Behat\Context\Step\Then,
Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException;
/**
@@ -56,7 +57,7 @@ class behat_completion extends behat_base {
return array(
new Given('I go to the current course activity completion report'),
new Given('I hover "' . $this->escape($xpath) . '" "xpath_element"')
new Then('"' . $this->escape($xpath) . '" "xpath_element" should exist')
);
}
@@ -75,7 +76,7 @@ class behat_completion extends behat_base {
"/descendant::img[contains(@title, $titleliteral)]";
return array(
new Given('I go to the current course activity completion report'),
new Given('I hover "' . $this->escape($xpath) . '" "xpath_element"')
new Then('"' . $this->escape($xpath) . '" "xpath_element" should exist')
);
return $steps;
@@ -41,6 +41,12 @@ Feature: Allow teachers to manually mark users as complete when configured
And I follow "View course report"
And I should see "Student First"
And I follow "Click to mark user complete"
# Running cron just after clicking sometimes fail, so navigate back
# and ensure the student completion is updated before running cron.
And I am on site homepage
And I follow "Completion course"
And I follow "View course report"
And "//img[contains(@alt, 'Completed')]" "xpath_element" should exist in the "student1" "table_row"
And I trigger cron
And I am on site homepage
And I log out
+1 -1
View File
@@ -8,6 +8,6 @@
"require-dev": {
"phpunit/phpunit": "3.7.*",
"phpunit/dbUnit": "1.2.*",
"moodlehq/behat-extension": "1.29.4"
"moodlehq/behat-extension": "1.29.5"
}
}
Generated
+54 -58
View File
@@ -1,10 +1,10 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "8851ae0a65874465e2e9fef68335e110",
"hash": "e57a3c4f1934098d77de54215b059ba1",
"packages": [],
"packages-dev": [
{
@@ -405,16 +405,16 @@
},
{
"name": "doctrine/annotations",
"version": "v1.2.3",
"version": "v1.2.4",
"source": {
"type": "git",
"url": "https://github.com/doctrine/annotations.git",
"reference": "eeda578cbe24a170331a1cfdf78be723412df7a4"
"reference": "b5202eb9e83f8db52e0e58867e0a46e63be8332e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/annotations/zipball/eeda578cbe24a170331a1cfdf78be723412df7a4",
"reference": "eeda578cbe24a170331a1cfdf78be723412df7a4",
"url": "https://api.github.com/repos/doctrine/annotations/zipball/b5202eb9e83f8db52e0e58867e0a46e63be8332e",
"reference": "b5202eb9e83f8db52e0e58867e0a46e63be8332e",
"shasum": ""
},
"require": {
@@ -469,20 +469,20 @@
"docblock",
"parser"
],
"time": "2014-12-20 20:49:38"
"time": "2014-12-23 22:40:37"
},
{
"name": "doctrine/cache",
"version": "v1.4.0",
"version": "v1.4.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/cache.git",
"reference": "2346085d2b027b233ae1d5de59b07440b9f288c8"
"reference": "c9eadeb743ac6199f7eec423cb9426bc518b7b03"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/cache/zipball/2346085d2b027b233ae1d5de59b07440b9f288c8",
"reference": "2346085d2b027b233ae1d5de59b07440b9f288c8",
"url": "https://api.github.com/repos/doctrine/cache/zipball/c9eadeb743ac6199f7eec423cb9426bc518b7b03",
"reference": "c9eadeb743ac6199f7eec423cb9426bc518b7b03",
"shasum": ""
},
"require": {
@@ -493,13 +493,13 @@
},
"require-dev": {
"phpunit/phpunit": ">=3.7",
"predis/predis": "~0.8",
"predis/predis": "~1.0",
"satooshi/php-coveralls": "~0.6"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4.x-dev"
"dev-master": "1.5.x-dev"
}
},
"autoload": {
@@ -539,25 +539,28 @@
"cache",
"caching"
],
"time": "2015-01-15 20:38:55"
"time": "2015-04-15 00:11:59"
},
{
"name": "doctrine/collections",
"version": "v1.2",
"version": "v1.3.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/collections.git",
"reference": "b99c5c46c87126201899afe88ec490a25eedd6a2"
"reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/collections/zipball/b99c5c46c87126201899afe88ec490a25eedd6a2",
"reference": "b99c5c46c87126201899afe88ec490a25eedd6a2",
"url": "https://api.github.com/repos/doctrine/collections/zipball/6c1e4eef75f310ea1b3e30945e9f06e652128b8a",
"reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"type": "library",
"extra": {
"branch-alias": {
@@ -574,17 +577,6 @@
"MIT"
],
"authors": [
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com",
"homepage": "http://www.jwage.com/",
"role": "Creator"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com",
"homepage": "http://www.instaclick.com"
},
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
@@ -593,11 +585,17 @@
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
},
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com",
"homepage": "https://github.com/schmittjoh",
"role": "Developer of wrapped JMSSerializerBundle"
"email": "schmittjoh@gmail.com"
}
],
"description": "Collections Abstraction library",
@@ -607,7 +605,7 @@
"collections",
"iterator"
],
"time": "2014-02-03 23:07:43"
"time": "2015-04-14 22:21:58"
},
{
"name": "doctrine/common",
@@ -1011,16 +1009,16 @@
},
{
"name": "moodlehq/behat-extension",
"version": "v1.29.4",
"version": "v1.29.5",
"source": {
"type": "git",
"url": "https://github.com/moodlehq/moodle-behat-extension.git",
"reference": "ccc3027ba9959a23761e056a1cb570c66baa95ba"
"reference": "0ea55a59bfbfef4e8dcf47067c56779e5a02cd63"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/moodlehq/moodle-behat-extension/zipball/ccc3027ba9959a23761e056a1cb570c66baa95ba",
"reference": "ccc3027ba9959a23761e056a1cb570c66baa95ba",
"url": "https://api.github.com/repos/moodlehq/moodle-behat-extension/zipball/0ea55a59bfbfef4e8dcf47067c56779e5a02cd63",
"reference": "0ea55a59bfbfef4e8dcf47067c56779e5a02cd63",
"shasum": ""
},
"require": {
@@ -1031,7 +1029,7 @@
"behat/mink-selenium2-driver": "1.1.1",
"guzzlehttp/guzzle": "~3.1",
"php": ">=5.4.4",
"symfony/symfony": "2.4.4"
"symfony/symfony": "2.4.10"
},
"type": "library",
"autoload": {
@@ -1057,9 +1055,9 @@
"Moodle"
],
"support": {
"source": "https://github.com/moodlehq/moodle-behat-extension/tree/v1.29.4"
"source": "https://github.com/moodlehq/moodle-behat-extension/tree/v1.29.5"
},
"time": "2015-03-20 02:42:46"
"time": "2015-05-15 02:00:06"
},
{
"name": "phpunit/dbunit",
@@ -1576,16 +1574,16 @@
},
{
"name": "symfony/symfony",
"version": "v2.4.4",
"version": "v2.4.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/symfony.git",
"reference": "4697c33cdfb520dcf83fd6e4f7864fa26ddaebea"
"reference": "daed178afd4700dd18f4fb0ea6b72dcfd9a4792a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/symfony/zipball/4697c33cdfb520dcf83fd6e4f7864fa26ddaebea",
"reference": "4697c33cdfb520dcf83fd6e4f7864fa26ddaebea",
"url": "https://api.github.com/repos/symfony/symfony/zipball/daed178afd4700dd18f4fb0ea6b72dcfd9a4792a",
"reference": "daed178afd4700dd18f4fb0ea6b72dcfd9a4792a",
"shasum": ""
},
"require": {
@@ -1593,7 +1591,7 @@
"php": ">=5.3.3",
"psr/log": "~1.0",
"symfony/icu": "~1.0",
"twig/twig": "~1.11"
"twig/twig": "~1.12"
},
"replace": {
"symfony/browser-kit": "self.version",
@@ -1671,15 +1669,13 @@
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "The Symfony PHP framework",
@@ -1687,24 +1683,24 @@
"keywords": [
"framework"
],
"time": "2014-04-27 13:39:18"
"time": "2014-09-28 17:03:37"
},
{
"name": "twig/twig",
"version": "v1.18.0",
"version": "v1.18.1",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "4cf7464348e7f9893a93f7096a90b73722be99cf"
"reference": "9f70492f44398e276d1b81c1b43adfe6751c7b7f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/4cf7464348e7f9893a93f7096a90b73722be99cf",
"reference": "4cf7464348e7f9893a93f7096a90b73722be99cf",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/9f70492f44398e276d1b81c1b43adfe6751c7b7f",
"reference": "9f70492f44398e276d1b81c1b43adfe6751c7b7f",
"shasum": ""
},
"require": {
"php": ">=5.2.4"
"php": ">=5.2.7"
},
"type": "library",
"extra": {
@@ -1744,7 +1740,7 @@
"keywords": [
"templating"
],
"time": "2015-01-25 17:32:08"
"time": "2015-04-19 08:30:27"
}
],
"aliases": [],
+2 -2
View File
@@ -489,8 +489,8 @@ $CFG->admin = 'admin';
// $CFG->supportuserid = -20;
//
// Moodle 2.7 introduces a locking api for critical tasks (e.g. cron).
// The default locking system to use is DB locking for MySQL and Postgres, and File
// locking for Oracle and SQLServer. If $CFG->preventfilelocking is set, then the default
// The default locking system to use is DB locking for Postgres, and file locking for
// MySQL, Oracle and SQLServer. If $CFG->preventfilelocking is set, then the default
// will always be DB locking. It can be manually set to one of the lock
// factory classes listed below, or one of your own custom classes implementing the
// \core\lock\lock_factory interface.

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