Commit graph

60519 commits

Author SHA1 Message Date
Matteo Scaramuccia
0f7d527816 MDL-38790 Repositories: missing call to setType in 'My private files' form 2013-03-28 22:12:53 +01:00
Colin Chambers
c7218aef8d MDL-36570 question editing: group answer/choice fields better. 2013-03-28 17:25:45 +00:00
Tim Hunt
595708884a MDL-38538 quiz auto-save front end.
1. There is a new admin setting to control whether this feature is
enabled. The admin can set the auto-save frequency to 1, 2 or 5 minutes,
or disable it.

2. When autosave is enabled, there is code in the quiz that monitors the
main quiz form, and does an ajax save call at the given frequency when
changes are being made by the student.

3. The ajax saves go to a new script that calls the question engine to
do the work.

4. To avoid simultaneous autosave + submit and finish, the auto-save
system shuts down shortly before time expires in a timed quiz.
2013-03-28 16:57:24 +00:00
Tim Hunt
0a606a2be2 MDL-38538 question auto-save back end.
1. Autosave works in some ways just like a normal save. We ultimately
call $behaviour->process_save() to do the work, and create a new step to
hold the data.

2. However, we come in through a completely different route through the
API, starting with separate auto-save methods. This keeps the auto-save
changes mostly separate, and so reduced the chance of breaking existing
working code.

3. When the time comes to store the auto-save step in the database, we
save it using a negative sequence number.

This is a clever trick that not only distinguises these steps, but also
avoids unique key errors when an auto-save and a real action happen
simultaneously. (There are unit tests for these tricky edge cases.)

4. When we load the data back from the database, most of the time the
auto-save steps are loaded back as if they were a real save, and so the
auto-saved data is used when the question is then rendered.

5. However, before we process another action, we remove the auto-saved
step, so it does not appear in the final history.
2013-03-28 16:51:59 +00:00
Tim Hunt
eca230b521 MDL-38538 question unit tests: improve things a bit.
1. Split the question_attempt tests into one class per file.
2. Imporve the API to give tests more control, and to test more of the
   important code. Some of this is not used here, but it is about to be.
2013-03-28 16:05:34 +00:00
Eloy Lafuente (stronk7)
35601d77f9 MDL-38633 folder: support show_expanded in backup. 2013-03-28 17:00:46 +01:00
David Mudrák
399ddcc73e MDL-38509 Move the tool node in the navigation
The "Install add-ons" should appear just below Site administration >
Plugins, before the "Activity modules".
2013-03-28 11:54:07 +01:00
David Mudrák
b7f6442670 MDL-38509 Fix the communication protocol with Moodle plugins directory
Implements the behaviour currently specified at
http://docs.moodle.org/dev/On-click_add-on_installation
2013-03-28 11:54:06 +01:00
David Mudrák
59a2cc8d38 MDL-38509 Add the script that finally deploys the validated ZIP contents 2013-03-28 11:54:06 +01:00
David Mudrák
a143984a36 MDL-38509 Add strings for the new admin tool 2013-03-28 11:54:06 +01:00
David Mudrák
cbd125e85d MDL-38509 Implement the ZIP package validation page
The script validate.php expects a ZIP file stored in a temporary
location. It extracts the ZIP (optionally renaming the root directory)
and executes the validator. Then it renders the validator log messages
and continue buttons.
2013-03-28 11:54:06 +01:00
David Mudrák
07083b230b MDL-38509 Add new tool_installaddon_installer::extract_installfromzip_file() method 2013-03-28 11:54:06 +01:00
David Mudrák
585b64a607 MDL-38509 Save uploaded ZIP into a temporary location and redirect to validator 2013-03-28 11:54:06 +01:00
David Mudrák
30bec5ba8d MDL-38509 Add new tool_installaddon_installer::get_plugintype_root() method 2013-03-28 11:54:06 +01:00
David Mudrák
a4fcf56f0a MDL-38509 Implement the plugin ZIP package validator
The validator code contains (modified) fragments of the
local_plugins_archive_validator class copyrighted by Marina Glancy that
is part of the local_plugins plugin. It operates over an extracted
copy of the ZIP file.
2013-03-28 11:54:06 +01:00
David Mudrák
ddab904ba8 MDL-38509 Check for writable plugin type location in install from ZIP form
Standard mform validation is implemented as well as progressively
enhanced AJAX version.
2013-03-28 11:54:05 +01:00
David Mudrák
2459758b30 MDL-38509 Mark the new installaddon admin tool as the standard plugin 2013-03-28 11:54:05 +01:00
David Mudrák
0056f2a37b MDL-38509 Initial version of the new admin tool to install add-ons 2013-03-28 11:54:05 +01:00
David Mudrák
b8efcb9233 MDL-38509 Implement new plugin_manager::plugintype_name()
This has exactly the same behaviour as the existing
plugintype_name_plural() method, but returns the singular form of the
plugin type (such as 'Activity module').
2013-03-28 11:54:05 +01:00
David Mudrák
ce1a0d3cd8 MDL-38509 Implement new plugin_manager::get_plugin_types()
This new method just takes the result of the core get_plugin_types() and
re-orders the plugin types in the same way as they are displayed at the
Plugins overview screen.
2013-03-28 11:54:05 +01:00
David Mudrák
c2c4f722b5 MDL-38509 Document the plugin deployment lockers in config-dist.php 2013-03-28 11:54:05 +01:00
David Mudrák
e91670edc0 MDL-38493 Improve documentation of mdeploy.php 2013-03-28 11:54:05 +01:00
David Mudrák
203b432159 MDL-38493 Make mdeploy.php able to install new plugin
The patch implements the second mode of the mdeploy.php script. If
--install option is passed, the given package is downloaded, verified
and deployed to the requested location.
2013-03-28 11:54:05 +01:00
sam marshall
71638033eb MDL-26956 (3) Enrol: Add filter options to enrolments screen 2013-03-28 10:46:36 +00:00
sam marshall
d953b18495 MDL-26956 (2) Forms: Function to render form to string
Previously it was only possible to display the form immediately as
HTML output. You had to wrap in an output buffer in order to put
it in a renderer. This new function does the output buffer for you.
2013-03-28 10:46:33 +00:00
sam marshall
b2ec866fc7 MDL-26956 (1) Library: Move search SQL function to datalib
This function used to be in the user selector, but it is useful in
other areas where we want to search for users as it handles a number
of search options (including extra fields, etc.) and returns SQL
which can be included in a joined query.

