19 Commits

Author SHA1 Message Date
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
Tim Hunt
0d4075d514 MDL-40006 searchableselector does not work in IE or Safari.
This fix is a horrible hack, but one I have used for years in tool_editrolesbycap
https://github.com/moodleou/moodle-tool_editrolesbycap/blob/master/yui/capabilityformfield/capabilityformfield.js
and it seems to be reliable.

As an added bonus, I removed the use of YUI2 here.

Also, I fixed the related button in quiz to be GET not POST.
2014-09-19 21:59:34 +01:00
sam marshall
c234c34085 MDL-44725 Availability: Replace groupmembersonly - quiz overrides (9)
This only affects the quiz overrides form, as groupmembersonly was
not used elsewhere. The change simply restricts the list of users
shown when selecting somebody for overrides.

Some additional code is needed to (efficiently) load the $cm object
as a cm_info so that the availability API can be used on it.
2014-09-02 13:03:23 +01:00
Mark Nelson
12bb281e5e MDL-43037 mod_quiz: retrieve all name fields for the user override pages 2013-11-23 16:17:54 -08:00
rwijaya
c544ee92f5 MDL-41615 quiz_mod: fix heading levels for usability and accessibility 2013-11-07 12:04:00 +08:00
Damyon Wiese
74df2951d1 Revert "MDL-39876 Change get_record('course') calls to get_course"
This reverts commit ab7632b74c331540c90229bf03d13aa2e6bdd9be.
2013-08-21 13:42:30 +08:00
sam marshall
ab7632b74c MDL-39876 Change get_record('course') calls to get_course 2013-08-15 11:31:20 +01:00
Tim Hunt
9695ff811b MDL-34657 user sorting: consistent sorting everywhere.
This commit coverts everything in the codebase to use the new
users_order_by_sql function when sorting lists of users. More details in
the bug.

Note that this does not change places where users are displayed in a
sortable table, and the sort order comes from the table.
2012-09-27 12:41:42 +01:00
Ankit Agarwal
c492a78ee2 MDL-34468 quiz: Replace all instances of get_context_instance() with respective context_XXXX class in mod/quiz 2012-07-24 17:08:05 +08:00
Tim Hunt
9e83f3d11d MDL-32788 quiz: clean up codechecker issues before the 2.3 release. 2012-05-04 15:12:23 +01:00
Tim Hunt
e07cccfc25 MDL-28469 quiz settings pages should be pagelayout admin. 2011-10-03 16:38:34 +01:00
Tim Hunt
25a03faaca MDL-20636 fix many code-checker issues in mod/quiz. 2011-05-12 00:30:25 +01:00
Tim Hunt
a2ac234956 MDL-20636 Merge remote-tracking branch 'moodle/master' into upgrade
Conflicts:
	lib/filestorage/file_storage.php
	mod/quiz/attemptlib.php
	mod/quiz/lib.php
	mod/quiz/mod_form.php
	mod/quiz/report/overview/overview_table.php
	mod/quiz/report/overview/report.php
	mod/quiz/report/responses/report.php
	mod/quiz/report/responses/responses_table.php
	mod/quiz/report/statistics/db/install.xml
	mod/quiz/report/statistics/qstats.php
	mod/quiz/report/statistics/report.php
	mod/quiz/report/statistics/statistics_question_table.php
	mod/quiz/report/statistics/statistics_table.php
	mod/quiz/report/statistics/version.php
	mod/quiz/review.php
	mod/quiz/reviewquestion.php
	mod/quiz/startattempt.php
	mod/quiz/styles.css
	mod/quiz/view.php
	question/type/essay/questiontype.php
	question/type/match/backup/moodle2/backup_qtype_match_plugin.class.php
	question/type/match/backup/moodle2/restore_qtype_match_plugin.class.php
	question/type/numerical/display.html
	question/type/numerical/questiontype.php
	question/type/questiontype.php
	question/type/random/questiontype.php
	question/type/shortanswer/questiontype.php
	theme/base/style/question.css
2011-05-11 20:29:49 +01:00
Tim Hunt
ba6438471b MDL-20636 Fix top of file boilerplate in mod/quiz. 2011-02-21 16:13:25 +00:00
andyjdavis
7bbe971548 general MDL-26440 removed references to uid in SQL queries as its a reserved word in Oracle 2011-02-18 15:51:50 +08:00
Sam Hemelryk
56ed242b51 navigation MDL-20276 Fixed up the navigation for the quiz module and question section as per Tim's recommendation.
* Routine navigation through the quiz and question modules
* Fixed navbar through quiz and questions
* Pages headers added throughout
* Added method to turn a navigation node into a tabs array suitable for use with print tabs
2010-05-21 03:15:48 +00:00
Tim Hunt
7bc488dc3d quiz settings MDL-21780 more work on group and user setting overrides
The group setting tab is now disabled if there are no groups in the course.
The code also now respects groupings.
Thanks to Matt Petro for this patch.
2010-05-10 22:15:17 +00:00
David Mudrak
16be897441 MDL-21652 html_table rendering refactored
* class html_component does not exist any more
* class html_table rendered via html_writer::table()
* html_table, html_table_row and html_table_cell have public $attributes property to set their CSS classes
* dropped rotateheaders feature, should be added again after more research of possible ways (<svg> is not nice IMHO)
* dropped possibility to define CSS classes for table heading, body and footer - can be easily done and better done using just table class and context
2010-03-20 22:15:54 +00:00
Tim Hunt
990650f94c quiz: MDL-16478 Allow different open/close dates, etc. for individual students or groups.
This was implemented by Matt Petro of the University of Wisconsin - Madison Engineering
School and Math Department. Many thanks. Reviewed by and committed by Tim Hunt.

This adds a new Overrides tab to the UI, with sub-tabs Group overrides and User overrides.
Each of those lists all the overrides that currently exist, and lets you manage them and
create more.

When a quiz is being attempted, the override that applies to the current user is combined
with the current quiz settings loaded from the quiz table (normally called $quiz).
If there are both user and group overrides, then just the specific user override is used (more specific).
If the user is in several groups, then the overrides are combined to give the most permissive set of options.

There is one new database table quiz_overrides, to store the overrides.
2010-03-08 16:01:38 +00:00