diff --git a/FrontEnd/src/app/flashcards/flashcards-add-csv/flashcards-add-csv.component.ts b/FrontEnd/src/app/flashcards/flashcards-add-csv/flashcards-add-csv.component.ts index 0633fb3..906065e 100644 --- a/FrontEnd/src/app/flashcards/flashcards-add-csv/flashcards-add-csv.component.ts +++ b/FrontEnd/src/app/flashcards/flashcards-add-csv/flashcards-add-csv.component.ts @@ -16,7 +16,7 @@ export class FlashcardsAddCsvComponent implements OnInit { progress: { percentage: number } = { percentage: 0 }; currentUser = JSON.parse(localStorage.getItem('currentUser')); user: string; - permission: Boolean = true; + permission: Boolean = false; constructor(private uploadService: FlashcardsService, private router: Router, public snackBar: MatSnackBar) { } ngOnInit() { this.isLoggedIn(); } diff --git a/FrontEnd/src/app/flashcards/flashcards-add-table/flashcards-add-table.component.ts b/FrontEnd/src/app/flashcards/flashcards-add-table/flashcards-add-table.component.ts index c3221b1..2a3b72e 100644 --- a/FrontEnd/src/app/flashcards/flashcards-add-table/flashcards-add-table.component.ts +++ b/FrontEnd/src/app/flashcards/flashcards-add-table/flashcards-add-table.component.ts @@ -14,7 +14,7 @@ export class FlashcardsAddTableComponent implements OnInit { public fieldArray: Array = []; newAttribute: any = {}; currentUser; - permission: Boolean = true; + permission: Boolean = false; constructor(private flashcardsService: FlashcardsService, public snackBar: MatSnackBar) { } diff --git a/FrontEnd/src/app/materials/materials-add/materials-add.component.ts b/FrontEnd/src/app/materials/materials-add/materials-add.component.ts index 8c66bfe..af5f54a 100644 --- a/FrontEnd/src/app/materials/materials-add/materials-add.component.ts +++ b/FrontEnd/src/app/materials/materials-add/materials-add.component.ts @@ -18,7 +18,7 @@ export class MaterialsAddComponent implements OnInit { currentUser = JSON.parse(localStorage.getItem('currentUser')); user: string; title: string; - permission: Boolean = true; + permission: Boolean = false; constructor(private uploadService: MaterialsService, private router: Router, public snackBar: MatSnackBar) { } diff --git a/FrontEnd/src/app/tests/gaps-question/gaps-question.component.html b/FrontEnd/src/app/tests/gaps-question/gaps-question.component.html index 9421f2e..d94fa2b 100644 --- a/FrontEnd/src/app/tests/gaps-question/gaps-question.component.html +++ b/FrontEnd/src/app/tests/gaps-question/gaps-question.component.html @@ -12,6 +12,10 @@

Wprowadź treść pytania:

+

Wpisz tekst widoczny i tekst luki (luka może mieć więcej niż 1 dobrą odpowiedź - każdą odpowiedź oddziel średnikiem).

diff --git a/FrontEnd/src/app/tests/gaps-question/gaps-question.component.ts b/FrontEnd/src/app/tests/gaps-question/gaps-question.component.ts index 92788d5..60f2e1d 100644 --- a/FrontEnd/src/app/tests/gaps-question/gaps-question.component.ts +++ b/FrontEnd/src/app/tests/gaps-question/gaps-question.component.ts @@ -20,6 +20,7 @@ export class GapsQuestionComponent implements OnInit { answersCorrect: Array = []; answers: Array = []; question: String = 'Uzupełnij luki w tekście:'; + time = 0; points: Number = 1; id: Number = null; @@ -31,6 +32,7 @@ export class GapsQuestionComponent implements OnInit { ngOnInit() { if (this.edit) { this.content['edit'] = true; + this.time = this.content['content']['time']; this.question = this.content['content']['question']; const answ = this.content['content']['answers']; this.id = this.content['content']['id']; @@ -42,6 +44,7 @@ export class GapsQuestionComponent implements OnInit { id: null, type: 'gaps', question: 'Uzupełnij luki w tekście.', + time: 0, answers: [], points: 1 }; @@ -185,6 +188,7 @@ export class GapsQuestionComponent implements OnInit { this.content['content']['question'] = this.question; this.content['content']['answers'] = this.answers; this.content['content']['points'] = this.points; + this.content['content']['time'] = this.time; this.content['content']['id'] = this.id; if (this.edit) { this.editing.emit(this.content); @@ -210,6 +214,7 @@ export class GapsQuestionComponent implements OnInit { this.content = {}; this.edit = false; this.question = ''; + this.time = 0; this.answers = []; this.noGapText = ''; this.gapText = ''; diff --git a/FrontEnd/src/app/tests/multiple-choice-question/multiple-choice-question.component.html b/FrontEnd/src/app/tests/multiple-choice-question/multiple-choice-question.component.html index ea1bc81..632981e 100644 --- a/FrontEnd/src/app/tests/multiple-choice-question/multiple-choice-question.component.html +++ b/FrontEnd/src/app/tests/multiple-choice-question/multiple-choice-question.component.html @@ -12,6 +12,10 @@

Wprowadź treść pytania:

+

Wpisz możliwe odpowiedzi i zaznacz prawidłową:

diff --git a/FrontEnd/src/app/tests/multiple-choice-question/multiple-choice-question.component.ts b/FrontEnd/src/app/tests/multiple-choice-question/multiple-choice-question.component.ts index 9ed5c11..34ba59f 100644 --- a/FrontEnd/src/app/tests/multiple-choice-question/multiple-choice-question.component.ts +++ b/FrontEnd/src/app/tests/multiple-choice-question/multiple-choice-question.component.ts @@ -21,6 +21,7 @@ export class MultipleChoiceQuestionComponent implements OnInit { }; question: String = ''; points: Number = 1; + time = 0; id: Number = null; @Output() private add: EventEmitter = new EventEmitter(); @@ -32,6 +33,7 @@ export class MultipleChoiceQuestionComponent implements OnInit { if (this.edit) { this.content['edit'] = true; this.question = this.content['content']['question']; + this.time = this.content['content']['time']; this.answers = []; const answ = this.content['content']['answers']; this.id = this.content['content']['id']; @@ -49,6 +51,7 @@ export class MultipleChoiceQuestionComponent implements OnInit { id: this.id, type: 'multiple-choice', question: '', + time: 0, answers: [], points: 1 }; @@ -141,6 +144,7 @@ export class MultipleChoiceQuestionComponent implements OnInit { this.content['content']['question'] = this.question; this.answers = this.answersCorrect; this.content['content']['answers'] = this.answers; + this.content['content']['time'] = this.time; this.content['content']['points'] = this.points; this.content['content']['id'] = this.id; if (this.edit) { @@ -169,6 +173,7 @@ export class MultipleChoiceQuestionComponent implements OnInit { this.edit = false; this.isChecked = false; this.question = ''; + this.time = 0; this.answers = []; this.answersCorrect = []; this.newAttribute = {}; diff --git a/FrontEnd/src/app/tests/pairs-question/pairs-question.component.html b/FrontEnd/src/app/tests/pairs-question/pairs-question.component.html index ad76b9b..e464571 100644 --- a/FrontEnd/src/app/tests/pairs-question/pairs-question.component.html +++ b/FrontEnd/src/app/tests/pairs-question/pairs-question.component.html @@ -12,6 +12,10 @@

Wprowadź treść pytania:

+

Wpisz wszystkie dopasowania:

diff --git a/FrontEnd/src/app/tests/pairs-question/pairs-question.component.ts b/FrontEnd/src/app/tests/pairs-question/pairs-question.component.ts index a4f1eec..5109eb1 100644 --- a/FrontEnd/src/app/tests/pairs-question/pairs-question.component.ts +++ b/FrontEnd/src/app/tests/pairs-question/pairs-question.component.ts @@ -20,6 +20,7 @@ export class PairsQuestionComponent implements OnInit { }; question: String = 'Połącz w pary:'; points: Number = 1; + time = 0; id: Number = null; @Output() add: EventEmitter = new EventEmitter(); @@ -32,6 +33,7 @@ export class PairsQuestionComponent implements OnInit { this.answers = []; this.content['edit'] = true; this.question = this.content['content']['question']; + this.time = this.content['content']['time']; this.id = this.content['content']['id']; const answ = this.content['content']['answers']; for (let i = 0; i < answ.length; i++) { @@ -48,6 +50,7 @@ export class PairsQuestionComponent implements OnInit { id: null, type: 'pairs', question: 'Połącz w pary.', + time: 0, answers: [], points: 1 }; @@ -131,6 +134,7 @@ export class PairsQuestionComponent implements OnInit { } } if (!exists) { + this.content['content']['time'] = this.time; this.content['content']['question'] = this.question; this.answers = this.answersCorrect; this.content['content']['answers'] = this.answers; @@ -161,6 +165,7 @@ export class PairsQuestionComponent implements OnInit { this.content = {}; this.edit = false; this.question = ''; + this.time = 0; this.answers = []; this.answersCorrect = []; this.newAttribute = {}; diff --git a/FrontEnd/src/app/tests/puzzle-question/puzzle-question.component.html b/FrontEnd/src/app/tests/puzzle-question/puzzle-question.component.html index eab16ba..dbed39d 100644 --- a/FrontEnd/src/app/tests/puzzle-question/puzzle-question.component.html +++ b/FrontEnd/src/app/tests/puzzle-question/puzzle-question.component.html @@ -12,6 +12,10 @@

Wprowadź treść pytania:

+

Wpisz kolejno wszystkie elementy rozsypanki:

diff --git a/FrontEnd/src/app/tests/puzzle-question/puzzle-question.component.ts b/FrontEnd/src/app/tests/puzzle-question/puzzle-question.component.ts index bdb5737..bb49bad 100644 --- a/FrontEnd/src/app/tests/puzzle-question/puzzle-question.component.ts +++ b/FrontEnd/src/app/tests/puzzle-question/puzzle-question.component.ts @@ -19,6 +19,7 @@ export class PuzzleQuestionComponent implements OnInit { }; question: String = 'Ułóż elementy w prawidłowej kolejności:'; points: Number = 1; + time = 0; id: Number = null; idAnsw: Number = null; @@ -31,6 +32,7 @@ export class PuzzleQuestionComponent implements OnInit { if (this.edit) { this.content['edit'] = true; this.question = this.content['content']['question']; + this.time = this.content['content']['time']; this.id = this.content['content']['id']; this.answers = []; const answ = this.content['content']['answers'][0]['correct']; @@ -47,6 +49,7 @@ export class PuzzleQuestionComponent implements OnInit { type: 'puzzle', question: 'Ułóż elementy w prawidłowej kolejności.', answers: [], + time: 0, points: 1 }; this.content['edit'] = false; @@ -120,6 +123,7 @@ export class PuzzleQuestionComponent implements OnInit { this.content['content']['question'] = this.question; this.content['content']['answers'] = this.answers; this.content['content']['points'] = this.points; + this.content['content']['time'] = this.time; this.content['content']['id'] = this.id; if (this.edit) { this.editing.emit(this.content); @@ -157,6 +161,7 @@ export class PuzzleQuestionComponent implements OnInit { this.content = {}; this.edit = false; this.question = ''; + this.time = 0; this.answers = []; this.answersCorrect = []; this.newAttribute = {}; diff --git a/FrontEnd/src/app/tests/single-choice-question/single-choice-question.component.html b/FrontEnd/src/app/tests/single-choice-question/single-choice-question.component.html index 9a9b527..3065677 100644 --- a/FrontEnd/src/app/tests/single-choice-question/single-choice-question.component.html +++ b/FrontEnd/src/app/tests/single-choice-question/single-choice-question.component.html @@ -12,6 +12,10 @@

Wprowadź treść pytania:

+

Wpisz możliwe odpowiedzi i zaznacz prawidłową:

diff --git a/FrontEnd/src/app/tests/single-choice-question/single-choice-question.component.ts b/FrontEnd/src/app/tests/single-choice-question/single-choice-question.component.ts index f1c081e..40e3e70 100644 --- a/FrontEnd/src/app/tests/single-choice-question/single-choice-question.component.ts +++ b/FrontEnd/src/app/tests/single-choice-question/single-choice-question.component.ts @@ -21,6 +21,7 @@ export class SingleChoiceQuestionComponent implements OnInit { }; question: String = ''; points: Number = 1; + time = 0; id: Number = null; @Output() add: EventEmitter = new EventEmitter(); @@ -34,6 +35,7 @@ export class SingleChoiceQuestionComponent implements OnInit { this.question = this.content['content']['question']; this.answers = []; const answ = this.content['content']['answers']; + this.time = this.content['content']['time']; this.id = this.content['content']['id']; for (let i = 0; i < answ.length; i++) { this.answersCorrect.push({ @@ -50,7 +52,8 @@ export class SingleChoiceQuestionComponent implements OnInit { type: 'single-choice', question: '', answers: [], - points: 1 + points: 1, + time: 0 }; this.content['edit'] = false; } @@ -157,6 +160,7 @@ export class SingleChoiceQuestionComponent implements OnInit { this.answers = this.answersCorrect; this.content['content']['answers'] = this.answers; this.content['content']['points'] = this.points; + this.content['content']['time'] = this.time; if (this.edit) { this.editing.emit(this.content); } else { @@ -184,6 +188,7 @@ export class SingleChoiceQuestionComponent implements OnInit { this.edit = false; this.isChecked = false; this.question = ''; + this.time = 0; this.answers = []; this.answersCorrect = []; this.newAttribute = {}; diff --git a/FrontEnd/src/app/tests/test-edit/test-edit.component.css b/FrontEnd/src/app/tests/test-edit/test-edit.component.css index 8285305..7a4c3bc 100644 --- a/FrontEnd/src/app/tests/test-edit/test-edit.component.css +++ b/FrontEnd/src/app/tests/test-edit/test-edit.component.css @@ -29,6 +29,10 @@ label { margin-left: 1rem; } +.table { + color: #FFF !important; +} + .table td { border-top-width: 0; } diff --git a/FrontEnd/src/app/tests/test-edit/test-edit.component.ts b/FrontEnd/src/app/tests/test-edit/test-edit.component.ts index f2264cc..90dd866 100644 --- a/FrontEnd/src/app/tests/test-edit/test-edit.component.ts +++ b/FrontEnd/src/app/tests/test-edit/test-edit.component.ts @@ -57,6 +57,7 @@ export class TestEditComponent implements OnInit, OnDestroy { id: d[i]['id'], type: d[i]['type'], question: d[i]['question'], + time: d[i]['time'], answers: d[i]['answers'], points: d[i]['points'] }, @@ -213,6 +214,7 @@ export class TestEditComponent implements OnInit, OnDestroy { nr: this.test[i]['nr'], type: this.test[i]['content']['type'], question: this.test[i]['content']['question'], + time: this.test[i]['content']['time'], answers: this.test[i]['content']['answers'], points: this.test[i]['content']['points'], id: this.test[i]['content']['id'] diff --git a/FrontEnd/src/app/tests/test-maker/test-maker.component.css b/FrontEnd/src/app/tests/test-maker/test-maker.component.css index 8285305..7a4c3bc 100644 --- a/FrontEnd/src/app/tests/test-maker/test-maker.component.css +++ b/FrontEnd/src/app/tests/test-maker/test-maker.component.css @@ -29,6 +29,10 @@ label { margin-left: 1rem; } +.table { + color: #FFF !important; +} + .table td { border-top-width: 0; } diff --git a/FrontEnd/src/app/tests/test-maker/test-maker.component.html b/FrontEnd/src/app/tests/test-maker/test-maker.component.html index ef3cbd0..25c30b4 100644 --- a/FrontEnd/src/app/tests/test-maker/test-maker.component.html +++ b/FrontEnd/src/app/tests/test-maker/test-maker.component.html @@ -50,6 +50,7 @@ Lp. Typ Punkty + Czas na odpowiedź Pytanie Usuń Przenieś @@ -72,6 +73,8 @@ *ngIf='question.content.type == "pairs"'>Łączenie w pary {{ question.content.points }} + {{ question.content.time }} {{ question.shortcut }} diff --git a/FrontEnd/src/app/tests/test-maker/test-maker.component.ts b/FrontEnd/src/app/tests/test-maker/test-maker.component.ts index 9284efd..fa0e510 100644 --- a/FrontEnd/src/app/tests/test-maker/test-maker.component.ts +++ b/FrontEnd/src/app/tests/test-maker/test-maker.component.ts @@ -11,7 +11,7 @@ export class TestMakerComponent implements OnInit { owner: Number = 0; title: String = ''; - permission: Boolean = true; + permission: Boolean = false; test: Array = []; shown: Boolean = false; @@ -159,6 +159,7 @@ export class TestMakerComponent implements OnInit { nr: this.test[i]['nr'], type: this.test[i]['content']['type'], question: this.test[i]['content']['question'], + time: this.test[i]['content']['time'], answers: this.test[i]['content']['answers'], points: this.test[i]['content']['points'], id: this.test[i]['content']['id'] diff --git a/FrontEnd/src/app/tests/test_model.ts b/FrontEnd/src/app/tests/test_model.ts index dd95c1e..4b8bfb3 100644 --- a/FrontEnd/src/app/tests/test_model.ts +++ b/FrontEnd/src/app/tests/test_model.ts @@ -18,6 +18,7 @@ export class TestResource { public id: number; public points: number; public question: string; + public time: string; public nr: number; public answers: Answer[]; diff --git a/FrontEnd/src/app/tests/true-false-question/true-false-question.component.html b/FrontEnd/src/app/tests/true-false-question/true-false-question.component.html index e9cfe3e..fac8dc4 100644 --- a/FrontEnd/src/app/tests/true-false-question/true-false-question.component.html +++ b/FrontEnd/src/app/tests/true-false-question/true-false-question.component.html @@ -12,6 +12,10 @@

Wprowadź treść pytania:

+

Zaznacz prawidłową odpowiedź: