284 Commits

Author SHA1 Message Date
Mathew May
886d86623e MDL-72438 question: Final deprecations 2024-03-11 13:26:18 +08:00
Mark Johnson
63894ec2fe
MDL-74054 qbank_columnsortorder: Progressively enhance question bank actions
This modifies the question_data fragment used by the filter code to make its
parameters closer to the URL parameters of the question/edit.php page. This
Allows us to progressively enhance the add, remove and reset actions on the
question bank page, using this same fragment to reload the question table after
each change. This re-uses the same actions.js module used for enhancing these
actions on the qbank_columnsortorder admin screen.
2023-09-22 10:53:52 +08:00
Nathan Nguyen
e3bd166b3d MDL-72321 mod_quiz: Use new datafilters for random questions 2023-08-31 15:00:39 +01:00
Mark Johnson
823af3a8f1 MDL-72321 core_question: Replace old conditions with new datafilters 2023-08-31 15:00:39 +01: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
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Tim Hunt
aac5b47cea MDL-74041 quiz: use own size for paging the question bank 2022-05-04 11:01:44 +01:00
Tim Hunt
10e8ffe312 MDL-74041 question bank: page size should be 100 2022-05-04 10:34:34 +01:00
Safat Shahin
bf55e5a481 MDL-71696 core_question: class autoload changes
This commit implements some class autoloading
fixes to align with core question structure.
2022-02-03 22:22:50 +11: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
Safat Shahin
f9fc355ec7 MDL-71679 mod_quiz: Updates for new qbank api
This implementation will introduct changes to
the mod_quiz to implement the new qbank api
for view. Major changes are introduced in
the custom view and also all the legacy points
to the old qbank are changed to qbank plugins
where needed. It also deprecated and deletes
classes and scripts which were kept not to
break mod_quiz for the new api implementation.
2021-10-04 15:44:25 +11: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
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
Sara Arjona
479bd0b9fa Merge branch 'master_MDL-71613-viewcreator' of https://github.com/catalyst/moodle-MDL-70329 2021-08-31 10:22:04 +02:00
Sara Arjona
0976e5ad08 Merge branch 'master_MDL-71575-viewquestiontext' of https://github.com/catalyst/moodle-MDL-70329 2021-08-31 10:05:34 +02:00
Sara Arjona
3156f4184f Merge branch 'master_MDL-71577-viewquestiontype' of https://github.com/catalyst/moodle-MDL-70329 2021-08-31 08:44:49 +02:00
Marc-Alexandre Ghaly
b0067846ef MDL-71613 qbank_viewcreator: Add View creator to core
This implementation will introduce a qbank plugin "viewcreator"
which will view the question creator/modifier column in
the question bank view by replacing the core classes. Having
this plugin will give users the flexibility of enabling
or disabling the question creator and modifier column
in the question bank view.

Co-Authored-By: Marc-Alexandre Ghaly <marc-alexandreghaly@catalyst-ca.net>
2021-08-31 13:53:41 +10:00
Safat Shahin
97880f26b9 MDL-71575 qbank_viewquestiontext: Add View question text plugin to core
This implementation will introduce a qbank plugin "viewquestiontext"
which will view the question text row in the question bank view
by replacing the core class. Having this plugin will give users
the flexibility of enabling or disabling the question text row
in the question view.
2021-08-31 13:39:43 +10:00
Safat Shahin
354b98c86c MDL-71576 qbank_viewquestionname: Add View question name to core
This implementation will introduce a qbank plugin "viewquestionname"
which will view the question name column in the question bank view
by replacing the core classes. Having this plugin will give users
the flexibility of enabling or disabling the question name column.
2021-08-31 12:06:00 +10:00
Safat Shahin
c4eb3bda0a MDL-71577 qbank_viewquestiontype: Add View question type plugin to core
This implementation will introduce a qbank plugin "viewquestiontype"
which will view the question type column in the question bank view
by replacing the core class. Having this plugin will give users
the flexibility of enabling or disabling the question type
in the question bank view.
2021-08-31 11:49:41 +10:00
Safat Shahin
47478d6b59 MDL-71574 qbank_editquestion: Add Edit question plugin to core
This implementation will introduce a qbank plugin "editquestion"
which will implement the edit question, add question and copy
question actions in the question bank view by replacing the
core classes. Having this plugin will give users the
flexibility of enabling or disabling these actions.
2021-08-23 11:00:16 +10:00
safatshahin
dfed4fd040 MDL-71516 core_question: Qbank api implementation
This commit implements the qbank api so that any plugin
can implement its own question bank. This api currently
works parallely with the moodle core classes and the
added qbank in the core, means the moment a plugin
is installed, that object is replaced with the object
from the plugin instead of core, which means the api
has flexibility till the plugins are integrated and the
plugins can be integrated in any order.

All the old classes are still there and not deprecated
as there is a different tracker for the changes to the
quiz and another tracker for class deprecation and
class renaming. Core question units tests are pointing
to the new api structure but the classes are pointing
to the location related to the plugin availability.

Co-Authored-By: Luca Bösch <luca.boesch@bfh.ch>
Co-Authored-By: Guillermo Gomez Arias <guillermogomez@catalyst-au.net>

