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
d1cfdede
Commit
d1cfdede
authored
Apr 23, 2019
by
Daniel Gerhardt
Browse files
Merge branch 'fix-grid-abstention' into '2.7'
Fix abstentions for grid questions See merge request
!88
parents
6c02f07b
5bc2e9e2
Pipeline
#25266
passed with stages
in 1 minute and 11 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/app/view/Question.js
View file @
d1cfdede
...
...
@@ -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 @
d1cfdede
...
...
@@ -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