Compare commits

...

455 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) ef0ee34df0 Moodle release 2.6.2 2014-03-07 18:51:51 +01:00
Eloy Lafuente (stronk7) 7330bdebff weekly release 2.6.1+ 2014-03-06 22:17:22 +01:00
Eloy Lafuente (stronk7) 3fb5bd96e8 Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2014-03-06 22:17:16 +01:00
Yuliya Bozhko 28c8ac2c4a 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:03 +08:00
Damyon Wiese b9d8d54be2 Merge branch 'wip-MDL-44403-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-06 09:22:13 +08:00
Dan Poltawski e5636247a1 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 edf55404ff.
2014-03-06 09:05:27 +08:00
Eloy Lafuente (stronk7) 728ece64e4 Merge branch 'MDL-44425-en_fix_26' of git://github.com/mudrd8mz/moodle into MOODLE_26_STABLE 2014-03-06 00:36:27 +01:00
Helen Foster eecdbbf315 MDL-44425 Merge English strings from the en_fix language pack 2014-03-05 13:35:06 +01:00
Damyon Wiese 6b1e9b0cd4 Merge branch 'MDL-43635-m26' of https://github.com/brentboghosian/moodle2 into MOODLE_26_STABLE 2014-03-05 14:51:18 +08:00
Dan Poltawski 864ea90d6d Merge branch 'wip-MDL-44287-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-05 14:18:22 +08:00
Dan Poltawski 7442e32e87 Merge branch 'MDL-43930-26-fix1' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-03-05 14:13:35 +08:00
Damyon Wiese abfc156859 Merge branch 'MDL-44370-26' of git://github.com/ankitagarwal/moodle into MOODLE_26_STABLE 2014-03-05 14:00:57 +08:00
Yuliya Bozhko 857f80ef77 MDL-41585 badges: Add a note that badge recipient is a deleted user
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-03-05 13:18:21 +08:00
Damyon Wiese 3efe930987 MDL-43930 Assign: Fix unit tests.
The tests were expecting exact log data to match, I changed the data
but missed updating the test.
2014-03-05 12:51:15 +08:00
Dan Poltawski a77f82dacf Merge branch 'MDL-41248_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-03-05 12:39:56 +08:00
Dan Poltawski ed9e1428d1 Merge branch 'MDL-43930-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-03-05 11:22:37 +08:00
Dan Poltawski 730440dcf4 Merge branch 'MDL-44065-m26' of https://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-03-05 10:52:50 +08:00
Damyon Wiese c6465439d0 Merge branch 'wip-MDL-44074-M26_4' of git://github.com/gjb2048/moodle into MOODLE_26_STABLE 2014-03-05 09:58:54 +08:00
AMOS bot 25488a1120 Automatically generated installer lang files 2014-03-05 00:54:43 +00:00
Dan Poltawski 602a3bd3de Merge branch 'wip-MDL-44258-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-04 17:50:07 +08:00
Ankit Agarwal d57ce0312a MDL-44370 calendar: Add support for restoring calendar log rules 2014-03-04 16:13:59 +08:00
Ankit Agarwal bdff56f737 MDL-44370 calendar: Fix calendar url in reports 2014-03-04 16:13:59 +08:00
Dan Poltawski 5b2f2af6cd Merge branch 'MDL-44272-26' of git://github.com/ankitagarwal/moodle into MOODLE_26_STABLE 2014-03-04 16:00:01 +08:00
Dan Poltawski 6a37f9898e Merge branch 'MDL-44278_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-03-04 15:43:26 +08:00
Marina Glancy 76f9954066 MDL-44403 events: bug fix in legacy event data for unknown_service_api_called 2014-03-04 15:26:17 +08:00
Marina Glancy ce3b9d2f59 MDL-44403 events: added public methods to get eventdata 2014-03-04 15:26:14 +08:00
Frederic Massart f96b8a1c67 MDL-43468 mod_assign: Webservice parameters were not safely cleaned 2014-03-04 14:49:28 +08:00
Dan Poltawski 5d4abb97b2 Merge branch 'MDL-44436-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-03-04 14:41:32 +08:00
Frederic Massart 7ffe38cebf 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:37 +08:00
Damyon Wiese 0fc189a4b4 Merge branch 'MDL-43738_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-03-04 13:28:18 +08:00
Dan Poltawski 013de6d5d4 Merge branch 'm26_MDL-43852_SWF_Not_Embedded_By_Mediaplugin_Filter' of https://github.com/scara/moodle into MOODLE_26_STABLE 2014-03-04 12:56:13 +08:00
Dan Poltawski 41a19bffee MDL-43146 enrol_imsenterprise: missing sesskey protection 2014-03-04 12:26:02 +08:00
Frederic Massart ee8f17db89 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:34:58 +08:00
Brent Boghosian e7fa4cde7b MDL-43635: Further support custom contexts: reading from config DB table and reset method for after plugin install
Add PHPUnit test for custom context changes
2014-03-03 12:03:09 -05:00
Dan Poltawski 51214dd2d1 Merge branch 'MDL-44377_26' of https://github.com/stronk7/moodle into MOODLE_26_STABLE 2014-03-03 15:15:20 +08:00
Marina Glancy e6499fb8a4 MDL-39990 wiki: more detailed validation of view/edit access 2014-03-03 14:45:40 +08:00
Dan Poltawski d5c7462a6a Merge branch 'wip-MDL-44362-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-03 13:34:35 +08:00
Andrew Davis 4d4867503c MDL-44082 mod_chat: added a security check for users already in the chat activity 2014-03-03 12:16:48 +08:00
Tomasz Muras 71037bf26c MDL-43656 mod_feedback: availablity date logic incorrect 2014-03-03 11:24:23 +08:00
Maria Torres db4e2c4cd4 MDL-43916 - Email addresses incorrectly displayed
When capabilities and settings do not allow it.
2014-03-03 10:37:22 +08:00
Dan Poltawski 6b25f55ec9 Merge branch 'w06_MDL-43344_m26_flow' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-03-03 10:07:15 +08:00
Gareth J Barnard 0bd4dca7be MDL-44074 theme_bootstrapbase: No 768px-979px & 1200px+ empty blk span calcs. 2014-03-01 09:18:34 +00:00
AMOS bot 9b1cc0bb86 Automatically generated installer lang files 2014-03-01 00:56:04 +00:00
Gordon Bateson edf55404ff MDL-43852 Filters Fixed naked-OR conditions. 2014-02-28 23:56:35 +01:00
Eloy Lafuente (stronk7) 36f74f56d8 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:27 +01:00
Marina Glancy 51294319af MDL-44362 recentactivity: fix regressions from MDL-44055 2014-02-28 16:33:54 +08:00
Marina Glancy c89fa51c0e MDL-44258 Behat test for workshop, automate MDLQA-99 2014-02-28 16:33:32 +08:00
Marina Glancy e7198624aa MDL-44287 glossary: fixing warnings when importing as new module 2014-02-28 16:33:21 +08:00
Marina Glancy 971b916b44 MDL-44287 glossary: do not output before redirecting 2014-02-28 16:33:21 +08:00
Tim Hunt 65a90d2d9b 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:00:54 +01:00
Tim Hunt 379a3fcee3 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:10:26 +01:00
Damyon Wiese ed0a48b2c1 weekly release 2.6.1+ 2014-02-28 10:02:43 +08:00
Damyon Wiese a97718eaed Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2014-02-28 10:02:41 +08:00
David Monllao 5ee96bbcf1 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:47:03 +08:00
David Monllao 158eb2af96 MDL-43738 behat: Backporting new 2.7 methods to 2.6
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:31 +08:00
David Monllao 42e5f933b6 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:31 +08:00
David Monllao 08066a2ab2 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:29 +08:00
David Monllao 8ee37654e5 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:05:51 +08:00
Eloy Lafuente (stronk7) 5fbf4638ab 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:05:51 +08:00
David Monllao c7db26dab9 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:54:54 +08:00
Damyon Wiese 0f73fa60b9 MDL-43723 Blocks drag and drop: Javascript cleanup
Declare the selector instead of repeating it several times.
2014-02-25 17:05:45 +08:00
Damyon Wiese b174b543d8 Merge branch 'MDL-43723-26' of git://github.com/mouneyrac/moodle into MOODLE_26_STABLE
Conflicts:
	lib/yui/build/moodle-core-blocks/moodle-core-blocks-min.js
2014-02-25 16:44:48 +08:00
Dan Poltawski 233f8b265a Merge branch 'MDL-43882_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-02-25 15:34:00 +08:00
David Monllao aa5916d94c MDL-43882 lib: Adding info about the change in upgrade.txt 2014-02-25 11:24:00 +08:00
Damyon Wiese 2db5aef32e MDL-40619 mod_quiz: Remove commented non-js behat scenario 2014-02-25 11:05:08 +08:00
Damyon Wiese 0e0bbd9922 Merge branch 'wip-MDL-40619-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-02-25 11:04:40 +08:00
Dan Poltawski e274eece15 Merge branch 'MDL-43405_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-02-25 10:30:36 +08:00
Ankit Agarwal 0483a5ad93 MDL-44272 events: Fix incorrect urls in course module events 2014-02-24 17:05:02 +08:00
Damyon Wiese 7c9f70acd4 Merge branch 'MDL-43837_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-02-24 16:56:21 +08:00
Damyon Wiese 5f98c897b4 Merge branch 'MDL-44111_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-02-24 15:40:28 +08:00
Damyon Wiese 9334d95009 Merge branch 'wip-MDL-44168_26' of git://github.com/ds125v/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-02-24 15:22:42 +08:00
Damyon Wiese ede0d15765 Merge branch 'MDL-44247-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-02-24 14:30:08 +08:00
Damyon Wiese ff7b9d9d8f Merge branch '44279-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-02-24 13:38:33 +08:00
Damyon Wiese 1998e85cf1 Merge branch 'MDL-44286_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-02-24 13:33:42 +08:00
Damyon Wiese e2f19c6b33 Merge branch 'MDL-44288_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-02-24 13:27:45 +08:00
Michael Aherne 96942337fb MDL-44066 caching Don't advertise session mode for MongoDB and memcached 2014-02-24 12:49:51 +08:00
Damyon Wiese ebe9c36cb5 Merge branch '44217-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-02-24 11:14:05 +08:00
Damyon Wiese 24d6ab75fc Merge branch 'MDL-34319_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-02-24 11:09:57 +08:00
Sam Hemelryk 82403a6f38 MDL-44217 theme_bootstrapbase: darkend link colour by 5% for accessibility 2014-02-24 16:07:23 +13:00
Damyon Wiese 41a10883b6 Merge branch 'MDL-41767-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-02-24 10:41:25 +08:00
David Monllao 235847ecd5 MDL-43837 behat: Adding reduced timeouts
There are steps where we want to check that
"something" does not appear in the page
or does not exist. We still have to spin
but we don't need to spin for 6 seconds.
2014-02-24 09:43:58 +08:00
David Monllao 8102409895 MDL-44111 behat: Limiting dump files filename size 2014-02-21 13:25:11 +08:00
David Monllao 0710e4944f MDL-43882 dml: New test for perf_get_xxxx() methods 2014-02-21 13:20:51 +08:00
David Monllao 1b6b3b66df 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:51 +08:00
David Monllao aafe8337df MDL-44286 behat: Updating to our custom Syn library 2014-02-21 10:18:23 +08:00
AMOS bot e3caf032d7 Automatically generated installer lang files 2014-02-21 00:45:30 +00:00
Sam Hemelryk 25c950b63b MDL-42279 user: fixed typo in user_get_user_details_courses 2014-02-21 08:34:42 +13:00
Sam Hemelryk d1ac630093 MDL-44279 user: added unit test to trigger known bug 2014-02-21 08:34:42 +13:00
Tim Hunt 193cb51042 MDL-44288 qtype_calculatedsimple fix validation notice.
The notice happend if you clicked Save changes before Find the wild
cards {x..} present in the correct answer formulas.
2014-02-20 12:59:50 +00:00
Eloy Lafuente (stronk7) 05636776e3 weekly release 2.6.1+ 2014-02-20 12:43:31 +01:00
Eloy Lafuente (stronk7) 3bcd0f23ff Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2014-02-20 12:43:25 +01:00
Damyon Wiese 15378769f2 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.
2014-02-20 12:32:05 +08:00
Damyon Wiese 5e9d6beaa3 Merge branch 'MDL-44118_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-02-19 09:20:07 +08:00
Dan Poltawski a43aa9fbf1 Merge branch 'MDL-43182_26' of git://github.com/mr-russ/moodle into MOODLE_26_STABLE 2014-02-19 09:16:49 +08:00
Eloy Lafuente (stronk7) 3f4a9df9f7 MDL-43265 question: incorrect closing parenthesis 2014-02-19 00:11:35 +01:00
Eloy Lafuente (stronk7) 9f5ac013a3 Merge branch 'MDL-43265_26' of https://github.com/jacks92/moodle into MOODLE_26_STABLE 2014-02-18 23:56:12 +01:00
Eloy Lafuente (stronk7) 77da718f1b Merge branch 'MDL-43337-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-02-18 23:25:30 +01:00
Tim Hunt 652413ce70 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:01:38 +00:00
Dan Poltawski 29b3c5dfc6 Merge branch 'm26_MDL-43541' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-02-18 14:14:00 +08:00
Damyon Wiese 28ac492db3 Merge branch 'MDL-43802_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-02-18 14:05:32 +08:00
Damyon Wiese fa0016a8a2 Merge branch 'MDL-41646_26' of git://github.com/apsdehal/moodle into MOODLE_26_STABLE 2014-02-18 12:41:42 +08:00
Eloy Lafuente (stronk7) 0f678757a4 Merge branch '43822-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-02-18 02:06:19 +01:00
David Scotson 8895425e41 MDL-44168 html: border=1 on regexdetect table 2014-02-17 11:47:18 +00:00
sam marshall f76c4edf01 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:52:10 +00:00
Frederic Massart 6e1688f7ba MDL-44247 mod_scorm: Reference to SYSTEM_CONTEXT instead of real context 2014-02-17 15:59:26 +08:00
Dan Marsden 9f3a4cbbcf MDL-43541 SCORM: set first launchable sco correctly. 2014-02-17 19:57:37 +13:00
Damyon Wiese 590a9dc30a Merge branch 'MDL-43169_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-02-17 14:35:36 +08:00
Damyon Wiese 31ab685057 Merge branch 'MDL-43504-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-17 14:23:40 +08:00
Marina Glancy 2dfed6304e MDL-40619 behat: test for creating a one-question quiz 2014-02-17 14:20:00 +08:00
Matt Switlik 823640c16d MDL-42618 fix grade importing of whitespace idnumbers 2014-02-17 12:14:23 +08:00
Dan Poltawski 06a8eb06f3 Merge branch 'MDL-27414_26' of git://github.com/jmvedrine/moodle into MOODLE_26_STABLE 2014-02-17 12:06:46 +08:00
Andrew Nicols 4f88b83de9 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:09 +08:00
David Monllao 6fcf292760 MDL-43802 behat: Testing deleted activity with JS enabled 2014-02-17 11:02:36 +08:00
Dan Poltawski f23808515b Merge branch 'MDL-42033_26' of git://github.com/jmvedrine/moodle into MOODLE_26_STABLE 2014-02-17 10:32:38 +08:00
Jerome Mouneyrac fd9233c1b9 MDL-43723 restrict the drag and drop to the move icon instead of dragging the entire block header
Conflicts:
	lib/yui/build/moodle-core-blocks/moodle-core-blocks-min.js
2014-02-17 09:21:58 +08:00
Damyon Wiese 759e616eb6 Merge branch 'MDL-44018_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-02-17 09:21:46 +08:00
fabmen a0815efa5d MDL-43405 auth_ldap: Fixed issue with undefined variable: ldap_cookie 2014-02-16 14:23:17 -08:00
fabmen 25d981659b MDL-34319 auth_cas: Fixed issue with undefined variable: ldapconnection 2014-02-16 14:20:41 -08:00
Mark Nelson ce7c5de2e9 MDL-43169 core_calendar: introduced calendar type system setting (Backport of MDL-42932) 2014-02-16 13:52:57 -08:00
Sam Hemelryk bfb99b7e1d Merge branch 'MDL-44037_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-02-17 10:16:39 +13:00
Sam Hemelryk 90e7406e29 Merge branch 'MDL-42404_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-02-17 10:15:41 +13:00
Sam Hemelryk 2f31445ff8 Merge branch 'MDL-44142-26' of git://github.com/mrverrall/moodle into MOODLE_26_STABLE 2014-02-17 09:16:41 +13:00
Sam Hemelryk 0b420fab17 Merge branch 'MDL-44042-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-17 09:07:02 +13:00
Sam Hemelryk a413d15875 Merge branch 'MDL-44055-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-17 09:04:51 +13:00
Sam Hemelryk ba0f2d978b Merge branch 'MDL-44079-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE
Conflicts:
	lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js
2014-02-17 08:49:12 +13:00
Sam Hemelryk 3c60db1a84 Merge branch 'MDL-43979-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE
Conflicts:
	lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js
