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
3de7c3a3
Commit
3de7c3a3
authored
Sep 01, 2012
by
kimth
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into kimth/mark-graded
parents
de9c981a
3f07e5fd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
4 deletions
+17
-4
common/djangoapps/student/views.py
+5
-1
lms/djangoapps/courseware/views.py
+5
-1
lms/templates/dashboard.html
+3
-1
lms/templates/portal/course_about.html
+4
-1
No files found.
common/djangoapps/student/views.py
View file @
3de7c3a3
...
...
@@ -131,10 +131,14 @@ def dashboard(request):
staff_access
=
True
errored_courses
=
modulestore
()
.
get_errored_courses
()
show_courseware_links_for
=
frozenset
(
course
.
id
for
course
in
courses
if
has_access
(
request
.
user
,
course
,
'load'
))
context
=
{
'courses'
:
courses
,
'message'
:
message
,
'staff_access'
:
staff_access
,
'errored_courses'
:
errored_courses
,}
'errored_courses'
:
errored_courses
,
'show_courseware_links_for'
:
show_courseware_links_for
}
return
render_to_response
(
'dashboard.html'
,
context
)
...
...
lms/djangoapps/courseware/views.py
View file @
3de7c3a3
...
...
@@ -264,7 +264,11 @@ def registered_for_course(course, user):
def
course_about
(
request
,
course_id
):
course
=
get_course_with_access
(
request
.
user
,
course_id
,
'see_exists'
)
registered
=
registered_for_course
(
course
,
request
.
user
)
return
render_to_response
(
'portal/course_about.html'
,
{
'course'
:
course
,
'registered'
:
registered
})
show_courseware_link
=
has_access
(
request
.
user
,
course
,
'load'
)
return
render_to_response
(
'portal/course_about.html'
,
{
'course'
:
course
,
'registered'
:
registered
,
'show_courseware_link'
:
show_courseware_link
})
@ensure_csrf_cookie
...
...
lms/templates/dashboard.html
View file @
3de7c3a3
...
...
@@ -87,7 +87,9 @@
<section
class=
"course-status"
>
<p>
Class Starts -
<span>
${course.start_date_text}
</span></p>
</section>
<p
class=
"enter-course"
>
View Courseware
</p>
% if course.id in show_courseware_links_for:
<p
class=
"enter-course"
>
View Courseware
</p>
% endif
</section>
</a>
</article>
...
...
lms/templates/portal/course_about.html
View file @
3de7c3a3
...
...
@@ -74,7 +74,10 @@
%if show_link:
<a
href=
"${course_target}"
>
%endif
<span
class=
"register disabled"
>
You are registered for this course (${course.number})
</span>
<strong>
View Courseware
</strong>
<span
class=
"register disabled"
>
You are registered for this course (${course.number})
</span>
% if show_courseware_link:
<strong>
View Courseware
</strong>
% endif
%if show_link:
</a>
%endif
...
...
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