69 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
511801cb46 MDL-73352 phpunit: lib_test and locallib_test testcase names
All lib_test and locallib_test classes:

- Namespaced with component (and API whenever makes sense).
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed or add new uses.
- All them passing individually.
- Complete runs passing too.

Special mention to tests under login/tests:

1) The core_login component doesn't exist.
2) But login/tests are allowed because there is a suite pointing to it (phpunit.xml).
3) So, the only possible namespace for them is "core".
4) And to avoid problems with other core testcases (under lib/tests)
   they have been renamed to have login_xxxx as prefix.
2021-12-30 16:21:42 +01:00
Shamim Rezaie
3baf9b8564 Merge branch 'master_MDL-73440' of https://github.com/mattporritt/moodle 2021-12-29 22:14:47 +11:00
Jun Pataleta
80c17cd2a0 Merge branch 'MDL-72701-master' of https://github.com/andrewnicols/moodle 2021-12-23 12:10:46 +08:00
Sara Arjona
ed0b14cbc4 Merge branch 'master_MDL-73350-statistics-column' of https://github.com/catalyst/moodle-MDL-70329 2021-12-22 16:07:36 +01:00
Matt Porritt
3101f3c7ca MDL-73440 qbank_customfields: Fix behat tags
Remove erroneous behat tag that was accidentally
left in after development was complete.
2021-12-22 06:52:48 +00:00
Andrew Nicols
bb9741d472 MDL-72701 unit tests: Fix broken @covers annotations 2021-12-21 09:24:00 +08:00
Safat Shahin
750fafeedd MDL-73350 qbank_statistics: Discrimination index column update
This implementation changes a little logic where the
discrimination index shows an empty row if there is
no attempts been made to a question rather than showing
very likely.
2021-12-15 15:02:16 +11:00
Ilya Tregubov
16a7c3a698 Merge branch 'MDL-72413-master-dec13' of https://github.com/peterRd/moodle 2021-12-13 09:35:14 +02:00
Peter Dias
4c3f5b8541 MDL-72413 questions: Disable the common activity header 2021-12-13 09:49:35 +08:00
Ilya Tregubov
6f44f008d8 Merge branch 'MDL-73278' of https://github.com/stronk7/moodle 2021-12-10 18:51:40 +02:00
Eloy Lafuente (stronk7)
de66ba356e t checkout MOODLE_311_STABLE && git fetch https://github.com/mudrd8mz/moodle.git MDL-73201-311-enfix && git merge --no-ff FETCH_HEAD
Merge branch 'MDL-73201-master-enfix' of https://github.com/mudrd8mz/moodle
2021-12-09 23:18:03 +01:00
David Mudrák
46e2e2020d MDL-73201 lang: Use fixed strings in the tests, too 2021-12-09 19:56:02 +01:00
Helen Foster
558b4c826d MDL-73201 lang: Import fixed English strings (en_fix) 2021-12-09 19:53:10 +01:00
Ilya Tregubov
4de7faf7f1 Merge branch 'master_MDL-72553_qbank_quiz' of https://github.com/catalyst/moodle-MDL-70329 2021-12-08 09:58:00 +02:00
Eloy Lafuente (stronk7)
deb0e76eee MDL-73278 phpunit: Rename already namespaced classes to match file name
These are the only cases 100% safe to apply the renaming of the
testcase class names to match the file names.

All other cases are not safe, because they are missing namespace
and may enter into name conflicts. Adding namespaces is not as
simple as imagined because it implies to, also, add a good number
of modifications to core. See the issue for more details.
2021-12-07 23:54:29 +01:00
Matt Porritt
556e2f1aec MDL-72553 qbank_customfields: Add custom fields for question types
Custom fields can now be added to question types.
Site administrators can configure the custom fields and
filed types available. Teachers and question creators can
then use these fields for extra question metadata when
creating questions. Question creators can control if
the fields are displayed to students when they are
taking a quiz or not.
This features uses the core Moodle custom field API.

