Skip to content

Commit

Permalink
Merge pull request #4200 from dpalou/MOBILE-4616
Browse files Browse the repository at this point in the history
Mobile 4616
  • Loading branch information
crazyserver authored Oct 10, 2024
2 parents 0fdb03a + 5d3c637 commit 666caca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/addons/badges/pages/badge-class/badge-class.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ <h1 *ngIf="!badge">{{ 'addon.badges.badgedetails' | translate }}</h1>
<ion-item class="ion-text-wrap" *ngIf="badge.issuer">
<ion-label>
<p class="item-heading">{{ 'addon.badges.issuername' | translate}}</p>
<p>{{ badge.issuer }}</p>
<p>
<core-format-text [text]="badge.issuer" contextLevel="system" [contextInstanceId]="0" [wsNotFiltered]="true" />
</p>
</ion-label>
</ion-item>
<ion-item class="ion-text-wrap" *ngIf="badge.coursefullname">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

import { toBoolean } from '@/core/transforms/boolean';
import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { CoreError } from '@classes/errors/error';
import {
CoreReportBuilder,
Expand All @@ -37,7 +37,6 @@ import { map } from 'rxjs/operators';
selector: 'core-report-builder-report-detail',
templateUrl: './report-detail.html',
styleUrls: ['./report-detail.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class CoreReportBuilderReportDetailComponent implements OnInit {

Expand All @@ -55,7 +54,7 @@ export class CoreReportBuilderReportDetailComponent implements OnInit {
new BehaviorSubject<CoreReportBuilderReportDetailState>({
report: null,
loaded: false,
canLoadMoreRows: true,
canLoadMoreRows: false,
errorLoadingRows: false,
cardviewShowFirstTitle: false,
cardVisibleColumns: 1,
Expand Down Expand Up @@ -126,6 +125,7 @@ export class CoreReportBuilderReportDetailComponent implements OnInit {
report,
cardVisibleColumns: report.details.settingsdata.cardviewVisibleColumns,
cardviewShowFirstTitle: report.details.settingsdata.cardviewShowFirstTitle,
canLoadMoreRows: report.data.totalrowcount > report.data.rows.length,
});

this.logView(report);
Expand Down Expand Up @@ -175,7 +175,6 @@ export class CoreReportBuilderReportDetailComponent implements OnInit {
this.updateState({ page: 0, canLoadMoreRows: false });
await CoreUtils.ignoreErrors(this.getReport());
await ionRefresher?.complete();
this.updateState({ canLoadMoreRows: true });
}

/**
Expand Down Expand Up @@ -225,12 +224,12 @@ export class CoreReportBuilderReportDetailComponent implements OnInit {
],
},
},
canLoadMoreRows: newReport.data.totalrowcount > report.data.rows.length + newReport.data.rows.length,
});
} catch (error) {
CoreDomUtils.showErrorModalDefault(error, 'Error loading more reports');

this.updateState({ canLoadMoreRows: false });
this.updateState({ errorLoadingRows: true });
this.updateState({ canLoadMoreRows: false, errorLoadingRows: true });
}

complete();
Expand Down

0 comments on commit 666caca

Please sign in to comment.