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
b86cd768
Commit
b86cd768
authored
Apr 17, 2014
by
Alan Boudreault
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not rely on anything in LightChild, make answer completion persistence self-contained
parent
66be24c6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
+14
-5
mentoring/public/js/answer.js
+6
-0
mentoring/templates/html/answer_editable.html
+4
-2
mentoring/templates/html/answer_read_only.html
+4
-3
No files found.
mentoring/public/js/answer.js
View file @
b86cd768
...
...
@@ -4,6 +4,12 @@ function AnswerBlock(runtime, element) {
init
:
function
(
options
)
{
// register the child validator
$
(
':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
()
{
...
...
mentoring/templates/html/answer_editable.html
View file @
b86cd768
<textarea
<div
class=
"xblock-answer"
data-completed=
"{{ self.completed }}"
>
<textarea
class=
"answer editable"
cols=
"50"
rows=
"10"
name=
"input"
data-min_characters=
"{{ self.min_characters }}"
>
{{ self.student_input }}
</textarea>
<span
class=
"answer-checkmark icon-2x"
></span>
<span
class=
"answer-checkmark icon-2x"
></span>
</div>
mentoring/templates/html/answer_read_only.html
View file @
b86cd768
<blockquote
class=
"answer read_only"
>
<div
class=
"xblock-answer"
data-completed=
"{{ self.completed }}"
>
<blockquote
class=
"answer read_only"
>
{{ self.student_input|linebreaksbr }}
</blockquote>
</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