157 Commits

Author SHA1 Message Date
Tim Hunt
52540a51fa MDL-48898 quiz: use admin_setting_configduration
Now this setting type is available, it is a better UI.

This required a new setting class
admin_setting_configduration_with_advanced.

Also, I took the liberty of shortening the default auto-save delay to 1
minute, and re-wording the description of that setting, now that it can
be changed to any value.
2015-01-23 11:56:08 +00:00
Jean-Michel Vedrine
762ee1393b MDL-48342 Question: qformat_default::readquestion is broken 2014-11-28 15:47:39 +01: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
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
Marina Glancy
e0c22222b6 MDL-45336 questionbank: use core strings instead of quiz
AMOS BEGIN
 CPY [categories,mod_quiz],[categories,question]
 CPY [unusedcategorydeleted,mod_quiz],[unusedcategorydeleted,question]
 CPY [export,mod_quiz],[export,core_question]
 CPY [import,mod_quiz],[import,core_question]
AMOS END
2014-09-24 01:22:59 +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
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
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
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
Mark Nelson
60ab03eb10 MDL-40063 mod_quiz: replaced 'view summary' add_to_log call with an event 2014-04-10 20:40:25 -07:00
Mark Nelson
2a3f82041f MDL-40063 mod_quiz: replaced 'review' add_to_log call with an event 2014-04-10 20:40:13 -07:00
Mark Nelson
2ec79ad996 MDL-40063 mod_quiz: replaced 'report' add_to_log call with an event 2014-04-10 20:39:56 -07:00
Mark Nelson
7dad3d95fd MDL-40063 mod_quiz: replaced 'delete attempt' add_to_log call with an event 2014-04-10 20:39:15 -07:00
Mark Nelson
5e8f736565 MDL-40063 mod_quiz: replaced 'editquestions' add_to_log call with an event 2014-04-10 20:34:27 -07:00
Tim Hunt
f38965db42 MDL-44665 declare all quiz page types in the blocks UI. 2014-03-21 14:40:57 +00:00
Sam Hemelryk
01773a6d00 MDL-44180 mod_quiz: unified @package use 2014-03-03 08:37:06 +13:00
Helen Foster
480fca77b3 MDL-43590 Merge English strings from the en_fix language pack 2014-01-09 01:06:01 +01:00
Tim Hunt
52b612f08b MDL-42504 quiz autosave: alert users if connection lost.
When the auto-save fails, we alert the user that they may have lost their
internet connection so that they don't do more work that they might just
lose.
2013-11-15 15:08:13 +00:00
Helen Foster
5a25566060 MDL-42728 Merge English strings from the en_fix language pack 2013-11-05 23:41:44 +01:00
Tim Hunt
d3603928a9 MDL-42230 fix inconsistent quiz lang string.
This matches a change made to another string in MDL-32188.
2013-10-11 14:32:24 +01:00
Tim Hunt
474aa125ca MDL-32188 quiz/question: behaviours can add to the review summary.
At the top of the quiz reivew page, there is a table that summarises
infomration about the quiz attempt as a whole. For some question
behaviours, we would like to be able to add additional information to
that summary.

This commit introduces a generic method for the behaviour to provide
summary information about an entire question usage.
2013-10-04 17:52:16 +01:00
Frederic Massart
d900f1dc05 MDL-41039 mod_quiz: Replace events_trigger to new events 2013-09-26 16:43:03 +08:00
Jayesh Anandani
1ecd3c304d MDL-39155 Quiz: Provide 3 image-size options on the settings page 2013-05-10 08:38:13 +05:30
Tim Hunt
000fbcf2bd MDL-38538 quiz autosave: fix language string.
This feature does not actually provide spiritual salvation.
2013-04-03 11:23:41 +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
Helen Foster
ca084ef149 MDL-38352 Merge English strings from the en_fix language pack 2013-03-06 16:44:39 +01:00
Tim Hunt
5574862063 MDL-36534 question editing: clean up lang strings.
There were a number of lang strings in suboptimal places.
This commit fixes that, and also removed some unused strings.

