Compare commits

..

732 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) ce3c7668b0 Moodle release 2.5.5 2014-03-07 18:51:43 +01:00
Eloy Lafuente (stronk7) 2616d6343b weekly release 2.5.4+ 2014-03-06 22:17:11 +01:00
Eloy Lafuente (stronk7) 495d15279b Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2014-03-06 22:17:05 +01:00
Yuliya Bozhko c5d7d20f40 MDL-44140 badges: Prevent non-owners to change visibility of issued badges
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-03-06 14:37:38 +08:00
Dan Poltawski 1c99db293d Revert "MDL-43852 Filters Fixed naked-OR conditions."
While the patch worked as intended, we discovered some other concerns
about use of this setting in testing.

This reverts commit 96315c3478.
2014-03-06 09:05:56 +08:00
Eloy Lafuente (stronk7) bf6f9d043d Merge branch 'MDL-44425-enfix_25' of git://github.com/mudrd8mz/moodle into MOODLE_25_STABLE 2014-03-06 00:37:09 +01:00
Helen Foster 6758339e44 MDL-44425 Merge English strings from the en_fix language pack 2014-03-05 13:38:27 +01:00
Dan Poltawski 3ca102e45a Merge branch 'wip-MDL-44287-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-03-05 14:18:25 +08:00
Damyon Wiese 186b8fed30 Merge branch 'MDL-44370-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2014-03-05 14:04:00 +08:00
Yuliya Bozhko 04d32d24a6 MDL-41585 badges: Add a note that badge recipient is a deleted user
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>

Conflicts:
	badges/renderer.php
2014-03-05 13:09:18 +08:00
Dan Poltawski 0634e5d581 Merge branch 'MDL-41248_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-03-05 12:40:01 +08:00
Dan Poltawski 12e33d79c0 Merge branch 'wip-MDL-44258-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-03-05 12:28:10 +08:00
Marina Glancy c726fd0064 MDL-44287 glossary: do not output before redirecting 2014-03-05 11:46:59 +08:00
Marina Glancy 471253efc7 MDL-44287 glossary: fixing warnings when importing as new module 2014-03-05 11:31:36 +08:00
Dan Poltawski 27a3ba41d2 Merge branch 'MDL-43930-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2014-03-05 11:29:25 +08:00
Dan Poltawski b8cccad323 Merge branch 'MDL-44065-m25' of https://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2014-03-05 10:52:50 +08:00
Damyon Wiese bdf5c9bd16 Merge branch 'wip-MDL-44074-M25_4' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE 2014-03-05 09:43:30 +08:00
AMOS bot 8147a04777 Automatically generated installer lang files 2014-03-05 00:54:46 +00:00
Frederic Massart 76a19577f9 MDL-44436 accesslib: Tests fail due to strict comparison 2014-03-04 17:32:45 +08:00
Ankit Agarwal 1d6c74a0c8 MDL-44370 calendar: Add support for restoring calendar log rules 2014-03-04 16:17:30 +08:00
Ankit Agarwal a6b1963349 MDL-44370 calendar: Fix calendar url in reports 2014-03-04 16:17:23 +08:00
Dan Poltawski 1533381d61 Merge branch 'MDL-44278_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-03-04 15:46:24 +08:00
Dan Poltawski 3104f89ec8 Merge branch 'MDL-44436-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-03-04 14:41:31 +08:00
Frederic Massart 890e85767e MDL-44436 context: Context IDs are forced to be int
The method context::insert_context_record() sets the context::$id to
an int, while when we create an instance, the $id is often read from
a DB $record object, and is a string. The ID should always be an int.
2014-03-04 14:25:20 +08:00
Damyon Wiese 94a875bee9 Merge branch 'MDL-43738_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-03-04 13:17:46 +08:00
Dan Poltawski cd0281f97e Merge branch 'm25_MDL-43852_SWF_Not_Embedded_By_Mediaplugin_Filter' of https://github.com/scara/moodle into MOODLE_25_STABLE 2014-03-04 12:56:15 +08:00
Dan Poltawski ea8647b39e MDL-43146 enrol_imsenterprise: missing sesskey protection 2014-03-04 12:26:21 +08:00
Frederic Massart a71a6de914 MDL-29409 repository_alfresco: Drop support for URL/link
The current solution has two major issues. Firstly, it is using the
session key in the file URL, allowing anyone with the link to steal
the identify of the poster. Secondly, the links are not presistent
and become broken as soon as the server is restarted. Let's not
support this any more until a proper solution is found in MDL-26454.
2014-03-04 11:35:02 +08:00
Dan Poltawski 1249c069bb Merge branch 'MDL-44377_25' of https://github.com/stronk7/moodle into MOODLE_25_STABLE 2014-03-03 15:15:23 +08:00
Marina Glancy fa07779026 MDL-39990 wiki: more detailed validation of view/edit access 2014-03-03 14:45:25 +08:00
Andrew Davis 3d7810ab3d MDL-44082 mod_chat: added a security check for users already in the chat activity 2014-03-03 12:16:59 +08:00
Tomasz Muras 7b839b0ec1 MDL-43656 mod_feedback: availablity date logic incorrect 2014-03-03 11:24:30 +08:00
Maria Torres 2978623cda MDL-43916 - Email addresses incorrectly displayed
When capabilities and settings do not allow it.
2014-03-03 10:37:36 +08:00
Dan Poltawski ed28719f03 Merge branch 'w06_MDL-43344_m25_flow' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2014-03-03 10:07:21 +08:00
Gareth J Barnard 68a5672df8 MDL-44074 theme_bootstrapbase: No 768px-979px & 1200px+ empty blk span calcs. 2014-03-01 08:59:42 +00:00
AMOS bot 2f9b2b81a3 Automatically generated installer lang files 2014-03-01 00:56:06 +00:00
Gordon Bateson 96315c3478 MDL-43852 Filters Fixed naked-OR conditions. 2014-02-28 23:57:31 +01:00
Eloy Lafuente (stronk7) 04904076fe MDL-44377 dml: enforce non-empty prefix for sqlsrv
Only MySQL is allowed to run Moodle instances without
(with an empty) database prefix. The rationale is that
"user" is a reserved word in every RDBMS but MySQL.

Before this patch, installation was breaking badly, when
the "user" CREATE TABLE statement was issued. With this
patch the error is shown earlier (on connection) preventing
any advance/use of the database.

This check is present in all the drivers, just sqlsrv was missing it.
2014-02-28 10:12:43 +01:00
Marina Glancy 067c2025e4 MDL-44258 Behat test for workshop, automate MDLQA-99 2014-02-28 16:31:34 +08:00
Tim Hunt 241634f1ab MDL-44278 Quiz time overrides: use the same step everywhere.
On the main form, you could select to the nearest minute. On
the override form you could only select to the nearest 5 minutes.
2014-02-28 09:01:00 +01:00
Tim Hunt 7d3af76e63 MDL-41248 completion: fix non-translatable text.
There were two hard-coded strings. Thanks to Guido Hornig for the suggested fix.
2014-02-28 08:09:39 +01:00
Damyon Wiese 53490ad50d weekly release 2.5.4+ 2014-02-28 10:02:24 +08:00
Damyon Wiese e6232f35d8 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2014-02-28 10:02:19 +08:00
David Monllao 39ce052c66 MDL-43738 behat: Refactoring the field type guesser
The previous behaviour delegates the responsability
of overwriting the 3 public methods to the child
classes, now the field type or moodleform field is
guessed earlier in the execution flow.

Other changes introduced here:
- Fix wrong moodleform detection when there is a form
  in the page but the field we are dealing with is
  not inside it.
- Some coding style changes.
2014-02-27 18:49:17 +08:00
David Monllao 67a73f7457 MDL-43738 behat: Backport to 2.5
Other issues this patch depends on were not
backported to 2.5 so we need to cover it:
- Add hardcoded waits as MDL-42625 was not
  integrated
- Add behat_form_field::get_internal_field_id()
- Use document.readyState rather than our
  custom JS query (MDL-42625)
2014-02-27 18:06:54 +08:00
David Monllao c8cd93583d MDL-43738 behat: Backporting new 2.7 methods to 2.5
We encourage backporting new feature files, adding
here also these Moodle 2.7 new step definitions so
future features will be easier to backport as we
would be able to directly cherry-pick them.
2014-02-27 18:06:54 +08:00
David Monllao b8939c9318 MDL-43738 behat: New step to adapt to radio buttons behaviour
Now we interact with radio fields through it's value
or text.
2014-02-27 18:06:53 +08:00
David Monllao cdbd432616 MDL-43738 behat: Normalization and major refactoring of getters and setters
Every single step that sets or gets a value from a field
has been updated to follow the same behaviour both when
using it through a single step or through generic steps
like "I fill the moodle form with:", to resume all the
changes:
- Created a behat_form_group to re-guess the field type
  and act appropriately setting and getting it's value
- Normalize all getters and setters to use behat_form_field
  children
- Complete behat_form_checkbox to trigger the appropiate JS
  event needed to perform some JS scripts that are listening
- Refactor MDL-43713 multi-select changes and remove
  the two new steps introduced there as that behaviour can
  be managed from the generic getter
2014-02-27 18:06:52 +08:00
David Monllao 6013abc914 MDL-43738 behat: Functional tests for fields management
We are cheating with this .feature file as this
is not a behaviour and we are just testing the
framework, but in this case I think that everybody
will agree on the need of doing it, as every browser
behaves differently and minor changes in the getters
and setters can easily end up breaking the behaviours.

All credit goes to Eloy Lafuente (stronk7).
2014-02-27 18:06:11 +08:00
Eloy Lafuente (stronk7) 33fa8e7dba MDL-43713 behat: improve multi-select support
This patch implements:

1) Normalization of options. Before the patch options
in a select were being returned as "op1 op2 op3" by selenium
and "op1 op2 op3" by goutte. With the patch, those lists
are always returned like "op1, op2, op3". If real commas are
needed when handling multiple selects they should
be escaped with backslash in feature files.

2) Support for selecting multiple options. Before the patch
only one option was selected and a new selection was cleaning the
previous one. With the patch it's possible to pass "op1, op2" in
these steps:
  - I fill the moodle form with (table)
  - I select "OPTION_STRING" from "SELECT_STRING"

3) Ability to match multiple options in this steps. Before the
patch matching of multiple was really random, now every every
passed option ("opt1, opt2") is individually verified. It applies
to these 2 steps:
  - the "ELEMENT" select box should contain "OPTIONS"
  - the "ELEMENT" select box should not contain "OPTIONS"

4) Two new steps able to verify if a form have some options selected or no:
  - the "ELEMENT" select box should contain "OPTIONS" selected
  - the "ELEMENT" select box should contain "OPTIONS" not selected

5) Change get_value from xpath search to Mink's getValue() that is immediate
(does not need form submission) and works for all browsers but Safari, that
fails because of the extra ->click() issued.

Note all the changes 1-4 only affect to multi-select fields. Single
selects should continue working 100% the same.

The change 5) causes Safari to fail. The problem has been traced down to
the extra ->click() present there. Anyway there are not test cases
requiring that "immediate" evaluation right now. Only the special feature
file attached verifies it.
2014-02-27 18:06:10 +08:00
Damyon Wiese 28b3ddbdbe Merge branch 'wip-mdl-44248' of https://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2014-02-27 13:32:22 +08:00
Rajesh Taneja 98c5ac394f MDL-44248 badges: Added wait after ajax request
After ajax give some time to make sure request is complete
else Modal dialog present error will appear and fail behat
2014-02-27 12:52:33 +08:00
David Monllao a9c0c865dd MDL-44286 behat: Fixing JS code error
PhantomJS console shows a JS error regarding
an undefined Syn var; as explained by Andrew
Nicols this is caused by Syn supported features
checker, the change in moodle-behat-extension
solves this problem.
2014-02-27 11:55:54 +08:00
Dan Poltawski 361604089e Merge branch 'MDL-43882_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-02-25 15:34:03 +08:00
David Monllao 8865729c0c MDL-43882 lib: Adding info about the change in upgrade.txt 2014-02-25 11:27:51 +08:00
Damyon Wiese a3d2e1c590 MDL-40619 mod_quiz: Remove commented non-js behat scenario 2014-02-25 11:05:57 +08:00
Damyon Wiese 94133c20fa Merge branch 'wip-MDL-40619-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-02-25 11:05:26 +08:00
Dan Poltawski c1a7185e62 Merge branch 'MDL-43405_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2014-02-25 10:30:38 +08:00
David Scotson 723fc6fd4a MDL-44168 html: border=1 on regexdetect table
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-02-24 15:21:32 +08:00
Damyon Wiese d3ccdf54bd Merge branch 'MDL-44248_25' of https://github.com/totara/openbadges into MOODLE_25_STABLE 2014-02-24 14:26:29 +08:00
Damyon Wiese 5e200e3215 Merge branch '44279-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-02-24 13:39:05 +08:00
Damyon Wiese d92edc97b5 Merge branch 'MDL-44286_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-02-24 13:34:08 +08:00
Michael Aherne 624dd20db1 MDL-44066 caching Don't advertise session mode for MongoDB and memcached 2014-02-24 12:50:17 +08:00
Damyon Wiese 89093f0f07 Merge branch '44217-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-02-24 11:14:25 +08:00
Damyon Wiese 931c3f4cfb Merge branch 'MDL-34319_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2014-02-24 11:10:37 +08:00
Sam Hemelryk 1bd8e824a5 MDL-44217 theme_bootstrapbase: darkend link colour by 5% for accessibility 2014-02-24 16:07:34 +13:00
Damyon Wiese d36afa9f17 Merge branch 'MDL-41767-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-02-24 10:41:49 +08:00
David Monllao 6a9d169ec8 MDL-43882 dml: New test for perf_get_xxxx() methods 2014-02-21 13:20:16 +08:00
David Monllao b77b992178 MDL-43882 performance: New metric, time spent by the database
This patch adds a new performance metric to the performance
info shown by MDL_PERF* vars, the time spent by the database,
it was one of the wonderful @poltawski ideas. To be more specific
the value displayed is the sum of the time elapsed between query_start()
and query_end().
2014-02-21 13:20:16 +08:00
David Monllao b4d3073b1c MDL-44286 behat: Updating to our custom Syn library 2014-02-21 10:18:46 +08:00
AMOS bot b34752a198 Automatically generated installer lang files 2014-02-21 00:45:32 +00:00
Sam Hemelryk 987a9359ac MDL-42279 user: fixed typo in user_get_user_details_courses 2014-02-21 08:34:39 +13:00
Sam Hemelryk ad16262bc5 MDL-44279 user: added unit test to trigger known bug 2014-02-21 08:34:39 +13:00
Eloy Lafuente (stronk7) 7d415929ec weekly release 2.5.4+ 2014-02-20 12:43:22 +01:00
Eloy Lafuente (stronk7) 6e21938526 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2014-02-20 12:43:17 +01:00
Damyon Wiese cfbc6b93db MDL-43930 assign: Do not log when user is logged in as someone else.
I do not agree with this behaviour - but this makes it consistent with other modules.

Conflicts:
	mod/assign/locallib.php
2014-02-20 12:35:06 +08:00
Damyon Wiese 4131d08b74 Merge branch 'MDL-44118_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-02-19 09:20:36 +08:00
Dan Poltawski 4aceac6294 Merge branch 'MDL-43182_25' of git://github.com/mr-russ/moodle into MOODLE_25_STABLE 2014-02-19 09:16:51 +08:00
Eloy Lafuente (stronk7) cb7bdd7dd3 MDL-43265 question: incorrect closing parenthesis 2014-02-19 00:11:47 +01:00
Eloy Lafuente (stronk7) cb3385aefa Merge branch 'MDL-43265_25' of https://github.com/jacks92/moodle into MOODLE_25_STABLE 2014-02-18 23:56:23 +01:00
Eloy Lafuente (stronk7) 2864423334 Merge branch 'MDL-43337-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-02-18 23:25:44 +01:00
Tim Hunt 777017e784 MDL-44118 new environment check are all quiz attempts upgraded.
In Moodle 2.1, there was a major DB upgrade relating to questions, and
it was possible to delay some of that upgrade. Now, those DB tables are
changing again, and the time has come to insist that all the updata has
been upgraded (or deleted).
2014-02-18 12:03:13 +00:00
Dan Poltawski 71ca9c1d48 Merge branch 'm25_MDL-43541' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2014-02-18 14:14:02 +08:00
Damyon Wiese ead7a51e42 Merge branch 'MDL-41646_25' of git://github.com/apsdehal/moodle into MOODLE_25_STABLE 2014-02-18 12:42:31 +08:00
Eloy Lafuente (stronk7) 42651ea3f1 Merge branch '43822-25-fixonly' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-02-18 02:12:30 +01:00
Yuliya Bozhko e0b5717b80 MDL-44248 badges: Fix download badge button on badge page
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-02-18 09:56:41 +13:00
sam marshall 6de5b2108f MDL-44065 Course: _add_instance exception leads to inconsistent db
If an exception occurs during a module's _add_instance function, this
results in a course_modules entry with instance=0. The system already
handled returning false to this function, but did not handle
exceptions.
2014-02-17 10:54:31 +00:00
Dan Marsden 2a26bd6dde MDL-43541 SCORM: set first launchable sco correctly. 2014-02-17 19:58:36 +13:00
Damyon Wiese 2c3e6e3d16 Merge branch 'MDL-43504-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-02-17 14:24:52 +08:00
Marina Glancy 94424caa27 MDL-40619 behat: test for creating a one-question quiz 2014-02-17 14:20:24 +08:00
Dan Poltawski 13628d19a8 Merge branch 'MDL-42618_25' of git://github.com/SWiT/moodle into MOODLE_25_STABLE 2014-02-17 12:14:21 +08:00
Dan Poltawski 392c600873 Merge branch 'MDL-27414_25' of git://github.com/jmvedrine/moodle into MOODLE_25_STABLE 2014-02-17 12:06:46 +08:00
Damyon Wiese dd8cfb18cb Merge branch 'MDL-42902-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2014-02-17 11:40:50 +08:00
Andrew Nicols 51b833de3e MDL-43504 Course: Include the course/category collapse JS correctly
This was previously only included when there were hidden categories to show
which were not yet visible. As a result, if all categories were visible,
then the JS was not included.
2014-02-17 11:40:48 +08:00
Andrew Nicols 5b7fbdb938 MDL-43504 Javascript: Frontpage collapsing should not depend on enableajax
This is an oversight, but we should not depend on the enableajax setting
which we're trying to deprecate.
2014-02-17 11:40:48 +08:00
Dan Poltawski a392332a28 Merge branch 'MDL-42033_25' of git://github.com/jmvedrine/moodle into MOODLE_25_STABLE 2014-02-17 10:32:37 +08:00
Damyon Wiese 6b7f27698c Merge branch 'MDL-44018_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-02-17 09:25:21 +08:00
fabmen 68ca11f96a MDL-43405 auth_ldap: Fixed issue with undefined variable: ldap_cookie 2014-02-16 14:23:11 -08:00
fabmen 058bb7cd33 MDL-34319 auth_cas: Fixed issue with undefined variable: ldapconnection 2014-02-16 14:20:36 -08:00
Sam Hemelryk 9ef6537e4c Merge branch 'MDL-44037_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-02-17 10:16:36 +13:00
Sam Hemelryk 0c51cfefb7 Merge branch 'MDL-42404_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-02-17 10:15:39 +13:00
Sam Hemelryk 077aa1b431 Merge branch 'MDL-44142-25' of git://github.com/mrverrall/moodle into MOODLE_25_STABLE 2014-02-17 09:16:36 +13:00
Sam Hemelryk a2b2fa9b3f Merge branch 'MDL-44079-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE
Conflicts:
	lib/yui/build/moodle-core-notification/moodle-core-notification-min.js
2014-02-17 08:48:52 +13:00
Sam Hemelryk fc46d5b93f MDL-43822 theme_bootstrapbase: blocks less tidied and reorganised
Thanks Gareth for the peer-review.
2014-02-17 08:17:21 +13:00
Jean-Michel Vedrine bc55fbe372 MDL-42033 Files in subdirs not exported correctly by question XML format 2014-02-16 19:50:50 +01:00
Simon Coggins 821746c2c0 MDL-43049 accesslib: Fix typo in memory optimization code 2014-02-16 20:15:40 +11:00
AMOS bot bfb1d60e15 Automatically generated installer lang files 2014-02-15 00:43:53 +00:00
Jean-Michel Vedrine ee34440ae4 MDL-27414 Upgrade the randomsamatch qtype to the new question engine
Added XML import/export
Different randomsamatch qtypes in the same quiz can now pick the same
shortanswer question.
Images are not preserved if shortanswer question is deleted after being
used in a randomsamatch attempt.
2014-02-14 16:56:47 +01:00
Paul Verrall 3f6d43dc32 MDL-44142 Cohorts: Use maxusersperpage for list of current users. 2014-02-13 16:19:59 +00:00
Eloy Lafuente (stronk7) c8d383fdcd weekly release 2.5.4+ 2014-02-13 15:29:58 +01:00
Eloy Lafuente (stronk7) ac58bd76b8 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2014-02-13 15:29:53 +01:00
Jayesh Anandani 83578abe1d MDL-43265 Fix question name text to 255 chars 2014-02-13 17:02:59 +05:30
David Monllao 2e1b3ff470 MDL-44037 behat: New feature -> publishing rubric templates
This patch automates MDLQA-1186; rubrics can be
shared as templates.
2014-02-13 17:01:27 +08:00
David Monllao 9f0a128b2b MDL-42404 behat: Covering MDL-39710 with behat features
I've contributed to a large an ugly scenario
in favour of performance as separating it in another
scenario or feature would add 3 or 4 minutes to the suite.
2014-02-13 16:20:41 +08:00
David Monllao f4d445755a MDL-42404 behat: Adding feature to test reusing user's rubrics
Automates MDLQA-1187, teachers can reuse their
rubrics in other activity.
2014-02-13 16:20:41 +08:00
David Monllao 6c40937443 MDL-42404 behat: Adding rubrics step definitions 2014-02-13 16:20:41 +08:00
David Monllao 98ce4582f7 MDL-42404 behat: Adding edit rubrics feature
Automates the following MDLQA-1185, MDLQA-1188
and MDLQA-1427. All of them related with the
expected outcomes after editing rubrics definitions
that were already used to grade students.
2014-02-13 16:20:41 +08:00
David Monllao 68153c52ad MDL-42404 behat: Adding yui-dialog to dialogue selector 2014-02-13 16:20:41 +08:00
Frederic Massart 8d9528a0b1 MDL-43337 enrol: More tests for get_enrolled_users_with_capability 2014-02-13 12:07:19 +08:00
Frederic Massart 8c12248e77 MDL-43337 enrol: Missing break in get_enrolled_users WS 2014-02-13 12:07:19 +08:00
apsdehal b506b1af20 MDL-43337 WebService: Missing break statement added
In function get_enrolled_users_with_capability
2014-02-13 12:07:19 +08:00
Sam Hemelryk 96dabdf68d Merge branch 'int25_MDL-43200' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2014-02-13 08:25:47 +13:00
Petr Škoda a23b04e522 MDL-43200 fix enrol_manual externallib tests 2014-02-12 16:03:18 +08:00
Andrew Nicols 19421b8bdb MDL-43941 Behat: Section visibility tests should not check if activities are visible
It should be possible for activities to be visible even when the section
they are in is hidden.

However, when a section is hidden, all activities in that section are also
then initially hidden. Therefore, this commit splits out the hidden test to
a new test so that the initial state of activities after hiding can still
be tested.
2014-02-12 12:24:05 +08:00
David Mudrák ae5a3f287c MDL-42711/MDL-42902 Fix the broken links in RSS feed block
If the <description> of the feed contains URLs longer than 30 characters, the
URL is split because of the break_up_long_words(). When combined with the
filter that converts URLs to links, this produces broken links.

The proper solution would be to improve break_up_long_words() so that it does
not modifies URLs at all. As a temporary solution for our purpose now is to
call format_text() prior to break_up_long_words() as it will not modify the
inner content of the <a> tag.

This should be fixed upstream. See also discussion at
https://moodle.org/mod/forum/discuss.php?d=34947
2014-02-12 09:02:23 +08:00
Sam Hemelryk be1ae343ea Merge branch 'MDL-41644_25' of git://github.com/apsdehal/moodle into MOODLE_25_STABLE 2014-02-12 09:24:08 +13:00
Marina Glancy 72c9dda9fd Merge branch '28567-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-02-11 14:43:22 +08:00
Marina Glancy aff0144914 MDL-42505 whitespace correction 2014-02-11 14:36:58 +08:00
Michael Milette 2a8b9a0bfb MDL-42505 - Feedback plugin: Inappropriate use of fieldset tags around form and cancel button
Changes:
* Removed the fieldset HTML tags around the Cancel button at the bottom of the form.
* Removed the fieldset HTML tags around the whole form.
* Added missing fieldset tags around groups of radio buttons and checkboxes.
* Removed unordered list wrapping dropdown lists.
* Removed duplicate label for dropdown lists.

Modified Files:
* mod/feedback/complete.php
* mod/feedback/complete_guest.php
* mod/feedback/item/multichoice/lib.php
* mod/feedback/item/multichoicerated/lib.php

Signed-off-by: Michael Milette <michael.milette@instruxmedia.com>
2014-02-11 14:15:24 +08:00
Andrew Nicols d5080b821b MDL-44079 Javascript: Closing a tooltip should pass event details 2014-02-11 12:30:21 +08:00
Andrew Nicols afe32a1fe5 MDL-44079 Javascript: Check whether a dialogue is focused before closing 2014-02-11 12:30:07 +08:00
Sam Hemelryk e91a87511b Merge branch 'MDL-43941-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-02-11 14:10:55 +13:00
AMOS bot b46eba8d14 Automatically generated installer lang files 2014-02-11 00:42:13 +00:00
Andrew Nicols 72d4172c61 MDL-43994 Blocks: Hide the move icon when blocks are docked on Afterburner too 2014-02-11 00:10:56 +01:00
Sam Hemelryk 04324e81e2 Merge branch 'MDL-43929_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-02-11 08:27:40 +13:00
Sam Hemelryk ccf9c3300e MDL-43977 theme_bootstrapbase: small fix to make custom menu work with JS disabled
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-02-10 18:18:44 +08:00
Tim Hunt 78270bd900 MDL-43929 question manual grading: keep comment when validation fails.
If the validation failed, so the manual grading page was re-displayed
with a validation error, then any comment that had just been typed in
was getting lost. This fixes that.
2014-02-10 07:38:38 +00:00
Sam Hemelryk f7dea8ae75 Merge branch 'wip_25_mdl-32724' of https://github.com/iarenaza/moodle into MOODLE_25_STABLE 2014-02-10 15:26:18 +13:00
Sam Hemelryk 36803e0f78 Merge branch 'MDL-43774_25' of https://github.com/totara/openbadges into MOODLE_25_STABLE 2014-02-10 15:20:20 +13:00
Sam Hemelryk d42f989c81 Merge branch 'MDL-40938-25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2014-02-10 14:16:17 +13:00
apsdehal 1f45af2437 MDL-43200 WebServices: Reset Instance variable 2014-02-10 14:13:19 +13:00
Sam Hemelryk d97c8c30ea Merge branch 'MDL-42882-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2014-02-10 13:13:00 +13:00
Sam Hemelryk 387883a928 MDL-44056 question: added new default property to unit tests 2014-02-10 12:56:56 +13:00
Sam Hemelryk 074b8b2989 Merge branch 'MDL-44056_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-02-10 11:30:16 +13:00
Sam Hemelryk 3c1bba2b11 Merge branch 'MDL-43838_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-02-10 11:27:07 +13:00
Sam Hemelryk a29f1f9629 Merge branch 'MDL-43992-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-02-10 09:40:17 +13:00
Sam Hemelryk d16cd0840d MDL-44020 core: version bump for service change 2014-02-10 09:37:25 +13:00
Sam Hemelryk 579319888c Merge branch 'MDL-44020-STABLE-25' of git://github.com/jleyva/moodle into MOODLE_25_STABLE 2014-02-10 09:31:01 +13:00
Sam Hemelryk 1ffb89f9b8 Merge branch 'MDL-44046_m25' of https://github.com/merrill-oakland/moodle into MOODLE_25_STABLE 2014-02-10 09:28:14 +13:00
Sam Hemelryk 5afb7fd120 Merge branch 'MDL-43978_25' of https://github.com/totara/openbadges into MOODLE_25_STABLE 2014-02-10 09:23:56 +13:00
Sam Hemelryk 966bb0f45a Merge branch 'MDL-43994-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-02-10 09:06:35 +13:00
Sam Hemelryk 202e947ffc Merge branch 'MDL-44029-quiz-group-delete-handler-bug_25_STABLE' of https://github.com/mpetrowi/moodle into MOODLE_25_STABLE 2014-02-10 08:44:50 +13:00
Sam Hemelryk 1397e103ba Merge branch 'MDL-43946_m25' of https://github.com/merrill-oakland/moodle into MOODLE_25_STABLE 2014-02-10 08:42:59 +13:00
Sam Hemelryk 00b099a6c7 MLD-28567 calendar: improved course filter process 2014-02-10 08:31:39 +13:00
Tim Hunt b0e225ba47 MDL-44056 questions: restore essay attempts from 2.0 notice. 2014-02-09 17:56:28 +00:00
AMOS bot 242cf47123 Automatically generated installer lang files 2014-02-09 00:42:15 +00:00
Mary Evans 67ad915c00 MDL-40938 theme_bootstrapbase: Fix for text fields in login block. 2014-02-08 02:40:42 +00:00
Tim Hunt add46ba2eb MDL-44018 quesiton variant was not backed up or restored. 2014-02-07 21:55:29 +00:00
Eric Merrill a48ab57f89 MDL-44046 gradebook Reduce duplicates returned during sortorder fixing. 2014-02-07 09:30:53 -05:00
Juan Leyva 809a70be6b MDL-44020 Add core_calendar_get_calendar_events function to the Moodle Mobile service 2014-02-07 11:27:31 +01:00
Andrew Nicols b5c5cb4390 MDL-43994 Blocks: Hide the move icon when blocks are docked 2014-02-07 17:47:10 +08:00
Andrew Nicols b65613e439 MDL-43992 Javascript: Remove <return> key listener for confirmation
The listener was previously confirming, even when the cancel or 'No'
buttons were selected. However, having the default action as 'Confirm'
seems dangerous in this situation, so removing this option entirely.
2014-02-07 16:35:50 +08:00
Petr Skoda 9f2967e301 MDL-43344 upgrade to latest Flowplayer 2014-02-07 13:11:33 +08:00
Sam Hemelryk 4c56e8210c weekly release 2.5.4+ 2014-02-07 11:46:06 +13:00
Yuliya Bozhko 0fc6693dd1 MDL-43978 badges: Fix lang string 2014-02-07 09:10:09 +13:00
Matt Petro b095ee9f3a MDL-44029 mod_quiz: Fixing group deleted handler so it does not remove user overrides. 2014-02-06 14:11:36 -05:00
Eric Merrill 68f1f6eeb7 MDL-43946 gradebook upgrade Improve SQL to find duplicate sortorders. 2014-02-05 14:01:40 -05:00
Marina Glancy d977433b7a Merge branch 'MDL-42339_m25' of git://github.com/rwijaya/moodle into MOODLE_25_STABLE 2014-02-05 15:58:42 +08:00
Rossiani Wijaya d5e77b4e12 MDL-42339 - removed double formatting for set_title() and set_heading() 2014-02-05 15:28:01 +08:00
Dan Poltawski e7c932da99 MDL-42882 upgrade: Improvements to upgrade code
Suggested by Petr:
* Don't rely on single user for upgrade
* Make the pathnamehash generation a bit clearer (and add
  a test to verify its correctly formed).
2014-02-05 14:40:51 +08:00
Yuliya Bozhko 3d46592c8b MDL-43774 badges: Stop overriding default course navigation 2014-02-05 10:48:40 +13:00
Yuliya Bozhko 666ab4becb MDL-43978 badges: Display error message to guest users viewing "My Badges" page 2014-02-05 10:00:50 +13:00
Iñaki Arenaza 5448b6b94f MDL-32724: LDAP Auth function user_update() returns true even if update has failed 2014-02-04 19:26:14 +01:00
Eloy Lafuente (stronk7) 06a25d72fa Merge branch 'wip-MDL-41384-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-02-04 10:41:10 +01:00
apsdehal 14dcbc3622 MDL-41644 Backup: Update CSS class .notifywarning with .notifyproblem 2014-02-04 09:45:16 +05:30
Andrew Nicols 6a87e32c28 MDL-43941 Course: Allow AJAX show/hide of activities in hidden and orphaned sections 2014-02-04 10:58:22 +08:00
Sam Hemelryk ab34537ca4 Merge branch 'MDL-43369-25' of git://github.com/jamiepratt/moodle into MOODLE_25_STABLE 2014-02-04 15:23:57 +13:00
Oleg Sychev 64ab5badbf MDL-42456: add Mercurial vcs support to plugin_external_source 2014-02-04 13:13:03 +13:00
Sam Hemelryk 06ce535d9c Merge branch 'MDL-43885-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-02-04 12:38:25 +13:00
Eloy Lafuente (stronk7) ae9a8e772a Merge branch 'wip-MDL-43821-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-02-04 00:12:18 +01:00
Eloy Lafuente (stronk7) 85f47a3ebd Merge branch 'wip-MDL-43828-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-02-03 23:58:22 +01:00
Sam Hemelryk 8aaf8591f1 Merge branch 'MDL-43892_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-02-04 10:57:32 +13:00
Sam Hemelryk 23ca363633 Merge branch 'wip-MDL-33920-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-02-04 10:47:04 +13:00
Gordon Bateson d084d17c0e MDL-40410 remove ampersands required for PHP strict standards lib/tablelib.php 2014-02-04 10:06:34 +13:00
Sam Hemelryk 881b8443ce Merge branch 'MDL-43884-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2014-02-04 09:11:36 +13:00
Sam Hemelryk 5461c61f02 Merge branch 'wip-MDL-39942-MOODLE_25_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_25_STABLE 2014-02-04 08:29:09 +13:00
Eloy Lafuente (stronk7) ba971d4cca Merge branch 'm25_MDL-37714' of git://github.com/greg-or/moodle into MOODLE_25_STABLE 2014-02-03 17:58:49 +01:00
Marina Glancy ccb30e1f7b Merge branch 'MDL-41647_25' of git://github.com/apsdehal/moodle into MOODLE_25_STABLE 2014-02-03 17:35:17 +08:00
Dan Poltawski ec62826d8d MDL-42882 upgrade: improved SQL query
Kudos to Tim Hunt who came up with this, on mysql with 4 milion
records (and a fast SSD) the performance difference is:

Original: 36.83 sec
New query: 8.63 sec
2014-02-03 17:30:40 +08:00
Dan Poltawski 7ea6574332 MDL-42882 upgrade: unit tests for root folders upgrade
Just verifying the original behaviour
2014-02-03 17:30:39 +08:00
David Monllao 3a362028d8 MDL-43838 behat: Clean theme compatibility with small and medium screen sizes 2014-02-03 17:11:28 +08:00
Marina Glancy 1038bbb275 Merge branch 'MDL-43805-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2014-02-03 16:10:17 +08:00
Marina Glancy 8c3470e3ce Merge branch 'MDL-43440-25' of git://github.com/mr-russ/moodle into MOODLE_25_STABLE 2014-02-03 13:52:11 +08:00
apsdehal 416751f3c2 MDL-41646 Wiki: Removed unnecessary wiki_info class 2014-02-02 15:51:06 +05:30
apsdehal 72438fb70e MDL-41647 WebServices: Changed notification CSS class 2014-02-02 15:22:00 +05:30
Marina Glancy 992da86444 MDL-43828 forum: allow to select single available group when posting 2014-01-31 17:01:09 +08:00
Marina Glancy 8eb0c4d400 MDL-43821 completion: fix bug in section completion progress
Thanks to Shane Dye for the provided patch
2014-01-31 17:00:56 +08:00
Marina Glancy c8ced7721a MDL-41384 course: do not show debugging message if $COURSE contains format options
before showing debugging message make sure that field exists in database and not only in the object
2014-01-31 17:00:45 +08:00
Marina Glancy 570352c735 MDL-41384 upgrade: make sure to re-read $SITE from DB when course table is altered 2014-01-31 17:00:45 +08:00
Marina Glancy bc9f8dc94e MDL-33920 filepicker: hide 'save as' field when not applicable 2014-01-31 16:48:37 +08:00
Marina Glancy a7cae2648d weekly release 2.5.4+ 2014-01-31 14:11:16 +08:00
Marina Glancy c2a4d082a6 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2014-01-31 14:11:15 +08:00
Gregory Faller d291a6fddd MDL-37714: Correctly identify frequently used comments during restore 2014-01-31 10:21:49 +10:30
Damyon Wiese a502377bac MDL-43805 assign: Behat test for quickgrading bug 2014-01-29 20:42:21 +08:00
Damyon Wiese b1e2f79ff6 MDL-43805 assign: Quickgrading wipes out grades for hidden columns.
Grr.. quickgrading will always be a hack.

Conflicts:
	mod/assign/locallib.php
2014-01-29 20:42:16 +08:00
Andrew Nicols 2f2ccf4b81 MDL-43885 Javascript: Make the [X] button work like 'No' in relevant dialogues
The [X] button on the dialogue is another form of the 'No' button and
should behave as such. In some dialogues this matters more than others
because the dialogue is destroyed.
2014-01-29 11:20:31 +08:00
Tim Hunt 6062fc2a50 MDL-43892 dbtransfer: Fix missing string. 2014-01-28 15:57:10 +00:00
Ankit Agarwal d1458fc374 MDL-43884 database: Fix get_tables() api for external stores 2014-01-28 16:50:00 +08:00
Kevin Wiliarty 5fe7d182d8 MDL-39942: invite only users who can post to discuss 2014-01-27 22:40:26 -05:00
Eloy Lafuente (stronk7) 23cf5d3da2 Merge branch 'm25_MDL-43797' of https://github.com/totara/moodle into MOODLE_25_STABLE 2014-01-28 00:44:49 +01:00
David Curry 64e6f2348e MDL-43797 lib/db/upgrade.php: Optimise sql for my_pages deletion
Change-Id: I329ef400cf2e3da80450460901e28061b42b0fd4
2014-01-28 12:32:28 +13:00
Sam Hemelryk 9b14c62e98 Merge branch 'MDL-43246_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-01-28 12:16:23 +13:00
Eloy Lafuente (stronk7) 68fe9b045c Merge branch '43688-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-28 00:01:26 +01:00
Eloy Lafuente (stronk7) 2ee4c99575 Merge branch 'MDL-43874_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-01-27 23:53:40 +01:00
David Curry 0be6396993 MDL-43797 lib/db/upgrade.php: Remove custom pages for deleted users
Change-Id: I51f7d11abdf559944e18891703611dbd729cde64
2014-01-28 11:13:21 +13:00
David Curry daea5bfeca MDL-43797 lib/moodlelib.php: Remove custom homepages on user deletion
Change-Id: Ic4cd220cb7a6694dc56625ded649cf5172e899a7
2014-01-28 11:07:38 +13:00
Eloy Lafuente (stronk7) e3870e29d8 Merge branch 'MDL-43757_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-01-27 21:11:23 +01:00
Eloy Lafuente (stronk7) 238e8a94f8 Merge branch 'wip-mdl-43766-m25' of https://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2014-01-27 19:20:52 +01:00
Eloy Lafuente (stronk7) 7e84ef177d Merge branch 'MDL-43773-MOODLE_25_STABLE' of https://github.com/lucisgit/moodle into MOODLE_25_STABLE 2014-01-27 17:23:32 +01:00
Eloy Lafuente (stronk7) 333751af3a Merge branch 'MDL-43581_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-01-27 17:04:47 +01:00
Tim Hunt 16fcc8807b MDL-43874 quiz, teacher comments should respect display options.
Whether the comments on manually graded questions were visible to
students should have been controlled by the 'Specific feedback' Review
option in the quiz settings. However, the quiz was not setting
$displayoptions->manualcomment, so it did not work.
2014-01-27 12:26:52 +00:00
Eloy Lafuente (stronk7) f6590d5dd3 Merge branch 'wip-MDL-43800-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-01-27 12:02:51 +01:00
Tim Hunt bcd1fba672 MDL-43581 additionalhtmlfooter should be added to every page
Not just pages with a visible footer.
2014-01-27 10:26:08 +00:00
Eloy Lafuente (stronk7) e373f3bd04 Merge branch 'MDL-43809_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-01-27 11:00:47 +01:00
AMOS bot 203d95dcbe Automatically generated installer lang files 2014-01-27 00:42:37 +00:00
Mark Nielsen dbabf975c5 MDL-43734: Prevent purging of all user session cache 2014-01-27 00:29:38 +01:00
Sam Hemelryk 6536f04a5e Merge branch 'w04_MDL-43746_m25_courselogin' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2014-01-27 11:32:20 +13:00
Tony Butler dcab3e1a26 MDL-43773 mod_choice: Swap order of name column headings in text export 2014-01-24 11:21:09 +00:00
David Monllao fa6a33af90 MDL-43757 behat: Allowing the form field guesser to detect TinyMCE
It includes 2 more minor fixes:
- Escapes values sent to TinyMCE as it was breaking
  when values contained double quotes.
- Adding seconds to the screenshots directory to
  avoid using the same folder for multiple runs.
2014-01-24 15:19:31 +08:00
David Monllao e456f9d65d MDL-43757 messaging: Behat feature to test participants messaging
The new test checks that messages can be sent from
the participants block and they can be read when
accesing user's recent conversations.
2014-01-24 15:14:43 +08:00
Petr Skoda 5dd9d46895 MDL-43746 fix require_course_login regression caused by MDL-25981 2014-01-24 13:52:25 +08:00
Russell Smith 03efa67f50 MDL-43440 unit testing: Use cmid in unit tests when it should be used.
instance is has been used instead of cmid.  This works as all id's are 1
in most cases, but not always.

accesslib_clear_all_caches_for_unit_testing was updated to clear the
$USER->access cache which would fail test when the wrong user's data was used.
2014-01-24 11:54:04 +11:00
Jason Fowler 2799d319e2 MDL-40786 User profile: Fixing narrow screen RTL collapse 2014-01-24 08:40:37 +08:00
Nadav Kavalerchik 7c683e50a3 MDL-40786 User Profile: Right align profile fields in RTL mode (theme/bootstrapbase, theme/clean) 2014-01-24 08:40:29 +08:00
Sam Hemelryk ce6dd3e690 MDL-43688 dndupload: fixed positioning across themes 2014-01-24 09:52:28 +13:00
Tim Hunt a541c63bb0 MDL-43809 qformat_xml messes up $s in multianswer questions. 2014-01-23 15:20:34 +00:00
Tim Hunt 6bce418d28 MDL-43246 question engine: avoid order-by id.
This was breaking with oracle master/master replication. Fortunately all
the places that needed to be changed were private to datalib.php. There
is still some ordering by id there, but only places where we want a
consitent, rather than meaningful, order, so that is OK.

