2778 Commits

Author SHA1 Message Date
Tim Hunt
234c5337f7 MDL-47797 quesion preview: improve the behat script
Tests a few more buttons, and also verify more of the UI.
2014-10-31 15:52:55 +00:00
Tim Hunt
40459677a0 MDL-47797 question preview: show more technical info
It is helpful for developers creating question types (at least) to be
able to see this.
2014-10-31 15:52:54 +00:00
Dan Poltawski
0255780b9c Merge branch 'MDL-47791' of git://github.com/timhunt/moodle 2014-10-24 11:48:19 +02:00
Damyon Wiese
bdb319a5b1 Merge branch 'MDL-47740' of git://github.com/timhunt/moodle 2014-10-24 11:48:01 +02:00
Damyon Wiese
96ef037856 Merge branch 'MDL-32616' of git://github.com/timhunt/moodle 2014-10-24 11:47:59 +02:00
Tim Hunt
cda62a3829 MDL-47791 question editing: remove permission info from above the form
This information is not really meaningful for users, and takes up prime
real-estate, so we are removing it.
2014-10-21 15:03:20 +01:00
Tim Hunt
a8de866712 MDL-47740 question engine: let qs update variant later if appropriate
Variant has two purposes. First to determine which version of the
question the student will see. Hence it is used to set up the state
of the quetsion when the question is started. Then the internal state of
the question is saved in the first step.

Once that has been done, the variant number is purely informative, and
just used to break down the statistics.

In some cases (the one I have in mind is qtype_opaque) then there is a
complex randomisation process, which may lead to several inital variant
numbers acutally giving the same version of the question. In this case
it is nice if the question can update the stored variant number, to make
the statistics more meaningful.
2014-10-21 11:43:57 +01:00
Tim Hunt
6f336f3602 MDL-47588 question behat tests: don't close the preview window.
If you do. Chrome + Selenium2 gets stuck (on Windows at least). Selenium
must be trying to send commands ot a window that does not exist any
more.
2014-10-20 12:10:15 +01:00
Tim Hunt
cf256c05d8 MDL-32616 question engine: set_max_mark_in_attempts MySQL perf
The MySQL (& Maria DB) query 'optimizer' was failing to handle this
query, so for that DB only, we give it an equivalent query that it can
get right.

With unit test.
2014-10-20 12:06:39 +01:00
Tim Hunt
7ad0e2e654 MDL-32616 question engine: move unit test to better name 2014-10-20 12:06:38 +01:00
Dan Poltawski
799190cd2d Merge branch 'MDL-47710' of git://github.com/timhunt/moodle 2014-10-16 11:35:19 +01:00
Tim Hunt
9abf2d1417 MDL-47710 qformat_gift: fix bahat fails due to different ids in exports 2014-10-16 11:00:32 +01:00
Kevin Wiliarty
3d1c2898c1 MDL-47629 quiz review: display cloze feedback on top of "Check" button 2014-10-14 15:36:34 -04:00
Tim Hunt
d7a2a11e67 MDL-47497 qformats gift and xml: basic test of export.
Really, this is just to test the new behat setps, as much as anything.

Note that the details of what is written to the export files is tested in
the unit tests.
2014-10-08 19:43:10 +08:00
Sam Hemelryk
70b370982f Merge branch 'MDL-47476' of git://github.com/timhunt/moodle
Conflicts:
	lib/db/upgrade.php
	version.php
2014-10-08 11:02:38 +13:00
Sam Hemelryk
0c1a1760fa Merge branch 'MDL-28075' of git://github.com/timhunt/moodle 2014-10-08 10:57:15 +13:00
Dan Poltawski
816d082241 MDL-43089 question: fix shifter build issues 2014-10-06 13:53:26 +01:00
Dan Poltawski
0892a5d65f MDL-43089 question: fix whitespace 2014-10-06 12:56:45 +01:00
Tim Hunt
2dee2330aa MDL-43089 behat: fix core_question tests that use quiz.
Unfortunately, using the quiz is the only way to test this, so no way to break the dependency.
2014-10-05 22:47:52 +01:00
Tim Hunt
50b5dde8d1 MDL-28075 question editing: tidy code
Remove an unnecessary else (the if, and else if, always end in a redirect)
and unindent that code.
2014-10-02 22:03:12 +01:00
Tim Hunt
04bf7ac857 MDL-28075 question editing: sort out nav bar when editing in a quiz
If you edited a question from the Edit quiz page in a quiz, the navigation
bar was far too long. This was due to some odd code that was trying too
hard to be clever.

Instead, editing a question is now always treated as being logically within
the question bank for the purposes of navigation. That is, even if the
returnurl will end up taking you back to where you where when you have finished.
2014-10-02 22:03:12 +01: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
a75fa4c068 MDL-47476 qformat_learnwise: rest in peace.
Learnwise was an old LMS that no longer exists. (Last reference found on
Google from 2009.) So we are removing the ability to import questions in
that format.
2014-10-02 17:16:16 +01:00
Tim Hunt
02643dafe7 MDL-47381 qformat: Behat tests have wrong plugin type. 2014-09-26 11:46:06 +01:00
Eloy Lafuente (stronk7)
aec2b1c2da Merge branch 'MDL-47224' of git://github.com/aolley/moodle 2014-09-24 01:26:52 +02:00
Marina Glancy
8766d1981c MDL-45336 qtype_numerical: use own strings instead of mod_quiz
These strings have already been copied from mod_quiz to qtype_numerical but
in the qtype_numerical plugin code the translations from mod_quiz were used.
Even though the strings were already present we copy the translations.

