MOBILE-3939 feedback: Consolidate user profiles

main
Noel De Martin 2021-12-09 14:10:50 +01:00
parent 12e30f1c86
commit e628e039fc
4 changed files with 10 additions and 9 deletions

View File

@ -559,6 +559,7 @@
"addon.mod_feedback.analysis": "feedback",
"addon.mod_feedback.anonymous": "feedback",
"addon.mod_feedback.anonymous_entries": "feedback",
"addon.mod_feedback.anonymous_user": "feedback",
"addon.mod_feedback.average": "feedback",
"addon.mod_feedback.captchaofflinewarning": "local_moodlemobileapp",
"addon.mod_feedback.complete_the_form": "feedback",

View File

@ -2,6 +2,7 @@
"analysis": "Analysis",
"anonymous": "Anonymous",
"anonymous_entries": "Anonymous entries ({{$a}})",
"anonymous_user": "Anonymous user",
"average": "Average",
"captchaofflinewarning": "Feedback with CAPTCHA cannot be completed offline, or if not configured, or if the server is down.",
"complete_the_form": "Answer the questions",

View File

@ -5,9 +5,7 @@
</ion-buttons>
<ion-title>
<h1 *ngIf="attempt">{{ attempt.fullname }}</h1>
<h1 *ngIf="anonAttempt">
{{ 'addon.mod_feedback.response_nr' |translate }}: {{anonAttempt.number}}
</h1>
<h1 *ngIf="anonAttempt">{{ 'addon.mod_feedback.anonymous_user' | translate }}</h1>
</ion-title>
</ion-toolbar>
</ion-header>
@ -16,7 +14,7 @@
<core-loading [hideUntil]="loaded">
<ion-list class="ion-no-margin" *ngIf="attempt || anonAttempt">
<ion-item *ngIf="attempt" class="ion-text-wrap" core-user-link [userId]="attempt.userid"
[attr.aria-label]=" 'core.user.viewprofile' | translate" [courseId]="attempt.courseid">
[attr.aria-label]="'core.user.viewprofile' | translate" [courseId]="attempt.courseid">
<core-user-avatar [user]="attempt" slot="start"></core-user-avatar>
<ion-label>
<h2>{{attempt.fullname}}</h2>
@ -25,11 +23,10 @@
</ion-item>
<ion-item class="ion-text-wrap" *ngIf="anonAttempt">
<core-user-avatar [linkProfile]="false" slot="start"></core-user-avatar>
<ion-label>
<h2>
{{ 'addon.mod_feedback.response_nr' |translate }}: {{anonAttempt.number}}
({{ 'addon.mod_feedback.anonymous' |translate }})
</h2>
<h2>{{ 'addon.mod_feedback.anonymous_user' |translate }}</h2>
<p>{{ 'addon.mod_feedback.response_nr' | translate }}: {{anonAttempt.number}}</p>
</ion-label>
</ion-item>
<ng-container *ngIf="items && items.length">

View File

@ -52,8 +52,10 @@
</ion-item-divider>
<ion-item *ngFor="let attempt of anonymousAttempts" class="ion-text-wrap" button detail="true"
(click)="attempts?.select(attempt)" [attr.aria-current]="attempts?.getItemAriaCurrent(attempt)">
<core-user-avatar [linkProfile]="false" slot="start"></core-user-avatar>
<ion-label>
<h2>{{ 'addon.mod_feedback.response_nr' | translate }}: {{attempt.number}}</h2>
<p class="item-heading">{{ 'addon.mod_feedback.anonymous_user' | translate }}</p>
<p>{{ 'addon.mod_feedback.response_nr' | translate }}: {{attempt.number}}</p>
</ion-label>
</ion-item>
</ng-container>