Skip to content
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

Add audit_trial_length_days attribute to ChatSummaryView response. #143

Conversation

MichaelRoytman
Copy link
Member

@MichaelRoytman MichaelRoytman commented Dec 10, 2024

Description

Jira: COSMO-603

In order for the frontend to know the trial length of an audit trial, a audit_trial_length_days attribute is added to the ChatSummaryView response.

This property is supplied whether or not a learner has an audit trial. It represents the number of days in an audit trial as currently configured. It does not represent the number of days in the learner's current trial.

Copy link

github-actions bot commented Dec 10, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  learning_assistant
  __init__.py
  api.py
  utils.py
  views.py
Project Total  

This report was generated by python-coverage-comment-action

@MichaelRoytman MichaelRoytman marked this pull request as ready for review December 10, 2024 22:31
@MichaelRoytman MichaelRoytman force-pushed the micharltoytman/COSMO-603-audit-trial-length-setting-in-ChatSummaryView branch from ce1c0e7 to 017d025 Compare December 11, 2024 13:08
Copy link
Member

@varshamenon4 varshamenon4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a question but not blocking... lgtm! Approved!

@@ -112,3 +112,28 @@ def user_role_is_staff(role):
* bool: whether the user's role is that of a staff member
"""
return role in ('staff', 'instructor')


def get_audit_trial_length_days():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice idea to move this!

learning_assistant/views.py Outdated Show resolved Hide resolved
@@ -492,22 +492,24 @@ class GetAuditTrialExpirationDateTests(TestCase):
Test suite for get_audit_trial_expiration_date.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice updates to tests!

@MichaelRoytman MichaelRoytman force-pushed the micharltoytman/COSMO-603-audit-trial-length-setting-in-ChatSummaryView branch from 017d025 to badd952 Compare December 11, 2024 18:25
In order for the frontend to know the currently configured trial length of an audit trial in days, an audit_trial_length attribute is added to the ChatSummaryView response.

This property is supplied whether or not a learner has an audit trial. It represents the number of days in an audit trial as currently configured. It does not represent the number of days in the learner's current trial.
@MichaelRoytman MichaelRoytman force-pushed the micharltoytman/COSMO-603-audit-trial-length-setting-in-ChatSummaryView branch from badd952 to af9ee60 Compare December 11, 2024 18:52
@MichaelRoytman MichaelRoytman changed the title Add trial_length attribute to ChatSummaryView response. Add audit_trial_length_days attribute to ChatSummaryView response. Dec 11, 2024
Copy link
Member

@rijuma rijuma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MichaelRoytman MichaelRoytman merged commit 39d2f21 into main Dec 11, 2024
4 checks passed
@MichaelRoytman MichaelRoytman deleted the micharltoytman/COSMO-603-audit-trial-length-setting-in-ChatSummaryView branch December 11, 2024 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants