Skip to content

Commit

Permalink
Merge branch 'dev' into CSCEXAM-1356
Browse files Browse the repository at this point in the history
  • Loading branch information
VirmasaloA authored Oct 25, 2024
2 parents 4524d82 + 9774106 commit 48c0686
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 55 deletions.
16 changes: 4 additions & 12 deletions app/system/SystemInitializer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,18 @@ import impl.mail.EmailComposer
import io.ebean.DB
import miscellaneous.config.ConfigReader
import models.user.User
import org.apache.pekko.actor.ActorRef
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.actor.Cancellable
import org.joda.time.DateTime
import org.joda.time.DateTimeConstants
import org.joda.time.DateTimeZone
import org.joda.time.Seconds
import org.apache.pekko.actor.{ActorRef, ActorSystem, Cancellable}
import org.joda.time.{DateTime, DateTimeConstants, DateTimeZone, Seconds}
import play.api.inject.ApplicationLifecycle
import play.api.{Environment, Logging, Mode}
import repository.DatabaseExecutionContext

import java.nio.charset.Charset
import java.util.concurrent.TimeUnit
import javax.inject.Inject
import javax.inject.Named
import javax.inject.Singleton
import javax.inject.{Inject, Named, Singleton}
import scala.concurrent.Future
import scala.concurrent.duration.Duration
import scala.concurrent.duration.FiniteDuration
import scala.jdk.CollectionConverters._
import scala.jdk.CollectionConverters.*
import scala.util.control.Exception.catching

@Singleton
Expand Down
1 change: 1 addition & 0 deletions app/system/actors/ExamAutoSaverActor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class ExamAutoSaverActor @Inject (private val composer: EmailComposer, private v
participation.setDeadline(deadline)
participation.save()
logger.info(s"Setting exam ${exam.getId} state to REVIEW")
exam.setState(Exam.State.REVIEW)
exam.save()
if exam.isPrivate then
// Notify teachers
Expand Down
1 change: 0 additions & 1 deletion ui/src/app/calendar/calendar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ export class CalendarComponent implements OnInit {
isCollaborative: this.isCollaborative,
},
}),
error: (err) => this.toast.error(err),
});
}

