Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
8b8c1dbe
Commit
8b8c1dbe
authored
Jan 22, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix query error
parent
3531bce7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
lms/djangoapps/open_ended_grading/open_ended_notifications.py
+7
-2
No files found.
lms/djangoapps/open_ended_grading/open_ended_notifications.py
View file @
8b8c1dbe
...
...
@@ -66,9 +66,14 @@ def combined_notifications(course, user):
course_id
=
course
.
id
min_time_to_query
=
user
.
last_login
last_module_seen
=
StudentModule
.
objects
.
filter
(
student
=
user
,
course_id
=
course_id
,
modified__gt
=
min_time_to_query
)
.
values
(
'modified'
)
.
order_by
(
'-modified'
)[
0
]
last_module_seen
=
StudentModule
.
objects
.
filter
(
student
=
user
,
course_id
=
course_id
,
modified__gt
=
min_time_to_query
)
.
values
(
'modified'
)
.
order_by
(
'-modified'
)
last_module_seen_count
=
last_module_seen
.
count
()
if
last_module_seen_count
>
0
:
last_time_viewed
=
last_module_seen
[
0
][
'modified'
]
else
:
last_time_viewed
=
user
.
last_login
last_time_viewed
=
last_module_seen
[
'modified'
]
pending_grading
=
False
img_path
=
""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment