As I recall, questions are ordered as they're added. Could questions have a weight, or a shift up/down (and maybe a "to top" and "to bottom") option?
This'd require a new field in the DB + some funky function to make sure all weights are unique... but would be REALLY usefull for quizzes which aren't shuffled.
A REALLY easy initial sollution would be to have a free textbox next to each question and upon submission, validate that each box contains a unique integer. OR (brainwave in terms of validation) have dropdowns for each attached question containing numbers which range from 1 to "total attached question count".
Possible issue: What do we do with random questions? Do we allow them to be grouped by weight? Do they continue to get unique weights at an Always question would?
Obiouvsly, Shuffle will disable this feature.
Comments
Comment #1
seanbfuller commentedGood points. Might make more sense to use theme_weight instead of a text box. Looks like $element['delta'] controls the range, so we could get a good -30 to 30 if we really needed.
Comment #2
gilcot commentedgood point. i agree with that kinda feature.
why do they have to be unique? suppose i enter the questions in the desired oreder and don't want to play with weihting... this stuff can just be used like with modules or other things in core : questions will be filtered (using an ORDER BY clause) by weight first and then by age (given by node id -or column like) i.e FIFO, that's all.
well. but i think that starting with the default -10 to 10 is enough (this interval may be enlarge later if really needed, but i doubt) :)
Comment #3
nicholasthompsonWhy -10 to 10 (or -30 to 30)?
Why not set the range to 0-[num-questions-assigned]?
Comment #4
gilcot commentedtry to play width node weigths and you'll understand what i mean (book pages of the same section/chapter -see http://drupal.org/handbooks for example- are ordored by weight and by title -where i propose age instead of alphabetical title-...) you'll notice that there were really no need to use a ranking system wich use the number of pages in the book (or in the section to be more restrictive). :) to be frank, i think an intervall from 0 to 10 is enough for most cases.
in another hand, drupal weight system is for use with a constant weight-valuing* (and believe me, it's easier to manage for developper, and users are certenly familiar with it because it's use many parts in core and within many modules) and is always given in the form -[value] to +[value] where "value" is called the delta :) (see http://api.drupal.org/api/HEAD/file/developer/topics/forms_api_reference... for deeper explanations)
* when i say "constant weight-valuing", i mean of course something that is always changing everytime a quizz is modified (for example when a question is added, because the number of question has changed).. less computations means less ressources use (and/or fast computation, more cachability, etc.)
Comment #5
sivaji_ganesh_jojodae commentedquiz 3.x and above has drag drop UI to order the questions. Marking this as fixed.