Moodle

New formslib element type duration for periods of time

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: Administration
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

This could be used, for example, for the quiz time limit.

Like with dateselector, we need the option to have an 'enabled' checkbox.

Activity

Hide
Tim Hunt added a comment -

Proposed design:

Time limit: [_______] [ Minutes |v]

That is, a text box to type a number into, with a unit dropdown.

The text box will accept fractional numbers, so you can enter 1.5 hours.

The value returned to PHP is always in seconds.

When the form is displayed, the time will be converted to the highest unit that does not cause a fraction, so
3600 -> 1 hour
5400 -> 90 minutes
5401 -> 5401 seconds
etc.

Show
Tim Hunt added a comment - Proposed design: Time limit: [_______] [ Minutes |v] That is, a text box to type a number into, with a unit dropdown. The text box will accept fractional numbers, so you can enter 1.5 hours. The value returned to PHP is always in seconds. When the form is displayed, the time will be converted to the highest unit that does not cause a fraction, so 3600 -> 1 hour 5400 -> 90 minutes 5401 -> 5401 seconds etc.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: