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
3b6ade2a
Commit
3b6ade2a
authored
Apr 10, 2014
by
Alan Boudreault
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix answer validation when read_only is True
parent
da96ab0e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
mentoring/public/js/answer.js
+6
-0
No files found.
mentoring/public/js/answer.js
View file @
3b6ade2a
...
...
@@ -27,6 +27,12 @@ function AnswerBlock(runtime, element) {
// Returns `true` if the child is valid, else `false`
validate
:
function
()
{
// return true if the answer is read only
var
blockquote_ro
=
$
(
'blockquote.answer.read_only'
,
element
);
if
(
blockquote_ro
.
length
>
0
)
return
true
;
var
input
=
$
(
':input'
,
element
),
input_value
=
input
.
val
().
replace
(
/^
\s
+|
\s
+$/gm
,
''
),
answer_length
=
input_value
.
length
,
...
...
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