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
35f9fc59
Commit
35f9fc59
authored
Oct 10, 2014
by
Sarina Canelake
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5423 from mitocw/bdero/fix-gitlog-focused-error
Added handling in gitlog template for missing import logs
parents
02bfe039
c571a2a0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
1 deletions
+37
-1
lms/djangoapps/dashboard/tests/test_sysadmin.py
+27
-0
lms/templates/sysadmin_dashboard_gitlogs.html
+10
-1
No files found.
lms/djangoapps/dashboard/tests/test_sysadmin.py
View file @
35f9fc59
...
...
@@ -552,6 +552,33 @@ class TestSysAdminMongoCourseImport(SysadminBaseTestCase):
'course_id'
:
'Not/Real/Testing'
}))
self
.
assertEqual
(
404
,
response
.
status_code
)
def
test_gitlog_no_logs
(
self
):
"""
Make sure the template behaves well when rendered despite there not being any logs.
(This is for courses imported using methods other than the git_add_course command)
"""
self
.
_setstaff_login
()
self
.
_mkdir
(
getattr
(
settings
,
'GIT_REPO_DIR'
))
self
.
_add_edx4edx
()
# Simulate a lack of git import logs
import_logs
=
CourseImportLog
.
objects
.
all
()
import_logs
.
delete
()
response
=
self
.
client
.
get
(
reverse
(
'gitlogs_detail'
,
kwargs
=
{
'course_id'
:
'MITx/edx4edx/edx4edx'
})
)
self
.
assertIn
(
'No git import logs have been recorded for this course.'
,
response
.
content
)
self
.
_rm_edx4edx
()
def
test_gitlog_courseteam_access
(
self
):
"""
Ensure course team users are allowed to access only their own course.
...
...
lms/templates/sysadmin_dashboard_gitlogs.html
View file @
35f9fc59
...
...
@@ -97,6 +97,8 @@ textarea {
logs =
cilset[:10]
else:
logs =
cilset[:2]
cil =
None
%
>
% for cil in logs:
<
%
...
...
@@ -114,7 +116,14 @@ textarea {
%if course_id is not None:
<tr>
<td
colspan=
"3"
>
<pre>
${cil.import_log | h}
</pre>
<pre>
%if cil is not None:
${cil.import_log | h}
%else:
## Translators: git is a version-control system; see http://git-scm.com/about
${_('No git import logs have been recorded for this course.')}
%endif
</pre>
</td>
</tr>
%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