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
115f6c3a
Commit
115f6c3a
authored
Jan 25, 2013
by
Diana Huang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into tests/diana/update-oe-unit-tests
parents
71d27def
0e78d9eb
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
58 additions
and
42 deletions
+58
-42
common/lib/xmodule/xmodule/capa_module.py
+5
-3
common/lib/xmodule/xmodule/course_module.py
+1
-1
common/lib/xmodule/xmodule/js/src/graphical_slider_tool/el_output.js
+6
-6
common/lib/xmodule/xmodule/js/src/graphical_slider_tool/g_label_el_output.js
+6
-6
common/lib/xmodule/xmodule/js/src/graphical_slider_tool/graph.js
+10
-10
common/lib/xmodule/xmodule/js/src/html/edit.coffee
+10
-3
common/lib/xmodule/xmodule/templates/problem/circuitschematic.yaml
+2
-0
common/lib/xmodule/xmodule/templates/problem/customgrader.yaml
+2
-0
common/lib/xmodule/xmodule/templates/problem/empty.yaml
+2
-0
common/lib/xmodule/xmodule/templates/problem/forumularesponse.yaml
+2
-0
common/lib/xmodule/xmodule/templates/problem/imageresponse.yaml
+2
-0
common/lib/xmodule/xmodule/templates/problem/multiplechoice.yaml
+2
-0
common/lib/xmodule/xmodule/templates/problem/numericalresponse.yaml
+2
-0
common/lib/xmodule/xmodule/templates/problem/optionresponse.yaml
+2
-0
common/lib/xmodule/xmodule/templates/problem/string_response.yaml
+2
-0
lms/djangoapps/courseware/views.py
+1
-1
lms/djangoapps/django_comment_client/models.py
+0
-11
lms/templates/test_center_register.html
+1
-1
No files found.
common/lib/xmodule/xmodule/capa_module.py
View file @
115f6c3a
...
...
@@ -116,9 +116,11 @@ class CapaModule(XModule):
self
.
grace_period
=
None
self
.
close_date
=
self
.
display_due_date
self
.
max_attempts
=
self
.
metadata
.
get
(
'attempts'
,
None
)
if
self
.
max_attempts
is
not
None
:
self
.
max_attempts
=
int
(
self
.
max_attempts
)
max_attempts
=
self
.
metadata
.
get
(
'attempts'
,
None
)
if
max_attempts
:
self
.
max_attempts
=
int
(
max_attempts
)
else
:
self
.
max_attempts
=
None
self
.
show_answer
=
self
.
metadata
.
get
(
'showanswer'
,
'closed'
)
...
...
common/lib/xmodule/xmodule/course_module.py
View file @
115f6c3a
...
...
@@ -655,7 +655,7 @@ class CourseDescriptor(SequenceDescriptor):
@property
def
registration_end_date_text
(
self
):
return
time
.
strftime
(
"
%
b
%
d,
%
Y"
,
self
.
registration_end_date
)
return
time
.
strftime
(
"
%
b
%
d,
%
Y
at
%
H:
%
M UTC
"
,
self
.
registration_end_date
)
@property
def
current_test_center_exam
(
self
):
...
...
common/lib/xmodule/xmodule/js/src/graphical_slider_tool/el_output.js
View file @
115f6c3a
...
...
@@ -8,13 +8,13 @@ define('ElOutput', ['logme'], function (logme) {
function
ElOutput
(
config
,
state
)
{
if
(
$
.
isPlainObject
(
config
.
functions
.
function
))
{
processFuncObj
(
config
.
functions
.
function
);
}
else
if
(
$
.
isArray
(
config
.
functions
.
function
))
{
if
(
$
.
isPlainObject
(
config
.
functions
[
"function"
]
))
{
processFuncObj
(
config
.
functions
[
"function"
]
);
}
else
if
(
$
.
isArray
(
config
.
functions
[
"function"
]
))
{
(
function
(
c1
)
{
while
(
c1
<
config
.
functions
.
function
.
length
)
{
if
(
$
.
isPlainObject
(
config
.
functions
.
function
[
c1
]))
{
processFuncObj
(
config
.
functions
.
function
[
c1
]);
while
(
c1
<
config
.
functions
[
"function"
]
.
length
)
{
if
(
$
.
isPlainObject
(
config
.
functions
[
"function"
]
[
c1
]))
{
processFuncObj
(
config
.
functions
[
"function"
]
[
c1
]);
}
c1
+=
1
;
...
...
common/lib/xmodule/xmodule/js/src/graphical_slider_tool/g_label_el_output.js
View file @
115f6c3a
...
...
@@ -6,13 +6,13 @@ define('GLabelElOutput', ['logme'], function (logme) {
return
GLabelElOutput
;
function
GLabelElOutput
(
config
,
state
)
{
if
(
$
.
isPlainObject
(
config
.
functions
.
function
))
{
processFuncObj
(
config
.
functions
.
function
);
}
else
if
(
$
.
isArray
(
config
.
functions
.
function
))
{
if
(
$
.
isPlainObject
(
config
.
functions
[
"function"
]
))
{
processFuncObj
(
config
.
functions
[
"function"
]
);
}
else
if
(
$
.
isArray
(
config
.
functions
[
"function"
]
))
{
(
function
(
c1
)
{
while
(
c1
<
config
.
functions
.
function
.
length
)
{
if
(
$
.
isPlainObject
(
config
.
functions
.
function
[
c1
]))
{
processFuncObj
(
config
.
functions
.
function
[
c1
]);
while
(
c1
<
config
.
functions
[
"function"
]
.
length
)
{
if
(
$
.
isPlainObject
(
config
.
functions
[
"function"
]
[
c1
]))
{
processFuncObj
(
config
.
functions
[
"function"
]
[
c1
]);
}
c1
+=
1
;
...
...
common/lib/xmodule/xmodule/js/src/graphical_slider_tool/graph.js
View file @
115f6c3a
...
...
@@ -838,33 +838,33 @@ define('Graph', ['logme'], function (logme) {
return
;
}
if
(
typeof
config
.
functions
.
function
===
'string'
)
{
if
(
typeof
config
.
functions
[
"function"
]
===
'string'
)
{
// If just one function string is present.
addFunction
(
config
.
functions
.
function
);
addFunction
(
config
.
functions
[
"function"
]
);
}
else
if
(
$
.
isPlainObject
(
config
.
functions
.
function
)
===
true
)
{
}
else
if
(
$
.
isPlainObject
(
config
.
functions
[
"function"
]
)
===
true
)
{
// If a function is present, but it also has properties
// defined.
callAddFunction
(
config
.
functions
.
function
);
callAddFunction
(
config
.
functions
[
"function"
]
);
}
else
if
(
$
.
isArray
(
config
.
functions
.
function
))
{
}
else
if
(
$
.
isArray
(
config
.
functions
[
"function"
]
))
{
// If more than one function is defined.
for
(
c1
=
0
;
c1
<
config
.
functions
.
function
.
length
;
c1
+=
1
)
{
for
(
c1
=
0
;
c1
<
config
.
functions
[
"function"
]
.
length
;
c1
+=
1
)
{
// For each definition, we must check if it is a simple
// string definition, or a complex one with properties.
if
(
typeof
config
.
functions
.
function
[
c1
]
===
'string'
)
{
if
(
typeof
config
.
functions
[
"function"
]
[
c1
]
===
'string'
)
{
// Simple string.
addFunction
(
config
.
functions
.
function
[
c1
]);
addFunction
(
config
.
functions
[
"function"
]
[
c1
]);
}
else
if
(
$
.
isPlainObject
(
config
.
functions
.
function
[
c1
]))
{
}
else
if
(
$
.
isPlainObject
(
config
.
functions
[
"function"
]
[
c1
]))
{
// Properties are present.
callAddFunction
(
config
.
functions
.
function
[
c1
]);
callAddFunction
(
config
.
functions
[
"function"
]
[
c1
]);
}
}
...
...
common/lib/xmodule/xmodule/js/src/html/edit.coffee
View file @
115f6c3a
...
...
@@ -20,13 +20,17 @@ class @HTMLEditingDescriptor
theme
:
"advanced"
,
skin
:
'studio'
,
schema
:
"html5"
,
# Necessary to preserve relative URLs to our images.
convert_urls
:
false
,
# TODO: we should share this CSS with studio (and LMS)
content_css
:
"/static/css/tiny-mce.css"
,
# Disable h4, h5, and h6 styles as we don't have CSS for them.
formats
:
{
# Disable h4, h5, and h6 styles as we don't have CSS for them.
h4
:
{},
h5
:
{},
h6
:
{}
h6
:
{},
# tinyMCE does block level for code by default
code
:
{
inline
:
'code'
}
},
# Disable visual aid on borderless table.
visual
:
false
,
...
...
@@ -50,10 +54,13 @@ class @HTMLEditingDescriptor
@
setupTinyMCE
:
(
ed
)
->
ed
.
addButton
(
'wrapAsCode'
,
{
title
:
'Code
Block
'
,
title
:
'Code'
,
image
:
'/static/images/ico-tinymce-code.png'
,
onclick
:
()
->
ed
.
formatter
.
toggle
(
'code'
)
# Without this, the dirty flag does not get set unless the user also types in text.
# Visual Editor must be marked as dirty or else we won't populate the Advanced Editor from it.
ed
.
isNotDirty
=
false
})
ed
.
onNodeChange
.
add
((
editor
,
command
,
e
)
->
...
...
common/lib/xmodule/xmodule/templates/problem/circuitschematic.yaml
View file @
115f6c3a
...
...
@@ -3,6 +3,8 @@ metadata:
display_name
:
Circuit Schematic
rerandomize
:
never
showanswer
:
always
weight
:
"
"
attempts
:
"
"
data
:
|
<problem >
Please make a voltage divider that splits the provided voltage evenly.
...
...
common/lib/xmodule/xmodule/templates/problem/customgrader.yaml
View file @
115f6c3a
...
...
@@ -3,6 +3,8 @@ metadata:
display_name
:
Custom Grader
rerandomize
:
never
showanswer
:
always
weight
:
"
"
attempts
:
"
"
data
:
|
<problem>
<p>
...
...
common/lib/xmodule/xmodule/templates/problem/empty.yaml
View file @
115f6c3a
...
...
@@ -4,6 +4,8 @@ metadata:
rerandomize
:
never
showanswer
:
always
markdown
:
"
"
weight
:
"
"
attempts
:
"
"
data
:
|
<problem>
</problem>
...
...
common/lib/xmodule/xmodule/templates/problem/forumularesponse.yaml
View file @
115f6c3a
...
...
@@ -3,6 +3,8 @@ metadata:
display_name
:
Formula Response
rerandomize
:
never
showanswer
:
always
weight
:
"
"
attempts
:
"
"
data
:
|
<problem>
<p>
...
...
common/lib/xmodule/xmodule/templates/problem/imageresponse.yaml
View file @
115f6c3a
...
...
@@ -3,6 +3,8 @@ metadata:
display_name
:
Image Response
rerandomize
:
never
showanswer
:
always
weight
:
"
"
attempts
:
"
"
data
:
|
<problem>
<p>
...
...
common/lib/xmodule/xmodule/templates/problem/multiplechoice.yaml
View file @
115f6c3a
...
...
@@ -3,6 +3,8 @@ metadata:
display_name
:
Multiple Choice
rerandomize
:
never
showanswer
:
always
weight
:
"
"
attempts
:
"
"
markdown
:
"
A
multiple
choice
problem
presents
radio
buttons
for
student
input.
Students
can
only
select
a
single
option
presented.
Multiple
Choice
questions
have
been
the
subject
of
many
areas
of
research
due
to
the
early
...
...
common/lib/xmodule/xmodule/templates/problem/numericalresponse.yaml
View file @
115f6c3a
...
...
@@ -3,6 +3,8 @@ metadata:
display_name
:
Numerical Response
rerandomize
:
never
showanswer
:
always
weight
:
"
"
attempts
:
"
"
markdown
:
"
A
numerical
response
problem
accepts
a
line
of
text
input
from
the
student,
and
evaluates
the
input
for
correctness
based
on
its
...
...
common/lib/xmodule/xmodule/templates/problem/optionresponse.yaml
View file @
115f6c3a
...
...
@@ -3,6 +3,8 @@ metadata:
display_name
:
Option Response
rerandomize
:
never
showanswer
:
always
weight
:
"
"
attempts
:
"
"
markdown
:
"
OptionResponse
gives
a
limited
set
of
options
for
students
to
respond
with,
and
presents
those
options
in
a
format
that
encourages
them
to
search
for
a
specific
answer
rather
than
being
immediately
presented
...
...
common/lib/xmodule/xmodule/templates/problem/string_response.yaml
View file @
115f6c3a
...
...
@@ -3,6 +3,8 @@ metadata:
display_name
:
String Response
rerandomize
:
never
showanswer
:
always
weight
:
"
"
attempts
:
"
"
# Note, the extra newlines are needed to make the yaml parser add blank lines instead of folding
markdown
:
"
A
string
response
problem
accepts
a
line
of
text
input
from
the
...
...
lms/djangoapps/courseware/views.py
View file @
115f6c3a
...
...
@@ -235,7 +235,7 @@ def index(request, course_id, chapter=None, section=None,
# Load all descendents of the section, because we're going to display it's
# html, which in general will need all of its children
section_module
=
get_module
(
request
.
user
,
request
,
section_descriptor
.
location
,
student_module_cache
,
course
.
id
,
depth
=
None
)
student_module_cache
,
course
.
id
,
position
=
position
,
depth
=
None
)
if
section_module
is
None
:
# User may be trying to be clever and access something
# they don't have access to.
...
...
lms/djangoapps/django_comment_client/models.py
View file @
115f6c3a
...
...
@@ -62,14 +62,3 @@ class Permission(models.Model):
def
__unicode__
(
self
):
return
self
.
name
@receiver
(
post_save
,
sender
=
CourseEnrollment
)
def
assign_default_role
(
sender
,
instance
,
**
kwargs
):
if
instance
.
user
.
is_staff
:
role
=
Role
.
objects
.
get_or_create
(
course_id
=
instance
.
course_id
,
name
=
"Moderator"
)[
0
]
else
:
role
=
Role
.
objects
.
get_or_create
(
course_id
=
instance
.
course_id
,
name
=
"Student"
)[
0
]
logging
.
info
(
"assign_default_role: adding
%
s as
%
s"
%
(
instance
.
user
,
role
))
instance
.
user
.
roles
.
add
(
role
)
lms/templates/test_center_register.html
View file @
115f6c3a
...
...
@@ -466,7 +466,7 @@
<span
class=
"label"
>
Last Eligible Appointment Date:
</span>
<span
class=
"value"
>
${exam_info.last_eligible_appointment_date_text}
</span>
</li>
<li>
<span
class=
"label"
>
Registration End
Date
:
</span>
<span
class=
"value"
>
${exam_info.registration_end_date_text}
</span>
<span
class=
"label"
>
Registration End
s
:
</span>
<span
class=
"value"
>
${exam_info.registration_end_date_text}
</span>
</li>
</ul>
% 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