24 Commits

Author SHA1 Message Date
Tim Hunt
2443f3d21d MDL-38490 question preview, variant is attempt (not display) option 2013-03-14 17:21:16 +00:00
Dan Poltawski
01dcd9d770 Merge branch 'MDL-35793' of git://github.com/timhunt/moodle 2013-01-15 12:56:51 +08:00
Tim Hunt
016a651578 MDL-37431 question preview: cron performance problem.
This query was performing badly. The solution seems to be to add a
redundant JOIN and WHERE to the subquery.

I renamed the table aliases in the subquery to avoid name collisions
elsewhere. I am afraid that makes the diff rather unhelpful. The
    AND subq_qu.component = :qubacomponent2
line is new. The other lines have just had subq_ added.
2013-01-11 13:18:21 +00:00
Tim Hunt
4125ded139 MDL-35793 question preview: config for the display options.
The settings control the display options used when a user
first previews a question in the question bank. Once a
user has previewed some questions, these are stored as user
preferences.

It may not seem worth making this configurable, but acutally
it is important when training new users to get them started
off using the right opitions.
2012-12-22 17:38:37 +00: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
Tim Hunt
97f1137a61 MDL-36806 question files: fix unnecessary require_login call.
quiz_question_pluginfile later does the correct check. Doing this
other check first means you get an error about changing $PAGE->context.
2012-11-23 15:54:58 +00:00
Tim Hunt
2ec325c252 MDL-29847 question preview: garbage collect old preview data.
This adds cron code which looks for question previews that have not been
touched for more than 24 hours, and deletes them.

We try to delete previews immediately. For example if the user clicks
start again, then we immediately delete their previous preview. However,
we can't do that if they just close the preview window. Hence we need
some cron code to clean up old preview that have got left lying around.

Normally, this code will not have much to do, so it will be very fast,
so we can afford to run it every cron.

This has been implemented in such a way that in future it will be easy
to add other cron code to the question bank.

Sadly, to make this work on MySQL, we require a horrible hack in the
already hacky delete_usage_records_for_mysql function.
2012-08-16 17:02:01 +01:00
Rajesh Taneja
61cca0b7fc MDL-32940 libraries: Replaced deprecated PARAM_NUMBER with PARAM_FLOAT 2012-07-23 17:21:05 +08:00
Marina Glancy
2aad62e93c MDL-33467 fixed variable name conflict 2012-06-06 11:17:07 +01:00
David Mudrak
7a00d4385d MDL-32471 preview thumbnails support for other component types
This commit affects mostly qtypes. Other standard components either do
not have pluginfile handler or have been already updated to the new API.
2012-04-24 14:29:44 +02:00
Dongsheng Cai
d2b7803e5a MDL-30973 Files API, check and update DocBlock 2012-02-15 12:48:57 +08:00
Tim Hunt
079caafc16 MDL-31102 question preview: fix HTML validation errors. 2012-01-12 12:10:54 +00:00
Tim Hunt
7664182d7f MDL-29493 questions should be createable with defaultmark a float. 2011-09-23 12:55:01 +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
f7970e3ca7 MDL-20636 Eliminate integer and boolean in PHPdoc comments. should be int and bool. 2011-02-23 16:25:25 +00:00
Tim Hunt
a17b297d60 MDL-20636 Add missing defined('MOODLE_INTERNAL') || die(); 2011-02-23 16:00:20 +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
c76145d3e4 MDL-20636 Previewing a truefalse question in deferred feedback mode now works. 2011-01-13 18:35:43 +00:00
Tim Hunt
06f8ed54fd MDL-20636 More progress. 2011-01-13 18:35:34 +00:00
Petr Skoda
6bdfef5da9 MDL-24321 switching to standard stdClass() 2010-09-21 08:54:01 +00:00
Dongsheng Cai
fe6ce23489 MDL-16094 File storage conversion Quiz and Questions 2010-08-10 09:56:48 +00:00