-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[frontend] Timezone and date format for date display and datetime pickers #988
base: master
Are you sure you want to change the base?
[frontend] Timezone and date format for date display and datetime pickers #988
Commits on May 7, 2024
-
[frontend/tasksets] Changing course accessibility init structure
Adding an "accessible_period" dict to define start and end period.
Configuration menu - View commit details
-
Copy full SHA for 2a24526 - Browse repository at this point
Copy the full SHA 2a24526View commit details -
[frontend/accessible_time] Changing AccessibleTime to new course/task…
… accessibility and registration Courses will now use a dictionnary for "accessible_period" and "registration_period" with a start and end element. Tasks will have an "accessibility_period" dict with an extra soft_end element.
Configuration menu - View commit details
-
Copy full SHA for 78449e8 - Browse repository at this point
Copy the full SHA 78449e8View commit details -
[frontend/course_admin] Adapting course settings form to new course a…
…ccessibility/registration structure
Configuration menu - View commit details
-
Copy full SHA for d8e22f8 - Browse repository at this point
Copy the full SHA d8e22f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for ae87e9d - Browse repository at this point
Copy the full SHA ae87e9dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f95381 - Browse repository at this point
Copy the full SHA 5f95381View commit details -
[frontend] Changing task accessibility data structure
Putting boolean and period dict inside one element : "accessibility": {"is_open": bool, "period": {"start": ..., "soft_end": ..., "end": ...}}. This way dispenser_data["config"] init in TableOfContents does not have to be changed.
Configuration menu - View commit details
-
Copy full SHA for 3437e2e - Browse repository at this point
Copy the full SHA 3437e2eView commit details -
[frontend] changing course acces and registration structure in yaml a…
…nd DB To keep the same structure as the task accessibility (dict with bool and period dict).
Configuration menu - View commit details
-
Copy full SHA for 98e8396 - Browse repository at this point
Copy the full SHA 98e8396View commit details -
[frontend/toc] fixing dates transformation before rendering toc.html
When initiating task_config from yaml we give a default value if there are missing values. When these values are dictionnaries they are actually all the same. Modifying one will modify all of them. Therefor we give an new instance at each default value to allow transformation into strings before rendering. Also had a mixup on the transformation itself.
Configuration menu - View commit details
-
Copy full SHA for 18a8daf - Browse repository at this point
Copy the full SHA 18a8dafView commit details -
[frontend] Storing dates in yaml files as datetime objects
Adding representer to use !!timestamp tag in yaml for datetime objects. Moving string transformation in datetime before changing taskset yaml file. Fixing datetime transformation to datetime before toc.html render (was permanently changing task_config).
Configuration menu - View commit details
-
Copy full SHA for 7ae3a78 - Browse repository at this point
Copy the full SHA 7ae3a78View commit details -
[frontend/accessible_time] Changing AccessibleTime init structure
Structure made in previous commits was not valid due to the way other method of this class work. Values for the dates could be None. Resulting in errors when comparing NoneType and datetime objects.
Configuration menu - View commit details
-
Copy full SHA for 0340138 - Browse repository at this point
Copy the full SHA 0340138View commit details -
[frontend] Storing datetime to string and the opposite in util files
Plus fixing bug : When deleting tasks in course edit, the missing tasks were added back (check_dispenser_data function) with default parameters. Default date parameter beeing None it wasn't correctly handled by the date conversion (dispenser_data_str_to_datetimes function).
Configuration menu - View commit details
-
Copy full SHA for 96231dd - Browse repository at this point
Copy the full SHA 96231ddView commit details -
[frontend] Adapting combinatory test to new AccessibleTime structure
+ fixing dispenser_config not passed to render
Configuration menu - View commit details
-
Copy full SHA for fa0750a - Browse repository at this point
Copy the full SHA fa0750aView commit details -
[frontend] Changing datetime to str and opposite
Changing their name and structure to allow transformation of strings and dates inside python list.
Configuration menu - View commit details
-
Copy full SHA for f9aee73 - Browse repository at this point
Copy the full SHA f9aee73View commit details -
[frontend/task_dispenser_admin] Allowing string dates in AccessibleTi…
…me for use in templates Was setting up AccessibleTime to use datetime objects for the period dates. But in the templates the task_config is parsed in JSON and it can't parse datetime objects. So whe transform the dates into strings before render. AccessibleTime needs to be able to handle string dates because of it's use in the templates.
Configuration menu - View commit details
-
Copy full SHA for 9c0473d - Browse repository at this point
Copy the full SHA 9c0473dView commit details -
[frontend/task_dispenser] Adapting Accessibility.get_value() to legac…
…y settings from task yaml Was checking the accessibility settings as they were using the new structure (in DB or taskset.yaml). But when checking if the tasks have legacy settings in their task.yaml it raises an exception because the legacy accessibility has the old structure.
Configuration menu - View commit details
-
Copy full SHA for 0df58a4 - Browse repository at this point
Copy the full SHA 0df58a4View commit details -
Â[frontend] Remove boolean from access data structure
The boolean "is_open" is not really used. Instead we now only use the start, soft_end and end date. We will differenciate the access types by setting some dates to a minimal or maximal value. For example : a task that is always open will have a minimal start date and maximal soft_end and end dates. In the custom acces mode, the dates are now optional. You can for example set an end date without setting a start date because it will automatically be set to the minimal value. The dates are stored in MongoDB as ISODate() objects and we will use datetime.min and datetime.max in python code for minimal and maximal values. However, MongoDB stores dates with a precision to the millisecond. Datetime objects have a precision to the nanosecond. Therefor we have some transformations when retrieving dates from mongoDB (in AccessibleTime).
Configuration menu - View commit details
-
Copy full SHA for 1c7ba27 - Browse repository at this point
Copy the full SHA 1c7ba27View commit details -
[common/custom_yaml] Changing timestamp representer to correctly tran…
…sform minimal date When using the timestamp representer to transform datetime objects into strings with "!!timestamp" tags, the date.min caused problems. The zeros in front of the 1 (0001-01-01 00:00:00) would not be considered when using datetime.strftime(). It would simply delete the zeros causing the date to not have the correct structure for the timestamp.
Configuration menu - View commit details
-
Copy full SHA for 2340aea - Browse repository at this point
Copy the full SHA 2340aeaView commit details -
[frontend/accessibility.html] Fix error occuring when changing date o…
…n already custom accessibility When changing a task accessibility (soft_end or end) that was already custom an error occured when saving the changes. It was because there was no check if the input value is an empty string.
Configuration menu - View commit details
-
Copy full SHA for fd25ba3 - Browse repository at this point
Copy the full SHA fd25ba3View commit details -
[frontend] Fixing max date milliseconds not written in yaml and DB
dict_data_str_to_datetime was not operating correctly because the strings were already transformed in datetime objects when checking for the data. Adapted AccessibleTime parse_date() and not using dict_data_str_to_datetime anymore.
Configuration menu - View commit details
-
Copy full SHA for ed56453 - Browse repository at this point
Copy the full SHA ed56453View commit details -
Configuration menu - View commit details
-
Copy full SHA for 19c0500 - Browse repository at this point
Copy the full SHA 19c0500View commit details -
[frontend] Changing accessible and registration structure when import…
…ing legacy courses + moving dict_data_str_to_datetime()
Configuration menu - View commit details
-
Copy full SHA for a789634 - Browse repository at this point
Copy the full SHA a789634View commit details -
[frontend] Changing task access structure during imports in task_disp…
…enser Changing access structure of tasks when importing in course template and task edit. Also moving change_access_structure, dict_data_str_to_datetime and dict_data_datetimes_to_str in util file in frontend directory.
Configuration menu - View commit details
-
Copy full SHA for 6ea6b02 - Browse repository at this point
Copy the full SHA 6ea6b02View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0fe5ec1 - Browse repository at this point
Copy the full SHA 0fe5ec1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d50870 - Browse repository at this point
Copy the full SHA 1d50870View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a7d03f - Browse repository at this point
Copy the full SHA 7a7d03fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a6b750 - Browse repository at this point
Copy the full SHA 7a6b750View commit details -
Configuration menu - View commit details
-
Copy full SHA for 39ce930 - Browse repository at this point
Copy the full SHA 39ce930View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0998b0b - Browse repository at this point
Copy the full SHA 0998b0bView commit details -
[frontend/accessibility] Fixing datetime picker cleaning during modal…
… feed Fixing previous commit
Configuration menu - View commit details
-
Copy full SHA for 96b2446 - Browse repository at this point
Copy the full SHA 96b2446View commit details -
[frontend/contest] Fixing constest plugin with new database date format
+ course_factory method used on taskset_factory
Configuration menu - View commit details
-
Copy full SHA for d25e5a0 - Browse repository at this point
Copy the full SHA d25e5a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for ea4df4e - Browse repository at this point
Copy the full SHA ea4df4eView commit details -
[frontend] Indicating a four digit year when transforming datetimes i…
…nto strings Had years with less than 4 digits not transformed into strings with years without leading "0" characters.
Configuration menu - View commit details
-
Copy full SHA for c6685c3 - Browse repository at this point
Copy the full SHA c6685c3View commit details -
[custom_yaml] refactoring formatting for datetime yaml representer
Simplifying 4 digit year check + removing empty string check because can only be applied to datetime objects
Configuration menu - View commit details
-
Copy full SHA for 9b5416d - Browse repository at this point
Copy the full SHA 9b5416dView commit details -
[frontend] Remove min and max hardcoded dates + storing without micro…
…seconds Storing as min and max attributes of AccessibleTime when possible. And using dates without microseconds
Configuration menu - View commit details
-
Copy full SHA for 9395f96 - Browse repository at this point
Copy the full SHA 9395f96View commit details -
Configuration menu - View commit details
-
Copy full SHA for 26867c7 - Browse repository at this point
Copy the full SHA 26867c7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 085fef4 - Browse repository at this point
Copy the full SHA 085fef4View commit details -
[frontend/accessible_time] Fixing legacy structure support
by adding boolean, empty string and None values
Configuration menu - View commit details
-
Copy full SHA for f1a3f4c - Browse repository at this point
Copy the full SHA f1a3f4cView commit details -
[frontend/accessible_time] Adapting course accessibility when no regi…
…stration date + fix None value and empty string
Configuration menu - View commit details
-
Copy full SHA for 96b0d45 - Browse repository at this point
Copy the full SHA 96b0d45View commit details -
[frontend/settings] Changing course accessibility structure when upda…
…ting settings instead of legacy migration
Configuration menu - View commit details
-
Copy full SHA for d56d8fd - Browse repository at this point
Copy the full SHA d56d8fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f7f40a - Browse repository at this point
Copy the full SHA 4f7f40aView commit details -
Revert "[frontend/task_list] Moving task access structure update to l…
…egacy update" This reverts commit d03a4e9.
Configuration menu - View commit details
-
Copy full SHA for b615b92 - Browse repository at this point
Copy the full SHA b615b92View commit details -
[frontend/task_dispenser] Updating task accessibility structure when …
…tasks settings update Previously done when importing legacy tasks
Configuration menu - View commit details
-
Copy full SHA for 26e0658 - Browse repository at this point
Copy the full SHA 26e0658View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5776d6e - Browse repository at this point
Copy the full SHA 5776d6eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ca8e595 - Browse repository at this point
Copy the full SHA ca8e595View commit details -
Configuration menu - View commit details
-
Copy full SHA for dafa720 - Browse repository at this point
Copy the full SHA dafa720View commit details
Commits on May 16, 2024
-
[frontend/accessible_time] Using self.min and max in legacy_string_st…
…ructure_to_dict()
Configuration menu - View commit details
-
Copy full SHA for 1a88ba2 - Browse repository at this point
Copy the full SHA 1a88ba2View commit details -
[frontend] Fixing forgotten code that needed to be removed
for removing accessibility structure from task import
Configuration menu - View commit details
-
Copy full SHA for 42811b0 - Browse repository at this point
Copy the full SHA 42811b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for fed730d - Browse repository at this point
Copy the full SHA fed730dView commit details
Commits on May 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 05daaf2 - Browse repository at this point
Copy the full SHA 05daaf2View commit details -
[frontend] Adapting combinatory test to new AccessibleTime structure
+ fixing dispenser_config not passed to render
Configuration menu - View commit details
-
Copy full SHA for 02937c1 - Browse repository at this point
Copy the full SHA 02937c1View commit details -
[frontend/task_dispenser_admin] Allowing string dates in AccessibleTi…
…me for use in templates Was setting up AccessibleTime to use datetime objects for the period dates. But in the templates the task_config is parsed in JSON and it can't parse datetime objects. So whe transform the dates into strings before render. AccessibleTime needs to be able to handle string dates because of it's use in the templates.
Configuration menu - View commit details
-
Copy full SHA for 672f4a0 - Browse repository at this point
Copy the full SHA 672f4a0View commit details -
Adding moment.js locales and moment-timezone.js
Locales were not working for datetimepickers because the loacales were not defined. moment-with-locales.min.js contains those locales.
Configuration menu - View commit details
-
Copy full SHA for 71515f6 - Browse repository at this point
Copy the full SHA 71515f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 772a5d3 - Browse repository at this point
Copy the full SHA 772a5d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 31c63d5 - Browse repository at this point
Copy the full SHA 31c63d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d2b22c - Browse repository at this point
Copy the full SHA 8d2b22cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b57cf4 - Browse repository at this point
Copy the full SHA 6b57cf4View commit details -
[frontend] Adding timeZone to last datetimepickers
Had a problem when retrieving taskid in accessibility.html. It is passed to the button on the opening of the modal. However they are two events triggered by that opening. The one where defaultDate are given to the datetimepicker triggers first. And the change in value triggers another event using taskid. Therefor taskid wass accessed before being passed as data.
Configuration menu - View commit details
-
Copy full SHA for 1a5218c - Browse repository at this point
Copy the full SHA 1a5218cView commit details -
[frontend/user_manager] Adding timezone data into UserManager to be m…
…anaged and stored in DB
Configuration menu - View commit details
-
Copy full SHA for 974aa11 - Browse repository at this point
Copy the full SHA 974aa11View commit details -
Configuration menu - View commit details
-
Copy full SHA for f29900e - Browse repository at this point
Copy the full SHA f29900eView commit details -
[frontend/course_admin] Adding reverse timezone transformation before…
… form submit Before submitting the form the dates in datetime pickers are transformed from the user's timezone to UTC (timezone used for the server dates).
Configuration menu - View commit details
-
Copy full SHA for ae61c79 - Browse repository at this point
Copy the full SHA ae61c79View commit details -
[frontend/accessible_time] Using UTC dates during accessibility check
Indicating the dates received are UTC and retrieving UTC datetime.now() for correct comparison.
Configuration menu - View commit details
-
Copy full SHA for be4cc2a - Browse repository at this point
Copy the full SHA be4cc2aView commit details -
[frontend/accessible_time] Adding min and max values based on utc whe…
…n checking accessibility
Configuration menu - View commit details
-
Copy full SHA for 4b6fc17 - Browse repository at this point
Copy the full SHA 4b6fc17View commit details -
[frontend/accessibility] Fixing taskid use in accessibility.html
Error previously fixed on access_tructure branch but reapeared due to bad rebase.
Configuration menu - View commit details
-
Copy full SHA for 352f3e1 - Browse repository at this point
Copy the full SHA 352f3e1View commit details -
[frontend/accessibility] Applying timezone to task accessibility edit
Because the modal is only one HTML code block we update with new data, datetime pickers need to be destroyed are recreated with the new defaultDate. This is the only option found to apply the timezone. Changing the date with datetimepicker('date', ...) does not take timezone into consideration. Recreating the datetime picker triggers the change event listeners. Added a 'ignore-change' value to pickers to avoid updating the dispenser_config on modal feed.
Configuration menu - View commit details
-
Copy full SHA for 32f366f - Browse repository at this point
Copy the full SHA 32f366fView commit details -
[frontend/accessibility] Applying timezone handling for grouped edit …
…datetime pickers
Configuration menu - View commit details
-
Copy full SHA for 13411ad - Browse repository at this point
Copy the full SHA 13411adView commit details -
[frontend/accessibility] Fixing grouped custom edit changes without c…
…hecking custom During grouped edit one could select dates and apply the changes without selecting the "custom" radio check.
Configuration menu - View commit details
-
Copy full SHA for 62b6258 - Browse repository at this point
Copy the full SHA 62b6258View commit details -
[frontend/submission_query] Applying timezone to datetime pickers in …
…submissions query
Configuration menu - View commit details
-
Copy full SHA for 9de79ca - Browse repository at this point
Copy the full SHA 9de79caView commit details -
[frontend/settings] Fixing empty datetime picker sends creation date
When using viewDate to retrieve date on empty picker it sent the creation date of that picker. Using date instead.
Configuration menu - View commit details
-
Copy full SHA for 2537a09 - Browse repository at this point
Copy the full SHA 2537a09View commit details -
[frontend/accessibility] Changing 'date' picker option instead of des…
…troying each time it needs change
Configuration menu - View commit details
-
Copy full SHA for 590ddff - Browse repository at this point
Copy the full SHA 590ddffView commit details -
Configuration menu - View commit details
-
Copy full SHA for e855325 - Browse repository at this point
Copy the full SHA e855325View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5af386a - Browse repository at this point
Copy the full SHA 5af386aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 270f834 - Browse repository at this point
Copy the full SHA 270f834View commit details -
[frontend/accessibility] Adapting accessibility feed and individual c…
…hange datetime pickers to Flatpickr Managed to delete event listeners on individual date pickers. Contrary to Tempus Dominus. The change through picker and through input change are both triggered by one event listener.
Configuration menu - View commit details
-
Copy full SHA for f763c67 - Browse repository at this point
Copy the full SHA f763c67View commit details -
Configuration menu - View commit details
-
Copy full SHA for 15d1def - Browse repository at this point
Copy the full SHA 15d1defView commit details -
[frontend/submissions_query] Adapting submissions query to use flatpi…
…ckr as datetime picker
Configuration menu - View commit details
-
Copy full SHA for 7b386dc - Browse repository at this point
Copy the full SHA 7b386dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for b8cfd82 - Browse repository at this point
Copy the full SHA b8cfd82View commit details -
Configuration menu - View commit details
-
Copy full SHA for ffb9151 - Browse repository at this point
Copy the full SHA ffb9151View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e2a37b - Browse repository at this point
Copy the full SHA 9e2a37bView commit details -
Configuration menu - View commit details
-
Copy full SHA for e65edd7 - Browse repository at this point
Copy the full SHA e65edd7View commit details -
[frontend/upcoming_tasks] Fixing outdated tasks and course method cal…
…led on taskset object We were storing still open courses as they were already past due.
Configuration menu - View commit details
-
Copy full SHA for ce0959e - Browse repository at this point
Copy the full SHA ce0959eView commit details -
Configuration menu - View commit details
-
Copy full SHA for d630f82 - Browse repository at this point
Copy the full SHA d630f82View commit details -
[frontend/statistics] Fixing missing timezone in datetime key
Using datetime objects as dictionnary keys will change depending on if a timezone was given. If a timezone is given the key will have an offset in addition to the date and time. In our case, adding the utc timezone to the c key solves the problem.
Configuration menu - View commit details
-
Copy full SHA for b6b5fb0 - Browse repository at this point
Copy the full SHA b6b5fb0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 07cbe29 - Browse repository at this point
Copy the full SHA 07cbe29View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7379c7b - Browse repository at this point
Copy the full SHA 7379c7bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 23bfd63 - Browse repository at this point
Copy the full SHA 23bfd63View commit details -
[frontend] Fixing datetime picker default values
Was transforming moment objects to Javascript Date objects. However these Date objects do not hold timezone data and define the date with a local timezone.
Configuration menu - View commit details
-
Copy full SHA for f081fbd - Browse repository at this point
Copy the full SHA f081fbdView commit details -
Configuration menu - View commit details
-
Copy full SHA for ebda52e - Browse repository at this point
Copy the full SHA ebda52eView commit details -
[frontend/scoreboard] Add missing class and timezone attribute to ada…
…pt scoreboard plugin to user's timezone
Configuration menu - View commit details
-
Copy full SHA for a007679 - Browse repository at this point
Copy the full SHA a007679View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8949c4a - Browse repository at this point
Copy the full SHA 8949c4aView commit details -
Configuration menu - View commit details
-
Copy full SHA for f9d3741 - Browse repository at this point
Copy the full SHA f9d3741View commit details -
[frontend] Changing available_datetime_formats structure
Exchanging keys and values for easier manipulation in html.
Configuration menu - View commit details
-
Copy full SHA for f181093 - Browse repository at this point
Copy the full SHA f181093View commit details -
Configuration menu - View commit details
-
Copy full SHA for f3727f5 - Browse repository at this point
Copy the full SHA f3727f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ff729c - Browse repository at this point
Copy the full SHA 1ff729cView commit details -
Configuration menu - View commit details
-
Copy full SHA for a14c18f - Browse repository at this point
Copy the full SHA a14c18fView commit details -
Configuration menu - View commit details
-
Copy full SHA for ae572b6 - Browse repository at this point
Copy the full SHA ae572b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2065f77 - Browse repository at this point
Copy the full SHA 2065f77View commit details -
[frontend/accessibility] Applying date format to displayed accessibil…
…ity under each task
Configuration menu - View commit details
-
Copy full SHA for 965af5b - Browse repository at this point
Copy the full SHA 965af5bView commit details -
Configuration menu - View commit details
-
Copy full SHA for ee23a48 - Browse repository at this point
Copy the full SHA ee23a48View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e5ef76 - Browse repository at this point
Copy the full SHA 1e5ef76View commit details -
[frontend/accessible_time] Applying utc timezone directly in parse_da…
…te() and adapt_database_date() to fix test_parsable_text tests + fixes (not applying timezone to min and max dates)
Configuration menu - View commit details
-
Copy full SHA for 282a1db - Browse repository at this point
Copy the full SHA 282a1dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for d6ea6f5 - Browse repository at this point
Copy the full SHA d6ea6f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8ba784c - Browse repository at this point
Copy the full SHA 8ba784cView commit details -
[frontend/accessibility] Applying utc timezone to min and max and fix…
… string handling in accessibility.html
Configuration menu - View commit details
-
Copy full SHA for 6ae1b50 - Browse repository at this point
Copy the full SHA 6ae1b50View commit details -
Configuration menu - View commit details
-
Copy full SHA for cf2955c - Browse repository at this point
Copy the full SHA cf2955cView commit details