Skip to content

Commit

Permalink
Merge branch 'dev' into omistaja-kysymyspankkiin
Browse files Browse the repository at this point in the history
  • Loading branch information
VirmasaloA authored Feb 7, 2024
2 parents b7effb8 + c74dd9b commit b8751dc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion ui/src/app/exam/editor/exam-tabs.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ export class ExamTabsComponent implements OnInit, OnDestroy {
(x) => x.id === this.user.id || x.email.toLowerCase() === this.user.email.toLowerCase(),
);

navChanged = (event: NgbNavChangeEvent) => this.router.navigate([event.nextId], { relativeTo: this.route });
navChanged = (event: NgbNavChangeEvent) =>
this.router.navigate([event.nextId], {
relativeTo: this.route,
queryParams: { collaborative: this.collaborative },
});

examUpdated = (props: UpdateProps) => {
this.updateTitle(props.code, props.name);
Expand Down
5 changes: 4 additions & 1 deletion ui/src/app/exam/editor/sections/section.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,10 @@
<div class="row ms-2 me-2" [ngbCollapse]="!section.expanded">
<div class="col-md-12 mt-2">
<div id="exam" cdkDropList (cdkDropListDropped)="moveQuestion($event)" class="sortable no-padding mb-2">
@for (sectionQuestion of section.sectionQuestions; track sectionQuestion) {
@for (
sectionQuestion of section.sectionQuestions | orderBy: 'sequenceNumber';
track sectionQuestion.sequenceNumber
) {
<div cdkDrag cdkDragLockAxis="y" class="mb-4">
<div class="dragdrop-placeholder" *cdkDragPlaceholder></div>
<div class="drag-preview" *cdkDragPreview [innerHtml]="sectionQuestion.question.question"></div>
Expand Down
2 changes: 2 additions & 0 deletions ui/src/app/exam/editor/sections/section.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import { FileService } from '../../../shared/file/file.service';
import type { ExamMaterial, ExamSection, ExamSectionQuestion, Question } from '../../exam.model';
import { ExamService } from '../../exam.service';
import { SectionQuestionComponent } from './section-question.component';
import { OrderByPipe } from 'src/app/shared/sorting/order-by.pipe';

@Component({
selector: 'xm-section',
Expand All @@ -63,6 +64,7 @@ import { SectionQuestionComponent } from './section-question.component';
CdkDragPreview,
SectionQuestionComponent,
TranslateModule,
OrderByPipe,
],
})
export class SectionComponent {
Expand Down

0 comments on commit b8751dc

Please sign in to comment.