318 Commits

Author SHA1 Message Date
Jun Pataleta
07243a3ae3 Merge branch 'MDL-77785' of https://github.com/timhunt/moodle 2023-04-19 15:45:55 +08:00
Sara Arjona
34ab6b02d9 Merge branch 'MDL-75301_master' of https://github.com/marxjohnson/moodle 2023-04-06 08:33:06 +02:00
Mark Johnson
96bada8495 MDL-75301 quiz: Use "always latest" option for question previews
This will set the "alwayslatest" option when previewing a question from
the quiz according to the version setting used in the quiz slot.
2023-04-05 10:23:47 +01:00
Sara Arjona
c75ff0b0a3 Merge branch 'MDL-77656' of https://github.com/timhunt/moodle 2023-04-03 11:01:34 +02:00
Tim Hunt
9efaa719cc MDL-77656 quiz: stop using displayed number as an id 2023-03-31 16:01:23 +01:00
Tim Hunt
3bea326d7a MDL-77656 quiz: Don't use custom question numbers from shuffled sections 2023-03-31 16:01:23 +01:00
Tim Hunt
24bbb18eb2 MDL-77656 quiz editing: customisable numbers only in unshuffled sections
This works by always outputting both the customised and uncustomised
number into the HTML of the Questions page, then uses CSS & JS to
show the appropriate one as shuffle is toggled.
2023-03-31 16:01:23 +01:00
Tim Hunt
d7462893b0 MDL-77656 quiz: handling special chars in customised question numbers 2023-03-31 16:01:22 +01:00
Tim Hunt
6df55bf1f3 MDL-77656 quiz: fix web services to handle custom question numbers 2023-03-31 16:01:22 +01:00
Tim Hunt
47ff5c8e5b MDL-77785 quiz/question: display long question numbers better 2023-03-29 15:04:34 +01:00
Mark Johnson
72e7818467 MDL-74452 quiz: Display an error if all versions are in draft status 2023-03-28 11:42:44 +01:00
Jake Dallimore
ecc0f661c5 Merge branch 'MDL-35745' of https://github.com/timhunt/moodle 2023-03-15 11:31:36 +08:00
Tim Hunt
c051fbd0c2 MDL-35745 quiz: let teachers to re-open a Never submitted attempt
In the quiz reports, for any 'Never submitted' attempt, there is
now a 'Re-open' button next to where it says the attempt state.

If that is clicked, there is an 'Are you sure?' pop-up. If the user
continues, the attempt is reopened. If the student now has time left,
the attempt is put into the In progress state. If there is not time
left the attempt is immediately submitted and graded. The
'Are you sure? pop-up says which of those two things will happen.
2023-03-14 13:09:27 +00:00
Mark Johnson
988b7cbfa6 MDL-68093 quiz: Add behat test for viewing results by group 2023-03-14 08:52:26 +00:00
Mark Johnson
958da5b67e MDL-68093 groups: Add visibility and participation settings
These new settings are designed to enchance user privacy surrounding
groups. They allow groups to be configured so that users outside the
group cannot see the group, so that users in the group cannot see each
other, or so that users cannot see the group at all, even if they are in
it. This avoids issues where a group may be assigned based on sensitive
personal information (such as a person requiring special arrangements
due to a disability).

By default, groups are visible to all and available for participation in
activities, which maintains the current behaviour.

For performance, a new cache has been added to track the number of
groups on a course that are not visible to non-members. This allows us
to revert to the existing behaviour if the new features are not being
used at all on a course, and only apply the new visibility conditions if
they are.

Users who have the moodle/course:viewhiddengroups capability should be
concious of exposing hidden groups when showing their screen to other
users. The "Switch role to..." feature can be used to show a course page
on screen without exposing private availability conditions, for example.

The changes cover several specific areas:
* grouplib functions, which most code should use to get lists of groups
  and members (this includes the participants page).
* Activities supporting group overrides will not allow overrides for
  groups that are hidden from all users.
* Activities supporting separate/visible groups modes will only allow
  groups with the new "participation" flag enabled to be selected.
* Group messaging will be disabled for groups where members cannot see
  each other, or cannot see the group at all.
2023-03-14 08:52:25 +00:00
Mathew May
e5ca7766e7 MDL-52805 core: Remove legacy log calls 2023-03-07 13:08:46 +08:00
Jake Dallimore
f7134f1083 Merge branch 'MDL-76897' of https://github.com/timhunt/moodle 2023-03-01 12:43:58 +08:00
Andrew Nicols
2b4c86e251 Merge branch 'MDL-77299-master' of https://github.com/meirzamoodle/moodle 2023-03-01 11:14:36 +08:00
Meirza
f228e373cc MDL-77299 mod_quiz: Added missing class properties.
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.

