Commit Graph

500 Commits

Author SHA1 Message Date
Russell Smith
8675453e82 MDL-54881 quiz: Ensure user attempts are deterministic for testing. 2016-06-21 08:31:26 +10:00
Frederic Massart
ac032e0e09 MDL-41922 mod_quiz: Don't report quiz due when an attempt was finished 2016-06-03 14:52:34 +08: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
Stephen Bourget
113486d2eb MDL-35280 Quiz: Allow course reset to remove overrides 2015-03-16 19:41:15 -04: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
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
sam marshall
9c85baa8c5 MDL-44725 Availability: Replace groupmembersonly - FEATURE_xx (6)
Remove old FEATURE_GROUPMEMBERSONLY as no longer required.
2014-09-02 13:03:17 +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
Marina Glancy
410bb9a92c Merge branch 'MDL-20154-master' of git://github.com/merrill-oakland/moodle 2014-06-10 15:41:53 +08: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
Brian King
6a97697a2a MDL-40371 Upgrade-until-22: remove obsolete _upgrade_grades functions 2014-05-29 19:43:37 +12:00
Tim Hunt
35cbe84bf7 MDL-44449 quiz access rules should have a delete hook.
So they can clean up their settings when the quiz is deleted.

See
babf149c2c
for an example of using this.
2014-05-19 16:59:04 +01:00
Marina Glancy
cf051cc46e Revert "MDL-41283 report_participation: Fixed legacy actions returned from api's"
This reverts commit 7b7bb92d42.
2014-04-15 17:14:57 +08:00
Marina Glancy
fdb8bae241 Merge branch 'wip-mdl-41283' of git://github.com/rajeshtaneja/moodle
Conflicts:
	mod/upgrade.txt
2014-04-15 14:34:28 +08:00
Rajesh Taneja
7b7bb92d42 MDL-41283 report_participation: Fixed legacy actions returned from api's 2014-04-15 13:31:03 +08:00
Rajesh Taneja
b2b4ec308e MDL-41283 report_participation: Added phpdoc about function not used
In new logging api, xxx_get_view_actions() and xxx_get_post_actions()
will not be used to identify the paticipation of user. Event's crud
and edulevel status will define user's participation.
2014-04-15 13:31:03 +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
c5e5f1b786 MDL-40063/MDL-45057 quiz: disable firing of override events
This hacky solution is brought to you by the the motivation to
release.
2014-04-11 16:58:10 +08:00
Dan Poltawski
34f7e31ffb Merge branch 'MDL-40063_master' of https://github.com/markn86/moodle 2014-04-11 14:31:27 +08: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
Marina Glancy
e19c086c36 MDL-40843 recent_activity: corrections to grouping and user fields 2014-04-04 16:52:01 +08:00
Tim Hunt
f38965db42 MDL-44665 declare all quiz page types in the blocks UI. 2014-03-21 14:40:57 +00:00
Dan Poltawski
a59b2e18d8 Merge branch '44180-27' of git://github.com/samhemelryk/moodle 2014-03-05 12:47:17 +08:00
Dan Poltawski
a8b07dbf98 Merge branch 'wip-MDL-44362-master' of git://github.com/marinaglancy/moodle 2014-03-03 13:33:40 +08:00
Sam Hemelryk
01773a6d00 MDL-44180 mod_quiz: unified @package use 2014-03-03 08:37:06 +13:00
Tim Hunt
ccba5b8805 MDL-43749 normalise quiz database structure.
The sequence of questions that made up a quiz used to be stored as a
comma-separated list in quiz.questions. Now the same information is
stored in the rows in the quiz_slots table. This is not just 'better' in
a database design sense, but it allows for the future changes we will
need as we enhance the quiz in the MDL-40987 epic.

Having changed the database structure, all the rest of the code needs to
be changed to account for it, and that is done here.

Note that there are not many unit tests for the changed bit. That is
because as part of MDL-40987 we will be changing the code further, and
we will add unit tests then.
2014-03-02 10:00:40 +01:00
Marina Glancy
21d2280361 MDL-44362 recentactivity: fix regressions from MDL-44055 2014-02-28 16:39:32 +08:00
James Pratt
99caa248a8 MDL-43478 quiz responses report : display last / first / all tries
when using multiple try question behaviour
2014-02-23 13:39:08 +07:00
Andrew Nicols
3047f140de MDL-44055 mod_quiz: Add missing alternate name fields 2014-02-11 09:55:38 +08:00
Tim Hunt
dc4a3ea1ee MDL-43670 quiz_question_instances to match coding guidelines.
Some columns needed to be renamed:
* quiz     -> quizid
* question -> questionid
* grade    -> maxmark

Then all the places that refer to those needed to be fixed.
2014-01-17 10:56:07 +00:00
Tim Hunt
1c73df9eea MDL-43068 course&gradebook: show/hide cm & CONTROLS_GRADE_VISIBILITY
Making a quiz visible on the course page, of via the settings form,
could cause the grade item to become visible in the gradebook, even
though the quiz supports FEATURE_CONTROLS_GRADE_VISIBILITY to ensure
that when the grades are hidden in the quiz settings, they do not appear
in the gradebook.

