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

feat: add support for due dates #24

Merged
merged 5 commits into from
Oct 13, 2023

Conversation

Ian2012
Copy link
Contributor

@Ian2012 Ian2012 commented Sep 26, 2023

Description

This PR makes the user unable to store their progress in the XBlock if the due date has passed.

Testing instructions

  1. Set the due date for a subsection with an h5p content to any date in the past
    image
  2. As a student, verify he can interact with the h5p content but it's progress and grades are not stored

After:
image

@Ian2012 Ian2012 force-pushed the cag/due-date-support branch 2 times, most recently from 1ae1ed7 to 3ebc47f Compare September 26, 2023 21:23
"""
Return True if the due date has passed.
"""
due = self.due
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is a new due variable created?

@@ -289,12 +289,20 @@ def result_handler(self, data, suffix=''):
Handler to injest results when h5p content triggers completion or rescorable events
"""
save_completion, save_score = False, False

Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove the trailing whitespace

@Ian2012 Ian2012 force-pushed the cag/due-date-support branch 2 times, most recently from d96137a to bdbfcb8 Compare September 27, 2023 15:44
@ziafazal
Copy link
Contributor

@Ian2012 acceptance tests on you PR are failing could you please rebase it with master?

@Ian2012 Ian2012 force-pushed the cag/due-date-support branch 4 times, most recently from 44d82d2 to fa7009c Compare October 11, 2023 19:33
Comment on lines +11 to +18
{% if h5pblock.is_past_due %}
<div class='h5p-warning'>
<h3>{% trans "The due date for this subsection has passed. Your response will be recorded, but not graded." %}<h3>
</div>
{% endif %}
Copy link
Contributor

Choose a reason for hiding this comment

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

should we update translations?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good! I see you folks did it already. Thanks!

@ziafazal
Copy link
Contributor

@Ian2012 are good to merge this one?

@Ian2012
Copy link
Contributor Author

Ian2012 commented Oct 13, 2023

@ziafazal yes, it's

Copy link
Contributor

@ziafazal ziafazal left a comment

Choose a reason for hiding this comment

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

👍

@ziafazal ziafazal merged commit 9879e1a into edly-io:master Oct 13, 2023
1 check passed
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.

4 participants