one more array fix
2021-08-17 18:57:31 +10: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
John Beedell
1dab8faafd MDL-23545 question: XML import/export add category description 2018-09-14 16:54:25 +01:00
Simey Lameze
728e195c5e MDL-61437 mod_quiz: rename question_build_display_preference function 2018-02-21 09:13:50 +08:00
Andrew Nicols
1e41e6ddd9 Merge branch 'MDL-61135-master' of git://github.com/ryanwyllie/moodle 2018-02-12 11:34:56 +08:00
Ryan Wyllie
73d16fc61d MDL-61135 question: split edit setup logic out from POST param parsing
Decouple the business logic in the question_edit_setup function from
the GET/POST param parsing to allow the business logic to be run
on params directly passed to it.
2018-02-08 02:25:30 +00:00
Shamim Rezaie
9275220de3 MDL-61132 Questions: Question Bank amendments to cope with Top category
* Display "Top" categories in the category filter when listing questions in the question bank
* Prevent editing "Top" categories
* Prevent deleting "Top" categories
2018-02-05 11:58:52 +11:00
Frederic Massart
891750bcfa MDL-55797 core_question: Make static getter for chooser
Part of MDL-55071
2016-09-23 10:55:17 +01:00
Frederic Massart
6f0993ccbc MDL-55797 core_question: Convert the chooser to template
Part of MDL-55071
2016-09-23 10:55:17 +01:00
Dan Poltawski
5aeba19926 MDL-48004 question: remove buggy arg of question_edit_setup
There are no uses of this in core and it does not make sense
2015-11-26 15:04:10 +00:00
Eric Merrill
a8524f3354 MDL-50799 question: Improve Show all text to be more accurate 2015-07-08 17:17:02 -04:00
Colin Chambers
e1a2d0d92d MDL-43089 quiz: improved interface for building quizzes
This commit is actually the joint work of Mahmoud Kassaei, Colin
Chambers and Tim Hunt from The Open University. We could only use one
persons name for the commit, and this time Colin gets the credit/blame.

The goal of this work was to increase usability, and also clean up
the page enough that it will be possible to add new features in future.

Display of mod/quiz/edit.php is now entirely generated by
mod_quiz\output\edit_renderer. This uses a helper class
mod_quiz\structure to provide details of the structure of the quiz, and
mod_quiz\repaginate to alter that structure. (Acutally, there are still
some modification methods on mod_quiz\structure. Expect that to be
cleaned up in future.)

The new code uses much more ajax, and there are new scripts
mod/quiz/edit_rest.php and mod/quiz/repaginate.php to handle this.
(Again, don't be surprised if those two scripts get merged in future.)
Also questionbank.ajax.php (which may, in future, be made more generic,
and moved into the core question bank code.)

Most of the new JavaScript code has intentionally copied the way things
are done when editing activities on the course page.

As a result of this, mod/quiz/editlib.php is now much shorter than it
was. (In future, expect the remaining code in here to move into
mod/quiz/classes.)
2014-10-02 17:22:23 +01:00
Tim Hunt
f4fe3968a2 MDL-46212 questions: add {} whenver vars are put into "" strings
Having had one subtle bug cased be this, I decided to do a search and
fix all of these.
2014-07-03 14:02:39 +01:00
Ray Morris
17f229fae3 MDL-40457 Question Bank: Allow plugins to add columns to question bank view
Allows plugins to add columns to the question bank view by extending core_question\bank\column_base
Columns to display are set in $CFG->questionbankcolumns. Columns are namespaced and autoloaded to support this.
2014-06-29 21:28:52 -05:00
Andrew Nicols
0b98f8e8e0 MDL-32729 Question: Convert remaining Questionbank code to YUI3 2014-03-27 00:28:08 +08:00
Andrew Robert Nicols
ac32c27e24 MDL-32729 Question: Switch to the YUI3 chooser dialogue
This uses the core chooserdialogue and associated style changes to make an
easily generated chooser with question descriptions.
2014-03-27 00:28:08 +08:00
Tim Hunt
8011be189e MDL-33653 fix preview links on calc qtype edit forms.
Also, refactor how we render preview icons, to eliminate duplication.
2014-03-07 19:46:56 +00:00
M Kassaei
435d32798b MDL-33839d, Remove the move icon from the question bank 2014-01-24 14:40:16 +00:00
M Kassaei
e0c41591e1 MDL-32523 Duplicate questions in question bank 2014-01-17 10:54:12 +00:00
Tim Hunt
d62382d1f9 MDL-40313 question bank search classes should be namespaced. 2014-01-09 18:26:21 +00:00
Tim Hunt
e22e749002 MDL-40313 Fix code and doc checker warnings. 2014-01-09 18:26:18 +00:00
Ray Morris
efa5155a2a MDL-40313 questionbank: Add question filtering API
Add new API for filtering questions, refactoring the options to display
old questions and include subcategories into new
question_bank_search_condition classes. Make the new API pluggable via
local_[pluginname]_get_question_bank_search_conditions.
2014-01-09 16:46:42 +00:00
Tim Hunt
165d6d7c56 MDL-43131 qbank: Fix show question text when first viewing.
When you followed the link to the question bank, the checkbox for the
"Show question text in the question list" option correctly reflected the
user's preference, but what was actually shown in the question bank did
not.
2013-12-05 11:22:18 +00:00
Marina Glancy
930fbd0505 Merge branch 'MDL-38574' of git://github.com/timhunt/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-13 11:05:25 +11:00
Tim Hunt
c1db10b6d5 MDL-38574 qtype chooser: quick fix to make it fit on-screen.
MDL-32729 will provide a better fix for this, but we may as well apply
this quick fix on stable branches.
2013-11-12 11:35:42 +00:00
Adrian Greeve
5b1944bbba MDL-40612 libraries: Tidy up and improvement of the code for additional name fields.
Includes an update to get_all_user_name_fields() and the inclusion of set_user_name_object()
2013-11-11 11:01:14 +08:00