529 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
ba1f804ffa
MDL-65292 style: Fix all function declarations white space
This has been generated running the following Sniffs, all
them part of the Moodle's CodeSniffer standard:
- PSR12.Functions.ReturnTypeDeclaration
- PSR12.Functions.NullableTypeDeclaration
- moodle.Methods.MethodDeclarationSpacing
- Squiz.Whitespace.ScopeKeywordSpacing

All them are, exclusively, about correct spacing, so the changes
are, all them, only white space changes.

Only exceptions to the above are 3 changes what were setting the
return type in a new line, and, when that happens, the closing
parenthesis (bracket) has to go to the same line than the colon.
2024-02-28 23:33:26 +01:00
Philipp Imhof
cf62f5cc76
MDL-67335 qtype_calculatedmulti: allow HTML in answer options 2024-01-17 08:03:14 +01:00
Andrew Nicols
75587e23c6
MDL-79890 core: Update uses of array_keys with multiple params
These now call the newly minted `moodle_array_keys_filter` method.
2023-11-15 09:14:40 +08: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
Ilya Tregubov
259ec50af6
Merge branch 'luca-branch' of https://github.com/ilyatregubov/moodle 2023-09-15 17:05:27 +08:00
Luca Bösch
c37a4ba29a MDL-79226 questions: check for UTF-8 encoding of the import file 2023-09-12 20:39:42 +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
Paul Holden
813800d218
Merge branch 'MDL-75017' of https://github.com/timhunt/moodle 2023-03-30 08:47:52 +01:00
Tim Hunt
a5fc60a997 MDL-77729 qformat_missingword: fix form of help link 2023-03-25 15:38:38 +00:00
Tim Hunt
2e1fde188e MDL-75017 questions: fix weird setup in qformat_xml_import_export_test 2023-03-24 12:56:14 +00:00
Meirza
e4b24bdd79 MDL-77299 question: Added class properties that are not declared.
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:09 +07: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
Sara Arjona
1aba368aa9 Merge branch 'master_MDL-75874' of https://github.com/matheusot/moodle 2022-11-10 16:22:11 +01:00
Matheus Rodrigues
caf6b655e6 MDL-75874 aiken_html: correctly display HTML chars for Aiken questions
Updates the Aiken Format class to process answers correctly, enabling
support for special HTML characteres such as <, >, and &.

Co-authored-by: Leticia Luz <leticia.adrielli.luz@gmail.com>
2022-11-10 09:56:52 -03:00
Andrew Nicols
3d70f457cb MDL-76169 mod_quiz: Add quiz question bank behat resolver 2022-11-03 21:39:15 +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
Petr Skoda
2f70b320bb MDL-75237 qformat_blackboard_six: sanitise blackboard import file paths 2022-08-12 04:14:18 +02:00
Petr Skoda
3e61730463 MDL-75237 qformat_blackboard_six: Revert MDL-72029
This reverts commit 3cafb305ded.
2022-08-12 04:14:18 +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
Huong Nguyen
3cafb305de MDL-72029 Lesson: Prevent arbitrary file read when importing lesson questions in blackboard format 2022-07-06 05:24:15 +02:00
Jun Pataleta
70f6b1605b MDL-74471 versions: bump all versions and requires near release 2022-04-13 10:37:36 +08:00
Víctor Déniz
a51d24c8a8 MDL-74330 lang: Replace modified strings in tests 2022-04-01 13:17:18 +01:00
Tim Hunt
ee80bc47b7 MDL-72958 questions: tidy up all question-related upgrade.txt files 2022-03-22 14:53:43 +00: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
Shamim Rezaie
5f2963b053 MDL-72517 qformat: Removed extra whitespaces 2021-10-07 13:28:00 +11:00
cescobedo
678826efb8 MDL-72517 qformat: Remove ExamView question format 2021-10-06 09:35:35 +02:00
Sara Arjona
c6d11f0f6c MDL-72041 qformat: Remove WebCT question format
WebCT was acquired by Blackboard in 2006, so qformat_webct has been
completely removed from Moodle core.
2021-09-02 16:16:55 +02:00
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