229 Commits

Author SHA1 Message Date
Philipp Imhof
cf62f5cc76
MDL-67335 qtype_calculatedmulti: allow HTML in answer options 2024-01-17 08:03:14 +01:00
Ilya Tregubov
d79e8052fb
Merge branch 'MDL-79279' of https://github.com/timhunt/moodle 2023-10-10 11:19:27 +08:00
Sara Arjona
9877a06246
Merge branch 'MDL-79551-master-rc' of https://github.com/junpataleta/moodle 2023-10-04 12:28:14 +02:00
Jun Pataleta
94bc2cd38b
MDL-79551 versions: bump all versions and requires near release 2023-10-04 13:57:17 +08:00
Daniel Ziegenberg
55ef05579b
MDL-69119 qformat_xml: fix mc calculated export
The Moodle XML export of multiple choice calculated questions was
missing proper escaping of answers. Also the indentation of the
generated xml was off.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2023-10-03 12:18:11 +02:00
Tim Hunt
1437ed51ef MDL-79279 qformat_xml: multianswer import should support idnumber
Fix suggested by Georg Maißer.
2023-09-07 11:40:48 +01:00
Paul Holden
69caa83345
MDL-78939 qformat_xml: fix reference to calculated question files. 2023-08-08 08:08:33 +01:00
Jun Pataleta
73259066c4
MDL-77328 qformat_xml: Avoid dynamic declaration for question_answer
Declare qformat_xml::answerfiles and qformat_xml::feedbackfiles instead
of dynamically declaring answerfiles and feedbackfiles for the
question_answer instance when exporting questions and answers to XML
format.
2023-07-21 11:57:14 +08:00
Eloy Lafuente (stronk7)
061c9d7ba0 MDL-77940 versions: bump all versions and requires near release
version = 2023042400 release version
requires= 2023041800 current rc1 version
2023-04-18 18:08:09 +02:00
Tim Hunt
2e1fde188e MDL-75017 questions: fix weird setup in qformat_xml_import_export_test 2023-03-24 12:56:14 +00:00
Marina Glancy
a800e7e62f MDL-74853 various: add second parameter to htmlentities functions
Default value of the $flag argument changed in PHP 8.1 from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE
To ensure consistent behavior across different PHP version the second parameter is now required for the functions:
htmlspecialchars(), htmlentities(), htmlspecialchars_decode(), html_entity_decode() and get_html_translation_table()
2022-11-28 16:12:20 +01:00
Jun Pataleta
00bae8b8a4 MDL-76403 versions: bump all versions and requires near release 2022-11-23 09:45:23 +08:00
Eloy Lafuente (stronk7)
839c2e5c18 MDL-75777 phpunit: Move tests to use correct names and ns (take#6)
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.
2022-09-19 11:01:21 +02:00
Simey Lameze
032468d269 MDL-74211 behat: convert few more steps to use new data generators 2022-08-04 09:21:33 +08:00
Jun Pataleta
70f6b1605b MDL-74471 versions: bump all versions and requires near release 2022-04-13 10:37:36 +08:00
Daniel Ziegenberg
f942a5cedd
MDL-69078 questions: check for UTF-8 encoding of the import file
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2022-03-17 20:53:50 +01:00
Tim Hunt
2f9032a198 MDL-73335 quiz/questions: fix Behat fails from nav changes
The Classic quiz behat override is no longer needed.
The way it is implemented is Boost/core works in all cases.
2022-02-24 09:26:29 +02:00
Sujith Haridasan
b610055bbd MDL-73335 question: Add the tertiary nav for question bank
The tertiary navigation has been added to the question bank.
- Url selector has been added for the pages:
  Questions, Categories, Import and Export
- A separate page to "Add category" has been added.
  The "Add category" is available as a tertiary nav button.
- Updated the 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.

AMOS BEGIN
 CPY [questioncats,mod_quiz],[questioncategories,core_question]
AMOS END
2022-02-24 09:26:29 +02:00
Sujith Haridasan
c4e411e48b Revert "MDL-71915 question: Update the behat tests"
This reverts commit f000755ba1f4357f1a4e697e7e72dcb752f1ce07.
2022-02-15 15:54:00 +00:00
Safat Shahin
3008edd366 MDL-71696 core_question: Implement question status change
This commit implements the status change pop up for a question
in the base view. This feature update will allow the change of
status of a question without creating a new version.
This commit also implements the status as a char rather than
an int value.
2022-02-03 22:22:50 +11:00
Safat Shahin
111951d861 MDL-71696 mod_quiz: quiz updates and behat coverage
The versioning changes will require some major changes
in the backup and restore of question bank and its
elements. This change introduces those changes to make
it compatible with the new world of versioning in question
bank. This commit also removes quiz_slots fields and
quiz_slot_tags table.
This commit will also introduce the versioning db
structure and some major changes to the quiz
and quiz attempts for the question, random
question and the view.
This commit implements the behat changes for versioning
in core question and associated locations.
2022-02-03 22:22:44 +11:00
Guillermo Gomez
c6cfca2a08 MDL-71696 core_question: Changes for versioning
This commit adds the changes in questiontype base
to work with new question tables and the new structure in the
databse. Also needed for versioning.
This implementation will also introduct the question status
which allows a question to be in draft and ready status.
I also introduces changes to the base view where it shows
the latest version of the questions. The view of versions
for a question is not implemented in this commit.
This implementation will also introduce changes in the core
qtype plugins to support versioning and the changed
db schema.
2022-02-03 22:22:44 +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
Eloy Lafuente (stronk7)
ba5b6089d5 MDL-71036 phpunit: Renamed various regexp-related assertions
In PHPUnit 9.1, the following regexp-related assertions
have been deprecated and there are new alternatives for
all them:
    - assertRegExp()     -> assertMatchesRegularExpression()
    - assertNotRegExp()  -> assertDoesNotMatchRegularExpression()

This is about to, simply, move all cases to the new alternatives.

Source: https://github.com/sebastianbergmann/phpunit/blob/9.1.0/ChangeLog-9.1.md

Regexp to find all them:

    ag 'assertRegExp|assertNotRegExp' -li
2021-03-11 19:22:24 +01:00
Sara Arjona
187801ccf5 Merge branch 'MDL-70966-master' of git://github.com/marinaglancy/moodle 2021-03-03 09:30:41 +01:00
Marina Glancy
612c230709 MDL-70966 various: Under PHP8 empty string is no longer equals to 0 2021-02-28 19:16:09 +01:00
Tim Hunt
1d552eca6c MDL-70916 Essay/Moodle XML: min and max word limits not imported 2021-02-17 11:32:05 +00:00
Tim Hunt
99778a61a3 MDL-69101 Essay/Moodle XML: recent new settings not imported/exported 2021-02-03 08:09:27 +00:00
Eloy Lafuente (stronk7)
40de097e65 MDL-67673 phpunit: Remove deprecated assertContains() uses on strings
Both assertContains() and assertNotContains() are deprecated in PHPUnit 8
for operations on strings. Also the optional case parameter is. All uses
must be changed to one of:

- assertStringContainsString()
- assertStringContainsStringIgnoringCase()
- assertStringNotContainsString()
- assertStringNotContainsStringIgnoringCase()

More info: https://github.com/sebastianbergmann/phpunit/issues/3422

Regexp to find all uses:

ag 'assert(Not)?Contains\('
2020-10-21 12:46:00 +02:00
Tim Hunt
3c1416dcf3 MDL-69798 XML question export: excape special chars in idnumbers 2020-10-01 17:01:50 +01:00
Eloy Lafuente (stronk7)
fbb0767536 MDL-69475 versions: bump all versions and requires in master
version = 2021052500 release version
requires= 2021052500 same than version

Why 20210525? (25th May 2021) ?

Because master is going to be Moodle 4.0, to be released
on November 2021. And, until then, we are going to have
a couple of "intermediate" releases:

- Moodle 3.10 to be released 9th November 2020. (2020110900)

  This version will be using versions from today to 2020110900
  (once it's released the YYYYMMDD part stops advancing).

- Moodle 3.11 to be released 10th May 2021. (2021051000)

  This version will be using versions from 3.10 release to 2021051000
  (once it's released the YYYYMMDD part stops advancing).

That means that all versions from today to 2021051000 are going
to be used by those 2 "intermediate" releases (3.10 and 3.11).

And we cannot use them in master, because it's forbidden to have
any overlapping of versions between branches (or different upgrade
paths will fail).

So, get that 2021051000, let's add it a couple of weeks to cover
the on-sync period (or a 2 weeks delay max!) and, the first version
that master can "own" in exclusive (without any overlap) is, exactly,
25th May 2021, hence our 20210525.
2020-08-18 00:47:15 +02:00
Eloy Lafuente (stronk7)
115cc0214f MDL-68973 versions: bump all versions and requires near release
version = 2020061500 release version
requires= 2020060900 current rc1 (week7roll1) version
2020-06-09 16:23:09 +02:00
Mahmoud Kassaei
00055ef6ab MDL-68367 Question: Multi-choice Option to hide systemtext 2020-05-21 09:47:15 +01:00
Eloy Lafuente (stronk7)
d5be859063 MDL-67199 versions: bump all versions and requires near release
version = 2019111800 release version
requires= 2019111200 current beta (week7roll1) version
2019-11-12 17:57:08 +01:00
Tim Hunt
e247068d72 MDL-66801 questions: XML import/export should include category idnumbers 2019-09-30 18:59:23 +01:00
Eloy Lafuente (stronk7)
c9a1a6341c MDL-65571 versions: bump all versions and requires near release
version = 2019052000 release version
requires= 2019051100 current beta (week6roll2) version
2019-05-12 23:46:34 +02:00
Jean-Michel Vedrine
48aad79a63 MDL-63905 qtype_multianswer: validate imported questions 2019-03-06 08:35:04 +01:00
Eloy Lafuente (stronk7)
085353b315 MDL-64282 versions: bump all versions and requires near release
version = 2018120300 release version
requires= 2018112800 current rc2 (week7roll1) version
2018-11-29 18:24:08 +01:00
Tim Hunt
2d696f8f2b MDL-63752 question import: duplicate key error when idnumbers blank
And extra checks to head off possible idnumber='' issues in two other places.
2018-10-24 11:38:31 +01:00
John Beedell
dfa85ad002 MDL-62708 qformat_xml: phpunit test correction. 2018-09-24 09:37:12 +01:00
John Beedell
6189fda47f MDL-62708 question: Add idnumbers to question and question category 2018-09-21 12:26:24 +01:00
Tim Hunt
f19c6f60cd MDL-23545 qformat_xml: don't allow irrelevant DB differences to break tests
Also slightly improve formatting of the exported file.
2018-09-18 13:52:51 +01:00
John Beedell
1dab8faafd MDL-23545 question: XML import/export add category description 2018-09-14 16:54:25 +01:00
Eloy Lafuente (stronk7)
12ef47cd99 MDL-63165 question: Bump expected size of question exports (take II) 2018-08-29 14:38:40 +02:00
Víctor Déniz Falcón
02fda279ed MDL-57281 behat: deprecated step definition I navigate to node in
Definition step deprecated and affected tests modified.
2018-08-20 12:53:26 +01:00
Eloy Lafuente (stronk7)
57ea6753d3 MDL-62361 versions: bump all versions and requires near release
version = 2018051400 release version
requires= 2018050800 current beta+ (week4roll1) version
2018-05-09 02:46:30 +02:00
Andrew Nicols
80b0c733f2 MDL-61407 qformat: Add null_writer for all qformats
Questions formats do not store any personal data.
Any contrib format which does store personal data should utilise the
standard export interfaces as this subsystem will not call them directly.
2018-05-03 16:14:36 +08:00
Simey Lameze
bbd655b4a8 MDL-61410 question: merge course and question tags 2018-03-19 11:45:55 +08:00
Simey Lameze
1796eb181b MDL-61410 question: fix unit tests failures 2018-03-19 11:45:55 +08:00
Simey Lameze
13596866e7 MDL-61410 question: support course tags on import 2018-03-19 11:45:55 +08:00