Co-authored-by: Tim Hunt <t.j.Hunt@open.ac.uk>
2023-03-01 10:09:19 +07:00
Andrew Nicols
427659d202 Merge branch 'MDL-58945' of https://github.com/timhunt/moodle 2023-03-01 10:54:13 +08:00
Tim Hunt
728160cfbc MDL-76897 quiz: quiz_save_best_grade -> recompute_final_grade
also, the associated quiz_calculate_best_grade (only used here)
moved to a protected method.
2023-02-27 18:41:58 +00: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
4080962125 MDL-76897 quiz: quiz_update_all_attempt_sumgrades -> grade_calculator 2023-02-27 18:41:56 +00:00
Tim Hunt
c12ff3d5f3 MDL-76897 quiz: get the context more efficiently where possible 2023-02-27 18:41:56 +00:00
Tim Hunt
1ee7f41762 MDL-76897 quiz: streamline initalisation of $quiz, $cm, $course 2023-02-27 18:41:55 +00:00
Tim Hunt
dbd62aa94d MDL-76897 quiz: move quiz_update_sumgrades into grade_calculator 2023-02-24 16:14:51 +00:00
Tim Hunt
086bbf3f89 MDL-76897 quiz: create new class for all the grade calculation code 2023-02-24 16:14:51 +00:00
Tim Hunt
4484757021 MDL-76843 quiz: fix statistics questions for missing questions 2023-02-22 14:30:23 +00:00
Tim Hunt
3088bc6600 MDL-58945 qbank: showing q text should give option of plain or full 2023-02-22 11:15:02 +00:00
Andrew Nicols
9890d88107 Merge branch 'MDL-77057' of https://github.com/paulholden/moodle 2023-02-09 10:19:22 +08:00
Paul Holden
fdc9bd1a76 MDL-77057 group: format group names in module override pages. 2023-01-27 11:50:58 +00:00
Tim Hunt
34ca197526 MDL-77024 quiz: fix metatdata on log events
Some had the wrong edulevel or crud
2023-01-27 11:30:28 +00:00
Jun Pataleta
ce9f6db2ff Merge branch 'MDL-76899' of https://github.com/timhunt/moodle 2023-01-24 23:19:43 +08:00
Sara Arjona
ae53d04144 Merge branch 'MDL-75337-master' of https://github.com/laurentdavid/moodle 2023-01-24 16:07:35 +01:00
Laurent David
fc72a1d7b1 MDL-75337 core: Single button - core changes
* Change all core calls toward single_button to use single_button::BUTTON_PRIMARY
    when needed
2023-01-24 06:01:35 +01:00
Andrew Nicols
ecc2a8775a Merge branch 'MDL-69164-master' of https://github.com/JBThong/moodle 2023-01-24 11:45:27 +08:00
Ilya Tregubov
89b722402e Merge branch 'MDL-76766-master' of https://github.com/aanabit/moodle 2023-01-19 11:03:40 +08:00
Jun Pataleta
fad05d7929 Merge branch 'MDL-76583-master-withoutrename' of https://github.com/andrewnicols/moodle 2023-01-19 09:44:48 +08:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +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
28f090d975 MDL-76899 quiz: fix whitespace around operators 2023-01-16 19:07:08 +00: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
17e11dd9d5 MDL-76899 quiz: Bulk fix object -> stdClass in PHPdoc 2023-01-16 17:12:44 +00:00
Tim Hunt
f4099bcd78 MDL-76899 quiz: basic cleanup of the structure and repaginate classes 2023-01-16 17:12:23 +00:00
Tim Hunt
03cf2ce782 MDL-76898 quiz: final deprecation of things deprecated long ago 2023-01-16 17:12:02 +00:00
Amaia Anabitarte
bbd7aa78b2 MDL-76766 mod_quiz: Allow shuffling quizes with no questions 2023-01-11 11:15:35 +01:00
Andrew Nicols
6f1c9d3b53 Merge branch 'MDL-76614' of https://github.com/timhunt/moodle 2023-01-11 10:32:42 +08:00
Jun Pataleta
08a2781607 MDL-76597 mod_quiz: Set presentation role for the question list
Since the <ul> and <li> elements for listing the quiz questions and
elements are mainly used for layout purposes, it is better to set the
role of these elements to presentation only.
The aria-label for the <li> element is inappropriate and can also cause
confusion to screen reader users. Better to remove this. Though this is
being used in the confirmation modal so better to just change it to a
data attribute.
2023-01-06 22:37:54 +08:00
Jun Pataleta
317dd19f02 MDL-76597 mod_quiz: Set presentation role for the question list
Since the <ul> and <li> elements for listing the quiz questions and
elements are mainly used for layout purposes, it is better to set the
role of these elements to presentation only.
2023-01-06 22:37:54 +08:00