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
5dbfd108
Commit
5dbfd108
authored
Aug 01, 2014
by
Alexander Kryklia
Committed by
cahrens
Aug 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add styling to due date and grading format of subsection.
parent
8b78eefe
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
22 deletions
+23
-22
cms/static/js/spec/views/pages/course_outline_spec.js
+7
-7
cms/templates/js/course-outline.underscore
+12
-11
common/test/acceptance/pages/studio/overview.py
+2
-2
common/test/acceptance/tests/test_studio_outline.py
+2
-2
No files found.
cms/static/js/spec/views/pages/course_outline_spec.js
View file @
5dbfd108
...
@@ -523,10 +523,10 @@ define(["jquery", "js/spec_helpers/create_sinon", "js/spec_helpers/view_helpers"
...
@@ -523,10 +523,10 @@ define(["jquery", "js/spec_helpers/create_sinon", "js/spec_helpers/view_helpers"
create_sinon
.
respondWithJson
(
requests
,
mockServerValuesJson
);
create_sinon
.
respondWithJson
(
requests
,
mockServerValuesJson
);
expect
(
$
(
".outline-subsection .status-release-value"
)).
toContainText
(
"Jul 09, 2014 at 00:00 UTC"
);
expect
(
$
(
".outline-subsection .status-release-value"
)).
toContainText
(
"Jul 09, 2014 at 00:00 UTC"
);
expect
(
$
(
".outline-subsection .
due-date"
)).
toContainText
(
"Due dat
e: Jul 10, 2014 at 00:00 UTC"
);
expect
(
$
(
".outline-subsection .
status-grading-date"
)).
toContainText
(
"Du
e: Jul 10, 2014 at 00:00 UTC"
);
expect
(
$
(
".outline-subsection .
policy"
)).
toContainText
(
"Policy:
Lab"
);
expect
(
$
(
".outline-subsection .
status-grading-value"
)).
toContainText
(
"
Lab"
);
expect
(
$
(
".outline-item .outline-subsection .
policy"
)).
toContainText
(
"Policy:
Lab"
);
expect
(
$
(
".outline-item .outline-subsection .
status-grading-value"
)).
toContainText
(
"
Lab"
);
outlinePage
.
$
(
'.outline-item .outline-subsection .configure-button'
).
click
();
outlinePage
.
$
(
'.outline-item .outline-subsection .configure-button'
).
click
();
expect
(
$
(
"#start_date"
).
val
()).
toBe
(
'7/9/2014'
);
expect
(
$
(
"#start_date"
).
val
()).
toBe
(
'7/9/2014'
);
expect
(
$
(
"#due_date"
).
val
()).
toBe
(
'7/10/2014'
);
expect
(
$
(
"#due_date"
).
val
()).
toBe
(
'7/10/2014'
);
...
@@ -545,8 +545,8 @@ define(["jquery", "js/spec_helpers/create_sinon", "js/spec_helpers/view_helpers"
...
@@ -545,8 +545,8 @@ define(["jquery", "js/spec_helpers/create_sinon", "js/spec_helpers/view_helpers"
create_sinon
.
respondWithJson
(
requests
,
mockServerValuesJson
);
create_sinon
.
respondWithJson
(
requests
,
mockServerValuesJson
);
expect
(
$
(
".outline-subsection .status-release-value"
)).
toContainText
(
"Jul 09, 2014 at 00:00 UTC"
);
expect
(
$
(
".outline-subsection .status-release-value"
)).
toContainText
(
"Jul 09, 2014 at 00:00 UTC"
);
expect
(
$
(
".outline-subsection .
due-date"
)).
toContainText
(
"Due dat
e: Jul 10, 2014 at 00:00 UTC"
);
expect
(
$
(
".outline-subsection .
status-grading-date"
)).
toContainText
(
"Du
e: Jul 10, 2014 at 00:00 UTC"
);
expect
(
$
(
".outline-subsection .
policy"
)).
toContainText
(
"Policy:
Lab"
);
expect
(
$
(
".outline-subsection .
status-grading-value"
)).
toContainText
(
"
Lab"
);
outlinePage
.
$
(
'.outline-subsection .configure-button'
).
click
();
outlinePage
.
$
(
'.outline-subsection .configure-button'
).
click
();
expect
(
$
(
"#start_date"
).
val
()).
toBe
(
'7/9/2014'
);
expect
(
$
(
"#start_date"
).
val
()).
toBe
(
'7/9/2014'
);
...
@@ -571,8 +571,8 @@ define(["jquery", "js/spec_helpers/create_sinon", "js/spec_helpers/view_helpers"
...
@@ -571,8 +571,8 @@ define(["jquery", "js/spec_helpers/create_sinon", "js/spec_helpers/view_helpers"
])
])
);
);
expect
(
$
(
".outline-subsection .status-release-value"
)).
not
.
toContainText
(
"Jul 09, 2014 at 00:00 UTC"
);
expect
(
$
(
".outline-subsection .status-release-value"
)).
not
.
toContainText
(
"Jul 09, 2014 at 00:00 UTC"
);
expect
(
$
(
".outline-subsection .
due
-date"
)).
not
.
toExist
();
expect
(
$
(
".outline-subsection .
status-grading
-date"
)).
not
.
toExist
();
expect
(
$
(
".outline-subsection .
policy
"
)).
not
.
toExist
();
expect
(
$
(
".outline-subsection .
status-grading-value
"
)).
not
.
toExist
();
});
});
});
});
...
...
cms/templates/js/course-outline.underscore
View file @
5dbfd108
...
@@ -100,19 +100,20 @@ if (statusType === 'warning') {
...
@@ -100,19 +100,20 @@ if (statusType === 'warning') {
<%= xblockInfo.get('release_date') %>
<%= xblockInfo.get('release_date') %>
<% } %>
<% } %>
</span>
</span>
<% if (xblockInfo.get('due_date')) { %>
<span class="due-date">
<i class="icon-time"></i>
<%= gettext('Due date:') %> <%= xblockInfo.get('due_date') %>
</span>
<% } %>
<% if (xblockInfo.get('graded')) { %>
<span class="policy">
<%= gettext('Policy:') %> <%= xblockInfo.get('format') %>
</span>
<% } %>
</p>
</p>
</div>
</div>
<% if (xblockInfo.get('due_date') || xblockInfo.get('graded')) { %>
<div class="status-grading">
<p>
<span class="sr status-grading-label"> <%= gettext('Graded as:') %> </span>
<i class="icon icon-ok"></i>
<span class="status-grading-value"> <%= xblockInfo.get('format') %> </span>
<% if (xblockInfo.get('due_date')) { %>
<span class="status-grading-date"> <%= gettext('Due:') %> <%= xblockInfo.get('due_date') %> </span>
<% } %>
</p>
</div>
<% } %>
<% } %>
<% } %>
<% if (statusMessage) { %>
<% if (statusMessage) { %>
...
...
common/test/acceptance/pages/studio/overview.py
View file @
5dbfd108
...
@@ -112,12 +112,12 @@ class CourseOutlineItem(object):
...
@@ -112,12 +112,12 @@ class CourseOutlineItem(object):
@property
@property
def
due_date
(
self
):
def
due_date
(
self
):
element
=
self
.
q
(
css
=
self
.
_bounded_selector
(
".
due
-date"
))
element
=
self
.
q
(
css
=
self
.
_bounded_selector
(
".
status-grading
-date"
))
return
element
.
first
.
text
[
0
]
if
element
.
present
else
None
return
element
.
first
.
text
[
0
]
if
element
.
present
else
None
@property
@property
def
policy
(
self
):
def
policy
(
self
):
element
=
self
.
q
(
css
=
self
.
_bounded_selector
(
".
policy
"
))
element
=
self
.
q
(
css
=
self
.
_bounded_selector
(
".
status-grading-value
"
))
return
element
.
first
.
text
[
0
]
if
element
.
present
else
None
return
element
.
first
.
text
[
0
]
if
element
.
present
else
None
...
...
common/test/acceptance/tests/test_studio_outline.py
View file @
5dbfd108
...
@@ -302,8 +302,8 @@ class EditingSectionsTest(CourseOutlineTest):
...
@@ -302,8 +302,8 @@ class EditingSectionsTest(CourseOutlineTest):
modal
.
save
()
modal
.
save
()
self
.
assertIn
(
u'Released: Mar 12, 1972'
,
subsection
.
release_date
)
self
.
assertIn
(
u'Released: Mar 12, 1972'
,
subsection
.
release_date
)
self
.
assertIn
(
u'Due
date
: Jul 21, 2014'
,
subsection
.
due_date
)
self
.
assertIn
(
u'Due: Jul 21, 2014'
,
subsection
.
due_date
)
self
.
assertIn
(
u'
Policy:
Lab'
,
subsection
.
policy
)
self
.
assertIn
(
u'Lab'
,
subsection
.
policy
)
def
test_can_edit_section
(
self
):
def
test_can_edit_section
(
self
):
"""
"""
...
...
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