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
ac7b0334
Commit
ac7b0334
authored
Dec 14, 2012
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code review changes.
parent
0b762fa3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
32 deletions
+21
-32
cms/djangoapps/contentstore/views.py
+0
-1
cms/static/js/models/course_relative.js
+0
-1
cms/static/js/views/grader-select-view.js
+1
-2
cms/templates/edit_subsection.html
+20
-28
No files found.
cms/djangoapps/contentstore/views.py
View file @
ac7b0334
...
@@ -352,7 +352,6 @@ def assignment_type_update(request, org, course, category, name):
...
@@ -352,7 +352,6 @@ def assignment_type_update(request, org, course, category, name):
raise
HttpResponseForbidden
()
raise
HttpResponseForbidden
()
if
request
.
method
==
'GET'
:
if
request
.
method
==
'GET'
:
# Cannot just do a get w/o knowing the course name :-(
return
HttpResponse
(
json
.
dumps
(
CourseGradingModel
.
get_section_grader_type
(
location
)),
return
HttpResponse
(
json
.
dumps
(
CourseGradingModel
.
get_section_grader_type
(
location
)),
mimetype
=
"application/json"
)
mimetype
=
"application/json"
)
elif
request
.
method
==
'POST'
:
# post or put, doesn't matter.
elif
request
.
method
==
'POST'
:
# post or put, doesn't matter.
...
...
cms/static/js/models/course_relative.js
View file @
ac7b0334
...
@@ -37,7 +37,6 @@ CMS.Models.Location = Backbone.Model.extend({
...
@@ -37,7 +37,6 @@ CMS.Models.Location = Backbone.Model.extend({
org
:
this
.
_fieldPattern
.
exec
(
payload
)[
0
],
org
:
this
.
_fieldPattern
.
exec
(
payload
)[
0
],
course
:
this
.
_fieldPattern
.
exec
(
payload
)[
0
],
course
:
this
.
_fieldPattern
.
exec
(
payload
)[
0
],
category
:
this
.
_fieldPattern
.
exec
(
payload
)[
0
],
category
:
this
.
_fieldPattern
.
exec
(
payload
)[
0
],
// FIXME handle no trailing /
name
:
this
.
_fieldPattern
.
exec
(
payload
)[
0
]
name
:
this
.
_fieldPattern
.
exec
(
payload
)[
0
]
}
}
}
}
...
...
cms/static/js/views/grader-select-view.js
View file @
ac7b0334
CMS
.
Models
.
AssignmentGrade
=
Backbone
.
Model
.
extend
({
CMS
.
Models
.
AssignmentGrade
=
Backbone
.
Model
.
extend
({
idAttribute
:
"cid"
,
// not sure if this is kosher
defaults
:
{
defaults
:
{
graderType
:
null
,
// the type label (string). May be "Not Graded" which implies None. I'd like to use id but that's ephemeral
graderType
:
null
,
// the type label (string). May be "Not Graded" which implies None. I'd like to use id but that's ephemeral
location
:
null
// A location object
location
:
null
// A location object
...
@@ -35,7 +34,7 @@ CMS.Views.OverviewAssignmentGrader = Backbone.View.extend({
...
@@ -35,7 +34,7 @@ CMS.Views.OverviewAssignmentGrader = Backbone.View.extend({
this
.
template
=
_
.
template
(
this
.
template
=
_
.
template
(
// TODO move to a template file
// TODO move to a template file
'<h4 class="status-label"><%= assignmentType %></h4>'
+
'<h4 class="status-label"><%= assignmentType %></h4>'
+
'<a data-tooltip="Mark/unmark this section as graded" class="menu-toggle" href="#">'
+
'<a data-tooltip="Mark/unmark this s
ubs
ection as graded" class="menu-toggle" href="#">'
+
'<span class="ss-icon ss-standard">✓</span>'
+
'<span class="ss-icon ss-standard">✓</span>'
+
'</a>'
+
'</a>'
+
'<ul class="menu">'
+
'<ul class="menu">'
+
...
...
cms/templates/edit_subsection.html
View file @
ac7b0334
...
@@ -124,11 +124,11 @@
...
@@ -124,11 +124,11 @@
<script
src=
"${static.url('js/vendor/timepicker/datepair.js')}"
></script>
<script
src=
"${static.url('js/vendor/timepicker/datepair.js')}"
></script>
<script
src=
"${static.url('js/vendor/date.js')}"
></script>
<script
src=
"${static.url('js/vendor/date.js')}"
></script>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
(
function
()
{
//
(function() {
$body
=
$
(
'body'
);
//
$body = $('body');
$
(
'.gradable-status .menu-toggle'
).
bind
(
'click'
,
showGradeMenu
);
//
$('.gradable-status .menu-toggle').bind('click', showGradeMenu);
$
(
'.gradable-status .menu'
).
bind
(
'click'
,
selectGradeType
);
//
$('.gradable-status .menu').bind('click', selectGradeType);
})();
//
})();
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
// expand the due-date area if the values are set
// expand the due-date area if the values are set
...
@@ -140,33 +140,25 @@
...
@@ -140,33 +140,25 @@
})
})
// grading status
// grading status
function
showGradeMenu
(
e
)
{
// function selectGradeType(e) {
// e.preventDefault();
$section
=
$
(
this
).
closest
(
'.gradable-status'
);
// var $section = $(this).closest('.gradable-status');
// $section.find('.menu li a').removeClass('is-selected');
e
.
preventDefault
();
$section
.
toggleClass
(
'is-active'
);
}
function
selectGradeType
(
e
)
{
// var $target = $(e.target).addClass('is-selected');
e
.
preventDefault
(
);
// var $label = $section.find('.status-label'
);
var
$section
=
$
(
this
).
closest
(
'.gradable-status'
);
// $section.removeClass('is-active');
$section
.
find
(
'.menu li a'
).
removeClass
(
'is-selected'
);
// $label.html($target.html()
);
// if ($target.hasClass('gradable-status-notgraded')) {
var
$target
=
$
(
e
.
target
).
addClass
(
'is-selected'
);
// $section.removeClass('is-set');
var
$label
=
$section
.
find
(
'.status-label'
);
// }
// else {
$section
.
removeClass
(
'is-active'
);
// $section.addClass('is-set');
$label
.
html
(
$target
.
html
());
// }
// }
if
(
$target
.
hasClass
(
'gradable-status-notgraded'
))
{
$section
.
removeClass
(
'is-set'
);
}
else
{
$section
.
addClass
(
'is-set'
);
}
}
</script>
</script>
</
%
block>
</
%
block>
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