preview.page.html 3.66 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
<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>
            <button (click)="HelperService.goToFeedbackPage(navCtrl)">
                <ion-icon name="help-circle"></ion-icon>
            </button>
        </div>
    </ion-toolbar>
</ion-header>


<ion-content padding>
    <div *ngIf="exerciseService.annisResponse.solutions; else loading">
        <ion-grid>
            <ion-row *ngIf="HelperService.isVocabularyCheck">
                <ion-col>
                    <label>{{ "EXERCISE_NO_OOV" | translate}}
                        <input type="checkbox" [(ngModel)]="exerciseService.excludeOOV" (click)="switchOOV()"/>
                    </label>
                    <br>
                </ion-col>
            </ion-row>
            <ion-row>
                <ion-col>
                    <!-- TODO: enable solution shuffling for H5P ? -->
                    <div *ngIf="[ExerciseType.cloze, ExerciseType.matching].includes(exerciseService.exercise.type)"
                         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>
                    <a href="{{urlBase + FileType[FileType.pdf] + solutionIndicesString}}" download>{{ 'FILE_TYPE_PDF' |
                        translate }}</a>
                </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>
53 54 55
                <ion-col>
                        <a href="{{HelperService.config['developerMailTo']}}">{{ 'EMAIL_ERROR' | translate }}</a>
                </ion-col>
56 57 58 59 60 61 62 63 64 65 66
            </ion-row>
            <ion-row>
                <ion-col>
                    <button *ngIf="showInstructions; else dropright" (click)="showInstructions = !showInstructions">
                        <ion-icon name="arrow-dropdown"></ion-icon>
                    </button>
                    <ng-template #dropright>
                        <button (click)="showInstructions = !showInstructions">
                            <ion-icon name="arrow-dropright"></ion-icon>
                        </button>
                    </ng-template>
67
                    <h4>{{ 'EXERCISE_DOWNLOAD_NEXT_STEPS' | translate }}</h4>
68 69 70 71 72 73 74 75 76 77 78 79 80 81
                    <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>