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
0a60881c
Commit
0a60881c
authored
Jul 27, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:MITx/mitx
parents
351ded6c
6abd1ec6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
36 additions
and
17 deletions
+36
-17
common/lib/capa/capa/templates/textbox.html
+5
-5
common/lib/xmodule/xmodule/js/src/capa/display.coffee
+12
-0
common/lib/xmodule/xmodule/x_module.py
+2
-1
common/lib/xmodule/xmodule/xml_module.py
+1
-1
lms/djangoapps/courseware/module_render.py
+6
-4
lms/static/sass/base/_base.scss
+4
-0
lms/templates/accordion.html
+6
-6
No files found.
common/lib/capa/capa/templates/textbox.html
View file @
0a60881c
...
...
@@ -27,9 +27,6 @@
<br/>
<script
type=
"text/javascript"
src=
"${ settings.LIB_URL }CodeMirror/codemirror.js"
></script>
<script
type=
"text/javascript"
src=
"${ settings.LIB_URL }CodeMirror/python.js"
></script>
<link
rel=
"stylesheet"
href=
"${ settings.LIB_URL }CodeMirror/codemirror.css"
/>
<script>
// Note: We need to make the area follow the CodeMirror for this to work.
$
(
function
(){
...
...
@@ -42,7 +39,10 @@
});
</script>
<style
type=
"text/css"
>
.CodeMirror
{
border-style
:
solid
;
border-width
:
1px
;}
.CodeMirror
{
border
:
2px
solid
black
;
font-size
:
14px
;
line-height
:
18px
;
}
</style>
</section>
common/lib/xmodule/xmodule/js/src/capa/display.coffee
View file @
0a60881c
...
...
@@ -31,8 +31,20 @@ class @Problem
else
$
.
postWithPrefix
"
#{
@
url
}
/problem_get"
,
(
response
)
=>
@
el
.
html
(
response
.
html
)
@
executeProblemScripts
()
@
bind
()
executeProblemScripts
:
->
@
el
.
find
(
".script_placeholder"
).
each
(
index
,
placeholder
)
->
s
=
$
(
"<script>"
)
s
.
attr
(
"type"
,
"text/javascript"
)
s
.
attr
(
"src"
,
$
(
placeholder
).
attr
(
"data-src"
))
# Need to use the DOM elements directly or the scripts won't execute
# properly.
$
(
'head'
)[
0
].
appendChild
(
s
[
0
])
$
(
placeholder
).
remove
()
check
:
=>
Logger
.
log
'problem_check'
,
@
answers
$
.
postWithPrefix
"
#{
@
url
}
/problem_check"
,
@
answers
,
(
response
)
=>
...
...
common/lib/xmodule/xmodule/x_module.py
View file @
0a60881c
...
...
@@ -104,7 +104,8 @@ class HTMLSnippet(object):
"""
Return the html used to display this snippet
"""
raise
NotImplementedError
(
"get_html() must be provided by specific modules"
)
raise
NotImplementedError
(
"get_html() must be provided by specific modules - not present in {0}"
.
format
(
self
.
__class__
))
class
XModule
(
HTMLSnippet
):
...
...
common/lib/xmodule/xmodule/xml_module.py
View file @
0a60881c
...
...
@@ -88,7 +88,7 @@ class XmlDescriptor(XModuleDescriptor):
# The attributes will be removed from the definition xml passed
# to definition_from_xml, and from the xml returned by definition_to_xml
metadata_attributes
=
(
'format'
,
'graceperiod'
,
'showanswer'
,
'rerandomize'
,
'start'
,
'due'
,
'graded'
,
'name'
,
'slug'
)
'start'
,
'due'
,
'graded'
,
'name'
,
'slug'
,
'hide_from_toc'
)
# A dictionary mapping xml attribute names to functions of the value
# that return the metadata key and value
...
...
lms/djangoapps/courseware/module_render.py
View file @
0a60881c
...
...
@@ -56,11 +56,13 @@ def toc_for_course(user, request, course, active_chapter, active_section):
active
=
(
chapter
.
metadata
.
get
(
'display_name'
)
==
active_chapter
and
section
.
metadata
.
get
(
'display_name'
)
==
active_section
)
hide_from_toc
=
section
.
metadata
.
get
(
'hide_from_toc'
,
'false'
)
.
lower
()
==
'true'
sections
.
append
({
'name'
:
section
.
metadata
.
get
(
'display_name'
),
'format'
:
section
.
metadata
.
get
(
'format'
,
''
),
'due'
:
section
.
metadata
.
get
(
'due'
,
''
),
'active'
:
active
})
if
not
hide_from_toc
:
sections
.
append
({
'name'
:
section
.
metadata
.
get
(
'display_name'
),
'format'
:
section
.
metadata
.
get
(
'format'
,
''
),
'due'
:
section
.
metadata
.
get
(
'due'
,
''
),
'active'
:
active
})
chapters
.
append
({
'name'
:
chapter
.
metadata
.
get
(
'display_name'
),
'sections'
:
sections
,
...
...
lms/static/sass/base/_base.scss
View file @
0a60881c
...
...
@@ -43,6 +43,10 @@ p {
span
{
font
:
normal
1em
/
1
.6em
$sans-serif
;
}
/* Fix for CodeMirror: prevent top-level span from affecting deeply-embedded span in CodeMirror */
.CodeMirror
span
{
font
:
inherit
;
}
p
+
p
,
ul
+
p
,
ol
+
p
{
margin-top
:
20px
;
...
...
lms/templates/accordion.html
View file @
0a60881c
...
...
@@ -3,8 +3,8 @@
<
%
def
name=
"make_chapter(chapter)"
>
<h3><a
href=
"#"
>
${chapter['name']}
</a></h3>
<ul>
% for section in chapter['sections']:
<ul>
% for section in chapter['sections']:
<li
${'
class=
"active"
'
if
'
active
'
in
section
and
section
['
active
']
else
''}
>
<a
href=
"${reverse('courseware_section', args=[course_id] + format_url_params([chapter['name'], section['name']]))}"
>
<p>
${section['name']}
...
...
@@ -12,11 +12,11 @@
${section['format']} ${"due " + section['due'] if 'due' in section and section['due'] != '' else ''}
</span>
</p>
</a>
% endfor
</ul>
</
%
def>
</li>
% endfor
</ul>
</
%
def>
% for chapter in toc:
${make_chapter(chapter)}
...
...
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