Skip to content

Commit

Permalink
CSCEXAM-000 Found minor refactoring problems with collab exams, fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
lupari committed Oct 24, 2024
1 parent 6ff0699 commit 9774106
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 35 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
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 9774106

Please sign in to comment.