252 Commits

Author SHA1 Message Date
Nathan Nguyen
e3bd166b3d MDL-72321 mod_quiz: Use new datafilters for random questions 2023-08-31 15:00:39 +01:00
Luca Bösch
86aaab4329 MDL-77872 quiz: quiz editing page less narrow. 2023-05-04 15:36:43 +02:00
danghieu1407
b875ecdcc4 MDL-77419 Quiz: question/qengine.js tidy-up 2023-03-14 10:26:46 +07:00
Tim Hunt
ff3f4eb2e7 MDL-76897 quiz: quiz_set_grade -> update_quiz_maximum_grade 2023-02-27 18:41:57 +00:00
Tim Hunt
c212565151 MDL-76897 quiz: quiz_update_all_final_grades -> grade_calculator 2023-02-27 18:41:56 +00:00
Tim Hunt
dbd62aa94d MDL-76897 quiz: move quiz_update_sumgrades into grade_calculator 2023-02-24 16:14:51 +00:00
Jun Pataleta
ce9f6db2ff Merge branch 'MDL-76899' of https://github.com/timhunt/moodle 2023-01-24 23:19:43 +08:00
Tien Nguyen
5863659d79 MDL-69164 Question: Convert question/qengine.js to AMD modules 2023-01-18 11:24:38 +07:00
Tim Hunt
2bb6c8b281 MDL-76899 quiz: bulk fix all array literals array() -> []
This was done with PHPStorm's automated tool. No manual editing
2023-01-16 17:12:45 +00:00
Tim Hunt
a9f8547599 MDL-76614 quiz: rename quiz => mod_quiz\quiz_settings 2023-01-06 14:35:54 +00:00
Tim Hunt
581a3bc7e9 MDL-76614 quiz: quiz_add_random_form => mod_quiz\form\add_random_form 2023-01-06 14:35:49 +00:00
Sujith Haridasan
3458d159e1 MDL-73335 mod_quiz: Add tertiary nav for the quiz module
The tertiary navigation added for quiz module.

- Added tertiary nav buttons for the edit, attempt and view page
- urlselector is added to the overrides page to access user/groups
- The secondary tabs are highlighted when user navigates to
  each page in quiz.
- Updated the behat tests for the changes made.

