Skip to content

Commit

Permalink
Merge branch 'dev' into CSCEXAM-1393
Browse files Browse the repository at this point in the history
  • Loading branch information
VirmasaloA authored Jan 10, 2025
2 parents 3a28437 + 227997f commit 3e86fed
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 61 deletions.
100 changes: 52 additions & 48 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,55 @@ name: Build
on: [push]

jobs:
build:
runs-on: ubuntu-latest

services:
postgres:
image: postgres
env:
POSTGRES_DB: exam_test
POSTGRES_USER: exam
POSTGRES_PASSWORD: exam
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Check REUSE compliance
uses: fsfe/reuse-action@v4

- name: Build UI
run: |
rm -rf node_modules
npm i
npm run check-format
npm run check-lint
npm run build
- name: Build backend and run tests
run: |
sed -i 's/\/var\/log\/exam/logs/g' $GITHUB_WORKSPACE/conf/logback.xml
sbt test
build:
runs-on: ubuntu-latest

services:
postgres:
image: postgres
env:
POSTGRES_DB: exam_test
POSTGRES_USER: exam
POSTGRES_PASSWORD: exam
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
cache: sbt

- name: Set up SBT
uses: sbt/setup-sbt@v1

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Check REUSE compliance
uses: fsfe/reuse-action@v4

- name: Build UI
run: |
rm -rf node_modules
npm i
npm run check-format
npm run check-lint
npm run build
- name: Build backend and run tests
run: |
sed -i 's/\/var\/log\/exam/logs/g' $GITHUB_WORKSPACE/conf/logback.xml
sbt test
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ import { QuestionService } from 'src/app/question/question.service';
</div>
@if (allowRemoval) {
<div (click)="removeOption()" class="col-md-1 question-option-trash">
<button (click)="removeOption()" class="col-md-1 question-option-trash btn btn-link">
<i class="bi-trash" title="{{ 'i18n_remove' | translate }}"></i>
</div>
</button>
}
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/question/basequestion/multiple-choice.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ import { WeightedMultipleChoiceOptionEditorComponent } from './weighted-multiple
}
<div class="row mt-3">
<div class="col-md-12">
<a (click)="addNewOption()" class="attachment-link pointer">
<button (click)="addNewOption()" class="attachment-link pointer btn btn-sm btn-link">
<i class="bi-plus"></i>
{{ 'i18n_question_add_new_option' | translate }}
</a>
</button>
</div>
</div>
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@ import { FixedPrecisionValidatorDirective } from 'src/app/shared/validation/fixe
[disabled]="lotteryOn"
/>
</div>
<div class="col-md-1 question-option-trash pointer" [hidden]="lotteryOn" (click)="removeOption()">
<button
class="col-md-1 question-option-trash pointer btn btn-link "
[hidden]="lotteryOn"
(click)="removeOption()"
>
<i class="bi-trash" title="{{ 'i18n_remove' | translate }}"></i>
</div>
</button>
</div>
</div>
`,
Expand Down
8 changes: 6 additions & 2 deletions ui/src/app/question/examquestion/multichoice.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,13 @@ import { ExamSectionQuestionOption } from 'src/app/question/question.model';
/>
}
</div>
<div [hidden]="lotteryOn()" (click)="removeOption(option)" class="col-md-1 question-option-trash">
<button
[hidden]="lotteryOn()"
(click)="removeOption(option)"
class="col-md-1 question-option-trash btn btn-link"
>
<i class="bi-trash" title="{{ 'i18n_remove' | translate }}"></i>
</div>
</button>
</div>
}
<div class="row mt-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ import { ExamSectionQuestionOption } from 'src/app/question/question.model';
[disabled]="lotteryOn()"
/>
</div>
<div
class="col-md-1 question-option-trash pointer"
<button
class="col-md-1 question-option-trash pointer btn btn-link"
[hidden]="lotteryOn()"
(click)="removeOption(option)"
>
<i class="bi-trash" title="{{ 'i18n_remove' | translate }}"></i>
</div>
</button>
</div>
}
<div class="row">
Expand All @@ -98,10 +98,10 @@ import { ExamSectionQuestionOption } from 'src/app/question/question.model';
</div>
<div class="row mt-2">
<div class="col-md-12">
<a (click)="addNewOption()" class="attachment-link pointer">
<button (click)="addNewOption()" class="attachment-link pointer btn btn-sm btn-link">
<i class="bi-plus"></i>
{{ 'i18n_question_add_new_option' | translate }}
</a>
</button>
</div>
</div>
`,
Expand Down

0 comments on commit 3e86fed

Please sign in to comment.