-
Notifications
You must be signed in to change notification settings - Fork 60
Enable freeform answer submit when feedback is hidden #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,10 +35,13 @@ function MentoringStandardView(runtime, element, mentoring) { | |
| } | ||
| } | ||
|
|
||
| // Data may have changed, we have to re-validate. | ||
| validateXBlock(); | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mtyaka
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @itsjeyd I fixed the typo, thanks for noticing. This probably isn't necessary for answer blocks anymore (although it shouldn't do any harm), but I believe it still makes sense for other blocks. |
||
| // Disable the submit button if we have just submitted new answers, | ||
| // or if we have just [re]loaded the page and are showing a complete set | ||
| // of old answers. | ||
| if (disable_submit || all_have_results) { | ||
| if (disable_submit || (all_have_results && mentoring.data.hide_feedback !== 'True')) { | ||
| submitDOM.attr('disabled', 'disabled'); | ||
| } | ||
| } | ||
|
|
@@ -110,7 +113,8 @@ function MentoringStandardView(runtime, element, mentoring) { | |
| submitDOM.show(); | ||
|
|
||
| var options = { | ||
| onChange: onChange | ||
| onChange: onChange, | ||
| validateXBlock: validateXBlock | ||
| }; | ||
|
|
||
| mentoring.initChildren(options); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mtyaka I like this refactoring :)