Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Privacy
Imprint
Contact
Login methods
Sign in
Toggle navigation
Menu
Open sidebar
ARSnova
ARSnova Mobile
Commits
5bc2e9e2
Commit
5bc2e9e2
authored
Apr 23, 2019
by
Daniel Gerhardt
Committed by
Daniel Gerhardt
Apr 23, 2019
Browse files
Fix abstentions for grid questions
Fixes
arsnova#104
.
parent
6c02f07b
Pipeline
#25265
passed with stages
in 1 minute and 9 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/app/view/Question.js
View file @
5bc2e9e2
...
...
@@ -640,6 +640,9 @@ Ext.define('ARSnova.view.Question', {
saveGridQuestionHandler
:
function
(
grid
)
{
var
me
=
this
;
if
(
this
.
grid
.
getChosenFields
().
length
===
0
)
{
return
;
}
Ext
.
Msg
.
confirm
(
''
,
Messages
.
SUBMIT_ANSWER
,
function
(
button
)
{
if
(
button
!==
'
yes
'
)
{
return
;
...
...
@@ -664,7 +667,9 @@ Ext.define('ARSnova.view.Question', {
mcAbstentionHandler
:
function
()
{
var
me
=
this
;
me
.
answerList
.
deselectAll
();
if
(
me
.
answerList
)
{
me
.
answerList
.
deselectAll
();
}
Ext
.
Msg
.
confirm
(
''
,
Messages
.
SUBMIT_ANSWER
,
function
(
button
)
{
if
(
button
!==
'
yes
'
)
{
return
;
...
...
@@ -672,7 +677,7 @@ Ext.define('ARSnova.view.Question', {
me
.
getUserAnswer
().
then
(
function
(
answer
)
{
answer
.
set
(
'
abstention
'
,
true
);
me
.
answer
List
.
deselectA
ll
(
);
answer
.
set
(
'
answerText
'
,
nu
ll
);
me
.
saveAnswer
(
answer
);
});
...
...
src/main/webapp/app/view/user/QuestionPanel.js
View file @
5bc2e9e2
...
...
@@ -345,7 +345,7 @@ Ext.define('ARSnova.view.user.QuestionPanel', {
return
;
}
if
(
questionObj
.
isAbstentionAnswer
&&
"
mc
"
!==
questionObj
.
questionType
)
{
if
(
questionObj
.
isAbstentionAnswer
&&
[
"
mc
"
,
"
grid
"
].
indexOf
(
questionObj
.
questionType
)
===
-
1
)
{
questionPanel
.
selectAbstentionAnswer
();
questionPanel
.
disableQuestion
();
return
;
...
...
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