4976 Commits

Author SHA1 Message Date
Jake Dallimore
ecc0f661c5 Merge branch 'MDL-35745' of https://github.com/timhunt/moodle 2023-03-15 11:31:36 +08:00
Ilya Tregubov
a34dbbe6fe Merge branch 'MDL-68093_master' of https://github.com/marxjohnson/moodle 2023-03-15 10:19:07 +08:00
Ilya Tregubov
f67237598c Merge branch 'MDL-77419-master' of https://github.com/danghieu1407/moodle 2023-03-15 09:18:44 +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
danghieu1407
b875ecdcc4 MDL-77419 Quiz: question/qengine.js tidy-up 2023-03-14 10:26:46 +07:00
Andrew Nicols
b038d8ff3c Merge branch 'MDL-77582-master' of https://github.com/sarjona/moodle 2023-03-10 12:19:17 +08:00
Sara Arjona
6c6adc462c MDL-77582 mod_quiz: Fix view_url() on null error 2023-03-09 13:57:41 +01:00
Jun Pataleta
8441270181 Merge branch 'MDL-77559-master-2' of https://github.com/andrewnicols/moodle 2023-03-09 16:02:01 +08:00
Andrew Nicols
511401f4f6 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08:00
Sara Arjona
7b6a00dec4 Merge branch 'MDL-77464' of https://github.com/timhunt/moodle 2023-03-08 16:14:40 +01:00
Andrew Nicols
974d7e4dab Merge branch 'MDL-52805-42' of https://github.com/Chocolate-lightning/moodle 2023-03-08 14:49:59 +08:00
Sara Arjona
022acf037b Merge branch 'MDL-77440' of https://github.com/timhunt/moodle 2023-03-08 07:23:35 +01:00
Jun Pataleta
85718f00d8 Merge branch 'MDL-77416-master-enfix' of https://github.com/vmdef/moodle 2023-03-08 08:50:30 +08:00
Tim Hunt
1a3897d1ba MDL-77464 questions: regrading was losing question_attempt metadata
This is very similar to MDL-77090, but at the time, I missed that this
also needed to be handled. (Question metadata is, I think, only used
by the quiz 'Try another question like this one' feature.)
2023-03-07 13:40:10 +00:00
Mathew May
e5ca7766e7 MDL-52805 core: Remove legacy log calls 2023-03-07 13:08:46 +08:00
Andrew Nicols
565a615308 Merge branch 'MDL-77094' of https://github.com/timhunt/moodle 2023-03-07 12:08:58 +08:00
Víctor Déniz
6a9f78b0e7 MDL-77416 lang: Use fixed strings in tests 2023-03-03 14:15:30 +00:00
Helen Foster
2e99dd6346 MDL-77416 lang: Import fixed English strings (en_fix) 2023-03-03 14:02:06 +00:00
Jun Pataleta
916503658d Merge branch 'MDL-75012-master-5' of https://github.com/andrewnicols/moodle 2023-03-02 12:34:34 +08:00
Jun Pataleta
724f8b8cb9 Merge branch 'MDL-75719-master-4' of https://github.com/ilyatregubov/moodle 2023-03-02 12:03:19 +08:00
Andrew Nicols
33b1e41f13 MDL-75012 js: Full build of all grunt things 2023-03-02 11:55:32 +08:00
Ilya Tregubov
9f062f1379 MDL-75719 completion: Fix unit tests and Behat tests.
Fix tests since we changed behavior of completions (completion
state an UI).
2023-03-02 11:03:02 +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
d65c17d16f MDL-77440 quiz: fix nav error reviewing after redoing a question 2023-02-28 16:29:03 +00:00
Tim Hunt
1b72db7082 MDL-76897 quiz: fix incorrect StdClass 2023-02-27 18:41:58 +00:00
Tim Hunt
20ccfc162d MDL-76897 quiz: deprecate unused quiz_calculate_best_attempt 2023-02-27 18:41:58 +00: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
Luca Bösch
3d59f5073c MDL-77288 quiz: Horizontally align feedback to the border & full width.
Probably from historical reasons and because of layout of former Moodle
versions the container the feedback is situated in has 70% width and is
indented. In nowadays themes this looks weird and gives visual inconsistency.
2023-02-24 10:44:19 +01:00
Andrew Nicols
d8f6c76400 Merge branch 'MDL-76843' of https://github.com/timhunt/moodle 2023-02-23 19:04:29 +01:00
Andrew Nicols
d7d5b417b6 Merge branch 'MDL-77210' of https://github.com/timhunt/moodle 2023-02-23 09:22:40 +08:00
Tim Hunt
dd1385b80d MDL-76843 quiz: add test to verify random essay stats now work 2023-02-22 14:30:23 +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
Tim Hunt
b7a67f8896 MDL-77210 quiz: fix regrade for attempts with redone questions 2023-02-13 16:55:52 +00:00
Anupama Sarjoshi
05d51c15ca MDL-63608 quiz: Fix Access order when manually grading quizzes
Changes done to fix access order of attempts that need manual grading.
Changed button text from 'Save and go to next page' to 'Save and show next' to improve UI.
2023-02-10 17:42:10 +00:00
Andrew Nicols
9890d88107 Merge branch 'MDL-77057' of https://github.com/paulholden/moodle 2023-02-09 10:19:22 +08:00
Luca Bösch
dda015f855 MDL-77112 quiz: Align some elements in quiz reports better. 2023-02-03 11:52:44 +01:00
Tim Hunt
c60878c90d MDL-77094 quiz_statistics: improve efficiency of the recalculate task
quiz_settings::create() requires at least 3 DB queries, so the point is
that we can avoid doing that until after we have worked out if we need
to calculate statistics for this quiz.

Also, we order the list of quizzes to consier, to process the ones with
more recent attempts first.
2023-01-31 15:58:48 +00:00