131 Commits

Author SHA1 Message Date
François Moreau
760ed019ee MDL-45002 mod_quiz: completion option, at least N attempts completed 2020-07-14 15:32:06 -04:00
Eric Merrill
178a914acd MDL-68986 quiz: Add back default/adv for questionsperpage setting 2020-06-09 09:24:19 -04:00
Andrew Madden
b5d1151574 MDL-67351 quiz: Move quiz form defaults logic out of form.
By including the mod_form:apply_admin_defaults() method in the quiz
moodle_form, each element does not need to set default and advanced
states individually.
2020-01-30 10:50:01 +11:00
Arto Nieminen
9147273640 MDL-53778 quiz settings: Ensure that disabled checkboxes have value 0 2019-06-25 13:23:12 +03:00
Davo Smith
385247d94e MDL-64906 mod: add support for hideif to activity modules 2019-04-02 09:13:09 +01:00
Tim Hunt
06b4ab81a8 MDL-61045 quiz settings: add back missing disabledIf
This got broken in Moodle 2.1 by MDL-20636.
2017-12-15 13:11:57 +00:00
Tim Hunt
223419d92c MDL-60682 forms: date/times should use step 1 minute by default 2017-11-21 14:50:28 +00:00
Ankit Agarwal
0b3326b50e MDL-58196 availability: Add appropriate dependencies in mform 2017-07-31 11:56:11 +05:30
Luca Bösch
16302f85ec MDL-56617 mod_quiz: No grade to pass check if CBM used
When certainty-based marking is used, grades can 'exceed' the maximum grade
(because they are multiplied by factors). Therefore, in such cases, don't show
no warning.
2017-05-19 12:30:38 +02:00
Cameron Ball
2ce9628484
MDL-54802 mod_quiz: Improve validation when editing a quiz uusing require passing grade
When editing a quiz that is using the require passing grade completion method,
the grade to pass cannot be zero. Since the completion method is locked we
cannot recommend that the completion method is changed (as we do when the quiz
is being created). Instead we have to inform the user that the grade to pass
must not be zero.
2016-10-05 19:21:40 +08:00
Cameron Ball
26cb467b47
MDL-54802 mod_quiz: Move grade to pass error to require passing grade element
When using a passing grade of zero, with the required passing grade
option, an error was displayed on the "grade to pass" element.
This was confusing as the error message is referring to the
"Require passing grade" element. This patch moves the message to
the "Require passing grade" element.

Additionaly this patch fixes a small typo in a comment.
2016-10-05 17:14:00 +08:00
Simey Lameze
981356b23d MDL-54802 mod_quiz: Add validation to require passing grade greater than 0
This commit adds a form validation to prevent the creation of quizzes
using zero or null grade to pass when using require passing grade.
2016-09-22 08:48:11 +08:00
Tim Hunt
1bad9be67a MDL-50228 quiz: improve overall feedback section of the form 2015-05-14 10:21:16 +01:00
Damyon Wiese
75ece778c5 Merge branch 'MDL-49101' of https://github.com/andrewhancox/moodle
Conflicts:
	lib/db/upgrade.php
	version.php
2015-04-07 17:27:17 +08:00
Andrew Hancox
6398ff5387 MDL-49101 core: Add a global admin setting config->requiremodintro
Removed requiremodintro setting from all core activity plugins and replace
with a single global setting.
Deprecated moodleform_mod::add_intro_editor and replaced with
moodleform_mod::standard_intro_elements
2015-04-07 10:11:53 +01:00
M Kassaei
5d949702f8 MDL-40988 quiz: ability to break quizzes into sections
The sections are created on the edit quiz page, and then appear in the
navigation panel when the quiz is being attempted to help students find
their way around.

The 'Shuffle questions' setting has been moved from being per-quiz
to being a per-section.

This commit is actually the joint work of Mahmoud Kassaei and Tim Hunt
from The Open University. We could only use one persons name for the
commit and this time Mahmoud gets the credit/blame.
2015-04-05 14:30:53 +01:00
Tim Hunt
5e63b335fe MDL-40992 quiz: option to let students redo questions within an attempt
This feature is designed for use on pracice or formative quizzes.
It is available for quizzes that use Interactive or Immediate feedback
behaviour.

If the teacher turns this on in the quiz settings, then once a student
has finished a question, they get a 'Redo question' button beside the
question. If they click it, then the question they finished is replaced
by a new one so they can try again to practise that particul skill or
bit of knowledge a bit more.