The queries changed by this patch all have subqueries in aggregate
queries that pull out the latest step for a question_attempt. Those
queries used to look for MAX(id) but now they look for
MAX(sequencenumber). This is equivalent (for databases where ids always
increase with time, except for auto-saved steps. In the past,  an
auto-saved step might have been considered latest. Now the latest step
will always be one that has been properly processed. You can aruge that
this change is an improvement. Anyway, it is a moot point. All these
queries are only used in reports which are run on completed attempts,
where there will not be any autosaved data.
2014-01-23 15:20:15 +00:00
Tim Hunt 9378b7b48f MDL-43246 some question data mapper unit tests
With fixes for the issues unearthed by these tests.
2014-01-23 15:20:15 +00:00
Tim Hunt 99c639061e MDL-43246 give unit tests class a better name. 2014-01-23 15:20:14 +00:00
Eloy Lafuente (stronk7) 953239d6b5 weekly release 2.5.4+ 2014-01-23 12:38:34 +01:00
Eloy Lafuente (stronk7) cd3c9e492b Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2014-01-23 12:38:29 +01:00
Marina Glancy 10dd9c3ddf MDL-43800 course: groupings are sorted alphabetically 2014-01-23 09:54:18 +08:00
AMOS bot 9e896a0fe1 Automatically generated installer lang files 2014-01-22 00:55:30 +00:00
Dan Poltawski 5ac8f08a2d Merge branch 'MDL-41506-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-21 23:29:29 +08:00
Damyon Wiese 5c66818d77 Merge branch 'MDL-42104_m25' of git://github.com/rwijaya/moodle into MOODLE_25_STABLE 2014-01-21 16:40:43 +08:00
Frederic Massart ff87018312 MDL-41506 theme_bootstrapbase: Implement highlight class 2014-01-21 09:04:08 +01:00
Dan Poltawski 5f69d9c594 Merge branch 'mdl34020-moodle25' of https://github.com/tlock/moodle into MOODLE_25_STABLE 2014-01-21 15:21:20 +08:00
Dan Poltawski 4bdaa6a78d Merge branch '43714-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-01-21 14:49:29 +08:00
Damyon Wiese 9102d4ef4e Merge branch 'MDL-43725-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2014-01-21 13:48:48 +08:00
Dan Poltawski 7bf3f870f5 Merge branch 'MDL-43693-MOODLE_25_STABLE' of https://github.com/lucisgit/moodle into MOODLE_25_STABLE 2014-01-21 11:21:56 +08:00
Damyon Wiese 021aa8c16c Merge branch 'MDL-41688-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-21 09:43:17 +08:00
Eloy Lafuente (stronk7) 38dc2cc5bd Merge branch 'MDL-43401-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-21 01:47:00 +01:00
Eloy Lafuente (stronk7) 1075da56e2 Merge branch 'MDL-43480_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-01-21 01:44:56 +01:00
Eloy Lafuente (stronk7) 3dfaeb413b Merge branch 'MDL-41693-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-21 01:14:01 +01:00
Eloy Lafuente (stronk7) 3dfb63df12 Merge branch 'MDL-39684-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-21 00:21:58 +01:00
Eloy Lafuente (stronk7) 9a0d6896d0 Merge branch 'MDL-40533-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-21 00:17:48 +01:00
Eloy Lafuente (stronk7) db8c137e35 Merge branch 'MDL-41362-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-21 00:03:03 +01:00
Eloy Lafuente (stronk7) 2ad45eaf53 Merge branch 'MDL-41484-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-20 23:43:05 +01:00
Frederic Massart 815d252a39 MDL-41688 gradebook: Improved grading layout on bootstrapbase themes 2014-01-20 16:41:11 +01:00
Frederic Massart 90cddc9e6e MDL-41767 themes: Support for parent-specific sheets in plugins 2014-01-20 13:31:13 +01:00
Tony Butler 2e7b157bb8 MDL-43632 mod_feedback: Use SSL for reCAPTCHA API request if Moodle is using it 2014-01-20 17:13:57 +08:00
Rajesh Taneja 079fcddc29 MDL-43766 reports: Fixed wrong string variable 2014-01-20 16:48:05 +08:00
Dan Poltawski 785e7d36a7 Merge branch 'wip-MDL-41062-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-01-20 15:29:23 +08:00
Dan Poltawski d85aad0a18 Merge branch '42682-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-20 15:26:43 +08:00
Dan Poltawski 1b87b7232e Merge branch 'MDL-43690_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-01-20 14:24:41 +08:00
Michael Aherne 386cd5a24c MDL-42495 lesson Prevent coding error for invalid user 2014-01-20 13:22:14 +08:00
Dan Poltawski be34306a60 Merge branch 'MDL-42980_m25' of git://github.com/rwijaya/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-20 12:56:23 +08:00
Marina Glancy 5d01385163 MDL-41062 gradebook: corrections to grade_item upgrade script, more tests 2014-01-20 12:24:51 +08:00
Damyon Wiese f93f62ae7b Merge branch 'MDL-39683-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-20 11:05:21 +08:00
Damyon Wiese 1687d46223 Merge branch '43675-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-01-20 10:58:14 +08:00
Dan Poltawski 4abee6b225 Merge branch 'MDL-43671_message_25' of https://github.com/andyjdavis/moodle into MOODLE_25_STABLE 2014-01-20 10:53:51 +08:00
Dan Poltawski 44e7dfe7a0 Merge branch 'MDL-40139-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-20 10:33:39 +08:00
Ankit Agarwal 9702075c4d MDL-43725 report_loglive: Fixing undefined variable error
AMOS BEGIN
 CPY [page,report_log],[page,report_loglive]
AMOS END
2014-01-20 10:24:57 +08:00
Damyon Wiese 0be26df8b1 Merge branch 'MDL-43733_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-01-20 10:15:24 +08:00
Andrew Davis 71c3354bed MDL-43671 message: removed an overly cautious check 2014-01-20 10:06:34 +08:00
Dan Poltawski c0486e9b91 Merge branch 'wip-mdl-43306-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2014-01-20 09:45:48 +08:00
Dan Poltawski a0147ffa28 Merge branch 'MDL-40752-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-20 09:26:22 +08:00
AMOS bot 5622004442 Automatically generated installer lang files 2014-01-20 00:41:23 +00:00
AMOS bot 8047250587 Automatically generated installer lang files 2014-01-19 00:41:57 +00:00
Tim Hunt f2f129828c MDL-43733 use any auto-saved responses when questions are finished.
Before this, autosave was only working to save data when a student went
back in to continue an attempt. If the student, having crashed out,
never went back in and continued the attempt, their auto-saved responses
were not used when the attempt was automatically finished. That was a
rather bad oversight, which should now be fixed.
2014-01-17 17:17:52 +00:00
Tim Hunt 5da73345fd MDL-43690 quiz_question_tostring missing s().
This meant that the edit quiz page sometimes had invalid HTML.
2014-01-17 10:46:56 +00:00
Dan Poltawski 4468527db9 MDL-41062 gradebook: remove sortorder duplicates
* Upgrade function to remove duplicates from the grade item duplicates
  column. Duplicates were causing sorting to fail in some cases.
* Add some unit tests which simulate sort order duplicate data and
  verify that they have been removed.
2014-01-17 17:34:50 +08:00
rwijaya 419cb8e5e9 MDL-42104: trap tab focus within dialog modal,
in filepicker and filemanager
2014-01-17 16:53:22 +08:00
rwijaya ec05636a3c MDL-42980 clean theme: fixed add/cancel buttons position for safari on iPhone with ios7. 2014-01-17 15:58:49 +08:00
David Monllao 54ecdf3f24 MDL-43480 behat: Adding @_file_upload and @_alert tags
Keeping the previous @_only_local and @_alerts as
this is a stable branch.
2014-01-17 10:42:57 +08:00
David Monllao 00695acc5b MDL-43480 behat: Removing @_only_local tags from steps where it is not necessary 2014-01-17 10:42:56 +08:00
AMOS bot 553746bbff Automatically generated installer lang files 2014-01-17 00:48:08 +00:00
Sam Hemelryk 70c46470fe MDL-43714 blocks: fixed notice when moving to an empty region 2014-01-17 10:46:47 +13:00
Sam Hemelryk ff0205018e MDL-43675 navigation: courses branch is now recognised as expandable 2014-01-17 10:26:53 +13:00
Sam Hemelryk 2d29c7d10f MDL-42682 theme_bootstrapbase: fixed styling of discussion selector 2014-01-17 10:25:02 +13:00
Sam Hemelryk dce9475071 MDL-42682 theme_bootstrapbase: fixed forum search alignment
Conflicts:
	theme/bootstrapbase/less/moodle/modules.less
	theme/bootstrapbase/style/moodle.css
2014-01-17 10:24:56 +13:00
Sam Hemelryk 5712b4ed8b MDL-41505 theme_bootstrapbase: section actions now visible again 2014-01-17 10:24:39 +13:00
Eloy Lafuente (stronk7) 6370d316fd weekly release 2.5.4+ 2014-01-16 18:51:08 +01:00
Eloy Lafuente (stronk7) 2e3aa01daa Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2014-01-16 18:51:04 +01:00
AMOS bot dddc19a3ef Automatically generated installer lang files 2014-01-16 00:43:18 +00:00
Eloy Lafuente (stronk7) cc3bfdc006 Merge branch 'm25_MDL-43222' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2014-01-15 22:02:54 +01:00
Dan Marsden d677215cf4 MDL-43222 SCORM: Fix invalid sql 2014-01-16 09:49:59 +13:00
Rajesh Taneja 91c1b542e7 MDL-43306 restore: Fix grade_item sortorder after restoring course
While restoring course/activity, restore will blindly insert grade_item
sortorder. Which cause dulicate sortorder and lead to unpredicatble sorting
results.

Now we will call grade_item::fix_duplicate_sortorder() after restore is finished
to fix duplicate sortorder and order grade items to the closest order possible
2014-01-15 13:33:39 +08:00
Damyon Wiese e1dd20b34e Merge branch 'MDL-43621_25' of https://github.com/totara/openbadges into MOODLE_25_STABLE 2014-01-15 13:27:30 +08:00
Yuliya Bozhko ed60873986 MDL-43621 badges: Fix has_awards() result when deleted users are the only recipients of a badge 2014-01-15 16:17:17 +13:00
Damyon Wiese 788e545b4d Merge branch 'MDL-43461_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-01-15 09:38:02 +08:00
Dan Poltawski 4703d6ba20 Merge branch 'MDL-43619-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2014-01-15 08:20:39 +08:00
Yuliya Bozhko f8f860fd22 MDL-43621 badges: Don't count deleted users as badge recipients 2014-01-15 10:07:51 +13:00
Yuliya Bozhko 5e35e9fe87 MDL-43621 badges: Don't display deleted users in badge recipients list 2014-01-15 10:05:02 +13:00
Frederic Massart 1ce3b04c39 MDL-40533 block_html: Remove styles specific to the block 2014-01-14 19:09:45 +01:00
Eloy Lafuente (stronk7) a89836aa27 Merge branch 'wip-MDL-31597-25' of git://github.com/abgreeve/moodle into MOODLE_25_STABLE 2014-01-14 19:08:02 +01:00
Ruslan Kabalin c86faa37b0 MDL-43693: assignment: Fix JS error on grading page. 2014-01-14 16:12:00 +00:00
Eloy Lafuente (stronk7) 5d394d10a3 Merge branch 'MDL-43332_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2014-01-14 16:57:13 +01:00
Frederic Massart 0ecb19e209 MDL-41484 theme_bootstrabase: Alignment of labels on smaller screens 2014-01-14 16:50:00 +01:00
Eloy Lafuente (stronk7) 712cb8569e Merge branch 'm25_MDL-43222' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2014-01-14 16:45:53 +01:00
sam marshall 07ba3c2c6b MDL-43619 Roles: reset_role_capabilities unit test, cache fix 2014-01-14 13:54:37 +00:00
sam marshall 1daa40be7f MDL-43619 Roles: Reset role destroys all overrides 2014-01-14 13:54:23 +00:00
Dan Poltawski e2565b23b7 Merge branch 'm25_MDL-43577_Incorrect_Variable_Expansion' of https://github.com/scara/moodle into MOODLE_25_STABLE 2014-01-14 15:58:14 +08:00
Dan Poltawski 155c7dfd13 Merge branch 'MDL-43642_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-01-14 15:48:53 +08:00
Dan Poltawski 3717140752 Merge branch 'm25_MDL-43575_Typo_In_The_Overridden_setOption' of https://github.com/scara/moodle into MOODLE_25_STABLE 2014-01-14 15:37:01 +08:00
Petr Škoda 87b2e5e162 MDL-43511 do not cache the MUC cache in question code 2014-01-14 14:31:25 +08:00
Damyon Wiese a27a965a52 Merge branch 'MDL-43371-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-14 14:03:32 +08:00
Damyon Wiese 952f0a1620 Merge branch 'MDL-43460-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-14 13:34:33 +08:00
David Monllao 7a9abcb675 MDL-43461 testing: Avoid switching to .bat files when running MinGW
MinGW can not execute .bat files (http://sourceforge.net/p/mingw/bugs/1902)
so we should not switch to .bat files when running MinGW.
2014-01-14 13:15:46 +08:00
David Monllao c97c55a9b7 MDL-43461 behat: Using linux-style directory separators when using cygwin 2014-01-14 13:15:46 +08:00
Damyon Wiese 88bad1ec38 Merge branch 'MDL-43610-m25' of git://github.com/micaherne/moodle into MOODLE_25_STABLE 2014-01-14 12:02:50 +08:00
Adrian Greeve 892d952cb9 MDL-31597 gradebook: Update to gradebook behat tests to include testing grade weightings. 2014-01-14 11:56:29 +08:00
Adrian Greeve 31bf4ef646 MDL-31597 gradebook: Removed the percentage symbol from weights in the gradebook. 2014-01-14 11:56:18 +08:00
Dan Poltawski 3f1b2de488 Merge branch 'm25_MDL-42792' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2014-01-14 11:28:46 +08:00
Dan Poltawski 6462a6308b Merge branch 'MDL-43412_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-01-14 10:46:36 +08:00
Nadav Kavalerchik dc12df4802 MDL-40752 Login RTL: Swapping the panels on two-panel login pages for RTL
Additional changes added by Jason Fowler <phalacee@gmail.com>
2014-01-14 09:26:21 +08:00
AMOS bot f8570b3824 Automatically generated installer lang files 2014-01-14 00:45:39 +00:00
Mark Nelson 0343f4081b MDL-43332 core_grades: automated basic grade viewing functionality performed in MDLQA-317 2014-01-13 15:48:06 -08:00
Eloy Lafuente (stronk7) 5af2e8c082 Merge branch 'MDL-43109_25' of https://github.com/mdikih/moodle into MOODLE_25_STABLE 2014-01-13 21:55:18 +01:00
Matteo Scaramuccia a58ba59c71 MDL-43575 Libraries Google_CurlIO ext, typo in the overridden setOption(). 2014-01-13 21:39:32 +01:00
Matteo Scaramuccia 412e724830 MDL-43577 Messages Incorrect variable expansion in the message template. 2014-01-13 21:15:55 +01:00
Frederic Massart 4025ac2181 MDL-41362 theme_bootstrapbase: Alignment of User Selector controls 2014-01-13 18:41:00 +01:00
Frederic Massart 5b5ee3320a MDL-39684 theme: RTL align of restrictions label in file manager 2014-01-13 16:33:59 +01:00
Frederic Massart 6023d8e8d0 MDL-39683 message: RTL alignment of messages in theme_base 2014-01-13 15:44:09 +01:00
Nadav Kavalerchik 6e6af85069 MDL-39683 Messages, Themes: Fix "my" and "other person" message alignment in RTL mode (theme/clean) 2014-01-13 15:27:31 +01:00
Dan Poltawski 3c1c78cef2 Merge branch 'MDL-40849-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-13 15:50:48 +08:00
Frederic Massart e7d960cfee MDL-40849 gradingform_guide: Fixed CSS issues with Bootstrapbase 2014-01-13 08:13:15 +01:00
Dan Poltawski 6584492f07 Merge branch 'MDL-39603-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-13 12:35:04 +08:00
Dan Poltawski 6fb9497847 Merge branch '41226-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-13 11:12:06 +08:00
Dan Poltawski 36785d10de Merge branch '40821-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-01-13 11:03:39 +08:00
Dan Poltawski 9a443297f7 Merge branch '40693-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-01-13 10:07:56 +08:00
Dan Poltawski ac76e9b797 Merge branch 'MDL-41152-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-13 10:03:16 +08:00
Sam Hemelryk 53f2e7a5c8 MDL-40205 theme: fixed overflow of block headers
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-13 09:41:40 +08:00
Dan Poltawski 0dc14c0b56 Merge branch 'MDL-40705-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-13 09:36:35 +08:00
Dan Poltawski 60a188b9f3 Merge branch 'MDL-39661-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-13 08:54:26 +08:00
Sam Hemelryk 38ffecf198 MDL-40821 theme_bootstrapbase: fixed positioning of profile controls
Conflicts:
	theme/bootstrapbase/style/moodle.css

Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-13 08:17:09 +13:00
Sam Hemelryk 897b178feb MDL-40821 theme_bootstrapbase: show the current lang in the menu 2014-01-13 08:15:59 +13:00
Sam Hemelryk 0cdd23121b MDL-40693 theme_bootstrapbase: changed navbar separator to official separator 2014-01-13 08:15:34 +13:00
Eloy Lafuente (stronk7) 686364d1a9 Moodle release 2.5.4 2014-01-11 15:57:26 +01:00
Eloy Lafuente (stronk7) 612ca7327d MDL-43590 Revert to previous version
There was no unapproval in 25_STABLE, hence the
capability cannot include that concept.
2014-01-10 18:58:23 +01:00
Michael Aherne 756011e478 MDL-46310 assign Prevent blind marking submission notification email being sent to noreplyemail address 2014-01-10 16:01:31 +00:00
Frederic Massart 7680547727 MDL-40139 block_privatefiles: Prevent usage of unmaintained edit page 2014-01-10 13:01:24 +01:00
Frederic Massart e1bece2b7b MDL-41693 group: Use standard layout for group related pages 2014-01-10 12:29:11 +01:00
David Monllao 1be87968a2 MDL-43642 behat: Setting the correct files @package 2014-01-10 17:48:40 +08:00
Eloy Lafuente (stronk7) 77f8d8142f Merge branch 'MDL-43590-en_fix_25' of git://github.com/mudrd8mz/moodle into MOODLE_25_STABLE 2014-01-10 10:10:37 +01:00
Dan Marsden 69f07dc3aa MDL-43222 SCORM: correct check for list of attempts and make correct check for current attempt in scorm_get_toc 2014-01-10 22:05:20 +13:00
Dan Marsden c93e9bcdc2 MDL-42792 SCORM: Prevent JS error when network connection fails. - return false to SCORM package so that issue can be detected and reported. 2014-01-10 21:07:11 +13:00
Damyon Wiese 7f82be199e weekly release 2.5.3+ 2014-01-10 14:20:18 +08:00
Damyon Wiese 4fc8754588 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2014-01-10 14:20:14 +08:00
Eloy Lafuente (stronk7) 030c6d49da MDL-36721 make upgrade queries cross-db 2014-01-10 11:21:24 +08:00
Frederic Massart b7831c1f80 MDL-43401 mod_lesson: Fix serving of the pluginfile mediafile 2014-01-09 16:55:32 +01:00
Frederic Massart 40f8aece87 MDL-43371 mod_lesson: Remove files upon page or module deletion 2014-01-09 16:22:30 +01:00
Frederic Massart 11fd45b383 MDL-41152 theme_bootstrapbase: Optimise width for gradebook tree view 2014-01-09 10:42:17 +01:00
AMOS bot 3a5af40f91 Automatically generated installer lang files 2014-01-09 00:42:14 +00:00
Helen Foster 258ee617ee MDL-43590 Merge English strings from the en_fix language pack 2014-01-09 01:15:21 +01:00
Tim Hunt 4d74202460 MDL-43412 quiz with grade period and password did not work.
Once the attempt became overdue, it was impossible to get in to submit
it because of a redirect loop. This fix resovles that loop, so the
student can enter their password and get in.
2014-01-08 17:57:39 +00:00
Andrew Nicols fe20e33cb6 MDL-40119 Forms: Remove cursor style override for calendar button 2014-01-08 11:14:55 +01:00
Frederic Massart 4d270650f4 MDL-39603 theme_bootstrapbase: Alignment of filter form elements on enrol page 2014-01-08 10:42:57 +01:00
Eloy Lafuente (stronk7) ccd01c08f4 Merge branch 'MDL-40119-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-01-08 02:18:21 +01:00
Eloy Lafuente (stronk7) 51add5708c Merge branch 'w01_MDL-42797_m25_admin' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2014-01-08 02:11:13 +01:00
Eloy Lafuente (stronk7) 6cb311f306 Merge branch 'MDL-43423_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-01-08 02:03:16 +01:00
Eloy Lafuente (stronk7) f9e99683f7 Merge branch 'wip-MDL-42310-25' of git://github.com/abgreeve/moodle into MOODLE_25_STABLE 2014-01-08 01:52:48 +01:00
Eloy Lafuente (stronk7) cedb3f6428 Merge branch 'm25_MDL-43508_Invalid_String_Identifier' of https://github.com/scara/moodle into MOODLE_25_STABLE 2014-01-08 00:46:20 +01:00
Eloy Lafuente (stronk7) dcc69ec040 Merge branch 'MDL-42607_rss_25' of https://github.com/andyjdavis/moodle into MOODLE_25_STABLE 2014-01-08 00:42:52 +01:00
Eloy Lafuente (stronk7) d88a963883 Merge branch 'MDL-42392-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-01-08 00:34:01 +01:00
Dan Poltawski 73a17686b7 Merge branch 'm25_MDL-43482_Lot_Of_Passed_By_Reference_Messages' of https://github.com/scara/moodle into MOODLE_25_STABLE 2014-01-07 17:20:51 +08:00
Damyon Wiese dd7f25835e Merge branch 'MDL-43411-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-01-07 12:52:26 +08:00
Dan Poltawski b232a25269 Merge branch 'm25_MDL-40379_Prevent_Some_Mobile_Network_Providers_From_Modifying_Content' of https://github.com/scara/moodle into MOODLE_25_STABLE 2014-01-07 12:43:32 +08:00
Dan Poltawski 16c17a36c5 Merge branch 'MDL-42995-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-07 11:51:23 +08:00
Rajesh Taneja 87d8b94aa7 MDL-42643 course: Member in same group should only loginas
If course groupmode is set to SEPARATEGROUPS, and user doesn't have
site:accessallgroups capability than only allow user to loginas if
current user is in same group as loginas user
2014-01-07 11:05:34 +08:00
Dan Poltawski 7023778c66 Merge branch 'MDL-43394a-25' of https://github.com/srynot4sale/moodle into MOODLE_25_STABLE 2014-01-07 11:00:14 +08:00
Tony Butler 87f2d79a08 MDL-43373 core_enrol: Display enrolments dimmed if outside of start or end times 2014-01-07 10:44:34 +08:00
Damyon Wiese 5ca04a7039 Merge branch 'MDL-43448_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-01-07 09:21:54 +08:00
Frederic Massart f69ee87411 MDL-40705 theme_bootstrapbase: Handling of long words in block content 2014-01-06 15:49:53 +01:00
Frederic Massart d9a7ada865 MDL-39661 blocks: Removed notice when moving a block 2014-01-06 12:44:37 +01:00
Frederic Massart 78942f349c MDL-43460 calendar: Decode event description links on restore 2014-01-06 11:46:35 +01:00
Frederic Massart d80472e336 MDL-42995 mod_assign: Extended tests for update_calendar method 2014-01-06 11:02:24 +01:00
Frederic Massart 80ecc2593b MDL-42995 mod_assign: Remove files from calendar event description 2014-01-06 11:02:24 +01:00
Frederic Massart d6f428b233 MDL-42995 libraries: Global function to strip pluginfile content 2014-01-06 11:02:19 +01:00
Damyon Wiese f81aec80ad Merge branch 'MDL-43399-25' of git://github.com/mouneyrac/moodle into MOODLE_25_STABLE 2014-01-06 16:14:41 +08:00
Damyon Wiese 331ecb86f9 Merge branch 'w01_MDL-36721_m25_passlog' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2014-01-06 14:50:39 +08:00
Dan Poltawski d71dd15415 Merge branch '43349-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-01-06 14:21:49 +08:00
Rajesh Taneja 4ba0924322 MDL-42883 Administration: Check sessionkey before taking action on user profile fields 2014-01-06 13:59:06 +08:00
Tony Butler df9f225353 MDL-43408 gradereport_grader: Display users with expired enrolments as inactive in grader report
Conflicts:
	grade/report/grader/lib.php
2014-01-06 10:38:27 +08:00
Sam Hemelryk ba5255f4f1 Merge branch 'MDL-35973_redirect_25' of https://github.com/andyjdavis/moodle into MOODLE_25_STABLE 2014-01-06 11:28:10 +13:00
Sam Hemelryk 8a89a476e7 Merge branch 'MDL-43281-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-01-06 11:21:42 +13:00
Sam Hemelryk bf78d33216 Merge branch 'MDL-37962_beep_25' of https://github.com/andyjdavis/moodle into MOODLE_25_STABLE 2014-01-06 11:17:58 +13:00
Sam Hemelryk 4c852874d1 Merge branch 'MDL-43530-25' of https://github.com/mr-russ/moodle into MOODLE_25_STABLE 2014-01-06 11:13:55 +13:00
Sam Hemelryk 871b85e8cf Merge branch 'MDL-42212-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-06 10:30:02 +13:00
Andrew Davis 30205b3e5a MDL-35973 lib: added a page title to redirect() and added 2 seconds to the page redirection when posting in a forum 2014-01-05 20:15:28 +08:00
Russell Smith 2f86a952d7 MDL-43530 cache: Cache multiple different dirroots
In some clustered environments (Amazon OpsWorks) the deployment
folders on different nodes use different file paths.  As we cache
the realpath in the shared MUC, you don't always get the right answer.

We now cache each dirroot in it's own full path location to allow
each node to get the correct file locations for itself.
2014-01-03 14:59:11 +11:00
Michael Milette fd22071331 MDL-42310 feedback mod - Enable filtering of multichoice and multichoice rated controls
Conflicts:
	mod/feedback/item/multichoice/lib.php
	mod/feedback/item/multichoicerated/lib.php

Signed-off-by: Michael Milette <michael.milette@instruxmedia.com>
2014-01-03 10:32:55 +08:00
Andrew Davis ed634db27e MDL-42607 mod_forum:fixed some inefficiencies in forum RSS generation 2014-01-02 10:51:07 +08:00
Petr Škoda 94ada50dd7 MDL-42797 require real user login on upgrade settings page 2014-01-02 09:18:00 +08:00
Sam Hemelryk 22cb8ba92c MDL-43349 cache: init now checks store requirements are met 2014-01-02 09:22:34 +13:00
Petr Škoda d1e6c50749 MDL-42797 require real user login on admin page 2014-01-01 15:20:10 +08:00
Andrew Nicols 0660624e26 MDL-43281 Blocks: Retrieve a newly created block after creating it
Although we were previously creating the DOM markup for a block region if
it did not exist, we were not making use of it.

This change ensures that we make use of that block region as part of the
blocks code.
2014-01-01 02:23:41 +08:00
Andrew Nicols caccbdda8d MDL-40119 Forms: Date selector should use images for the calendar popup toggle
The calendar popup toggle must use an image, rather than an input with type
of image as the latter is actually a form of submit button, and hence it
steals the focus away from the real submit button.
2013-12-30 16:06:32 +08:00
AMOS bot ea3be3fd41 Automatically generated installer lang files 2013-12-30 00:43:24 +00:00
AMOS bot e71aa8a645 Automatically generated installer lang files 2013-12-29 00:43:26 +00:00
Matteo Scaramuccia 8ea95b35cb MDL-40379 Files Prevent mobile network providers from modifying content. 2013-12-28 14:05:07 +01:00
Matteo Scaramuccia 0ed3049d38 MDL-43508 Quiz Invalid get_string() identifier. 2013-12-28 11:30:55 +01:00
Andrew Nicols 798ca416a9 MDL-42392 Blocks: Do not hide blocks if JS is disabled
With JS disabled, it is not possible to change the block visibility
user preference and therefore not possible to show content which was
hidden.

Since the block hiding functionality is a nicety, and we have no controls
to show and hide the blocks when JS is disabled, we should instead show the
block content regardless of the user preference.
2013-12-28 08:41:11 +08:00
Petr Škoda 7d238c6bc4 MDL-36721 do not store passwords in config logs 2013-12-27 11:23:43 +08:00
AMOS bot 4d6e381bf3 Automatically generated installer lang files 2013-12-25 00:42:51 +00:00
Matteo Scaramuccia bae0c56962 MDL-43482 Chat Lot of "Only variables should be passed by reference". 2013-12-24 11:08:13 +01:00
Sam Hemelryk e92da00284 weekly release 2.5.3+ 2013-12-24 17:17:43 +13:00
Sam Hemelryk 9caa330e56 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-12-24 17:17:40 +13:00
Sam Hemelryk 986e4f6720 Merge branch 'wip-MDL-41788_M25_3' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-12-24 12:51:50 +13:00
Sam Hemelryk 5d10a4c690 Merge branch 'MDL-41246-moodle25' of git://github.com/StudiUM/moodle into MOODLE_25_STABLE 2013-12-24 11:41:23 +13:00
Sam Hemelryk 1d5e5cc670 Merge branch 'MDL-43438-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-12-24 11:22:53 +13:00
Sam Hemelryk 77104a2bd2 Merge branch 'MDL-43250-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-12-24 10:51:00 +13:00
AMOS bot bb78109b45 Automatically generated installer lang files 2013-12-23 12:40:13 +00:00
AMOS bot 162d293a60 Automatically generated installer lang files 2013-12-23 12:26:28 +00:00
Aaron Barnes fc938d3c5e MDL-43394 behat: Fix checkbox action 2013-12-23 15:59:00 +13:00
Sam Hemelryk c7f13ceafc Merge branch 'MDL-35032-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-12-23 15:57:36 +13:00
Andrew Nicols 0a4dd3ab6b MDL-43411 JavaScript: Correct checks for section support to use helper function 2013-12-23 09:45:41 +08:00
Sam Hemelryk 7eba9ea899 Merge branch 'MDL-30195-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-12-23 14:35:16 +13:00
Sam Hemelryk 3aba4d0f12 Merge branch 'w52_MDL-43367_m25_contextpath' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-12-23 14:31:29 +13:00
Eloy Lafuente (stronk7) d4a8372892 Merge branch 'MDL-43318-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-12-23 00:51:09 +01:00
Sam Hemelryk d071a951e1 Merge branch 'MDL-34182-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2013-12-23 08:15:57 +13:00
Petr Škoda 37377fb146 MDL-43367 stop returning of bogus context children when path unknown
This also prevents deletion of system context.
2013-12-22 16:00:49 +08:00
Tim Hunt bc863a0a8f MDL-43448 Links to the gradebook not fixed on restore.
Note we can only fix certain generic links, we can't handle ones like
/grade/report/{reportname}/index.php, but fortunately, we were only
using the generic ones.

I added a couple of other likely things too (badges and participants
list).
2013-12-20 12:27:48 +00:00
Damyon Wiese 1a993df1aa weekly release 2.5.3+ 2013-12-20 11:57:51 +08:00
Damyon Wiese fe17c7e8e6 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-12-20 11:57:38 +08:00
Damyon Wiese d8c28564ec MDL-43318 Assign: Fix bug when editing previous attempt feedback
Conflicts:

	mod/assign/renderable.php
2013-12-20 11:16:21 +08:00
Gareth J Barnard 82168ad20c MDL-41788 theme_bootstrapbase: Custom menus - sub-menus breaking. 2013-12-19 12:16:07 +00:00
David Monllao 2d3d456399 MDL-43404 behat: Fix add_scorm.feature regression
Also adding more compatibility with phantomjs tagging
features without @_switch_window and @_only_local.
2013-12-19 16:24:36 +08:00
Sam Hemelryk 3dc592815a Merge branch 'MDL-40750-25-fixup' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-12-19 17:01:04 +13:00
Eloy Lafuente (stronk7) 861c69d981 Revert "MDL-43306 restore: fix grade item sortorder restoration"
This reverts commit 32df282b1b.
2013-12-19 02:14:39 +01:00
AMOS bot 4602d0d2ab Automatically generated installer lang files 2013-12-19 00:44:16 +00:00
Sam Hemelryk 9f90cd7553 Merge branch 'MDL-43235_25-extrafix' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-12-19 09:22:41 +13:00
Jean-Philippe Gaudreau 990a792039 MDL-41246 cache: Fix PHP notice of non well formed numeric values for the memcache store 2013-12-18 08:53:18 -05:00
Frederic Massart a5565303f5 MDL-40750 course: Remove usage of selector :not() for IE8 2013-12-18 12:29:27 +01:00
Eloy Lafuente (stronk7) 404b3d2654 Merge branch 'MDL-43404_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-12-18 12:09:20 +01:00
Frederic Massart fc21d5879c MDL-43438 mod_assignment: Prevent double inclusion of plugin files 2013-12-18 09:17:26 +01:00
David Monllao 49b5a38265 MDL-43235 behat: Remove notice about undeclared var 2013-12-18 16:04:09 +08:00
Dan Poltawski 740981c93f Merge branch 'MDL-41198-25' of https://github.com/mr-russ/moodle into MOODLE_25_STABLE 2013-12-18 15:00:01 +08:00
David Monllao cd898cebf5 MDL-43404 behat: Form change checker disabled when running behat 2013-12-18 14:20:54 +08:00
David Monllao 01b9236a50 MDL-43404 behat: Removing auto accept_alert 2013-12-18 14:20:48 +08:00
Russell Smith 3da65e9373 MDL-41198 lib: Add comment about the changes to srand on adodb 2013-12-18 16:58:00 +11:00
Russell Smith 02ea7c378c MDL-41198 lib: Allow PHP to generate random seed on script start
Most srand instances are removed to allow PHP to do the work.

srand was left for group randomization due to the method used.

Conflicts:

	lib/tests/accesslib_test.php
2013-12-18 16:56:50 +11:00
Russell Smith e6af311972 MDL-41198 lib: Allow PHP to generate random seed on script start
All mt_srand instances are removed to allow PHP to do the work.
2013-12-18 16:54:04 +11:00
Sam Hemelryk 66de9b8f9c Revert "MDL-42104: trap tab focus within dialog modal,"
This reverts commit 3a0be85aeb.
2013-12-18 15:53:49 +13:00
Russell Smith ddc0064a52 MDL-41292 cache: only update identifiers if they change 2013-12-18 02:23:46 +01:00
rwijaya 3a0be85aeb MDL-42104: trap tab focus within dialog modal,
for filepicker and filemanager

Conflicts:
	lib/form/filemanager.js
2013-12-18 13:32:30 +13:00
Sam Hemelryk f6c3162520 Merge branch 'MDL-43235_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-12-18 11:19:19 +13:00
Sam Hemelryk 2f73b98955 Merge branch 'MDL-43355_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-12-18 10:45:13 +13:00
Sam Hemelryk 8a0ba53b9c Merge branch 'MDL-38698-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-12-18 09:21:21 +13:00
Sam Hemelryk 32196e43ca Merge branch 'MDL-40750-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-12-18 09:18:32 +13:00
David Monllao a0735059b5 MDL-43423 behat: Running hooks before and after each step of a chained step 2013-12-17 18:15:18 +08:00
Eloy Lafuente (stronk7) 1b646dc362 Merge branch 'MDL-43306-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-12-17 10:29:42 +01:00
Frederic Massart 9a8f3078f7 MDL-38698 filter_urltolink: Remove performance test in Unit Test 2013-12-17 07:05:29 +01:00
Frederic Massart f8fc65dae8 MDL-38698 filter_urltolink: Do not link the URL property of CSS 2013-12-17 07:05:29 +01:00
Marina Glancy f989165cb8 Merge branch 'MDL-37679-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-12-17 16:44:27 +11:00
Frederic Massart 46ea75aca3 MDL-40750 course: Add JS category expander (backport of MDL-38661)
This includes the following commits:

 * dd834cb MDL-38661 JavaScript: Add missing lazy loading on collapseall
 * 4dab1c3 MDL-38661 JavaScript: Ensure that ARIA tags are set when expanding/collapsing content
 * 1574e65 MDL-38661: Add keyboard support for expansion
 * 3df632f MDL-38661 Add pointer cursor to clickable collapse/expand icons
 * 53c1b93 MDL-38661 Course: Add JS category expander.
2013-12-17 06:39:36 +01:00
Mark Nielsen e345a21c96 MDL-37679 Course: Adding section to page title on section only pages 2013-12-17 11:43:13 +08:00
Marina Glancy 61f6209afa Merge branch 'MDL-41075-25' of git://github.com/mouneyrac/moodle into MOODLE_25_STABLE 2013-12-17 11:24:25 +11:00
Russell Smith ed8ee21d25 MDL-39725 database: Apply database statistics update to daily stats 2013-12-17 10:28:59 +13:00
Russell Smith 395d08ea72 MDL-39725 database: Include stats collections in unit tests
Conflicts:
	lib/ddl/tests/ddl_test.php
2013-12-17 10:28:54 +13:00
Russell Smith f015f73397 MDL-39725 database: Add statistics collection functions
Conflicts:
	lib/dml/moodle_database.php
2013-12-17 10:27:54 +13:00
Sam Hemelryk 2a3ce2b33d Merge branch 'MDL-25473-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-12-17 08:53:57 +13:00
Sam Hemelryk 474a218fc8 Merge branch 'MDL-34321-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-12-17 08:47:37 +13:00
Sam Hemelryk 8e4e9d8d67 Merge branch 'MDL-36984-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-12-17 08:44:42 +13:00
Frederic Massart 7e5fb1404b MDL-30195 portfolio_googledocs: Allow export of rich HTML 2013-12-16 11:06:31 +01:00
Jerome Mouneyrac 7da2b5e231 MDL-43399 Badge: the Choose... option can still be selected once a role is choosen. 2013-12-16 14:34:00 +08:00
Frederic Massart 275ce15b5d MDL-42212 mod_lesson: Localise area names 2013-12-16 06:50:31 +01:00
Frederic Massart c447a4454a MDL-42212 mod_lesson: Fix callbacks retrieving activity files 2013-12-16 06:50:31 +01:00
Jerome Mouneyrac 97410938ce MDL-41075 Remove "Choose..." option from participants page. 2013-12-16 12:08:49 +08:00
Damyon Wiese 8762a70f5d MDL-43250 Assign: separate groups mode fix
When in separate groups mode, only get graders in a group that is in the course module grouping.
2013-12-16 10:51:55 +08:00
Sam Hemelryk 0c41eeda3a Merge branch 'wip-mdl-21180-m25' of https://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-12-16 15:43:23 +13:00
Rajesh Taneja 78835c1a6c MDL-21180 Gradebook: Consistent handling of change in aggregation
Change from/to GRADE_AGGREGATE_WEIGHTED_MEAN and GRADE_AGGREGATE_EXTRACREDIT_MEAN was only
handled prior to this patch. GRADE_AGGREGATE_SUM and GRADE_AGGREGATE_WEIGHTED_MEAN2 also
behave similar and should be handled same way
2013-12-16 09:59:28 +08:00
Andrew Davis b0edefb8e5 MDL-43188 core_message:reimplemented the beep on new message functionality from 1.9 2013-12-16 09:28:55 +08:00
Marina Glancy 0ce9ea0df0 Merge branch 'MDL-37972-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-12-16 12:28:55 +11:00
Sam Hemelryk 92d66ed0be Merge branch 'wip-MDL-43348_M25' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE 2013-12-16 14:09:32 +13:00
Sam Hemelryk 1ebfb4a6c6 Merge branch 'MDL-40096-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-12-16 13:51:53 +13:00
Sam Hemelryk 960edf3828 Merge branch 'MDL-40436-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-12-16 11:31:02 +13:00
Sam Hemelryk 7827adcf28 Merge branch 'w51_MDL-42931_m25_env27' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-12-16 11:17:33 +13:00
Sam Hemelryk 13ab45efe4 Merge branch 'MDL-42085-25' of git://github.com/mouneyrac/moodle into MOODLE_25_STABLE 2013-12-16 11:11:18 +13:00
James Pratt 7cd9c85868 MDL-43369 : quiz statistics - average across attempts
where item seen and not across all attempts for subqs.
2013-12-13 17:45:45 +07:00
Frederic Massart 20bfdb97d7 MDL-35032 mod_book: 1.9 backup restore convertis files to book area 2013-12-13 10:26:46 +01:00
David Monllao 381007fb2a MDL-43235 behat: Ensure that behat_config_manager::get_config_file_contents() has always a behat_wwwroot 2013-12-13 14:54:55 +08:00
Andrew Nicols f82f12e83e MDL-34182 Repositories: Check for and warn on invalid output in the file picker 2013-12-13 14:25:19 +08:00
Andrew Nicols 84008f4a33 MDL-34182: Add functions to warn of output in AJAX scripts
We need to be able to capture output when including contributed code as it
may add additional content which makes makes the json we output invalid.

We only warn of these errors if the site is in debugdeveloper, otherwise
we silently drop them.
2013-12-13 14:25:19 +08:00
Petr Škoda 7a07a6ad1e MDL-42931 set new requirements for 2.7 2013-12-13 14:07:34 +08:00
Sam Hemelryk 8e92813abe weekly release 2.5.3+ 2013-12-13 16:59:26 +13:00
Sam Hemelryk 90dec729a5 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-12-13 16:59:23 +13:00
AMOS bot dc5cd8c5a9 Automatically generated installer lang files 2013-12-13 00:42:14 +00:00
Gareth J Barnard 687fad1ab9 MDL-43348 theme: html <nav> element on the wrong content. 2013-12-12 16:24:25 +00:00
David Monllao 9826b73dfc MDL-43355 testing: Return the hash when HEAD points to a hash 2013-12-12 17:41:11 +08:00
Frederic Massart 2f02e550d3 MDL-40436 block_course_list: Fix bad context resolution
We were trying to get the course context of a remote course
from a completely unrelated ID. It would sometimes work if the
ID was matching the one of a local course. In other places
we are not trying to find a context for the remote course, we
simply use the $PAGE context in format_string. So the usage
of the context has been removed here too.
2013-12-12 09:09:57 +01:00
Jerome Mouneyrac b48bc91044 MDL-42085 Enrol: Always apply enrolment duration.
Before the fix, the startdates and duration fields were integrated to HTML code only
when the user clicked on the collapsible region to see them.
It was wrong because their values were not sent by the form
if ever the user didn't expand this Enrolment options region.
2013-12-12 16:07:51 +08:00
Jason Fowler 60bf905b94 MDL-36984 Assign: Add redirect after saving grades 2013-12-12 14:19:51 +08:00
Marina Glancy a2712209f9 Merge branch 'mucupdates25' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-12-12 15:40:22 +11:00
Petr Škoda 137570614b MDL-42973 fix MUC caching issue when fetching available updates 2013-12-12 11:47:46 +08:00
Jason Fowler 12a11dd2b4 MDL-34321 Assignment2.2 - Fixing submission count 2013-12-12 10:36:07 +08:00
Eloy Lafuente (stronk7) d05e2ff9e6 MDL-31410 paypal: fix problem on notifications
This commit fixes a PHP warning about using a
unititialised variable and also the problems when
notifications are enabled and there is not yet a
teacher in the course, defaulting to admin for student
notifications and preventing teacher notifications to happen.
2013-12-12 02:17:26 +01:00
Eloy Lafuente (stronk7) 47c14f40b7 Merge branch 'w50_MDL-31410_m25_paypalipn' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-12-12 01:17:39 +01:00
Marina Glancy 82b0059468 MDL-43218 blog: prepare the blog navigation only when needed 2013-12-11 15:37:48 +13:00
Simon Coggins d7c163f70b MDL-43218 navigation: Remove link to blogs when they are disabled 2013-12-11 15:37:44 +13:00
Marina Glancy 81ea8ce8b9 Merge branch 'MDL-43071-MOODLE_25_STABLE' of https://github.com/lucisgit/moodle into MOODLE_25_STABLE 2013-12-11 12:47:29 +11:00
Marina Glancy e6a3977d3e Merge branch 'MDL-43258' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2013-12-11 11:48:31 +11:00
Mary Evans e6294b4877 MDL-43258 theme_bootstrapbase: Style coursebox info name better in Bootstrap themes. 2013-12-11 00:25:29 +00:00
Sam Hemelryk a458eacede Merge branch 'MDL-43252-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2013-12-11 11:03:14 +13:00
Sam Hemelryk 0dc8e80097 Merge branch 'wip-MDL-43279-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-12-11 10:58:31 +13:00
Eloy Lafuente (stronk7) 175b9dcfff Merge branch '25STABLE-wip-MDL-43135' of https://github.com/jennymgray/moodle into MOODLE_25_STABLE 2013-12-10 19:46:59 +01:00
Jenny Gray af84623f44 MDL-43135 Guest Enrol: new language string for with key icon
AMOS BEGIN
CPY [pluginname,enrol_guest], [guestaccess_withpassword,enrol_guest]
CPY [pluginname,enrol_guest], [guestaccess_withoutpassword,enrol_guest]
AMOS END
2013-12-10 11:17:09 +00:00
Sam Chaffee 46a9498f62 MDL-37972 Assignment: fixing settings link for upload single submissions 2013-12-10 14:09:13 +08:00
Dan Poltawski 32df282b1b MDL-43306 restore: fix grade item sortorder restoration
Previously, restore was blindly inserting the old sort order into the
database, causing duplicate sortorders which lead to unpredicatble
sorting results.

Now we will use the api function to add it after the original sortorder,
this means if a duplicate exists in the original location, this item
will appear after it.
2013-12-10 12:33:30 +08:00
Michael Dikih 23353087ca MDL-43109: mod/wiki - When editing pages populate the default value for the tags input. 2013-12-10 14:19:17 +10:30
Marina Glancy 36d93b57e7 Merge branch 'm25_MDL-43082_IE9_Compat_View_SVG_Say_No' of https://github.com/scara/moodle into MOODLE_25_STABLE 2013-12-10 14:47:20 +11:00
Marina Glancy 930acdb3e9 Merge branch 'MDL-43131_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-12-10 14:13:09 +11:00
Marina Glancy 78392c426e Merge branch 'mdl42487-moodle25' of https://github.com/tlock/moodle into MOODLE_25_STABLE 2013-12-10 13:57:39 +11:00
Jason Fowler 91f6bf0977 MDL-25473 mediaplayer - prevent embedded videos from looping 2013-12-10 10:43:58 +08:00
Marina Glancy 8805a8017b MDL-43279 block_blog_recent: fixed undefined property notice 2013-12-10 09:30:10 +11:00
Sam Hemelryk 69a40654d8 Merge branch 'm25_MDL-43159_Wrong_Naming_Convention_For_Variable' of https://github.com/scara/moodle into MOODLE_25_STABLE 2013-12-10 09:20:17 +13:00
Sam Hemelryk 0da3aac317 Merge branch 'MDL-43194-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2013-12-10 08:47:46 +13:00
Sam Hemelryk aa1549681a Merge branch 'MDL-43152-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2013-12-10 08:43:23 +13:00
Sam Hemelryk d12121f385 Merge branch 'm25_MDL-43019' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2013-12-10 08:28:56 +13:00
Eloy Lafuente (stronk7) 3efc95ed81 Merge branch 'MDL-40003-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-12-09 16:24:44 +01:00
sam marshall f00bc60e74 MDL-43252 Group menu in wrong order when groupings used 2013-12-09 13:04:25 +00:00
Sam Chaffee ae3cca4561 MDL-40003 mod_assign: Fixed submission comments not being restored 2013-12-09 11:04:24 +01:00
Marina Glancy 53ca1f85fd Merge branch 'w50_MDL-42973_m25_addonupd' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-12-09 18:29:08 +11:00
Damyon Wiese e135e187b4 MDL-40096 assign: Prevent js error because uniqid() is not unique.
Use html_writer::random_id instead because it incorporates a static counter.
2013-12-09 10:26:38 +08:00
Marina Glancy af76b17662 Merge branch 'wip-MDL-40213_M25' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE 2013-12-09 11:14:24 +11:00
Petr Škoda 70dbbf5763 MDL-31410 always send 200 in PayPal IPN response and hide all errors 2013-12-06 10:05:11 +08:00
Petr Škoda 8d6ea2a913 MDL-42973 fix multiple addon update issues 2013-12-06 09:38:50 +08:00
Andrew Nicols 88ec4afdb8 MDL-43152 JavaScript: Add update instructions for gallery-bootstrap 2013-12-06 09:20:38 +08:00
Andrew Nicols 3a46810152 MDL-43152 JavaScript: Fix linting issues with moodle-core-notification 2013-12-06 09:20:35 +08:00
Andrew Nicols 4294e95811 MDL-43152 JavaScript: Fix linting issues with moodle-block_navigation-navigation 2013-12-06 09:20:31 +08:00
Andrew Nicols 97828bead6 MDL-43152 JavaScript: Fix linting issues with moodle-theme_bootstrapbase 2013-12-06 09:20:24 +08:00
Andrew Nicols 12d52ecb3c MDL-43152 JavaScript: Fix linting issues with moodle-core-blocks 2013-12-06 09:20:18 +08:00
Matteo Scaramuccia 5a575d8487 MDL-43159 Libraries Wrong naming convention in $supports_json_contenttype. 2013-12-05 16:10:17 +01:00
Matteo Scaramuccia 4cd8dff321 MDL-43082 Themes IE 9 Compatibility View doesn't support SVG. 2013-12-05 15:59:09 +01:00
Tim Hunt da40d09a43 MDL-43131 qbank: Fix show question text when first viewing.
When you followed the link to the question bank, the checkbox for the
"Show question text in the question list" option correctly reflected the
user's preference, but what was actually shown in the question bank did
not.
2013-12-05 11:11:35 +00:00
Dan Poltawski cf0e9701af weekly release 2.5.3+ 2013-12-05 15:10:07 +08:00
Dan Poltawski b35bc421f2 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-12-05 15:10:04 +08:00
David Monllao 16236c6241 MDL-41592 behat: Setting a default value for CFG->behat_wwwroot in case it is empty 2013-12-05 17:06:26 +13:00
Dan Poltawski 6d8f88fb44 Merge branch 'MDL-43068_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-12-05 09:34:02 +08:00
Dan Marsden 421f2eca6e MDL-43019 SCORM: always use iframe instead of object - backported from 2.6 - fixes issue with IE 11 SCORM packages not loading 2013-12-05 13:16:29 +13:00
Frederic Massart e100c8137d MDL-43185 behat: Use realpath on existing paths 2013-12-05 08:18:17 +13:00
Tim Hunt 65c22578bf MDL-43068 course&gradebook: fix use of new API in old branches. 2013-12-04 15:34:31 +00:00
Gareth J Barnard 97108b8f9a MDL-40213 theme_clean: Layout "secure.php" missing settings. 2013-12-04 11:51:23 +00:00
Andrew Nicols 6fef66dfb7 MDL-43194 JavaScript: Correct maxlen jshint configuration 2013-12-04 16:40:33 +08:00
Dan Poltawski f1c88bc16c Merge branch 'wip-MDL-40191-2-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-12-04 15:44:14 +08:00
Marina Glancy 90e0c511b1 MDL-40191 folder: Do not check capability in renderer
Capability to access the module is already checked before calling the renderer. Extra check works bad together with switching roles
2013-12-04 18:30:42 +11:00
Tim Lock 3e048cb036 MDL-34020: Further work on IMS package importing when using Blackboard packages 2013-12-04 15:18:28 +10:30
AMOS bot 127441b4c8 Automatically generated installer lang files 2013-12-04 00:43:15 +00:00
Eloy Lafuente (stronk7) f0b9fd3348 Merge branch 'MDL-41446-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2013-12-03 23:55:56 +01:00
Sam Hemelryk c7cde40bb5 Merge branch 'MDL-41592_25' of https://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-12-04 11:52:23 +13:00
Eloy Lafuente (stronk7) fd73fdaec0 Merge branch 'MDL-43142_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-12-03 23:41:34 +01:00
Eloy Lafuente (stronk7) 008b26a609 Merge branch 'MDL-43140_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-12-03 23:25:43 +01:00
Sam Hemelryk d653c838b0 Merge branch 'MDL-43093_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-12-04 10:11:51 +13:00
Eloy Lafuente (stronk7) e81cd4c375 Merge branch 'moodle25-mdl33971' of https://github.com/tlock/moodle into MOODLE_25_STABLE 2013-12-03 17:18:26 +01:00
Eloy Lafuente (stronk7) b357a2a083 Merge branch 'MDL-43079-25' of https://github.com/jamiepratt/moodle into MOODLE_25_STABLE 2013-12-03 15:38:24 +01:00
Damyon Wiese 247901a4f7 Merge branch 'wip-MDL-42731-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-12-03 17:30:15 +08:00
Eloy Lafuente (stronk7) 35d2284423 Merge branch 'MDL-42885_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-12-03 10:02:00 +01:00
Damyon Wiese a87ae3371d Merge branch 'wip-MDL-43026-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-12-03 16:12:27 +08:00
Dan Poltawski 6fa2d2c2e1 Merge branch 'moodle25-mdl43020' of https://github.com/tlock/moodle into MOODLE_25_STABLE 2013-12-03 16:08:25 +08:00
Dan Poltawski 8708b9b3e2 Merge branch 'MDL-43066_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-12-03 12:36:56 +08:00
Damyon Wiese 73e2de1ff9 Merge branch 'wip-mdl-43048-m25' of https://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-12-03 11:44:09 +08:00
Damyon Wiese a296572f2c MDL-42904: Self enrol. Fix sloppy version numbers 2013-12-03 11:19:24 +08:00
Damyon Wiese 05d6010d2c Merge branch 'wip-mdl-42904-m25' of https://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-12-03 11:16:53 +08:00
Sam Hemelryk f591b27e11 Merge branch 'w48_MDL-41819_m25_maxinputvars' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-12-03 09:57:25 +13:00
Tim Hunt 237e532ee5 MDL-43093 update repeat_elements PHPdoc. 2013-12-02 17:48:18 +00:00
Damyon Wiese ccd4e10e00 Merge branch 'm25_MDL-43039_SessionDiskFull_False_Positive' of https://github.com/scara/moodle into MOODLE_25_STABLE 2013-12-02 14:36:33 +08:00
David Monllao 3efc96f546 MDL-41592 general: Also checking the site path 2013-12-02 14:20:04 +08:00
David Monllao f016ecaebf MDL-41592 behat: Config settings more flexible
Adding the option to just set ->behat_wwwroot to
allow switching to the behat test site.
2013-12-02 14:20:04 +08:00
Aaron Barnes 2d68ba169d MDL-41592 behat: Allow alt wwwroot to be set for acceptance testing
To set add $CFG->behat_wwwroot = 'http://alturl'; in your config.php
2013-12-02 14:20:04 +08:00
David Monllao f46d530abc MDL-43066 behat: Checking that the site is not already installed 2013-12-02 14:11:53 +08:00
Dan Poltawski 6dd2511d2f Merge branch 'wip-MDL-40191-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-12-02 11:19:47 +08:00
Dan Poltawski f683548a78 Merge branch 'MDL-43068_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-12-02 11:11:10 +08:00
AMOS bot eec4dbcf8c Automatically generated installer lang files 2013-12-02 00:42:56 +00:00
Petr Škoda 219fda2b67 MDL-41819 try to work around max_input_vars restriction 2013-12-02 08:30:15 +08:00
Marina Glancy b7f8a886f2 MDL-40191 navigation: do not throw an error if activity is not visible
navigationlib is not the place to check it, let the page itself decide what to do in this case
2013-12-02 10:49:18 +11:00
David Mudrák 71adff6999 MDL-40191 MDLSITE-2455 Do not throw coding exception when the activity is not found
Under certain conditions, coding exception is thrown when fetching items from
the navigation bar. The patch prevents them. See more details in the tracker.
2013-12-02 10:49:17 +11:00
Marina Glancy c67553ef0b MDL-42731 block_activity_modules: add behat tests 2013-12-02 10:03:17 +11:00
Sam Hemelryk a0a05fa456 MDL-43033 cache: added stats logging to set_many methods 2013-12-02 09:29:38 +13:00
Sam Hemelryk c8e3e6f1f0 MDL-43033 cache: fixed display of definition stores in admin interface 2013-12-02 09:29:37 +13:00
Sam Hemelryk 5f70bde008 MDL-43033 cache: added a warning icon for mappings
We now show a warning icon with an explanatory alt if the user
has mapped a store as a mode default that doesn't not fulfill the
requirements of every known definition.
2013-12-02 09:29:37 +13:00
Sam Hemelryk d9a72b3c05 MDL-43033 cache: fixed mode map event invalidation scenario 2013-12-02 09:29:37 +13:00
Sam Hemelryk ead81f3fd2 MDL-43033 cache: added stats logging to get_many methods 2013-12-02 09:29:37 +13:00
Matteo Scaramuccia 563557f21e MDL-43039 Libraries "The session partition is full." false positive. 2013-11-30 14:34:06 +01:00
Mark Nelson c90c329d57 MDL-43140 mnet: display header after redirects to avoid warning 2013-11-29 14:26:03 -08:00
Mark Nelson 6d5aa15b8d MDL-43142 mnet: fixed typo in variable passed to get_string 2013-11-29 14:15:30 -08:00
Dan Poltawski 3dc57a1203 weekly release 2.5.3+ 2013-11-29 12:52:50 +08:00
Dan Poltawski 2b18121895 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-11-29 12:52:47 +08:00
Tim Lock 5ba4c94328 MDL-42487: Forced userprofile dl style to be displayed: inline-block. 2013-11-29 09:29:23 +10:30
Tim Hunt 9c4dd6381f MDL-43068 course&gradebook: show/hide cm & CONTROLS_GRADE_VISIBILITY
Making a quiz visible on the course page, of via the settings form,
could cause the grade item to become visible in the gradebook, even
though the quiz supports FEATURE_CONTROLS_GRADE_VISIBILITY to ensure
that when the grades are hidden in the quiz settings, they do not appear
in the gradebook.

Now, if a module supports FEATURE_CONTROLS_GRADE_VISIBILITY, then
set_coursemodule_visible calls the _grade_item_update callback to update
the grade item(s).

In addition, there was a bug when saving the quiz form, where it used
the value of $cm->visible from the database, which was wrong if the
value of cm->visible had just been changed on the setting form.
2013-11-28 10:03:49 +00:00
AMOS bot 25770d6ae4 Automatically generated installer lang files 2013-11-28 09:12:43 +00:00
James Pratt d8ca0c903c MDL-43079 quiz statistics : fix stats graph when all grades zero 2013-11-27 17:54:05 +07:00
Rajesh Taneja fcfb7ec498 MDL-43048 block_tags: Initalised content->text for tags block 2013-11-27 14:37:45 +08:00
Mark Nelson 44a9508cb9 MDL-42885 tool_uploaduser: removed misleading debugging message 2013-11-26 21:26:27 -08:00
Dan Poltawski f4ce42df46 MDL-42942 behat: increment version 2013-11-27 11:39:12 +08:00
Dan Poltawski 76c4158fa7 Merge branch 'MDL-42942_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-11-27 11:39:07 +08:00
AMOS bot 1f8c03b16e Automatically generated installer lang files 2013-11-27 00:48:25 +00:00
Tim Lock 1df90c1813 MDL-33971: When viewing course log entries for Quiz View Summary a number is displayed not the quiz name 2013-11-27 08:13:17 +10:30
Tim Lock 6ba76e04df MDL-43020: Fix lesson scale warnings when deleting user attempts 2013-11-27 07:41:21 +10:30
Tim Lock 20d1fea57f MDL-43020: Fix calculation of lesson scale value warning 2013-11-27 07:40:21 +10:30
Tim Lock 7b52944b5e MDL-43020: Lesson using a scale always gives the minimum scale value 2013-11-27 07:40:21 +10:30
Eloy Lafuente (stronk7) 9703d42284 Merge branch 'm25_MDL-43045' of git://github.com/totara/moodle into MOODLE_25_STABLE 2013-11-26 21:30:31 +01:00
Ruslan Kabalin 3bc1bd6ee8 MDL-43071 assign: Fix offline grades import for scale grading. 2013-11-26 16:45:29 +00:00
Dan Poltawski 8e999b2643 Merge branch 'MDL-43000_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-26 15:06:32 +08:00
Dan Poltawski ff68fc5dbd Merge branch 'MDL-40741_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-11-26 14:57:17 +08:00
Dan Poltawski 768aa4ac33 Merge branch 'wip-MDL-43006-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-11-26 13:24:45 +08:00
David Monllao cea825d5ad MDL-40741 behat: Changing xpaths for clean theme
Keeps compatibility with standard theme.
2013-11-26 13:04:15 +08:00
Dan Poltawski ed66d9399a Merge branch 'MDL-42733_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-11-26 12:12:49 +08:00
Tim Lock ef95b087f8 MDL-42998: Fix user selection search options autoselectunique. 2013-11-26 10:50:35 +08:00
David Monllao a9be971c84 MDL-42842 behat: Adding a new formatter
Based on ProgressFormatter, the site info
will be displayed when the suite begins.
2013-11-26 10:46:39 +08:00
Dan Poltawski 2f3a0c3d93 Merge branch 'wip-mdl-41635-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-11-26 10:25:03 +08:00
Sam Hemelryk 4cedd8fb9d Merge branch 'MDL-43005-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-11-26 08:42:02 +13:00
Simon Coggins eaab90a2df MDL-43045 report: Fix missing role name in security overview report 2013-11-26 08:23:23 +13:00
Damyon Wiese bf44c1e521 Merge branch 'wip-MDL-41257-25' of git://github.com/abgreeve/moodle into MOODLE_25_STABLE 2013-11-25 14:03:26 +08:00
Dan Poltawski 05b233d112 Merge branch 'w48_MDL-37016_m25_sloppymysql' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-11-25 13:40:58 +08:00
Damyon Wiese d1dd8b1496 Merge branch 'wip-mdl-42924-m25' of https://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-11-25 13:16:51 +08:00
Damyon Wiese 818c05cd0e Merge branch 'MDL-42913a-25' of https://github.com/srynot4sale/moodle into MOODLE_25_STABLE 2013-11-25 12:30:46 +08:00
Marina Glancy bce35f82c9 MDL-43006 behat: adding javascript tag because of behat bug
behat without JS does not submit the empty textarea field causing notice in the form processing
2013-11-25 15:01:13 +11:00
Dan Poltawski beb6b442ca Merge branch 'MDL-42547_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-11-25 10:37:38 +08:00
Rajesh Taneja 26ebec6219 MDL-42904 self_enrol: Set customint1 if it's null 2013-11-25 10:03:23 +08:00
Eloy Lafuente (stronk7) a24766c374 Merge branch 'wip-MDL-29071-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-11-24 16:51:12 +01:00
Petr Škoda 074c243ed2 MDL-37016 fix sloppy mysql nulls in event.uuid 2013-11-24 15:12:39 +08:00
Tim Hunt f9306bd5b8 MDL-43000 shortanswer qtype: handle patterns with many *s
Teachers were typing patterns like
********************************<em>****************************</em>
which translates into a pattern like .*.*.*.*, which is very inefficient
to try to match, althought it is equivalent ot a single .*. At a certain
point preg was just giving up.

Since people actually do this, we should simplify the regex by treating
runs of * like a single *.
2013-11-22 11:34:26 +00:00
Marina Glancy 58ac1b444e MDL-43026 behat: Add tests for all existing module generators 2013-11-22 17:35:29 +11:00
Eloy Lafuente (stronk7) 20776b450f weekly release 2.5.3+ 2013-11-21 19:33:38 +01:00
Eloy Lafuente (stronk7) 7ce12c2d74 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-11-21 19:33:33 +01:00
David Monllao 7bf1651295 MDL-42733 behat: Removing the restriction of an started output to handle the PHP errors 2013-11-21 14:36:13 +08:00
Ankit Agarwal 03260d9cc8 MDL-43005 blogs: Fix issues with blog tags 2013-11-21 13:39:32 +08:00
Marina Glancy caeb793db0 MDL-29071 ddl: unittest for objects name length 2013-11-21 12:39:59 +11:00
Marina Glancy d33af201ab MDL-29071 ddl: make sure object name never exceeds max length
Many thanks to Ray Bon for finding the problem
2013-11-21 12:39:45 +11:00
Sam Hemelryk b1a0fe9318 NOBUG: fixed whitespace 2013-11-21 08:06:15 +13:00
Jerome Mouneyrac bb12a401ec MDL-42184 remove the body top padding for bootstrapbase popup + fix get_device_type call
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-21 08:03:58 +13:00
Mark Nelson 68cc921a37 MDL-42547 tool_uploaduser: trim values before uploading users 2013-11-20 00:35:57 -08:00
David Monllao 378d11db3e MDL-42842 testing: Generalization of the site info 2013-11-20 13:50:05 +08:00
FilipBenco 78efd16298 MDL-41635 Reports: Added missing string in loglive reports
Under course administration navigation log live doesn't appear
or appear with empty string (in some themes), this is happening
because text passed is empty.
2013-11-20 11:27:46 +08:00
Marina Glancy ccbd4e40c5 Merge branch 'MDL-42767-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-11-20 13:23:57 +11:00
Michael Milette d2927dfcb5 MDL-41257 calendar: Day and Upcoming-Events view not processed through text_filters() function
This fix adds text filtering to the Calendar Day view and Upcoming Events view, specifically the event name and event description.

Signed-off-by: Michael Milette <michael.milette@instruxmedia.com>
2013-11-20 10:14:17 +08:00
Aaron Barnes 3f44ba8664 MDL-42913 lib/grouplib.php: Avoid cache sometimes for groups_get_all_groups
The new groups cache returns unexpected results when you pass
in a field parameter than would normally change the result array index
2013-11-20 12:01:02 +13:00
Rajesh Taneja 756778fc7f MDL-42924 Administration: use normalize_component to extract plugin name and type 2013-11-19 11:58:52 +08:00
Dan Poltawski 36bb3af665 Merge branch '42060-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-11-19 10:39:34 +08:00
Dan Poltawski b4275e41ec Merge branch 'MDL-42504_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-19 10:31:51 +08:00
Dan Poltawski e1d8082792 Merge branch 'MDL-42181_25' of git://github.com/mkassaei/moodle into MOODLE_25_STABLE 2013-11-19 10:07:06 +08:00
Damyon Wiese 5a2d5cfaf1 Merge branch 'm25_MDL-40223' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2013-11-19 09:51:36 +08:00
AMOS bot d515f0d9b3 Automatically generated installer lang files 2013-11-19 00:40:28 +00:00
Dan Marsden bf79273a0f MDL-40223 SCORM: pass limit into function instead of hardcoding to allow cross-db 2013-11-19 13:30:27 +13:00
Sam Hemelryk 4f314c0d62 Merge branch 'MDL-41316-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-11-19 12:27:55 +13:00
Sam Hemelryk b85181b3cd Merge branch 'w47_MDL-42612_m25_paypalruble' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-11-19 12:24:28 +13:00
Sam Hemelryk d9ca430e4f Merge branch 'MDL-42774-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2013-11-19 12:06:08 +13:00
Sam Hemelryk 37c71ce3cc Merge branch 'MDL-42863_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-19 12:03:25 +13:00
Sam Hemelryk a073d7c8b0 Merge branch 'MDL-42865_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-19 11:50:32 +13:00
Sam Hemelryk 3dc6381f90 MDL-42852 theme_bootstrapbase: fixed whitespace 2013-11-19 11:44:29 +13:00
Sam Hemelryk 31767636d8 Merge branch 'wip-MDL-42852_M25' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-19 11:43:42 +13:00
Sam Hemelryk ca8790e981 Merge branch 'MDL-42184-25' of git://github.com/mouneyrac/moodle into MOODLE_25_STABLE 2013-11-19 10:13:13 +13:00
Sam Hemelryk 5b8ead0e73 Merge branch 'MDL-42853-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-11-19 10:08:05 +13:00
Ankit Agarwal d39f1ca2a5 MDL-42767 notes: Delete notes on a course delete 2013-11-18 16:03:52 +08:00
Dan Poltawski 1157cc9798 Merge branch 'MDL-42880b_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-18 15:39:18 +08:00
Damyon Wiese e9182f584f Merge branch 'MDL-42808-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-11-18 15:27:53 +08:00
Damyon Wiese 9bd2c37acc Merge branch 'm25_MDL-41695' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2013-11-18 15:21:20 +08:00
Damyon Wiese 22000e52b7 Merge branch 'MDL-42582-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2013-11-18 14:54:17 +08:00
Petr Škoda 401cecabd2 MDL-42612 add support for Russian Ruble in PayPal 2013-11-18 11:46:27 +08:00
Sam Hemelryk 3cc85c6a66 MDL-42060 block_course_list: fixed sorting of mycourses 2013-11-18 11:15:43 +13:00
Dan Marsden ccc2cf8793 MDL-41695 SCORM: allow unlimited decimal places in CMIDecimal 2013-11-18 10:28:31 +13:00
Dan Marsden 3c22f80a98 MDL-40223 SCORM: update scorm->launch param after restore - also check that scorm->launch is valid. 2013-11-18 09:51:37 +13:00
Gareth J Barnard 6bb8eba308 MDL-42852 lib: Blocks disappear in Clean in RTL. 2013-11-17 13:55:09 +00:00
Tim Hunt 3098e4254d MDL-42880 quiz settings: remove unnecessary disabledif rules.
These rules were causing problems in the case where the form was
sumitted with validation errors. In that case, the During the attempt ->
The attempt checkbox was becoming unset, and hence the other During the
attmept checkboxes became disabled, and the values were not saved.

Thanks to Sam Marshall for suggesting this fix.
2013-11-15 19:20:24 +00:00
M Kassaei bdbbe777d9 MDL-42181 quiz nav: highight all buttons when all Qs on one page 2013-11-15 16:36:18 +00:00
Tim Hunt c48f58ba9f MDL-42863 make capabilities overview more fault-tolerant. 2013-11-15 15:12:53 +00:00
Tim Hunt dcc650ef40 MDL-42865 Make XMLDB foreign key check more robust.
Otherwise, installing one bad add-on can completely break this report.
2013-11-15 14:59:29 +00:00
Tim Hunt e9a504c2f8 MDL-42504 quiz autosave: alert users if connection lost.
When the auto-save fails, we alert the user that they may have lost their
internet connection so that they don't do more work that they might just
lose.
2013-11-15 14:59:02 +00:00
Eloy Lafuente (stronk7) b3f2d75a47 weekly release 2.5.3+ 2013-11-15 11:14:58 +01:00
Eloy Lafuente (stronk7) 55dc7b6be9 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-11-15 11:14:54 +01:00
Frederic Massart 820ef5cdbc MDL-42912 mod_glossary: Fix typo and call to core_text 2013-11-15 09:42:46 +01:00
Eloy Lafuente (stronk7) 850fd970cb Merge branch 'MDL-42447_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-11-15 02:14:15 +01:00
David Monllao b5f1e8f1e7 MDL-42447 performance: New var to add perf. info to redirections 2013-11-15 09:13:37 +08:00
Eloy Lafuente (stronk7) 4233914802 Merge branch 'wip-MDL-42912-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-11-15 02:06:02 +01:00
Marina Glancy 0eb9a0a03d MDL-42912 glossary: oracle-compatibility of SQL queries 2013-11-15 11:53:02 +11:00
Frederic Massart cec4acd408 MDL-42853 course: Fix edit title icon margin on RTL 2013-11-14 09:45:45 +08:00
AMOS bot f5280e9706 Automatically generated installer lang files 2013-11-14 00:45:21 +00:00
Eloy Lafuente (stronk7) 262edf64ca Merge branch 'MDL-42768-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-11-13 23:15:51 +01:00
Frederic Massart 1919471ec0 MDL-42768 restore: Use sql_compare_text instead for text comparison 2013-11-13 14:47:04 +08:00
Damyon Wiese 175137de18 Merge branch 'MDL-42598_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-13 14:35:34 +08:00
Damyon Wiese ef9b7c943b Merge branch 'MDL-33536-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-11-13 13:11:19 +08:00
Ankit Agarwal 6a25e29bfc MDL-41316 tool_spamcleaner: AS keyword is not allowed in sql qeries for table alias as Oracle doesn't support it 2013-11-13 11:31:53 +08:00
Damyon Wiese a6d5825da4 MDL-33536 Navigation: Add missing require_once for safety. 2013-11-13 10:03:45 +08:00
AMOS bot 2db12e1ff2 Automatically generated installer lang files 2013-11-13 00:47:31 +00:00
Marina Glancy bf6fd02b43 MDL-38574 recompiled moodle.css in bootstrapbase 2013-11-13 11:17:21 +11:00
Eloy Lafuente (stronk7) 5d4b5a560a Merge branch 'MDL-42790_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-13 01:12:45 +01:00
Eloy Lafuente (stronk7) d385005eaf Merge branch 'MDL-42839-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2013-11-13 01:10:20 +01:00
Marina Glancy 96b5e3fc49 Merge branch 'MDL-38574_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-13 11:05:35 +11:00
Eloy Lafuente (stronk7) 4ac33ebc05 Merge branch 'wip_25_mdl-42723' of https://github.com/iarenaza/moodle into MOODLE_25_STABLE 2013-11-13 01:02:55 +01:00
Eloy Lafuente (stronk7) e17a5a4d21 Merge branch 'wip-MDL-42672-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-11-12 20:07:14 +01:00
sam marshall 6457d2eca3 MDL-42839 MUC: Memcache server configuration too sensitive to whitespace 2013-11-12 12:38:09 +00:00
Tim Hunt 493a747afc MDL-42790 essay attempt on last: fix plain reponse mode
Plain responses, without files, were getting messed up by the
fix for MDL-39980. Something that looked like an HTML comment was being
appended.

This fix works by avoiding appending anything if there are no files. The
new unit test (which was failing before I fixed the code) confirms that
this works. The other tests should be enough to verify that there are no
regressions.
2013-11-12 10:46:31 +00:00
Marina Glancy 63d05b24d9 Merge branch 'MDL-42276_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-11-12 15:11:41 +11:00
Marina Glancy 00be378045 Merge branch 'MDL-42540_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-12 14:48:10 +11:00
Mark Nelson 49875e3a89 MDL-42276 core_group: added behat tests to automate group actions
1. Added new step definitions to check if an element exists or does not exist in another.
2. Added new step definitions to check if an element is readonly or is not readonly.
3. Automated testing for MDLQA-1812 and MDLQA-1813.

Added behat test for deleting groups/groupings with and without the
'moodle/course:changeidnumber' capability.

4. Automated MDLQA-2105.

Added behat test for creating groups/groupings without the
'moodle/course:changeidnumber' capability.

5. Automated MDLQA-2238 and MDLQA-2335.

Added behat test for updating groups/groupings with and without the
'moodle/course:changeidnumber' capability.
2013-11-11 18:07:05 -08:00
Damyon Wiese 5a668a8c81 Merge branch '42806-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-11-12 10:04:38 +08:00
AMOS bot bffb56756a Automatically generated installer lang files 2013-11-12 00:53:13 +00:00
Marina Glancy ce20ddf41a Merge branch 'MDL-41775_25' of git://github.com/grabs/moodle into MOODLE_25_STABLE 2013-11-12 11:24:07 +11:00
Eloy Lafuente (stronk7) 3bf475dbfe Merge branch 'MDL-40481_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-12 00:41:38 +01:00
Andreas Grabs 92bf874cfa MDL-41775 mod_feedback - Input fields are shown with a fixed width on bootstrap based themes 2013-11-11 20:55:20 +01:00
Tim Hunt 3089c9a4c2 MDL-42598 quiz variant randomisation not random enough.
A student would get the same question variants (for example for a
calculated question) on their first attempt at both copies of a
duplicated quiz.
2013-11-11 14:17:25 +00:00
Tim Hunt fd85294415 MDL-42540 quiz manual grading should have setType 2013-11-11 14:17:10 +00:00
Tim Hunt 4517b6c832 MDL-40481 quiz responses report needs cols need text_sorting 2013-11-11 14:16:41 +00:00
Tim Hunt 4ce081c117 MDL-38574 qtype chooser: quick fix to make it fit on-screen.
MDL-32729 will provide a better fix for this, but we may as well apply
this quick fix on stable branches.
2013-11-11 14:16:15 +00:00
Andrew Nicols e121230981 MDL-42774 JavaScript: Ensure that shifter cleans build directories before running 2013-11-11 18:30:19 +08:00
Marina Glancy e5f2d6cdff NOBUG: convert tabs to whitespaces 2013-11-11 21:28:28 +11:00
Marina Glancy af19ff0d79 Merge branch 'MDL-42043-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-11-11 21:11:08 +11:00
Sam Hemelryk e0b110399b MDL-42806 block_mentees: can only be docked if it has a valid title set. 2013-11-11 17:23:41 +08:00
Damyon Wiese a97d655d8f Merge branch 'MDL-42803-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-11-11 17:17:13 +08:00
Frederic Massart 21293bbae0 MDL-42808 library: Google API was resetting the timezone 2013-11-11 15:32:52 +08:00
Sam Hemelryk 36c192677e Merge branch 'wip-mdl-42795-m25' of https://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-11-11 14:09:54 +08:00
Ankit Agarwal 072b02cc14 MDL-42803 behat: Add a wait to fix possible random behat errors in CI 2013-11-11 14:06:27 +08:00
Frederic Massart 87cd6776a5 MDL-42043 theme: Use $theme instead of $OUTPUT for pix_url() 2013-11-11 13:18:37 +08:00
Jason Fowler 26d49a12b0 MDL-42699 TinyMCE: adding padding to content area in Clean 2013-11-11 12:17:01 +08:00
Renaat Debleu 2602828491 MDL-42795 course: fixed param course in sql
course_sections has course field and not courseid, hence replaced it with course.
2013-11-11 10:48:19 +08:00
Jerome Mouneyrac 3f74db6578 MDL-42184 bootstrapbase: popup should have no header 2013-11-08 11:59:48 +08:00
Marina Glancy 628c568f2d MDL-42672 blocks: warnings on /mod/xxx/index.php for frontpage course 2013-11-06 14:37:27 +11:00
Iñaki Arenaza 7a69e7a88f MDL-42723: Hide and handle LDAP error when user not in context being checked
MDL-41304 only fixed the case when 'Search subcontext' is enabled. We need to
fix the case when it's not enabled too.

While silencing errors with an @ should be avoided if possible, there's no
other way to prevent the warnings in this case.
2013-11-05 17:05:30 +01:00
Sam Hemelryk 51b47fd406 MDL-33536 navigation: hide hidden categories from the navbar 2013-10-31 17:11:59 +08:00
Matt Switlik a94d76da9d MDL-42618 fix grade importing of whitespace idnumbers 2013-10-30 15:38:12 -04:00
sam marshall a55a5d28c2 MDL-42582 Availability: Restriction display incorrect for multi-para Labels
When a label has multiple paragraphs, its name (converted to plain text)
contains a line feed. Due to an error in regular expressions that don't
accept the line feed, this caused incorrect display on the course page
when that label is shown as a requirement for accessing another activity.
2013-10-29 16:54:06 +00:00
sam marshall bd2d268d13 MDL-41446 Completion: Incorrectly marks complete when grade data present with no actual grade 2013-09-06 13:04:34 +01:00
627 changed files with 14357 additions and 2750 deletions
+1 -1
View File
@@ -42,7 +42,7 @@
"sub": false,
"supernew": false,
"maxerr": 500,
"maxlen": 150,
"maxlen": 180,
"passfail": false,
"latedef": true
}
+2 -1
View File
@@ -1,4 +1,5 @@
{
"coverage": false,
"lint": "config"
"lint": "config",
"clean": true
}
+123
View File
@@ -1007,4 +1007,127 @@
</PHP_SETTING>
</PHP_SETTINGS>
</MOODLE>
<MOODLE version="2.7" requires="2.2">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="5.5.31" />
<VENDOR name="mysql" version="5.5.31" />
<VENDOR name="postgres" version="9.1" />
<VENDOR name="mssql" version="10.0" />
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.4.4" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="optional">
<FEEDBACK>
<ON_CHECK message="intlrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+63 -42
View File
@@ -47,7 +47,9 @@ if (!function_exists('iconv')) {
define('NO_OUTPUT_BUFFERING', true);
if (empty($_GET['cache']) and empty($_POST['cache']) and empty($_GET['sesskey']) and empty($_POST['sesskey'])) {
if ((isset($_GET['cache']) and $_GET['cache'] === '0')
or (isset($_POST['cache']) and $_POST['cache'] === '0')
or (!isset($_POST['cache']) and !isset($_GET['cache']) and empty($_GET['sesskey']) and empty($_POST['sesskey']))) {
// Prevent caching at all cost when visiting this page directly,
// we redirect to self once we known no upgrades are necessary.
// Note: $_GET and $_POST are used here intentionally because our param cleaning is not loaded yet.
@@ -72,9 +74,7 @@ $cache = optional_param('cache', 0, PARAM_BOOL);
// Set up PAGE.
$url = new moodle_url('/admin/index.php');
if ($cache) {
$url->param('cache', $cache);
}
$url->param('cache', $cache);
$PAGE->set_url($url);
unset($url);
@@ -249,11 +249,13 @@ if ($version > $CFG->version) { // upgrade
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
if (upgrade_stale_php_files_present()) {
$PAGE->set_title($stradministration);
$PAGE->set_cacheable(false);
$output = $PAGE->get_renderer('core', 'admin');
echo $output->upgrade_stale_php_files_page();
die();
}
@@ -268,7 +270,6 @@ if ($version > $CFG->version) { // upgrade
$PAGE->set_heading($strdatabasechecking);
$PAGE->set_cacheable(false);
$output = $PAGE->get_renderer('core', 'admin');
echo $output->upgrade_confirm_page($a->newversion, $maturity, $testsite);
die();
@@ -282,7 +283,6 @@ if ($version > $CFG->version) { // upgrade
$PAGE->set_heading($strcurrentrelease);
$PAGE->set_cacheable(false);
$output = $PAGE->get_renderer('core', 'admin');
echo $output->upgrade_environment_page($release, $envstatus, $environment_results);
die();
@@ -296,31 +296,22 @@ if ($version > $CFG->version) { // upgrade
$reloadurl = new moodle_url('/admin/index.php', array('confirmupgrade' => 1, 'confirmrelease' => 1));
// check plugin dependencies first
$failed = array();
if (!plugin_manager::instance()->all_plugins_ok($version, $failed)) {
$output = $PAGE->get_renderer('core', 'admin');
echo $output->unsatisfied_dependencies_page($version, $failed, $reloadurl);
die();
}
unset($failed);
if ($fetchupdates) {
// no sesskey support guaranteed here
if (empty($CFG->disableupdatenotifications)) {
available_update_checker::instance()->fetch();
$updateschecker = available_update_checker::instance();
if ($updateschecker->enabled()) {
// No sesskey support guaranteed here, because sessions might not work yet.
$updateschecker->fetch();
}
redirect($reloadurl);
}
$output = $PAGE->get_renderer('core', 'admin');
$deployer = available_update_deployer::instance();
if ($deployer->enabled()) {
$deployer->initialize($reloadurl, $reloadurl);
$deploydata = $deployer->submitted_data();
if (!empty($deploydata)) {
// No sesskey support guaranteed here, because sessions might not work yet.
echo $output->upgrade_plugin_confirm_deploy_page($deployer, $deploydata);
die();
}
@@ -332,7 +323,18 @@ if ($version > $CFG->version) { // upgrade
die();
} else {
// Launch main upgrade
// Always verify plugin dependencies!
$failed = array();
if (!plugin_manager::instance()->all_plugins_ok($version, $failed)) {
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
$reloadurl = new moodle_url('/admin/index.php', array('confirmupgrade' => 1, 'confirmrelease' => 1, 'cache' => 0));
echo $output->unsatisfied_dependencies_page($version, $failed, $reloadurl);
die();
}
unset($failed);
// Launch main upgrade.
upgrade_core($version, true);
}
} else if ($version < $CFG->version) {
@@ -352,6 +354,10 @@ if ($branch <> $CFG->branch) { // Update the branch
if (moodle_needs_upgrading()) {
if (!$PAGE->headerprinted) {
// means core upgrade or installation was not already done
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
if (!$confirmplugins) {
$strplugincheck = get_string('plugincheck');
@@ -363,39 +369,44 @@ if (moodle_needs_upgrading()) {
$PAGE->set_cacheable(false);
if ($fetchupdates) {
// no sesskey support guaranteed here
available_update_checker::instance()->fetch();
redirect($PAGE->url);
$updateschecker = available_update_checker::instance();
if ($updateschecker->enabled()) {
require_sesskey();
$updateschecker->fetch();
}
redirect($reloadurl);
}
$output = $PAGE->get_renderer('core', 'admin');
$deployer = available_update_deployer::instance();
if ($deployer->enabled()) {
$deployer->initialize($PAGE->url, $PAGE->url);
$deploydata = $deployer->submitted_data();
if (!empty($deploydata)) {
require_sesskey();
echo $output->upgrade_plugin_confirm_deploy_page($deployer, $deploydata);
die();
}
}
// check plugin dependencies first
$failed = array();
if (!plugin_manager::instance()->all_plugins_ok($version, $failed)) {
echo $output->unsatisfied_dependencies_page($version, $failed, $PAGE->url);
die();
}
unset($failed);
// dependencies check passed, let's rock!
// Show plugins info.
echo $output->upgrade_plugin_check_page(plugin_manager::instance(), available_update_checker::instance(),
$version, $showallplugins,
new moodle_url($PAGE->url),
new moodle_url('/admin/index.php', array('confirmplugincheck'=>1)));
die();
}
// Always verify plugin dependencies!
$failed = array();
if (!plugin_manager::instance()->all_plugins_ok($version, $failed)) {
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
$reloadurl = new moodle_url('/admin/index.php', array('cache' => 0));
echo $output->unsatisfied_dependencies_page($version, $failed, $reloadurl);
die();
}
unset($failed);
}
// install/upgrade all plugins and other parts
upgrade_noncore(true);
@@ -456,6 +467,17 @@ if (during_initial_install()) {
upgrade_finished('upgradesettings.php');
}
if (has_capability('moodle/site:config', context_system::instance())) {
if ($fetchupdates) {
$updateschecker = available_update_checker::instance();
if ($updateschecker->enabled()) {
require_sesskey();
$updateschecker->fetch();
}
redirect(new moodle_url('/admin/index.php', array('cache' => 0)));
}
}
// Now we can be sure everything was upgraded and caches work fine,
// redirect if necessary to make sure caching is enabled.
if (!$cache and !optional_param('sesskey', '', PARAM_RAW)) {
@@ -464,6 +486,11 @@ if (!$cache and !optional_param('sesskey', '', PARAM_RAW)) {
// Check for valid admin user - no guest autologin
require_login(0, false);
if (isguestuser()) {
// Login as real user!
$SESSION->wantsurl = (string)new moodle_url('/admin/index.php');
redirect(get_login_url());
}
$context = context_system::instance();
require_capability('moodle/site:config', $context);
@@ -534,12 +561,6 @@ $registered = $DB->count_records('registration_hubs', array('huburl' => HUB_MOOD
admin_externalpage_setup('adminnotifications');
if ($fetchupdates) {
require_sesskey();
$updateschecker->fetch();
redirect(new moodle_url('/admin/index.php'));
}
$output = $PAGE->get_renderer('core', 'admin');
echo $output->admin_notifications_page($maturity, $insecuredataroot, $errorsdisplayed,
$cronoverdue, $dbproblems, $maintenancemode, $availableupdates, $availableupdatesfetch, $buggyiconvnomb,
+7 -5
View File
@@ -16,8 +16,6 @@ require_login();
admin_externalpage_setup('ssoaccesscontrol');
echo $OUTPUT->header();
if (!extension_loaded('openssl')) {
print_error('requiresopenssl', 'mnet');
}
@@ -65,9 +63,11 @@ if (!empty($action) and confirm_sesskey()) {
if (mnet_update_sso_access_control($idrec->username, $idrec->mnet_host_id, $accessctrl)) {
if ($accessctrl == 'allow') {
redirect('access_control.php', get_string('ssl_acl_allow','mnet', array('uset'=>$idrec->username, 'host'=>$mnethosts[$idrec->mnet_host_id])));
} elseif ($accessctrl == 'deny') {
redirect('access_control.php', get_string('ssl_acl_deny','mnet', array('user'=>$idrec->username, 'host'=>$mnethosts[$idrec->mnet_host_id])));
redirect('access_control.php', get_string('ssl_acl_allow','mnet', array('user' => $idrec->username,
'host' => $mnethosts[$idrec->mnet_host_id])));
} else if ($accessctrl == 'deny') {
redirect('access_control.php', get_string('ssl_acl_deny','mnet', array('user' => $idrec->username,
'host' => $mnethosts[$idrec->mnet_host_id])));
}
}
break;
@@ -118,6 +118,8 @@ if ($form = data_submitted() and confirm_sesskey()) {
exit;
}
echo $OUTPUT->header();
// Explain
echo $OUTPUT->box(get_string('ssoacldescr','mnet'));
// Are the needed bits enabled?
+6 -6
View File
@@ -170,7 +170,7 @@ class core_admin_renderer extends plugin_renderer_base {
$output .= $this->environment_check_table($envstatus, $environment_results);
if (!$envstatus) {
$output .= $this->upgrade_reload(new moodle_url('/admin/index.php'), array('confirmupgrade' => 1));
$output .= $this->upgrade_reload(new moodle_url('/admin/index.php'), array('confirmupgrade' => 1, 'cache' => 0));
} else {
$output .= $this->notification(get_string('environmentok', 'admin'), 'notifysuccess');
@@ -179,7 +179,7 @@ class core_admin_renderer extends plugin_renderer_base {
$output .= $this->box(get_string('langpackwillbeupdated', 'admin'), 'generalbox', 'notice');
}
$output .= $this->continue_button(new moodle_url('/admin/index.php', array('confirmupgrade' => 1, 'confirmrelease' => 1)));
$output .= $this->continue_button(new moodle_url('/admin/index.php', array('confirmupgrade' => 1, 'confirmrelease' => 1, 'cache' => 0)));
}
$output .= $this->footer();
@@ -701,7 +701,7 @@ class core_admin_renderer extends plugin_renderer_base {
}
$updateinfo .= $this->container_start('checkforupdates');
$fetchurl = new moodle_url('/admin/index.php', array('fetchupdates' => 1, 'sesskey' => sesskey(), 'cache' => 1));
$fetchurl = new moodle_url('/admin/index.php', array('fetchupdates' => 1, 'sesskey' => sesskey(), 'cache' => 0));
$updateinfo .= $this->single_button($fetchurl, get_string('checkforupdates', 'core_plugin'));
if ($fetch) {
$updateinfo .= $this->container(get_string('checkforupdateslast', 'core_plugin',
@@ -952,7 +952,7 @@ class core_admin_renderer extends plugin_renderer_base {
$out .= $this->output->heading(get_string('nonehighlighted', 'core_plugin'));
if (empty($options['full'])) {
$out .= html_writer::link(new moodle_url('/admin/index.php',
array('confirmupgrade' => 1, 'confirmrelease' => 1, 'showallplugins' => 1)),
array('confirmupgrade' => 1, 'confirmrelease' => 1, 'showallplugins' => 1, 'cache' => 0)),
get_string('nonehighlightedinfo', 'core_plugin'));
}
$out .= $this->output->container_end();
@@ -962,11 +962,11 @@ class core_admin_renderer extends plugin_renderer_base {
$out .= $this->output->heading(get_string('somehighlighted', 'core_plugin', $sumofhighlighted));
if (empty($options['full'])) {
$out .= html_writer::link(new moodle_url('/admin/index.php',
array('confirmupgrade' => 1, 'confirmrelease' => 1, 'showallplugins' => 1)),
array('confirmupgrade' => 1, 'confirmrelease' => 1, 'showallplugins' => 1, 'cache' => 0)),
get_string('somehighlightedinfo', 'core_plugin'));
} else {
$out .= html_writer::link(new moodle_url('/admin/index.php',
array('confirmupgrade' => 1, 'confirmrelease' => 1, 'showallplugins' => 0)),
array('confirmupgrade' => 1, 'confirmrelease' => 1, 'showallplugins' => 0, 'cache' => 0)),
get_string('somehighlightedonly', 'core_plugin'));
}
$out .= $this->output->container_end();
+2 -2
View File
@@ -17,7 +17,7 @@
/**
* Steps definitions related with administration.
*
* @package core
* @package core_admin
* @category test
* @copyright 2013 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -34,7 +34,7 @@ use Behat\Gherkin\Node\TableNode as TableNode,
/**
* Site administration level steps definitions.
*
* @package core
* @package core_admin
* @category test
* @copyright 2013 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+1 -1
View File
@@ -1,4 +1,4 @@
@core @core_admin @_only_local
@core @core_admin @_only_local @_file_upload
Feature: Upload users
In order to add users to the system
As an admin
+12 -16
View File
@@ -92,21 +92,17 @@ ini_set('log_errors', '1');
// Getting $CFG data.
require_once(__DIR__ . '/../../../../config.php');
// CFG->behat_prefix must be set and with value different than CFG->prefix and phpunit_prefix.
if (empty($CFG->behat_prefix) ||
($CFG->behat_prefix == $CFG->prefix) ||
(!empty($CFG->phpunit_prefix) && $CFG->behat_prefix == $CFG->phpunit_prefix)) {
behat_error(BEHAT_EXITCODE_CONFIG,
'Define $CFG->behat_prefix in config.php with a value different than $CFG->prefix and $CFG->phpunit_prefix');
}
// When we use the utilities we don't know how the site
// will be accessed, so if neither $CFG->behat_switchcompletely or
// $CFG->behat_wwwroot are set we must think that the site will
// be accessed using the built-in server which is set by default
// to localhost:8000. We need to do this to prevent uses of the production
// wwwroot when the site is being installed / dropped...
$CFG->behat_wwwroot = behat_get_wwwroot();
// CFG->behat_dataroot must be set and with value different than CFG->dataroot and phpunit_dataroot.
if (empty($CFG->behat_dataroot) ||
($CFG->behat_dataroot == $CFG->dataroot) ||
(!empty($CFG->phpunit_dataroot) && $CFG->behat_dataroot == $CFG->phpunit_dataroot)) {
behat_error(BEHAT_EXITCODE_CONFIG,
'Define $CFG->behat_dataroot in config.php with a value different than $CFG->dataroot and $CFG->phpunit_dataroot');
}
// Checking the integrity of the provided $CFG->behat_* vars
// to prevent conflicts with production and phpunit environments.
behat_check_config_vars();
// Create behat_dataroot if it doesn't exists.
if (!file_exists($CFG->behat_dataroot)) {
@@ -186,8 +182,8 @@ if ($options['install']) {
mtrace("Acceptance tests site dropped");
} else if ($options['enable']) {
behat_util::start_test_mode();
$runtestscommand = behat_command::get_behat_command() . ' --config '
. $CFG->behat_dataroot . DIRECTORY_SEPARATOR . 'behat' . DIRECTORY_SEPARATOR . 'behat.yml';
$runtestscommand = behat_command::get_behat_command(true) .
' --config ' . behat_config_manager::get_behat_cli_config_filepath();
mtrace("Acceptance tests environment enabled, to run the tests use:\n " . $runtestscommand);
} else if ($options['disable']) {
behat_util::stop_test_mode();
@@ -18,12 +18,12 @@ Feature: Page contents assertions
When I follow "Overview"
And I wait until the page is ready
And I wait "2" seconds
And I hover ".region-content .generaltable td span" "css_element"
And I hover "#region-main .generaltable td span" "css_element"
Then I should see "I'm the description"
And I should see "Filter groups by"
And I should not see "Filter groupssss by"
And I should see "Group members" in the ".region-content table th.c1" "css_element"
And I should not see "Group membersssss" in the ".region-content table th.c1" "css_element"
And I should see "Group members" in the "#region-main table th.c1" "css_element"
And I should not see "Group membersssss" in the "#region-main table th.c1" "css_element"
And I follow "Groups"
And the "#groupeditform #showcreateorphangroupform" "css_element" should be enabled
And the "#groupeditform #showeditgroupsettingsform" "css_element" should be disabled
@@ -90,10 +90,10 @@ Feature: Set up contextual data for tests
And I expand "Users" node
And I follow "Permissions"
And I select "Student (1)" from "Advanced role override"
Then the "mod/forum:editanypost" field should match "1" value
Then "mod/forum:editanypost" capability has "Allow" permission
And I press "Cancel"
And I select "Teacher (1)" from "Advanced role override"
And the "mod/forum:replynews" field should match "-1" value
And "mod/forum:replynews" capability has "Prevent" permission
And I press "Cancel"
Scenario: Add course enrolments
@@ -143,13 +143,29 @@ Feature: Set up contextual data for tests
| fullname | shortname |
| Course 1 | C1 |
And the following "activities" exists:
| activity | name | intro | course | idnumber |
| assign | Test assignment name | Test assignment description | C1 | assign1 |
| data | Test database name | Test database description | C1 | data1 |
| activity | name | intro | course | idnumber |
| assign | Test assignment name | Test assignment description | C1 | assign1 |
| assignment | Test assignment22 name | Test assignment22 description | C1 | assignment1 |
| data | Test database name | Test database description | C1 | data1 |
| forum | Test forum name | Test forum description | C1 | forum1 |
| label | Test label name | Test label description | C1 | label1 |
| lti | Test lti name | Test lti description | C1 | lti1 |
| page | Test page name | Test page description | C1 | page1 |
| quiz | Test quiz name | Test quiz description | C1 | quiz1 |
| resource | Test resource name | Test resource description | C1 | resource1 |
When I log in as "admin"
And I follow "Course 1"
Then I should see "Test assignment name"
# Assignment 2.2 is disabled by default:
# And I should see "Test assignment22 name"
And I should see "Test database name"
And I should see "Test forum name"
# User can see label description instead of name on the course page:
And I should see "Test label description"
And I should see "Test lti name"
And I should see "Test page name"
And I should see "Test quiz name"
And I should see "Test resource name"
And I follow "Test assignment name"
And I should see "Test assignment description"
@@ -25,10 +25,10 @@ Feature: Edit capabilities
| moodle/grade:managesharedforms | Prevent |
| moodle/course:request | Prohibit |
When I follow "Edit Teacher role"
Then the "block/mnet_hosts:myaddinstance" field should match "1" value
And the "moodle/community:add" field should match "0" value
And the "moodle/grade:managesharedforms" field should match "-1" value
And the "moodle/course:request" field should match "-1000" value
Then "block/mnet_hosts:myaddinstance" capability has "Allow" permission
And "moodle/community:add" capability has "Not set" permission
And "moodle/grade:managesharedforms" capability has "Prevent" permission
And "moodle/course:request" capability has "Prohibit" permission
@javascript
Scenario: Course capabilities overrides
@@ -41,9 +41,9 @@ Feature: Edit capabilities
| mod/forum:editanypost | Prevent |
| mod/forum:addquestion | Allow |
When I select "Student (3)" from "Advanced role override"
Then the "mod/forum:deleteanypost" field should match "-1000" value
And the "mod/forum:editanypost" field should match "-1" value
And the "mod/forum:addquestion" field should match "1" value
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
@@ -60,6 +60,6 @@ Feature: Edit capabilities
| mod/forum:editanypost | Prevent |
| mod/forum:addquestion | Allow |
When I select "Student (3)" from "Advanced role override"
Then the "mod/forum:deleteanypost" field should match "-1000" value
And the "mod/forum:editanypost" field should match "-1" value
And the "mod/forum:addquestion" field should match "1" value
Then "mod/forum:deleteanypost" capability has "Prohibit" permission
And "mod/forum:editanypost" capability has "Prevent" permission
And "mod/forum:addquestion" capability has "Allow" permission
@@ -0,0 +1,179 @@
@tool_behat
Feature: Verify that all form fields values can be get and set
In order to use behat steps definitions
As a test writer
I need to verify it all works in real moodle forms
Background:
Given the following "courses" exists:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exists:
| username | email | firstname | lastname |
| student1 | s1@asd.com | Student | 1 |
| student2 | s2@asd.com | Student | 2 |
| student3 | s3@asd.com | Student | 3 |
And the following "course enrolments" exists:
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| admin | C1 | editingteacher |
And the following "groups" exists:
| name | description | course | idnumber |
| Group 1 | G1 description | C1 | G1 |
| Group 2 | G1 description | C1 | G2 |
And the following "group members" exists:
| user | group |
| student1 | G1 |
| student2 | G1 |
| student2 | G2 |
| student3 | G2 |
And I log in as "admin"
And I expand "Site administration" node
And I expand "Appearance" node
And I follow "Manage tags"
# Select (multi-select) - We will check "I fill in...".
And I fill in "otagsadd" with "OT1, OT2, OT3, OT4, OT5"
And I press "Add official tags"
And I am on homepage
And I follow "Course 1"
And I turn editing mode on
And I add a "Wiki" to section "1" and I fill the form with:
| Wiki name | Test this one |
| Description | Test this one |
| First page name | Test this one |
| Wiki mode | Collaborative wiki |
| Visible | Hide |
And I follow "Test this one"
And I press "Create page"
# Select (multi-select) - Checking "the select box should contain".
And the "tags[officialtags][]" select box should contain "OT1"
And the "tags[officialtags][]" select box should contain "OT2"
And the "tags[officialtags][]" select box should contain "OT3"
And the "tags[officialtags][]" select box should contain "OT4"
And the "tags[officialtags][]" select box should contain "OT5"
And the "tags[officialtags][]" select box should contain "OT1, OT2, OT3, OT4, OT5"
And the "tags[officialtags][]" select box should contain "OT5, OT4, OT3, OT2, OT1"
And the "tags[officialtags][]" select box should not contain "OT6"
And the "tags[officialtags][]" select box should not contain "OT7"
And the "tags[officialtags][]" select box should not contain "OT6, OT7"
# Text (textarea & editor) & Select (multi-select) - Checking "I fill the moodle form with".
When I fill the moodle form with:
| HTML format | Student page contents to be tagged |
| tags[officialtags][] | OT1, OT3, OT5 |
And I press "Save"
Then I should see "Student page contents to be tagged" in the "region-main" "region"
And I should see "OT1" in the ".wiki-tags" "css_element"
And I should see "OT3" in the ".wiki-tags" "css_element"
And I should see "OT5" in the ".wiki-tags" "css_element"
And I should not see "OT2" in the ".wiki-tags" "css_element"
And I should not see "OT4" in the ".wiki-tags" "css_element"
And I follow "Edit"
# Select (multi-select) - Checking "I select from".
And I select "OT2, OT4" from "tags[officialtags][]"
And I press "Save"
And I should see "OT2" in the ".wiki-tags" "css_element"
And I should see "OT4" in the ".wiki-tags" "css_element"
And I should not see "OT1" in the ".wiki-tags" "css_element"
And I should not see "OT3" in the ".wiki-tags" "css_element"
And I should not see "OT5" in the ".wiki-tags" "css_element"
And I follow "Edit"
# Select (multi-select) - Checking "the field should match" and "the field does not match value".
And the "tags[officialtags][]" field should match "OT2, OT4" value
And the field "tags[officialtags][]" does not match value "OT4"
And the field "tags[officialtags][]" does not match value "OT2"
And the field "tags[officialtags][]" does not match value "OT1, OT3, OT5"
And I press "Cancel"
And I follow "Edit settings"
And I expand all fieldsets
# Checkbox - Checking "I check".
And I check "Display description on course page"
# Checkbox - Checking "I fill the moodle form with:".
And I fill the moodle form with:
| Force format | 1 |
# Checkbox - Checking "the field should match" and "the field does not match value".
And the "Display description on course page" field should match "1" value
And the field "Display description on course page" does not match value ""
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I follow "Edit settings"
# Checkbox - Checking "the field should match" and "the following fields match these values".
And the following fields match these values:
| Display description on course page | 1 |
| Default format | HTML |
| Wiki name | Test this one |
And the "Force format" field should match "1" value
# Select (simple) - Checking "I fill the moodle form with:".
And I fill the moodle form with:
| Default format | NWiki |
| Display description on course page | |
# Checkbox - Checking "I uncheck".
And I uncheck "Force format"
# Select (simple) - Checking "I select from".
And I select "Separate groups" from "Group mode"
And I press "Save and display"
And I follow "Edit settings"
And the following fields match these values:
| Default format | NWiki |
| Group mode | Separate groups |
| Display description on course page | |
| Force format | |
# All fields - Checking "the following fields do not match these values".
And the following fields do not match these values:
| Wiki name | Test this one baby |
| Default format | HTML |
| Force format | 1 |
And I press "Cancel"
And I follow "Course 1"
# Radio - Checking "I check" and "the field should match".
And I add a "Choice" to section "1" and I fill the form with:
| Choice name | Test choice name |
| Description | Test choice description |
| Allow choice to be updated | Yes |
| Option 1 | one |
| Option 2 | two |
| Option 3 | three |
And I follow "Test choice name"
And I check "one"
And I press "Save my choice"
And the "one" field should match "1" value
And the "two" field should match "" value
Scenario: with JS disabled all form fields getters and setters works as expected
@javascript
Scenario: with JS enabled all form fields getters and setters works as expected
Then I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
# Select (multi-select & AJAX) - Checking "I select from" and "select box should contain".
And I select "Group 2" from "groups"
And I wait "5" seconds
And the "members" select box should contain "Student 2"
And the "members" select box should contain "Student 3"
And the "members" select box should not contain "Student 1"
And I select "Group 1" from "groups"
And I wait "5" seconds
And the "members" select box should contain "Student 2"
And the "members" select box should contain "Student 1"
And the "members" select box should contain "Student 2"
And the "members" select box should not contain "Student 3"
# Checkbox (AJAX) - Checking "I check" and "I fill the moodle form with".
And I follow "Course 1"
And I add a "Lesson" to section "1"
And I fill the moodle form with:
| Name | Test lesson |
| available[enabled] | 1 |
And I check "deadline[enabled]"
# Checkbox (AJAX) - Checking "field should match" before saving.
And the "available[enabled]" field should match "1" value
And the "available[day]" "field" should be enabled
And the "deadline[enabled]" field should match "1" value
And I press "Save and display"
And I follow "Edit settings"
And the "available[enabled]" field should match "1" value
And the "available[day]" "field" should be enabled
And the "deadline[enabled]" field should match "1" value
And I press "Cancel"
@@ -32,5 +32,5 @@ Feature: Forms manipulation
Then I should see "Close the quiz"
And I should see "Group mode"
And I should see "Grouping"
And I should not see "Show more..." in the "region-main-box" "region"
And I should not see "Show more..." in the "region-main" "region"
And I should see "Show less..."
@@ -173,6 +173,9 @@ class tool_behat_testcase extends advanced_testcase {
// directories values.
$this->assertContains($CFG->dirroot . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'behat' . DIRECTORY_SEPARATOR . 'features', $contents);
// If it was empty should be filled by behat_config_manager::get_config_file_contents().
$this->assertNotNull($CFG->behat_wwwroot);
// Not quoted strings.
$this->assertContains('micarro: /me/lo/robaron', $contents);
$this->assertContains('class: behat_init_context', $contents);
@@ -183,6 +186,8 @@ class tool_behat_testcase extends advanced_testcase {
// Lists.
$this->assertContains('- feature1', $contents);
$this->assertContains('- feature3', $contents);
unset($CFG->behat_wwwroot);
}
}
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2013050101;
$plugin->version = 2013050102;
$plugin->requires = 2013050100; // Requires Moodle 2.5.
$plugin->component = 'tool_behat';
+9 -3
View File
@@ -139,9 +139,15 @@ if ($capability) {
// Put the contexts into a tree structure.
foreach ($contexts as $conid => $con) {
$context = context::instance_by_id($conid);
$parentcontextid = get_parent_contextid($context);
if ($parentcontextid) {
$contexts[$parentcontextid]->children[] = $conid;
try {
$parentcontext = $context->get_parent_context();
if ($parentcontext) { // Will be false if $context is the system context.
$contexts[$parentcontext->id]->children[] = $conid;
}
} catch (dml_missing_record_exception $e) {
// Ignore corrupt context tree structure here. Don't let it break
// showing the rest of the report.
continue;
}
}
+1 -1
View File
@@ -752,7 +752,7 @@
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">${sitepath}/mod/forum/post.php</stringProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.follow_redirects">false</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
@@ -23,5 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['multilangupgradeinfo'] = 'The multilang filter syntax was changed in 1.8, &lt;lang&gt; tag is not supported any more. <br /><br />Example: &lt;span lang="en" class="multilang">Hello!&lt;/span&gt;&lt;span lang="es" class="multilang">Hola!&lt;/span&gt;<br /><br /><strong>Do you want to upgrade the syntax in all existing texts now?</strong>';
$string['multilangupgradeinfo'] = '<p>The multilang filter syntax was changed in 1.8 and so the &lt;lang&gt; tag is not supported any more.</p>
<p>Example: &lt;span lang="en" class="multilang"&gt;Hello!&lt;/span&gt;&lt;span lang="es" class="multilang"&gt;Hola!&lt;/span&gt;</p>
<p>Do you want to upgrade the syntax in all existing texts now?</p>';
$string['pluginname'] = 'Multilang upgrade';
@@ -46,7 +46,7 @@ class tool_qeupgradehelper_extract_options_form extends moodleform {
$qtypes = get_plugin_list('qtype');
foreach ($qtypes as $qtype => $notused) {
$qtypes[$qtype] = get_string($qtype, 'qtype_' . $qtype);
$qtypes[$qtype] = get_string('pluginname', 'qtype_' . $qtype);
}
$mform->addElement('header', 'h1', 'Either extract a specific question_session');
+6 -6
View File
@@ -179,12 +179,12 @@ function search_spammers($keywords) {
$conditions7 = '( '.implode(' OR ', $keywordfull7).' )';
$sql = "SELECT * FROM {user} WHERE deleted = 0 AND id <> :userid AND $conditions"; // Exclude oneself
$sql2 = "SELECT u.*, p.summary FROM {user} AS u, {post} AS p WHERE $conditions2 AND u.deleted = 0 AND u.id=p.userid AND u.id <> :userid";
$sql3 = "SELECT u.*, p.subject as postsubject FROM {user} AS u, {post} AS p WHERE $conditions3 AND u.deleted = 0 AND u.id=p.userid AND u.id <> :userid";
$sql4 = "SELECT u.*, c.content FROM {user} AS u, {comments} AS c WHERE $conditions4 AND u.deleted = 0 AND u.id=c.userid AND u.id <> :userid";
$sql5 = "SELECT u.*, m.fullmessage FROM {user} AS u, {message} AS m WHERE $conditions5 AND u.deleted = 0 AND u.id=m.useridfrom AND u.id <> :userid";
$sql6 = "SELECT u.*, fp.message FROM {user} AS u, {forum_posts} AS fp WHERE $conditions6 AND u.deleted = 0 AND u.id=fp.userid AND u.id <> :userid";
$sql7 = "SELECT u.*, fp.subject FROM {user} AS u, {forum_posts} AS fp WHERE $conditions7 AND u.deleted = 0 AND u.id=fp.userid AND u.id <> :userid";
$sql2 = "SELECT u.*, p.summary FROM {user} u, {post} p WHERE $conditions2 AND u.deleted = 0 AND u.id=p.userid AND u.id <> :userid";
$sql3 = "SELECT u.*, p.subject as postsubject FROM {user} u, {post} p WHERE $conditions3 AND u.deleted = 0 AND u.id=p.userid AND u.id <> :userid";
$sql4 = "SELECT u.*, c.content FROM {user} u, {comments} c WHERE $conditions4 AND u.deleted = 0 AND u.id=c.userid AND u.id <> :userid";
$sql5 = "SELECT u.*, m.fullmessage FROM {user} u, {message} m WHERE $conditions5 AND u.deleted = 0 AND u.id=m.useridfrom AND u.id <> :userid";
$sql6 = "SELECT u.*, fp.message FROM {user} u, {forum_posts} fp WHERE $conditions6 AND u.deleted = 0 AND u.id=fp.userid AND u.id <> :userid";
$sql7 = "SELECT u.*, fp.subject FROM {user} u, {forum_posts} fp WHERE $conditions7 AND u.deleted = 0 AND u.id=fp.userid AND u.id <> :userid";
$spamusers_desc = $DB->get_recordset_sql($sql, $params);
$spamusers_blog = $DB->get_recordset_sql($sql2, $params);
@@ -27,7 +27,8 @@ $string['pluginname'] = 'Spam cleaner';
$string['spamauto'] = 'Autodetect common spam patterns';
$string['spamcannotdelete'] = 'Cannot delete this user';
$string['spamcannotfinduser'] = 'No users matching your search';
$string['spamcleanerintro'] = 'This script allows you to search all user profiles for certain strings and then delete those accounts which are obviously created by spammers. You can search for multiple keywords using commas (eg casino, porn)<br /><br />Moodle docs has more information about <a href="http://docs.moodle.org/en/Reducing_spam_in_Moodle">Reducing spam in Moodle</a>.';
$string['spamcleanerintro'] = '<p>This script allows you to search all user profiles for certain strings and then delete those accounts which are obviously created by spammers. You can search for multiple keywords using commas (e.g. casino, porn).</p>
<p>For further information, see the documentation <a href="http://docs.moodle.org/en/Reducing_spam_in_Moodle">Reducing spam in Moodle</a>.</p>';
$string['spamdeleteall'] = 'Delete all these user accounts';
$string['spamdeleteallconfirm'] = 'Are you sure you want to delete all these user accounts? You can not undo this.';
$string['spamdeleteconfirm'] = 'Are you sure you want to delete this entry? You can not undo this.';
+5 -6
View File
@@ -232,10 +232,10 @@ if ($formdata = $mform2->is_cancelled()) {
$user->$key['text'] = $value;
$user->$key['format'] = FORMAT_MOODLE;
} else {
$user->$key = $value;
$user->$key = trim($value);
}
} else {
$user->$key = $value;
$user->$key = trim($value);
}
if (in_array($key, $upt->columns)) {
@@ -547,8 +547,6 @@ if ($formdata = $mform2->is_cancelled()) {
continue;
}
if (!property_exists($user, $column) or !property_exists($existinguser, $column)) {
// this should never happen
debugging("Could not find $column on the user objects", DEBUG_DEVELOPER);
continue;
}
if ($updatetype == UU_UPDATE_MISSING) {
@@ -966,6 +964,7 @@ if ($formdata = $mform2->is_cancelled()) {
if ($rid) {
// find duration
$timeend = 0;
if (!empty($user->{'enrolperiod'.$i})) {
$duration = (int)$user->{'enrolperiod'.$i} * 60*60*24; // convert days to seconds
if ($duration > 0) { // sanity check
@@ -1097,7 +1096,7 @@ while ($linenum <= $previewrows and $fields = $cir->next()) {
$rowcols = array();
$rowcols['line'] = $linenum;
foreach($fields as $key => $field) {
$rowcols[$filecolumns[$key]] = s($field);
$rowcols[$filecolumns[$key]] = s(trim($field));
}
$rowcols['status'] = array();
@@ -1123,7 +1122,7 @@ while ($linenum <= $previewrows and $fields = $cir->next()) {
}
if (isset($rowcols['city'])) {
$rowcols['city'] = trim($rowcols['city']);
$rowcols['city'] = $rowcols['city'];
if (empty($rowcols['city'])) {
$rowcols['status'][] = get_string('fieldrequired', 'error', 'city');
}
@@ -53,6 +53,8 @@ class check_foreign_keys extends XMLDBCheckAction {
'noviolatedforeignkeysfound' => 'tool_xmldb',
'violatedforeignkeysfound' => 'tool_xmldb',
'violations' => 'tool_xmldb',
'unknowntable' => 'tool_xmldb',
'unknownfield' => 'tool_xmldb',
));
}
@@ -75,6 +77,19 @@ class check_foreign_keys extends XMLDBCheckAction {
}
$o.=' <li>' . $this->str['key'] . ': ' . $xmldb_key->readableInfo() . ' ';
$reftable = $xmldb_key->getRefTable();
if (!$dbman->table_exists($reftable)) {
$o.='<font color="red">' . $this->str['unknowntable'] . '</font>';
// Add the missing index to the list
$violation = new stdClass();
$violation->string = 'fkunknowntable';
$violation->table = $xmldb_table;
$violation->key = $xmldb_key;
$violation->reftable = $reftable;
$violatedkeys[] = $violation;
continue;
}
// Work out the SQL to find key violations.
$keyfields = $xmldb_key->getFields();
$reffields = $xmldb_key->getRefFields();
@@ -82,6 +97,19 @@ class check_foreign_keys extends XMLDBCheckAction {
$nullnessconditions = array();
$params = array();
foreach ($keyfields as $i => $field) {
if (!$dbman->field_exists($reftable, $reffields[$i])) {
$o.='<font color="red">' . $this->str['unknownfield'] . '</font>';
// Add the missing index to the list
$violation = new stdClass();
$violation->string = 'fkunknownfield';
$violation->table = $xmldb_table;
$violation->key = $xmldb_key;
$violation->reftable = $reftable;
$violation->reffield = $reffields[$i];
$violatedkeys[] = $violation;
continue 2;
}
$joinconditions[] = 't1.' . $field . ' = t2.' . $reffields[$i];
$xmldb_field = $xmldb_table->getField($field);
$default = $xmldb_field->getDefault();
@@ -97,7 +125,7 @@ class check_foreign_keys extends XMLDBCheckAction {
}
$nullnessconditions[] = 't2.id IS NULL';
$sql = 'SELECT count(1) FROM {' . $xmldb_table->getName() .
'} t1 LEFT JOIN {' . $xmldb_key->getRefTable() . '} t2 ON ' .
'} t1 LEFT JOIN {' . $reftable . '} t2 ON ' .
implode(' AND ', $joinconditions) . ' WHERE ' .
implode(' AND ', $nullnessconditions);
@@ -109,6 +137,7 @@ class check_foreign_keys extends XMLDBCheckAction {
$o.='<font color="red">' . $this->str['violations'] . '</font>';
// Add the missing index to the list
$violation = new stdClass;
$violation->string = 'fkviolationdetails';
$violation->table = $xmldb_table;
$violation->key = $xmldb_key;
$violation->numviolations = $violations;
@@ -145,8 +174,11 @@ class check_foreign_keys extends XMLDBCheckAction {
$violation->tablename = $violation->table->getName();
$violation->keyname = $violation->key->getName();
$r.= ' <li>' .get_string('fkviolationdetails', 'tool_xmldb', $violation) .
'<pre>' . s($violation->sql) . '; ' . s($violation->sqlparams) . '</pre></li>';
$r.= ' <li>' .get_string($violation->string, 'tool_xmldb', $violation);
if (!empty($violation->sql)) {
$r.= '<pre>' . s($violation->sql) . '; ' . s($violation->sqlparams) . '</pre>';
}
$r.= '</li>';
}
$r.= ' </ul>';
} else {
+12 -4
View File
@@ -106,6 +106,8 @@ $string['fieldsusedinindex'] = 'This field is used as index';
$string['fieldsusedinkey'] = 'This field is used as key.';
$string['filemodifiedoutfromeditor'] = 'Warning: File locally modified while using the XMLDB Editor. Saving will overwrite local changes.';
$string['filenotwriteable'] = 'File not writeable';
$string['fkunknownfield'] = 'Foreign key {$a->keyname} on table {$a->tablename} points to a non-existent field {$a->reffield} in referenced table {$a->reftable}.';
$string['fkunknowntable'] = 'Foreign key {$a->keyname} on table {$a->tablename} points to a non-existent table {$a->reftable}.';
$string['fkviolationdetails'] = 'Foreign key {$a->keyname} on table {$a->tablename} is violated by {$a->numviolations} out of {$a->numrows} rows.';
$string['floatincorrectdecimals'] = 'Incorrect number of decimals for float field';
$string['floatincorrectlength'] = 'Incorrect length for float field';
@@ -183,6 +185,8 @@ $string['selecttable'] = 'Select table:';
$string['table'] = 'Table';
$string['tablenameempty'] = 'The table name cannot be empty';
$string['tables'] = 'Tables';
$string['unknownfield'] = 'Refers to an unknown field';
$string['unknowntable'] = 'Refers to an unknown table';
$string['unload'] = 'Unload';
$string['up'] = 'Up';
$string['view'] = 'View';
@@ -206,7 +210,11 @@ $string['wronglengthforenum'] = 'Incorrect length for enum field';
$string['wrongnumberofreffields'] = 'Wrong number of reference fields';
$string['wrongreservedwords'] = 'Currently used reserved words<br />(note that table names aren\'t important if using $CFG->prefix)';
$string['wrongoraclesemantics'] = 'Wrong Oracle BYTE semantics found';
$string['yesmissingindexesfound'] = 'Some missing indexes have been found in your DB. Here are their details and the needed SQL statements to be executed with your favourite SQL interface to create all them (don\'t forget to backup your data before doing that).<br /><br />After doing that, it\'s highly recommended to execute this utility again to check that no more missing indexes are found.';
$string['yeswrongdefaultsfound'] = 'Some inconsistent defaults have been found in your DB. Here are their details and the needed SQL statements to be executed with your favourite SQL interface to fix them all (don\'t forget to backup your data before doing that).<br /><br />After doing that, it\'s highly recommended to execute this utility again to check that no more inconsistent defaults are found.';
$string['yeswrongintsfound'] = 'Some wrong integers have been found in your DB. Here are their details and the needed SQL statements to be executed with your favourite SQL interface to create all them (don\'t forget to backup your data before doing that).<br /><br />After doing that, it\'s highly recommended to execute this utility again to check that no more wrong integers are found.';
$string['yeswrongoraclesemanticsfound'] = 'Some Oracle columns using BYTE semantics have been found in your DB. Here are their details and the needed SQL statements to be executed with your favourite SQL interface to create all them (don\'t forget to backup your data before doing that).<br /><br />After doing that, it\'s highly recommended to execute this utility again to check that no more wrong semantics are found.';
$string['yesmissingindexesfound'] = '<p>Some missing indexes have been found in your DB. Here are their details and the needed SQL statements to be executed with your favourite SQL interface to create all of them. Remember to backup your data first!</p>
<p>After doing that, it\'s highly recommended to execute this utility again to check that no more missing indexes are found.</p>';
$string['yeswrongdefaultsfound'] = '<p>Some inconsistent defaults have been found in your DB. Here are their details and the needed SQL statements to be executed with your favourite SQL interface to fix them all. Remember to backup your data first!</p>
<p>After doing that, it\'s highly recommended to execute this utility again to check that no more inconsistent defaults are found.</p>';
$string['yeswrongintsfound'] = '<p>Some wrong integers have been found in your DB. Here are their details and the needed SQL statements to be executed with your favourite SQL interface to create all them. Remember to backup your data first!</p>
<p>After doing that, it\'s highly recommended to execute this utility again to check that no more wrong integers are found.</p>';
$string['yeswrongoraclesemanticsfound'] = '<p>Some Oracle columns using BYTE semantics have been found in your DB. Here are their details and the needed SQL statements to be executed with your favourite SQL interface to create all them. Remember to backup your data first!</p>
<p>After doing that, it\'s highly recommended to execute this utility again to check that no more wrong semantics are found.</p>';
+5
View File
@@ -10,6 +10,11 @@ $return = optional_param('return', '', PARAM_ALPHA);
/// no guest autologin
require_login(0, false);
if (isguestuser()) {
// Login as real user!
$SESSION->wantsurl = (string)new moodle_url('/admin/upgradesettings.php', array('return'=>$return));
redirect(get_login_url());
}
admin_externalpage_setup('upgradesettings'); // now hidden page
$PAGE->set_pagelayout('maintenance'); // do not print any blocks or other rubbish, we want to force saving
+1 -1
View File
@@ -68,7 +68,7 @@ if ($usersettingsform->is_cancelled()) {
//TODO: assign capability
//display successful notification
$notification = $OUTPUT->notification(get_string('usersettingssaved', 'webservice'), 'success');
$notification = $OUTPUT->notification(get_string('usersettingssaved', 'webservice'), 'notifysuccess');
}
echo $OUTPUT->header();
+1
View File
@@ -413,6 +413,7 @@ class auth_plugin_cas extends auth_plugin_ldap {
// Test for group creator
if (!empty($this->config->groupecreators)) {
$ldapconnection = $this->ldap_connect();
if ($this->config->memberattribute_isdn) {
if(!($userid = $this->ldap_find_userdn($ldapconnection, $extusername))) {
return false;
+9 -3
View File
@@ -1143,6 +1143,7 @@ class auth_plugin_ldap extends auth_plugin_base {
return false;
}
$success = true;
$user_info_result = ldap_read($ldapconnection, $user_dn, '(objectClass=*)', $search_attribs);
if ($user_info_result) {
$user_entry = ldap_get_entries_moodle($ldapconnection, $user_info_result);
@@ -1189,8 +1190,10 @@ class auth_plugin_ldap extends auth_plugin_base {
if ($nuvalue !== $ldapvalue) {
// This might fail due to schema validation
if (@ldap_modify($ldapconnection, $user_dn, array($ldapkey => $nuvalue))) {
$changed = true;
continue;
} else {
$success = false;
error_log($this->errorlogtag.get_string ('updateremfail', 'auth_ldap',
array('errno'=>ldap_errno($ldapconnection),
'errstring'=>ldap_err2str(ldap_errno($ldapconnection)),
@@ -1209,6 +1212,7 @@ class auth_plugin_ldap extends auth_plugin_base {
$changed = true;
continue;
} else {
$success = false;
error_log($this->errorlogtag.get_string ('updateremfail', 'auth_ldap',
array('errno'=>ldap_errno($ldapconnection),
'errstring'=>ldap_err2str(ldap_errno($ldapconnection)),
@@ -1226,6 +1230,7 @@ class auth_plugin_ldap extends auth_plugin_base {
$changed = true;
continue;
} else {
$success = false;
error_log($this->errorlogtag.get_string ('updateremfail', 'auth_ldap',
array('errno'=>ldap_errno($ldapconnection),
'errstring'=>ldap_err2str(ldap_errno($ldapconnection)),
@@ -1239,6 +1244,7 @@ class auth_plugin_ldap extends auth_plugin_base {
}
if ($ambiguous and !$changed) {
$success = false;
error_log($this->errorlogtag.get_string ('updateremfailamb', 'auth_ldap',
array('key'=>$key,
'ouvalue'=>$ouvalue,
@@ -1248,12 +1254,11 @@ class auth_plugin_ldap extends auth_plugin_base {
}
} else {
error_log($this->errorlogtag.get_string ('usernotfound', 'auth_ldap'));
$this->ldap_close();
return false;
$success = false;
}
$this->ldap_close();
return true;
return $success;
}
@@ -1474,6 +1479,7 @@ class auth_plugin_ldap extends auth_plugin_base {
array_push($contexts, $this->config->create_context);
}
$ldap_cookie = '';
$ldap_pagedresults = ldap_paged_results_supported($this->config->ldap_version);
foreach ($contexts as $context) {
$context = trim($context);
-1
View File
@@ -950,7 +950,6 @@ class auth_plugin_mnet extends auth_plugin_base {
// run the keepalive client
$this->keepalive_client();
// admin/cron.php should have run srand for us
$random100 = rand(0,100);
if ($random100 < 10) { // Approximately 10% of the time.
// nuke olden sessions
+36 -3
View File
@@ -18,7 +18,7 @@
/**
* Basic authentication steps definitions.
*
* @package core
* @package core_auth
* @category test
* @copyright 2012 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -34,7 +34,7 @@ use Behat\Behat\Context\Step\When as When;
/**
* Log in log out steps definitions.
*
* @package core
* @package core_auth
* @category test
* @copyright 2012 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -48,12 +48,45 @@ class behat_auth extends behat_base {
*/
public function i_log_in_as($username) {
return array(new Given('I am on homepage'),
// Running this step using the API rather than a chained step because
// we need to see if the 'Log in' link is available or we need to click
// the dropdown to expand the navigation bar before.
$this->getSession()->visit($this->locate_path('/'));
// Generic steps (we will prefix them later expanding the navigation dropdown if necessary).
$steps = array(
new Given('I follow "' . get_string('login') . '"'),
new Given('I fill in "' . get_string('username') . '" with "' . $this->escape($username) . '"'),
new Given('I fill in "' . get_string('password') . '" with "'. $this->escape($username) . '"'),
new Given('I press "' . get_string('login') . '"')
);
// If Javascript is disabled we have enough with these steps.
if (!$this->running_javascript()) {
return $steps;
}
// Wait for the homepage to be ready.
$this->getSession()->wait(self::TIMEOUT * 1000, '(document.readyState === "complete")');
// Checking if we need to click the navbar button to show the navigation menu, it
// is hidden by default when using clean theme and a medium or small size screen size.
// The DOM and the JS should be all ready and loaded. Running without spinning
// as this is a widely used step and we can not spend time here trying to see
// a DOM node that is not always there (at the moment clean is not even the
// default theme...).
$navbuttonjs = "return (
Y.one('.btn-navbar') &&
Y.one('.btn-navbar').getComputedStyle('display') !== 'none'
)";
// Adding an extra click we need to show the 'Log in' link.
if ($this->getSession()->getDriver()->evaluateScript($navbuttonjs)) {
array_unshift($steps, new Given('I click on ".btn-navbar" "css_element"'));
}
return $steps;
}
/**
+7 -1
View File
@@ -4,8 +4,14 @@ Feature: Authentication
As a user
I need to log into the system
Scenario: Login with the predefined admin user
Scenario: Login with the predefined admin user with Javascript disabled
Given I log in as "admin"
Then I should see "You are logged in as Admin User"
@javascript
Scenario: Login with the predefined admin user with Javascript enabled
Given I log in as "admin"
Then I should see "You are logged in as Admin User"
Scenario: Login as an existing admin user filling the form
Given the following "users" exists:
-1
View File
@@ -309,7 +309,6 @@ class entities {
$source = str_split($source, 1);
for ($i = 1; $i <= $length; $i++) {
mt_srand((double) microtime() * 1000000);
$num = mt_rand(1, count($source));
$response .= $source[$num - 1];
}
+1 -1
View File
@@ -144,7 +144,7 @@ if ($backup->get_stage() == backup_ui::STAGE_FINAL) {
echo $OUTPUT->header();
if ($warnings) {
echo $OUTPUT->box_start();
echo $OUTPUT->notification(get_string('warning'), 'notifywarning');
echo $OUTPUT->notification(get_string('warning'), 'notifyproblem');
echo html_writer::start_tag('ul', array('class'=>'list'));
foreach ($warnings as $warning) {
echo html_writer::tag('li', $warning);
+24 -6
View File
@@ -129,20 +129,38 @@ class backup_course_task extends backup_task {
/**
* Code the transformations to perform in the course in
* order to get transportable (encoded) links
* @param string $content content in which to encode links.
* @return string content with links encoded.
*/
static public function encode_content_links($content) {
global $CFG;
$base = preg_quote($CFG->wwwroot, '/');
// Link to the course main page (it also covers "&topic=xx" and "&week=xx"
// because they don't become transformed (section number) in backup/restore
$search = '/(' . $base . '\/course\/view.php\?id\=)([0-9]+)/';
$content= preg_replace($search, '$@COURSEVIEWBYID*$2@$', $content);
// because they don't become transformed (section number) in backup/restore.
$content = self::encode_links_helper($content, 'COURSEVIEWBYID', '/course/view.php?id=');
// A few other key course links.
$content = self::encode_links_helper($content, 'GRADEINDEXBYID', '/grade/index.php?id=');
$content = self::encode_links_helper($content, 'GRADEREPORTINDEXBYID', '/grade/report/index.php?id=');
$content = self::encode_links_helper($content, 'BADGESVIEWBYID', '/badges/view.php?type=2&id=');
$content = self::encode_links_helper($content, 'USERINDEXVIEWBYID', '/user/index.php?id=');
return $content;
}
/**
* Helper method, used by encode_content_links.
* @param string $content content in which to encode links.
* @param unknown_type $name the name of this type of encoded link.
* @param unknown_type $path the path that identifies this type of link, up
* to the ?paramname= bit.
* @return string content with one type of link encoded.
*/
static private function encode_links_helper($content, $name, $path) {
global $CFG;
$base = preg_quote($CFG->wwwroot . $path, '/');
return preg_replace('/(' . $base . ')([0-9]+)/', '$@' . $name . '*$2@$', $content);
}
// Protected API starts here
/**
+1 -1
View File
@@ -210,7 +210,7 @@ abstract class backup_questions_activity_structure_step extends backup_activity_
$qas = new backup_nested_element($nameprefix . 'question_attempts');
$qa = new backup_nested_element($nameprefix . 'question_attempt', array('id'), array(
'slot', 'behaviour', 'questionid', 'maxmark', 'minfraction',
'slot', 'behaviour', 'questionid', 'variant', 'maxmark', 'minfraction',
'flagged', 'questionsummary', 'rightanswer', 'responsesummary',
'timemodified'));
+10 -2
View File
@@ -124,6 +124,7 @@ class restore_course_task extends restore_task {
$contents = array();
$contents[] = new restore_decode_content('course', 'summary');
$contents[] = new restore_decode_content('event', 'description');
return $contents;
}
@@ -135,10 +136,17 @@ class restore_course_task extends restore_task {
static public function define_decode_rules() {
$rules = array();
$rules[] = new restore_decode_rule('COURSEVIEWBYID', '/course/view.php?id=$1', 'course');
// Link to the course main page (it also covers "&topic=xx" and "&week=xx"
// because they don't become transformed (section number) in backup/restore.
$rules[] = new restore_decode_rule('COURSEVIEWBYID', '/course/view.php?id=$1', 'course');
// A few other key course links.
$rules[] = new restore_decode_rule('GRADEINDEXBYID', '/grade/index.php?id=$1', 'course');
$rules[] = new restore_decode_rule('GRADEREPORTINDEXBYID', '/grade/report/index.php?id=$1', 'course');
$rules[] = new restore_decode_rule('BADGESVIEWBYID', '/badges/view.php?type=2&id=$1', 'course');
$rules[] = new restore_decode_rule('USERINDEXVIEWBYID', '/user/index.php?id=$1', 'course');
return $rules;
}
// Protected API starts here
+6 -1
View File
@@ -162,7 +162,12 @@ class restore_final_task extends restore_task {
// rules from other tasks (activities) not belonging to one module instance (cmid = 0), so are restored here
$rules = array_merge($rules, restore_logs_processor::register_log_rules_for_course());
// TODO: Other logs like 'calendar', 'upload'... will go here
// Calendar rules.
$rules[] = new restore_log_rule('calendar', 'add', 'event.php?action=edit&id={event}', '[name]');
$rules[] = new restore_log_rule('calendar', 'edit', 'event.php?action=edit&id={event}', '[name]');
$rules[] = new restore_log_rule('calendar', 'edit all', 'event.php?action=edit&id={event}', '[name]');
// TODO: Other logs like 'upload'... will go here
return $rules;
}
+19 -3
View File
@@ -2197,13 +2197,20 @@ class restore_calendarevents_structure_step extends restore_structure_step {
} else {
$params['instance'] = 0;
}
$sql = 'SELECT id FROM {event} WHERE name = ? AND courseid = ? AND
repeatid = ? AND modulename = ? AND timestart = ? AND timeduration =?
AND ' . $DB->sql_compare_text('description', 255) . ' = ' . $DB->sql_compare_text('?', 255);
$sql = "SELECT id
FROM {event}
WHERE " . $DB->sql_compare_text('name', 255) . " = " . $DB->sql_compare_text('?', 255) . "
AND courseid = ?
AND repeatid = ?
AND modulename = ?
AND timestart = ?
AND timeduration = ?
AND " . $DB->sql_compare_text('description', 255) . " = " . $DB->sql_compare_text('?', 255);
$arg = array ($params['name'], $params['courseid'], $params['repeatid'], $params['modulename'], $params['timestart'], $params['timeduration'], $params['description']);
$result = $DB->record_exists_sql($sql, $arg);
if (empty($result)) {
$newitemid = $DB->insert_record('event', $params);
$this->set_mapping('event', $oldid, $newitemid);
$this->set_mapping('event_description', $oldid, $newitemid, $restorefiles);
}
@@ -2813,6 +2820,12 @@ class restore_activity_grades_structure_step extends restore_structure_step {
}
// no need to save any grade_letter mapping
}
public function after_restore() {
// Fix grade item's sortorder after restore, as it might have duplicates.
$courseid = $this->get_task()->get_courseid();
grade_item::fix_duplicate_sortorder($courseid);
}
}
@@ -4034,6 +4047,9 @@ abstract class restore_questions_activity_structure_step extends restore_activit
$data->questionusageid = $this->get_new_parentid($nameprefix . 'question_usage');
$data->questionid = $question->newitemid;
if (!property_exists($data, 'variant')) {
$data->variant = 1;
}
$data->timemodified = $this->apply_date_offset($data->timemodified);
$newitemid = $DB->insert_record('question_attempts', $data);
@@ -0,0 +1,56 @@
<?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/>.
/**
* @package core_backup
* @category phpunit
* @copyright 2013 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_course_task.class.php');
/**
* Tests for encoding content links in backup_course_task.
*
* The code that this tests is acutally in backup/moodle2/backup_course_task.class.php,
* but there is no place for unit tests near there, and perhaps one day it will
* be refactored so it becomes more generic.
*/
class backup_course_task_testcase extends basic_testcase {
/**
* Test the encode_content_links method for course.
*/
public function test_course_encode_content_links() {
global $CFG;
$encoded = backup_course_task::encode_content_links(
$CFG->wwwroot . '/course/view.php?id=123, ' .
$CFG->wwwroot . '/grade/index.php?id=123, ' .
$CFG->wwwroot . '/grade/report/index.php?id=123, ' .
$CFG->wwwroot . '/badges/view.php?type=2&id=123 and ' .
$CFG->wwwroot . '/user/index.php?id=123.');
$this->assertEquals('$@COURSEVIEWBYID*123@$, $@GRADEINDEXBYID*123@$, ' .
'$@GRADEREPORTINDEXBYID*123@$, $@BADGESVIEWBYID*123@$ and $@USERINDEXVIEWBYID*123@$.', $encoded);
}
}
+5
View File
@@ -73,6 +73,11 @@ abstract class base_moodleform extends moodleform {
*/
function __construct(base_ui_stage $uistage, $action=null, $customdata=null, $method='post', $target='', $attributes=null, $editable=true) {
$this->uistage = $uistage;
$attributes = (array)$attributes;
if (!isset($attributes['enctype'])) {
$attributes['enctype'] = 'application/x-www-form-urlencoded'; // Enforce compatibility with our max_input_vars hack.
}
parent::__construct($action, $customdata, $method, $target, $attributes, $editable);
}
/**
+1 -1
View File
@@ -392,7 +392,7 @@ class core_backup_renderer extends plugin_renderer_base {
}
if (array_key_exists('warnings', $results)) {
foreach ($results['warnings'] as $warning) {
$output .= $this->output->notification($warning, 'notifywarning notifyproblem');
$output .= $this->output->notification($warning, 'notifyproblem');
}
}
return $output.html_writer::end_tag('div');
@@ -697,6 +697,7 @@ class restore_ui_stage_process extends restore_ui_stage {
$html .= html_writer::start_tag('form', array(
'action' => $url->out_omit_querystring(),
'class' => 'backup-restore',
'enctype' => 'application/x-www-form-urlencoded', // Enforce compatibility with our max_input_vars hack.
'method' => 'post'));
foreach ($url->params() as $name => $value) {
$html .= html_writer::empty_tag('input', array(
+2 -2
View File
@@ -17,7 +17,7 @@
/**
* Backup and restore actions to help behat feature files writting.
*
* @package core
* @package core_backup
* @category test
* @copyright 2013 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -35,7 +35,7 @@ use Behat\Gherkin\Node\TableNode as TableNode,
/**
* Backup-related steps definitions.
*
* @package core
* @package core_backup
* @category test
* @copyright 2013 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+1 -1
View File
@@ -106,7 +106,7 @@ if (count($acceptedroles) > 1) {
$pageurl = new moodle_url('/badges/award.php', array('id' => $badgeid));
$issuerrole = new stdClass();
$issuerrole->roleid = $role;
$roleselect = get_string('selectaward', 'badges') . $OUTPUT->single_select(new moodle_url($pageurl), 'role', $select, $role);
$roleselect = get_string('selectaward', 'badges') . $OUTPUT->single_select(new moodle_url($pageurl), 'role', $select, $role, null);
}
} else {
echo $OUTPUT->header();
+1 -1
View File
@@ -35,7 +35,7 @@ $output = $PAGE->get_renderer('core', 'badges');
$badge = new issued_badge($id);
if ($bake && ($badge->recipient == $USER->id)) {
if ($bake && ($badge->recipient->id == $USER->id)) {
$name = str_replace(' ', '_', $badge->issued['badge']['name']) . '.png';
ob_start();
$file = badges_bake($id, $badge->badgeid);
+9 -5
View File
@@ -42,7 +42,14 @@ if (empty($CFG->enablebadges)) {
print_error('badgesdisabled', 'badges');
}
$url = new moodle_url('/badges/mybadges.php');
$PAGE->set_url($url);
if (isguestuser()) {
$PAGE->set_context(context_system::instance());
echo $OUTPUT->header();
echo $OUTPUT->box(get_string('error:guestuseraccess', 'badges'), 'notifyproblem');
echo $OUTPUT->footer();
die();
}
@@ -56,10 +63,10 @@ if ($clearsearch) {
if ($hide) {
require_sesskey();
$DB->set_field('badge_issued', 'visible', 0, array('id' => $hide));
$DB->set_field('badge_issued', 'visible', 0, array('id' => $hide, 'userid' => $USER->id));
} else if ($show) {
require_sesskey();
$DB->set_field('badge_issued', 'visible', 1, array('id' => $show));
$DB->set_field('badge_issued', 'visible', 1, array('id' => $show, 'userid' => $USER->id));
} else if ($download && $hash) {
require_sesskey();
$badge = new badge($download);
@@ -80,9 +87,6 @@ if ($hide) {
$context = context_user::instance($USER->id);
require_capability('moodle/badges:manageownbadges', $context);
$url = new moodle_url('/badges/mybadges.php');
$PAGE->set_url($url);
$PAGE->set_context($context);
$title = get_string('mybadges', 'badges');
+1 -1
View File
@@ -87,7 +87,7 @@ if ($badge->has_manual_award_criteria() && has_capability('moodle/badges:awardba
$sql = "SELECT b.userid, b.dateissued, b.uniquehash, u.firstname, u.lastname
FROM {badge_issued} b INNER JOIN {user} u
ON b.userid = u.id
WHERE b.badgeid = :badgeid
WHERE b.badgeid = :badgeid AND u.deleted = 0
ORDER BY $sortby $sorthow";
$totalcount = $DB->count_records('badge_issued', array('badgeid' => $badge->id));
+16 -7
View File
@@ -279,7 +279,7 @@ class core_badges_renderer extends plugin_renderer_base {
// Outputs issued badge with actions available.
protected function render_issued_badge(issued_badge $ibadge) {
global $USER, $CFG, $DB;
global $USER, $CFG, $DB, $SITE;
$issued = $ibadge->issued;
$userinfo = $ibadge->recipient;
$badge = new badge($ibadge->badgeid);
@@ -316,11 +316,18 @@ class core_badges_renderer extends plugin_renderer_base {
// Recipient information.
$datatable->data[] = array($this->output->heading(get_string('recipientdetails', 'badges'), 3), '');
$datatable->data[] = array(get_string('name'), fullname($userinfo));
if (empty($userinfo->backpackemail)) {
$datatable->data[] = array(get_string('email'), obfuscate_mailto($userinfo->accountemail));
if ($userinfo->deleted) {
$strdata = new stdClass();
$strdata->user = fullname($userinfo);
$strdata->site = format_string($SITE->fullname, true, array('context' => context_system::instance()));
$datatable->data[] = array(get_string('name'), get_string('error:userdeleted', 'badges', $strdata));
} else {
$datatable->data[] = array(get_string('email'), obfuscate_mailto($userinfo->backpackemail));
$datatable->data[] = array(get_string('name'), fullname($userinfo));
if (empty($userinfo->backpackemail)) {
$datatable->data[] = array(get_string('email'), obfuscate_mailto($userinfo->accountemail));
} else {
$datatable->data[] = array(get_string('email'), obfuscate_mailto($userinfo->backpackemail));
}
}
$datatable->data[] = array($this->output->heading(get_string('issuerdetails', 'badges'), 3), '');
@@ -664,7 +671,9 @@ class core_badges_renderer extends plugin_renderer_base {
}
if (has_capability('moodle/badges:viewawarded', $context)) {
$awarded = $DB->count_records('badge_issued', array('badgeid' => $badgeid));
$awarded = $DB->count_records_sql('SELECT COUNT(b.userid)
FROM {badge_issued} b INNER JOIN {user} u ON b.userid = u.id
WHERE b.badgeid = :badgeid AND u.deleted = 0', array('badgeid' => $badgeid));
$row[] = new tabobject('awards',
new moodle_url('/badges/recipients.php', array('id' => $badgeid)),
get_string('bawards', 'badges', $awarded)
@@ -934,7 +943,7 @@ class issued_badge implements renderable {
array('hash' => $hash), IGNORE_MISSING);
if ($rec) {
// Get a recipient from database.
$user = $DB->get_record_sql('SELECT u.id, u.lastname, u.firstname,
$user = $DB->get_record_sql('SELECT u.id, u.lastname, u.firstname, u.deleted,
u.email AS accountemail, b.email AS backpackemail
FROM {user} u LEFT JOIN {badge_backpack} b ON u.id = b.userid
WHERE u.id = :userid', array('userid' => $rec->userid));
+1 -1
View File
@@ -1,4 +1,4 @@
@core @core_badges @_only_local
@core @core_badges @_only_local @_file_upload
Feature: Add badges to the system
In order to give badges to users for their achievements
As an admin
+2 -1
View File
@@ -1,4 +1,4 @@
@core @core_badges @_only_local
@core @core_badges @_only_local @_file_upload
Feature: Award badges
In order to award badges to users for their achievements
As an admin
@@ -236,6 +236,7 @@ Feature: Award badges
And I follow "Home"
And I follow "Course 1"
And I press "Mark as complete: Test assignment name"
And I wait "2" seconds
And I log out
And I log in as "admin"
# We can't wait for cron to happen, so the admin manually triggers it.
-5
View File
@@ -73,11 +73,6 @@ if ($type == BADGE_TYPE_SITE) {
$PAGE->set_context(context_course::instance($course->id));
$PAGE->set_pagelayout('course');
$PAGE->set_heading($title);
// Fix course navigation.
$PAGE->navbar->ignore_active();
$PAGE->navbar->add($course->shortname, new moodle_url('/course/view.php', array('id' => $course->id)));
$PAGE->navbar->add(get_string('coursebadges', 'badges'));
}
$PAGE->set_title($title);
@@ -0,0 +1,276 @@
@block @block_activity_modules
Feature: Block activity modules
In order to overview activity modules in a course
As a manager
I can add activities block in a course or on the frontpage
Background:
Given I log in as "admin"
And I expand "Site administration" node
And I expand "Plugins" node
And I expand "Activity modules" node
And I follow "Manage activities"
And I click on "//a[@title=\"Show\"]" "xpath_element" in the "Feedback" "table_row"
And I click on "//a[@title=\"Show\"]" "xpath_element" in the "Assignment (2.2)" "table_row"
@javascript
Scenario: Add activities block on the frontpage
Given the following "activities" exists:
| activity | name | intro | course | idnumber |
| assign | Frontpage assignment name | Frontpage assignment description | Acceptance test site | assign0 |
| assignment | Frontpage assignment22 name | Frontpage assignment22 description | Acceptance test site | assignment0 |
| data | Frontpage database name | Frontpage database description | Acceptance test site | data0 |
| forum | Frontpage forum name | Frontpage forum description | Acceptance test site | forum0 |
| label | Frontpage label name | Frontpage label description | Acceptance test site | label0 |
| lti | Frontpage lti name | Frontpage lti description | Acceptance test site | lti0 |
| page | Frontpage page name | Frontpage page description | Acceptance test site | page0 |
| quiz | Frontpage quiz name | Frontpage quiz description | Acceptance test site | quiz0 |
| resource | Frontpage resource name | Frontpage resource description | Acceptance test site | resource0 |
# Add activities with missing generators: book, chat, choice, feedback, folder, glossary, imscp, lesson, scorm, survey, url, wiki, workshop
And I am on homepage
When I follow "Turn editing on"
And I add a "IMS content package" to section "1"
And I fill the moodle form with:
| Name | Frontpage imscp name |
| Description | Frontpage imscp description |
And I upload "mod/scorm/tests/packages/singlescobasic.zip" file to "Package file" filepicker
And I press "Save and return to course"
And I add a "Book" to section "1" and I fill the form with:
| Name | Frontpage book name |
| Description | Frontpage book description |
And I add a "Chat" to section "1" and I fill the form with:
| Name | Frontpage chat name |
| Description | Frontpage chat description |
And I add a "Choice" to section "1" and I fill the form with:
| Choice name | Frontpage choice name |
| Description | Frontpage choice description |
| Option 1 | Test choice option |
And I add a "Feedback" to section "0" and I fill the form with:
| Name | Frontpage feedback name |
| Description | Frontpage feedback description |
And I add a "Folder" to section "0" and I fill the form with:
| Name | Frontpage folder name |
| Description | Frontpage folder description |
And I add a "Glossary" to section "1" and I fill the form with:
| Name | Frontpage glossary name |
| Description | Frontpage glossary description |
And I add a "SCORM package" to section "1"
And I fill the moodle form with:
| Name | Frontpage scorm name |
| Description | Frontpage scorm description |
And I upload "mod/scorm/tests/packages/singlescobasic.zip" file to "Package file" filepicker
And I press "Save and return to course"
And I add a "Lesson" to section "1" and I fill the form with:
| Name | Frontpage lesson name |
And I add a "Survey" to section "1" and I fill the form with:
| Name | Frontpage survey name |
| Survey type | ATTLS (20 item version) |
And I add a "URL" to section "1" and I fill the form with:
| Name | Frontpage url name |
| Description | Frontpage url description |
| External URL | http://moodle.org |
And I add a "Wiki" to section "1" and I fill the form with:
| Wiki name | Frontpage wiki name |
| Description | Frontpage wiki description |
| First page name | first page name |
And I add a "Workshop" to section "1" and I fill the form with:
| Workshop name | Frontpage workshop name |
| Description | Frontpage workshop description |
And I add the "Activities" block
And I click on "Assignments" "link" in the "Activities" "block"
Then I should see "Frontpage assignment name"
And I am on homepage
And I click on "Assignments (2.2)" "link" in the "Activities" "block"
And I should see "Frontpage assignment22 name"
And I am on homepage
And I click on "Chats" "link" in the "Activities" "block"
And I should see "Frontpage chat name"
And I am on homepage
And I click on "Choices" "link" in the "Activities" "block"
And I should see "Frontpage choice name"
And I am on homepage
And I click on "Databases" "link" in the "Activities" "block"
And I should see "Frontpage database name"
And I am on homepage
And I click on "Feedback" "link" in the "Activities" "block"
And I should see "Frontpage feedback name"
And I am on homepage
And I click on "Forums" "link" in the "Activities" "block"
And I should see "Frontpage forum name"
And I am on homepage
And I click on "basicltis" "link" in the "Activities" "block"
And I should see "Frontpage lti name"
And I am on homepage
And I click on "Quizzes" "link" in the "Activities" "block"
And I should see "Frontpage quiz name"
And I am on homepage
And I click on "Glossaries" "link" in the "Activities" "block"
And I should see "Frontpage glossary name"
And I am on homepage
And I click on "SCORM packages" "link" in the "Activities" "block"
And I should see "Frontpage scorm name"
And I am on homepage
And I click on "Lessons" "link" in the "Activities" "block"
And I should see "Frontpage lesson name"
And I am on homepage
And I click on "Wikis" "link" in the "Activities" "block"
And I should see "Frontpage wiki name"
And I am on homepage
And I click on "Workshop" "link" in the "Activities" "block"
And I should see "Frontpage workshop name"
And I am on homepage
And I click on "Resources" "link" in the "Activities" "block"
And I should see "Frontpage book name"
And I should see "Frontpage page name"
And I should see "Frontpage resource name"
And I should see "Frontpage imscp name"
And I should see "Frontpage folder name"
And I should see "Frontpage url name"
@javascript
Scenario: Add activities block in a course
Given the following "courses" exists:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "activities" exists:
| activity | name | intro | course | idnumber |
| assign | Test assignment name | Test assignment description | C1 | assign1 |
| assignment | Test assignment22 name | Test assignment22 description | C1 | assignment1 |
| data | Test database name | Test database description | C1 | data1 |
| forum | Test forum name | Test forum description | C1 | forum1 |
| label | Test label name | Test label description | C1 | label1 |
| lti | Test lti name | Test lti description | C1 | lti1 |
| page | Test page name | Test page description | C1 | page1 |
| quiz | Test quiz name | Test quiz description | C1 | quiz1 |
| resource | Test resource name | Test resource description | C1 | resource1 |
# Add activities with missing generators: book, chat, choice, feedback, folder, glossary, imscp, lesson, scorm, survey, url, wiki, workshop
And I am on homepage
When I follow "Courses"
And I follow "Course 1"
And I turn editing mode on
And I add a "IMS content package" to section "0"
And I fill the moodle form with:
| Name | Test imscp name |
| Description | Test imscp description |
And I upload "mod/scorm/tests/packages/singlescobasic.zip" file to "Package file" filepicker
And I press "Save and return to course"
And I add a "Book" to section "1" and I fill the form with:
| Name | Test book name |
| Description | Test book description |
And I add a "Chat" to section "1" and I fill the form with:
| Name | Test chat name |
| Description | Test chat description |
And I add a "Choice" to section "1" and I fill the form with:
| Choice name | Test choice name |
| Description | Test choice description |
| Option 1 | Test choice option |
And I add a "Feedback" to section "1" and I fill the form with:
| Name | Test feedback name |
| Description | Test feedback description |
And I add a "Folder" to section "1" and I fill the form with:
| Name | Test folder name |
| Description | Test folder description |
And I add a "Glossary" to section "2" and I fill the form with:
| Name | Test glossary name |
| Description | Test glossary description |
And I add a "SCORM package" to section "0"
And I fill the moodle form with:
| Name | Test scorm name |
| Description | Test scorm description |
And I upload "mod/scorm/tests/packages/singlescobasic.zip" file to "Package file" filepicker
And I press "Save and return to course"
And I add a "Lesson" to section "0" and I fill the form with:
| Name | Test lesson name |
And I add a "Survey" to section "0" and I fill the form with:
| Name | Test survey name |
| Survey type | ATTLS (20 item version) |
And I add a "URL" to section "0" and I fill the form with:
| Name | Test url name |
| Description | Test url description |
| External URL | http://moodle.org |
And I add a "Wiki" to section "0" and I fill the form with:
| Wiki name | Test wiki name |
| Description | Test wiki description |
| First page name | first page name |
And I add a "Workshop" to section "0" and I fill the form with:
| Workshop name | Test workshop name |
| Description | Test workshop description |
And I add the "Activities" block
And I click on "Assignments" "link" in the "Activities" "block"
Then I should see "Test assignment name"
And I follow "Course 1"
And I click on "Assignments (2.2)" "link" in the "Activities" "block"
And I should see "Test assignment22 name"
And I follow "Course 1"
And I click on "Chats" "link" in the "Activities" "block"
And I should see "Test chat name"
And I follow "Course 1"
And I click on "Choices" "link" in the "Activities" "block"
And I should see "Test choice name"
And I follow "Course 1"
And I click on "Databases" "link" in the "Activities" "block"
And I should see "Test database name"
And I follow "Course 1"
And I click on "Feedback" "link" in the "Activities" "block"
And I should see "Test feedback name"
And I follow "Course 1"
And I click on "Forums" "link" in the "Activities" "block"
And I should see "Test forum name"
And I follow "Course 1"
And I click on "basicltis" "link" in the "Activities" "block"
And I should see "Test lti name"
And I follow "Course 1"
And I click on "Quizzes" "link" in the "Activities" "block"
And I should see "Test quiz name"
And I follow "Course 1"
And I click on "Glossaries" "link" in the "Activities" "block"
And I should see "Test glossary name"
And I follow "Course 1"
And I click on "SCORM packages" "link" in the "Activities" "block"
And I should see "Test scorm name"
And I follow "Course 1"
And I click on "Lessons" "link" in the "Activities" "block"
And I should see "Test lesson name"
And I follow "Course 1"
And I click on "Wikis" "link" in the "Activities" "block"
And I should see "Test wiki name"
And I follow "Course 1"
And I click on "Workshop" "link" in the "Activities" "block"
And I should see "Test workshop name"
And I follow "Course 1"
And I click on "Resources" "link" in the "Activities" "block"
And I should see "Test book name"
And I should see "Test page name"
And I should see "Test resource name"
And I should see "Test imscp name"
And I should see "Test folder name"
And I should see "Test url name"
+1
View File
@@ -83,6 +83,7 @@ class block_blog_recent extends block_base {
$this->content = new stdClass();
$this->content->footer = '';
$this->content->text = '';
$context = $this->page->context;
@@ -17,7 +17,7 @@
/**
* Commenting system steps definitions.
*
* @package core_comment
* @package block_comments
* @category test
* @copyright 2013 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -33,7 +33,7 @@ use Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException,
/**
* Steps definitions to deal with the commenting system
*
* @package core_comment
* @package block_comments
* @category test
* @copyright 2013 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+9 -3
View File
@@ -35,7 +35,14 @@ class block_course_list extends block_list {
if (empty($CFG->disablemycourses) and isloggedin() and !isguestuser() and
!(has_capability('moodle/course:update', context_system::instance()) and $adminseesall)) { // Just print My Courses
if ($courses = enrol_get_my_courses(NULL, 'visible DESC, fullname ASC')) {
// As this is producing navigation sort order should default to $CFG->navsortmycoursessort instead
// of using the default.
if (!empty($CFG->navsortmycoursessort)) {
$sortorder = 'visible DESC, ' . $CFG->navsortmycoursessort . ' ASC';
} else {
$sortorder = 'visible DESC, sortorder ASC';
}
if ($courses = enrol_get_my_courses(NULL, $sortorder)) {
foreach ($courses as $course) {
$coursecontext = context_course::instance($course->id);
$linkcss = $course->visible ? "" : " class=\"dimmed\" ";
@@ -121,8 +128,7 @@ class block_course_list extends block_list {
$this->content->items[] = get_string('remotecourses','mnet');
$this->content->icons[] = '';
foreach ($courses as $course) {
$coursecontext = context_course::instance($course->id);
$this->content->items[]="<a title=\"" . format_string($course->shortname, true, array('context' => $coursecontext)) . "\" ".
$this->content->items[]="<a title=\"" . format_string($course->shortname, true) . "\" ".
"href=\"{$CFG->wwwroot}/auth/mnet/jump.php?hostid={$course->hostid}&amp;wantsurl=/course/view.php?id={$course->remoteid}\">"
.$icon. format_string($course->fullname) . "</a>";
}
-2
View File
@@ -1,2 +0,0 @@
.block.block_html .content {padding:0;}
.block.block_html .content .no-overflow {padding:4px;}
+9
View File
@@ -46,5 +46,14 @@ class block_mentees extends block_base {
return $this->content;
}
/**
* Returns true if the block can be docked.
* The mentees block can only be docked if it has a non-empty title.
* @return bool
*/
public function instance_can_be_docked() {
return parent::instance_can_be_docked() && isset($this->config->title) && !empty($this->config->title);
}
}
@@ -345,7 +345,7 @@ BRANCH.prototype = {
// Prepare the icon, should be an object representing a pix_icon
var branchicon = false;
var icon = this.get('icon');
if (icon && (!isbranch || this.get('type') == NODETYPE.ACTIVITY)) {
if (icon && (!isbranch || this.get('type') === NODETYPE.ACTIVITY)) {
branchicon = Y.Node.create('<img alt="" />');
branchicon.setAttribute('src', M.util.image_url(icon.pix, icon.component));
branchli.addClass('item_with_icon');
@@ -478,14 +478,14 @@ BRANCH.prototype = {
if (object.children && object.children.length > 0) {
var coursecount = 0;
for (var i in object.children) {
if (typeof(object.children[i])==='object') {
if (object.children[i].type == NODETYPE.COURSE) {
if (typeof(object.children[i]) ==='object') {
if (object.children[i].type === NODETYPE.COURSE) {
coursecount++;
}
this.addChild(object.children[i]);
}
}
if ((this.get('type') == NODETYPE.CATEGORY || this.get('type') == NODETYPE.ROOTNODE || this.get('type') == NODETYPE.MYCATEGORY)
if ((this.get('type') === NODETYPE.CATEGORY || this.get('type') === NODETYPE.ROOTNODE || this.get('type') === NODETYPE.MYCATEGORY)
&& coursecount >= M.block_navigation.courselimit) {
this.addViewAllCoursesChild(this);
}
@@ -511,14 +511,14 @@ BRANCH.prototype = {
var count = 0, i, children = branch.get('children');
for (i in children) {
// Add each branch to the tree
if (children[i].type == NODETYPE.COURSE) {
if (children[i].type === NODETYPE.COURSE) {
count++;
}
if (typeof(children[i]) === 'object') {
branch.addChild(children[i]);
}
}
if ((branch.get('type') == NODETYPE.CATEGORY || branch.get('type') == NODETYPE.MYCATEGORY)
if ((branch.get('type') === NODETYPE.CATEGORY || branch.get('type') === NODETYPE.MYCATEGORY)
&& count >= M.block_navigation.courselimit) {
this.addViewAllCoursesChild(branch);
}
@@ -531,7 +531,7 @@ BRANCH.prototype = {
*/
addViewAllCoursesChild: function(branch) {
var url = null;
if (branch.get('type') == NODETYPE.ROOTNODE) {
if (branch.get('type') === NODETYPE.ROOTNODE) {
if (branch.get('key') === 'mycourses') {
url = M.cfg.wwwroot + '/my';
} else {
File diff suppressed because one or more lines are too long
@@ -345,7 +345,7 @@ BRANCH.prototype = {
// Prepare the icon, should be an object representing a pix_icon
var branchicon = false;
var icon = this.get('icon');
if (icon && (!isbranch || this.get('type') == NODETYPE.ACTIVITY)) {
if (icon && (!isbranch || this.get('type') === NODETYPE.ACTIVITY)) {
branchicon = Y.Node.create('<img alt="" />');
branchicon.setAttribute('src', M.util.image_url(icon.pix, icon.component));
branchli.addClass('item_with_icon');
@@ -478,14 +478,14 @@ BRANCH.prototype = {
if (object.children && object.children.length > 0) {
var coursecount = 0;
for (var i in object.children) {
if (typeof(object.children[i])==='object') {
if (object.children[i].type == NODETYPE.COURSE) {
if (typeof(object.children[i]) ==='object') {
if (object.children[i].type === NODETYPE.COURSE) {
coursecount++;
}
this.addChild(object.children[i]);
}
}
if ((this.get('type') == NODETYPE.CATEGORY || this.get('type') == NODETYPE.ROOTNODE || this.get('type') == NODETYPE.MYCATEGORY)
if ((this.get('type') === NODETYPE.CATEGORY || this.get('type') === NODETYPE.ROOTNODE || this.get('type') === NODETYPE.MYCATEGORY)
&& coursecount >= M.block_navigation.courselimit) {
this.addViewAllCoursesChild(this);
}
@@ -511,14 +511,14 @@ BRANCH.prototype = {
var count = 0, i, children = branch.get('children');
for (i in children) {
// Add each branch to the tree
if (children[i].type == NODETYPE.COURSE) {
if (children[i].type === NODETYPE.COURSE) {
count++;
}
if (typeof(children[i]) === 'object') {
branch.addChild(children[i]);
}
}
if ((branch.get('type') == NODETYPE.CATEGORY || branch.get('type') == NODETYPE.MYCATEGORY)
if ((branch.get('type') === NODETYPE.CATEGORY || branch.get('type') === NODETYPE.MYCATEGORY)
&& count >= M.block_navigation.courselimit) {
this.addViewAllCoursesChild(branch);
}
@@ -531,7 +531,7 @@ BRANCH.prototype = {
*/
addViewAllCoursesChild: function(branch) {
var url = null;
if (branch.get('type') == NODETYPE.ROOTNODE) {
if (branch.get('type') === NODETYPE.ROOTNODE) {
if (branch.get('key') === 'mycourses') {
url = M.cfg.wwwroot + '/my';
} else {
+7 -7
View File
@@ -343,7 +343,7 @@ BRANCH.prototype = {
// Prepare the icon, should be an object representing a pix_icon
var branchicon = false;
var icon = this.get('icon');
if (icon && (!isbranch || this.get('type') == NODETYPE.ACTIVITY)) {
if (icon && (!isbranch || this.get('type') === NODETYPE.ACTIVITY)) {
branchicon = Y.Node.create('<img alt="" />');
branchicon.setAttribute('src', M.util.image_url(icon.pix, icon.component));
branchli.addClass('item_with_icon');
@@ -476,14 +476,14 @@ BRANCH.prototype = {
if (object.children && object.children.length > 0) {
var coursecount = 0;
for (var i in object.children) {
if (typeof(object.children[i])==='object') {
if (object.children[i].type == NODETYPE.COURSE) {
if (typeof(object.children[i]) ==='object') {
if (object.children[i].type === NODETYPE.COURSE) {
coursecount++;
}
this.addChild(object.children[i]);
}
}
if ((this.get('type') == NODETYPE.CATEGORY || this.get('type') == NODETYPE.ROOTNODE || this.get('type') == NODETYPE.MYCATEGORY)
if ((this.get('type') === NODETYPE.CATEGORY || this.get('type') === NODETYPE.ROOTNODE || this.get('type') === NODETYPE.MYCATEGORY)
&& coursecount >= M.block_navigation.courselimit) {
this.addViewAllCoursesChild(this);
}
@@ -509,14 +509,14 @@ BRANCH.prototype = {
var count = 0, i, children = branch.get('children');
for (i in children) {
// Add each branch to the tree
if (children[i].type == NODETYPE.COURSE) {
if (children[i].type === NODETYPE.COURSE) {
count++;
}
if (typeof(children[i]) === 'object') {
branch.addChild(children[i]);
}
}
if ((branch.get('type') == NODETYPE.CATEGORY || branch.get('type') == NODETYPE.MYCATEGORY)
if ((branch.get('type') === NODETYPE.CATEGORY || branch.get('type') === NODETYPE.MYCATEGORY)
&& count >= M.block_navigation.courselimit) {
this.addViewAllCoursesChild(branch);
}
@@ -529,7 +529,7 @@ BRANCH.prototype = {
*/
addViewAllCoursesChild: function(branch) {
var url = null;
if (branch.get('type') == NODETYPE.ROOTNODE) {
if (branch.get('type') === NODETYPE.ROOTNODE) {
if (branch.get('key') === 'mycourses') {
url = M.cfg.wwwroot + '/my';
} else {
+4 -39
View File
@@ -16,7 +16,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Manage files in folder in private area - to be replaced by something better hopefully....
* Manage files in folder in private area.
*
* This page is not used and now redirects to the page to manage the private files.
*
* @package block_private_files
* @copyright 2010 Petr Skoda (http://skodak.org)
@@ -24,42 +26,5 @@
*/
require('../../config.php');
require_once("$CFG->dirroot/blocks/private_files/edit_form.php");
require_once("$CFG->dirroot/repository/lib.php");
require_login();
if (isguestuser()) {
die();
}
//TODO: add capability check here!
$context = context_user::instance($USER->id);
$title = get_string('privatefiles', 'block_private_files');
$struser = get_string('user');
$PAGE->set_url('/blocks/private_files/edit.php');
$PAGE->set_context($context);
$PAGE->set_title($title);
$PAGE->set_heading($title);
$PAGE->set_pagelayout('mydashboard');
$PAGE->set_pagetype('user-private-files');
$data = new stdClass();
$options = array('subdirs'=>1, 'maxbytes'=>$CFG->userquota, 'maxfiles'=>-1, 'accepted_types'=>'*');
file_prepare_standard_filemanager($data, 'files', $options, $context, 'user', 'private', 0);
$mform = new block_private_files_form(null, array('data'=>$data, 'options'=>$options));
if ($mform->is_cancelled()) {
redirect(new moodle_url('/my/'));
} else if ($formdata = $mform->get_data()) {
$formdata = file_postupdate_standard_filemanager($formdata, 'files', $options, $context, 'user', 'private', 0);
redirect(new moodle_url('/my/'));
}
echo $OUTPUT->header();
echo $OUTPUT->box_start('generalbox');
$mform->display();
echo $OUTPUT->box_end();
echo $OUTPUT->footer();
redirect(new moodle_url('/user/files.php'));
+5
View File
@@ -0,0 +1,5 @@
/* Rule so that the table tree view works with word-wrap: break-word. */
.block_private_files .content table {
table-layout: fixed;
width: 100%;
}
+3 -3
View File
@@ -249,13 +249,13 @@
if($this->config->display_description && !empty($description)){
$description = break_up_long_words($description, 30);
$formatoptions = new stdClass();
$formatoptions->para = false;
$r.= html_writer::start_tag('div',array('class'=>'description'));
$r.= format_text($description, FORMAT_HTML, $formatoptions, $this->page->course->id);
$description = format_text($description, FORMAT_HTML, $formatoptions, $this->page->course->id);
$description = break_up_long_words($description, 30);
$r.= $description;
$r.= html_writer::end_tag('div');
}
$r.= html_writer::end_tag('li');
+1 -1
View File
@@ -27,4 +27,4 @@
$string['enabledock'] = 'Allow the user to dock this block';
$string['pluginname'] = 'Administration';
$string['settings:addinstance'] = 'Add a new administration block';
$string['settings:myaddinstance'] = 'Add a new settings block to My home';
$string['settings:myaddinstance'] = 'Add a new administration block to My home';
+1
View File
@@ -81,6 +81,7 @@ class block_tags extends block_base {
}
$this->content = new stdClass;
$this->content->text = '';
$this->content->footer = '';
// Get a list of tags.
+2 -2
View File
@@ -17,7 +17,7 @@
/**
* Steps definitions related with blocks.
*
* @package core
* @package core_block
* @category test
* @copyright 2012 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -32,7 +32,7 @@ use Behat\Behat\Context\Step\Given as Given;
/**
* Blocks management steps definitions.
*
* @package core
* @package core_block
* @category test
* @copyright 2012 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -32,4 +32,4 @@ Feature: Add and configure blocks throughout the site
And I press "Save changes"
And I follow "Course 1"
# The first block matching the pattern should be top-left block
And I should see "Comments" in the "//*[@id='region-pre']/descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' block ')]" "xpath_element"
And I should see "Comments" in the "//*[@id='region-pre' or @id='block-region-side-pre']/descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' block ')]" "xpath_element"
+1 -1
View File
@@ -77,4 +77,4 @@ Feature: Block appearances
| Visible | Yes |
| Region | Right |
And I press "Save changes"
And I should see "Comments" in the "#region-post" "css_element"
And I should see "Comments" in the "//*[@id='region-post' or @id='block-region-side-post']" "xpath_element"
+1 -1
View File
@@ -40,7 +40,7 @@ if (empty($CFG->enableblogs)) {
//correct tagid if a text tag is provided as a param
if (!empty($tag)) {
if ($tagrec = $DB->get_record_sql("SELECT * FROM {tag} WHERE ". $DB->sql_like('name', '?', false), array("%$tag%"))) {
if ($tagrec = $DB->get_record('tag', array('name' => $tag))) {
$tagid = $tagrec->id;
} else {
unset($tagid);
+6 -2
View File
@@ -880,8 +880,12 @@ function blog_get_headers($courseid=null, $groupid=null, $userid=null, $tagid=nu
$tagrec = $DB->get_record('tag', array('id'=>$tagid));
$PAGE->navbar->add($tagrec->name, $blogurl);
} elseif (!empty($tag)) {
$blogurl->param('tag', $tag);
$PAGE->navbar->add(get_string('tagparam', 'blog', $tag), $blogurl);
if ($tagrec = $DB->get_record('tag', array('name' => $tag))) {
$tagid = $tagrec->id;
$headers['filters']['tag'] = $tagid;
$blogurl->param('tag', $tag);
$PAGE->navbar->add(get_string('tagparam', 'blog', $tag), $blogurl);
}
}
// Append Search info
+1
View File
@@ -282,6 +282,7 @@ if (!empty($action) && confirm_sesskey()) {
$PAGE->set_title($title);
$PAGE->set_heading($SITE->fullname);
/* @var core_cache_renderer $renderer */
$renderer = $PAGE->get_renderer('core_cache');
echo $renderer->header();
+43 -2
View File
@@ -281,7 +281,7 @@ class cache_definition {
* An array of identifiers provided to this cache when it was initialised.
* @var array
*/
protected $identifiers = array();
protected $identifiers = null;
/**
* Key prefix for use with single key cache stores
@@ -654,6 +654,9 @@ class cache_definition {
* @return array
*/
public function get_identifiers() {
if (!isset($this->identifiers)) {
return array();
}
return $this->identifiers;
}
@@ -766,11 +769,22 @@ class cache_definition {
* @throws coding_exception
*/
public function set_identifiers(array $identifiers = array()) {
// If we are setting the exact same identifiers then just return as nothing really changed.
// We don't care about order as cache::make will use the same definition order all the time.
if ($identifiers === $this->identifiers) {
return;
}
foreach ($this->requireidentifiers as $identifier) {
if (!array_key_exists($identifier, $identifiers)) {
throw new coding_exception('Identifier required for cache has not been provided: '.$identifier);
}
}
if ($this->identifiers === null) {
// Initialize identifiers if they have not been.
$this->identifiers = array();
}
foreach ($identifiers as $name => $value) {
$this->identifiers[$name] = (string)$value;
}
@@ -892,7 +906,7 @@ class cache_definition {
'area' => $this->area,
'siteidentifier' => $this->get_cache_identifier()
);
if (!empty($this->identifiers)) {
if (isset($this->identifiers) && !empty($this->identifiers)) {
$identifiers = array();
foreach ($this->identifiers as $key => $value) {
$identifiers[] = htmlentities($key, ENT_QUOTES, 'UTF-8').'='.htmlentities($value, ENT_QUOTES, 'UTF-8');
@@ -962,4 +976,31 @@ class cache_definition {
public function has_required_identifiers() {
return (count($this->requireidentifiers) > 0);
}
/**
* Returns the possible sharing options that can be used with this defintion.
*
* @return int
*/
public function get_sharing_options() {
return $this->sharingoptions;
}
/**
* Returns the user entered sharing key for this definition.
*
* @return string
*/
public function get_user_input_sharing_key() {
return $this->userinputsharingkey;
}
/**
* Returns the user selected sharing option for this definition.
*
* @return int
*/
public function get_selected_sharing_option() {
return $this->selectedsharingoption;
}
}
+9 -8
View File
@@ -235,14 +235,14 @@ class cache_factory {
*/
public function create_cache(cache_definition $definition) {
$class = $definition->get_cache_class();
if ($this->is_initialising()) {
// Do nothing we just want the dummy store.
$stores = array();
} else {
$stores = cache_helper::get_cache_stores($definition);
$stores = cache_helper::get_stores_suitable_for_definition($definition);
foreach ($stores as $key => $store) {
if (!$store::are_requirements_met()) {
unset($stores[$key]);
}
}
if (count($stores) === 0) {
// Hmm no stores, better provide a dummy store to mimick functionality. The dev will be none the wiser.
// Hmm still no stores, better provide a dummy store to mimic functionality. The dev will be none the wiser.
$stores[] = $this->create_dummy_store($definition);
}
$loader = null;
@@ -258,7 +258,7 @@ class cache_factory {
/**
* Creates a store instance given its name and configuration.
*
* If the store has already been instantiated then the original objetc will be returned. (reused)
* If the store has already been instantiated then the original object will be returned. (reused)
*
* @param string $name The name of the store (must be unique remember)
* @param array $details
@@ -272,8 +272,9 @@ class cache_factory {
$store = new $class($details['name'], $details['configuration']);
$this->stores[$name] = $store;
}
/* @var cache_store $store */
$store = $this->stores[$name];
if (!$store->is_ready() || !$store->is_supported_mode($definition->get_mode())) {
if (!$store::are_requirements_met() || !$store->is_ready() || !$store->is_supported_mode($definition->get_mode())) {
return false;
}
// We always create a clone of the original store.
+70 -8
View File
@@ -143,7 +143,7 @@ class cache_helper {
*
* @param array $stores
* @param cache_definition $definition
* @return array
* @return cache_store[]
*/
protected static function initialise_cachestore_instances(array $stores, cache_definition $definition) {
$return = array();
@@ -382,34 +382,40 @@ class cache_helper {
/**
* Record a cache hit in the stats for the given store and definition.
*
* @internal
* @param string $store
* @param string $definition
* @param int $hits The number of hits to record (by default 1)
*/
public static function record_cache_hit($store, $definition) {
public static function record_cache_hit($store, $definition, $hits = 1) {
self::ensure_ready_for_stats($store, $definition);
self::$stats[$definition][$store]['hits']++;
self::$stats[$definition][$store]['hits'] += $hits;
}
/**
* Record a cache miss in the stats for the given store and definition.
*
* @internal
* @param string $store
* @param string $definition
* @param int $misses The number of misses to record (by default 1)
*/
public static function record_cache_miss($store, $definition) {
public static function record_cache_miss($store, $definition, $misses = 1) {
self::ensure_ready_for_stats($store, $definition);
self::$stats[$definition][$store]['misses']++;
self::$stats[$definition][$store]['misses'] += $misses;
}
/**
* Record a cache set in the stats for the given store and definition.
*
* @internal
* @param string $store
* @param string $definition
* @param int $sets The number of sets to record (by default 1)
*/
public static function record_cache_set($store, $definition) {
public static function record_cache_set($store, $definition, $sets = 1) {
self::ensure_ready_for_stats($store, $definition);
self::$stats[$definition][$store]['sets']++;
self::$stats[$definition][$store]['sets'] += $sets;
}
/**
@@ -462,8 +468,9 @@ class cache_helper {
$class = $store['class'];
// Found the store: is it ready?
/* @var cache_store $instance */
$instance = new $class($store['name'], $store['configuration']);
if (!$instance->is_ready()) {
if (!$instance::are_requirements_met() || !$instance->is_ready()) {
unset($instance);
return false;
}
@@ -672,4 +679,59 @@ class cache_helper {
}
}
}
/**
* Returns an array of stores that would meet the requirements for every definition.
*
* These stores would be 100% suitable to map as defaults for cache modes.
*
* @return array[] An array of stores, keys are the store names.
*/
public static function get_stores_suitable_for_mode_default() {
$factory = cache_factory::instance();
$config = $factory->create_config_instance();
$requirements = 0;
foreach ($config->get_definitions() as $definition) {
$definition = cache_definition::load($definition['component'].'/'.$definition['area'], $definition);
$requirements = $requirements | $definition->get_requirements_bin();
}
$stores = array();
foreach ($config->get_all_stores() as $name => $store) {
if (!empty($store['features']) && ($store['features'] & $requirements)) {
$stores[$name] = $store;
}
}
return $stores;
}
/**
* Returns stores suitable for use with a given definition.
*
* @param cache_definition $definition
* @return cache_store[]
*/
public static function get_stores_suitable_for_definition(cache_definition $definition) {
$factory = cache_factory::instance();
$stores = array();
if ($factory->is_initialising() || $factory->stores_disabled()) {
// No suitable stores here.
return $stores;
} else {
$stores = self::get_cache_stores($definition);
if (count($stores) === 0) {
// No suitable stores we found for the definition. We need to come up with a sensible default.
// If this has happened we can be sure that the user has mapped custom stores to either the
// mode of the definition. The first alternative to try is the system default for the mode.
// e.g. the default file store instance for application definitions.
$config = $factory->create_config_instance();
foreach ($config->get_stores($definition->get_mode()) as $name => $details) {
if (!empty($details['default'])) {
$stores[] = $factory->create_store_from_config($name, $details, $definition);
break;
}
}
}
}
return $stores;
}
}
+36 -8
View File
@@ -463,6 +463,20 @@ class cache implements cache_loader {
}
}
if ($this->perfdebug) {
$hits = 0;
$misses = 0;
foreach ($fullresult as $value) {
if ($value === false) {
$misses++;
} else {
$hits++;
}
}
cache_helper::record_cache_hit($this->storetype, $this->definition->get_id(), $hits);
cache_helper::record_cache_miss($this->storetype, $this->definition->get_id(), $misses);
}
// Return the result. Phew!
return $fullresult;
}
@@ -633,10 +647,11 @@ class cache implements cache_loader {
$this->set_in_persist_cache($data[$key]['key'], $value);
}
}
if ($this->perfdebug) {
cache_helper::record_cache_set($this->storetype, $this->definition->get_id());
$successfullyset = $this->store->set_many($data);
if ($this->perfdebug && $successfullyset) {
cache_helper::record_cache_set($this->storetype, $this->definition->get_id(), $successfullyset);
}
return $this->store->set_many($data);
return $successfullyset;
}
/**
@@ -1662,7 +1677,7 @@ class cache_session extends cache {
* Purges the session cache of all data belonging to the current user.
*/
public function purge_current_user() {
$keys = $this->get_store()->find_all($this->get_key_prefix());
$keys = $this->get_store()->find_by_prefix($this->get_key_prefix());
$this->get_store()->delete_many($keys);
}
@@ -1872,7 +1887,19 @@ class cache_session extends cache {
if ($hasmissingkeys && $strictness === MUST_EXIST) {
throw new coding_exception('Requested key did not exist in any cache stores and could not be loaded.');
}
if ($this->perfdebug) {
$hits = 0;
$misses = 0;
foreach ($return as $value) {
if ($value === false) {
$misses++;
} else {
$hits++;
}
}
cache_helper::record_cache_hit($this->storetype, $this->get_definition()->get_id(), $hits);
cache_helper::record_cache_miss($this->storetype, $this->get_definition()->get_id(), $misses);
}
return $return;
}
@@ -1946,10 +1973,11 @@ class cache_session extends cache {
'value' => $value
);
}
if ($this->perfdebug) {
cache_helper::record_cache_set($this->storetype, $definitionid);
$successfullyset = $this->get_store()->set_many($data);
if ($this->perfdebug && $successfullyset) {
cache_helper::record_cache_set($this->storetype, $definitionid, $successfullyset);
}
return $this->get_store()->set_many($data);
return $successfullyset;
}
/**
+23 -44
View File
@@ -775,63 +775,36 @@ abstract class cache_administration_helper extends cache_helper {
* @return array
*/
public static function get_definition_summaries() {
$instance = cache_config::instance();
$definitions = $instance->get_definitions();
$factory = cache_factory::instance();
$config = $factory->create_config_instance();
$storenames = array();
foreach ($instance->get_all_stores() as $key => $store) {
foreach ($config->get_all_stores() as $key => $store) {
if (!empty($store['default'])) {
$storenames[$key] = new lang_string('store_'.$key, 'cache');
}
}
$modemappings = array();
foreach ($instance->get_mode_mappings() as $mapping) {
$mode = $mapping['mode'];
if (!array_key_exists($mode, $modemappings)) {
$modemappings[$mode] = array();
}
if (array_key_exists($mapping['store'], $storenames)) {
$modemappings[$mode][] = $storenames[$mapping['store']];
} else {
$modemappings[$mode][] = $mapping['store'];
$storenames[$store['name']] = $store['name'];
}
}
$definitionmappings = array();
foreach ($instance->get_definition_mappings() as $mapping) {
$definition = $mapping['definition'];
if (!array_key_exists($definition, $definitionmappings)) {
$definitionmappings[$definition] = array();
}
if (array_key_exists($mapping['store'], $storenames)) {
$definitionmappings[$definition][] = $storenames[$mapping['store']];
} else {
$definitionmappings[$definition][] = $mapping['store'];
}
/* @var cache_definition[] $definitions */
$definitions = array();
foreach ($config->get_definitions() as $key => $definition) {
$definitions[$key] = cache_definition::load($definition['component'].'/'.$definition['area'], $definition);
}
$return = array();
foreach ($definitions as $id => $definition) {
$mappings = array();
if (array_key_exists($id, $definitionmappings)) {
$mappings = $definitionmappings[$id];
} else if (empty($definition['mappingsonly'])) {
$mappings = $modemappings[$definition['mode']];
foreach (cache_helper::get_stores_suitable_for_definition($definition) as $store) {
$mappings[] = $storenames[$store->my_name()];
}
$return[$id] = array(
'id' => $id,
'name' => cache_helper::get_definition_name($definition),
'mode' => $definition['mode'],
'component' => $definition['component'],
'area' => $definition['area'],
'name' => $definition->get_name(),
'mode' => $definition->get_mode(),
'component' => $definition->get_component(),
'area' => $definition->get_area(),
'mappings' => $mappings,
'sharingoptions' => self::get_definition_sharing_options($definition['sharingoptions'], false),
'selectedsharingoption' => self::get_definition_sharing_options($definition['selectedsharingoption'], true),
'userinputsharingkey' => $definition['userinputsharingkey']
'sharingoptions' => self::get_definition_sharing_options($definition->get_sharing_options(), false),
'selectedsharingoption' => self::get_definition_sharing_options($definition->get_selected_sharing_option(), true),
'userinputsharingkey' => $definition->get_user_input_sharing_key()
);
}
return $return;
@@ -1123,7 +1096,10 @@ abstract class cache_administration_helper extends cache_helper {
* @return array An array containing sub-arrays, one for each mode.
*/
public static function get_default_mode_stores() {
global $OUTPUT;
$instance = cache_config::instance();
$adequatestores = cache_helper::get_stores_suitable_for_mode_default();
$icon = new pix_icon('i/warning', new lang_string('inadequatestoreformapping', 'cache'));
$storenames = array();
foreach ($instance->get_all_stores() as $key => $store) {
if (!empty($store['default'])) {
@@ -1146,6 +1122,9 @@ abstract class cache_administration_helper extends cache_helper {
} else {
$modemappings[$mode][$mapping['store']] = $mapping['store'];
}
if (!array_key_exists($mapping['store'], $adequatestores)) {
$modemappings[$mode][$mapping['store']] = $modemappings[$mode][$mapping['store']].' '.$OUTPUT->render($icon);
}
}
return $modemappings;
}
+8 -3
View File
@@ -131,7 +131,7 @@ class cachestore_memcache extends cache_store implements cache_is_configurable {
$this->connection = new Memcache;
foreach ($this->servers as $server) {
$this->connection->addServer($server[0], $server[1], true, $server[2]);
$this->connection->addServer($server[0], (int) $server[1], true, (int) $server[2]);
}
// Test the connection to the pool of servers.
$this->isready = @$this->connection->set($this->parse_key('ping'), 'ping', MEMCACHE_COMPRESSED, 1);
@@ -216,7 +216,7 @@ class cachestore_memcache extends cache_store implements cache_is_configurable {
* @return int
*/
public static function get_supported_modes(array $configuration = array()) {
return self::MODE_APPLICATION + self::MODE_SESSION;
return self::MODE_APPLICATION;
}
/**
@@ -350,7 +350,12 @@ class cachestore_memcache extends cache_store implements cache_is_configurable {
$lines = explode("\n", $data->servers);
$servers = array();
foreach ($lines as $line) {
$line = trim($line, ':');
// Trim surrounding colons and default whitespace.
$line = trim(trim($line), ":");
// Skip blank lines.
if ($line === '') {
continue;
}
$servers[] = explode(':', $line, 3);
}
return array(
+7 -2
View File
@@ -224,7 +224,7 @@ class cachestore_memcached extends cache_store implements cache_is_configurable
* @return int
*/
public static function get_supported_modes(array $configuration = array()) {
return self::MODE_APPLICATION + self::MODE_SESSION;
return self::MODE_APPLICATION;
}
/**
@@ -374,7 +374,12 @@ class cachestore_memcached extends cache_store implements cache_is_configurable
$lines = explode("\n", $data->servers);
$servers = array();
foreach ($lines as $line) {
$line = trim($line, ':');
// Trim surrounding colons and default whitespace.
$line = trim(trim($line), ":");
// Skip blank lines.
if ($line === '') {
continue;
}
$servers[] = explode(':', $line, 3);
}
return array(
+1 -1
View File
@@ -175,7 +175,7 @@ class cachestore_mongodb extends cache_store implements cache_is_configurable {
* @return int
*/
public static function get_supported_modes(array $configuration = array()) {
return self::MODE_APPLICATION + self::MODE_SESSION;
return self::MODE_APPLICATION;
}
/**
+9 -5
View File
@@ -292,6 +292,7 @@ class core_calendar_renderer extends plugin_renderer_base {
global $CFG;
$event = calendar_add_event_metadata($event);
$context = $event->context;
$anchor = html_writer::tag('a', '', array('name'=>'event_'.$event->id));
@@ -314,7 +315,7 @@ class core_calendar_renderer extends plugin_renderer_base {
if (!empty($event->referer)) {
$table->data[0]->cells[1]->text .= html_writer::tag('div', $event->referer, array('class'=>'referer'));
} else {
$table->data[0]->cells[1]->text .= html_writer::tag('div', $event->name, array('class'=>'name'));
$table->data[0]->cells[1]->text .= html_writer::tag('div', format_string($event->name, false, array('context' => $context)), array('class'=>'name'));
}
if (!empty($event->courselink)) {
$table->data[0]->cells[1]->text .= html_writer::tag('div', $event->courselink, array('class'=>'course'));
@@ -338,7 +339,7 @@ class core_calendar_renderer extends plugin_renderer_base {
$table->data[1]->cells[0] = new html_table_cell('&nbsp;');
$table->data[1]->cells[0]->attributes['class'] .= 'side';
$table->data[1]->cells[1] = new html_table_cell($event->description);
$table->data[1]->cells[1] = new html_table_cell(format_text($event->description, $event->format, array('context' => $context)));
$table->data[1]->cells[1]->attributes['class'] .= ' description';
if (isset($event->cssclass)) {
$table->data[1]->cells[1]->attributes['class'] .= ' '.$event->cssclass;
@@ -705,7 +706,8 @@ class core_calendar_renderer extends plugin_renderer_base {
/**
* Displays a course filter selector
*
* @param array $getvars
* @param moodle_url $returnurl The URL that the user should be taken too upon selecting a course.
* @param string $label The label to use for the course select.
* @return string
*/
protected function course_filter_selector(moodle_url $returnurl, $label=null) {
@@ -735,7 +737,9 @@ class core_calendar_renderer extends plugin_renderer_base {
} else {
$selected = '';
}
$select = new single_select(new moodle_url(CALENDAR_URL.'set.php', array('return' => base64_encode($returnurl->out(false)), 'var' => 'setcourse', 'sesskey'=>sesskey())), 'id', $courseoptions, $selected, null);
$courseurl = new moodle_url($returnurl);
$courseurl->remove_params('course');
$select = new single_select($courseurl, 'course', $courseoptions, $selected, null);
$select->class = 'cal_courses_flt';
if ($label !== null) {
$select->set_label($label);
@@ -845,4 +849,4 @@ class core_calendar_renderer extends plugin_renderer_base {
$html .= html_writer::end_tag('form');
return $html;
}
}
}
+1 -1
View File
@@ -126,7 +126,7 @@ class cohort_existing_selector extends user_selector_base {
if (!$this->is_validating()) {
$potentialmemberscount = $DB->count_records_sql($countfields . $sql, $params);
if ($potentialmemberscount > 100) {
if ($potentialmemberscount > $this->maxusersperpage) {
return $this->too_many_results($search, $potentialmemberscount);
}
}
+2 -2
View File
@@ -17,7 +17,7 @@
/**
* Cohorts steps definitions.
*
* @package core
* @package core_cohort
* @category test
* @copyright 2013 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -32,7 +32,7 @@ use Behat\Behat\Context\Step\Given as Given;
/**
* Steps definitions for cohort actions.
*
* @package core
* @package core_cohort
* @category test
* @copyright 2013 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -1,4 +1,4 @@
@core @core_cohort @_only_local
@core @core_cohort @_only_local @_file_upload
Feature: Upload users to a cohort
In order to quickly fill site-wide groups with users
As an admin
@@ -165,7 +165,7 @@ class completion_criteria_duration extends completion_criteria {
* @return string
*/
public function get_title_detailed() {
return ceil($this->enrolperiod / (60 * 60 * 24)) . ' days';
return get_string('xdays', 'completion', ceil($this->enrolperiod / (60 * 60 * 24)));
}
/**
@@ -190,7 +190,8 @@ class completion_criteria_duration extends completion_criteria {
$daysleft = ceil($timeleft / (60 * 60 * 24));
return ($daysleft > 0 ? $daysleft : 0).' of '.$enrolperiod;
return get_string('daysoftotal', 'completion', array(
'days' => $daysleft > 0 ? $daysleft : 0, 'total' => $enrolperiod));
}
/**
+1 -1
View File
@@ -8,6 +8,6 @@
"require-dev": {
"phpunit/phpunit": "3.7.*",
"phpunit/dbUnit": "1.2.*",
"moodlehq/behat-extension": "1.25.6"
"moodlehq/behat-extension": "1.25.11"
}
}
+8 -2
View File
@@ -561,10 +561,16 @@ $CFG->admin = 'admin';
// $CFG->behat_prefix = 'bht_';
// $CFG->behat_dataroot = '/home/example/bht_moodledata';
//
// Behat uses http://localhost:8000 as default URL to run
// the acceptance tests, you can override this value.
// To set a seperate wwwroot for Behat to use, use $CFG->behat_wwwroot; this is set automatically
// to http://localhost:8000 as it is the proposed PHP built-in server URL. Instead of that you can,
// for example, use an alias, add a host to /etc/hosts or add a new virtual host having a URL
// poiting to your production site and another one poiting to your test site. Note that you need
// to ensure that this URL is not accessible from the www as the behat test site uses "sugar"
// credentials (admin/admin) and can be easily hackable.
//
// Example:
// $CFG->behat_wwwroot = 'http://192.168.1.250:8000';
// $CFG->behat_wwwroot = 'http://localhost/moodlesitetesting';
//
// You can override default Moodle configuration for Behat and add your own
// params; here you can add more profiles, use different Mink drivers than Selenium...
@@ -1,5 +1,4 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -16,19 +15,25 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
* Helps moodle-course-categoryexpander to serve AJAX requests
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* @see core_course_renderer::coursecat_include_js()
* @see core_course_renderer::coursecat_ajax()
*
* @package installer
* @package core
* @copyright 2013 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
define('AJAX_SCRIPT', true);
$string['parentlanguage'] = 'es';
$string['thislanguage'] = 'Español - Argentina';
require_once(dirname(__dir__) . '/config.php');
if ($CFG->forcelogin) {
require_login();
}
$PAGE->set_context(context_system::instance());
$courserenderer = $PAGE->get_renderer('core', 'course');
echo json_encode($courserenderer->coursecat_ajax());
+26 -21
View File
@@ -102,31 +102,32 @@ M.course_dndupload = {
* is available (or to explain why it is not available)
*/
add_status_div: function() {
var coursecontents = document.getElementById(this.pagecontentid);
var Y = this.Y,
coursecontents = Y.one('#' + this.pagecontentid),
div,
handlefile = (this.handlers.filehandlers.length > 0),
handletext = false,
handlelink = false,
i = 0,
styletop,
styletopunit;
if (!coursecontents) {
return;
}
var div = document.createElement('div');
div.id = 'dndupload-status';
div.style.opacity = 0.0;
coursecontents.insertBefore(div, coursecontents.firstChild);
div = Y.Node.create('<div id="dndupload-status"></div>').setStyle('opacity', '0.0');
coursecontents.insert(div, 0);
var Y = this.Y;
div = Y.one(div);
var handlefile = (this.handlers.filehandlers.length > 0);
var handletext = false;
var handlelink = false;
var i;
for (i=0; i<this.handlers.types.length; i++) {
for (i = 0; i < this.handlers.types.length; i++) {
switch (this.handlers.types[i].identifier) {
case 'text':
case 'text/html':
handletext = true;
break;
case 'url':
handlelink = true;
break;
case 'text':
case 'text/html':
handletext = true;
break;
case 'url':
handlelink = true;
break;
}
}
$msgident = 'dndworking';
@@ -141,16 +142,20 @@ M.course_dndupload = {
}
div.setContent(M.util.get_string($msgident, 'moodle'));
styletop = div.getStyle('top') || '0px';
styletopunit = styletop.replace(/^\d+/, '');
styletop = parseInt(styletop.replace(/\D*$/, ''), 10);
var fadeanim = new Y.Anim({
node: '#dndupload-status',
from: {
opacity: 0.0,
top: '-30px'
top: (styletop - 30).toString() + styletopunit
},
to: {
opacity: 1.0,
top: '0px'
top: styletop.toString() + styletopunit
},
duration: 0.5
});
+4 -1
View File
@@ -45,8 +45,11 @@ if ($id) { // editing course
print_error('cannoteditsiteform');
}
$course = course_get_format($id)->get_course();
// Login to the course and retrieve also all fields defined by course format.
$course = get_course($id);
require_login($course);
$course = course_get_format($course)->get_course();
$category = $DB->get_record('course_categories', array('id'=>$course->category), '*', MUST_EXIST);
$coursecontext = context_course::instance($course->id);
require_capability('moodle/course:update', $coursecontext);
+1
View File
@@ -307,6 +307,7 @@ class course_edit_form extends moodleform {
$options[$grouping->id] = format_string($grouping->name);
}
}
collatorlib::asort($options);
$gr_el =& $mform->getElement('defaultgroupingid');
$gr_el->load($options);
}
+2 -1
View File
@@ -67,13 +67,14 @@ class editsection_form extends moodleform {
// Grouping conditions - only if grouping is enabled at site level
if (!empty($CFG->enablegroupmembersonly)) {
$options = array();
$options[0] = get_string('none');
if ($groupings = $DB->get_records('groupings', array('courseid' => $course->id))) {
foreach ($groupings as $grouping) {
$options[$grouping->id] = format_string(
$grouping->name, true, array('context' => $context));
}
}
collatorlib::asort($options);
$options = array(0 => get_string('none')) + $options;
$mform->addElement('select', 'groupingid', get_string('groupingsection', 'group'), $options);
$mform->addHelpButton('groupingid', 'groupingsection', 'group');
}
+14 -7
View File
@@ -237,14 +237,21 @@ abstract class format_base {
if ($this->course === false) {
$this->course = get_course($this->courseid);
$options = $this->get_format_options();
$dbcoursecolumns = null;
foreach ($options as $optionname => $optionvalue) {
if (!isset($this->course->$optionname)) {
$this->course->$optionname = $optionvalue;
} else {
debugging('The option name '.$optionname.' in course format '.$this->format.
' is invalid because the field with the same name exists in {course} table',
DEBUG_DEVELOPER);
if (isset($this->course->$optionname)) {
// Course format options must not have the same names as existing columns in db table "course".
if (!isset($dbcoursecolumns)) {
$dbcoursecolumns = $DB->get_columns('course');
}
if (isset($dbcoursecolumns[$optionname])) {
debugging('The option name '.$optionname.' in course format '.$this->format.
' is invalid because the field with the same name exists in {course} table',
DEBUG_DEVELOPER);
continue;
}
}
$this->course->$optionname = $optionvalue;
}
}
return $this->course;
@@ -554,7 +561,7 @@ abstract class format_base {
$sectionid = $section->id;
} else if ($this->courseid && is_int($section) &&
($sectionobj = $DB->get_record('course_sections',
array('section' => $section, 'courseid' => $this->courseid), 'id'))) {
array('section' => $section, 'course' => $this->courseid), 'id'))) {
// course section format options will be returned
$sectionid = $sectionobj->id;
} else {
+2 -1
View File
@@ -371,7 +371,8 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
if ($cancomplete && $completioninfo->is_enabled($thismod) != COMPLETION_TRACKING_NONE) {
$total++;
$completiondata = $completioninfo->get_data($thismod, true);
if ($completiondata->completionstate == COMPLETION_COMPLETE) {
if ($completiondata->completionstate == COMPLETION_COMPLETE ||
$completiondata->completionstate == COMPLETION_COMPLETE_PASS) {
$complete++;
}
}
+25 -12
View File
@@ -70,7 +70,6 @@ function make_log_url($module, $url) {
case 'login':
case 'lib':
case 'admin':
case 'calendar':
case 'category':
case 'mnet course':
if (strpos($url, '../') === 0) {
@@ -79,6 +78,9 @@ function make_log_url($module, $url) {
$url = "/course/$url";
}
break;
case 'calendar':
$url = "/calendar/$url";
break;
case 'user':
case 'blog':
$url = "/$module/$url";
@@ -1448,14 +1450,6 @@ function set_coursemodule_visible($id, $visible) {
}
}
// Hide the associated grade items so the teacher doesn't also have to go to the gradebook and hide them there.
$grade_items = grade_item::fetch_all(array('itemtype'=>'mod', 'itemmodule'=>$modulename, 'iteminstance'=>$cm->instance, 'courseid'=>$cm->course));
if ($grade_items) {
foreach ($grade_items as $grade_item) {
$grade_item->set_hidden(!$visible);
}
}
// Updating visible and visibleold to keep them in sync. Only changing a section visibility will
// affect visibleold to allow for an original visibility restore. See set_section_visible().
$cminfo = new stdClass();
@@ -1464,6 +1458,25 @@ function set_coursemodule_visible($id, $visible) {
$cminfo->visibleold = $visible;
$DB->update_record('course_modules', $cminfo);
require_once($CFG->dirroot . '/mod/' . $modulename . '/lib.php');
$functionname = $modulename . '_grade_item_update';
// Hide the associated grade items so the teacher doesn't also have to go to the gradebook and hide them there.
// Note that this must be done after updating the row in course_modules, in case
// the modules grade_item_update function needs to access $cm->visible.
if (plugin_supports('mod', $modulename, FEATURE_CONTROLS_GRADE_VISIBILITY) &&
function_exists($functionname)) {
$instance = $DB->get_record($modulename, array('id' => $cm->instance), '*', MUST_EXIST);
$functionname($instance);
} else {
$grade_items = grade_item::fetch_all(array('itemtype'=>'mod', 'itemmodule'=>$modulename, 'iteminstance'=>$cm->instance, 'courseid'=>$cm->course));
if ($grade_items) {
foreach ($grade_items as $grade_item) {
$grade_item->set_hidden(!$visible);
}
}
}
rebuild_course_cache($cm->course, true);
return true;
}
@@ -2986,7 +2999,7 @@ function include_course_ajax($course, $usedmodules = array(), $enabledmodules =
);
// Include course dragdrop
if ($course->id != $SITE->id) {
if (course_format_uses_sections($course->format)) {
$PAGE->requires->yui_module('moodle-course-dragdrop', 'M.course.init_section_dragdrop',
array(array(
'courseid' => $course->id,
@@ -3021,8 +3034,8 @@ function include_course_ajax($course, $usedmodules = array(), $enabledmodules =
'movesection',
), 'moodle');
// Include format-specific strings
if ($course->id != $SITE->id) {
// Include section-specific strings for formats which support sections.
if (course_format_uses_sections($course->format)) {
$PAGE->requires->strings_for_js(array(
'showfromothers',
'hidefromothers',
+17
View File
@@ -60,6 +60,23 @@ if (has_capability('moodle/user:loginas', $systemcontext)) {
print_error('usernotincourse');
}
$context = $coursecontext;
// Check if course has SEPARATEGROUPS and user is part of that group.
if (groups_get_course_groupmode($course) == SEPARATEGROUPS &&
!has_capability('moodle/site:accessallgroups', $context)) {
$samegroup = false;
if ($groups = groups_get_all_groups($course->id, $USER->id)) {
foreach ($groups as $group) {
if (groups_is_member($group->id, $userid)) {
$samegroup = true;
break;
}
}
}
if (!$samegroup) {
print_error('nologinas');
}
}
}
/// Login as this user and return to course home page.
+14 -3
View File
@@ -83,6 +83,9 @@ function add_moduleinfo($moduleinfo, $course, $mform = null) {
$newcm->showdescription = 0;
}
// From this point we make database changes, so start transaction.
$transaction = $DB->start_delegated_transaction();
if (!$moduleinfo->coursemodule = add_course_module($newcm)) {
print_error('cannotaddcoursemodule');
}
@@ -95,14 +98,21 @@ function add_moduleinfo($moduleinfo, $course, $mform = null) {
}
$addinstancefunction = $moduleinfo->modulename."_add_instance";
$returnfromfunc = $addinstancefunction($moduleinfo, $mform);
try {
$returnfromfunc = $addinstancefunction($moduleinfo, $mform);
} catch (moodle_exception $e) {
$returnfromfunc = $e;
}
if (!$returnfromfunc or !is_number($returnfromfunc)) {
// Undo everything we can.
// Undo everything we can. This is not necessary for databases which
// support transactions, but improves consistency for other databases.
$modcontext = context_module::instance($moduleinfo->coursemodule);
delete_context(CONTEXT_MODULE, $moduleinfo->coursemodule);
$DB->delete_records('course_modules', array('id'=>$moduleinfo->coursemodule));
if (!is_number($returnfromfunc)) {
if ($e instanceof moodle_exception) {
throw $e;
} else if (!is_number($returnfromfunc)) {
print_error('invalidfunction', '', course_get_url($course, $cw->section));
} else {
print_error('cannotaddnewmodule', '', course_get_url($course, $cw->section), $moduleinfo->modulename);
@@ -150,6 +160,7 @@ function add_moduleinfo($moduleinfo, $course, $mform = null) {
"$moduleinfo->instance", $moduleinfo->coursemodule);
$moduleinfo = edit_module_post_actions($moduleinfo, $course, 'mod_created');
$transaction->allow_commit();
return $moduleinfo;
}
+2 -1
View File
@@ -486,12 +486,13 @@ abstract class moodleform_mod extends moodleform {
if ($this->_features->groupings or $this->_features->groupmembersonly) {
//groupings selector - used for normal grouping mode or also when restricting access with groupmembersonly
$options = array();
$options[0] = get_string('none');
if ($groupings = $DB->get_records('groupings', array('courseid'=>$COURSE->id))) {
foreach ($groupings as $grouping) {
$options[$grouping->id] = format_string($grouping->name);
}
}
collatorlib::asort($options);
$options = array(0 => get_string('none')) + $options;
$mform->addElement('select', 'groupingid', get_string('grouping', 'group'), $options);
$mform->addHelpButton('groupingid', 'grouping', 'group');
}
+107 -20
View File
@@ -40,6 +40,9 @@ class core_course_renderer extends plugin_renderer_base {
const COURSECAT_SHOW_COURSES_EXPANDED = 20;
const COURSECAT_SHOW_COURSES_EXPANDED_WITH_CAT = 30;
const COURSECAT_TYPE_CATEGORY = 0;
const COURSECAT_TYPE_COURSE = 1;
/**
* A cache of strings
* @var stdClass
@@ -1076,11 +1079,18 @@ class core_course_renderer extends plugin_renderer_base {
$classes = trim('coursebox clearfix '. $additionalclasses);
if ($chelper->get_show_courses() >= self::COURSECAT_SHOW_COURSES_EXPANDED) {
$nametag = 'h3';
$classes .= ' expanded';
} else {
$classes .= ' collapsed';
$nametag = 'div';
}
$content .= html_writer::start_tag('div', array('class' => $classes)); // .coursebox
// .coursebox
$content .= html_writer::start_tag('div', array(
'class' => $classes,
'data-courseid' => $course->id,
'data-type' => self::COURSECAT_TYPE_COURSE,
));
$content .= html_writer::start_tag('div', array('class' => 'info'));
@@ -1098,6 +1108,8 @@ class core_course_renderer extends plugin_renderer_base {
$image = html_writer::empty_tag('img', array('src' => $this->output->pix_url('i/info'),
'alt' => $this->strings->summary));
$content .= html_writer::link($url, $image, array('title' => $this->strings->summary));
// Make sure JS file to expand course content is included.
$this->coursecat_include_js();
}
}
$content .= html_writer::end_tag('div'); // .moreinfo
@@ -1365,6 +1377,20 @@ class core_course_renderer extends plugin_renderer_base {
return $content;
}
/**
* Make sure that javascript file for AJAX expanding of courses and categories content is included
*/
protected function coursecat_include_js() {
global $CFG;
static $jsloaded = false;
if (!$jsloaded) {
// We must only load this module once.
$this->page->requires->yui_module('moodle-course-categoryexpander',
'Y.Moodle.course.categoryexpander.init');
$jsloaded = true;
}
}
/**
* Returns HTML to display the subcategories and courses in the given category
*
@@ -1443,11 +1469,20 @@ class core_course_renderer extends plugin_renderer_base {
$classes[] = 'loaded';
if (!empty($categorycontent)) {
$classes[] = 'with_children';
$classes[] = 'expanded';
}
}
$content = html_writer::start_tag('div', array('class' => join(' ', $classes),
// Make sure JS file to expand category content is included.
$this->coursecat_include_js();
$content = html_writer::start_tag('div', array(
'class' => join(' ', $classes),
'data-categoryid' => $coursecat->id,
'data-depth' => $depth));
'data-depth' => $depth,
'data-showcourses' => $chelper->get_show_courses(),
'data-type' => self::COURSECAT_TYPE_CATEGORY,
));
// category name
$categoryname = $coursecat->get_formatted_name();
@@ -1485,29 +1520,29 @@ class core_course_renderer extends plugin_renderer_base {
return '';
}
// Generate an id and the required JS call to make this a nice widget
$id = html_writer::random_id('course_category_tree');
$this->page->requires->js_init_call('M.util.init_toggle_class_on_click',
array($id, '.category.with_children.loaded > .info .name', 'collapsed', '.category.with_children.loaded'));
// Start content generation
$content = '';
$attributes = $chelper->get_and_erase_attributes('course_category_tree clearfix');
$content .= html_writer::start_tag('div',
array('id' => $id, 'data-showcourses' => $chelper->get_show_courses()) + $attributes);
$content .= html_writer::start_tag('div', $attributes);
if ($coursecat->get_children_count()) {
$classes = array(
'collapseexpand',
'collapse-all',
);
if ($chelper->get_subcat_depth() == 1) {
$classes[] = 'disabled';
}
// Only show the collapse/expand if there are children to expand.
$content .= html_writer::start_tag('div', array('class' => 'collapsible-actions'));
$content .= html_writer::link('#', get_string('collapseall'),
array('class' => implode(' ', $classes)));
$content .= html_writer::end_tag('div');
$this->page->requires->strings_for_js(array('collapseall', 'expandall'), 'moodle');
}
$content .= html_writer::tag('div', $categorycontent, array('class' => 'content'));
if ($coursecat->get_children_count() && $chelper->get_subcat_depth() != 1) {
// We don't need to display "Expand all"/"Collapse all" buttons if there are no
// subcategories or there is only one level of subcategories loaded
// TODO if subcategories are loaded by AJAX this might still be needed!
$content .= html_writer::start_tag('div', array('class' => 'controls'));
$content .= html_writer::tag('div', get_string('collapseall'), array('class' => 'addtoall expandall'));
$content .= html_writer::tag('div', get_string('expandall'), array('class' => 'removefromall collapseall'));
$content .= html_writer::end_tag('div');
}
$content .= html_writer::end_tag('div'); // .course_category_tree
return $content;
@@ -1632,6 +1667,58 @@ class core_course_renderer extends plugin_renderer_base {
return $output;
}
/**
* Serves requests to /course/category.ajax.php
*
* In this renderer implementation it may expand the category content or
* course content.
*
* @return string
* @throws coding_exception
*/
public function coursecat_ajax() {
global $DB, $CFG;
require_once($CFG->libdir. '/coursecatlib.php');
$type = required_param('type', PARAM_INT);
if ($type === self::COURSECAT_TYPE_CATEGORY) {
// This is a request for a category list of some kind.
$categoryid = required_param('categoryid', PARAM_INT);
$showcourses = required_param('showcourses', PARAM_INT);
$depth = required_param('depth', PARAM_INT);
$category = coursecat::get($categoryid);
$chelper = new coursecat_helper();
$baseurl = new moodle_url('/course/index.php', array('categoryid' => $categoryid));
$coursedisplayoptions = array(
'limit' => $CFG->coursesperpage,
'viewmoreurl' => new moodle_url($baseurl, array('browse' => 'courses', 'page' => 1))
);
$catdisplayoptions = array(
'limit' => $CFG->coursesperpage,
'viewmoreurl' => new moodle_url($baseurl, array('browse' => 'categories', 'page' => 1))
);
$chelper->set_show_courses($showcourses)->
set_courses_display_options($coursedisplayoptions)->
set_categories_display_options($catdisplayoptions);
return $this->coursecat_category_content($chelper, $category, $depth);
} else if ($type === self::COURSECAT_TYPE_COURSE) {
// This is a request for the course information.
$courseid = required_param('courseid', PARAM_INT);
$course = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST);
$chelper = new coursecat_helper();
$chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED);
return $this->coursecat_coursebox_content($chelper, $course);
} else {
throw new coding_exception('Invalid request type');
}
}
/**
* Renders html to display search result page
*

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