Skip to content
Snippets Groups Projects
Commit d9248f99 authored by Mário Murín's avatar Mário Murín
Browse files

Fix typos

parent 5eb1bc31
No related branches found
No related tags found
2 merge requests!142Develop,!138Resolve "Duplicate userRefId causing lockup on a parallel upload"
...@@ -191,10 +191,10 @@ public class TrainingRunService { ...@@ -191,10 +191,10 @@ public class TrainingRunService {
} }
/** /**
* Checks whether any trainin runs exists for particular training instance * Checks whether any training runs exists for particular training instance
* *
* @param trainingInstanceId the training instance id * @param trainingInstanceId the training instance id
* @return boolean boolean * @return boolean
*/ */
public boolean existsAnyForTrainingInstance(Long trainingInstanceId) { public boolean existsAnyForTrainingInstance(Long trainingInstanceId) {
return trainingRunRepository.existsAnyForTrainingInstance(trainingInstanceId); return trainingRunRepository.existsAnyForTrainingInstance(trainingInstanceId);
...@@ -202,7 +202,7 @@ public class TrainingRunService { ...@@ -202,7 +202,7 @@ public class TrainingRunService {
/** /**
* Finds all Training Runs of logged in user. * Finds all Training Runs of logged-in user.
* *
* @param pageable pageable parameter with information about pagination. * @param pageable pageable parameter with information about pagination.
* @return {@link TrainingRun}s of logged in user. * @return {@link TrainingRun}s of logged in user.
...@@ -279,7 +279,8 @@ public class TrainingRunService { ...@@ -279,7 +279,8 @@ public class TrainingRunService {
AdaptiveSmartAssistantInput smartAssistantInput = this.gatherInputDataForSmartAssistant(trainingRun, (TrainingPhase) nextPhase, phases); AdaptiveSmartAssistantInput smartAssistantInput = this.gatherInputDataForSmartAssistant(trainingRun, (TrainingPhase) nextPhase, phases);
String accessToken = trainingRun.getTrainingInstance().getAccessToken(); String accessToken = trainingRun.getTrainingInstance().getAccessToken();
Long userId = trainingRun.getParticipantRef().getUserRefId(); Long userId = trainingRun.getParticipantRef().getUserRefId();
// smart assistant returns order of the tasks counted from 1 and we need to decrease the number by 1, since Java order collections from 0 // smart assistant returns order of the tasks counted from 1, and we need to decrease the number by 1,
// since Java order collections from 0
int suitableTask = this.smartAssistantServiceApi.findSuitableTaskInPhase(smartAssistantInput, accessToken, userId).getSuitableTask(); int suitableTask = this.smartAssistantServiceApi.findSuitableTaskInPhase(smartAssistantInput, accessToken, userId).getSuitableTask();
trainingRun.setCurrentTask(((TrainingPhase) nextPhase).getTasks().get(suitableTask - 1)); trainingRun.setCurrentTask(((TrainingPhase) nextPhase).getTasks().get(suitableTask - 1));
} else { } else {
...@@ -465,11 +466,11 @@ public class TrainingRunService { ...@@ -465,11 +466,11 @@ public class TrainingRunService {
} }
/** /**
* Finds all Training Runs of specific Training Definition of logged in user. * Finds all Training Runs of specific Training Definition of logged-in user.
* *
* @param definitionId id of Training Definition * @param definitionId id of Training Definition
* @param pageable pageable parameter with information about pagination. * @param pageable pageable parameter with information about pagination.
* @return {@link TrainingRun}s of specific Training Definition of logged in user * @return {@link TrainingRun}s of specific Training Definition of logged-in user
*/ */
public Page<TrainingRun> findAllByTrainingDefinitionAndParticipant(Long definitionId, Pageable pageable) { public Page<TrainingRun> findAllByTrainingDefinitionAndParticipant(Long definitionId, Pageable pageable) {
return trainingRunRepository.findAllByTrainingDefinitionIdAndParticipantUserRefId(definitionId, userManagementServiceApi.getLoggedInUserRefId(), pageable); return trainingRunRepository.findAllByTrainingDefinitionIdAndParticipantUserRefId(definitionId, userManagementServiceApi.getLoggedInUserRefId(), pageable);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment