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
9f8e172b
Commit
9f8e172b
authored
Feb 27, 2013
by
Arthur Barrett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
show the status mark next to the submitted tag instead of at the bottom of the problem.
parent
25fb2103
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
16 deletions
+28
-16
common/lib/capa/capa/inputtypes.py
+1
-1
common/lib/capa/capa/templates/annotationinput.html
+17
-11
common/lib/xmodule/xmodule/css/capa/display.scss
+10
-4
No files found.
common/lib/capa/capa/inputtypes.py
View file @
9f8e172b
...
@@ -980,7 +980,7 @@ class AnnotationInput(InputTypeBase):
...
@@ -980,7 +980,7 @@ class AnnotationInput(InputTypeBase):
self
.
comment_prompt
=
xml
.
findtext
(
'./comment_prompt'
,
'Type a commentary below:'
)
self
.
comment_prompt
=
xml
.
findtext
(
'./comment_prompt'
,
'Type a commentary below:'
)
self
.
tag_prompt
=
xml
.
findtext
(
'./tag_prompt'
,
'Select one or more tags:'
)
self
.
tag_prompt
=
xml
.
findtext
(
'./tag_prompt'
,
'Select one or more tags:'
)
self
.
options
=
self
.
_find_options
()
self
.
options
=
self
.
_find_options
()
self
.
return_to_annotation
=
True
self
.
return_to_annotation
=
True
# return only works in conjunction with annotatable xmodule
# Need to provide a value that JSON can parse if there is no
# Need to provide a value that JSON can parse if there is no
# student-supplied value yet.
# student-supplied value yet.
...
...
common/lib/capa/capa/templates/annotationinput.html
View file @
9f8e172b
...
@@ -19,11 +19,23 @@
...
@@ -19,11 +19,23 @@
<div
class=
"block"
>
${tag_prompt}
</div>
<div
class=
"block"
>
${tag_prompt}
</div>
<ul
class=
"tags"
>
<ul
class=
"tags"
>
% for option in options:
% for option in options:
<li><span
class=
"tag
<li>
% if option['id'] in options_value:
% if all([c == 'correct' for c in option['choice'], status]):
selected
<span
class=
"status correct"
id=
"status_${id}"
></span>
% endif
% elif all([c == 'partial' for c in option['choice'], status]):
"
data-id=
"${option['id']}"
>
${option['description']}
</span></li>
<span
class=
"status partially_correct"
id=
"status_${id}"
>
P
</span>
% elif all([c == 'incorrect' for c in option['choice'], status]):
<span
class=
"status incorrect"
id=
"status_${id}"
></span>
% endif
<span
class=
"tag
% if option['id'] in options_value:
selected
% endif
"
data-id=
"${option['id']}"
>
${option['description']}
</span>
</li>
% endfor
% endfor
</ul>
</ul>
...
@@ -42,12 +54,6 @@
...
@@ -42,12 +54,6 @@
% if status == 'unsubmitted':
% if status == 'unsubmitted':
<span
class=
"unanswered"
style=
"display:inline-block;"
id=
"status_${id}"
></span>
<span
class=
"unanswered"
style=
"display:inline-block;"
id=
"status_${id}"
></span>
% elif status == 'correct':
<span
class=
"correct"
id=
"status_${id}"
></span>
% elif status == 'partial':
<span
class=
"partially_correct"
id=
"status_${id}"
>
Partially Correct
</span>
% elif status == 'incorrect':
<span
class=
"incorrect"
id=
"status_${id}"
></span>
% elif status == 'incomplete':
% elif status == 'incomplete':
<span
class=
"incorrect"
id=
"status_${id}"
></span>
<span
class=
"incorrect"
id=
"status_${id}"
></span>
% endif
% endif
...
...
common/lib/xmodule/xmodule/css/capa/display.scss
View file @
9f8e172b
...
@@ -842,16 +842,22 @@ section.problem {
...
@@ -842,16 +842,22 @@ section.problem {
margin-left
:
1em
;
margin-left
:
1em
;
li
{
li
{
display
:
block
;
display
:
block
;
margin
:
1em
0
0
1
.5em
;
margin
:
1em
0
0
0
;
span
{
position
:
relative
;
cursor
:
pointer
;
.tag
{
display
:
inline-block
;
display
:
inline-block
;
padding
:
.25em
.5em
;
cursor
:
pointer
;
border
:
1px
solid
rgb
(
102
,
102
,
102
);
border
:
1px
solid
rgb
(
102
,
102
,
102
);
margin-left
:
40px
;
&
.selected
{
&
.selected
{
background-color
:
$yellow
;
background-color
:
$yellow
;
}
}
}
}
.status
{
position
:
absolute
;
left
:
0
;
}
.tag
,
.status
{
padding
:
.25em
.5em
;
}
}
}
}
}
textarea
.comment
{
width
:
100%
;
}
textarea
.comment
{
width
:
100%
;
}
...
...
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