course details page doesn't correctly handle archived courses

Bug #1939994 reported by Galen Charlton
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
3.8
Fix Released
Medium
Unassigned

Bug Description

If you bring up the staff details page of an archived course, it doesn't display correctly:

- the 'Archive' button is active
- none of the visual indicators that the course is archived (e.g., the lock icon) are displayed

This turns out to be caused by how eg-fm-record-editor automatically converts -- inline -- boolean IDL fields to Javascript true/false (from 't'/'f') if it's passed a record. Because the course details page defaults to an inline eg-fm-record-editor, all of the template logic that's testing against 'currentCourse.is_archived() == 't' doesn't work.

A workaround is probably to pass a clone of currentCourse to the eg-fm-record-editor and ensure that currentCourse gets updated if a change is made via the editor.

A longer-term fix would be rethink what eg-fm-record-editor does to Boolean fields, or, more ambitiously, have the IDL service automatically take care of the Boolean conversions. Doing the latter would then mean updating a pile of Angular code to replace tests against 't' and 'f'.

Evergreen 3.6+

Galen Charlton (gmc)
Changed in evergreen:
importance: Undecided → Medium
Revision history for this message
Galen Charlton (gmc) wrote :

Bug 1939998 expresses the wish of having the IDL service and friends handle the conversion transparently.

Revision history for this message
Kyle Huckins (khuckins) wrote :
Changed in evergreen:
assignee: nobody → Kyle Huckins (khuckins)
assignee: Kyle Huckins (khuckins) → nobody
tags: added: pullrequest
Changed in evergreen:
assignee: nobody → Jane Sandberg (sandbergja)
Revision history for this message
Jane Sandberg (sandbergja) wrote :

The quick workaround gets the job done for sure! Thanks, Kyle!

Signoff here: user/sandbergja/lp1939994-course-details-archive-workaround-signoff

Changed in evergreen:
assignee: Jane Sandberg (sandbergja) → nobody
tags: added: signedoff
Changed in evergreen:
milestone: none → 3.9.1
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Pushed to 3.8 and above. Thanks, Kyle!

Changed in evergreen:
status: New → Fix Committed
no longer affects: evergreen/3.6
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.