Moodle

print_timing_information probably duplicates code from mod/quiz/accessrules.php

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: Quiz
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

mod/quiz/accessrules.php is the result of some refactoring that I did. It would be really good if we could use that instead of the new function print_timing_information. At least, it may be better to move that function to be a method of the quiz_access_manager class.

If you can't work out a good way to do this. It may be better if you just assign this task to me.

Activity

Hide
Olli Savolainen added a comment -

Just hit my eye, you might want to fix:

  • Print each message in an array, each surrounded by <p>, </p> tags.
    (public function print_messages())

Assigning to you, since I do not quite understand the reasoning behind the classes in mod/quiz/accessrules.php .

Show
Olli Savolainen added a comment - Just hit my eye, you might want to fix:
  • Print each message in an array, each surrounded by <p>, </p> tags. (public function print_messages())
Assigning to you, since I do not quite understand the reasoning behind the classes in mod/quiz/accessrules.php .
Hide
Tim Hunt added a comment -

OK done.

As a side effect of this change, the wording of of some of the messages will have changed slightly.

This would be bad if you chose the original wording for a particular reason. Olli, please can you check, and if you want me to change any of the wording, please reopen this bug with details.

The wording change is good, in that the working on the info tab is now consistent with the working on the edit tab.

Show
Tim Hunt added a comment - OK done. As a side effect of this change, the wording of of some of the messages will have changed slightly. This would be bad if you chose the original wording for a particular reason. Olli, please can you check, and if you want me to change any of the wording, please reopen this bug with details. The wording change is good, in that the working on the info tab is now consistent with the working on the edit tab.
Hide
Olli Savolainen added a comment -

There is no other reasoning to it besides keeping it short. It breaks the layout a bit that "The quiz will not be available until Friday, 26 December 2008, 02:50 PM" is that long and wraps onto the next line. One solution would be to put the string on a line of its own in any case.

But I that is not the only problem. Using | as a separator is really not semantic, I guess it should really be a list styled with CSS.

Show
Olli Savolainen added a comment - There is no other reasoning to it besides keeping it short. It breaks the layout a bit that "The quiz will not be available until Friday, 26 December 2008, 02:50 PM" is that long and wraps onto the next line. One solution would be to put the string on a line of its own in any case. But I that is not the only problem. Using | as a separator is really not semantic, I guess it should really be a list styled with CSS.
Hide
Tim Hunt added a comment -

Yes, you are right. Reopening.

Show
Tim Hunt added a comment - Yes, you are right. Reopening.
Hide
Tim Hunt added a comment -

You are right, the editing page has a specific need - namely a short display of whether the quiz is currently open, with the dates. So I just implemented some custom code again. I hope it is OK.

Show
Tim Hunt added a comment - You are right, the editing page has a specific need - namely a short display of whether the quiz is currently open, with the dates. So I just implemented some custom code again. I hope it is OK.
Hide
Olli Savolainen added a comment -

Thanks. It still does not fit on one line on Ubuntu/ff3/1024x768, though.

It would seem to me that information about when the quiz closes would be needed more rarely. The purpose of the status box is to show the current status, and when the quiz will close makes it easier to predict its behavior. Sorry for not specifying this more clearly in the first place.

Show
Olli Savolainen added a comment - Thanks. It still does not fit on one line on Ubuntu/ff3/1024x768, though. It would seem to me that information about when the quiz closes would be needed more rarely. The purpose of the status box is to show the current status, and when the quiz will close makes it easier to predict its behavior. Sorry for not specifying this more clearly in the first place.
Hide
Tim Hunt added a comment -

Ah, so actually, what we should do is just show the current status on the screen, but have the dates as a tooltip to explain?

Show
Tim Hunt added a comment - Ah, so actually, what we should do is just show the current status on the screen, but have the dates as a tooltip to explain?
Hide
Olli Savolainen added a comment -

I am just not succeeding in communicating here, am I!

I mean: keep it as it is, just drop the opening date which cannot really be considered status data (it will not really affect how the quiz functions), the information that the quiz is open at this moment is probably enough:

This quiz is open (closes: 26/11/10, 14:50)

Of course it would not hurt to add the opening date in a tooltip, but that is extra.

Show
Olli Savolainen added a comment - I am just not succeeding in communicating here, am I! I mean: keep it as it is, just drop the opening date which cannot really be considered status data (it will not really affect how the quiz functions), the information that the quiz is open at this moment is probably enough: This quiz is open (closes: 26/11/10, 14:50) Of course it would not hurt to add the opening date in a tooltip, but that is extra.
Hide
Tim Hunt added a comment -

Olli has just convinced me that we need the close date visible, not just in the tool tip.

Show
Tim Hunt added a comment - Olli has just convinced me that we need the close date visible, not just in the tool tip.
Hide
Olli Savolainen added a comment - - edited

Just for the record, this was the reasoning: for the status display of quiz, it is important that it does show when the quiz will close, since that helps make the behavior of the UI predictable - in contrast, the opening date does not have this nature of being status information.

Oh te tooltip is there already! Did not notice it. This is the problem: the text does not afford hovering so I am predicting most uses will never see that tooltip.

I am not sure what is the convention in Moodle, often a dashed underlining (css border-bottom: dashed or something?) is used for elements that have a tooltip but are not otherwise active (and are not icons/pictures). Even for users who do not understand what the cue means, this is learnable, i.e. they might go and try once they notice that there is something funny about the outlook of the element.

Show
Olli Savolainen added a comment - - edited Just for the record, this was the reasoning: for the status display of quiz, it is important that it does show when the quiz will close, since that helps make the behavior of the UI predictable - in contrast, the opening date does not have this nature of being status information. Oh te tooltip is there already! Did not notice it. This is the problem: the text does not afford hovering so I am predicting most uses will never see that tooltip. I am not sure what is the convention in Moodle, often a dashed underlining (css border-bottom: dashed or something?) is used for elements that have a tooltip but are not otherwise active (and are not icons/pictures). Even for users who do not understand what the cue means, this is learnable, i.e. they might go and try once they notice that there is something funny about the outlook of the element.
Hide
Tim Hunt added a comment -

Hopefully this is finally OK.

Show
Tim Hunt added a comment - Hopefully this is finally OK.
Hide
Olli Savolainen added a comment - - edited

Thanks.

I sense your frustration, but just for reference for future: Quiz open (closes 26/11/10, 14:50) the date format is not internationally very readable, since the user has to wonder about which order the numbers are, for example dd/mm/yy or mm/dd/yy. A better option may be Nov. 26, 2010, though it is a hint longer.

Show
Olli Savolainen added a comment - - edited Thanks. I sense your frustration, but just for reference for future: Quiz open (closes 26/11/10, 14:50) the date format is not internationally very readable, since the user has to wonder about which order the numbers are, for example dd/mm/yy or mm/dd/yy. A better option may be Nov. 26, 2010, though it is a hint longer.
Hide
Tim Hunt added a comment -

The format string is actually taken from the language pack, and there is a separate en_us pack. I thought the time was important in many situations, and I chose the shortest format that included it.

Show
Tim Hunt added a comment - The format string is actually taken from the language pack, and there is a separate en_us pack. I thought the time was important in many situations, and I chose the shortest format that included it.
Hide
Olli Savolainen added a comment -

Well, as long as we can trust people use the language packs that correspond to the locations of their schools, that may be okay. But it is useful also to be aware that in Moodle, the UI's set-format dates are mixed with user-made content, which may use another date for formats, and these different standards and the expectations for date format created by those standards can cause confusion.

Students may study from another country from where the Moodle they use is, and due to this they may have gotten used to another order of the units in the date format. So I just thought it might be ideal to use a format less prone to confusion, although if such confusion would raise problems, it would probably be an issue users will probably not complain as being the software's fault, but typically blame themselves for it.

Show
Olli Savolainen added a comment - Well, as long as we can trust people use the language packs that correspond to the locations of their schools, that may be okay. But it is useful also to be aware that in Moodle, the UI's set-format dates are mixed with user-made content, which may use another date for formats, and these different standards and the expectations for date format created by those standards can cause confusion. Students may study from another country from where the Moodle they use is, and due to this they may have gotten used to another order of the units in the date format. So I just thought it might be ideal to use a format less prone to confusion, although if such confusion would raise problems, it would probably be an issue users will probably not complain as being the software's fault, but typically blame themselves for it.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: