78 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
40459677a0 MDL-47797 question preview: show more technical info
It is helpful for developers creating question types (at least) to be
able to see this.
2014-10-31 15:52:54 +00:00
Andrew Nicols
fd2e73abef MDL-43687 Javascript: Correct instantiation of the question-preview
This addresses issues discovered during testing, including:
* inclusion of the M.core_question_preview metadata;
* inclusion of required strings; and
* correcting a function signature.
2014-02-06 13:55:27 +08:00
M Kassaei
7258470276 MDL-43687, convert question/preview.js to the new yui format 2014-01-29 11:37:57 +00:00
Tim Hunt
4e3d829350 MDL-42105 questions: let attempts have a max fraction > 1.
This parallels question_attempt->minfraction, which allows the
fractional mark to go below zere.

This is needed to allow the certainty-base marking behaviours to work
better.
2013-10-04 17:52:19 +01:00
Thanh Le
599cc731e3 MDL-35792 question preview: way to update options without restarting.
It is useful, and possible, to update the display options without
restarting the question. You now only have to restart if you are
changing the maximum mark or the behaviour.
2012-12-22 17:38:30 +00:00
Ankit Agarwal
d197ea4300 MDL-34549 libraries: Replace get_context_instance_by_id() by context::instance_by_id() 2012-08-24 11:30:10 +08:00
Tim Hunt
4c16e191e1 MDL-34862 question preview: improve preview ownership check.
Users should only be able to access their own quetion preview. In the
past, for reasons I can no longer remember, this was enforced
using the session. It is much better to set the question_usage to belong
to the user's context.
2012-08-13 16:53:15 +01:00
Frederic Massart
21c08c63ca MDL-34458 Librairies: Replaced deprecated get_context_instance() 2012-07-24 16:58:17 +08:00
Tim Hunt
18056cd8dd MDL-32087 question preview: add a help icon to the technical info. 2012-05-14 19:26:06 +01:00
Tim Hunt
05a7d15511 MDL-32087 question preview: update the code to use html_writer. 2012-05-14 19:26:05 +01:00
Tim Hunt
a2b4d8968c MDL-32087 question preview: add a Save button.
Without this, there are some interactions with the question that could
only be tested by adding the question to a quiz, which was a pain.
2012-05-14 19:26:04 +01:00
Tim Hunt
802f8d2af4 MDL-32087 question preview: make more technical info available.
... but hide it in a collapsible region.
2012-05-14 19:26:04 +01:00
M Kassaei
da22c0127b MDL-31306 question preview: disable 'Fill correct' for qtypes that can't 2012-01-24 13:26:44 +08:00
Tim Hunt
079caafc16 MDL-31102 question preview: fix HTML validation errors. 2012-01-12 12:10:54 +00:00
Charles Fulton
8f725ade78 MDL-29970 question preview: Fill correct only if qtype supports it 2011-11-03 11:27:09 +00:00
Tim Hunt
bed495578f MDL-29854 questions: display better message and more useful continue
when an error occurs in the middle of processing responeses.
2011-10-25 14:49:57 +01:00
Jamie Pratt
76e6cf5d84 MDL-29558 question preview: limit variants drop-down to the first 100
In situations when question has many variants.
2011-09-30 09:33:28 +07:00
Tim Hunt
56920c36f9 MDL-28160 question preview window uses wrong pagelayout in activity contexts 2011-07-03 12:53:56 +01:00
Tim Hunt
56a4ae4673 MDL-28074 question preview should set context/course/cm properly.
1. We need this so that, for example, when previewing a question from
the quiz editing page, the preview uses the filter settings, theme and
language set for that quiz and course.
2011-06-29 21:25:56 +01:00
Tim Hunt
612106b3a4 MDL-20636 fix URL handling for previews to always use Moodle URL.
Also, make the preview window big enough. #367
2011-05-27 11:49:23 +01:00
Tim Hunt
c014b989ba MDL-27649 Convert the calculated question types to use the new variants mechanism. 2011-05-26 21:53:47 +01:00
Tim Hunt
9c197f4445 MDL-20636 Fix some more codechecker issues. 2011-05-14 22:53:25 +01:00
Tim Hunt
7764183a4a MDL-20636 Fix @package names and PHPdoc layout. 2011-02-23 13:38:16 +00:00
Tim Hunt
017bc1d9f3 MDL-20636 Fix @package names in question/behaviour, question/engine and question top level. 2011-02-22 20:50:18 +00:00
Tim Hunt
7a7197482d MDL-20636 Fix if the use of the File API so images work in questions. 2011-01-13 18:35:57 +00:00
Tim Hunt
cce1b6556c MDL-20636 Fix a bunch of minor errors in the truefalse preview.
Most significantly, all behaviours now work.
2011-01-13 18:35:46 +00:00
Tim Hunt
c76145d3e4 MDL-20636 Previewing a truefalse question in deferred feedback mode now works. 2011-01-13 18:35:43 +00:00
Tim Hunt
157434a522 quiz/question javascript MDL-24170 Enter in a shortanswer question preview should not flag the question.
That bit of JavaScript from mod/quiz/attempt.php is needed in question preview too, so refactor a bit.