Co-Authored-By: Matt Porritt <mattp@catalyst-au.net>
Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
Co-Authored-By: Marc-Alexandre Ghaly <marc-alexandreghaly@catalyst-ca.net>
2021-12-07 18:32:41 +11:00
Sujith Haridasan
f000755ba1 MDL-71915 question: Update the behat tests
Update the behat tests to accommodate the
changes made for the tertiary navigation.
2021-12-06 10:26:40 +05:30
Sujith Haridasan
26eabeccf4 MDL-71915 question: Update the tertiary nav
Update the tertiary navigation activity for
question.
2021-12-06 10:26:40 +05:30
Mathew May
f65b92577a MDL-70197 navigation: Update classic goutte tests 2021-11-30 08:13:49 +02:00
Mathew May
b983003e2e MDL-70197 navigation: Remove old navigation elements and migrate behat 2021-11-29 15:47:42 +08:00
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
7ee798f679 MDL-72074 qbank_usage: Oracle phpunit issues resolve 2021-11-05 14:18:14 +02:00
Safat Shahin
8c004839c7 MDL-72074 qbank_usage: Behat issues resolve 2021-11-05 14:18:10 +02:00
Ilya Tregubov
73863ef3d9 Merge branch 'master_MDL-72074-usage' of https://github.com/catalyst/moodle-MDL-70329 2021-11-04 16:12:35 +02:00
Safat Shahin
8f06aa01dc MDL-72074 qbank_usage: Add usage plugin to core
This implementation will introduce the usage plugin
which shows qhich quizes are using this question,
number of attmpts and other information.

Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
Co-Authored-By: Matt Porritt <mattp@catalyst-au.net>
2021-11-05 00:36:36 +11:00
Andrew Nicols
c166d9d269 Merge branch 'master_MDL-72075-statistics' of https://github.com/catalyst/moodle-MDL-70329 2021-11-03 14:33:47 +08:00
Nathan Nguyen
2fcc93981f MDL-72075 qbank_statistics: fix coding style 2021-11-03 14:27:27 +11:00
Eloy Lafuente (stronk7)
440fac33bb Merge branch 'MDL-72843-qbank_comment-unit-testsuite-resolve' of https://github.com/catalyst/moodle-MDL-70329 2021-10-28 22:12:11 +02:00
Eloy Lafuente (stronk7)
4f271297ce Merge branch 'MDL-72879-master-enfix' of git://github.com/mudrd8mz/moodle 2021-10-27 22:12:11 +02:00
David Mudrák
53bb0947b6 MDL-72879 lang: Use fixed strings in tests, too 2021-10-27 07:37:03 +02:00
Nathan Nguyen
341e3079fc MDL-72075 qbank_statistics: Add question statistics to core
This implementation will add the statistics plugin to core.
Statistics plugin shows the overall report for a question using
a couple columns in the base view.
2021-10-27 12:35:02 +11:00
Helen Foster
07b7482063 MDL-72879 lang: Import fixed English strings (en_fix) 2021-10-26 21:05:10 +02:00
Thong Bui
76c0a743bf MDL-71750 File upload: Disable submittion when uploading multiple files
Fixed issue "Save" and "Submit and finish" button is not disabled when file uploading in the ticket MDL-71644
2021-10-22 13:26:02 +07:00
Safat Shahin
f4b1b63684 MDL-72843 qbank_comment: unit test fix for individual testsuite
This change resolves a unit test issue while running an
individual testsuite rather than the entire one after the
first init call for phpunit. It requires the file so it can
point back to the comment api while required.
2021-10-20 10:50:06 +11:00
Andrew Nicols
f54ba13288 MDL-72813 js: Fix broken jsdoc usages 2021-10-14 15:44:56 +08:00
Guillermo Gomez
3be2b123e5 MDL-71642 qbank_comment: Add question comment plugin to core
This implementation will introduce a qbank plugin
"comment" which will allow users with the capability
to comment in a question. It also implements a
callback for the question preview page to view
and add comments from the preview page. Comment
plugin is implemented using the existing comments
API from the core.

Co-Authored-By: Guillermo Gomez Arias <guillermogomez@catalyst-au.net>
Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
Co-Authored-By: Matt Porritt <mattp@catalyst-au.net>
2021-10-08 14:48:13 +11:00
Jun Pataleta
3d68eeb0d7 MDL-72216 question: Fix button spacing in preview template 2021-09-10 11:08:17 +08:00
Sara Arjona
573b035122 MDL-71614 qbank_previewquestion: Add role button to Preview 2021-09-08 16:13:57 +02:00
Sara Arjona
37827bb15d MDL-71614 qbank_exporttoxml: Use correct helper class name 2021-09-08 15:27:13 +02:00
Sara Arjona
5c78efaaea Merge branch 'master_MDL-71614-previewquestion' of https://github.com/catalyst/moodle-MDL-70329 2021-09-08 09:29:22 +02:00
Safat Shahin
0d55b26da8 MDL-71614 qbank_previewquestion: Add Preview question plugin to core
This implementation will introduce a qbank plugin "previewquestion"
which will view the preview question action in the question bank
actions by replacing the core classes, scripts and yui modules.
This plugin will also replace the preview option in the edit
question form. Having this plugin will give users the
flexibility of enabling or disabling this feature from
the question bank view.
This change will also allow other qbank plugins to add
elements or information in the preview question page
by implementing a callback. It also changes the pop
up to page redirect from base view page to make sure
any changes in preview reflects in the base view, for
example, comments added and the number of comments in
the comments colum changes while back from the preview
page. Other locations like edit and qtype plugins where
the preview is implemented, stays the same.

Co-Authored-By: Guillermo Gomez Arias <guillermogomez@catalyst-au.net>
Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
2021-09-08 16:21:06 +10:00
Sara Arjona
46c1f7c43d MDL-71641 qbank_tagquestion: Fix behat failure with classic 2021-09-06 15:22:44 +02:00
Sara Arjona
2c90221888 Merge branch 'master_MDL-71641-tagquestion' of https://github.com/catalyst/moodle-MDL-70329 2021-09-06 13:06:01 +02:00
Safat Shahin
1db23e818c MDL-71641 qbank_tagquestion: Add Tag question plugin to core
This implementation will introduce a qbank plugin "tagquestion"
which will implement the tag question actions in the question
bank view by replacing the core class. Having this plugin
will give users the flexibility of enabling or
disabling this action.
2021-09-06 20:39:39 +10:00
Sara Arjona
3b903ae45d Merge branch 'master_MDL-71585-managecategories' of https://github.com/catalyst/moodle-MDL-70329 2021-09-06 10:39:06 +02:00
Sara Arjona
a6d27c5b49 Merge branch 'master_MDL-71639-exporttoxml' of https://github.com/catalyst/moodle-MDL-70329 2021-09-06 08:58:20 +02:00
Eloy Lafuente (stronk7)
49b057e4dc Merge branch 'MDL-72428-master-enfix' of git://github.com/mudrd8mz/moodle 2021-09-03 19:09:52 +02:00
Helen Foster
92cc461235 MDL-72428 lang: Import fixed English strings (en_fix) 2021-09-03 17:38:35 +02: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
Safat Shahin
c1797c6c9e MDL-71639 qbank_exporttoxml: Add Export to xml plugin to core
This implementation will introduce a qbank plugin "exporttoxml"
which will implement the export to xml action in the question
bank view by replacing the core class. Having this plugin will
give users the flexibility of enabling or disabling this action.
2021-09-02 21:21:57 +10:00