Skip to content

Commit

Permalink
Merge pull request #2320 from vishnubansaltarento/preview-assessment-…
Browse files Browse the repository at this point in the history
…issue-fix

preview assessment issue fix
  • Loading branch information
vishnubansaltarento authored Jul 15, 2024
2 parents a4a4fa9 + af25713 commit 6794f05
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
<ng-container *ngIf="!skeletonLoader">
<div class="mat-subheading-1 font-bold">{{ 'apptocsinglepage.summary' | translate }}</div>
<div [ngClass]="{'mob-desc-ellipsis': summary.ellipsis && isMobile, 'desc-ellipsis': summary.ellipsis && !isMobile}" #summaryElem>
<span class="mob-text">{{ handleCapitalize(content?.description) }}</span>
<span class="mob-text" [innerHtml]="handleCapitalize(content?.description)"></span>
<div class="ws-mat-default-text font-bold cursor-pointer text-sm" *ngIf="summary.viewLess" (click)="summary.ellipsis = !summary.ellipsis; summary.viewLess = !summary.viewLess">&nbsp;{{ 'apptocsinglepage.viewLess' | translate }}</div>
</div>
<div class="ws-mat-default-text font-bold text-sm" *ngIf="summary.ellipsis">
Expand Down Expand Up @@ -322,7 +322,7 @@
<ws-widget-skeleton-loader [width]="'100%'" [height]="'72px'"
[bindingClass]="'rounded'"></ws-widget-skeleton-loader>
</ng-container>
<ng-container *ngIf="!skeletonLoader">
<ng-container *ngIf="!skeletonLoader && !forPreview">
<div class="flex flex-col sm:flex-row items-center discussion-div">
<div class="flex-1 forum-content">
<div class="flex flex-col sm:flex-row gap-5 items-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ export class AppTocAboutComponent implements OnInit, OnChanges, AfterViewInit, O
}
}
}
this.forPreview = window.location.href.includes('/public/') || window.location.href.includes('&preview=true')
}

getSubThemes(): any[] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@
<!-- INVITE ONLY STANDALONE ASSESSMENT block-->
<ng-container
*ngIf="content?.primaryCategory === primaryCategory.STANDALONE_ASSESSMENT && !batchData?.enrolled && !enrollBtnLoading && content?.courseCategory === 'Invite-Only Assessment'">
<ng-container *ngIf="!forPreview || isInIFrame; else authView" i18n>

<ng-container *ngIf="!forPreview || isInIFrame; else authViewForInviteOnlyAssessment" i18n>
<span class="font-bold shadow-lg text-info-div" i18n>{{ 'apptochome.youAreNotInvitedForAssessment' | translate }} </span>
</ng-container>
</ng-container>
Expand Down Expand Up @@ -668,3 +668,12 @@
</ng-template>

<ng-template #authView i18n>{{'apptochome.view' | translate}}</ng-template>
<ng-template #authViewForInviteOnlyAssessment i18n>
<ng-container
*ngIf="forPreview && content?.courseCategory === 'Invite-Only Assessment'">
<a class="flex action-button justify-center resume" [routerLink]="firstResourceLink?.url"
[queryParams]="(resumeData && !certData) ? generateQuery('RESUME') : generateQuery('START')">
<ng-container>{{ 'apptochome.takeTest' | translate }}</ng-container>
</a>
</ng-container>
</ng-template>
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ <h2 class="summary-label">{{ 'practiceoverview.summary' | translate }}</h2>
</div> -->
<div class="flex justify-end gap-4 mt-3">
<ng-container *ngIf="currentPage !== 0">
<button (click)="previousPage()" mat-button class="flex gap-2 justify-center items-center blue-outline">
<button (click)="previousPage()" mat-button class="flex gap-2 justify-center items-center blue-outline mr-10">
<mat-icon class="navigation-icons">navigate_before</mat-icon>
<span class="ml-1">Previous</span>
</button>
</ng-container>
<ng-container *ngIf="currentPage + 1 < instructionAssessment?.length">
<button (click)="nextPage()" mat-button class="flex gap-2 justify-center items-center blue-outline">
<button (click)="nextPage()" mat-button class="flex gap-2 justify-center items-center blue-outline mr-10">
<span>Next</span>
<mat-icon class="navigation-icons">navigate_next</mat-icon>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@
word-wrap: break-word;
overflow-y: auto;
min-height: 100px;
max-height: 500px;
margin: 20px 0;
overflow-y: auto;
// height: calc(100vh - 220px);

}
Expand All @@ -261,7 +264,9 @@
color: #666666
}


.mr-10 {
margin-right: 10px;
}

::ng-deep .consent-checkbox .mat-checkbox-checked.mat-accent .mat-checkbox-background {
background-color: #1a4ca1 !important;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class PracticeComponent implements OnInit, OnChanges, OnDestroy {
sectionalTimer = false
questionStartTime: number = Date.now()
timeSpentOnQuestions: any = {}
charactersPerPage = 1500
charactersPerPage = 1300
showQuestionMarks = 'No'
forPreview = (window.location.href.includes('public') || window.location.href.includes('author') ||
window.location.href.includes('editMode'))
Expand Down

0 comments on commit 6794f05

Please sign in to comment.