2014-02-17 08:28:06 +13:00
Jean-Michel Vedrine a00bff10e5 MDL-42033 Files in subdirs not exported correctly by question XML format 2014-02-16 19:46:10 +01:00
Simon Coggins a837a7c721 MDL-43049 accesslib: Fix typo in memory optimization code 2014-02-16 20:14:04 +11:00
Sam Hemelryk 19cb367592 MDL-43822 theme_bootstrapbase: blocks less tidied and reorganised
Thanks Gareth for the peer-review.
2014-02-16 14:26:11 +13:00
AMOS bot dfbde06b40 Automatically generated installer lang files 2014-02-15 00:43:51 +00:00
Jean-Michel Vedrine a1b2b00736 MDL-27414 Upgrade the randomsamatch qtype to the new question engine
Added XML import/export
Different randomsamatch questions 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:59:32 +01:00
Paul Verrall 0ec77cdea6 MDL-44142 Cohorts: Use maxusersperpage for list of current users. 2014-02-13 16:18:04 +00:00
Eloy Lafuente (stronk7) acbd69f7ee weekly release 2.6.1+ 2014-02-13 15:30:08 +01:00
Eloy Lafuente (stronk7) 47e4397538 Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2014-02-13 15:30:03 +01:00
Jayesh Anandani 08e9a32e5f MDL-43265 Fix question name text to 255 chars 2014-02-13 17:06:10 +05:30
David Monllao 9a8544daf6 MDL-44037 behat: New feature -> publishing rubric templates
This patch automates MDLQA-1186; rubrics can be
shared as templates.
2014-02-13 16:50:53 +08:00
David Monllao 0a1c3118ba 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:49:45 +08:00
David Monllao 782e32e3e4 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:49:45 +08:00
David Monllao 577efa89cd MDL-42404 behat: Adding rubrics step definitions 2014-02-13 16:49:45 +08:00
David Monllao c644877218 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:49:45 +08:00
David Monllao a63fd3a6a8 MDL-42404 behat: Adding yui-dialog to dialogue selector 2014-02-13 16:49:45 +08:00
Frederic Massart 53a09b3886 MDL-43337 enrol: More tests for get_enrolled_users_with_capability 2014-02-13 12:07:06 +08:00
Frederic Massart 07b9d5e9df MDL-43337 enrol: Missing break in get_enrolled_users WS 2014-02-13 12:07:06 +08:00
apsdehal c9c9a4a76b MDL-43337 WebService: Missing break statement added
In function get_enrolled_users_with_capability
2014-02-13 12:07:06 +08:00
Andrew Nicols a5be87d234 MDL-44042 Javascript: Handle moving to the top of the current section with keyboard 2014-02-13 10:13:38 +08:00
Sam Hemelryk a70818530e Merge branch 'int26_MDL-43200' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-02-13 08:25:32 +13:00
Petr Škoda 6279184e14 MDL-43200 fix enrol_manual externallib tests 2014-02-12 16:03:01 +08:00
Andrew Nicols 11a788e420 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 11:55:15 +08:00
AMOS bot c0aac4e36f Automatically generated installer lang files 2014-02-12 00:42:50 +00:00
Sam Hemelryk 7a27c83bc0 Merge branch 'MDL-41644_26' of git://github.com/apsdehal/moodle into MOODLE_26_STABLE 2014-02-12 09:24:11 +13:00
Marina Glancy efdbd1bd1d Merge branch '28567-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-02-11 14:42:59 +08:00
Marina Glancy 28e5849960 MDL-42505 whitespace correction 2014-02-11 14:36:52 +08:00
Michael Milette 761a10f8d5 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:00 +08:00
Andrew Nicols aebc072dd4 MDL-44079 Javascript: EditPDF editor should be modal 2014-02-11 12:25:34 +08:00
Andrew Nicols 3c78500c9f MDL-44079 Javascript: Closing a tooltip should pass event details 2014-02-11 12:25:15 +08:00
Andrew Nicols 624feb24f2 MDL-44079 Javascript: Check whether a dialogue is focused before closing 2014-02-11 12:25:00 +08:00
Andrew Nicols a1f3fe6617 MDL-44055 mod_glossary: Add missing alternate name fields 2014-02-11 10:02:08 +08:00
Andrew Nicols 4ba46b8618 MDL-44055 mod_quiz: Add missing alternate name fields 2014-02-11 10:02:07 +08:00
Sam Hemelryk 58ce5122b2 Merge branch 'MDL-43941-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-11 14:10:58 +13:00
AMOS bot 38a69deafa Automatically generated installer lang files 2014-02-11 00:42:11 +00:00
Andrew Nicols f47b4fec8f MDL-43994 Blocks: Hide the move icon when blocks are docked on Afterburner too 2014-02-11 00:08:55 +01:00
Sam Hemelryk ec5dc1fab7 Merge branch 'MDL-43929_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-02-11 08:27:44 +13:00
Andrew Nicols 5ce1ff33ce MDL-43979 Javascript: Correct checking of attributes during dialogue init
Various dialogue attributes are optional and are provided by the parent and
not provided as attributes to the dialogue being initted.

As a result, if the setting is not provided during init, we were assuming
that the value would be false rather than checking the real attribute.
2014-02-10 22:00:44 +08:00
Marina Glancy 98c5ac4358 Merge branch '43977-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-02-10 18:16:42 +08:00
Andrew Nicols c1e725bbd1 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-10 15:45:51 +08:00
Tim Hunt f10763ebc0 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:34:21 +00:00
Sam Hemelryk 5eb9a4f631 Merge branch 'wip_26_mdl-32724' of https://github.com/iarenaza/moodle into MOODLE_26_STABLE 2014-02-10 15:26:24 +13:00
Sam Hemelryk e2b27417dc Merge branch 'MDL-43774_26' of https://github.com/totara/openbadges into MOODLE_26_STABLE 2014-02-10 15:20:25 +13:00
Sam Hemelryk 8ebaf4bd74 Merge branch 'MDL-43267-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-10 14:53:55 +13:00
Sam Hemelryk 7aaf82deb6 Merge branch 'MDL-40938-26' of git://github.com/lazydaisy/moodle into MOODLE_26_STABLE 2014-02-10 14:16:22 +13:00
Sam Hemelryk 83fffcb97a Merge branch 'MDL-43200_26' of git://github.com/apsdehal/moodle into MOODLE_26_STABLE 2014-02-10 14:11:36 +13:00
Sam Hemelryk a5a7dd624f Merge branch 'MDL-42882-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-02-10 13:13:03 +13:00
Sam Hemelryk b41b2b2e18 MDL-44056 question: added new default property to unit tests 2014-02-10 12:56:48 +13:00
Sam Hemelryk 4acc62f2c4 Merge branch 'MDL-43641-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-10 11:50:34 +13:00
Sam Hemelryk e32b3de09e Merge branch 'MDL-44056_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-02-10 11:30:20 +13:00
Sam Hemelryk 7082e945b2 Merge branch 'MDL-43838_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-02-10 11:27:12 +13:00
Sam Hemelryk ab4ec7a21c Merge branch 'MDL-43969-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-10 09:48:22 +13:00
Sam Hemelryk 4e4fabd197 Merge branch 'MDL-43992-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-10 09:40:21 +13:00
Sam Hemelryk 7ca837ef2c MDL-44020 core: version bump for service change 2014-02-10 09:37:52 +13:00
Sam Hemelryk 8ef741eeca Merge branch 'MDL-44020-STABLE-26' of git://github.com/jleyva/moodle into MOODLE_26_STABLE 2014-02-10 09:31:04 +13:00
Sam Hemelryk 764d330c3e Merge branch 'MDL-44046_m26' of https://github.com/merrill-oakland/moodle into MOODLE_26_STABLE 2014-02-10 09:28:19 +13:00
Sam Hemelryk a95a356322 Merge branch 'MDL-43978_26' of https://github.com/totara/openbadges into MOODLE_26_STABLE 2014-02-10 09:24:01 +13:00
Sam Hemelryk dfc8d1d7f5 Merge branch 'MDL-43994-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-10 09:06:40 +13:00
Sam Hemelryk fdf33244b5 Merge branch 'MDL-44029-quiz-group-delete-handler-bug_26_STABLE' of https://github.com/mpetrowi/moodle into MOODLE_26_STABLE 2014-02-10 08:44:56 +13:00
Sam Hemelryk 3b6aa4f70c Merge branch 'MDL-43946_m26' of https://github.com/merrill-oakland/moodle into MOODLE_26_STABLE 2014-02-10 08:43:05 +13:00
Sam Hemelryk a7695377d7 MDL-43977 theme_bootstrapbase: small fix to make custom menu work with JS disabled 2014-02-10 08:37:00 +13:00
Sam Hemelryk dc606a57a7 MLD-28567 calendar: improved course filter process 2014-02-10 08:31:43 +13:00
Tim Hunt a82e15de84 MDL-44056 questions: restore essay attempts from 2.0 notice. 2014-02-09 17:50:59 +00:00
AMOS bot 80e5c694d3 Automatically generated installer lang files 2014-02-09 00:42:13 +00:00
Mary Evans 39790f906c MDL-40938 theme_bootstrapbase: Fix for text fields in login block. 2014-02-08 15:09:52 +00:00
Tim Hunt aa083d663b MDL-44018 quesiton variant was not backed up or restored. 2014-02-07 21:55:57 +00:00
Eric Merrill 2a2176186d MDL-44046 gradebook Reduce duplicates returned during sortorder fixing. 2014-02-07 09:30:08 -05:00
Juan Leyva ae4ce123e5 MDL-44020 Add core_calendar_get_calendar_events function to the Moodle Mobile service 2014-02-07 11:22:10 +01:00
Andrew Nicols 8f71903132 MDL-43994 Blocks: Hide the move icon when blocks are docked 2014-02-07 17:42:23 +08:00
Andrew Nicols b269650d8a 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:32:59 +08:00
Andrew Nicols 684424a6e6 MDL-43969 Forms: Adjust ARIA attributes for short forms
The aria-live="polite" attribute is incorrectly added to the fieldset,
causing the entire fieldset to be read out on change in some browsers. This
is unnecessary.
It also does not announce the current state of the fieldset (collaped or
open) and should.
2014-02-07 16:20:21 +08:00
Andrew Nicols 4974d22b8d MDL-43267 Javascript: Improve focus before and after drag/drop 2014-02-07 15:12:18 +08:00
Andrew Nicols 472b07b8e7 MDL-43267 Javascript: Remove aria drag/drop related attributes for drag/drop
Since we provide an alternative interface rather than describing the
locations for each drop, we should not add aria-grabbed, or
aria-dropeffect.
2014-02-07 14:17:27 +08:00
Andrew Nicols de5c64fa7c MDL-43267 Javascript: Improve accessibility of keyboard move
Change the keyboard move descriptions to allow for more detailed
descriptions such as:
* "After 'X'"; or
* "To top of section 'Y'"
2014-02-07 14:12:45 +08:00
Petr Skoda 98d135fea3 MDL-43344 upgrade to latest Flowplayer 2014-02-07 13:12:00 +08:00
Sam Hemelryk 27ebbdd703 weekly release 2.6.1+ 2014-02-07 11:46:12 +13:00
Yuliya Bozhko 79405669f9 MDL-43978 badges: Fix lang string 2014-02-07 09:10:47 +13:00
Matt Petro 82d0300757 MDL-44029 mod_quiz: Fixing group deleted handler so it does not remove user overrides. 2014-02-06 14:14:21 -05:00
Russell Smith 905b88c69c MDL-43926 files: Unit tests cannot assume id values. 2014-02-06 09:49:44 +08:00
Sam Hemelryk 155771cb4b Merge branch 'MDL-43936_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-02-06 10:04:06 +13:00
apsdehal a1b52cb282 MDL-43200 WebServices: Reset Instance variable 2014-02-06 01:05:29 +05:30
Eric Merrill e29585b206 MDL-43946 gradebook upgrade Improve SQL to find duplicate sortorders. 2014-02-05 09:57:30 -05:00
Tim Hunt 7e00410338 MDL-43936 questions: fix my lame spelling in upgrade.txt.
Thanks to Mark Nelson for the suggested improvements.
2014-02-05 11:59:53 +00:00
Marina Glancy 270cd52103 Merge branch 'MDL-42339_m26' of git://github.com/rwijaya/moodle into MOODLE_26_STABLE 2014-02-05 15:57:21 +08:00
Rossiani Wijaya a3b0030e04 MDL-42339 - removed double formatting for set_title() and set_heading() 2014-02-05 15:40:25 +08:00
Dan Poltawski 824fef6892 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:32 +08:00
Yuliya Bozhko b70d618c04 MDL-43774 badges: Stop overriding default course navigation 2014-02-05 10:47:57 +13:00
Yuliya Bozhko 256731fd39 MDL-43978 badges: Display error message to guest users viewing "My Badges" page 2014-02-05 09:57:52 +13:00
Iñaki Arenaza b1f5a038f3 MDL-32724: LDAP Auth function user_update() returns true even if update has failed 2014-02-04 19:28:06 +01:00
Eloy Lafuente (stronk7) d088fbebac Merge branch 'MDL-43911-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-04 10:53:28 +01:00
Eloy Lafuente (stronk7) 4947703a0b Merge branch 'wip-MDL-41384-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-02-04 10:40:57 +01:00
Andrew Nicols 066bfe30b0 MDL-43641 Javascript: Correct default dialogue centering 2014-02-04 15:40:42 +08:00
Damyon Wiese ce296e211f MDL-43805 assign: Prevent behat fail on ci - editpdf is not available there
Ghostscript is not setup on the ci servers, so the editpdf feature will be automatically
disabled. This means that I cannot click on "Hide Annotate PDF".
2014-02-04 13:44:07 +08:00
Andrew Nicols e719c59c0e MDL-43941 Course: Allow AJAX show/hide of activities in hidden and orphaned sections 2014-02-04 10:57:46 +08:00
Sam Hemelryk 82bef99867 Merge branch 'MDL-43369-26' of git://github.com/jamiepratt/moodle into MOODLE_26_STABLE 2014-02-04 15:24:02 +13:00
Andrew Nicols b954cb004c MDL-43911 Behat: Save dumps of the page content to disk on scenario failure 2014-02-04 08:53:19 +08:00
Oleg Sychev c5a229c2f1 MDL-42456: add Mercurial vcs support to plugin_external_source 2014-02-04 13:10:57 +13:00
Sam Hemelryk 93289de65e Merge branch 'MDL-43885-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-04 12:38:28 +13:00
Marina Glancy b207d05e48 MDL-43821 completion: fix bug in section completion progress
Thanks to Shane Dye for the provided patch
2014-02-04 00:11:52 +01:00
Eloy Lafuente (stronk7) e28eb21659 Merge branch 'wip-MDL-43828-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-02-03 23:58:14 +01:00
Sam Hemelryk 5dce0f2a1a Merge branch 'MDL-43892_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-02-04 10:57:37 +13:00
Sam Hemelryk 90c15466d8 Merge branch 'wip-MDL-33920-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-02-04 10:47:09 +13:00
Sam Hemelryk c78f073a41 Merge branch 'MDL-43936_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-02-04 10:11:47 +13:00
Gordon Bateson cb5639ca1c MDL-40410 remove ampersands required for PHP strict standards lib/tablelib.php 2014-02-04 10:05:53 +13:00
Sam Hemelryk 2ad02f9c91 Merge branch 'MDL-43884-26' of git://github.com/ankitagarwal/moodle into MOODLE_26_STABLE 2014-02-04 09:11:41 +13:00
Sam Hemelryk fa0b936d59 Merge branch 'wip-MDL-39942-MOODLE_26_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_26_STABLE 2014-02-04 08:29:17 +13:00
Eloy Lafuente (stronk7) fa10d60b15 Merge branch 'm26_MDL-37714' of git://github.com/greg-or/moodle into MOODLE_26_STABLE 2014-02-03 17:58:38 +01:00
Marina Glancy 8ded044775 Merge branch 'MDL-41647_26' of git://github.com/apsdehal/moodle into MOODLE_26_STABLE 2014-02-03 17:34:57 +08:00
Dan Poltawski b7f4097043 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:21 +08:00
Dan Poltawski 5f38edeefd MDL-42882 upgrade: unit tests for root folders upgrade
Just verifying the original behaviour
2014-02-03 17:30:20 +08:00
David Monllao 74d357b1c2 MDL-43838 behat: Clean theme compatibility with small and medium screen sizes 2014-02-03 17:01:48 +08:00
Marina Glancy 839b58679d Merge branch 'MDL-43805-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-02-03 16:09:37 +08:00
Marina Glancy 79efe4f22b Merge branch 'w05_MDL-43905_m26_loginevents' of git://github.com/skodak/moodle into MOODLE_26_STABLE 2014-02-03 15:34:32 +08:00
Marina Glancy 18a28dde45 Merge branch 'MDL-43593-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-02-03 15:07:53 +08:00
Marina Glancy 94776f1bfa Merge branch 'MDL-43951_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-02-03 14:54:11 +08:00
David Monllao 9a13b1108f MDL-43951 behat: Fixing random failure
NodeElement->hasAttribute() (JS enabled) queries selenium
about whether it has any attribute or not, if due to an
AJAX request the field node changed selenium can not access
that node and throws an exception.
2014-02-03 13:59:32 +08:00
Marina Glancy 52b3120916 Merge branch 'MDL-43440-26' of git://github.com/mr-russ/moodle into MOODLE_26_STABLE 2014-02-03 13:43:50 +08:00
apsdehal 3a1ade2544 MDL-41646 Wiki: Removed unnecessary wiki_info class 2014-02-02 15:51:30 +05:30
apsdehal 1ab256742d MDL-41647 WebServices: Changed notification CSS class 2014-02-02 15:24:40 +05:30
apsdehal 3a98e73a54 MDL-41644 Backup: Update CSS class .notifywarning with .notifyproblem 2014-02-02 03:31:37 +05:30
Tim Hunt bdeb5d0bf1 MDL-43936 questions: document renderer API change. 2014-01-31 14:12:35 +00:00
Tim Hunt 9b62fec54a MDL-43926 Unit tests shouldn't assume only one category on install 2014-01-31 10:46:35 +00:00
Marina Glancy cfd46e76c6 MDL-43828 forum: allow to select single available group when posting 2014-01-31 17:00:19 +08:00
Marina Glancy 1c4b2c0b8d 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 16:59:54 +08:00
Marina Glancy e262d58d6c MDL-41384 upgrade: make sure to re-read $SITE from DB when course table is altered 2014-01-31 16:59:54 +08:00
Marina Glancy 97eb0e4473 MDL-33920 filepicker: hide 'save as' field when not applicable 2014-01-31 16:48:16 +08:00
Marina Glancy 4f6e4f8d86 weekly release 2.6.1+ 2014-01-31 14:11:19 +08:00
Marina Glancy 814a6297ec Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2014-01-31 14:11:18 +08:00
Petr Škoda 4d7f209923 MDL-43905 fix update of user login times
There needs to be only one event during user login.
The timemodified field is not supposed to be updated during login.
2014-01-31 10:07:20 +08:00
Gregory Faller 1d8d52cdd9 MDL-37714: Correctly identify frequently used comments during restore 2014-01-31 10:24:59 +10:30
Andrew Nicols c5609f6dc5 MDL-42928 Filepicker: Disable behat tests run by phantom
There seems to be a bug relating to overflow: hidden on the body tag in
some cases which is only showing for dialogues which belong to the
filepicker.

