diff --git a/src/main/java/org/olat/course/nodes/iq/ConfirmReopenAssessmentEntriesController.java b/src/main/java/org/olat/course/nodes/iq/ConfirmReopenAssessmentEntriesController.java index e55c39aae8490d16bf0e185b9e0ea44363af4e1e..33aa2360470b2aaa2845204713592e47e6d4f64a 100644 --- a/src/main/java/org/olat/course/nodes/iq/ConfirmReopenAssessmentEntriesController.java +++ b/src/main/java/org/olat/course/nodes/iq/ConfirmReopenAssessmentEntriesController.java @@ -1,3 +1,22 @@ +/** + * <a href="http://www.openolat.org"> + * OpenOLAT - Online Learning and Training</a><br> + * <p> + * Licensed under the Apache License, Version 2.0 (the "License"); <br> + * you may not use this file except in compliance with the License.<br> + * You may obtain a copy of the License at the + * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> + * <p> + * Unless required by applicable law or agreed to in writing,<br> + * software distributed under the License is distributed on an "AS IS" BASIS, <br> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> + * See the License for the specific language governing permissions and <br> + * limitations under the License. + * <p> + * Initial code contributed and copyrighted by<br> + * frentix GmbH, http://www.frentix.com + * <p> + */ package org.olat.course.nodes.iq; import org.olat.core.gui.UserRequest; diff --git a/src/main/java/org/olat/ims/qti21/ui/ConfirmAssessmentTestSessionInvalidationController.java b/src/main/java/org/olat/ims/qti21/ui/ConfirmAssessmentTestSessionInvalidationController.java index 44b46cbd3e5b86ad80043d7ac94e91d1d39374d0..f6a18ab769527baef15fe446312e3fc3da59a24c 100644 --- a/src/main/java/org/olat/ims/qti21/ui/ConfirmAssessmentTestSessionInvalidationController.java +++ b/src/main/java/org/olat/ims/qti21/ui/ConfirmAssessmentTestSessionInvalidationController.java @@ -159,7 +159,7 @@ public class ConfirmAssessmentTestSessionInvalidationController extends FormBasi if(gradingService.isGradingEnabled(session.getTestEntry(), null)) { AssessmentEntry assessmentEntry = courseAssessmentService.getAssessmentEntry(courseNode, assessedUserCourseEnv); GradingAssignment assignment = gradingService.getGradingAssignment(session.getTestEntry(), assessmentEntry); - if(assignment != null && session.getKey().equals(assessmentEntry.getAssessmentId()) && gradingService.hasRecordedTime(assignment)) { + if(assignment != null && session.getKey().equals(assessmentEntry.getAssessmentId())) { return assignment; } } @@ -193,8 +193,10 @@ public class ConfirmAssessmentTestSessionInvalidationController extends FormBasi session.setCancelled(true); session = qtiService.updateAssessmentTestSession(session); dbInstance.commit(); + + AssessmentTestSession promotedSession = null; if(updateEntryResults) { - AssessmentTestSession promotedSession = getNextLastSession(); + promotedSession = getNextLastSession(); if(promotedSession != null) { if(courseNode == null) { qtiService.updateAssessmentEntry(promotedSession); @@ -209,7 +211,11 @@ public class ConfirmAssessmentTestSessionInvalidationController extends FormBasi if(assignmentStatus == GradingAssignmentStatus.assigned || assignmentStatus == GradingAssignmentStatus.inProcess || assignmentStatus == GradingAssignmentStatus.done) { - gradingService.reopenAssignment(runningAssignment); + if(promotedSession != null) { + gradingService.reopenAssignment(runningAssignment); + } else { + gradingService.deactivateAssignment(runningAssignment); + } } } diff --git a/src/main/java/org/olat/ims/qti21/ui/ConfirmAssessmentTestSessionRevalidationController.java b/src/main/java/org/olat/ims/qti21/ui/ConfirmAssessmentTestSessionRevalidationController.java index cc63a594113bf5647bbd3b067671c4bb24135423..5d17450fc7e3345f5f065411e77a7e17c9f7d090 100644 --- a/src/main/java/org/olat/ims/qti21/ui/ConfirmAssessmentTestSessionRevalidationController.java +++ b/src/main/java/org/olat/ims/qti21/ui/ConfirmAssessmentTestSessionRevalidationController.java @@ -137,13 +137,13 @@ public class ConfirmAssessmentTestSessionRevalidationController extends FormBasi @Override protected void formOK(UserRequest ureq) { - doInvalidateSession(ureq, canUpdateAssessmentEntry); + doValidateSession(ureq, canUpdateAssessmentEntry); } @Override protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) { if(revalidateButton == source) { - doInvalidateSession(ureq, false); + doValidateSession(ureq, false); } super.formInnerEvent(ureq, source, event); } @@ -159,17 +159,18 @@ public class ConfirmAssessmentTestSessionRevalidationController extends FormBasi if(gradingService.isGradingEnabled(session.getTestEntry(), null)) { AssessmentEntry assessmentEntry = courseAssessmentService.getAssessmentEntry(courseNode, assessedUserCourseEnv); GradingAssignment assignment = gradingService.getGradingAssignment(session.getTestEntry(), assessmentEntry); - if(assignment != null && session.getKey().equals(assessmentEntry.getAssessmentId()) && gradingService.hasRecordedTime(assignment)) { + if(assignment != null && session.getKey().equals(assessmentEntry.getAssessmentId())) { return assignment; } } return null; } - private void doInvalidateSession(UserRequest ureq, boolean updateEntryResults) { + private void doValidateSession(UserRequest ureq, boolean updateEntryResults) { session.setCancelled(false); session = qtiService.updateAssessmentTestSession(session); dbInstance.commit(); + if(updateEntryResults) { if(courseNode == null) { qtiService.updateAssessmentEntry(session); @@ -184,6 +185,13 @@ public class ConfirmAssessmentTestSessionRevalidationController extends FormBasi || assignmentStatus == GradingAssignmentStatus.inProcess || assignmentStatus == GradingAssignmentStatus.done) { gradingService.reopenAssignment(runningAssignment); + } else if(assignmentStatus == GradingAssignmentStatus.deactivated + || assignmentStatus == GradingAssignmentStatus.unassigned) { + dbInstance.commit();// if the assessment was updated before + AssessmentEntry assessmentEntry = gradingService + .loadFullAssessmentEntry(runningAssignment.getAssessmentEntry()); + RepositoryEntry referenceEntry = session.getTestEntry(); + gradingService.assignGrader(referenceEntry, assessmentEntry, true); } } diff --git a/src/main/java/org/olat/ims/qti21/ui/ConfirmReopenAssessmentEntryController.java b/src/main/java/org/olat/ims/qti21/ui/ConfirmReopenAssessmentEntryController.java index c73f98c61812e2fc5e81911723ca7e4e3615c51f..050acd18b21ee5a6d6957f214186ccb7827f4cf9 100644 --- a/src/main/java/org/olat/ims/qti21/ui/ConfirmReopenAssessmentEntryController.java +++ b/src/main/java/org/olat/ims/qti21/ui/ConfirmReopenAssessmentEntryController.java @@ -1,3 +1,22 @@ +/** + * <a href="http://www.openolat.org"> + * OpenOLAT - Online Learning and Training</a><br> + * <p> + * Licensed under the Apache License, Version 2.0 (the "License"); <br> + * you may not use this file except in compliance with the License.<br> + * You may obtain a copy of the License at the + * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> + * <p> + * Unless required by applicable law or agreed to in writing,<br> + * software distributed under the License is distributed on an "AS IS" BASIS, <br> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> + * See the License for the specific language governing permissions and <br> + * limitations under the License. + * <p> + * Initial code contributed and copyrighted by<br> + * frentix GmbH, http://www.frentix.com + * <p> + */ package org.olat.ims.qti21.ui; import org.olat.core.gui.UserRequest; diff --git a/src/main/java/org/olat/ims/qti21/ui/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/ims/qti21/ui/_i18n/LocalStrings_de.properties index 1ed94bcc933a5d3469ddc5b42aead40a3542d85d..d3543aba1cf320ffb9173c8d32ea900fbe81046e 100644 --- a/src/main/java/org/olat/ims/qti21/ui/_i18n/LocalStrings_de.properties +++ b/src/main/java/org/olat/ims/qti21/ui/_i18n/LocalStrings_de.properties @@ -294,7 +294,7 @@ upload.explanation=Datei auf lokalem Computer f\u00FCr \u00DCbertragung w\u00E4h validate.xml.signature=Testquittung validieren validate.xml.signature.file=XML Datei validate.xml.signature.ok=Testquittung und Datei konnte erfolgreich validiert werden. -warning.assignment.done=Die Korrektur dieses Tests ist bereits abgeschlossen. Wird diese Test-Session als ung\u00FCltig markiert (annulliert) wird, so gehen alle bestehenden Korrekturen verloren. +warning.assignment.done=Die Korrektur dieses Tests ist bereits abgeschlossen. Wird diese Test-Session als ung\u00FCltig markiert (annulliert), so gehen alle bestehenden Korrekturen verloren. warning.assignment.inProcess=Dieser Test befindet sich bereits in Korrektur. Wird diese Test-Session als ung\u00FCltig markiert (annulliert), so gehen alle Korrekturen verloren. warning.download.log=Es gibt leider kein Logdatei f\u00FCr diesen Test. warning.reset.assessmenttest.data=Die Test-Resultate wurden von einem Administrator oder Kursbesitzer zur\u00FCckgesetzt. Sie k\u00F6nnen den Test nicht fortsetzen und m\u00FCssen ihn erneut starten. diff --git a/src/main/java/org/olat/ims/qti21/ui/_i18n/LocalStrings_en.properties b/src/main/java/org/olat/ims/qti21/ui/_i18n/LocalStrings_en.properties index 5be1eefe82d97c31922a55c2be17deab204ec26f..9f6a8b8914332fdc413c8d1e19b40e4d508d20cf 100644 --- a/src/main/java/org/olat/ims/qti21/ui/_i18n/LocalStrings_en.properties +++ b/src/main/java/org/olat/ims/qti21/ui/_i18n/LocalStrings_en.properties @@ -238,7 +238,7 @@ retrievetest.confirm.text.plural=$org.olat.ims.qti.statistics.ui\:retrievetest.c retrievetest.confirm.title=$org.olat.ims.qti.statistics.ui\:retrievetest.confirm.title retrievetest.nothing.todo=$org.olat.ims.qti.statistics.ui\:retrievetest.nothing.todo retry.item=Retry -revalidate=WMark as valid +revalidate=Mark as valid revalidate.overwrite=Mark as valid and transfer result revalidate.test=Mark again as valid revalidate.test.confirm.title=$\:revalidate.test diff --git a/src/main/java/org/olat/restapi/system/BigBlueButtonStatsWebService.java b/src/main/java/org/olat/restapi/system/BigBlueButtonStatsWebService.java index 70e22fb76a6a0076f445966bc35283268bd782ca..ad21c6408df3f42a52c41b658a71c8637fda5768 100644 --- a/src/main/java/org/olat/restapi/system/BigBlueButtonStatsWebService.java +++ b/src/main/java/org/olat/restapi/system/BigBlueButtonStatsWebService.java @@ -1,3 +1,22 @@ +/** + * <a href="http://www.openolat.org"> + * OpenOLAT - Online Learning and Training</a><br> + * <p> + * Licensed under the Apache License, Version 2.0 (the "License"); <br> + * you may not use this file except in compliance with the License.<br> + * You may obtain a copy of the License at the + * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> + * <p> + * Unless required by applicable law or agreed to in writing,<br> + * software distributed under the License is distributed on an "AS IS" BASIS, <br> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> + * See the License for the specific language governing permissions and <br> + * limitations under the License. + * <p> + * Initial code contributed and copyrighted by<br> + * frentix GmbH, http://www.frentix.com + * <p> + */ package org.olat.restapi.system; import java.util.List; diff --git a/src/main/java/org/olat/restapi/system/vo/BigBlueButtonStatisticsVO.java b/src/main/java/org/olat/restapi/system/vo/BigBlueButtonStatisticsVO.java index 1ef9420e57b31a6d7df2885053e7e076b3c7f22e..da0d4045cf4db03b9a3e22ecc25d45838f9c098c 100644 --- a/src/main/java/org/olat/restapi/system/vo/BigBlueButtonStatisticsVO.java +++ b/src/main/java/org/olat/restapi/system/vo/BigBlueButtonStatisticsVO.java @@ -1,3 +1,22 @@ +/** + * <a href="http://www.openolat.org"> + * OpenOLAT - Online Learning and Training</a><br> + * <p> + * Licensed under the Apache License, Version 2.0 (the "License"); <br> + * you may not use this file except in compliance with the License.<br> + * You may obtain a copy of the License at the + * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> + * <p> + * Unless required by applicable law or agreed to in writing,<br> + * software distributed under the License is distributed on an "AS IS" BASIS, <br> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> + * See the License for the specific language governing permissions and <br> + * limitations under the License. + * <p> + * Initial code contributed and copyrighted by<br> + * frentix GmbH, http://www.frentix.com + * <p> + */ package org.olat.restapi.system.vo; import javax.xml.bind.annotation.XmlAccessType;