Expand Down
38 changes: 19 additions & 19 deletions ui/src/app/calendar/helpers/selected-room.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,6 @@ import { OrderByPipe } from 'src/app/shared/sorting/order-by.pipe';
}
</div>
</div>
@if (thisWeeksMaintenancePeriods().length > 0) {
<div class="row mt-2">
<div class="col-md-2 col-12">{{ 'i18n_maintenance_periods' | translate }}:</div>
<div class="col-md-10 col-12">
@for (period of thisWeeksMaintenancePeriods() | orderBy: 'startsAt'; track period.id) {
<div>
{{ period.startsAt | date: 'dd.MM.yyyy HH:mm' }} -
{{ period.endsAt | date: 'dd.MM.yyyy HH:mm' }}
{{ period.description }}
<span *ngIf="period.remote" class="text-danger">(remote)</span>
</div>
}
</div>
</div>
} @else {
<div class="row mt-2">
<div class="">{{ 'i18n_no_maintenance_periods_this_week' | translate }}</div>
</div>
}
@if (exceptionHours().length > 0) {
<div class="row mt-2">
<div class="col-md-2 col-12">{{ 'i18n_exception_datetimes' | translate }}:</div>
Expand All @@ -81,6 +62,25 @@ import { OrderByPipe } from 'src/app/shared/sorting/order-by.pipe';
<div class="">{{ 'i18n_no_exceptions_this_week' | translate }}</div>
</div>
}
@if (thisWeeksMaintenancePeriods().length > 0) {
<div class="row mt-2">
<div class="col-md-2 col-12">{{ 'i18n_maintenance_periods' | translate }}:</div>
<div class="col-md-10 col-12">
@for (period of thisWeeksMaintenancePeriods() | orderBy: 'startsAt'; track period.id) {
<div>
{{ period.startsAt | date: 'dd.MM.yyyy HH:mm' }} -
{{ period.endsAt | date: 'dd.MM.yyyy HH:mm' }}
{{ period.description }}
<span *ngIf="period.remote" class="text-danger">(remote)</span>
</div>
}
</div>
</div>
} @else {
<div class="row mt-2">
<div class="">{{ 'i18n_no_maintenance_periods_this_week' | translate }}</div>
</div>
}
@if (getRoomInstructions()) {
<div class="row mt-2">
<div class="col-md-2 col-12">{{ 'i18n_instructions' | translate }}:</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import type { User } from 'src/app/session/session.model';

@Component({
selector: 'xm-exam-participant-selector',
template: `<div class="row">
template: ` <div class="row">
<div class="col-md-9 offset-md-3">
<input
type="text"
Expand All @@ -39,7 +39,7 @@ import type { User } from 'src/app/session/session.model';
</div>
<div class="row mt-1">
<span class="row col-md-9 w-auto text-break mt-3">
<span class="col-md-9 offset-md-3 w-auto text-break mt-2">
{{ 'i18n_maturity_exam_participants_info' | translate }}
@if (exam.state === 'PUBLISHED') {
{{ 'i18n_exam_published' | translate }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { User } from 'src/app/session/session.model';
</div>
<div class="row mt-1">
<span class="row col-md-9 offset-md-3 w-auto text-break">
<span class="col-md-9 mt-2 offset-md-3 w-auto text-break">
{{ 'i18n_maturity_exam_participants_info' | translate }}
@if (exam.state === 'PUBLISHED') {
{{ 'i18n_exam_published' | translate }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,16 @@ import { OrganisationSelectorComponent } from './organisation-picker.component';
</label>
</div>
</div>
}
<!-- Exam participants -->
@if (visibleParticipantSelector() === 'participant') {
<xm-exam-participant-selector [exam]="exam()"></xm-exam-participant-selector>
}
<!-- Exam participants -->
@if (visibleParticipantSelector() === 'participant') {
<xm-exam-participant-selector [exam]="exam()"></xm-exam-participant-selector>
}
<!-- Exam pre-participants -->
@if (visibleParticipantSelector() === 'pre-participant') {
<xm-exam-pre-participant-selector [exam]="exam()"></xm-exam-pre-participant-selector>
<!-- Exam pre-participants -->
@if (visibleParticipantSelector() === 'pre-participant') {
<xm-exam-pre-participant-selector [exam]="exam()"></xm-exam-pre-participant-selector>
}
}
@if (collaborative()) {
<xm-collaborative-exam-owner-selector [exam]="exam()"> </xm-collaborative-exam-owner-selector>
<xm-exam-organisation-selector [exam]="exam()"></xm-exam-organisation-selector>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
</div>

<!-- Participant selections -->
@if (exam.executionType.type !== 'PUBLIC') {
@if (exam.executionType.type !== 'PUBLIC' || collaborative()) {
<xm-exam-publication-participants
[collaborative]="collaborative()"
[exam]="exam"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ export class CollaborativeAssesmentService {
);
dialog.subscribe({
next: () => this.sendAssessment(newState, payload, messages, participation, id, ref),
error: (err) => this.toast.error(err),
});
}
}
Expand Down
18 changes: 9 additions & 9 deletions ui/src/assets/i18n/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1181,13 +1181,13 @@
"i18n_datepicker": "Päivämäärävalitsin",
"i18n_move_question": "Vaihda kysymysten järjestystä raahaamalla tästä",
"i18n_no_maintenance_periods_this_week": "Ei huoltokatkoja tällä viikolla",
"i18n_no_exceptions_this_week": "Ei poikkeusaukioloaikoja tällä viikolla",
"i18n_finished_exam_participants": "Opiskelijat jotka ovat suorittaneet tentin",
"i18n_maturity_exam_participants_info": "Osallistujan voi poistaa tentistä vain ennen tentin julkaisua.",
"i18n_exam_published": "Tämä tentti on julkaistu.",
"i18n_exam_not_published": "Tätä tenttiä ei ole julkaistu.",
"i18n_show_participants": "Näytä osallistujat",
"i18n_hide_participants": "Piilota osallistujat",
"i18n_exam_owner_info": "Tentissä pitää olla vähintään yksi tentaattori.",
"i18n_csv_uploading_cancelled": "CSV tiedoston tuonti peruutettu"
"i18n_no_exceptions_this_week": "Ei poikkeusaukioloaikoja tällä viikolla",
"i18n_finished_exam_participants": "Opiskelijat jotka ovat suorittaneet tentin",
"i18n_maturity_exam_participants_info": "Osallistujan voi poistaa tentistä vain ennen tentin julkaisua.",
"i18n_exam_published": "Tämä tentti on julkaistu.",
"i18n_exam_not_published": "Tätä tenttiä ei ole julkaistu.",
"i18n_show_participants": "Näytä osallistujat",
"i18n_hide_participants": "Piilota osallistujat",
"i18n_exam_owner_info": "Tentissä pitää olla vähintään yksi tentaattori.",
"i18n_csv_uploading_cancelled": "CSV tiedoston tuonti peruutettu"
}

0 comments on commit 48c0686

Please sign in to comment.