[x] Screenshots and design review for any changes that affect layout or styling
[x] Desktop screenshots
[ ] Mobile width screenshots
[x] Migrations
[x] Migration is backwards-compatible with current production code
[x] Testing
[x] Code is tested
[x] Changes have been manually tested
[ ] Settings
[ ] New settings are documented and present in app.json
[ ] New settings have reasonable development defaults, if applicable
What are the relevant tickets?
5250
What's this PR do?
Adds a new field is_active in MicromastersProgramCommendation.
Validates the existing Program letters based on program completion and marks them as active or inactive.
Updates the logic to serve the program letters on basis of is_active through the URL.
Updates the logic on the dashboard to show View Program Letter link only if Program letter is active.
How should this be manually tested?
Before moving to this PR make sure that you have some program letters in your local setup, Create a couple for which the user has completed the program, and also create some letters for which the program isn't complete
Now, Move to this PR, And see that the migration is successful and the Program letters that don't have completed the program. are marked as is_active=False (Verify this behavior)
Now open the dashboard for this Program and confirm that you only see View Program Letter link for active letters(MicromastersProgramCommendation)
Now open a program letter for an active letter it should be opened in a link something like http://mm.odl.local:8079/letter/program/0b91f501-0583-4171-ac8e-7b82a4cf3c59
Now mark the above letter as inactive, Make sure that there is no link(View Program Letter) on the dashboard, and also opening the letter directly from URL(e.g. http://mm.odl.local:8079/letter/program/0b91f501-0583-4171-ac8e-7b82a4cf3c59) throws 404.
Where should the reviewer start?
(Optional)
Any background context you want to provide?
(Optional)
Screenshots (if appropriate)
When a program letter is active(Ignore the completion of courses, i created this manually):
Pre-Flight checklist
app.json
What are the relevant tickets?
5250
What's this PR do?
is_active
inMicromastersProgramCommendation
.active or inactive
.is_active
through the URL.View Program Letter
link only if Program letter is active.How should this be manually tested?
is_active=False
(Verify this behavior)View Program Letter
link for active letters(MicromastersProgramCommendation
)http://mm.odl.local:8079/letter/program/0b91f501-0583-4171-ac8e-7b82a4cf3c59
View Program Letter
) on the dashboard, and also opening the letter directly from URL(e.g.http://mm.odl.local:8079/letter/program/0b91f501-0583-4171-ac8e-7b82a4cf3c59
) throws 404.Where should the reviewer start?
(Optional)
Any background context you want to provide?
(Optional)
Screenshots (if appropriate)
When a program letter is active(Ignore the completion of courses, i created this manually):
When a program letter is Inactive: