Commit graph

493 commits

Author SHA1 Message Date
Tim Hunt
eeb7552589 MDL-49335 quiz behat: improved step for adding questions to a quiz
Explicit headings make the script more readable, and pave the way for
new options that are due to be added.
2015-03-03 11:19:48 +00:00
Dan Poltawski
8eed9a9f42 Merge branch 'MDL-49160-master' of git://github.com/merrill-oakland/moodle 2015-03-03 08:34:31 +00:00
Andrew Nicols
ebb18182a6 MDL-49285 mod_quiz: Remove unnecessary linebreak 2015-03-03 16:23:13 +08:00
Eric Merrill
2909c04408 MDL-49285 quiz: Include lib.php for phpunit test 2015-02-24 14:53:46 -05:00
Eric Merrill
1245bfd5f0 MDL-49160 quiz: Make sure to not select an outcome grade item
When we are computing completion, make sure we select only the true
grade_item, not outcome grade items.
2015-02-24 14:40:36 -05:00
Tim Hunt
8fec847ca7 MDL-48410 behat, quiz: step for efficiently adding questions 2014-12-05 12:22:28 +00:00
Eloy Lafuente (stronk7)
38ea5e0a39 MDL-21724 course: change remaining tests to new "Save and display" 2014-12-04 12:14:31 +00:00
Tim Hunt
b8871eff04 MDL-48382 quiz behat: make add question step more robust. 2014-11-28 13:45:36 +00:00
Tim Hunt
080839c421 MDL-48168 quiz editing: max grade should be editable after attempts
Note that there was a lot of legacy code left from Moodle 2.7 which is
no longer required, and I took this opportunity to delete it.
2014-11-10 19:00:05 +00:00
Tim Hunt
58413f613e MDL-47963 quiz editing: fix failing unit tests
The unit tests were initialising the structure class in a different way
from real use. That was clearly silly, so I got rid of create_for,
leaving just the real create_for_quiz.
2014-10-31 17:22:38 +00:00
Dan Poltawski
f976c8e468 Merge branch 'MDL-47959' of git://github.com/colchambers/moodle 2014-10-30 14:24:35 +00:00
Colin Chambers
6375e98cbb MDL-47959 Number of questions not updated dynamically in new quiz edit page 2014-10-29 16:26:49 +00:00
Dan Poltawski
290bcd3476 MDL-47368 fix trailing whitespace 2014-10-29 11:20:29 +00:00
Colin Chambers
a69f81f0d3 MDL-47368 Edit quiz: page should not reload so often
The approach is that we have a new JavaScript function
M.mod_quiz.resource_toolbox.reorganise_edit_page which, after a ajax
action, fixes up everything like page breaks, page and question numbers,
that might now be wrong.

We call that function instead of reloading the page.

Also, there are a lot more Behat tests to verify this works correctly.

AMOS BEGIN
 MOV [joinpages,mod_quiz],[removepagebreak,mod_quiz]
 MOV [splitpages,mod_quiz],[addpagebreak,mod_quiz]
AMOS END
2014-10-28 11:32:42 +00:00
Dan Poltawski
670b0d0283 Merge branch 'MDL-47691' of git://github.com/timhunt/moodle 2014-10-20 17:24:22 +01:00
Tim Hunt
1c2e05c060 MDL-47691 quiz: only warn re overdue attempts if a Q has been answered
If a quiz is set to have a grace period when time has expired, we only
email studnets to warn them about their overdue attempt if they have put
in an answer to at least one question that is worth some marks.
2014-10-20 12:11:10 +01:00
Tim Hunt
0233e2a973 MDL-47673 quiz generator: default grade 100 & fix review options
The review option defaults need to be like what you get from the editing
form, no what is stored in the database, or they don't work!
2014-10-20 12:11:01 +01:00
Dan Poltawski
66689366a0 Merge branch 'wip-MDL-47543-master' of git://github.com/marinaglancy/moodle
Conflicts:
	theme/bootstrapbase/less/moodle/grade.less
	theme/bootstrapbase/style/moodle.css
2014-10-08 15:49:58 +01:00
Marina Glancy
9f1088d482 MDL-47543 core_grades: behat changes, also MDL-47541 2014-10-08 15:03:37 +08:00
Mark Nelson
ba8024665d MDL-40697 mod_*: fixed unit tests so they pass 2014-10-07 19:08:35 -07:00
Sam Hemelryk
ba2f9a9695 Merge branch 'MDL-47132' of git://github.com/timhunt/moodle 2014-10-08 12:01:42 +13:00
Dan Poltawski
f5bacd6539 Merge branch 'wip-MDL-46576-master' of git://github.com/abgreeve/moodle
Conflicts:
	lib/upgrade.txt
    lib/db/upgrade.php
	version.php
2014-10-06 18:06:13 +01:00
Tim Hunt
16fa272e29 MDL-47132 quiz: move the remains of editlib.php to locallib.php 2014-10-03 07:54:47 +01:00
Marina Glancy
8faa560ca9 MDL-47146 core_grades: merge simple and full view in setup
Part of: MDL-46576
2014-10-03 13:54:38 +08:00
Colin Chambers
e1a2d0d92d MDL-43089 quiz: improved interface for building quizzes
This commit is actually the joint work of Mahmoud Kassaei, Colin
Chambers and Tim Hunt from The Open University. We could only use one
persons name for the commit, and this time Colin gets the credit/blame.

The goal of this work was to increase usability, and also clean up
the page enough that it will be possible to add new features in future.

Display of mod/quiz/edit.php is now entirely generated by
mod_quiz\output\edit_renderer. This uses a helper class
mod_quiz\structure to provide details of the structure of the quiz, and
mod_quiz\repaginate to alter that structure. (Acutally, there are still
some modification methods on mod_quiz\structure. Expect that to be
cleaned up in future.)

