Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Commit

Permalink
fix: Remove timestamp's timezone from the get_autograded_students con…
Browse files Browse the repository at this point in the history
…ditional (#21)
  • Loading branch information
jgwerner authored Dec 15, 2020
1 parent 33b0898 commit 5b59842
Show file tree
Hide file tree
Showing 24 changed files with 6,298 additions and 4,603 deletions.
3 changes: 1 addition & 2 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pytest>=4.5
pytest>=4.5,<6.0.0
pytest-cov
pytest-rerunfailures
pytest-xdist==1.34.0
Expand All @@ -12,4 +12,3 @@ codecov
nbval
requests-mock
wheel

8 changes: 6 additions & 2 deletions nbgrader/alembic/versions/167914646830_added_task_cells.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@


def _get_or_create_table(*args):
try:
ctx = op.get_context()
con = op.get_bind()
table_exists = ctx.dialect.has_table(con.engine, args[0])

if not table_exists:
table = op.create_table(*args)
except sa.exc.OperationalError:
else:
table = sa.sql.table(*args)
return table

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@


def _get_or_create_table(*args):
try:
ctx = op.get_context()
con = op.get_bind()
table_exists = ctx.dialect.has_table(con.engine, args[0])

if not table_exists:
table = op.create_table(*args)
except sa.exc.OperationalError:
else:
table = sa.sql.table(*args)
return table

Expand Down
2 changes: 1 addition & 1 deletion nbgrader/apps/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def get_autograded_students(self, assignment_id):
# newer than the autograded timestamp
submitted_timestamp = self.get_submitted_timestamp(assignment_id, student_id)
autograded_timestamp = ag_timestamps[student_id]
if submitted_timestamp != autograded_timestamp:
if submitted_timestamp != autograded_timestamp.replace(tzinfo=None):
continue

students.add(student_id)
Expand Down
1 change: 1 addition & 0 deletions nbgrader/preprocessors/clearsolutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class ClearSolutions(NbGraderPreprocessor):
dict(python="# YOUR CODE HERE\nraise NotImplementedError()",
matlab="% YOUR CODE HERE\nerror('No Answer Given!')",
octave="% YOUR CODE HERE\nerror('No Answer Given!')",
sas="/* YOUR CODE HERE */\n %notImplemented;",
java="// YOUR CODE HERE"),
help="The code snippet that will replace code solutions"
).tag(config=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ jQuery Component

Shim [repository](https://github.com/components/jquery) for the [jQuery](http://jquery.com).

If you're looking for jquery-migrate: It got it's [own repository](https://github.com/components/jquery-migrate) since jQuery v3.0.0.

Package Managers
----------------

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
{
"name": "jquery",
"version": "2.1.3",
"description": "jQuery component",
"keywords": [
"jquery",
"component"
],
"main": "jquery.js",
"license": "MIT"
"name": "jquery",
"version": "3.5.1",
"description": "jQuery component",
"license": "MIT",
"keywords": [
"jquery",
"component"
],
"main": "jquery.js",
"ignore": [
"component.json",
"package.json",
"composer.json"
]
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
{
"name": "jquery",
"repo": "components/jquery",
"version": "2.1.3",
"description": "jQuery component",
"keywords": [
"jquery",
"component"
],
"main": "jquery.js",
"scripts": [
"jquery.js"
],
"license": "MIT"
"name": "jquery",
"repo": "components/jquery",
"version": "3.5.1",
"description": "jQuery component",
"license": "MIT",
"keywords": [
"jquery",
"component"
],
"main": "jquery.js",
"scripts": [
"jquery.js",
"jquery.min.js",
"jquery.slim.js",
"jquery.slim.min.js"
],
"files": [
"jquery.min.map",
"jquery.slim.min.map"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
"license": "MIT",
"support": {
"irc": "irc://irc.freenode.org/jquery",
"issues": "http://bugs.jquery.com",
"issues": "https://github.com/jquery/jquery/issues",
"forum": "http://forum.jquery.com",
"wiki": "http://docs.jquery.com/",
"source": "https://github.com/jquery/jquery"
},
"authors": [
{
"name": "John Resig",
"email": "jeresig@gmail.com"
"name": "JS Foundation and other contributors",
"url": "https://github.com/jquery/jquery/blob/master/AUTHORS.txt"
}
],
"extra": {
Expand All @@ -25,8 +25,9 @@
"files": [
"jquery.min.js",
"jquery.min.map",
"jquery-migrate.js",
"jquery-migrate.min.js"
"jquery.slim.js",
"jquery.slim.min.js",
"jquery.slim.min.map"
]
}
}
Expand Down
Loading

0 comments on commit 5b59842

Please sign in to comment.