Commit graph

1499 commits

Author SHA1 Message Date
Dan Poltawski
28887344d6 Merge branch 'MDL-49368' of git://github.com/timhunt/moodle 2015-06-15 12:14:35 +01:00
Tim Hunt
3af05ae35b MDL-29771 interactive behaviour: better state text in try again state
Before it just said 'Not complete'. It is more helpful to show the number
of tries remaining in this state as well.
2015-05-31 21:09:55 +01:00
Tim Hunt
ce95661817 MDL-49368 qtypes match & multichice: cope with editing after attempt
Teachers should not radically edit a question after it has been
attempted. However, if they do, we should handle it gracefully, rather
than triggering PHP errors.
2015-05-21 18:17:14 +01:00
Eloy Lafuente (stronk7)
b758ab3053 MDL-50183 upgrade: add 2.9.0 separation line to all upgrade scripts 2015-05-12 00:21:05 +02:00
Eloy Lafuente (stronk7)
26ea380d24 MDL-50102 versions: bump all versions and requires near release
version = planned 2015051100 release version
requires= current 2015050500 rc1 version

Note: On purpose, the course format social wrong version (2015102100)
has been kept unmodified. Looking forward a solution right now.
2015-05-05 17:43:19 +02:00
Tim Hunt
299d77dd5a MDL-50028 qtype_match: fix correct answer display
Atto's stupid tendency to create HTML like
<p>You don't need a br at the end of a paragraph!</br></p>
was breaking it.
2015-04-28 13:07:26 +01:00
Tim Hunt
c70c18c0e3 MDL-50028 questions: split into one testcase class per file 2015-04-28 13:07:25 +01:00
Tim Hunt
bb93fc24aa MDL-6340 quiz: avoid reusing random questions between attempts
There are several improvements over what we had before:

1. We track all the questions seen in the the student's previous
quiz attempts, so that when they start a new quiz attempt, they get
questions they have not seen before if possible.

2. When there are no more unseen questions, we start repeating, but
always taking from the questions with the fewest attempts so far.

3. A similar logic is applied with variants within one question.

There is lots of credit to go around here. Oleg Sychev's students Alex
Shkarupa, Sergei Bastrykin and Darya Beda all worked on this over
several years, helping to clarify the problem and shape the best
solution. In the end, their various attempts were rewritten into this
final patch by me.
2015-03-26 17:45:49 +00:00
David Monllao
365377bcb2 MDL-47712 question_multianswer: Concat as string 2015-03-16 12:28:51 +08:00
Daniel Thies
530a2cb0d1 MDL-47712 qtype_multianswer: Move mathjaxloader spans to outer question 2015-03-13 20:43:03 -05:00
Andrew Nicols
5ce0741490 Merge branch 'MDL-49247' of git://github.com/timhunt/moodle 2015-03-03 14:56:39 +08:00
Helen Foster
428330da1c MDL-49241 lang: Merge English strings from the en_fix language pack 2015-02-24 11:15:15 +01:00
Tim Hunt
8def548b8d MDL-49247 question restore: avoid unique key errors from old bad data
Several tables have had unique keys added to enforce a constraint that
should always have been there. It is possible for old sites to have
data that violate the constraints, and sometimes people want to backup
data from those old sites, and restore them into a new Moodle.
Therefore, we need to guard agains the unique key violation errors.
2015-02-19 21:46:56 +00:00
Tim Hunt
86969816c6 MDL-49041 qtype_multianswer: don't reveal marks on partial responses
This commit also fixes MDL-32049 about the lack or valdiation message
when an incomplete respnses is submitted.

AMOS BEGIN
 CPY [pleaseananswerallparts,qtype_match],[pleaseananswerallparts,qtype_multianswer]
AMOS END
2015-02-05 20:01:13 +00:00
Tim Hunt
da6f1f586d MDL-48474 qtype_shortanswer: answers were not being trimmed.
This fix is based on Oleg Sychev's suggestion. Thanks.
2015-01-08 17:41:51 +00:00
Pau Ferrer Ocaña
2908af0903 MDL-47176 qtype_match: Avoid sql_compare to solve problems with Oracle 2014-12-12 14:30:58 +01:00
Pierre Pichet
b8393a77c3 MDL-48042 Questions: Reset Calculated qtype comments on datasets
Reset back the modifications of Calculated qtype comments on datasets
    done by MDL-47224

Signed-off-by: Pierre Pichet <pichet.pierre@uqam.ca>
2014-11-15 16:17:15 -05:00
Eloy Lafuente (stronk7)
147bae8f7c MDL-48144 upgrade: add v2.8.0 sep lines 2014-11-10 18:08:15 +01:00
Eloy Lafuente (stronk7)
4723da1bff Merge branch 'MDL-47990' of git://github.com/timhunt/moodle 2014-11-06 00:22:32 +01:00
Eloy Lafuente (stronk7)
de881693f7 MDL-48021 bump: Bump all versions to planned release
This bumps all versions to planned 2.8 release
(2014111000) version and all the dependencies to
current 2.8rc1 (2014110400)
2014-11-04 17:52:35 +01:00
Tim Hunt
749606288e MDL-47990 qtype_multichoice: fix test response import/export 2014-10-30 18:19:45 +00:00
Tim Hunt
cda62a3829 MDL-47791 question editing: remove permission info from above the form
This information is not really meaningful for users, and takes up prime
real-estate, so we are removing it.
2014-10-21 15:03:20 +01:00
Kevin Wiliarty
3d1c2898c1 MDL-47629 quiz review: display cloze feedback on top of "Check" button 2014-10-14 15:36:34 -04:00
Eloy Lafuente (stronk7)
aec2b1c2da Merge branch 'MDL-47224' of git://github.com/aolley/moodle 2014-09-24 01:26:52 +02:00
Marina Glancy
8766d1981c MDL-45336 qtype_numerical: use own strings instead of mod_quiz
These strings have already been copied from mod_quiz to qtype_numerical but
in the qtype_numerical plugin code the translations from mod_quiz were used.
Even though the strings were already present we copy the translations.