A unit test has been added to check the results of these searches.
2013-03-28 10:45:12 +00:00
David Monllao
eff79d5378 MDL-38787 behat: Move to the new Javascript-based test class manager 2013-03-28 16:59:18 +08:00
Damyon Wiese
d8201d49d8 weekly release 2.5dev 2013-03-28 14:44:31 +08:00
David Monllao
a3dd930ec0 MDL-38686 behat: New restore course test
According to MDLQA-4596, a teacher can change
the format of a restored course
2013-03-28 14:43:38 +08:00
David Monllao
60054942ec MDL-38689 behat: Steps definitions to compare DOM nodes position inside the DOM 2013-03-28 14:41:41 +08:00
David Monllao
28435f1a64 MDL-38689 behat: Allowing more than one selector type argument
Regex's placeholders can not be repeated, if
there are definitions that have more than one
selector type of the same kind it would not
be displayed like that in the steps definitions
list UI
2013-03-28 14:41:41 +08:00
David Monllao
135c685381 MDL-38689 behat: New test
According to MDLQA-931, a teacher can
copy an activity.
2013-03-28 14:41:41 +08:00
Damyon Wiese
9ee29404be Fix permissions 2013-03-28 14:36:33 +08:00
David Monllao
4bd605da79 MDL-38690 behat: Step definition to import a course 2013-03-28 14:35:22 +08:00
David Monllao
00f074620e MDL-38688 behat: Restore Moodle 2 courses tests 2013-03-28 14:27:14 +08:00
David Monllao
52e8f537b9 MDL-38688 behat: Backup tests
Complemented by restore_moodle2_courses.feature
tests.
2013-03-28 14:27:14 +08:00
David Monllao
030a606e49 MDL-38688 behat: Steps definitions for backup/restore 2013-03-28 14:27:12 +08:00
David Monllao
4b528daed5 MDL-38616 behat: New test
According to MDLQA-4600, an admin
can control which activities can
be added to courses.
2013-03-28 14:16:21 +08:00
David Monllao
bf648567e0 MDL-38548 behat: Step definitions to check activities visibility 2013-03-28 12:07:44 +08:00
David Monllao
3442b9e54f MDL-38548 behat: New tests
The show/hide activity/resource icon
functions correctly. According to
MDLQA-1573, MDLQA-1574, MDLQA-1575,
MDLQA-1576 and MDLQA-1577.
2013-03-28 12:06:24 +08:00
David Monllao
e62f1b3b63 MDL-38620 behat: Modified upload_users.csv fixture
Including course and group enrolments
2013-03-28 11:19:09 +08:00
David Monllao
2904bf9ddf MDL-38620 behat: New test
According to MDLQA-1175; test
removed from repository_upload as
is included in MDLQA-1175 test
2013-03-28 11:19:07 +08:00
David Monllao
ba097b8253 MDL-38619 behat: New test
According to MDLQA-1445, an administrator
can upload users to a cohort.
2013-03-28 11:17:33 +08:00
David Monllao
f0e4cf5e31 MDL-38619 behat: Step definition to add enrolment methods to courses 2013-03-28 11:17:14 +08:00
David Monllao
23349a73ae MDL-38619 testing: Adapter to cohorts data generator 2013-03-28 11:17:14 +08:00
David Monllao
e800f0d6ae MDL-38619 behat: New test
According to MDLQA-1177, an administrator
can create a cohort and add users to it.
2013-03-28 11:17:11 +08:00
Frederic Massart
5581c618fc MDL-38751 usability: Different style for cancel button 2013-03-28 11:14:24 +08:00
David Monllao
3ea8721a0c MDL-38621 behat: New test
According to MDLQA-1172, course short
names may be displayed on the list of
courses page.
2013-03-28 10:58:57 +08:00
Frederic Massart
8783e17b0f MDL-38590 data: Reformat settings form
AMOS BEGIN
 CPY [allowcomments,mod_glossary],[allowcomments,mod_data]
AMOS END
2013-03-28 10:53:58 +08:00
Frederic Massart
a4b076d51b MDL-38681 form: Changed collapse/expand button to a link 2013-03-28 10:18:58 +08:00