Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
Paul-Christian Volkmer
ARSnova Backend
Commits
56841dde
Commit
56841dde
authored
9 years ago
by
Andreas Gärtner
Browse files
Options
Downloads
Patches
Plain Diff
Task #15814: Set question active if voting admission is given.
parent
2477ee1f
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/thm/arsnova/services/QuestionService.java
+9
-3
9 additions, 3 deletions
src/main/java/de/thm/arsnova/services/QuestionService.java
with
9 additions
and
3 deletions
src/main/java/de/thm/arsnova/services/QuestionService.java
+
9
−
3
View file @
56841dde
...
...
@@ -327,12 +327,18 @@ public class QuestionService implements IQuestionService, ApplicationEventPublis
@Override
@PreAuthorize
(
"isAuthenticated() and hasPermission(#questionId, 'question', 'owner')"
)
public
void
setVotingAdmission
(
final
String
questionId
,
final
boolean
disable
)
{
public
void
setVotingAdmission
(
final
String
questionId
,
final
boolean
disable
Voting
)
{
final
Question
question
=
databaseDao
.
getQuestion
(
questionId
);
final
Session
session
=
databaseDao
.
getSessionFromKeyword
(
question
.
getSessionKeyword
());
question
.
setVotingDisabled
(
disable
);
question
.
setVotingDisabled
(
disable
Voting
);
databaseDao
.
updateQuestion
(
question
);
if
(
disableVoting
==
false
&&
!
question
.
isActive
())
{
question
.
setActive
(
true
);
update
(
question
);
}
else
{
databaseDao
.
updateQuestion
(
question
);
}
this
.
publisher
.
publishEvent
(
new
LockVotingEvent
(
this
,
session
,
question
));
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment