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
457afaae
Commit
457afaae
authored
Jan 22, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Making tab render properly for open ended notifications
parent
f47c431f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
lms/djangoapps/courseware/tabs.py
+1
-0
lms/djangoapps/open_ended_grading/views.py
+18
-1
lms/templates/open_ended_problems/open_ended_problems.html
+1
-1
No files found.
lms/djangoapps/courseware/tabs.py
View file @
457afaae
...
...
@@ -181,6 +181,7 @@ VALID_TAB_TYPES = {
'static_tab'
:
TabImpl
(
key_checker
([
'name'
,
'url_slug'
]),
_static_tab
),
'peer_grading'
:
TabImpl
(
null_validator
,
_peer_grading
),
'staff_grading'
:
TabImpl
(
null_validator
,
_staff_grading
),
'open_ended'
:
TabImpl
(
null_validator
,
_combined_open_ended_grading
),
}
...
...
lms/djangoapps/open_ended_grading/views.py
View file @
457afaae
...
...
@@ -22,6 +22,9 @@ from student.models import unique_id_for_user
import
open_ended_util
import
open_ended_notifications
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore
import
search
log
=
logging
.
getLogger
(
__name__
)
template_imports
=
{
'urllib'
:
urllib
}
...
...
@@ -137,6 +140,8 @@ def student_problem_list(request, course_id):
success
=
False
error_text
=
""
problem_list
=
[]
base_course_url
=
reverse
(
'courses'
)
try
:
problem_list_json
=
controller_qs
.
get_grading_status_list
(
course_id
,
unique_id_for_user
(
request
.
user
))
problem_list_dict
=
json
.
loads
(
problem_list_json
)
...
...
@@ -146,6 +151,19 @@ def student_problem_list(request, course_id):
problem_list
=
problem_list_dict
[
'problem_list'
]
for
i
in
xrange
(
0
,
len
(
problem_list
)):
problem_url_parts
=
search
.
path_to_location
(
modulestore
(),
course
.
id
,
problem_list
[
i
][
'location'
])
log
.
debug
(
problem_url_parts
)
problem_url
=
base_course_url
+
"/"
for
z
in
xrange
(
0
,
len
(
problem_url_parts
)):
part
=
problem_url_parts
[
z
]
if
part
is
not
None
:
if
z
==
1
:
problem_url
+=
"courseware/"
problem_url
+=
part
+
"/"
problem_list
[
i
]
.
update
({
'actual_url'
:
problem_url
})
except
GradingServiceError
:
error_text
=
"Error occured while contacting the grading service"
success
=
False
...
...
@@ -171,7 +189,6 @@ def combined_notifications(request, course_id):
course
=
get_course_with_access
(
request
.
user
,
course_id
,
'load'
)
user
=
request
.
user
notifications
=
open_ended_notifications
.
combined_notifications
(
course
,
user
)
log
.
debug
(
notifications
)
response
=
notifications
[
'response'
]
notification_tuples
=
open_ended_notifications
.
NOTIFICATION_TYPES
...
...
lms/templates/open_ended_problems/open_ended_problems.html
View file @
457afaae
...
...
@@ -26,7 +26,7 @@
<ul
class=
"problem-list"
>
%for problem in problem_list:
<li>
<a
href=
"${
ajax_url}problem?location=${problem['location
']}"
>
${problem['problem_name']} (${problem['state']} , ${problem['grader_type']} )
</a>
<a
href=
"${
problem['actual_url
']}"
>
${problem['problem_name']} (${problem['state']} , ${problem['grader_type']} )
</a>
</li>
%endfor
</ul>
...
...
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