AMOS BEGIN
 CPY [invalidnumericanswer,mod_quiz],[invalidnumericanswer,qtype_numerical]
 CPY [multiplier,mod_quiz],[qtype_numerical]
 CPY [invalidnumerictolerance,mod_quiz],[qtype_numerical]
AMOS END
2014-09-24 01:22:59 +02:00
markv
94999731ce MDL-10971 question type multianswer: Respect quiz shuffle option 2014-09-19 11:39:22 +01:00
Adam Olley
12dce419f4 MDL-47224 qtype_calculated: Calculated qtype comment on datasetitems should follow formatting rules 2014-09-19 09:33:35 +09:30
Colin Chambers
96fc865427 MDL-46895 qtype_calculated_find_formula_errors not defined causes Calculated question type test to fail 2014-08-22 13:55:44 +01:00
Marina Glancy
6ee21ea1d0 Merge branch 'MDL-18014-master' of git://github.com/damyon/moodle 2014-08-19 16:57:05 +08:00
Damyon Wiese
d32bc7d655 MDL-18014 Atto autosave: Atto requires $PAGE->url be set or debugging is triggered
2 quiz tests are creating forms with text editors manually - they need to ensure a valid
$PAGE->url is set so they don't trigger debugging warnings from $PAGE->url magic method
called by Atto.
2014-08-19 16:02:14 +08:00
Marina Glancy
430529bde8 Merge branch 'MDL-18014-master' of git://github.com/damyon/moodle 2014-08-19 13:50:44 +08:00
Tim Hunt
f276267d93 MDL-44894 question editing: fix validation with odd permissions
For users with edit permissions, but not add permissions, it was
impossible to save the editing form. The validation assuemd this value
was present, but it was not. Other code checks this field too, so I
added it rather than changing the validation and all the other uses.
2014-08-14 11:25:18 +01:00
Damyon Wiese
8593521f4c MDL-18014 Atto autosave: Fix coding style issues 2014-08-14 12:42:46 +08:00
Damyon Wiese
2ba6706d12 MDL-18014 Atto: Autosave text every N seconds. 2014-08-14 12:41:55 +08:00
Tim Hunt
aa4dcee761 MDL-46681 qtype_multichoice: disabled unused options
For questions set to 'One answer only', the 'Clear incorrect responses'
and 'Show the number of correct responses' hint options make not sense,
and are not used. Hence we disableIf them.
2014-08-07 14:20:06 +01:00
Ankit Agarwal
82b3260eab MDL-46148 qtype_calculated: low-level defence against bad formulas
This catches things like:
 * Malicious equations coming from backup files.
 * Malicious equations in old questions in the database.
2014-07-10 17:55:11 +08:00
Tim Hunt
5c6c172033 MDL-46148 qtype_calculatedsimple: fix notice
... when adding a dataset with a formula error.
2014-07-09 13:47:48 +01:00
Tim Hunt
66de66fe6a MDL-46148 qtype_calculated: fix validation when importing.
In order to do this in a sane way, I cleaned up a lot of old mess,
inclduing:

1. Previously, qtype_calcuated used ->answeres when importing, and
->answer when saving the form. This was crazy, so I fixed it, and
stripped out the code that made the alternative variable name work.

2. Similarly, it could handle ->answer being either an array, such as
you would get form the HTML editor, or a simple string, which is what
you get form the form. I simplified that too.

3. Finally, I made import use a transaction around saving each
question, so we don't get half questions in the database when an error
occurs.
2014-07-09 13:35:09 +01:00
Tim Hunt
770d3ce426 MDL-46148 qtype_calculated: removed unused method. 2014-07-09 12:56:18 +01:00
Sam Hemelryk
95d294368f Merge branch 'MDL-46212' of git://github.com/timhunt/moodle
Conflicts:
	question/type/calculated/question.php
2014-07-08 11:43:09 +12:00
Tim Hunt
88ec9f308d MDL-46148 qtype_calculated: validate formulas everywhere. 2014-07-07 14:33:34 +01:00
Tim Hunt
155bc75472 MDL-46148 qtype_calculated: function to validate equations in text. 2014-07-07 14:33:29 +01:00
Tim Hunt
29005a5418 MDL-46148 qtype_calculated: Remove unused function. 2014-07-07 14:33:24 +01:00
Tim Hunt
44f726a7b1 MDL-46148 qtype_calculated: unit tests + fixes for validation 2014-07-07 14:33:20 +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
Tim Hunt
0e30442ca8 MDL-46212 question editing: extra answer fields notice.
It turns out that PHP does not interpret "$field[$key]" the way we were
expecting.
2014-07-03 13:56:11 +01:00
Damyon Wiese
ca4f7f6105 MDL-45763 Question types: Allow saving '0' as question text. 2014-06-11 17:28:52 +08:00
Marina Glancy
5528117324 MDL-45763 question: fix SQL syntax for Oracle 2014-06-11 12:13:19 +08:00
Eric Merrill
516a3ddc76 MDL-45763 question: Correct random question text if set to true or false 2014-06-10 06:05:33 -04:00
Eric Merrill
a871a7a757 MDL-45763 question Random qtype should use '0' or '1' question text.
Some time ago, it when from using '0' for no-subcategories to blank.
Change to properly define '0' or '1', update old questions, and make
sure to fix newly restored questions.
2014-06-02 15:31:23 -04:00