-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Feature idde #1928
Closed
Closed
Feature idde #1928
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
91075eb
nfs and testing artifacts
ebd2759
An individual due date extension may be set for a student for a
c8794b8
Ability to set due date extension for entire homework or exam.
8f57c59
Display correct dates in UI.
eb76cf1
Fix InvalidWriteError when viewing a combined open ended problem in t…
7f40071
Get extended due date to work with combined open ended module.
b1716f4
Use extended due date (unable to test FoldIt module).
083ab0d
More user friendly unit selection.
0eaafba
Dump due date extension data and reset due date extensions.
12579d1
Test closing date respects due date extension.
7e9cbac
Fix test broken by eb76cf117e1da3311c5aa6be3b308fcbb88021e9
087b539
Unit tests for due date extensions.
04b70a5
Don't gather units with due dates unless due date extension is active.
aff6970
Require user to actively choose a unit for due date extensions. User …
94ea0f9
Improved success message for due date extensions.
8ea1441
Merge MITx version of IDDE feature to mainstream edX.
37bc9ce
Change due date in beta dashboard.
28a2bce
Show students with due date extensions.
7834d82
Looks like they changed where the user's name is kept.
b95a991
Show due date extensions for student.
81b9c63
Merge in updates from master.
53325df
MITX_FEATURES has been renamed just FEATURES.
f5eb670
Fix test.
97c562b
Pep8
8e9138c
Pyling
4dc3a5c
Make sure all new code is i18n. Note that I did not make the new legacy
9d19986
Use dateutil.
1f00bf5
Use global due date if it is later than the individual 'extension' du…
757267c
Revert changes to legacy dashboard. IDDE feature will only be availa…
a164e4d
Refactor to be more functional/testable, use edX test fixtures per Sa…
b1c71db
Use student module directly to get at extended_due date in test.
4edbae7
Finish refactor.
685314e
Test API.
93292e5
Don't need a 'utils' module and a 'util' package. Rearrange and add …
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import mock | ||
import unittest | ||
|
||
from ..util import duedate | ||
|
||
|
||
class TestGetExtendedDueDate(unittest.TestCase): | ||
""" | ||
Test `get_extended_due_date` function. | ||
""" | ||
|
||
def call_fut(self, node): | ||
""" | ||
Call function under test. | ||
""" | ||
fut = duedate.get_extended_due_date | ||
return fut(node) | ||
|
||
def test_no_due_date(self): | ||
""" | ||
Test no due date. | ||
""" | ||
node = object() | ||
self.assertEqual(self.call_fut(node), None) | ||
|
||
def test_due_date_no_extension(self): | ||
""" | ||
Test due date without extension. | ||
""" | ||
node = mock.Mock(due=1, extended_due=None) | ||
self.assertEqual(self.call_fut(node), 1) | ||
|
||
def test_due_date_with_extension(self): | ||
""" | ||
Test due date with extension. | ||
""" | ||
node = mock.Mock(due=1, extended_due=2) | ||
self.assertEqual(self.call_fut(node), 2) | ||
|
||
def test_due_date_extension_is_earlier(self): | ||
""" | ||
Test due date with extension, but due date is later than extension. | ||
""" | ||
node = mock.Mock(due=2, extended_due=1) | ||
self.assertEqual(self.call_fut(node), 2) | ||
|
||
def test_extension_without_due_date(self): | ||
""" | ||
Test non-sensical extension without due date. | ||
""" | ||
node = mock.Mock(due=None, extended_due=1) | ||
self.assertEqual(self.call_fut(node), None) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
""" | ||
Miscellaneous utility functions. | ||
""" | ||
|
||
|
||
def get_extended_due_date(node): | ||
""" | ||
Gets the actual due date for the logged in student for this node, returning | ||
the extendeded due date if one has been granted and it is later than the | ||
global due date, otherwise returning the global due date for the unit. | ||
""" | ||
due_date = getattr(node, 'due', None) | ||
if not due_date: | ||
return due_date | ||
extended = getattr(node, 'extended_due', None) | ||
if not extended or extended < due_date: | ||
return due_date | ||
return extended |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this test is good, capa is a notoriously flaky part of our system, and I would like to see some other tests of this functionality. Does it do what's expected when we're past the extended due date too? What does the module claim its due date is when it's being presented to the user? Is that correct?