498 Commits

Author SHA1 Message Date
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
Mahmoud Kassaei
00055ef6ab MDL-68367 Question: Multi-choice Option to hide systemtext 2020-05-21 09:47:15 +01:00
Andrew Nicols
149d80e819 MDL-66109 behat: Fix Example usage in feature files
The gherkin-lint package now understands the use of "Examples" and
requries that their indentation be correct and consistent.

This change sets the indentatation for these to:

    "Examples": 4,
    "example": 6,

This is in-line with the examples given in the offical Cucumber/Gherkin
documentation at
https://cucumber.io/docs/gherkin/reference/#scenario-outline whereby the
Examples and individual rows of the Examples table are children of the
Scenario outline.

This is contrary to the default for Gherkin-lint which places them as
top-level nodes with an indentatio of 0, and 2 respectively.
2020-05-11 10:55:58 +08:00
Tim Hunt
3d96227305 MDL-68338 qformat_gift: support idnumbers and tags
Hopefully the new format is forwards and backwards compatible.
2020-04-05 17:49:41 +01:00
Eloy Lafuente (stronk7)
ee439d017e MDL-67115 core: php74 params order for implode()/join()
Passing parameters to implode() in reverse order is deprecated, use
implode($glue, $parts) instead of implode($parts, $glue).

This commit corresponds to phpunit and manual detections, core files.
2020-01-19 18:47:07 +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
Eloy Lafuente (stronk7)
88d29a1bb8 MDL-66965 core: php74 curly 2 square braces changes
Note this only modified core files, still there are a lot
of curly brace uses but all them are within 3rd part
libraries and will be handled apart.
2019-10-25 17:41:10 +02: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
Adrian Greeve
d08e28a3bb Merge branch 'MDL-21904' of git://github.com/jmvedrine/moodle 2019-03-20 14:14:02 +08:00
Jean-Michel Vedrine
5dd1cf33ab MDL-21904 qformat_aiken: add export feature. 2019-03-19 08:01:56 +01:00
Adrian Greeve
ebdd345054 Merge branch 'MDL-63905' of git://github.com/jmvedrine/moodle 2019-03-07 09:10:30 +08:00
Jean-Michel Vedrine
48aad79a63 MDL-63905 qtype_multianswer: validate imported questions 2019-03-06 08:35:04 +01:00
Helen Foster
38dc5b9677 MDL-64943 lang: Import fixed English strings (en_fix)
Significant string changes:

* importgroups_help,core_group - Correcting optional fieldnames
  (removing picture, hidepicture and adding groupidnumber, groupingname
  and enablemessaging)

* penaltyforeachincorrecttry_help,core_question - additional paragraph
  about scoring logic

* resultdownloadready,tool_dataprivacy - wording corrected (no need to
  go to a download page)

* auth_dbfielduser,auth_db - varchar data type requirement
2019-02-28 09:50:18 +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
3a8cde29a4 MDL-63827 qformat_gift: fix notice when importing categories 2018-10-31 15:14:51 +00: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
Eric Merrill
efea324715 MDL-63456 question: Improve Aiken error handling and multichoice errors 2018-10-08 15:50:02 -04: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
Eloy Lafuente (stronk7)
5bd0dc6483 MDL-23545 question: fix remaining sizes leading to failures 2018-09-19 23:07:20 +02:00
Eloy Lafuente (stronk7)
61367994bd Merge branch 'MDL-23545-phpunit-fixes' of https://github.com/timhunt/moodle 2018-09-19 00:26:25 +02: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
Jun Pataleta
73311d3157 MDL-23545 question_format: Replace tabs with spaces in upgrade.txt 2018-09-18 10:04:03 +08: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
Nick Phillips
b6efeb4730 MDL-59447 question: GIFT import to respect multichoice defaults
Fix GIFT import to respect default answernumbering for new multichoice
questions (introduced in MDL-50011). Default for shuffleanswers is still
ignored, as this is a rather coarse-grained way to do it, and the wrong
setting for shuffleanswers would irreversibly alter the meaning of some
questions.

This is not an ideal long-term fix, but will save significant effort
for anyone who needs to be able to set answernumbering style for
questions imported in GIFT format.
2018-07-13 13:33:33 +12: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