This commit is mostly Sujith's work, with further changes by
Tim Hunt <T.J.Hunt@open.ac.uk> so we share the blame/credit.
2022-02-24 09:26:00 +02:00
Sujith Haridasan
24950e283c Revert "MDL-71915 mod_quiz: Update the tertiary nav"
This reverts commit 6ba821dc019c33682a3149632d6969db5ad62a31.
2022-02-15 15:58:35 +00:00
Tien Nguyen
e21a8577c6 MDL-73337 Quiz: Editing quizzes should be logged in detail 2022-01-27 22:49:54 +00:00
Ilya Tregubov
9e5ffa2229 Merge branch 'MDL-72095-master-3' of https://github.com/bmbrands/moodle 2021-12-13 18:46:16 +02:00
Peter Dias
7d3927afea MDL-72413 quiz: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Bas Brands
946fd915e2 MDL-72095 theme_boost: max width for activity pages 2021-12-08 17:29:49 +01:00
Sujith Haridasan
6ba821dc01 MDL-71915 mod_quiz: Update the tertiary nav
Update the tertiary navigation for this
activity.
2021-12-06 09:27:58 +05:30
Safat Shahin
0805e387b7 MDL-72076 bulk actions ui: Implement bulk actions in qbank API
This implementation will introduce bulk actions qbank
plugins which can grab the selected question and perform
actions according to the selected option from dropdown
in the base view.

Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
Co-Authored-By: Matt Porritt <mattp@catalyst-au.net>
2021-11-22 11:35:21 +11:00
Safat Shahin
f9fc355ec7 MDL-71679 mod_quiz: Updates for new qbank api
This implementation will introduct changes to
the mod_quiz to implement the new qbank api
for view. Major changes are introduced in
the custom view and also all the legacy points
to the old qbank are changed to qbank plugins
where needed. It also deprecated and deletes
classes and scripts which were kept not to
break mod_quiz for the new api implementation.
2021-10-04 15:44:25 +11:00
Guillermo Gomez
fb10b36c04 MDL-71585 qbank_managecategories: Add managecategories to core
This implementation will introduce a qbank plugin "managecategories"
which will add the question categories feature in the question bank view
by replacing the core classes. Having this plugin will give users
the flexibility of enabling or disabling the category tab.
2021-09-03 09:41:18 +10:00
Tim Hunt
d2e1aa76e1 MDL-61107 quiz editing: handle invalid Maximum grade input 2017-12-22 13:35:29 +00:00
M Kassaei
32498c28ea MDL-49813 quiz: add sections in the right place after page changes 2015-04-23 16:54:50 +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
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
6870a6b8d0 MDL-47963 quiz editing: block ajax edits once there are attempts 2014-10-30 16:24:55 +00:00
Sam Hemelryk
ba2f9a9695 Merge branch 'MDL-47132' of git://github.com/timhunt/moodle 2014-10-08 12:01:42 +13:00
Tim Hunt
4d1fcfdf8a MDL-47547 quiz editing: minor fixes following MDL-47547
* Remove unnecessary skip links.
* Disable shortforms for form in pop-ups.
* Remove some CSS that was hurting display of the add menu.
2014-10-06 15:44:21 +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
Tim Hunt
8aa5e0cf58 MDL-47132 quiz: move question bank extensions to classes/question/bank
While doing this code clean-up, I noticed that the question bank pop-up was
only showing the question name, whereas it should have been showing the
question name and the start of the question text, so I fixed that.
2014-10-03 07:54:46 +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
Mark Nelson
5e8f736565 MDL-40063 mod_quiz: replaced 'editquestions' add_to_log call with an event 2014-04-10 20:34:27 -07: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
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
Tim Hunt
9fc29eec6d MDL-39282 quiz: always allow removal of bogus questions. 2013-03-01 17:33:32 +00:00
Mary Evans
bd5d8b5041 MDL-29723 mod/quiz: Modified show/hide button in edit.php and added some extra CSS rules to styles.css to make Question bank block more compatible/adaptable with themes. 2013-01-22 16:17:11 +00:00
Ankit Agarwal
d197ea4300 MDL-34549 libraries: Replace get_context_instance_by_id() by context::instance_by_id() 2012-08-24 11:30:10 +08:00
Petr Škoda
f387bb9bb7 MDL-34741 use 2in3 in mod_quiz 2012-08-11 20:40:09 +02:00
Rajesh Taneja
1e12c1203b MDL-30651 libraries: Replaced deprecated PARAM_INTEGER with PARAM_INT 2012-07-19 15:37:46 +08:00
Dan Poltawski
8409bd51f4 Merge branch 'MDL-33612' of git://github.com/timhunt/moodle 2012-06-12 17:38:25 +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
Tim Hunt
7f5f384477 MDL-33532 quiz editing: let uses enter locale floats.
So, for example, Croatian users can set the maximum grade to 65,5.
2012-06-07 12:55:53 +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
Tim Hunt
76cf77e4d3 MDL-32240 quiz editing: check permissions questions are added.
We also check permissions when removing questions from the quiz, so that
we do not let users make mistakes they cannot immediately undo.
2012-03-29 14:14:12 +01:00
Sam Hemelryk
d36b5d1177 Merge branch 'MDL-31095' of git://github.com/timhunt/moodle 2012-01-16 16:58:32 +08:00
Dan Poltawski
a530d4a93b MDL-29091 quiz - switch to use moodle_url::out_as_local_url 2012-01-13 10:16:52 +00:00
Tim Hunt
18dff75754 MDL-31095 quiz editing: only set quiz->grade to 0 if really necessary.
It is only necessary when there are (non-preview) attempts. However,
after making this change we have to ensure users cannot start attempts
when ->grade > 0 and ->sumgrades = 0.

Display ->grade on the order and paging tab of edit.php, so it is clear
what is going on when you are using that tab.

Finally, improve the error message a student gets if they try to start a
quiz with no questions.
2012-01-12 12:10:08 +00:00
Tim Hunt
800944b015 MDL-29176 quiz editing: can't move questions onto a new page. 2011-12-15 19:32:37 +00:00
Tim Hunt
e20ad67d7b MDL-29141 question bank show question text checkbox does not match state. 2011-08-26 17:01:06 +01:00