Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
problem-builder
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
OpenEdx
problem-builder
Commits
66545bf3
Commit
66545bf3
authored
Apr 18, 2014
by
Xavier Antoviaque
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #23 from aboudreault/answer-completion-persistence
Add completion icon persistence for answer block
parents
66be24c6
b86cd768
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
mentoring/public/js/answer.js
+6
-0
mentoring/templates/html/answer_editable.html
+7
-5
mentoring/templates/html/answer_read_only.html
+5
-4
No files found.
mentoring/public/js/answer.js
View file @
66545bf3
...
@@ -4,6 +4,12 @@ function AnswerBlock(runtime, element) {
...
@@ -4,6 +4,12 @@ function AnswerBlock(runtime, element) {
init
:
function
(
options
)
{
init
:
function
(
options
)
{
// register the child validator
// register the child validator
$
(
':input'
,
element
).
on
(
'keyup'
,
options
.
blockValidator
);
$
(
':input'
,
element
).
on
(
'keyup'
,
options
.
blockValidator
);
var
checkmark
=
$
(
'.answer-checkmark'
,
element
);
var
completed
=
$
(
'.xblock-answer'
,
element
).
data
(
'completed'
);
if
(
completed
===
'True'
)
{
checkmark
.
addClass
(
'checkmark-correct icon-ok fa-check'
);
}
},
},
submit
:
function
()
{
submit
:
function
()
{
...
...
mentoring/templates/html/answer_editable.html
View file @
66545bf3
<textarea
<div
class=
"xblock-answer"
data-completed=
"{{ self.completed }}"
>
class=
"answer editable"
cols=
"50"
rows=
"10"
name=
"input"
<textarea
data-min_characters=
"{{ self.min_characters }}"
class=
"answer editable"
cols=
"50"
rows=
"10"
name=
"input"
>
{{ self.student_input }}
</textarea>
data-min_characters=
"{{ self.min_characters }}"
<span
class=
"answer-checkmark icon-2x"
></span>
>
{{ self.student_input }}
</textarea>
<span
class=
"answer-checkmark icon-2x"
></span>
</div>
mentoring/templates/html/answer_read_only.html
View file @
66545bf3
<blockquote
class=
"answer read_only"
>
<div
class=
"xblock-answer"
data-completed=
"{{ self.completed }}"
>
{{ self.student_input|linebreaksbr }}
<blockquote
class=
"answer read_only"
>
</blockquote>
{{ self.student_input|linebreaksbr }}
</blockquote>
</div>
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