When randomisation is involved, the studnets will be given a question or
variant that they have not seen before if possible.
2015-03-31 14:12:48 +01:00
M Kassaei
1700bd4dea MDL-40992 quiz: let students to redo questions within an attempt 2015-03-26 17:46:47 +00:00
Tim Hunt
06cf0b75ec MDL-48146 quiz settings: fix non-percent feedback boundaries 2014-11-12 15:45:26 +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
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
Ray Morris
349c930343 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-16 19:17:57 -05:00
Tim Hunt
9ec7a71661 MDL-45273 remove the need for quiz settings.php to include locallib.php. 2014-04-29 11:16:44 +01:00
Tim Hunt
4dc30936f7 MDL-44811 quiz settings form title: change for consistency.
Thanks to Fred for poining out that most other activities use the work
Appearance for these sorts of settings.
2014-03-28 18:02:02 +00:00
Dan Poltawski
a59b2e18d8 Merge branch '44180-27' of git://github.com/samhemelryk/moodle 2014-03-05 12:47:17 +08:00
Sam Hemelryk
01773a6d00 MDL-44180 mod_quiz: unified @package use 2014-03-03 08:37:06 +13:00
Tim Hunt
73465743f9 MDL-44278 Quiz time overrides: use the same step everywhere.
On the main form, you could select to the nearest minute. On
the override form you could only select to the nearest 5 minutes.
2014-02-28 08:58:58 +01:00
Tim Hunt
c590848158 MDL-42880 quiz settings: remove unnecessary disabledif rules.
These rules were causing problems in the case where the form was
sumitted with validation errors. In that case, the During the attempt ->
The attempt checkbox was becoming unset, and hence the other During the
attmept checkboxes became disabled, and the values were not saved.

Thanks to Sam Marshall for suggesting this fix.
2013-11-15 15:09:25 +00:00
Damyon Wiese
0c0dfa8fbd MDL-40668 tinymce: Remove collapsable editor options
We have an alternative (pdw toolbars)
Also, allow tinymce to be collapsed down to a single row.
2013-08-13 10:54:36 +08:00
Dan Poltawski
2504dfd61d Merge branch 'MDL-39155' of https://github.com/jacks92/moodle 2013-06-11 15:38:37 +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
Dan Poltawski
a74cd33160 MDL-39422 mod_forms: prevent long coruse module names
To prevent ugly DB errors.
2013-04-30 17:41:36 +01:00
Tim Hunt
d823a63db0 MDL-39167 quiz access rules: need to validate their settings.
We were missing the hook in the form validation method. We had them
everywhere else they were needed.
2013-04-17 14:24:38 +01:00
Tim Hunt
f9e5471273 MDL-38337 quiz: respect maximum grade config for new quizzes. 2013-03-08 21:36:27 +00:00
Tim Hunt
e58b2c326b MDL-38093 quiz settings: make overall feeback editors collapsible. 2013-02-18 18:13:51 +00:00
Thanh Le
d18f78b046 MDL-35794 quiz: config for whether Outcomes are advanced settings 2012-12-22 17:38:45 +00:00
Joseph Rezeau
26efb4888f MDL-37114 quiz form validation: feedback boundaries.
The feedback boundaries must either be a number or a percentage.
We were not correctly validating the non-percentage case.
2012-12-15 10:44:51 +00:00
Petr Škoda
f387bb9bb7 MDL-34741 use 2in3 in mod_quiz 2012-08-11 20:40:09 +02:00
Rajesh Taneja
61cca0b7fc MDL-32940 libraries: Replaced deprecated PARAM_NUMBER with PARAM_FLOAT 2012-07-23 17:21:05 +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
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
9e83f3d11d MDL-32788 quiz: clean up codechecker issues before the 2.3 release. 2012-05-04 15:12:23 +01:00
Dan Poltawski
fdf26a0ec0 MDL-3030 mod_quiz: fix training whitespace 2012-04-30 11:05:29 +08:00
Tim Hunt
87427d9c7c MDL-3030 quiz overdue handling: new settings on quiz form and admin. 2012-04-27 15:07:23 +01:00
Tim Hunt
84da4788fd MDL-3030 quiz settings: reorganise form before adding new fields. 2012-04-27 15:07:22 +01:00
Tim Hunt
ce74dcc3b6 MDL-32299 quiz mod_form: help icons for the review options 2012-04-05 16:25:32 +01:00
Sam Hemelryk
ef844d0a15 Merge branch 'w12_MDL-32094_m23_phpstrict' of git://github.com/skodak/moodle 2012-03-20 16:47:17 +13:00
Petr Skoda
fabbf4398b MDL-32094 some nasty quickforms hacks that should help with E_STRICT
Note: we have stopped tracking our QuickForms hacks long ago.
2012-03-18 18:39:37 +01:00
Charles Fulton
33c8d37b6f MDL-11047 quiz: enable sequential navigation 2012-03-15 10:09:27 -07:00