preview.page.html 3.57 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<ion-header>
    <ion-toolbar>
        <div class="toolbar-left">
            <ion-back-button icon="arrow-round-back" defaultHref="home"></ion-back-button>
            <ion-title>{{ 'PREVIEW' | translate }}</ion-title>
        </div>
        <div class="toolbar-right">
            <ion-spinner *ngIf="HelperService.isLoading"></ion-spinner>
            <button (click)="HelperService.goToHomePage(navCtrl)">
                <ion-icon name="home"></ion-icon>
            </button>
        </div>
    </ion-toolbar>
</ion-header>


<ion-content padding>
18
    <div *ngIf="corpusService.annisResponse.solutions; else loading">
19 20 21 22
        <ion-grid>
            <ion-row *ngIf="HelperService.isVocabularyCheck">
                <ion-col>
                    <label>{{ "EXERCISE_NO_OOV" | translate}}
23
                        <input type="checkbox" [(ngModel)]="exerciseService.excludeOOV" (ngModelChange)="switchOOV()"/>
24 25 26 27 28 29 30
                    </label>
                    <br>
                </ion-col>
            </ion-row>
            <ion-row>
                <ion-col>
                    <!-- TODO: enable solution shuffling for H5P ? -->
31
                    <div *ngIf="[ExerciseType.cloze, ExerciseType.matching].includes(corpusService.exercise.type)"
32 33 34 35 36 37 38
                         class="h5p-container"></div>
                </ion-col>
            </ion-row>
            <ion-row>
                <!-- This is preferable compared to a button click event, because the browser knows from the
beginning that it is going to be a download (instead of an ordinary link or click). -->
                <ion-col>
39 40
                    <a href="{{urlBase + FileType[FileType.pdf] + solutionIndicesString}}"
                       download>{{ 'FILE_TYPE_PDF' | translate }}</a>
41 42 43 44 45 46 47 48 49
                </ion-col>
                <ion-col>
                    <a href="{{urlBase + FileType[FileType.xml] + solutionIndicesString}}" download>{{ 'FILE_TYPE_XML' |
                        translate }}</a>
                </ion-col>
                <ion-col>
                    <a href="{{urlBase + FileType[FileType.docx] + solutionIndicesString}}" download>{{ 'FILE_TYPE_DOCX'
                        | translate }}</a>
                </ion-col>
50
                <ion-col>
51
                    <a href="{{HelperService.config['developerMailTo']}}">{{ 'EMAIL_ERROR' | translate }}</a>
52
                </ion-col>
53 54 55
            </ion-row>
            <ion-row>
                <ion-col>
56 57 58
                    <h4 (click)="showInstructions = !showInstructions" class="pointer">
                        <button *ngIf="showInstructions; else dropright">
                            <ion-icon name="arrow-dropdown"></ion-icon>
59
                        </button>
60 61 62 63 64 65 66
                        <ng-template #dropright>
                            <button>
                                <ion-icon name="arrow-dropright"></ion-icon>
                            </button>
                        </ng-template>
                        <span>{{ 'EXERCISE_DOWNLOAD_NEXT_STEPS' | translate }}</span>
                    </h4>
67 68 69 70 71 72 73 74 75 76 77 78 79 80
                    <ol *ngIf="showInstructions">
                        <li>{{ 'INSTRUCTION_LOGIN_MOODLE' | translate }}</li>
                        <li>{{ 'INSTRUCTION_COGWHEEL_MORE' | translate }}</li>
                        <li>{{ 'INSTRUCTION_GO_TO_QUESTION_BANK' | translate }}</li>
                        <li>{{ 'INSTRUCTION_CHOOSE_FORMAT_AND_IMPORT' | translate }}</li>
                    </ol>
                </ion-col>
            </ion-row>
        </ion-grid>
    </div>
    <ng-template #loading>
        <ion-spinner></ion-spinner>
    </ng-template>
</ion-content>