1
0
mirror of https://github.com/moodle/moodle.git synced 2025-03-02 23:09:37 +01:00

60184 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
54e48dc32d Merge branch 'MDL-38547_master' of git://github.com/dmonllao/moodle 2013-04-01 22:32:06 +02:00
Eloy Lafuente (stronk7)
c57c57c575 Merge branch 'MDL-38499_master' of git://github.com/dmonllao/moodle 2013-04-01 22:23:58 +02:00
Eloy Lafuente (stronk7)
0251a62500 Merge branch 'MDL-38486_master' of git://github.com/dmonllao/moodle 2013-04-01 22:17:12 +02:00
Eloy Lafuente (stronk7)
c5f6371f04 MDL-38825 behat: fix composer install url 2013-04-01 18:55:34 +02:00
Eloy Lafuente (stronk7)
d4a5896f8a Merge branch 'MDL-38817_master' of git://github.com/dmonllao/moodle 2013-04-01 13:25:31 +02:00
Eloy Lafuente (stronk7)
68adfee6d4 Merge branch 'MDL-38788_master' of git://github.com/dmonllao/moodle 2013-04-01 13:17:20 +02:00
Eloy Lafuente (stronk7)
b216376811 Merge branch 'MDL-38787_master' of git://github.com/dmonllao/moodle 2013-04-01 13:12:08 +02:00
David Monllao
be0e1825d3 MDL-38823 behat: New test
According to MDLQA-521, a teacher can set a certain
number of discussions as a completion condition for
a forum.
2013-04-01 17:52:46 +08:00
David Monllao
7bc7625e04 MDL-38823 behat: Make default form field manage different HTML elements 2013-04-01 17:51:54 +08:00
David Monllao
125765ed18 MDL-38437 behat: Behat feature for mod_forum
Basic add an activity, MDLQA-2 (students
can edit or delete their forum posts within
a set time limit).
2013-04-01 16:27:16 +08:00
David Monllao
74508a5ddb MDL-38437 behat: Step definition to add a discussion 2013-04-01 16:27:09 +08:00
Jean-Michel Vedrine
9219089a72 MDL-38808 Remove deprecated unzip_file from qformat blackboard_six 2013-04-01 09:34:07 +02:00
David Monllao
424f56fc90 MDL-38817 behat: New test
According to MDLQA-50, in a survey activity
a teacher can set three types of survey
2013-04-01 13:57:01 +08:00
David Monllao
f076b0d43f MDL-38805 behat: Steps definitions to check students completed activities 2013-04-01 12:32:25 +08:00
David Monllao
abc38a9738 MDL-38805 behat: New test
According to MDLQA-511, a teacher can
enable students to manually mark an activity
as complete.
2013-04-01 12:32:25 +08:00
David Monllao
3a4d76ac3d MDL-38805 behat: Externalized behat_form_field loader 2013-04-01 12:32:25 +08:00
David Monllao
e7a0600b88 MDL-38804 behat: Step definition to set site administration settings 2013-04-01 12:31:48 +08:00
David Monllao
4569bc7ce8 MDL-38804 behat: New test
According to MDLQA-1780, a teacher can
set completion conditions to restrict
the availability of a section
2013-04-01 12:31:47 +08:00
David Monllao
5bc64b0fab MDL-38814 behat: Deleting old files 2013-04-01 12:22:43 +08:00
David Monllao
95932c376b DML-38814 behat: Split steps definitions tests into features 2013-04-01 12:22:40 +08:00
David Monllao
d87bbb3d3d MDL-38814 behat: Move filepicker steps definitions to repository/ 2013-04-01 12:16:57 +08:00
David Monllao
1c00d6f636 MDL-38788 behat: Add a block and add an activity steps definitions compatible with JS disabled 2013-04-01 11:18:33 +08:00
David Monllao
cd7ea8f0cc MDL-38788 behat: Generic form elements interaction compatibile with JS disabled 2013-04-01 11:18:33 +08:00
David Monllao
c94a0d1890 MDL-38788 behat: New tests with Javascript disabled
Add a block and add an activity/resource
tests. The add an activity with JS disabled
test includes MDLQA-2446 automation.
2013-04-01 11:17:45 +08:00
Jonathon Fowler
c8845ca917 MDL-38705 qformat_blackboard_six: use qti title as category name
Specifically, the title on the 'assessment' element is used.
2013-03-31 14:00:01 +10:00
Tim Hunt
dc1ee5cb29 MDL-34640 question repsponse files: remaining tidy up of this code. 2013-03-30 21:16:18 +00:00
Mathieu Petit-Clair
d0782585c8 MDL-34640: adding code to pass contextid and question type to question_file_loader. 2013-03-30 19:57:03 +00:00
Tim Hunt
8a1e7b7756 MDL-34640 quesion reponse files: PARTIAL SOLUTION to allowing resonse files to be graded automatically. 2013-03-30 19:53:15 +00:00
Tim Hunt
0561fdf167 MDL-38809 quiz manual grading: delete expensive unnecssary code. 2013-03-30 17:25:52 +00:00
David Mudrák
b2a138a20f MDL-38509 Escalate the maturity level of the plugin
The API is considered stable now and there should not be a need to
change it.
2013-03-29 01:30:00 +01:00
David Mudrák
0a6a344d29 MDL-38509 Add hook for the installaddonrequest into admin/index.php
If the user selects a plugin in Moodle plugins directory to be installed
into their site, Moodle plugins directory will redirect them into their
site's admin/index.php script, providing the installaddonrequest
parameter.

This patch makes sure that only if the user is logged-in as the admin
and the site is fully installed and up-to-date, the add-on installation
request will be dispatched to the tool_installaddon for actual
processing.

We need to store the installaddonrequest value in the $PAGE's URL so
that is is stored in $SESSION->wantsurl in case the user needs to log in
at their site. Thanks to this, the request is dispatched after the user
logs in.
2013-03-29 01:00:16 +01:00
David Mudrák
af96f120e9 MDL-38509 Add ability to install add-ons from the remote repository
There is a new hook in the index.php file. If valid HTTP parameter
installaddonrequest is detected, the installer asks the administrator to
confirm the request.

If confirmed, the installer calls download.moodle.org/api/1.2/pluginfo.php
service to get information about the given plugin version. The essential
data are the URL of the ZIP to download and the MD5 hash of the ZIP.
These data must be fetched via HTTPS to protect against MiM attack.

If the ZIP is downloaded and the MD5 content hash is correct, the user
is redirected to the previously implemented ZIP validation page, as if
the ZIP was uploaded manually.

The valid format of the installaddonrequest is documented via the
test_decode_remote_request() unit test method.
2013-03-29 00:16:06 +01:00
Rex Lorenzo
c4dbfb2c91 MDL-35603 - Backup - Course import selector notice
* added new config option to determine length of courses returned by import
* added text indicator if there are more than X number of courses, similar to how the restore course list currently works
2013-03-28 15:24:51 -07:00
Matteo Scaramuccia
fd10686843 MDL-38745 SCORM: fixed appending 'API logging is on|off', once per launch 2013-03-28 22:28:06 +01:00
Matteo Scaramuccia
cc351edaf0 MDL-38745 SCORM: fixed doubling double quotes for 'even' and 'odd' 2013-03-28 22:28:03 +01:00
Matteo Scaramuccia
0f7d527816 MDL-38790 Repositories: missing call to setType in 'My private files' form 2013-03-28 22:12:53 +01: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
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