Disabling these for the moment as this issue may be related to MDL-43712
which is a work in progress.
2014-01-30 17:13:56 +08:00
Damyon Wiese e008e04db1 MDL-43805 assign: Behat test for quickgrading bug 2014-01-29 20:42:41 +08:00
Damyon Wiese 6b23bd16da MDL-43805 assign: Quickgrading wipes out grades for hidden columns.
Grr.. quickgrading will always be a hack.
2014-01-29 20:42:38 +08:00
Andrew Nicols 20a93a61db 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:17:03 +08:00
Tim Hunt e82aee6895 MDL-43892 dbtransfer: Fix missing string. 2014-01-28 15:56:28 +00:00
Eloy Lafuente (stronk7) 04224a6dc7 Merge branch 'MDL-42928-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-28 12:22:56 +01:00
Ankit Agarwal 90ace35a9d MDL-43884 database: Fix get_tables() api for external stores 2014-01-28 16:54:35 +08:00
Kevin Wiliarty 414fcf2584 MDL-39942: invite only users who can post to discuss 2014-01-27 22:35:17 -05:00
Andrew Nicols c81672b56d MDL-42928 JavaScript: Disable lockScroll for small chooserdialogues 2014-01-28 09:50:45 +08:00
Andrew Nicols eb97871058 MDL-42928 JavaScript: Add LockScroll to all modal dialogues 2014-01-28 09:50:27 +08:00
Andrew Nicols d07b03422d MDL-42928 JavaScript: Create a module to handle page scroll locking 2014-01-28 09:50:11 +08:00
Eloy Lafuente (stronk7) 960dfcae59 Merge branch 'm26_MDL-43797' of https://github.com/totara/moodle into MOODLE_26_STABLE 2014-01-28 00:44:24 +01:00
David Curry 9eb88a59dd MDL-43797 lib/db/upgrade.php: Optimise sql for my_pages deletion
Change-Id: Ibf8da394e3357fdde351eac49627539eb412e247
2014-01-28 12:34:11 +13:00
Sam Hemelryk 9681639337 Merge branch 'MDL-43246_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-01-28 12:16:26 +13:00
Eloy Lafuente (stronk7) 115707c2b5 Merge branch '43688-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-28 00:00:16 +01:00
Eloy Lafuente (stronk7) d9613f122f Merge branch 'MDL-43874_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-01-27 23:53:33 +01:00
David Curry ade2c99109 MDL-43797 lib/db/upgrade.php: Remove custom pages for deleted users
Change-Id: Ief5ec1dd0930e55b6f0bf2e0d2caa3febec07b18
2014-01-28 11:30:00 +13:00
David Curry ee7d0bbfcf MDL-43797 lib/moodlelib.php: Remove custom homepages on user deletion
Change-Id: I43359a630c0b668ed3312828c15acc9cc220e49b
2014-01-28 11:27:40 +13:00
Eloy Lafuente (stronk7) 646f774a0f Merge branch 'MDL-43757_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-01-27 21:20:37 +01:00
Sam Hemelryk 83bfad45a5 Merge branch 'wip-MDL-43643-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-01-28 08:40:48 +13:00
Eloy Lafuente (stronk7) 408b3ee93f Merge branch 'wip-mdl-43765-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-01-27 19:23:35 +01:00
Eloy Lafuente (stronk7) 06b2987aad Merge branch 'wip-mdl-43766-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-01-27 19:20:02 +01:00
Eloy Lafuente (stronk7) 227164c9b6 Merge branch 'MDL-43773-MOODLE_26_STABLE' of https://github.com/lucisgit/moodle into MOODLE_26_STABLE 2014-01-27 17:22:49 +01:00
Eloy Lafuente (stronk7) ff04a96ba2 Merge branch 'MDL-43581_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-01-27 17:04:11 +01:00
Tim Hunt b006c3f9ff 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:59 +00:00
Eloy Lafuente (stronk7) 866bbb05f7 Merge branch 'wip-MDL-43800-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-01-27 12:02:36 +01:00
James Pratt b98bc5cb98 MDL-43369 : quiz statistics - average across attempts where item seen
and not across all attempts for subqs.
2014-01-27 17:37:39 +07:00
Tim Hunt b8e91060b1 MDL-43581 additionalhtmlfooter should be added to every page
Not just pages with a visible footer.
2014-01-27 10:26:02 +00:00
Eloy Lafuente (stronk7) 7a6ad10586 Merge branch 'MDL-43809_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-01-27 11:00:32 +01:00
AMOS bot e73eb478c4 Automatically generated installer lang files 2014-01-27 00:42:36 +00:00
Mark Nielsen 91e6e56014 MDL-43734: Prevent purging of all user session cache 2014-01-27 00:28:53 +01:00
Sam Hemelryk 250611b579 Merge branch 'w04_MDL-43746_m26_courselogin' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-01-27 11:32:25 +13:00
Sam Hemelryk 5ccfa40292 Merge branch 'MDL-43794_m26' of https://github.com/merrill-oakland/moodle into MOODLE_26_STABLE 2014-01-27 11:16:15 +13:00
Tony Butler bd538db810 MDL-43773 mod_choice: Swap order of name column headings in text export 2014-01-24 11:22:39 +00:00
Damyon Wiese e205c062b1 MDL-43593 Assign editpdf: More robust handling of errors from TCPDF.
This includes a check to see if there are 0 pages in the combined pdf,
catching exceptions and suppressing php warnings and errors from bad pdf files.

Also - Use TCPDF directly to check if pdfs are compatible. The previous check was
letting dodgy PDFs through which then failed at generation time. This way dodgy
pdfs will get run through ghostscript early and cleaned up.
2014-01-24 16:17:29 +08:00
David Monllao 9cb75a10bf 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:12:18 +08:00
David Monllao c18481fab8 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:12:12 +08:00
Petr Skoda c22d036916 MDL-43746 fix require_course_login regression caused by MDL-25981 2014-01-24 13:51:54 +08:00
Russell Smith cac73cf1ec 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.

Conflicts from extra tests in master:
	blocks/comments/tests/events_test.php
	mod/assign/submission/comments/tests/events_test.php
	mod/data/tests/lib_test.php
	mod/glossary/tests/events_test.php
2014-01-24 14:56:53 +11:00
AMOS bot d4f1027e54 Automatically generated installer lang files 2014-01-24 00:42:09 +00:00
Jason Fowler a4ea4e2b1a MDL-40786 User profile: Fixing narrow screen RTL collapse 2014-01-24 08:38:27 +08:00
Nadav Kavalerchik d86801bed7 MDL-40786 User Profile: Right align profile fields in RTL mode (theme/bootstrapbase, theme/clean) 2014-01-24 08:38:23 +08:00
Sam Hemelryk a3e2211c5f MDL-43688 dndupload: fixed positioning across themes 2014-01-24 09:52:40 +13:00
Tim Hunt 8b080d52ff MDL-43809 qformat_xml messes up $s in multianswer questions. 2014-01-23 15:19:13 +00:00
Tim Hunt 68575baff3 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:18:56 +00:00
Tim Hunt 7e71efabf9 MDL-43246 some question data mapper unit tests
With fixes for the issues unearthed by these tests.
2014-01-23 15:18:55 +00:00
Tim Hunt 4caa3de6db MDL-43246 give unit tests class a better name. 2014-01-23 15:18:55 +00:00
Eloy Lafuente (stronk7) b88bb98ab7 weekly release 2.6.1+ 2014-01-23 12:38:43 +01:00
Eloy Lafuente (stronk7) fc27206268 Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2014-01-23 12:38:39 +01:00
Marina Glancy 929b5b3210 MDL-43643 chat: do not assign to nonexisting cm_info properties 2014-01-23 11:00:33 +08:00
Marina Glancy 9b4e4b7f64 MDL-43800 course: groupings are sorted alphabetically 2014-01-23 09:07:54 +08:00
Eric Merrill ff71f55265 MDL-43794 Files API Set the mtime of files to extraction time.
The restore cleanup code expects the mtime to be the time of extraction
not the mtime before archiving. If set to the old mtime, the restore
files may be cleaned up before the restore is complete.

This behaviour also matches the behaviour of the zip unpacker.
2014-01-22 11:07:07 -05:00
Dan Poltawski 8f89ca5780 Merge branch 'MDL-41506-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-21 23:29:25 +08:00
Dan Poltawski 32418eeee0 Merge branch 'mdl34020-moodle26' of https://github.com/tlock/moodle into MOODLE_26_STABLE 2014-01-21 15:21:20 +08:00
Dan Poltawski 0469922b5f Merge branch '43714-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-01-21 14:49:27 +08:00
Dan Poltawski 1cbda6fabd Merge branch 'MDL-43760-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-01-21 14:28:52 +08:00
Damyon Wiese eef0d3043c Merge branch 'MDL-43725-26' of git://github.com/ankitagarwal/moodle into MOODLE_26_STABLE 2014-01-21 13:55:49 +08:00
Dan Poltawski 1f77f14fb9 Merge branch 'wip-MDL-43700-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-01-21 12:24:41 +08:00
Dan Poltawski 574111a94e Merge branch 'MDL-43717_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-01-21 12:19:36 +08:00
Dan Poltawski 66b74e5aa5 Merge branch 'MDL-43693-MOODLE_26_STABLE' of https://github.com/lucisgit/moodle into MOODLE_26_STABLE 2014-01-21 11:21:54 +08:00
Rajesh Taneja 81efab0cbb MDL-43765 reports: Fixed addtional name warning
Fix the alternate name warning which is generated when course participation report
is viewed
2014-01-21 11:00:45 +08:00
Damyon Wiese 9717c4b19c Merge branch 'MDL-41688-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-21 09:37:04 +08:00
Damyon Wiese d6d18a2b7b Merge branch 'MDL-43732_m26' of github.com:merrill-oakland/moodle into MOODLE_26_STABLE 2014-01-21 09:29:40 +08:00
Eloy Lafuente (stronk7) 8d8e51b073 Merge branch 'wip-MDL-43333-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-01-21 02:01:35 +01:00
Eric Merrill 2d73ec85ea MDL-43732 quiz Fix styles so that question div doesn't overlap controls. 2014-01-20 19:57:10 -05:00
Eloy Lafuente (stronk7) b61b21d7ee Merge branch 'wip-MDL-43211-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-01-21 01:54:09 +01:00
Eloy Lafuente (stronk7) a45dbb214b Merge branch 'MDL-43401-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-21 01:46:54 +01:00
Eloy Lafuente (stronk7) f973e5f968 Merge branch 'MDL-43480_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-01-21 01:44:45 +01:00
Eloy Lafuente (stronk7) 3e1eb36d77 Merge branch 'MDL-41693-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-21 01:13:54 +01:00
Eloy Lafuente (stronk7) 3677e0c1aa Merge branch 'MDL-39684-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-21 00:20:51 +01:00
Eloy Lafuente (stronk7) 133e38fdbb Merge branch 'MDL-40533-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-21 00:17:39 +01:00
Eloy Lafuente (stronk7) 7c5074ce82 Merge branch 'MDL-43743_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-01-21 00:05:11 +01:00
Eloy Lafuente (stronk7) a7029b542e Merge branch 'MDL-41362-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-21 00:02:11 +01:00
Frederic Massart ff66e9daa8 MDL-41767 themes: Support for parent-specific sheets in plugins 2014-01-20 13:31:58 +01:00
Frederic Massart b12cc0679f MDL-41688 gradebook: Improved grading layout on bootstrapbase themes 2014-01-20 10:43:10 +01:00
Tony Butler cfd4b8a3f5 MDL-43632 mod_feedback: Use SSL for reCAPTCHA API request if Moodle is using it 2014-01-20 17:14:38 +08:00
Rajesh Taneja ee7bb53ccd MDL-43766 reports: Fixed wrong string variable 2014-01-20 16:47:01 +08:00
Dan Poltawski 5f074a6bb0 Merge branch 'wip-MDL-41062-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-01-20 15:29:21 +08:00
Dan Poltawski 4f02d0074a Merge branch '42682-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-01-20 15:25:49 +08:00
Dan Poltawski 1605660ad2 Merge branch 'MDL-43690_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-01-20 14:24:44 +08:00
Damyon Wiese 62415470ae MDL-43760 Potential fix for fletcher scott issues with fullname. 2014-01-20 13:39:19 +08:00
Damyon Wiese e35e70f83d Merge branch 'MDL-42495-m26' of git://github.com/micaherne/moodle into MOODLE_26_STABLE 2014-01-20 13:21:34 +08:00
Dan Poltawski 8a073e4364 Merge branch 'MDL-42980_m26' of git://github.com/rwijaya/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-20 12:56:20 +08:00
Marina Glancy 8de9100136 MDL-41062 gradebook: corrections to grade_item upgrade script, more tests 2014-01-20 12:25:56 +08:00
Damyon Wiese b53af0f2a6 Merge branch 'MDL-39683-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-20 11:29:21 +08:00
Damyon Wiese 5b860c69a2 Merge branch '43675-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-01-20 10:56:34 +08:00
Dan Poltawski 37b0d3adad Merge branch 'MDL-43671_message_26' of https://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-01-20 10:53:53 +08:00
Dan Poltawski da2e9d519b Merge branch 'MDL-40139-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-20 10:33:38 +08:00
Ankit Agarwal 6cfed595c9 MDL-43725 report_loglive: Fixing undefined variable error
AMOS BEGIN
 CPY [page,report_log],[page,report_loglive]
AMOS END
2014-01-20 10:23:55 +08:00
Damyon Wiese df25d33379 Merge branch 'MDL-43733_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-01-20 10:13:54 +08:00
Andrew Davis 9fade08632 MDL-43671 message: removed an overly cautious check 2014-01-20 10:06:27 +08:00
Dan Poltawski e53eb2a208 Merge branch 'wip-mdl-43306-m26' of git://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-01-20 09:45:44 +08:00
David Monllao 2998a4cb30 MDL-43743 mod_scorm: Adding package disclaimer
As the package is licensed under CC 3.0 we should
be compliant with attribution.
2014-01-20 09:32:17 +08:00
Dan Poltawski 0b8749c892 Merge branch 'MDL-40752-26' of git://github.com/phalacee/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-20 09:26:12 +08:00
AMOS bot e1882ddaef Automatically generated installer lang files 2014-01-20 00:41:22 +00:00
AMOS bot bb2e1de1c2 Automatically generated installer lang files 2014-01-19 00:41:56 +00:00
Tim Hunt 4c4fc6d629 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:49 +00:00
Tim Hunt 217d839ded MDL-43690 quiz_question_tostring missing s().
This meant that the edit quiz page sometimes had invalid HTML.
2014-01-17 10:47:00 +00:00
David Monllao cd554c4287 MDL-43743 behat: Lightweight scorm package
The previous used package were adding a second iframe
inside the scorm iframe and was slow loading it;
this patch replaces it for a simple one without any
extra iframe.
2014-01-17 17:43:25 +08:00
Dan Poltawski 15fac63956 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:36:37 +08:00
rwijaya dc842aaa36 MDL-42980 clean theme: fixed add/cancel buttons position for safari on iPhone with ios7. 2014-01-17 16:14:14 +08:00
David Monllao ef967ae424 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:22 +08:00
David Monllao 8279060aca MDL-43480 behat: Removing @_only_local tags from steps where it is not necessary 2014-01-17 10:42:22 +08:00
David Monllao 2ab17fbdeb MDL-43717 behat: Replacing 2050 for a date eariler than the max timestamp 32bit limit
All credit goes to Michael de Raadt.
2014-01-17 10:37:27 +08:00
AMOS bot 4a45541511 Automatically generated installer lang files 2014-01-17 00:48:06 +00:00
Sam Hemelryk 9b93e7b472 MDL-43714 blocks: fixed notice when moving to an empty region 2014-01-17 10:47:23 +13:00
Sam Hemelryk aafc6872e4 MDL-43675 navigation: courses branch is now recognised as expandable 2014-01-17 10:27:05 +13:00
Sam Hemelryk d073c81248 MDL-42682 theme_bootstrapbase: fixed styling of discussion selector
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-17 10:25:26 +13:00
Sam Hemelryk 74aa973e8e MDL-42682 theme_bootstrapbase: fixed forum search alignment
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-17 10:25:24 +13:00
Eloy Lafuente (stronk7) 9c1c9d8954 weekly release 2.6.1+ 2014-01-16 18:51:19 +01:00
Eloy Lafuente (stronk7) 40e8488c8d Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2014-01-16 18:51:14 +01:00
AMOS bot 9a57b4bc0b Automatically generated installer lang files 2014-01-16 00:43:16 +00:00
Eloy Lafuente (stronk7) ba541f01b6 Merge branch 'm26_MDL-43222' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-01-15 22:02:29 +01:00
Dan Marsden 64156342ad MDL-43222 SCORM: Fix invalid sql 2014-01-16 09:49:36 +13:00
Rajesh Taneja ebc09cc3ad 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:31:57 +08:00
Damyon Wiese 5af6a32866 Merge branch 'MDL-43621_26' of https://github.com/totara/openbadges into MOODLE_26_STABLE 2014-01-15 13:30:58 +08:00
Adrian Greeve cbfbe43604 MDL-43700 reports: Update to the sql in the comment locallib to include additional name fields. 2014-01-15 12:05:40 +08:00
Yuliya Bozhko f0040e7daf MDL-43621 badges: Fix has_awards() result when deleted users are the only recipients of a badge 2014-01-15 16:25:48 +13:00
Eloy Lafuente (stronk7) 893139fd12 Merge branch 'MDL-43439_26-dateformat' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-01-15 04:01:11 +01:00
Damyon Wiese f5d810b4f3 Merge branch 'MDL-43461_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-01-15 09:38:46 +08:00
David Monllao e5ee31453a MDL-43439 behat: Dir date without - separators 2014-01-15 09:18:55 +08:00
Dan Poltawski 05297cc0a8 Merge branch 'MDL-43619-m26' of git://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-01-15 08:20:39 +08:00
Eloy Lafuente (stronk7) 66e46b4859 Merge branch 'MDL-43439_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-01-15 00:11:18 +01:00
Yuliya Bozhko 4768a4768b MDL-43621 badges: Don't count deleted users as badge recipients 2014-01-15 09:57:26 +13:00
Yuliya Bozhko b4918e7d8a MDL-43621 badges: Don't display deleted users in badge recipients list 2014-01-15 09:54:19 +13:00
Eloy Lafuente (stronk7) 65e9de16c2 Merge branch 'wip-MDL-31597-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-01-14 21:49:37 +01:00
Frederic Massart 1e8b6e0087 MDL-40533 block_html: Remove styles specific to the block 2014-01-14 19:07:22 +01:00
Ruslan Kabalin 9d649ad7a3 MDL-43693: assignment: Fix JS error on grading page. 2014-01-14 16:14:41 +00:00
Eloy Lafuente (stronk7) ff48f6f0e7 Merge branch 'MDL-43332_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-01-14 16:53:40 +01:00
Eloy Lafuente (stronk7) f5191afd30 Merge branch 'm26_MDL-43222' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-01-14 16:45:38 +01:00
sam marshall a6a14f2155 MDL-43619 Roles: reset_role_capabilities unit test, cache fix 2014-01-14 13:47:38 +00:00
sam marshall bf2c42e8ee MDL-43619 Roles: reset_role_capabilities function destroys overrides 2014-01-14 13:47:37 +00:00
Frederic Massart b31c53a372 MDL-41506 theme_bootstrapbase: Implement highlight class 2014-01-14 11:24:10 +01:00
Dan Poltawski f9d14c4cd7 Merge branch 'MDL-43664-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-01-14 16:50:09 +08:00
Dan Poltawski 79c8b9fcae Merge branch 'm26_MDL-43577_Incorrect_Variable_Expansion' of https://github.com/scara/moodle into MOODLE_26_STABLE 2014-01-14 15:58:12 +08:00
Dan Poltawski 33d83d755a Merge branch 'MDL-43642_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-01-14 15:48:52 +08:00
Dan Poltawski 4a2ac9676a Merge branch 'm26_MDL-43575_Typo_In_The_Overridden_setOption' of https://github.com/scara/moodle into MOODLE_26_STABLE 2014-01-14 15:37:04 +08:00
Dan Poltawski 30354dc0d2 Merge branch 'MDL-43178_forum_26' of https://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-01-14 15:26:52 +08:00
David Monllao e906a85cc3 MDL-43439 behat: Save the screenshots to the specified location 2014-01-14 15:24:09 +08:00
Damyon Wiese 7b0e78bf83 Merge branch 'w02_MDL-43511_m26_bankcache' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-01-14 14:29:34 +08:00
Damyon Wiese 24607ba326 Merge branch 'MDL-43371-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-14 14:05:27 +08:00
Damyon Wiese eb8f1fef79 Merge branch 'MDL-43460-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-14 13:33:30 +08:00
Damyon Wiese 5a0cf2cda0 Merge branch 'w02_MDL-43488_m26_signreq' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-01-14 13:18:35 +08:00
David Monllao 58dd0d506e 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:14:40 +08:00
David Monllao 22a09b7d40 MDL-43461 behat: Using linux-style directory separators when using cygwin 2014-01-14 13:14:14 +08:00
Damyon Wiese 020705cca0 Merge branch 'MDL-43610-m26' of git://github.com/micaherne/moodle into MOODLE_26_STABLE 2014-01-14 12:37:17 +08:00
Adrian Greeve e5eddec0b7 MDL-31597 gradebook: Update to gradebook behat tests to include testing grade weightings. 2014-01-14 11:48:36 +08:00
Adrian Greeve 7269154b44 MDL-31597 gradebook: Removed the percentage symbol from weights in the gradebook. 2014-01-14 11:48:12 +08:00
Dan Poltawski 1e65c37e97 Merge branch 'm26_MDL-42792' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-01-14 11:28:44 +08:00
Dan Poltawski b3eacbd5da Merge branch 'MDL-43412_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-01-14 10:46:34 +08:00
Andrew Nicols 56f0dc64ed MDL-43664 Javascript: Use YUI indexOf for pending_js tracking
Some old browsers do not support indexOf and so cannot determine whether JS
script is in progress. The YUI Y.Array module polyfills the indexOf
functionality when it does not exist.
2014-01-14 10:40:39 +08:00
Nadav Kavalerchik f4075b7127 MDL-40752 Login RTL: Swapping the panels on two-panel login pages for RTL
Additions to the patch made by Jason Fowler <phalacee@gmail.com>
2014-01-14 09:23:46 +08:00
AMOS bot 1b696dcde0 Automatically generated installer lang files 2014-01-14 00:45:37 +00:00
Mark Nelson 0deddeed2f MDL-43332 core_grades: automated basic grade viewing functionality performed in MDLQA-317 2014-01-13 15:48:12 -08:00
Eloy Lafuente (stronk7) 8c75f05721 Merge branch 'MDL-43109_26' of https://github.com/mdikih/moodle into MOODLE_26_STABLE 2014-01-13 21:51:54 +01:00
Matteo Scaramuccia fc33a35857 MDL-43575 Libraries Google_CurlIO ext, typo in the overridden setOption(). 2014-01-13 21:34:48 +01:00
Matteo Scaramuccia 5725c1850f MDL-43577 Messages Incorrect variable expansion in the message template. 2014-01-13 21:11:09 +01:00
Frederic Massart c7d4465070 MDL-41362 theme_bootstrapbase: Alignment of User Selector controls 2014-01-13 18:41:32 +01:00
Frederic Massart b4eed40953 MDL-39684 theme: RTL align of restrictions label in file manager 2014-01-13 16:27:52 +01:00
Frederic Massart 08a491e16d MDL-39683 message: RTL alignment of messages in theme_base 2014-01-13 15:41:30 +01:00
Nadav Kavalerchik 53a26c87d6 MDL-39683 Messages, Themes: Fix "my" and "other person" message alignment in RTL mode (theme/clean) 2014-01-13 15:29:53 +01:00
Dan Poltawski a377868a50 Merge branch 'MDL-40849-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-13 15:50:34 +08:00
Frederic Massart 7e343b7304 MDL-40849 gradingform_guide: Fixed CSS issues with Bootstrapbase 2014-01-13 08:12:18 +01:00
Dan Poltawski 4d2984c136 Merge branch '43598-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-01-13 12:37:26 +08:00
Dan Poltawski 6719aa5ec5 Merge branch 'MDL-39603-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-13 12:34:58 +08:00
Dan Poltawski d9dcb97bbe Merge branch '41226-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-01-13 11:11:12 +08:00
Dan Poltawski 51bced46a7 Merge branch '40821-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-01-13 11:03:37 +08:00
Dan Poltawski a893680091 Merge branch '40693-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-01-13 10:07:54 +08:00
Dan Poltawski 67a75acaff Merge branch 'MDL-41152-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-13 10:03:47 +08:00
Sam Hemelryk 6060234de5 MDL-40205 theme: fixed overflow of block headers
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-13 09:41:25 +08:00
Dan Poltawski 892173b3f3 Merge branch 'MDL-40705-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-13 09:36:12 +08:00
Dan Poltawski bc7a77f14d Merge branch 'MDL-39661-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-13 08:54:23 +08:00
Sam Hemelryk a2fb18da50 MDL-43598 dialogue: fixed bug with render procedure
Conflicts:
	lib/yui/build/moodle-core-chooserdialogue/moodle-core-chooserdialogue-min.js
	lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js