Now, if a module supports FEATURE_CONTROLS_GRADE_VISIBILITY, then
set_coursemodule_visible calls the _grade_item_update callback to update
the grade item(s).

In addition, there was a bug when saving the quiz form, where it used
the value of $cm->visible from the database, which was wrong if the
value of cm->visible had just been changed on the setting form.
2013-11-27 17:40:40 +00:00
Dan Poltawski
b07ef13be2 MDL-41885 modules now declare use of question bank
* FEATURE_USES_QUESTION_BANK is now a module_supports flag which declares
  that an activity uses the question engine.

* question_module_uses_questions can be used to determine if a module
  uses the question bank.
2013-09-26 09:49:34 +08:00
Tim Hunt
3987312883 MDL-31487 fix FEATURE_CONTROLS_GRADE_VISIBILITY for quiz.
This is a followup to MDL-18301. That fix missed the following points:

1. On the edit categories and items screens, all items had an eye-con to
control the visibility, even if the visibility was controlled by the
module.

2. Changing the visibility of a grade category change the visibility of
all items within it, even if the visibility was controlled by the
module.

3. The quiz ingored $cm->visible when controlling whether its grade item
was visible.
2013-08-08 10:03:47 +01:00
Tim Hunt
475225a1c8 MDL-40441 fix obscure notice in the quiz.
This can only happen if you have both a user with both a real attempt
and a preview, and then edit the quiz settings.

Also clean up this code a bit.
2013-07-09 10:43:56 +01:00
Matt Petro
f5f3658480 MDL-34403 mod quiz: fix error during enrolment 2013-04-24 15:00:06 -04:00
Frederic Massart
ebd9ae6523 MDL-31983 navigation: Move reports from Navigation to Settings 2013-02-15 13:06:26 +08:00
Frederic Massart
c384744304 MDL-36638 usability: Core changes for new quiz/question icons 2012-11-29 12:41:29 +08:00
Dan Poltawski
939a43e426 Merge branch 'MDL-35717-quiz-attempt-checkstate' of git://github.com/mpetrowi/moodle
Conflicts:
	mod/quiz/tests/generator/lib.php
2012-11-26 12:07:04 +08:00
Matt Petro
8e771aed93 MDL-35717 quiz: fix overdue attempt processing 2012-11-16 21:32:09 -05:00
Dan Poltawski
b0ba493cd0 Merge branch 'MDL-30545' of git://github.com/timhunt/moodle 2012-11-13 13:21:50 +08:00
Tim Hunt
204ceaa389 MDL-34399 quiz cleanup: remove never used function.
This got added during the Moodle 2.0 files API conversion, but was
always part of a failed experiemnt, so should have been deleted
long ago. It was never actually used.
2012-10-26 11:58:03 +08:00
Tim Hunt
2cf5ab1028 MDL-30545 messaging prefs: show all relevant message providers.
Some message providers have an associated capability. For example
the mod/quiz:emailconfirmsubmission capability. At the moment,
we only show the preferences for the capabilities that the user
has in the system context.

That does not work for the example capability above. Typically
the capability will be overridden in one quiz, to allow for
Students, and the user will have the Student role in the course
context. Therefore, this message type does not appear on the
preferences page.

This fix corrects the logic, so that all message types that are
to the current user are displayed.
2012-10-23 18:41:43 +08:00
Tim Hunt
a957e97f2f MDL-34657 user sorting: minor niggles found while testing. 2012-09-27 17:44:38 +01:00
Eloy Lafuente (stronk7)
393cadf205 MDL-29662 quiz overrides: use proper course value (was php notice). 2012-09-05 18:01:24 +02:00
Tim Hunt
2079c732f9 MDL-29662 quiz overrides: update dates during course reset.
Also, fix duplicate SQL clause in similar code in lib,
and fix error when saving overrides.
2012-08-29 18:41:37 +01:00
Tim Hunt
172238f435 MDL-35000 quiz: Complete activity report broken by bad require.
Fix the stupid error that caused this. Also, make all the other
require_once calls in the file consistent.
2012-08-21 18:01:32 +01:00
Tim Hunt
7e48778b87 MDL-31509 quiz outcomes: let people associate quizzes with outcomes.
The quiz does not really support outcomes, but even so in 1.9 you could
select outcomes on the quiz edit form, and apparently this was useful to
some people, therefore we should re-enable it.
2012-07-27 18:06:24 +01:00
Ankit Agarwal
c492a78ee2 MDL-34468 quiz: Replace all instances of get_context_instance() with respective context_XXXX class in mod/quiz 2012-07-24 17:08:05 +08:00
Frederic Massart
455dc0de61 MDL-18301 Gradebook: Added feature for components to control grade visibility 2012-07-06 09:52:46 +08:00
Dan Poltawski
555099c666 Merge branch 'MDL-33400' of git://github.com/nebgor/moodle 2012-06-12 13:03:42 +08:00