<!--测试结果-->
<ion-header>
    <ion-navbar>
        <ion-title>学习测试</ion-title>
    </ion-navbar>
</ion-header>

<ion-content>
    <div class="main-container">
        <img class="bgc" src="./assets/imgs/learn/learning_background.png">
        <div class="learn-item">
            <div class="learn-title">{{title}}</div>
            <ng-container *ngIf="result?.markStatus == 0">
                <div class="item-container text-center">
                    <img class="margin-top-80" style="width: 4rem" src="./assets/imgs/learn/green_right.png" alt="">
                    <p class="margin-top-10">已交卷，请耐心等待测试结果</p>
                </div>
            </ng-container>
            <ng-container *ngIf="result?.markStatus == 1">
                <div class="item-container text-center">
                    <div class="item-title"><span>{{result?.score}}</span>分</div>
                    <div class="icon-star">
                        <ion-icon *ngFor="let item of starList" ngClass="{{item.class}}" name="star"></ion-icon>
                    </div>
                    <div class="item-content1">
                        <p class="color-999">测试用时</p>
                        <p>{{result.answerTime | formatTime}}</p>
                    </div>
                    <div class="item-content2">
                        <p>满分{{result?.fullmarks}}分</p>
                        <p>共计{{result?.fullCount}}题，答对{{result?.correctCount}}题</p>
                        <p class="color-red" *ngIf="result?.fullmarks *0.8 > result?.score">很遗憾，未能通过测试</p>
                        <p class="color-green" *ngIf="result?.fullmarks *0.8 < result?.score || result?.fullmarks *0.8 == result?.score">通过测试</p>
                    </div>
                    <div>
                        <button class="submit-btn submit" (click)="reviewTest()">测试回顾</button>
                        <button class="submit-btn submit" (click)="resetTest()">重新测试</button>
                    </div>
                </div>
            </ng-container>
        </div>
    </div>
</ion-content>