2014-01-13 08:25:42 +13:00
Sam Hemelryk cdd7fe6a48 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:12 +13:00
Sam Hemelryk fe7bf6425a MDL-40821 theme_bootstrapbase: show the current lang in the menu 2014-01-13 08:16:04 +13:00
Sam Hemelryk 495a02bb5a MDL-40693 theme_bootstrapbase: changed navbar separator to official separator 2014-01-13 08:15:39 +13:00
Petr Škoda a27c1faa9f MDL-43488 remoe city and country requirement from signup
This was supposed to be part of MDL-28558.
2014-01-12 18:23:56 +08:00
Petr Škoda 6b4ae63ac8 MDL-43511 do not cache the MUC cache in question code 2014-01-12 18:21:29 +08:00
Michael Aherne 4b6c90cb17 MDL-46310 assign Prevent blind marking submission notification email being sent to noreplyemail address 2014-01-10 16:03:17 +00:00
Frederic Massart 543397a50d MDL-40139 block_privatefiles: Prevent usage of unmaintained edit page 2014-01-10 13:01:56 +01:00
Frederic Massart 0047b06264 MDL-41693 group: Use standard layout for group related pages 2014-01-10 12:29:56 +01:00
Damyon Wiese 134462ae28 MDL-43439: Behat - new $CFG param - behat_screenshot_after_failure 2014-01-10 17:56:04 +08:00
David Monllao 52a027398e MDL-43642 behat: Setting the correct files @package 2014-01-10 17:47:49 +08:00
Dan Marsden e71ac727e3 MDL-43222 SCORM: correct check for list of attempts and make correct check for current attempt in scorm_get_toc 2014-01-10 22:04:54 +13:00
Dan Marsden 8c5dd5e5eb 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:06:39 +13:00
Marina Glancy 0078652172 MDL-43333 blocks: move activity icon in social and main menu 2014-01-10 12:09:09 +08:00
Andrew Davis b4de89cc95 MDL-43178 mod_forum: fixed the digest setting confirmation message 2014-01-10 08:42:21 +08:00
Frederic Massart 750f660990 MDL-43401 mod_lesson: Fix serving of the pluginfile mediafile 2014-01-09 16:56:06 +01:00
Frederic Massart 7e3c5c34d6 MDL-43371 mod_lesson: Remove files upon page or module deletion 2014-01-09 16:23:17 +01:00
Frederic Massart 9a093f57a1 MDL-41152 theme_bootstrapbase: Optimise width for gradebook tree view 2014-01-09 10:44:40 +01:00
Marina Glancy 69d44a56fe MDL-43211 blocks: style edit icons in main menu and social activities 2014-01-09 17:29:30 +08:00
Marina Glancy 41391dfd9d MDL-43211 course: do not return indent icon if not needed 2014-01-09 17:29:25 +08:00
Tim Hunt 4cbc5af3a6 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 18:00:56 +00:00
Frederic Massart bc936e8ac8 MDL-39603 theme_bootstrapbase: Alignment of filter form elements on enrol page 2014-01-08 10:45:13 +01:00
Frederic Massart bf6527407d MDL-40705 theme_bootstrapbase: Handling of long words in block content 2014-01-06 15:45:19 +01:00
Frederic Massart 2424069da2 MDL-39661 blocks: Removed notice when moving a block 2014-01-06 12:44:23 +01:00
Frederic Massart 8d1293da86 MDL-43460 calendar: Decode event description links on restore 2014-01-06 11:46:56 +01:00
Michael Dikih 79f0a612c4 MDL-43109: mod/wiki - When editing pages populate the default value for the tags input. 2013-12-10 14:17:17 +10:30
Tim Lock 56dc43f3d2 MDL-34020: Further work on IMS package importing when using Blackboard packages 2013-12-04 15:18:13 +10:30
Michael Aherne 217c5d8208 MDL-42495 lesson Prevent coding error for invalid user 2013-12-02 10:53:20 +00:00
477 changed files with 10169 additions and 1880 deletions
+7
View File
@@ -1128,5 +1128,12 @@
</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>
+4 -1
View File
@@ -41,8 +41,11 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) { // sp
}
// calendar
// Calendar settings.
$temp = new admin_settingpage('calendar', new lang_string('calendarsettings','admin'));
$temp->add(new admin_setting_configselect('calendartype', new lang_string('calendartype', 'admin'),
new lang_string('calendartype_desc', 'admin'), 'gregorian', \core_calendar\type_factory::get_list_of_calendar_types()));
$temp->add(new admin_setting_special_adminseesall());
//this is hacky because we do not want to include the stuff from calendar/lib.php
$temp->add(new admin_setting_configselect('calendar_site_timeformat', new lang_string('pref_timeformat', 'calendar'),
+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
@@ -35,7 +35,7 @@ use Behat\Behat\Context\Step\Given as Given,
/**
* 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
+2 -2
View File
@@ -183,8 +183,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();
@@ -1,4 +1,4 @@
@tool @tool_behat @_only_local
@tool @tool_behat
Feature: Set up contextual data for tests
In order to write tests quickly
As a developer
@@ -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
@@ -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,173 @@
@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 the following "activities" exists:
| activity | course | idnumber | name | intro | firstpagetitle | wikimode | visible |
| wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 |
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 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 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 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"
@@ -1,4 +1,4 @@
@tool @tool_uploadcourse @_only_local
@tool @tool_uploadcourse @_only_local @_file_upload
Feature: An admin can create courses using a CSV file
In order to create courses using a CSV file
As an admin
@@ -1,4 +1,4 @@
@tool @tool_uploadcourse @_only_local
@tool @tool_uploadcourse @_only_local @_file_upload
Feature: An admin can update courses using a CSV file
In order to update courses using a CSV file
As an admin
+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
@@ -422,6 +422,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;
+3
View File
@@ -399,6 +399,9 @@ class auth_plugin_db extends auth_plugin_base {
if (empty($user->lang)) {
$user->lang = $CFG->lang;
}
if (empty($user->calendartype)) {
$user->calendartype = $CFG->calendartype;
}
$user->timecreated = time();
$user->timemodified = $user->timecreated;
if ($collision = $DB->get_record_select('user', "username = :username AND mnethostid = :mnethostid AND auth <> :auth", array('username'=>$user->username, 'mnethostid'=>$CFG->mnet_localhost_id, 'auth'=>$this->authtype), 'id,username,auth')) {
+3
View File
@@ -90,6 +90,9 @@ class auth_plugin_email extends auth_plugin_base {
require_once($CFG->dirroot.'/user/lib.php');
$user->password = hash_internal_user_password($user->password);
if (empty($user->calendartype)) {
$user->calendartype = $CFG->calendartype;
}
$user->id = user_create_user($user, false);
+12 -3
View File
@@ -944,6 +944,9 @@ class auth_plugin_ldap extends auth_plugin_base {
if (empty($user->lang)) {
$user->lang = $CFG->lang;
}
if (empty($user->calendartype)) {
$user->calendartype = $CFG->calendartype;
}
$id = user_create_user($user, false);
echo "\t"; print_string('auth_dbinsertuser', 'auth_db', array('name'=>$user->username, 'id'=>$id)); echo "\n";
@@ -1179,6 +1182,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);
@@ -1233,8 +1237,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)),
@@ -1253,6 +1259,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)),
@@ -1270,6 +1277,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)),
@@ -1283,6 +1291,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,
@@ -1292,12 +1301,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;
}
@@ -1526,6 +1534,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);
+2 -4
View File
@@ -268,10 +268,8 @@ class auth_ldap_plugin_testcase extends advanced_testcase {
$sink->close();
// Check that the event is valid.
$this->assertCount(2, $events);
$event = $events[0];
$this->assertInstanceOf('\core\event\user_updated', $event);
$event = $events[1];
$this->assertCount(1, $events);
$event = reset($events);
$this->assertInstanceOf('\core\event\user_loggedin', $event);
$this->assertEquals('user', $event->objecttable);
$this->assertEquals('2', $event->objectid);
+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, self::PAGE_READY_JS);
// 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: Log in with the predefined admin user
Scenario: Log in 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: Log in 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: Log in as an existing admin user filling the form
Given the following "users" exists:
+1 -1
View File
@@ -176,7 +176,7 @@ if ($backup->get_stage() == backup_ui::STAGE_FINAL) {
// Display a notification and a continue button
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);
+1 -1
View File
@@ -216,7 +216,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', 'maxfraction',
'slot', 'behaviour', 'questionid', 'variant', 'maxmark', 'minfraction', 'maxfraction',
'flagged', 'questionsummary', 'rightanswer', 'responsesummary',
'timemodified'));
@@ -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;
}
+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;
}
+10
View File
@@ -2223,6 +2223,7 @@ class restore_calendarevents_structure_step extends restore_structure_step {
$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);
}
@@ -2832,6 +2833,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);
}
}
@@ -4062,6 +4069,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);
if (!property_exists($data, 'maxfraction')) {
+1 -1
View File
@@ -410,7 +410,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');
+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
+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
@@ -91,7 +91,7 @@ $namefields = get_all_user_name_fields(true, 'u');
$sql = "SELECT b.userid, b.dateissued, b.uniquehash, $namefields
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;
$badgeclass = $ibadge->badgeclass;
@@ -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), '');
@@ -663,7 +670,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)
@@ -936,7 +945,7 @@ class issued_badge implements renderable {
if ($rec) {
// Get a recipient from database.
$namefields = get_all_user_name_fields(true, 'u');
$user = $DB->get_record_sql("SELECT u.id, $namefields,
$user = $DB->get_record_sql("SELECT u.id, $namefields, 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
@@ -233,7 +233,7 @@ class core_badges_badgeslib_testcase extends advanced_testcase {
$criteria_overall = award_criteria::build(array('criteriatype' => BADGE_CRITERIA_TYPE_OVERALL, 'badgeid' => $badge->id));
$criteria_overall->save(array('agg' => BADGE_CRITERIA_AGGREGATION_ANY));
$criteria_overall = award_criteria::build(array('criteriatype' => BADGE_CRITERIA_TYPE_ACTIVITY, 'badgeid' => $badge->id));
$criteria_overall->save(array('agg' => BADGE_CRITERIA_AGGREGATION_ANY, 'module_'.$this->module->id => $this->module->id));
$criteria_overall->save(array('agg' => BADGE_CRITERIA_AGGREGATION_ANY, 'module_'.$this->module->cmid => $this->module->cmid));
// Set completion for forum activity.
$c = new completion_info($this->course);
+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
+1 -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
-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);
@@ -1,4 +1,4 @@
@block @block_activity_modules @_only_local
@block @block_activity_modules
Feature: Block activity modules
In order to overview activity modules in a course
As a manager
@@ -14,7 +14,7 @@ Feature: Block activity modules
And I click on "//a[@title=\"Show\"]" "xpath_element" in the "Assignment (2.2)" "table_row"
Scenario: Add activities block on the frontpage
And the following "activities" exists:
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 |
@@ -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
-2
View File
@@ -1,2 +0,0 @@
.block.block_html .content {padding:0;}
.block.block_html .content .no-overflow {padding:4px;}
+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%;
}
+8 -12
View File
@@ -72,6 +72,8 @@ class block_site_main_menu extends block_list {
$strmovefull = strip_tags(get_string('movefull', '', "'$USER->activitycopyname'"));
$strcancel= get_string('cancel');
$stractivityclipboard = $USER->activitycopyname;
} else {
$strmove = get_string('move');
}
$editbuttons = '';
@@ -90,18 +92,12 @@ class block_site_main_menu extends block_list {
if (!$ismoving) {
$actions = course_get_cm_edit_actions($mod, -1);
// Add the action move.
$modcontext = context_module::instance($mod->id);
$hasmanageactivities = has_capability('moodle/course:manageactivities', $modcontext);
if ($hasmanageactivities) {
$baseurl = new moodle_url('/course/mod.php', array('sesskey' => sesskey()));
$actions['move'] = new action_menu_link_primary(
new moodle_url($baseurl, array('copy' => $mod->id)),
new pix_icon('t/move', get_string('move'), 'moodle', array('class' => 'iconsmall', 'title' => '')),
null,
array('title' => get_string('move'))
);
}
// Prepend list of actions with the 'move' action.
$actions = array('move' => new action_menu_link_primary(
new moodle_url('/course/mod.php', array('sesskey' => sesskey(), 'copy' => $mod->id)),
new pix_icon('t/move', $strmove, 'moodle', array('class' => 'iconsmall', 'title' => '')),
$strmove
)) + $actions;
$editbuttons = html_writer::tag('div',
$courserenderer->course_section_cm_edit_actions($actions, $mod, array('donotenhance' => true)),
+2 -2
View File
@@ -1,7 +1,7 @@
.block_site_main_menu li { clear: both; }
.block_site_main_menu li .column { width: 100%; }
.block_site_main_menu li .buttons { float: right; margin-top: 3px;}
.block_site_main_menu li .buttons { float: right; margin: 0; }
.dir-rtl .block_site_main_menu li .buttons { float: left; }
.block_site_main_menu li .buttons a img{ vertical-align: text-bottom; margin: 0 3px;}
.block_site_main_menu li .buttons a img{ vertical-align: text-bottom;}
.block_site_main_menu .footer { margin-top: 1em; }
.block_site_main_menu .section_add_menus noscript div { display: inline;}
@@ -74,6 +74,8 @@ class block_social_activities extends block_list {
$strmovefull = strip_tags(get_string('movefull', '', "'$USER->activitycopyname'"));
$strcancel= get_string('cancel');
$stractivityclipboard = $USER->activitycopyname;
} else {
$strmove = get_string('move');
}
$editbuttons = '';
@@ -91,8 +93,18 @@ class block_social_activities extends block_list {
}
if (!$ismoving) {
$actions = course_get_cm_edit_actions($mod, -1);
$editbuttons = '<br />'.
$courserenderer->course_section_cm_edit_actions($actions, $mod);
// Prepend list of actions with the 'move' action.
$actions = array('move' => new action_menu_link_primary(
new moodle_url('/course/mod.php', array('sesskey' => sesskey(), 'copy' => $mod->id)),
new pix_icon('t/move', $strmove, 'moodle', array('class' => 'iconsmall', 'title' => '')),
$strmove
)) + $actions;
$editbuttons = html_writer::tag('div',
$courserenderer->course_section_cm_edit_actions($actions, $mod, array('donotenhance' => true)),
array('class' => 'buttons')
);
} else {
$editbuttons = '';
}
+5
View File
@@ -0,0 +1,5 @@
.block_social_activities li { clear: both; }
.block_social_activities li .column { width: 100%; }
.block_social_activities li .buttons { float: right; margin: 0; }
.dir-rtl .block_social_activities li .buttons { float: left; }
.block_social_activities li .buttons a img{ vertical-align: text-bottom;}
+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
+3 -3
View File
@@ -267,7 +267,7 @@ class blog_entry implements renderable {
'objectid' => $this->id,
'relateduserid' => $this->userid
));
$event->set_custom_data($this);
$event->set_blog_entry($this);
$event->trigger();
}
@@ -309,7 +309,7 @@ class blog_entry implements renderable {
'objectid' => $entry->id,
'relateduserid' => $entry->userid
));
$event->set_custom_data($entry);
$event->set_blog_entry($entry);
$event->trigger();
}
@@ -334,7 +334,7 @@ class blog_entry implements renderable {
'relateduserid' => $this->userid
));
$event->add_record_snapshot("post", $record);
$event->set_custom_data($this);
$event->set_blog_entry($this);
$event->trigger();
}
+1 -1
View File
@@ -1742,7 +1742,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);
}
+1 -1
View File
@@ -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;
}
/**
+1 -1
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;
}
/**
+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;
}
/**
+6 -3
View File
@@ -715,7 +715,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) {
@@ -745,7 +746,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);
@@ -855,4 +858,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
+5 -3
View File
@@ -61,7 +61,8 @@ class comment_manager {
}
$comments = array();
$sql = "SELECT c.id, c.contextid, c.itemid, c.commentarea, c.userid, c.content, u.firstname, u.lastname, c.timecreated
$usernamefields = get_all_user_name_fields(true, 'u');
$sql = "SELECT c.id, c.contextid, c.itemid, c.commentarea, c.userid, c.content, $usernamefields, c.timecreated
FROM {comments} c
JOIN {user} u
ON u.id=c.userid
@@ -74,8 +75,9 @@ class comment_manager {
$item->time = userdate($item->timecreated);
$item->content = format_text($item->content, FORMAT_MOODLE, $formatoptions);
// Unset fields not related to the comment
unset($item->firstname);
unset($item->lastname);
foreach (get_all_user_name_fields() as $namefield) {
unset($item->$namefield);
}
unset($item->timecreated);
// Record the comment
$comments[] = $item;
@@ -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));
}
/**
@@ -37,13 +37,13 @@ Feature: Restrict activity availability through date conditions
| assignsubmission_file_enabled | 0 |
| id_availablefrom_day | 31 |
| id_availablefrom_month | 12 |
| id_availablefrom_year | 2050 |
| id_availablefrom_year | 2037 |
| id_showavailability | 1 |
And I press "Save and return to course"
And I log out
When I log in as "student1"
And I follow "Course 1"
Then I should see "Available from 31 December 2050."
Then I should see "Available from 31 December 2037."
And "Test assignment 1" activity should be hidden
And I log out
+1 -1
View File
@@ -8,6 +8,6 @@
"require-dev": {
"phpunit/phpunit": "3.7.*",
"phpunit/dbUnit": "1.2.*",
"moodlehq/behat-extension": "1.26.4"
"moodlehq/behat-extension": "1.26.7"
}
}
+6
View File
@@ -667,6 +667,12 @@ $CFG->admin = 'admin';
// Example:
// $CFG->behat_extraallowedsettings = array('logsql', 'dblogerror');
//
// You can make behat save several dumps when a scenario fails. The dumps currently saved are:
// * a dump of the DOM in it's state at the time of failure; and
// * a screenshot (JavaScript is required for the screenshot functionality, so not all browsers support this option)
// Example:
// $CFG->behat_faildump_path = '/my/path/to/save/failure/dumps';
//
//=========================================================================
// 12. DEVELOPER DATA GENERATOR
//=========================================================================
+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) {
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
@@ -321,6 +321,7 @@ class course_edit_form extends moodleform {
$options[$grouping->id] = format_string($grouping->name);
}
}
core_collator::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));
}
}
core_collator::asort($options);
$options = array(0 => get_string('none')) + $options;
$mform->addElement('select', 'groupingid', get_string('groupingsection', 'group'), $options);
$mform->addHelpButton('groupingid', 'groupingsection', 'group');
}
+13 -6
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;
+2 -1
View File
@@ -373,7 +373,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++;
}
}
+10 -4
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";
@@ -1982,7 +1984,7 @@ function course_get_cm_edit_actions(cm_info $mod, $indent = -1, $sr = null) {
}
// Indent.
if ($hasmanageactivities) {
if ($hasmanageactivities && $indent >= 0) {
$indentlimits = new stdClass();
$indentlimits->min = 0;
$indentlimits->max = 16;
@@ -3241,11 +3243,15 @@ function include_course_ajax($course, $usedmodules = array(), $enabledmodules =
'clicktochangeinbrackets',
'markthistopic',
'markedthistopic',
'move',
'movesection',
'movecoursemodule',
'movecoursesection',
'movecontent',
'tocontent',
'emptydragdropregion'
'emptydragdropregion',
'afterresource',
'aftersection',
'totopofsection',
), 'moodle');
// Include section-specific strings for formats which support sections.
+14 -3
View File
@@ -85,6 +85,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');
}
@@ -98,14 +101,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);
context_helper::delete_instance(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, $moduleinfo->section));
} else {
print_error('cannotaddnewmodule', '', course_get_url($course, $moduleinfo->section), $moduleinfo->modulename);
@@ -152,6 +162,7 @@ function add_moduleinfo($moduleinfo, $course, $mform = null) {
"$moduleinfo->instance", $moduleinfo->coursemodule);
$moduleinfo = edit_module_post_actions($moduleinfo, $course);
$transaction->allow_commit();
return $moduleinfo;
}
+2 -1
View File
@@ -504,12 +504,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);
}
}
core_collator::asort($options);
$options = array(0 => get_string('none')) + $options;
$mform->addElement('select', 'groupingid', get_string('grouping', 'group'), $options);
$mform->addHelpButton('groupingid', 'grouping', 'group');
}
+5 -3
View File
@@ -1506,7 +1506,7 @@ class core_course_renderer extends plugin_renderer_base {
protected function coursecat_include_js() {
global $CFG;
static $jsloaded = false;
if (!$jsloaded && $CFG->enableajax) {
if (!$jsloaded) {
// We must only load this module once.
$this->page->requires->yui_module('moodle-course-categoryexpander',
'Y.Moodle.course.categoryexpander.init');
@@ -1586,8 +1586,6 @@ class core_course_renderer extends plugin_renderer_base {
$classes[] = 'with_children';
$classes[] = 'collapsed';
}
// Make sure JS file to expand category content is included.
$this->coursecat_include_js();
} else {
// load category content
$categorycontent = $this->coursecat_category_content($chelper, $coursecat, $depth);
@@ -1596,6 +1594,10 @@ class core_course_renderer extends plugin_renderer_base {
$classes[] = 'with_children';
}
}
// 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,
@@ -39,3 +39,57 @@ Feature: Toggle activities visibility from the course page
And I log in as "student1"
And I follow "Course 1"
And "Test forum name" activity should be hidden
@javascript
Scenario: Activities can be shown and hidden inside a hidden section
Given the following "users" exists:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
And the following "courses" exists:
| fullname | shortname | format | numsections |
| Course 1 | C1 | topics | 2 |
And the following "course enrolments" exists:
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I add a "Forum" to section "2" and I fill the form with:
| Forum name | Test forum name |
| Description | Test forum description |
| Visible | Show |
When I hide section "2"
Then "Test forum name" activity should be hidden
And I open "Test forum name" actions menu
And I click on "Show" "link" in the "Test forum name" activity
And "Test forum name" activity should be visible
And I open "Test forum name" actions menu
And I click on "Hide" "link" in the "Test forum name" activity
And "Test forum name" activity should be hidden
@javascript
Scenario: Activities can be shown and hidden inside an orphaned section
Given the following "users" exists:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
And the following "courses" exists:
| fullname | shortname | format | numsections |
| Course 1 | C1 | topics | 2 |
And the following "course enrolments" exists:
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I add a "Forum" to section "2" and I fill the form with:
| Forum name | Test forum name |
| Description | Test forum description |
| Visible | Show |
When I click on ".reduce-sections" "css_element"
Then "Test forum name" activity should be visible
And I open "Test forum name" actions menu
And I click on "Hide" "link" in the "Test forum name" activity
And "Test forum name" activity should be hidden
And I open "Test forum name" actions menu
And I click on "Show" "link" in the "Test forum name" activity
And "Test forum name" activity should be visible
+18 -32
View File
@@ -351,6 +351,23 @@ class behat_course extends behat_base {
// Section should be hidden.
$exception = new ExpectationException('The section is not hidden', $this->getSession());
$this->find('xpath', $sectionxpath . "[contains(concat(' ', normalize-space(@class), ' '), ' hidden ')]", $exception);
}
/**
* Checks that all actiities in the specified section are hidden. You need to be in the course page. It can be used being logged as a student and as a teacher on editing mode.
*
* @Then /^all activities in section "(?P<section_number>\d+)" should be hidden$/
* @throws ExpectationException
* @throws ElementNotFoundException Thrown by behat_base::find
* @param int $sectionnumber
*/
public function section_activities_should_be_hidden($sectionnumber) {
$sectionxpath = $this->section_exists($sectionnumber);
// Preventive in case there is any action in progress.
// Adding it here because we are interacting (click) with
// the elements, not necessary when we just find().
$this->i_wait_until_section_is_available($sectionnumber);
// The checking are different depending on user permissions.
if ($this->is_course_editor()) {
@@ -362,50 +379,19 @@ class behat_course extends behat_base {
if ($activities = $this->get_section_activities($sectionxpath)) {
$dimmedexception = new ExpectationException('There are activities that are not dimmed', $this->getSession());
$visibilityexception = new ExpectationException('There are activities which visibility icons are clickable', $this->getSession());
foreach ($activities as $activity) {
// Dimmed.
$this->find('xpath', "//div[contains(concat(' ', normalize-space(@class), ' '), ' activityinstance ')]" .
"/a[contains(concat(' ', normalize-space(@class), ' '), ' dimmed ')]", $dimmedexception, $activity);
// Non-JS browsers can not click on img elements.
if ($this->running_javascript()) {
// Expanding the actions menu if it is not shown.
$classes = array_flip(explode(' ', $activity->getAttribute('class')));
if (empty($classes['action-menu-shown'])) {
$actionsmenu = $this->find('css', "a[role='menuitem']", false, $activity);
$actionsmenu->click();
}
// To check that the visibility is not clickable we check the funcionality rather than the applied style.
$visibilityiconnode = $this->find('css', 'a.editing_show img', false, $activity);
$visibilityiconnode->click();
}
// We ensure that we still see the show icon.
$visibilityiconnode = $this->find('css', 'a.editing_show img', $visibilityexception, $activity);
// It is there only when running JS scenarios.
if ($this->running_javascript()) {
// Collapse the actions menu if it is displayed.
$classes = array_flip(explode(' ', $activity->getAttribute('class')));
if (!empty($classes['action-menu-shown'])) {
$actionsmenu = $this->find('css', "a[role='menuitem']", false, $activity);
$actionsmenu->click();
}
}
}
}
} else {
// There shouldn't be activities.
if ($this->get_section_activities($sectionxpath)) {
throw new ExpectationException('There are activities in the section and they should be hidden', $this->getSession());
}
}
}
/**
+9 -6
View File
@@ -1,13 +1,12 @@
@core @core_course @_alerts
@core @core_course
Feature: Course activity controls works as expected
In order to manage my course's activities
As a teacher
I need to edit, hide, show and indent activities inside course sections
# The difference between these two scenario outlines is that one is with
# JS enabled and the other one with JS disabled, also with JS disabled we
# add the delete activity checking; we can not use Background sections
# when using Scenario Outlines because of Behat framework restrictions.
# JS enabled and the other one with JS disabled; we can not use Background
# sections when using Scenario Outlines because of Behat framework restrictions.
# We are testing:
# * Javascript on and off
@@ -16,7 +15,7 @@ Feature: Course activity controls works as expected
# * Course controls with paged mode in the course home page
# * Course controls with paged mode in a section's page
@javascript @_cross_browser
@javascript @_cross_browser @_alert
Scenario Outline: General activities course controls using topics and weeks formats, and paged mode and not paged mode works as expected
Given the following "users" exists:
| username | firstname | lastname | email |
@@ -68,7 +67,9 @@ Feature: Course activity controls works as expected
And I open "Test forum name 1" actions menu
And I click on "Hide" "link" in the "Test forum name 1" activity
And "#section-2" "css_element" <should_see_other_sections> exists
And I close "Test forum name 1" actions menu
And I open "Test forum name 1" actions menu
And I delete "Test forum name 1" activity
And I should not see "Test forum name 1" in the "#region-main" "css_element"
And I duplicate "Test forum name 2" activity editing the new copy with:
| Forum name | Edited test forum name 2 |
And "#section-2" "css_element" <should_see_other_sections> exists
@@ -77,6 +78,7 @@ Feature: Course activity controls works as expected
And I hide section "1"
And "#section-2" "css_element" <should_see_other_sections> exists
And section "1" should be hidden
And all activities in section "1" should be hidden
And I show section "1"
And "#section-2" "css_element" <should_see_other_sections> exists
And section "1" should be visible
@@ -151,6 +153,7 @@ Feature: Course activity controls works as expected
And I hide section "1"
And "#section-2" "css_element" <should_see_other_sections> exists
And section "1" should be hidden
And all activities in section "1" should be hidden
And I show section "1"
And "#section-2" "css_element" <should_see_other_sections> exists
And section "1" should be visible
@@ -59,11 +59,15 @@ Feature: Show/hide course sections
And section "3" should be hidden
And I reload the page
And section "1" should be hidden
And all activities in section "1" should be hidden
And section "2" should be visible
And section "3" should be hidden
And all activities in section "1" should be hidden
And I log out
And I log in as "student1"
And I follow "Course 1"
And section "1" should be hidden
And all activities in section "1" should be hidden
And section "2" should be visible
And section "3" should be hidden
And all activities in section "1" should be hidden
+4 -4
View File
@@ -1912,7 +1912,7 @@ class core_course_courselib_testcase extends advanced_testcase {
$this->assertEquals($cm->id, $event->objectid);
$this->assertEquals($USER->id, $event->userid);
$this->assertEquals('course_modules', $event->objecttable);
$url = new moodle_url('/mod/assign/view.php', array('id' => $mod->id));
$url = new moodle_url('/mod/assign/view.php', array('id' => $cm->id));
$this->assertEquals($url, $event->get_url());
// Test legacy data.
@@ -1925,7 +1925,7 @@ class core_course_courselib_testcase extends advanced_testcase {
$eventdata->userid = $USER->id;
$this->assertEventLegacyData($eventdata, $event);
$arr = array($cm->course, "course", "add mod", "../mod/assign/view.php?id=$mod->id", "assign $cm->instance");
$arr = array($cm->course, "course", "add mod", "../mod/assign/view.php?id=$cm->id", "assign $cm->instance");
$this->assertEventLegacyLogData($arr, $event);
}
@@ -2017,7 +2017,7 @@ class core_course_courselib_testcase extends advanced_testcase {
$this->assertEquals($cm->id, $event->objectid);
$this->assertEquals($USER->id, $event->userid);
$this->assertEquals('course_modules', $event->objecttable);
$url = new moodle_url('/mod/forum/view.php', array('id' => $mod->id));
$url = new moodle_url('/mod/forum/view.php', array('id' => $cm->id));
$this->assertEquals($url, $event->get_url());
// Test legacy data.
@@ -2030,7 +2030,7 @@ class core_course_courselib_testcase extends advanced_testcase {
$eventdata->userid = $USER->id;
$this->assertEventLegacyData($eventdata, $event);
$arr = array($cm->course, "course", "update mod", "../mod/forum/view.php?id=$mod->id", "forum $cm->instance");
$arr = array($cm->course, "course", "update mod", "../mod/forum/view.php?id=$cm->id", "forum $cm->instance");
$this->assertEventLegacyLogData($arr, $event);
}
+10 -1
View File
@@ -278,7 +278,16 @@ YUI.add('moodle-course-dragdrop', function(Y) {
this.groups = ['resource'];
this.samenodeclass = CSS.ACTIVITY;
this.parentnodeclass = CSS.SECTION;
this.resourcedraghandle = this.get_drag_handle(M.str.moodle.move, CSS.EDITINGMOVE, CSS.ICONCLASS, true);
this.resourcedraghandle = this.get_drag_handle(M.util.get_string('movecoursemodule', 'moodle'), CSS.EDITINGMOVE, CSS.ICONCLASS, true);
this.samenodelabel = {
identifier: 'afterresource',
component: 'moodle'
};
this.parentnodelabel = {
identifier: 'totopofsection',
component: 'moodle'
};
// Go through all sections
var sectionlistselector = M.course.format.get_section_selector(Y);
-6
View File
@@ -481,12 +481,6 @@ YUI.add('moodle-course-toolboxes', function(Y) {
// Prevent the default button action
ev.preventDefault();
// Return early if the current section is hidden
var section = activity.ancestor(M.course.format.get_section_selector(Y));
if (section && section.hasClass(CSS.SECTIONHIDDENCLASS)) {
return;
}
// Get the element we're working on
var element = activity;
var value = this.handle_resource_dim(button, activity, action);
+2
View File
@@ -113,6 +113,7 @@ class core_enrol_external extends external_api {
foreach ($thefields as $f) {
$userfields[] = clean_param($f, PARAM_ALPHANUMEXT);
}
break;
case 'limitfrom' :
$limitfrom = clean_param($option['value'], PARAM_INT);
break;
@@ -414,6 +415,7 @@ class core_enrol_external extends external_api {
foreach ($thefields as $f) {
$userfields[] = clean_param($f, PARAM_ALPHANUMEXT);
}
break;
case 'limitfrom' :
$limitfrom = clean_param($option['value'], PARAM_INT);
break;
+1
View File
@@ -24,6 +24,7 @@
require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
require_login(0, false);
require_capability('moodle/site:config', context_system::instance());
require_sesskey();
$site = get_site();
+3 -2
View File
@@ -119,7 +119,8 @@ if ($ADMIN->fulltree) {
$settings->add(new admin_setting_configcheckbox('enrol_imsenterprise/imscapitafix',
get_string('usecapitafix', 'enrol_imsenterprise'), get_string('usecapitafix_desc', 'enrol_imsenterprise'), 0));
$importnowstring = get_string('aftersaving...', 'enrol_imsenterprise').' <a href="../enrol/imsenterprise/importnow.php">';
$importnowstring .= get_string('doitnow', 'enrol_imsenterprise').'</a>';
$importurl = new moodle_url('/enrol/imsenterprise/importnow.php', array('sesskey' => sesskey()));
$importnowstring = get_string('aftersaving...', 'enrol_imsenterprise').' ';
$importnowstring .= html_writer::link($importurl, get_string('doitnow', 'enrol_imsenterprise'));
$settings->add(new admin_setting_heading('enrol_imsenterprise_doitnowmessage', '', $importnowstring));
}
+1
View File
@@ -109,6 +109,7 @@ class enrol_manual_external extends external_api {
}
// Check manual enrolment plugin instance is enabled/exist.
$instance = null;
$enrolinstances = enrol_get_instances($enrolment['courseid'], true);
foreach ($enrolinstances as $courseenrolinstance) {
if ($courseenrolinstance->enrol == "manual") {
+65 -21
View File
@@ -18,7 +18,7 @@
* Enrol manual external PHPunit tests
*
* @package enrol_manual
* @category external
* @category phpunit
* @copyright 2012 Jerome Mouneyrac
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.4
@@ -31,43 +31,87 @@ global $CFG;
require_once($CFG->dirroot . '/webservice/tests/helpers.php');
require_once($CFG->dirroot . '/enrol/manual/externallib.php');
class enrol_manual_external_testcase extends externallib_advanced_testcase {
class enrol_manual_externallib_testcase extends externallib_advanced_testcase {
/**
* Test get_enrolled_users
*/
public function test_enrol_users() {
global $USER, $CFG;
global $DB;
$this->resetAfterTest(true);
$course = self::getDataGenerator()->create_course();
$user = self::getDataGenerator()->create_user();
$this->setUser($user);
$course1 = self::getDataGenerator()->create_course();
$course2 = self::getDataGenerator()->create_course();
$user1 = self::getDataGenerator()->create_user();
$user2 = self::getDataGenerator()->create_user();
// Set the required capabilities by the external function.
$context = context_course::instance($course->id);
$roleid = $this->assignUserCapability('enrol/manual:enrol', $context->id);
$this->assignUserCapability('moodle/course:view', $context->id, $roleid);
$context1 = context_course::instance($course1->id);
$context2 = context_course::instance($course2->id);
$instance1 = $DB->get_record('enrol', array('courseid' => $course1->id, 'enrol' => 'manual'), '*', MUST_EXIST);
$instance2 = $DB->get_record('enrol', array('courseid' => $course2->id, 'enrol' => 'manual'), '*', MUST_EXIST);
// Add manager role to $USER.
// So $USER is allowed to assign 'manager', 'editingteacher', 'teacher' and 'student'.
role_assign(1, $USER->id, context_system::instance()->id);
// Set the required capabilities by the external function.
$roleid = $this->assignUserCapability('enrol/manual:enrol', $context1->id);
$this->assignUserCapability('moodle/course:view', $context1->id, $roleid);
$this->assignUserCapability('moodle/role:assign', $context1->id, $roleid);
$this->assignUserCapability('enrol/manual:enrol', $context2->id, $roleid);
$this->assignUserCapability('moodle/course:view', $context2->id, $roleid);
$this->assignUserCapability('moodle/role:assign', $context2->id, $roleid);
allow_assign($roleid, 3);
// Call the external function.
enrol_manual_external::enrol_users(array(
array('roleid' => 3, 'userid' => $user1->id, 'courseid' => $course->id),
array('roleid' => 3, 'userid' => $user2->id, 'courseid' => $course->id)
array('roleid' => 3, 'userid' => $user1->id, 'courseid' => $course1->id),
array('roleid' => 3, 'userid' => $user2->id, 'courseid' => $course1->id),
));
// Check we retrieve the good total number of enrolled users.
require_once($CFG->dirroot . '/enrol/externallib.php');
$enrolledusers = core_enrol_external::get_enrolled_users($course->id);
$this->assertEquals(2, count($enrolledusers));
$this->assertEquals(2, $DB->count_records('user_enrolments', array('enrolid' => $instance1->id)));
$this->assertEquals(0, $DB->count_records('user_enrolments', array('enrolid' => $instance2->id)));
$this->assertTrue(is_enrolled($context1, $user1));
$this->assertTrue(is_enrolled($context1, $user2));
// Call without required capability.
$this->unassignUserCapability('enrol/manual:enrol', $context->id, $roleid);
$this->setExpectedException('moodle_exception');
$categories = enrol_manual_external::enrol_users($course->id);
$DB->delete_records('user_enrolments');
$this->unassignUserCapability('enrol/manual:enrol', $context1->id, $roleid);
try {
enrol_manual_external::enrol_users(array(
array('roleid' => 3, 'userid' => $user1->id, 'courseid' => $course1->id),
));
$this->fail('Exception expected if not having capability to enrol');
} catch (moodle_exception $e) {
$this->assertInstanceOf('required_capability_exception', $e);
$this->assertSame('nopermissions', $e->errorcode);
}
$this->assignUserCapability('enrol/manual:enrol', $context1->id, $roleid);
$this->assertEquals(0, $DB->count_records('user_enrolments'));
// Call with forbidden role.
try {
enrol_manual_external::enrol_users(array(
array('roleid' => 1, 'userid' => $user1->id, 'courseid' => $course1->id),
));
$this->fail('Exception expected if not allowed to assign role.');
} catch (moodle_exception $e) {
$this->assertSame('wsusercannotassign', $e->errorcode);
}
$this->assertEquals(0, $DB->count_records('user_enrolments'));
// Call for course without manual instance.
$DB->delete_records('user_enrolments');
$DB->delete_records('enrol', array('courseid' => $course2->id));
try {
enrol_manual_external::enrol_users(array(
array('roleid' => 3, 'userid' => $user1->id, 'courseid' => $course1->id),
array('roleid' => 3, 'userid' => $user1->id, 'courseid' => $course2->id),
));
$this->fail('Exception expected if course does not have manual instance');
} catch (moodle_exception $e) {
$this->assertSame('wsnoinstance', $e->errorcode);
}
}
}
}
+64 -9
View File
@@ -43,6 +43,8 @@ class core_enrol_externallib_testcase extends externallib_advanced_testcase {
$course = self::getDataGenerator()->create_course();
$user1 = self::getDataGenerator()->create_user();
$user2 = self::getDataGenerator()->create_user();
$user3 = self::getDataGenerator()->create_user();
$this->setUser($user3);
// Set the required capabilities by the external function.
$context = context_course::instance($course->id);
@@ -52,7 +54,7 @@ class core_enrol_externallib_testcase extends externallib_advanced_testcase {
// Enrol the users in the course.
$this->getDataGenerator()->enrol_user($user1->id, $course->id, $roleid, 'manual');
$this->getDataGenerator()->enrol_user($user2->id, $course->id, $roleid, 'manual');
$this->getDataGenerator()->enrol_user($USER->id, $course->id, $roleid, 'manual');
$this->getDataGenerator()->enrol_user($user3->id, $course->id, $roleid, 'manual');
// Call the external function.
$enrolledusers = core_enrol_external::get_enrolled_users($course->id);
@@ -60,8 +62,25 @@ class core_enrol_externallib_testcase extends externallib_advanced_testcase {
// We need to execute the return values cleaning process to simulate the web service server.
$enrolledusers = external_api::clean_returnvalue(core_enrol_external::get_enrolled_users_returns(), $enrolledusers);
// Check we retrieve the good total number of enrolled users.
// Check the result set.
$this->assertEquals(3, count($enrolledusers));
$this->assertArrayHasKey('email', $enrolledusers[0]);
// Call the function with some parameters set.
$enrolledusers = core_enrol_external::get_enrolled_users($course->id, array(
array('name' => 'limitfrom', 'value' => 2),
array('name' => 'limitnumber', 'value' => 1),
array('name' => 'userfields', 'value' => 'id')
));
// We need to execute the return values cleaning process to simulate the web service server.
$enrolledusers = external_api::clean_returnvalue(core_enrol_external::get_enrolled_users_returns(), $enrolledusers);
// Check the result set, we should only get the 3rd result, which is $user3.
$this->assertCount(1, $enrolledusers);
$this->assertEquals($user3->id, $enrolledusers[0]['id']);
$this->assertArrayHasKey('id', $enrolledusers[0]);
$this->assertArrayNotHasKey('email', $enrolledusers[0]);
// Call without required capability.
$this->unassignUserCapability('moodle/course:viewparticipants', $context->id, $roleid);
@@ -110,6 +129,8 @@ class core_enrol_externallib_testcase extends externallib_advanced_testcase {
$this->resetAfterTest(true);
$user1 = $this->getDataGenerator()->create_user();
$coursedata['idnumber'] = 'idnumbercourse1';
$coursedata['fullname'] = 'Lightwork Course 1';
$coursedata['summary'] = 'Lightwork Course 1 description';
@@ -122,14 +143,20 @@ class core_enrol_externallib_testcase extends externallib_advanced_testcase {
$manual_enrol_data['courseid'] = $course1->id;
$enrolid = $DB->insert_record('enrol', $manual_enrol_data);
// Create the user and give them capabilities in the course context.
// Create the users and give them capabilities in the course context.
$context = context_course::instance($course1->id);
$roleid = $this->assignUserCapability('moodle/course:viewparticipants', $context->id, 3);
// Create a student.
$student1 = self::getDataGenerator()->create_user();
// Create 2 students.
$student1 = self::getDataGenerator()->create_user();
$student2 = self::getDataGenerator()->create_user();
// Enrol both the user and the student in the course.
// Give the capability to student2.
assign_capability('moodle/course:viewparticipants', CAP_ALLOW, 3, $context->id);
role_assign(3, $student2->id, $context->id);
accesslib_clear_all_caches_for_unit_testing();
// Enrol both the user and the students in the course.
$user_enrolment_data['status'] = 0;
$user_enrolment_data['enrolid'] = $enrolid;
$user_enrolment_data['userid'] = $USER->id;
@@ -140,8 +167,13 @@ class core_enrol_externallib_testcase extends externallib_advanced_testcase {
$user_enrolment_data['userid'] = $student1->id;
$DB->insert_record('user_enrolments', $user_enrolment_data);
$params = array("coursecapabilities" =>array
('courseid' => $course1->id, 'capabilities' => array('moodle/course:viewparticipants')));
$user_enrolment_data['status'] = 0;
$user_enrolment_data['enrolid'] = $enrolid;
$user_enrolment_data['userid'] = $student2->id;
$DB->insert_record('user_enrolments', $user_enrolment_data);
$params = array("coursecapabilities" => array('courseid' => $course1->id,
'capabilities' => array('moodle/course:viewparticipants')));
$options = array();
$result = core_enrol_external::get_enrolled_users_with_capability($params, $options);
@@ -152,8 +184,31 @@ class core_enrol_externallib_testcase extends externallib_advanced_testcase {
$expecteduserlist = $result[0];
$this->assertEquals($course1->id, $expecteduserlist['courseid']);
$this->assertEquals('moodle/course:viewparticipants', $expecteduserlist['capability']);
$this->assertEquals(1, count($expecteduserlist['users']));
$this->assertEquals(2, count($expecteduserlist['users']));
// Now doing the query again with options.
$params = array(
"coursecapabilities" => array(
'courseid' => $course1->id,
'capabilities' => array('moodle/course:viewparticipants')
)
);
$options = array(
array('name' => 'limitfrom', 'value' => 1),
array('name' => 'limitnumber', 'value' => 1),
array('name' => 'userfields', 'value' => 'id')
);
$result = core_enrol_external::get_enrolled_users_with_capability($params, $options);
// We need to execute the return values cleaning process to simulate the web service server.
$result = external_api::clean_returnvalue(core_enrol_external::get_enrolled_users_with_capability_returns(), $result);
// Check an array containing the expected user for the course capability is returned.
$expecteduserlist = $result[0]['users'];
$expecteduser = reset($expecteduserlist);
$this->assertEquals(1, count($expecteduserlist));
$this->assertEquals($student2->id, $expecteduser['id']);
}
/**
+1 -1
View File
@@ -1,4 +1,4 @@
@core @core_files @_only_local
@core @core_files
Feature: Course files
In order to add legacy files
As a user
+10 -9
View File
@@ -223,7 +223,7 @@ class core_files_externallib_testcase extends advanced_testcase {
// Insert the information about the file.
$contentid = $DB->insert_record('data_content', $datacontent);
// Required information for uploading a file.
$context = context_module::instance($module->id);
$context = context_module::instance($module->cmid);
$usercontext = context_user::instance($USER->id);
$component = 'mod_data';
$filearea = 'content';
@@ -251,6 +251,7 @@ class core_files_externallib_testcase extends advanced_testcase {
$testfilelisting = core_files_external::get_files($context->id, $component, $filearea, $itemid, '/', $filename);
// With the information that we have provided we should get an object exactly like the one below.
$coursecontext = context_course::instance($course->id);
$testdata = array();
$testdata['parents'] = array();
$testdata['parents']['0'] = array('contextid' => 1,
@@ -265,43 +266,43 @@ class core_files_externallib_testcase extends advanced_testcase {
'itemid' => null,
'filepath' => null,
'filename' => 'Miscellaneous');
$testdata['parents']['2'] = array('contextid' => 15,
$testdata['parents']['2'] = array('contextid' => $coursecontext->id,
'component' => null,
'filearea' => null,
'itemid' => null,
'filepath' => null,
'filename' => 'Test course 1');
$testdata['parents']['3'] = array('contextid' => 20,
$testdata['parents']['3'] = array('contextid' => $context->id,
'component' => null,
'filearea' => null,
'itemid' => null,
'filepath' => null,
'filename' => 'Mod data upload test (Database)');
$testdata['parents']['4'] = array('contextid' => 20,
$testdata['parents']['4'] = array('contextid' => $context->id,
'component' => 'mod_data',
'filearea' => 'content',
'itemid' => null,
'filepath' => null,
'filename' => 'Fields');
$testdata['files'] = array();
$testdata['files']['0'] = array('contextid' => 20,
$testdata['files']['0'] = array('contextid' => $context->id,
'component' => 'mod_data',
'filearea' => 'content',
'itemid' => '1',
'itemid' => $itemid,
'filepath' => '/',
'filename' => 'Simple4.txt',
'url' => 'http://www.example.com/moodle/pluginfile.php/20/mod_data/content/1/Simple4.txt',
'url' => 'http://www.example.com/moodle/pluginfile.php/'.$context->id.'/mod_data/content/'.$itemid.'/Simple4.txt',
'isdir' => false,
'timemodified' => $timemodified);
// Make sure that they are the same.
$this->assertEquals($testfilelisting, $testdata);
$this->assertEquals($testdata, $testfilelisting);
// Try again but without the context. Minus one signals the function to use other variables to obtain the context.
$nocontext = -1;
$modified = 0;
// Context level and instance ID are used to determine what the context is.
$contextlevel = 'module';
$instanceid = $module->id;
$instanceid = $module->cmid;
$testfilelisting = core_files_external::get_files($nocontext, $component, $filearea, $itemid, '/', $filename, $modified, $contextlevel, $instanceid);
$this->assertEquals($testfilelisting, $testdata);
}
@@ -65,7 +65,7 @@ class backup_gradingform_guide_plugin extends backup_gradingform_plugin {
$pluginwrapper->add_child($criteria);
$criteria->add_child($criterion);
$criteria->add_child($comments);
$pluginwrapper->add_child($comments);
$comments->add_child($comment);
// Set sources to populate the data.
@@ -48,6 +48,11 @@ class restore_gradingform_guide_plugin extends restore_gradingform_plugin {
$paths[] = new restore_path_element('gradingform_guide_comment',
$this->get_pathfor('/guidecomments/guidecomment'));
// MDL-37714: Correctly locate frequent used comments in both the
// current and incorrect old format.
$paths[] = new restore_path_element('gradingform_guide_comment_legacy',
$this->get_pathfor('/guidecriteria/guidecomments/guidecomment'));
return $paths;
}
@@ -99,6 +104,20 @@ class restore_gradingform_guide_plugin extends restore_gradingform_plugin {
$DB->insert_record('gradingform_guide_comments', $data);
}
/**
* Processes comments element data
*
* @param array|stdClass $data The data to insert as a comment
*/
public function process_gradingform_guide_comment_legacy($data) {
global $DB;
$data = (object)$data;
$data->definitionid = $this->get_new_parentid('grading_definition');
$DB->insert_record('gradingform_guide_comments', $data);
}
/**
* Processes filling element data
*
+28 -6
View File
@@ -11,8 +11,8 @@
.gradingform_guide .criterion .remark {vertical-align: top;}
.gradingform_guide.editor .criterion .controls,
.gradingform_guide .criterion .description,
.gradingform_guide .criterion .remark {padding:3px;}
.gradingform_guide.editor .criterion .description,
.gradingform_guide.editor .criterion .remark {padding:3px;}
.gradingform_guide .criteria {height:100%;}
.gradingform_guide .criterion {border:1px solid #DDD;overflow: hidden;}
@@ -55,13 +55,35 @@
.gradingform_guide.editor .hiddenelement {display:none;}
.gradingform_guide.editor .pseudotablink {background-color:transparent;border:0 solid;height:1px;width:1px;color:transparent;padding:0;margin:0;position:relative;float:right;}
.gradingform_guide .markingguidecomment {cursor: pointer;}
.jsenabled .gradingform_guide .markingguidecomment:before {content: url([[pix:t/add]]);padding-right:2px;}
.jsenabled .gradingform_guide .markingguidecomment {cursor: pointer;}
.jsenabled .gradingform_guide .markingguidecomment:before {
content: url([[pix:t/add]]);
padding-right:2px;
}
.dir-rtl.jsenabled .gradingform_guide .markingguidecomment:before {
padding-right: 0;
padding-left: 2px;
}
.gradingform_guide .commentheader {font-weight:bold;font-size:1.1em;padding-bottom:5px;}
.jsenabled .gradingform_guide .criterionnamelabel {display: none;}
.jsenabled .gradingform_guide .criterionshortname {font-weight:bold;}
.gradingform_guide table {width: 100%}
.gradingform_guide .descriptionreadonly {
vertical-align: top;
}
.gradingform_guide .criteriondescriptionmarkers {width: 300px;}
.gradingform_guide .markingguideremark {width: 100%;}
.gradingform_guide .criteriondescriptionscore {display: inline;}
.gradingform_guide .markingguideremark {
margin: 0;
width: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.gradingform_guide .criteriondescriptionscore {display: inline;}
.gradingform_guide .score label {
display: block;
}
.gradingform_guide .score input {
margin: 0;
width: auto;
}
@@ -0,0 +1,490 @@
<?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/>.
/**
* Steps definitions for rubrics.
*
* @package gradingform_rubric
* @category test
* @copyright 2013 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php.
require_once(__DIR__ . '/../../../../../../lib/behat/behat_base.php');
use Behat\Gherkin\Node\TableNode as TableNode,
Behat\Behat\Context\Step\Given as Given,
Behat\Behat\Context\Step\When as When,
Behat\Behat\Context\Step\Then as Then,
Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException,
Behat\Mink\Exception\ExpectationException as ExpectationException;
/**
* Steps definitions to help with rubrics.
*
* @package gradingform_rubric
* @category test
* @copyright 2013 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class behat_gradingform_rubric extends behat_base {
/**
* @var The number of levels added by default when a rubric is created.
*/
const DEFAULT_RUBRIC_LEVELS = 3;
/**
* Defines the rubric with the provided data, following rubric's definition grid cells.
*
* This method fills the rubric of the rubric definition
* form; the provided TableNode should contain one row for
* each criterion and each cell of the row should contain:
* # Criterion description
* # Criterion level 1 name
* # Criterion level 1 points
* # Criterion level 2 name
* # Criterion level 2 points
* # Criterion level 3 .....
*
* Works with both JS and non-JS.
*
* @When /^I define the following rubric:$/
* @throws ExpectationException
* @param TableNode $rubric
*/
public function i_define_the_following_rubric(TableNode $rubric) {
// Being a smart method is nothing good when we talk about step definitions, in
// this case we didn't have any other options as there are no labels no elements
// id we can point to without having to "calculate" them.
$steptableinfo = '| criterion description | level1 name | level1 points | level2 name | level2 points | ...';
$criteria = $rubric->getRows();
$addcriterionbutton = $this->find_button(get_string('addcriterion', 'gradingform_rubric'));
// Cleaning the current ones.
$deletebuttons = $this->find_all('css', "input[title='" . get_string('criteriondelete', 'gradingform_rubric') . "']");
if ($deletebuttons) {
// We should reverse the deletebuttons because otherwise once we delete
// the first one the DOM will change and the [X] one will not exist anymore.
$deletebuttons = array_reverse($deletebuttons, true);
foreach ($deletebuttons as $button) {
$this->click_and_confirm($button);
}
}
// The level number (NEWID$N) is not reset after each criterion.
$levelnumber = 1;
// The next criterion is created with the same number of levels than the last criterion.
$defaultnumberoflevels = self::DEFAULT_RUBRIC_LEVELS;
if ($criteria) {
foreach ($criteria as $criterionit => $criterion) {
// Checking the number of cells.
if (count($criterion) % 2 === 0) {
throw new ExpectationException(
'The criterion levels should contain both definition and points, follow this format:' . $steptableinfo,
$this->getSession()
);
}
// Minimum 2 levels per criterion.
// description + definition1 + score1 + definition2 + score2 = 5.
if (count($criterion) < 5) {
throw new ExpectationException(
get_string('err_mintwolevels', 'gradingform_rubric'),
$this->getSession()
);
}
// Add new criterion.
$addcriterionbutton->click();
$criterionroot = 'rubric[criteria][NEWID' . ($criterionit + 1) . ']';
// Getting the criterion description, this one is visible by default.
$this->set_rubric_field_value($criterionroot . '[description]', array_shift($criterion), true);
// When JS is disabled each criterion's levels name numbers starts from 0.
if (!$this->running_javascript()) {
$levelnumber = 0;
}
// Setting the correct number of levels.
$nlevels = count($criterion) / 2;
if ($nlevels < $defaultnumberoflevels) {
// Removing levels if there are too much levels.
// When we add a new level the NEWID$N is increased from the last criterion.
$lastcriteriondefaultlevel = $defaultnumberoflevels + $levelnumber - 1;
$lastcriterionlevel = $nlevels + $levelnumber - 1;
for ($i = $lastcriteriondefaultlevel; $i > $lastcriterionlevel; $i--) {
// If JS is disabled seems that new levels are not added.
if ($this->running_javascript()) {
$deletelevel = $this->find_button($criterionroot . '[levels][NEWID' . $i . '][delete]');
$this->click_and_confirm($deletelevel);
} else {
// Only if the level exists.
$buttonname = $criterionroot . '[levels][NEWID' . $i . '][delete]';
if ($deletelevel = $this->getSession()->getPage()->findButton($buttonname)) {
$deletelevel->click();
}
}
}
} else if ($nlevels > $defaultnumberoflevels) {
// Adding levels if we don't have enough.
$addlevel = $this->find_button($criterionroot . '[levels][addlevel]');
for ($i = ($defaultnumberoflevels + 1); $i <= $nlevels; $i++) {
$addlevel->click();
}
}
// Updating it.
if ($nlevels > self::DEFAULT_RUBRIC_LEVELS) {
$defaultnumberoflevels = $nlevels;
} else {
// If it is less than the default value it sets it to
// the default value.
$defaultnumberoflevels = self::DEFAULT_RUBRIC_LEVELS;
}
foreach ($criterion as $i => $value) {
$levelroot = $criterionroot . '[levels][NEWID' . $levelnumber . ']';
if ($i % 2 === 0) {
// Pairs are the definitions.
$fieldname = $levelroot . '[definition]';
$this->set_rubric_field_value($fieldname, $value);
} else {
// Odds are the points.
// Checking it now, we would need to remove it if we are testing the form validations...
if (!is_numeric($value)) {
throw new ExpectationException(
'The points cells should contain numeric values, follow this format: ' . $steptableinfo,
$this->getSession()
);
}
$fieldname = $levelroot . '[score]';
$this->set_rubric_field_value($fieldname, $value, true);
// Increase the level by one every 2 cells.
$levelnumber++;
}
}
}
}
}
/**
* Replaces a value from the specified criterion. You can use it when editing rubrics, to set both name or points.
*
* @When /^I replace "(?P<current_value_string>(?:[^"]|\\")*)" rubric level with "(?P<value_string>(?:[^"]|\\")*)" in "(?P<criterion_string>(?:[^"]|\\")*)" criterion$/
* @throws ElementNotFoundException
* @param string $currentvalue
* @param string $value
* @param string $criterionname
* @return Given[]
*/
public function i_replace_rubric_level_with($currentvalue, $value, $criterionname) {
$currentvalueliteral = $this->getSession()->getSelectorsHandler()->xpathLiteral($currentvalue);
$criterionliteral = $this->getSession()->getSelectorsHandler()->xpathLiteral($criterionname);
$criterionxpath = "//div[@id='rubric-rubric']" .
"/descendant::td[contains(concat(' ', normalize-space(@class), ' '), ' description ')]";
// It differs between JS on/off.
if ($this->running_javascript()) {
$criterionxpath .= "/descendant::span[@class='textvalue'][text()=$criterionliteral]" .
"/ancestor::tr[contains(concat(' ', normalize-space(@class), ' '), ' criterion ')]";
} else {
$criterionxpath .= "/descendant::textarea[text()=$criterionliteral]" .
"/ancestor::tr[contains(concat(' ', normalize-space(@class), ' '), ' criterion ')]";
}
$inputxpath = $criterionxpath .
"/descendant::input[@type='text'][@value=$currentvalueliteral]";
$textareaxpath = $criterionxpath .
"/descendant::textarea[text()=$currentvalueliteral]";
if ($this->running_javascript()) {
$spansufix = "/ancestor::div[@class='level-wrapper']" .
"/descendant::div[@class='definition']" .
"/descendant::span[@class='textvalue']";
// Expanding the level input boxes.
$spannode = $this->find('xpath', $inputxpath . $spansufix . '|' . $textareaxpath . $spansufix);
$spannode->click();
$inputfield = $this->find('xpath', $inputxpath . '|' . $textareaxpath);
$inputfield->setValue($value);
} else {
$fieldnode = $this->find('xpath', $inputxpath . '|' . $textareaxpath);
$this->set_rubric_field_value($fieldnode->getAttribute('name'), $value);
}
}
/**
* Grades filling the current page rubric. Set one line per criterion and for each criterion set "| Criterion name | Points | Remark |".
*
* @When /^I grade by filling the rubric with:$/
*
* @throws ExpectationException
* @param TableNode $rubric
* @return void
*/
public function i_grade_by_filling_the_rubric_with(TableNode $rubric) {
$criteria = $rubric->getRowsHash();
$stepusage = '"I grade by filling the rubric with:" step needs you to provide a table where each row is a criterion' .
' and each criterion has 3 different values: | Criterion name | Number of points | Remark text |';
// To fill with the steps to execute.
$steps = array();
// First element -> name, second -> points, third -> Remark.
foreach ($criteria as $name => $criterion) {
// We only expect the points and the remark, as the criterion name is $name.
if (count($criterion) !== 2) {
throw new ExpectationException($stepusage, $this->getSession());
}
// Numeric value here.
$points = $criterion[0];
if (!is_numeric($points)) {
throw new ExpectationException($stepusage, $this->getSession());
}
// Selecting a value.
// When JS is disabled there are radio options, with JS enabled divs.
$selectedlevelxpath = $this->get_level_xpath($points);
if ($this->running_javascript()) {
// Only clicking on the selected level if it was not already selected.
$levelnode = $this->find('xpath', $selectedlevelxpath);
// Using in_array() as there are only a few elements.
if (!in_array('checked', explode(' ', $levelnode->getAttribute('class')))) {
$steps[] = new Given('I click on "' . $selectedlevelxpath . '" "xpath_element" in the "' .
$this->escape($name) . '" "table_row"');
}
} else {
// Getting the name of the field.
$radioxpath = $this->get_criterion_xpath($name) .
$selectedlevelxpath . "/descendant::input[@type='radio']";
$radionode = $this->find('xpath', $radioxpath);
// TODO MDL-43738: Change setValue() to use the generic set_value()
// which will delegate the process to the field type.
$radionode->setValue($radionode->getAttribute('value'));
}
// Setting the remark.
// First we need to get the textarea name, then we can set the value.
$textarea = $this->get_node_in_container('css_element', 'textarea', 'table_row', $name);
$steps[] = new Given('I fill in "' . $textarea->getAttribute('name') . '" with "' . $criterion[1] . '"');
}
return $steps;
}
/**
* Checks that the level was previously selected and the user changed to another level.
*
* @Then /^the level with "(?P<points_number>\d+)" points was previously selected for the rubric criterion "(?P<criterion_name_string>(?:[^"]|\\")*)"$/
* @throws ExpectationException
* @param string $criterionname
* @param int $points
* @return void
*/
public function the_level_with_points_was_previously_selected_for_the_rubric_criterion($points, $criterionname) {
$levelxpath = $this->get_criterion_xpath($criterionname) .
$this->get_level_xpath($points) .
"[contains(concat(' ', normalize-space(@class), ' '), ' currentchecked ')]";
// Works both for JS and non-JS.
// - JS: Class -> checked is there when is marked as green.
// - Non-JS: When editing a rubric definition, there are radio inputs and when viewing a
// grade @class contains checked.
$levelxpath .= "[not(contains(concat(' ', normalize-space(@class), ' '), ' checked '))]" .
"[not(/descendant::input[@type='radio'][@checked!='checked'])]";
try {
$this->find('xpath', $levelxpath);
} catch (ElementNotFoundException $e) {
throw new ExpectationException('"' . $points . '" points level was not previously selected', $this->getSession());
}
}
/**
* Checks that the level is currently selected. Works both when grading rubrics and viewing graded rubrics.
*
* @Then /^the level with "(?P<points_number>\d+)" points is selected for the rubric criterion "(?P<criterion_name_string>(?:[^"]|\\")*)"$/
* @throws ExpectationException
* @param string $criterionname
* @param int $points
* @return void
*/
public function the_level_with_points_is_selected_for_the_rubric_criterion($points, $criterionname) {
$levelxpath = $this->get_criterion_xpath($criterionname) .
$this->get_level_xpath($points);
// Works both for JS and non-JS.
// - JS: Class -> checked is there when is marked as green.
// - Non-JS: When editing a rubric definition, there are radio inputs and when viewing a
// grade @class contains checked.
$levelxpath .= "[" .
"contains(concat(' ', normalize-space(@class), ' '), ' checked ')" .
" or " .
"/descendant::input[@type='radio'][@checked='checked']" .
"]";
try {
$this->find('xpath', $levelxpath);
} catch (ElementNotFoundException $e) {
throw new ExpectationException('"' . $points . '" points level is not selected', $this->getSession());
}
}
/**
* Checks that the level is not currently selected. Works both when grading rubrics and viewing graded rubrics.
*
* @Then /^the level with "(?P<points_number>\d+)" points is not selected for the rubric criterion "(?P<criterion_name_string>(?:[^"]|\\")*)"$/
* @throws ExpectationException
* @param string $criterionname
* @param int $points
* @return void
*/
public function the_level_with_points_is_not_selected_for_the_rubric_criterion($points, $criterionname) {
$levelxpath = $this->get_criterion_xpath($criterionname) .
$this->get_level_xpath($points);
// Works both for JS and non-JS.
// - JS: Class -> checked is there when is marked as green.
// - Non-JS: When editing a rubric definition, there are radio inputs and when viewing a
// grade @class contains checked.
$levelxpath .= "[not(contains(concat(' ', normalize-space(@class), ' '), ' checked '))]" .
"[./descendant::input[@type='radio'][@checked!='checked'] or not(./descendant::input[@type='radio'])]";
try {
$this->find('xpath', $levelxpath);
} catch (ElementNotFoundException $e) {
throw new ExpectationException('"' . $points . '" points level is selected', $this->getSession());
}
}
/**
* Makes a hidden rubric field visible (if necessary) and sets a value on it.
*
* @param string $name The name of the field
* @param string $value The value to set
* @param bool $visible
* @return void
*/
protected function set_rubric_field_value($name, $value, $visible = false) {
// Fields are hidden by default.
if ($this->running_javascript() == true && $visible === false) {
$xpath = "//*[@name='$name']/following-sibling::*[contains(concat(' ', normalize-space(@class), ' '), ' plainvalue ')]";
$textnode = $this->find('xpath', $xpath);
$textnode->click();
}
// Set the value now.
$description = $this->find_field($name);
$description->setValue($value);
}
/**
* Performs click confirming the action.
*
* @param NodeElement $node
* @return void
*/
protected function click_and_confirm($node) {
// Clicks to perform the action.
$node->click();
// Confirms the delete.
if ($this->running_javascript()) {
$confirmbutton = $this->get_node_in_container(
'button',
get_string('yes'),
'dialogue',
get_string('confirmation', 'admin')
);
$confirmbutton->click();
}
}
/**
* Returns the xpath representing a selected level.
*
* It is not including the path to the criterion.
*
* It is the xpath when grading a rubric or viewing a rubric,
* it is not the same xpath when editing a rubric.
*
* @param int $points
* @return string
*/
protected function get_level_xpath($points) {
return "//td[contains(concat(' ', normalize-space(@class), ' '), ' level ')]" .
"[./descendant::span[@class='scorevalue'][text()='$points']]";
}
/**
* Returns the xpath representing the selected criterion.
*
* It is the xpath when grading a rubric or viewing a rubric,
* it is not the same xpath when editing a rubric.
*
* @param string $criterionname Literal including the criterion name.
* @return string
*/
protected function get_criterion_xpath($criterionname) {
$literal = $this->getSession()->getSelectorsHandler()->xpathLiteral($criterionname);
return "//tr[contains(concat(' ', normalize-space(@class), ' '), ' criterion ')]" .
"[./descendant::td[@class='description'][text()=$literal]]";
}
}
@@ -0,0 +1,159 @@
@gradingform @gradingform_rubric
Feature: Rubrics can be created and edited
In order to use and refine rubrics to grade students
As a teacher
I need to edit previously used rubrics
Background:
Given the following "users" exists:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| student1 | Student | 1 | student1@asd.com |
And the following "courses" exists:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exists:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment 1 name |
| Description | Test assignment description |
| Grading method | Rubric |
When I go to "Test assignment 1 name" advanced grading definition page
# Defining a rubric.
And I fill the moodle form with:
| Name | Assignment 1 rubric |
| Description | Rubric test description |
And I define the following rubric:
| TMP Criterion 1 | TMP Level 11 | 11 | TMP Level 12 | 12 |
| TMP Criterion 2 | TMP Level 21 | 21 | TMP Level 22 | 22 |
| TMP Criterion 3 | TMP Level 31 | 31 | TMP Level 32 | 32 |
| TMP Criterion 4 | TMP Level 41 | 41 | TMP Level 42 | 42 |
# Checking that only the last ones are saved.
And I define the following rubric:
| Criterion 1 | Level 11 | 1 | Level 12 | 20 | Level 13 | 40 | Level 14 | 50 |
| Criterion 2 | Level 21 | 10 | Level 22 | 20 | Level 23 | 30 |
| Criterion 3 | Level 31 | 5 | Level 32 | 20 |
And I press "Save as draft"
And I go to "Test assignment 1 name" advanced grading definition page
And I click on "Move down" "button" in the "Criterion 1" "table_row"
And I press "Save rubric and make it ready"
Then I should see "Ready for use"
# Grading two students.
And I go to "Student 1" "Test assignment 1 name" activity advanced grading page
And I grade by filling the rubric with:
| Criterion 1 | 50 | Very good |
And I press "Save changes"
# Checking that it complains if you don't select a level for each criterion.
And I should see "Please choose something for each criterion"
And I grade by filling the rubric with:
| Criterion 1 | 50 | Very good |
| Criterion 2 | 10 | Mmmm, you can do it better |
| Criterion 3 | 5 | Not good |
And I complete the advanced grading form with these values:
| Feedback comments | In general... work harder... |
# Checking that the user grade is correct.
And I should see "58.33" in the "Student 1" "table_row"
# Updating the user grade.
And I go to "Student 1" "Test assignment 1 name" activity advanced grading page
And I grade by filling the rubric with:
| Criterion 1 | 20 | Bad, I changed my mind |
| Criterion 2 | 10 | Mmmm, you can do it better |
| Criterion 3 | 5 | Not good |
#And the level with "50" points was previously selected for the rubric criterion "Criterion 1"
#And the level with "20" points is selected for the rubric criterion "Criterion 1"
And I save the advanced grading form
And I should see "22.62" in the "Student 1" "table_row"
And I log out
# Viewing it as a student.
And I log in as "student1"
And I follow "Course 1"
And I follow "Test assignment 1 name"
And I should see "22.62" in the ".feedback" "css_element"
And I should see "Rubric test description" in the ".feedback" "css_element"
And I should see "In general... work harder..."
And the level with "10" points is selected for the rubric criterion "Criterion 2"
And the level with "20" points is selected for the rubric criterion "Criterion 1"
And the level with "5" points is selected for the rubric criterion "Criterion 3"
And I log out
And I log in as "teacher1"
And I follow "Course 1"
# Editing a rubric definition without regrading students.
And I go to "Test assignment 1 name" advanced grading definition page
And "Save as draft" "button" should not exists
And I click on "Move up" "button" in the "Criterion 1" "table_row"
And I replace "Level 11" rubric level with "Level 11 edited" in "Criterion 1" criterion
And I press "Save"
And I should see "You are about to save changes to a rubric that has already been used for grading."
And I select "Do not mark for regrade" from "menurubricregrade"
And I press "Continue"
And I log out
# Check that the student still sees the grade.
And I log in as "student1"
And I follow "Course 1"
And I follow "Test assignment 1 name"
And I should see "22.62" in the ".feedback" "css_element"
And the level with "20" points is selected for the rubric criterion "Criterion 1"
And I log out
# Editing a rubric with significant changes.
And I log in as "teacher1"
And I follow "Course 1"
And I go to "Test assignment 1 name" advanced grading definition page
And I click on "Move down" "button" in the "Criterion 2" "table_row"
And I replace "1" rubric level with "11" in "Criterion 1" criterion
And I press "Save"
And I should see "You are about to save significant changes to a rubric that has already been used for grading. The gradebook value will be unchanged, but the rubric will be hidden from students until their item is regraded."
And I press "Continue"
And I log out
# Check that the student doesn't see the grade.
And I log in as "student1"
And I follow "Course 1"
And I follow "Test assignment 1 name"
And I should see "22.62" in the ".feedback" "css_element"
And the level with "20" points is not selected for the rubric criterion "Criterion 1"
And I log out
# Regrade student.
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Test assignment 1 name"
And I go to "Student 1" "Test assignment 1 name" activity advanced grading page
And I should see "The rubric definition was changed after this student had been graded. The student can not see this rubric until you check the rubric and update the grade."
And I save the advanced grading form
And I log out
# Check that the student sees the grade again.
And I log in as "student1"
And I follow "Course 1"
And I follow "Test assignment 1 name"
And I should see "12.16" in the ".feedback" "css_element"
And the level with "20" points is not selected for the rubric criterion "Criterion 1"
# Hide all rubric info for students
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I go to "Test assignment 1 name" advanced grading definition page
And I uncheck "Allow users to preview rubric used in the module (otherwise rubric will only become visible after grading)"
And I uncheck "Display rubric description during evaluation"
And I uncheck "Display rubric description to those being graded"
And I uncheck "Display points for each level during evaluation"
And I uncheck "Display points for each level to those being graded"
And I press "Save"
And I select "Do not mark for regrade" from "menurubricregrade"
And I press "Continue"
And I log out
# Students should not see anything.
And I log in as "student1"
And I follow "Course 1"
And I follow "Test assignment 1 name"
And I should not see "Criterion 1" in the ".submissionstatustable" "css_element"
And I should not see "Criterion 2" in the ".submissionstatustable" "css_element"
And I should not see "Criterion 3" in the ".submissionstatustable" "css_element"
And I should not see "Rubric test description" in the ".feedback" "css_element"
@javascript
Scenario: I can use rubrics to grade and edit them later updating students grades with Javascript enabled
Scenario: I can use rubrics to grade and edit them later updating students grades with Javascript disabled
@@ -0,0 +1,56 @@
@gradingform @gradingform_rubric
Feature: Publish rubrics as templates
In order to save time to teachers
As a manager
I need to publish rubrics and make them available to all teachers
Background:
Given the following "users" exists:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| manager1 | Manager | 1 | manager1@asd.com |
And the following "courses" exists:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "activities" exists:
| activity | course | idnumber | name | intro | advancedgradingmethod_submissions |
| assign | C1 | A1 | Test assignment 1 name | TA1 | rubric |
| assign | C1 | A2 | Test assignment 2 name | TA2 | rubric |
And the following "course enrolments" exists:
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "system role assigns" exists:
| user | role | contextlevel | reference |
| manager1 | manager | System | |
And I log in as "manager1"
And I follow "Course 1"
And I go to "Test assignment 1 name" advanced grading definition page
And I fill the moodle form with:
| Name | Assignment 1 rubric |
| Description | Assignment 1 description |
And I define the following rubric:
| Criterion 1 | Level 11 | 11 | Level 12 | 12 |
| Criterion 2 | Level 21 | 21 | Level 22 | 22 |
And I press "Save rubric and make it ready"
When I publish "Test assignment 1 name" grading form definition as a public template
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I set "Test assignment 2 name" activity to use "Assignment 1 rubric" grading form
Then I should see "Advanced grading: Test assignment 2 name (Submissions)"
And I should see "Criterion 1"
And I should see "Assignment 1 description"
And I go to "Test assignment 2 name" advanced grading definition page
And I should see "Current rubric status"
@javascript
Scenario: Create a rubric template and reuse it as a teacher, with Javascript enabled
Then the "Description" field should match "<p>Assignment 1 description</p>" value
And I should see "Criterion 1"
And I press "Cancel"
Scenario: Create a rubric template and reuse it as a teacher, with Javascript disabled
Then the "Description" field should match "Assignment 1 description" value
# Trying to avoid pointing by id or name as the code internals may change.
And "//table[@class='criteria']//textarea[text()='Criterion 1']" "xpath_element" should exists
And I press "Cancel"
@@ -0,0 +1,52 @@
@gradingform @gradingform_rubric
Feature: Reuse my rubrics in other activities
In order to save time creating duplicated grading forms
As a teacher
I need to reuse rubrics that I created previously
Background:
Given the following "users" exists:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
And the following "courses" exists:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exists:
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment 1 name |
| Description | Test assignment 1 description |
| Grading method | Rubric |
And I go to "Test assignment 1 name" advanced grading definition page
And I fill the moodle form with:
| Name | Assignment 1 rubric |
| Description | Assignment 1 description |
And I define the following rubric:
| Criterion 1 | Level 11 | 11 | Level 12 | 12 | Level 3 | 13 |
| Criterion 2 | Level 21 | 21 | Level 22 | 22 | Level 3 | 23 |
| Criterion 3 | Level 31 | 31 | Level 32 | 32 |
And I press "Save rubric and make it ready"
And I follow "Course 1"
When I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment 2 name |
| Description | Test assignment 2 description |
| Grading method | Rubric |
And I set "Test assignment 2 name" activity to use "Assignment 1 rubric" grading form
Then I should see "Ready for use"
And I should see "Criterion 1"
And I should see "Criterion 2"
And I should see "Criterion 3"
And I go to "Test assignment 1 name" advanced grading definition page
And I should see "Criterion 1"
And I should see "Criterion 2"
And I should see "Criterion 3"
And I press "Cancel"
@javascript
Scenario: A teacher can reuse one of his/her previously created rubrics, with Javascript enabled
Scenario: A teacher can reuse one of his/her previously created rubrics, with Javascript disabled
+181
View File
@@ -0,0 +1,181 @@
<?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/>.
/**
* Grading methods steps definitions.
*
* @package core_grading
* @category test
* @copyright 2013 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php.
require_once(__DIR__ . '/../../../../lib/behat/behat_base.php');
use Behat\Gherkin\Node\TableNode as TableNode,
Behat\Behat\Context\Step\Given as Given,
Behat\Behat\Context\Step\When as When;
/**
* Generic grading methods step definitions.
*
* @package core_grading
* @category test
* @copyright 2013 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class behat_grading extends behat_base {
/**
* Goes to the selected advanced grading page. You should be in the course page when this step begins.
*
* @Given /^I go to "(?P<activity_name_string>(?:[^"]|\\")*)" advanced grading page$/
* @param string $activityname
* @return Given[]
*/
public function i_go_to_advanced_grading_page($activityname) {
return array(
new Given('I follow "' . $this->escape($activityname) . '"'),
new Given('I follow "' . get_string('gradingmanagement', 'grading') . '"'),
);
}
/**
* Goes to the selected advanced grading definition page. You should be in the course page when this step begins.
*
* @Given /^I go to "(?P<activity_name_string>(?:[^"]|\\")*)" advanced grading definition page$/
* @param string $activityname
* @return Given[]
*/
public function i_go_to_advanced_grading_definition_page($activityname) {
// Transforming to literals, probably not necessary, just in case.
$newactionliteral = $this->getSession()->getSelectorsHandler()->xpathLiteral(get_string("manageactionnew", "grading"));
$editactionliteral = $this->getSession()->getSelectorsHandler()->xpathLiteral(get_string("manageactionedit", "grading"));
// Working both when adding and editing.
$definitionxpath = "//a[@class='action']" .
"[./descendant::*[contains(., $newactionliteral) or contains(., $editactionliteral)]]";
return array(
new Given('I go to "' . $this->escape($activityname) . '" advanced grading page'),
new Given('I click on "' . $this->escape($definitionxpath) . '" "xpath_element"'),
);
}
/**
* Goes to the student's advanced grading page.
*
* @Given /^I go to "(?P<user_fullname_string>(?:[^"]|\\")*)" "(?P<activity_name_string>(?:[^"]|\\")*)" activity advanced grading page$/
* @param string $userfullname The user full name including firstname and lastname.
* @param string $activityname The activity name
* @return Given[]
*/
public function i_go_to_activity_advanced_grading_page($userfullname, $activityname) {
// Step to access the user grade page from the grading page.
$usergradetext = get_string('gradeuser', 'assign', $userfullname);
$gradeuserstep = new Given('I follow "' . $this->escape($usergradetext) . '"');
// Shortcut in case we already are in the grading page.
$usergradetextliteral = $this->getSession()->getSelectorsHandler()->xpathLiteral($usergradetext);
if ($this->getSession()->getPage()->find('named', array('link', $usergradetextliteral))) {
return $gradeuserstep;
}
return array(
new Given('I follow "' . $this->escape($activityname) . '"'),
new Given('I follow "' . $this->escape(get_string('viewgrading', 'assign')) . '"'),
$gradeuserstep
);
}
/**
* Publishes current activity grading defined form as a public template.
*
* @Given /^I publish "(?P<activity_name_string>(?:[^"]|\\")*)" grading form definition as a public template$/
* @param string $activityname
* @return Given[]
*/
public function i_publish_grading_form_definition_as_a_public_template($activityname) {
return array(
new Given('I go to "' . $this->escape($activityname) . '" advanced grading page'),
new Given('I click on "' . $this->escape(get_string("manageactionshare", "grading")) . '" "link"'),
new Given('I press "' . get_string('continue') . '"')
);
}
/**
* Sets a previously created grading form as the activity grading form.
*
* @Given /^I set "(?P<activity_name_string>(?:[^"]|\\")*)" activity to use "(?P<grading_form_template_string>(?:[^"]|\\")*)" grading form$/
* @param string $activityname
* @param string $templatename
* @return Given[]
*/
public function i_set_activity_to_use_grading_form($activityname, $templatename) {
$templateliteral = $this->getSession()->getSelectorsHandler()->xpathLiteral($templatename);
$templatexpath = "//h2[@class='template-name'][contains(., $templateliteral)]/" .
"following-sibling::div[contains(concat(' ', normalize-space(@class), ' '), ' template-actions ')]";
// Should work with both templates and own forms.
$literaltemplate = $this->getSession()->getSelectorsHandler()->xpathLiteral(get_string('templatepick', 'grading'));
$literalownform = $this->getSession()->getSelectorsHandler()->xpathLiteral(get_string('templatepickownform', 'grading'));
$usetemplatexpath = "//a[./descendant::div[text()=$literaltemplate]]|" .
"//a[./descendant::div[text()=$literalownform]]";
return array(
new Given('I go to "' . $this->escape($activityname) . '" advanced grading page'),
new Given('I follow "' . $this->escape(get_string('manageactionclone', 'grading')) . '"'),
new Given('I check "' . get_string('searchownforms', 'grading') . '"'),
new Given('I click on "' . get_string('search') . '" "button" in the "region-main" "region"'),
new Given('I click on "' . $this->escape($usetemplatexpath) . '" "xpath_element" ' .
'in the "' . $this->escape($templatexpath) . '" "xpath_element"'),
new Given('I press "' . get_string('continue') . '"')
);
}
/**
* Saves the current page advanced grading form.
*
* @When /^I save the advanced grading form$/
* @return When[]
*/
public function i_save_the_advanced_grading_form() {
return array(
new When('I press "' . get_string('savechanges') . '"'),
new When('I press "' . get_string('continue') . '"')
);
}
/**
* Grades an activity using advanced grading. Note the grade is set by other steps, depending on the grading method.
*
* @Given /^I complete the advanced grading form with these values:$/
* @param TableNode $data
* @return Given[]
*/
public function i_complete_the_advanced_grading_form_with_these_values(TableNode $data) {
return array(
new Given('I fill the moodle form with:', $data),
new Given('I save the advanced grading form')
);
}
}
+1 -1
View File
@@ -235,7 +235,7 @@ if ($formdata = $mform2->get_data()) {
$studentid = $value;
break;
case 'useridnumber':
if (!$user = $DB->get_record('user', array('idnumber' => $value))) {
if (empty($value) || !$user = $DB->get_record('user', array('idnumber' => $value))) {
// user not found, abort whole import
import_cleanup($importcode);
echo $OUTPUT->notification("user mapping error, could not find user with idnumber \"$value\"");
+12 -2
View File
@@ -179,6 +179,9 @@ table#user-grades .userpic {
}
table#user-grades .quickfeedback {
border: 1px dashed #000;
width: auto;
margin: 0;
padding: 0;
margin-left: 10px;
}
.dir-rtl table#user-grades .quickfeedback {
@@ -240,8 +243,9 @@ table#user-grades th.courseitem,
border-style: solid;
border-width: 0 1px 1px;
}
.path-grade-report-grader table td.topleft {
border-bottom: 0;
.path-grade-report-grader .left_scroller table td.topleft {
background-color: #fff;
border-bottom-color: #cecece;
}
table#user-grades td.topleft {
background-color: #fff;
@@ -287,6 +291,9 @@ table#user-grades td.topleft {
}
.path-grade-report-grader td input.text {
border: 1px solid #666;
width: auto;
margin: 0;
padding: 0;
}
.path-grade-report-grader td input.submit {
margin: 10px 10px 0px 10px;
@@ -508,6 +515,9 @@ table#user-grades td.controls,
.path-grade-report-grader .grade_icons {
margin-bottom: .3em;
}
.path-grade-report-grader tr.controls .grade_icons {
margin-bottom: 0;
}
.path-grade-report-grader .yui3-overlay {
background-color: #FFEE69;
border-color: #D4C237 #A6982B #A6982B;
+1 -1
View File
@@ -415,7 +415,7 @@ class grade_report_user extends grade_report {
$data['weight']['headers'] = "$header_cat $header_row weight";
// has a weight assigned, might be extra credit
if ($grade_object->aggregationcoef > 0 && $type <> 'courseitem') {
$data['weight']['content'] = number_format($grade_object->aggregationcoef,2).'%';
$data['weight']['content'] = number_format($grade_object->aggregationcoef,2);
}
}
+49
View File
@@ -0,0 +1,49 @@
<?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/>.
/**
* Behat grade related steps definitions.
*
* @package core_grades
* @category test
* @copyright 2014 Mark Nelson <markn@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php.
require_once(__DIR__ . '/../../../lib/behat/behat_base.php');
use Behat\Behat\Context\Step\Given as Given;
class behat_grade extends behat_base {
/**
* Enters a grade via the gradebook for a specific grade item and user when viewing the 'Grader report' with editing mode turned on.
*
* @Given /^I give the grade "(?P<grade_number>(?:[^"]|\\")*)" to the user "(?P<username_string>(?:[^"]|\\")*)" for the grade item "(?P<grade_activity_string>(?:[^"]|\\")*)"$/
* @param int $grade
* @param string $userfullname the user's fullname as returned by fullname()
* @param string $itemname
* @return Given
*/
public function i_give_the_grade($grade, $userfullname, $itemname) {
$gradelabel = $userfullname . ' ' . $itemname;
$fieldstr = get_string('useractivitygrade', 'gradereport_grader', $gradelabel);
return new Given('I fill in "' . $this->escape($fieldstr) . '" with "' . $grade . '"');
}
}
+76
View File
@@ -0,0 +1,76 @@
@core @core_grades
Feature: We can enter in grades and view reports from the gradebook
In order to check the expected results are displayed
As a teacher
I need to assign grades and check that they display correctly in the gradebook.
I need to enable grade weightings and check that they are displayed correctly.
Background:
Given the following "courses" exists:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "users" exists:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| student1 | Student | 1 | student1@asd.com |
And the following "course enrolments" exists:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
And I log out
And I log in as "student1"
And I follow "Course 1"
And I follow "Test assignment name"
When I press "Add submission"
And I fill the moodle form with:
| Online text | This is a submission |
And I press "Save changes"
Then I should see "Submitted for grading"
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Grades"
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name"
And I press "Update"
@javascript
Scenario: Grade a grade item and ensure the results display correctly in the gradebook
When I select "User report" from "Grade report"
And the "Grade report" select box should contain "Grader report"
And the "Grade report" select box should contain "Outcomes report"
And the "Grade report" select box should contain "User report"
And the "Select all or one user" select box should contain "All users (1)"
And I log out
And I log in as "student1"
And I follow "Course 1"
And I follow "Grades"
And I should see "80.00" in the "Test assignment name" "table_row"
And I select "Overview report" from "Grade report"
And I should see "80.00" in the "overview-grade" "table"
@javascript
Scenario: We can add a weighting to a grade item and it is displayed properly in the user report
When I select "Full view" from "Grade report"
And I select "Weighted mean of grades" from "Aggregation"
And I fill the moodle form with:
| Extra credit value for Test assignment name | 0.72 |
And I press "Save changes"
And I select "User report" from "Grade report"
And I follow "Course grade settings"
And I fill the moodle form with:
| Show weightings | Show |
And I press "Save changes"
And I log out
And I log in as "student1"
And I follow "Course 1"
And I follow "Grades"
Then I should see "0.72" in the "Test assignment name" "table_row"
And I should not see "0.72%" in the "Test assignment name" "table_row"
+1 -1
View File
@@ -52,7 +52,7 @@ class core_grade_edittreelib_testcase extends advanced_testcase {
$scale = $this->getDataGenerator()->create_scale();
$course = $this->getDataGenerator()->create_course();
$assign = $this->getDataGenerator()->create_module('assign', array('course' => $course->id));
$modulecontext = context_module::instance($assign->id);
$modulecontext = context_module::instance($assign->cmid);
// The generator returns a dummy object, lets get the real assign object.
$assign = new assign($modulecontext, false, false);
$cm = $assign->get_course_module();
+2 -2
View File
@@ -66,7 +66,7 @@ class core_grading_externallib_testcase extends externallib_advanced_testcase {
// Create a teacher and give them capabilities.
$coursecontext = context_course::instance($course->id);
$roleid = $this->assignUserCapability('moodle/course:viewparticipants', $coursecontext->id, 3);
$modulecontext = context_module::instance($cm->id);
$modulecontext = context_module::instance($cm->cmid);
$this->assignUserCapability('mod/assign:grade', $modulecontext->id, $roleid);
// Create the teacher's enrolment record.
@@ -146,7 +146,7 @@ class core_grading_externallib_testcase extends externallib_advanced_testcase {
$DB->insert_record('gradingform_rubric_levels', $rubriclevel2);
// Call the external function.
$cmids = array ($cm->id);
$cmids = array ($cm->cmid);
$areaname = 'submissions';
$result = core_grading_external::get_definitions($cmids, $areaname);
+5 -3
View File
@@ -50,6 +50,11 @@ $strgroups = get_string('groups');
$strparticipants = get_string('participants');
$strautocreategroups = get_string('autocreategroups', 'group');
$PAGE->set_title($strgroups);
$PAGE->set_heading($course->fullname. ': '.$strgroups);
$PAGE->set_pagelayout('standard');
navigation_node::override_active_url(new moodle_url('/group/index.php', array('id' => $courseid)));
// Print the page and form
$preview = '';
$error = '';
@@ -233,9 +238,6 @@ $PAGE->navbar->add($strparticipants, new moodle_url('/user/index.php', array('id
$PAGE->navbar->add($strgroups, new moodle_url('/group/index.php', array('id'=>$courseid)));
$PAGE->navbar->add($strautocreategroups);
/// Print header
$PAGE->set_title($strgroups);
$PAGE->set_heading($course->fullname. ': '.$strgroups);
echo $OUTPUT->header();
echo $OUTPUT->heading($strautocreategroups);
+1
View File
@@ -32,6 +32,7 @@ $groupids = required_param('groups', PARAM_SEQUENCE);
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$PAGE->set_url('/group/delete.php', array('courseid'=>$courseid,'groups'=>$groupids));
$PAGE->set_pagelayout('standard');
// Make sure course is OK and user has access to manage groups
if (!$course = $DB->get_record('course', array('id' => $courseid))) {
+6 -2
View File
@@ -74,6 +74,12 @@ require_login($course);
$context = context_course::instance($course->id);
require_capability('moodle/course:managegroups', $context);
$strgroups = get_string('groups');
$PAGE->set_title($strgroups);
$PAGE->set_heading($course->fullname . ': '.$strgroups);
$PAGE->set_pagelayout('standard');
navigation_node::override_active_url(new moodle_url('/group/index.php', array('id' => $course->id)));
$returnurl = $CFG->wwwroot.'/group/index.php?id='.$course->id.'&group='.$id;
// Prepare the description editor: We do support files for group descriptions
@@ -123,8 +129,6 @@ $PAGE->navbar->add($strgroups, new moodle_url('/group/index.php', array('id'=>$c
$PAGE->navbar->add($strheading);
/// Print header
$PAGE->set_title($strgroups);
$PAGE->set_heading($course->fullname . ': '.$strgroups);
echo $OUTPUT->header();
echo '<div id="grouppicture">';
if ($id) {
+6 -5
View File
@@ -66,8 +66,13 @@ require_login($course);
$context = context_course::instance($course->id);
require_capability('moodle/course:managegroups', $context);
$returnurl = $CFG->wwwroot.'/group/groupings.php?id='.$course->id;
$strgroupings = get_string('groupings', 'group');
$PAGE->set_title($strgroupings);
$PAGE->set_heading($course->fullname. ': '.$strgroupings);
$PAGE->set_pagelayout('standard');
navigation_node::override_active_url(new moodle_url('/group/index.php', array('id' => $course->id)));
$returnurl = $CFG->wwwroot.'/group/groupings.php?id='.$course->id;
if ($id and $delete) {
if (!empty($grouping->idnumber) && !has_capability('moodle/course:changeidnumber', $context)) {
@@ -126,9 +131,7 @@ if ($editform->is_cancelled()) {
}
$strgroupings = get_string('groupings', 'group');
$strparticipants = get_string('participants');
if ($id) {
$strheading = get_string('editgroupingsettings', 'group');
} else {
@@ -140,8 +143,6 @@ $PAGE->navbar->add($strgroupings, new moodle_url('/group/groupings.php', array('
$PAGE->navbar->add($strheading);
/// Print header
$PAGE->set_title($strgroupings);
$PAGE->set_heading($course->fullname. ': '.$strgroupings);
echo $OUTPUT->header();
echo $OUTPUT->heading($strheading);
$editform->display();

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