Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Quiz UI redesign - development: Difference between revisions

From MoodleDocs
mNo edit summary
Line 12: Line 12:
* communicate all error states to user
* communicate all error states to user
** "the question you tried to add is already in the quiz"
** "the question you tried to add is already in the quiz"
** Make ticket, delegate: user choices when quiz has been attempted
* add to appropriate places checks if a quiz has consecutive page breaks (attempt.php etc.) http://moodle.org/mod/forum/discuss.php?d=100367
* add to appropriate places checks if a quiz has consecutive page breaks (attempt.php etc.) http://moodle.org/mod/forum/discuss.php?d=100367
* keyboard usage
* keyboard usage

Revision as of 12:47, 23 September 2008

Back to Quiz_UI_redesign


Features

  • complete the status bar to have what's relevant from quiz settings
    • exam total points
  • quiz grade display and changing
  • repaginate
  • tooltips
    • add tooltip: the category of a single question in quiz
  • communicate all error states to user
    • "the question you tried to add is already in the quiz"
  • add to appropriate places checks if a quiz has consecutive page breaks (attempt.php etc.) http://moodle.org/mod/forum/discuss.php?d=100367
  • keyboard usage
    • make sure tabindexes work
  • ajax turning on/off of question bank window
  • if quiz has been attempted, make the choices availableautomated as possible for the user, as follows. I think this would be of tremendous benefit, as also various messages in the quiz forum show this is a real issue:
    • 1. Always warn the user if the are about to do something that affects the set of choices they can make later (User control and freedom), and as the undo here is not obvious, tell the user about it
    • 2. Make the user aware of the choices they have in the quiz edit screens, where their actions' consequences are the most obvious: "The quiz has been <a href="attempts listing">attempted</a>, so you cannot edit it. You can still edit the questions in categories, so if you have random questions you can change the contents of those. If you need to modify the quiz, you can: delete the attempts from this quiz, or keep the attempts in this quiz but make a copy of it without the attempts

Missing other changes

  • help-icons: Add help icons in appropriate places; add labels to icons where testing shows it is required; write further relevant documentation to Docs
    • bring back contextual help icons where appropriate
  • quiz edit view in case of attempted exam
  • testaus: safari, konqueror
  • 8. You probably need to change your print_box_start(); call around line 570 of edit.php to print_box_start('generalbox clearfix');
  • There should be at least some level of consistency with the actual question bank and quiz edit tab/question bank window.
  • There should be a link back to the current quiz from question bank. See also: Quick switch proposition


Bugs

  • IE6 YUI dialog broken: fallback works
  • Opera9.27 YUI dialog broken: fallback works
  • 80 characters/row, 8 spaces if line is broken in many due to length
  • 9. It still lets me add questions even though the "You cannot add or remove questions because there are attempts." message is displayed. Also, when that message is displayed, the stylesheet is not used so the layout is messed up.
  • SQL error new question_category_object()
  • Tim> By the way, the new interface for adding a random question to the quiz does not work for me. The form appears, but I get an error when I click submit. (js vai oma lomake?)
  • IE css for tab icons
  • 3. Line 249 of mod/quiz/edit.php (an example of a line that is too long!) refers to $param->..., but I can't see where this is defined. Looking at the code being called, these parameters don't seem to be used. Oh ... 4. I did not know about the PHP compact function. It looks dangerous to me, because it makes it hard to see where a variable like $currentcat is used. I would stick to the more verbose array('currentcat' => $currentcat, 'contexts' => $contexts); 5. And it is this undefined variable that is giving me SQL errors like


Cleanup

  • Clean up any inline javascript, CSS & HTML; move to appropriate libraries and themes; research what is the optimal approach with these
  • mod/quiz/addrandom.php - You have an unnecessary ?><?php near the end.
  • mod/quiz/edit_redesign.css I note that you have comments in here for things that need to be tested. That would need to be done before 2.0
  • mod/quiz/edit_redesign.css You should normally be able to avoid using !important by using appropriate selectors.
  • mod/quiz/edit_redesign.css You have some empty rules, which should be cleaned up.
  • tabit -> välilyönnit
  • 7. The way to get extra stuff, like links to stylesheets, included in <head>, is to pass extra HTML as the 5th ($meta) parameter to print_header_simple.
  • The hack in print_header needs to go. Acutally see (and vote for!) MDL-16151, which is something that has been needed for ages.
  • new essay icon in project directory
  • the strings in lang files should be sorted alphabetically, although I understand why you wanted to keep all the new strings separate while this was a patch.
  • In popup_form, the line "$submitvalue=$go;" should be outside the inner if statement.
  • go through the logic in the discarded code of quiz_print_question_list
  • print_paging_bar - are these changes really relevant to the current project? If they are a separate thing, probably better to file a separate tracker bug and patch for these.
  • question/category_class.php question/category_form_randomquestion.php A lot of these changes are related to the quiz UI, although they are also related to random questions. Do they really belong here, or would they be better somewhere in the quiz?
  • mod/quiz/addrandom.php Innapropriate copy-and-pasted comment at the top of this file.
  • make sure the labels on the add random question fallback page are identical with the actual dialog
  • when adding a question from a quiz directly a category is not and should not be specified by default, but the user should be made to select a category in the question edit screen. they may select default for everything and it is not much of a hassle, but they will be at least faintly aware of the existence of categories. (for now the default category is selected by default)

Under consideration

  • Create new category in quiz edit screen's question bank window
  • Possibly, moving questions between categories (not sure yet if this needs to be supported in the Quiz editing screen)
  • Tim> Is drag-and-drop reordering on the todo list? and have you looked at how re-ording activities on the course front page works? Again, changing that may be something for the future.
  • Tim> I am not convinced by the repeated IU elements at the top and bottom of the reordering page. They look silly on very short quizzes, and are not really enough on very long quizzes.
  • Tim> On the quiz settings form, we should change the "Questions per page" caption to "Automatic page breaks" with options "Never", "After every question", "Every 2 questions", ... I don't think we need to give every single option up to 50, either! -> OK, so "Automatically start a new page"
    • This seems backwards to me. Why would you want that? The logic is pages that contain questions. "Starting pages after questions" tries to stick with the old logic of page breaks, which is
  • "The current 1.9.2 version and earlier ones had a nasty habit of making quiz items inaccessible to other quizzes if they were created within a quiz, rather than using the Question link in the admin panel. That seems to have been cleared up with this revision. Wonderful!"This may be a bug covering another bug? Does someone know something about the reasons behind this kind of behaviour in 1.9.2?
  • ask Tim: 'If we are talking redesign, I would really like to see the "Description" question type renamed to "Label" as this is the standard Moodle term in courses for this functionality. It is one less thing teachers would need to learn as they know what Labels do already.'
  • ask Tim: the question deleting md5 check still unclear http://moodle.org/mod/forum/discuss.php?d=102062



Going out

  • Add "virtual tabs" to fluently switch between qbank and quiz


Old todo (check these and move above):

  • Question bank
  • New Quiz edit tab http://tracker.moodle.org/browse/CONTRIB-530
    • complete the status bar to have what's relevant from quiz settings
    • make sure tabindexes work
    • go through the logic in the discarded code of quiz_print_question_list
    • storing operational parameters in url is a fatal usability error: a user may reload a page after deleting a question and, without realizing it, delete another question from the quiz. - partially fixed, by forwarding if $significantchangesmade
    • make CSS comply with moodle themes and UI guidelines
    • //TODO: add javascript quick hiding/showing question bank menu by adding the now-html-commented id's to the elements - requires submitting the GET parameter accordingly in the background and returning false for the link so the browser does not actually GET it
    • paging of items if there are >30 (Fluid allows to "Allow users to break up long lists of items into separate pages" - try this out?)
    • how to make string changes go upstream?
      • (As it says in the Moodle coding guidelines) you should never change langauge strings. This is because the same language packs are used for all versions of Moodle. If you need a different string, create a new one.--Tim Hunt 08:41, 2 July 2008 (CDT)
        • Hm the thing is, if a translation does not make sense in a specific language, or if I know that a string is indeed intended for this specific button, but usability-wise it is not the best choice? Still just create new ones?--Olli Savolainen 12:31, 2 July 2008 (CDT)
  • Random questions
    • in random questions added directly to quiz, what should we choose as a value for recurse?
      • should this be an inline option?
    • is it possible to have an empty random question in quiz?
      • Basically no, or at least it is possible, but it leads to an error. This situation can be represented in the database, and you can even create it through the current UI (add a random question from a category, then delete all the questions in that category). However, this will lead to an error when you run the quiz.--Tim Hunt 08:41, 2 July 2008 (CDT)
        • Thanks Tim. What I am thinking is it should be an error in the editing interface, and invisible in the quiz: that is, as you can create a random question right into the new category, as long as there would be such empty random questions, there would be visible warnings that the quiz is in an unfinished state in the editing UI - but this should not have any negative effect in quiz making itself, the question should just be absent (except perhaps in teacher preview, where the difference with the teacher preview and the actual quiz should then be made extremely obvious)?--Olli Savolainen 09:41, 2 July 2008 (CDT)
        • That is: do you think we (I) should a) Modify the current empty randomquestions to notify of their state appropriately or b) create a new structure that stores the states of empty random questions in the new editing UI and then only create actual random questions when the user adds questions to them. This brings us to the question: what would then happen if the user again removes all the question from a random question category?--Olli Savolainen 04:35, 3 July 2008 (CDT)
    • replace tabs with 4 spaces, eclipse PDE seems to not obey this very well


Completed:

  • New question bank window
  • keep cmid ALWAYS along in the urls (?)? -done
  • add page count -done
  • Storing the question bank window - completed, using set_user_preference()
  • //TODO: make the actual question bank hiding possible without javascript - done, currently only without javascript
  • question box layout: ensure line breaks don't break the layout unusable -- done, css overflow:hidden;white-space:nowrap;
  • add correct parameters (no id) to add question form from quiz -was bug, fixed
  • Find out about $pagevars, do I need to extend them, where's the documentation?
  • abstract random question category creating into a function which both the AJAX-style and the traditional version can use
  • even if there are no questions, show an empty page to which add questions
  • different presentations for random questions and other questions
  • Paging and reordering tab
    • Add: Repaginate with N questions per page
    • clean up the old tabs
    • add delete page 'X' -> "Are you sure? There is no undo for this." DONE (added deleting pages only for empty pages, no confirmation)
    • make forms functional: question scoring, new question/randomq/description formslib
    • add help dialog: basic concepts of quiz
      • //TODO: something in the javascript broke and questions are being added not on the right page, but to the end

Relevant development links in docs