AMOS BEGIN
 CPY [invalidnumericanswer,mod_quiz],[invalidnumericanswer,qtype_numerical]
 CPY [multiplier,mod_quiz],[qtype_numerical]
 CPY [invalidnumerictolerance,mod_quiz],[qtype_numerical]
AMOS END
2014-09-24 01:22:59 +02:00
Marina Glancy
5a0221f7c0 MDL-45336 question: moved used string from quiz plugin
AMOS BEGIN
 MOV [erroritemappearsmorethanoncewithdifferentweight,quiz_statistics],[erroritemappearsmorethanoncewithdifferentweight,question]
AMOS END
2014-09-24 01:22:58 +02:00
Eloy Lafuente (stronk7)
011ff9f8fb MDL-47180 qformat_webct: whitespace cleanup 2014-09-24 00:56:40 +02:00
Eloy Lafuente (stronk7)
d50a73309b Merge branch 'MDL-47180' of git://github.com/jmvedrine/moodle 2014-09-24 00:40:40 +02:00
Jean-Michel Vedrine
129f3c5190 MDL-47180 qformat_webct: Import of calculated questions broken 2014-09-23 14:45:07 +02:00
markv
94999731ce MDL-10971 question type multianswer: Respect quiz shuffle option 2014-09-19 11:39:22 +01:00
Adam Olley
12dce419f4 MDL-47224 qtype_calculated: Calculated qtype comment on datasetitems should follow formatting rules 2014-09-19 09:33:35 +09:30
Dan Poltawski
5ce0af436d Merge branch 'MDL-46195' of git://github.com/timhunt/moodle 2014-09-15 16:07:05 +01:00
Dan Poltawski
d1c9b792b0 Merge branch 'MDL-46331' of git://github.com/timhunt/moodle 2014-09-15 11:55:16 +01:00
Dan Poltawski
6576ab01b6 Merge branch 'MDL-46810' of git://github.com/timhunt/moodle 2014-09-15 11:25:27 +01:00
Damyon Wiese
96477b0f0d Merge branch 'MDL-47167' of git://github.com/timhunt/moodle 2014-09-15 15:41:39 +08:00
Tim Hunt
f41269f31d MDL-46331 GIFT question import was breaking content inside <pre>.
Also, adding a Behat tests to verify GIFT import works without errors
(but leaving the detailed testing for the unit tests).
2014-09-09 22:59:04 +01:00
Tim Hunt
21ed2330cf MDL-47167 XML question format: behat tests 2014-09-09 22:57:34 +01:00
Tim Hunt
cebfc95361 MDL-46195 WebCT question import: Behat test 2014-09-09 22:55:00 +01:00
Tim Hunt
57944b7a54 MDL-46195 fix error handling. 2014-09-08 22:27:36 +01:00
Dan Poltawski
735c7ee41a Merge branch 'MDL-47122' of git://github.com/timhunt/moodle 2014-09-08 14:28:30 +01:00
Tim Hunt
16e246ac52 MDL-47122 question_engine_data_mapper: which methods are public.
That is, which may be used from outside the question engine.
2014-09-08 13:24:17 +01:00
Tim Hunt
0b62cc2ea5 MDL-46810 question CBM behaviours: improve the display of marks.
Thanks to Tony Gardner-Medwin for the suggestion.
2014-09-07 13:30:57 +01:00
Tim Hunt
a7b4c96440 MDL-46761 fix PHPdocs on question_usage_by_activity::get_total_mark
Thanks to Tony Gardner-Medwin for spotting this.
2014-09-07 11:37:43 +01:00
Tim Hunt
38cde336ca MDL-46195 Fix fractionsaddwrong string component in lesson & qformat_webct.
I know. You should not refer to strings from other plugins, but

* qformat_webct is importing multichoice questions in that bit of code.
  I suppose a pedant would say that qformat_webct should declare dependencies
  on all the qtypes it relies on, but that would be silly.

* Lesson should be using the question engine, rather than doing its own thing.
2014-09-06 20:20:58 +01:00
Tim Hunt
4040e2dd11 MDL-47122 use insert_records to improve question engine performance. 2014-09-04 23:15:27 +01:00
Marina Glancy
b7e662bb13 Merge branch 'MDL-46916' of git://github.com/timhunt/moodle 2014-08-25 16:49:52 +08:00
Colin Chambers
96fc865427 MDL-46895 qtype_calculated_find_formula_errors not defined causes Calculated question type test to fail 2014-08-22 13:55:44 +01:00
Tim Hunt
6d99e71847 MDL-46916 behat: improve question state test. 2014-08-21 14:16:31 +01:00
Marina Glancy
6ee21ea1d0 Merge branch 'MDL-18014-master' of git://github.com/damyon/moodle 2014-08-19 16:57:05 +08:00