AMOS BEGIN
 MOV [addmorechoiceblanks,qtype_multichoice],[addmorechoiceblanks,question]
 MOV [youmustenteramultiplierhere,qtype_calculated],[youmustenteramultiplierhere,qtype_numerical]
AMOS END
2013-01-14 14:52:49 +00:00
Thanh Le
d18f78b046 MDL-35794 quiz: config for whether Outcomes are advanced settings 2012-12-22 17:38:45 +00:00
Rajesh Taneja
0465ef6e31 MDL-34568: Accessibility: Added missing lables in quiz section
AMOS BEGIN
 CPY [pluginname,grade_export_xls],[downloadexcel,table]
 CPY [pluginname,grade_export_ods],[downloadods,table]
AMOS END
2012-09-07 10:18:15 +08:00
Rajesh Taneja
37b5e8fee8 MDL-19430 My Moodle: Polished course_over view code of netspot 2012-07-19 15:30:37 +08:00
Dan Poltawski
5c2bbfd6e9 Merge branch 'MDL-33611' of git://github.com/timhunt/moodle 2012-06-13 18:00:01 +08:00
Tim Hunt
3f0e034d75 MDL-33611 quiz: acutally use the right help string
The previous commit for this bug actually managed to use the wrong one.
2012-06-13 10:43:04 +01:00
Dan Poltawski
52f2bb2995 Merge branch 'MDL-33611' of git://github.com/timhunt/moodle 2012-06-13 16:39:24 +08:00
Tim Hunt
7ead73c106 MDL-33611 quiz: improve help string
Thanks to Helen and Michelle. Who would have thought that 124 words
would require such a team effort!
2012-06-12 10:38:47 +01:00
Dan Poltawski
8409bd51f4 Merge branch 'MDL-33612' of git://github.com/timhunt/moodle 2012-06-12 17:38:25 +08:00
Dan Poltawski
203d255116 Merge branch 'MDL-33393' of git://github.com/timhunt/moodle
Conflicts:
	mod/quiz/lang/en/quiz.php
2012-06-12 17:00:09 +08:00
Tim Hunt
4c7f377d9b MDL-33612 quiz: Improve page title 'Editing quiz'
Include the quiz name in the title. Also, add two missing format_string
calls around $quiz->name.
2012-06-08 11:47:03 +01:00
Dan Poltawski
e13388c1c0 MDL-32783 quiz overdue handling: improve lang string
And remove a stray #
2012-06-08 10:47:31 +08:00
Dan Poltawski
583c698ee1 Merge branch 'MDL-32783' of git://github.com/timhunt/moodle 2012-06-08 10:36:17 +08:00
Tim Hunt
a6866c7e9f MDL-32783 quiz overdue handling: enforce end of grace period
The summary page was not enforcing the end of the grace period. If the
user had the summary page open, then they coudl still stubmit after the
end of the grace period.

Also, the editing form was not validating that the quiz grace period was
greater than quiz|graceperiodmin in the quiz configuration, and that
should be checked, so I added it.

I fear that processattempt.php is becoming very spaghetti-like with all
the timing rules, it really needs to be refactored, but not 2 weeks
before the 2.3 release. (When refactoring, we really need unit tests for
this.)
2012-06-07 19:17:07 +01:00
Tim Hunt
d9552ab44f MDL-33393 quiz overdue handling: improve strings and add help 2012-06-07 17:33:46 +01:00
Tim Hunt
f02a91fc50 MDL-33517 quiz: revise timelimit help string.
Thanks Helen.
2012-06-06 19:24:48 +01:00
Helen Foster
2e6b68f4a8 MDL-32925 lang: Add extended help texts for all modules
Thanks to Mary Cooch & Martin Dougiamas who contributed to this
rewording.

AMOS BEGIN
   REM These module help texts are going to be displayed more prominently in the Moodle interface
AMOS END
2012-05-18 00:27:04 +08:00
Tim Hunt
9ab9f9feb7 MDL-32721 quiz: missing message provider lang string from MDL-3030 2012-05-02 08:19:10 +01:00