The new code uses much more ajax, and there are new scripts
mod/quiz/edit_rest.php and mod/quiz/repaginate.php to handle this.
(Again, don't be surprised if those two scripts get merged in future.)
Also questionbank.ajax.php (which may, in future, be made more generic,
and moved into the core question bank code.)

Most of the new JavaScript code has intentionally copied the way things
are done when editing activities on the course page.

As a result of this, mod/quiz/editlib.php is now much shorter than it
was. (In future, expect the remaining code in here to move into
mod/quiz/classes.)
2014-10-02 17:22:23 +01:00
Tim Hunt
358f31672b MDL-37998 quiz settings: disableif rules should account for overrides.
Some form fields are disabled if only one attempt is allowed. However,
there may be an override allowing some students more attempts. We need
to account for that possiblity when setting up the disabled if rules.

Note the disabledIf is good for usability on this complex form, which is
why I don't just want to get rid of them.
2014-09-22 16:23:38 +01:00
Andrew Nicols
5afbca2485 MDL-45759 mod_quiz: Correct behat test to reflect changes from a translation fix 2014-08-13 15:44:52 +08:00
Sam Hemelryk
3c94f90cde MDL-37993 mod_quiz: fixed deprecated behat step 2014-07-15 09:10:17 +12:00
Sam Hemelryk
9b3b730c62 Merge branch 'MDL-37993-quiz-completion-pass-attempts' of git://github.com/MorrisR2/moodle 2014-07-15 08:48:55 +12:00
Ray Morris
db3686d546 MDL-37993 Quiz: completion upon all passing grade or attempts exhausted
This patch adds completion options to Quiz similar to what is available in scorm.
One can have the quiz marked complete when either a passing grade is achieved or
all attempts are used up. This will allow a quiz to complete when the user "passes
or fails".  (Where "fail" means "using up all attempts without passing".)
2014-07-14 10:14:27 -05:00
Tim Hunt
8cacc71dd2 MDL-44492 quiz reports: make show only graded attempt work.
It needs to only affect finished attempts, and the wording needs to be
modified to make it clear that is what it does.
2014-07-08 13:31:49 +01:00
Tim Hunt
097dbfe11a MDL-46093 quiz review should default to showing everything on one page
... as long as the quiz is not too big. At the moment, that limit is
set to 50 questions.
2014-06-27 17:14:51 +01:00
Damyon Wiese
2404605ad4 Merge branch 'MDL-35453' of git://github.com/timhunt/moodle 2014-06-23 12:29:36 +08:00
Tim Hunt
1c2e363c0e MDL-46086 quiz: fix unit test on Oracle 2014-06-20 22:25:21 +01:00
Tim Hunt
2ce9a94d96 MDL-35453 quiz reports: don't order by id.
We were using ORDER BY id even though there was a perfectly good
attempt column to order the attempts by one user at one quiz.

Also, Oracle was complaining:
Debug info: ORA-01799: a column may not be outer-joined to a subquery
2014-06-20 16:09:03 +01:00
Damyon Wiese
1df546a77e Merge branch 'MDL-45803_master' of https://github.com/markn86/moodle 2014-06-16 11:00:26 +08:00
Mark Nelson
62a3472e24 MDL-45803 mod_quiz: removed usage of the function quiz_fire_attempt_started_event 2014-06-11 13:53:03 -07:00
Eric Merrill
828a4e9f6e MDL-20154 quiz: Remove unused random questions
When a random question is removed from a quiz, and it is not
in use elsewhere, it should be deleted.
2014-06-05 11:06:26 -04:00
Petr Skoda
b649341dab MDL-43557 add missing description to \mod_quiz\event\attempt_becameoverdue 2014-04-30 15:00:03 +08:00
Dan Poltawski
ac13361b77 Merge branch 'MDL-45023-master' of git://github.com/jamiepratt/moodle 2014-04-18 13:47:10 +08:00
Mark Nelson
92089e0ecc MDL-45057 mod_quiz: restored the user/group override deleted events 2014-04-13 22:32:06 -07:00
Dan Poltawski
97c274ded7 MDL-40063/MDL-45057 quiz: disable related unit tests
I kept the commit number format same as the last commit just
to annoy Fred.
2014-04-11 17:36:40 +08:00
James Pratt
ea6db479dd MDL-45023 quiz statistics report : refactoring of tests for code reuse 2014-04-11 15:07:08 +07:00
Mark Nelson
9d65d3e70b MDL-40063 mod_quiz: created 'override_created' events 2014-04-10 20:42:44 -07:00
Mark Nelson
e8365f27e5 MDL-40063 mod_quiz: replaced ‘manualgrade’ add_to_log call with an event 2014-04-10 20:42:24 -07:00
Mark Nelson
a2caf56dff MDL-40063 mod_quiz: replaced 'attempt' add_to_log call with an event 2014-04-10 20:41:56 -07:00
Mark Nelson
45e1e3bd76 MDL-40063 mod_quiz: replaced 'preview' add_to_log call with an event 2014-04-10 20:41:54 -07:00
Mark Nelson
e0114708af MDL-40063 mod_quiz: replaced 'continue attempt' add_to_log call with an event 2014-04-10 20:41:39 -07:00
Mark Nelson
8de2eb3582 MDL-40063 mod_quiz: replaced 'delete override' add_to_log call with events 2014-04-10 20:41:09 -07:00
Mark Nelson
e7d80a059a MDL-40063 mod_quiz: replaced 'edit override' add_to_log call with events 2014-04-10 20:40:51 -07:00