preview.page.html 4.04 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
        <ion-grid>
20 21 22 23 24 25
            <ion-row>
                <ion-col>
                    <ion-button
                            (click)="HelperService.goToTextRangePage(navCtrl)">{{ "CHANGE_TEXT_RANGE" | translate}}</ion-button>
                </ion-col>
            </ion-row>
26 27
            <ion-row *ngIf="HelperService.isVocabularyCheck">
                <ion-col>
28
                    <label>
29
                        <input type="checkbox" [(ngModel)]="exerciseService.excludeOOV" (ngModelChange)="switchOOV()"/>
30
                        <span class="checkbox">{{ "EXERCISE_NO_OOV" | translate}}</span>
31 32 33 34 35 36 37
                    </label>
                    <br>
                </ion-col>
            </ion-row>
            <ion-row>
                <ion-col>
                    <!-- TODO: enable solution shuffling for H5P ? -->
38
                    <div *ngIf="corpusService.exercise.type !== ExerciseType.kwic" class="h5p-container"></div>
39 40 41 42 43 44
                </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>
45 46
                    <a href="{{urlBase + FileType[FileType.pdf] + solutionIndicesString}}"
                       download>{{ 'FILE_TYPE_PDF' | translate }}</a>
47
                </ion-col>
48 49
                <!--                TODO: ADD MOODLE SUPPORT FOR MARK WORDS EXERCISES -->
                <ion-col *ngIf="corpusService.exercise.type !== ExerciseType.markWords">
50 51 52 53 54 55 56
                    <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>
57
                <ion-col>
58
                    <a href="{{HelperService.config['developerMailTo']}}">{{ 'EMAIL_ERROR' | translate }}</a>
59
                </ion-col>
60
            </ion-row>
61
            <ion-row *ngIf="corpusService.exercise.type !== ExerciseType.markWords">
62
                <ion-col>
63 64 65
                    <h4 (click)="showInstructions = !showInstructions" class="pointer">
                        <button *ngIf="showInstructions; else dropright">
                            <ion-icon name="arrow-dropdown"></ion-icon>
66
                        </button>
67 68 69 70 71 72 73
                        <ng-template #dropright>
                            <button>
                                <ion-icon name="arrow-dropright"></ion-icon>
                            </button>
                        </ng-template>
                        <span>{{ 'EXERCISE_DOWNLOAD_NEXT_STEPS' | translate }}</span>
                    </h4>
74 75 76 77 78 79 80 81 82 83 84 85 86 87
                    <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>