Skip to content

Commit

Permalink
Merge pull request #434 from sunbird-cb/rating-v2
Browse files Browse the repository at this point in the history
Rating v2
  • Loading branch information
christyfernandes authored May 27, 2022
2 parents 1ec0140 + 3756451 commit 9da5f39
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
<!-- </span> -->
</div>
</div>
<button *ngIf="content?.artifactUrl && isAllowed" type="button" mat-icon-button [matMenuTriggerFor]="buttonMenu">
<mat-icon>more_vertical</mat-icon>
</button>
<ng-container *ngIf="content?.identifier && content?.completionPercentage">
<ng-container *ngIf="content?.completionStatus == 2">
<circle-progress class="flex items-center progress" [percent]="100" [radius]="12" [outerStrokeWidth]="3"
Expand Down Expand Up @@ -64,9 +67,7 @@
</ws-widget-content-progress> -->
</ng-container>
</ng-container>
<button *ngIf="content?.artifactUrl && isAllowed" type="button" mat-icon-button [matMenuTriggerFor]="buttonMenu">
<mat-icon>more_vertical</mat-icon>
</button>

<!-- <div *ngIf="hasContentStructure" class="child-meta-container">
<div class="child-structure"> -->
<!-- <mat-icon class="structure-icon">import_contacts</mat-icon> -->
Expand Down Expand Up @@ -233,6 +234,10 @@
<mat-icon class="mr-1 custom-icon rotate-90">call_to_action</mat-icon>
<span>Course</span>
</div> -->
<button *ngIf="content?.artifactUrl && !isXSmall && isAllowed" type="button" mat-icon-button class=""
[matMenuTriggerFor]="buttonMenu">
<mat-icon>more_vertical</mat-icon>
</button>
<ng-container *ngIf="content?.identifier && content?.completionPercentage">
<ng-container *ngIf="content?.completionStatus == 2">
<circle-progress class="flex items-center progress" [percent]="100" [radius]="12" [outerStrokeWidth]="3"
Expand Down Expand Up @@ -263,10 +268,6 @@
</ws-widget-content-progress> -->
</ng-container>
</ng-container>
<button *ngIf="content?.artifactUrl && !isXSmall && isAllowed" type="button" mat-icon-button class="text-right"
[matMenuTriggerFor]="buttonMenu">
<mat-icon>more_vertical</mat-icon>
</button>
</div>

<!-- <button *ngIf="content?.artifactUrl" type="button" mat-icon-button [matMenuTriggerFor]="buttonMenu">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,7 @@ export class AppTocSinglePageComponent implements OnInit, OnChanges, OnDestroy {
ratingSummaryPr.avgRating = parseFloat((meanRating / this.ratingSummary.total_number_of_ratings).toFixed(1))
if (this.content) {
this.content.averageRating = ratingSummaryPr.avgRating
this.content.totalRating = ratingSummaryPr.total_number_of_ratings
}
// ratingSummaryPr.avgRating = 5
return ratingSummaryPr
Expand Down

0 comments on commit 9da5f39

Please sign in to comment.