I was disappointed to find that the
$PAGE->requires->js_module('core_question_engine');
line was needed in quiz_get_js_module, but it seems to be.

Also change non-Moodle-y string "End test..." to "Finish attempt..."
2010-11-01 17:44:59 +00:00
Tim Hunt
48c19b2551 quiz lang MDL-24170 move an old string to a more logical name, before making the real change.
AMOS BEGIN
 MOV [finishattempt,mod_quiz],[submitallandfinish,mod_quiz]
AMOS END
2010-11-01 17:36:15 +00:00
Dongsheng Cai
fe6ce23489 MDL-16094 File storage conversion Quiz and Questions 2010-08-10 09:56:48 +00:00
Tim Hunt
ff065f96bc mod quiz + questions MDL-22370 convert JavaScript to YUI3 and modules.
Note, quiz editing JS has not been done yet.
2010-08-04 15:22:04 +00:00
Rossiani Wijaya
0f56fde284 MDL-20447 - bulk upload: add page heading 2010-06-02 06:13:27 +00:00
Petr Skoda
eb7880654f MDL-21233 finally removed the omitquerystring parameters from the out method because: 1/ the least used parameter should nto be first, 2/ it is colliding with the other two paramters, now we have separate funtion for that instead 2010-01-17 09:37:30 +00:00
Petr Skoda
6ea66ff36c MDL-21233 obviously input tag writing does not belong into the moodle_url class, moving to html_writer instead + simplifying api 2010-01-17 09:06:55 +00:00
Petr Skoda
a685593466 MDL-21233 moodle_url improvemewnts, code simplification, more diagnostics; fixed several regressions 2010-01-16 15:39:56 +00:00
Petr Skoda
78946b9bdb MDL-20204 first batch of major theme changes, some regressions are still there, expect more changes and improvements soon; see tracker for details and list of subtasks 2009-12-16 18:00:58 +00:00
Petr Skoda
aeb15530b8 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-04 11:57:52 +00:00
tjhunt
d0fdb92ccf question preview: MDL-19820 set_url and generaltype = popup on question preview page 2009-10-01 10:09:59 +00:00
samhemelryk
d412354cc6 question MDL-19820 Updated print_header and build_navigation to OUTPUT and PAGE equivalents 2009-09-07 02:36:39 +00:00
nicolasconnault
9b59580b36 MDL-19820 Converted all print_footer() calls 2009-08-06 14:19:16 +00:00
nicolasconnault
723d610c91 MDL-19820 Migrated calls to print_heading 2009-08-06 08:26:06 +00:00
nicolasconnault
e42f153c33 MDL-19976 Changing redirect($url->out()) to redirect($url). NEVER, NEVER use redirect($url->out())!!! Bad Tim! :p 2009-07-31 09:30:11 +00:00
tjhunt
71990c7cf6 question preview: MDL-17418 Enable previewing of random questions.
Also, fix a grade rounding issue.
2009-01-08 09:03:49 +00:00
tjhunt
aafdb447bf quiz: MDL-6085 when editing a question from various places like a preview attempt or review screen, don't use a popup, instead take advantage of the fact that question.php now takes a returnurl. Merged from MOODLE_19_STABLE.
And MDL-17568 minor niggles with new queston navigation:
* The bit that scrolls down to the question you just submitted in adaptive mode was not working with random questions.
* Teachers reviewing an open attempt were shown the qusetions as editable, not read only!
2008-12-10 06:26:47 +00:00
tjhunt
e056398a10 MDL-16429 Notice when previewing questions since MDL-16263 was implemented. 2008-09-10 02:58:52 +00:00
tjhunt
0cd465770f MDL-7010 - followup - quiz config settings were referred to in two places in the question bank. Since these settings are now in config_plugins, the references need to be update. (Of course, perhaps these should not be referred to at all ...) 2008-09-10 02:44:21 +00:00
tjhunt
81d833adaa MDL-15540 Navigation panel did not work on the review page for multi-page quizzes because of the way states were loaded. Refactor. 2008-09-04 06:37:43 +00:00
tjhunt
62e76c6766 MDL-16263 A way for students to flag/bookmark, particular questions during a quiz attempt for later review.
This is an initial implementation that is now at a working state, but with a few things left to do. It seemed like a good idea to commit it before leaving work on Friday night.
2008-08-29 10:08:27 +00:00
dongsheng
ac93d63d2a MDL-14129, remove error() in question module 2008-07-24 04:20:44 +00:00