Merge pull request #3818 from crazyserver/MOBILE-4362

Mobile 4362
main
Dani Palou 2023-10-16 11:35:17 +02:00 committed by GitHub
commit c09d3e0e01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 56 additions and 50 deletions

View File

@ -1,11 +1,22 @@
name: Release
on: workflow_dispatch
on:
workflow_dispatch:
inputs:
release_type:
description: 'Final release or beta'
required: true
type: choice
options:
- final
- beta
jobs:
release:
if: github.repository == 'moodlemobile/moodleapp'
runs-on: ubuntu-latest
env:
RELEASE_TYPE: ${{ github.event.inputs.release_type || 'final' }}
steps:
- uses: actions/checkout@v2
@ -20,4 +31,4 @@ jobs:
- name: Create release tags
env:
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
run: ./.github/scripts/release.sh
run: ./.github/scripts/release.sh $RELEASE_TYPE

View File

@ -13,15 +13,15 @@
[hasDataToSync]="hasOffline" (completionChanged)="onCompletionChange()">
</core-course-module-info>
<ion-card *ngIf="phases">
<ion-card *ngIf="phases && workshop">
<ion-item button (click)="viewPhaseInfo()" detail="true">
<ion-label>
<h2 class="ion-text-wrap">{{ phases[workshop!.phase].title }}</h2>
<h2 class="ion-text-wrap">{{ phases[workshop.phase].title }}</h2>
</ion-label>
</ion-item>
<ng-container *ngIf="phases && phases[workshop!.phase] && phases[workshop!.phase].tasks &&
phases[workshop!.phase].tasks.length">
<ion-item button class="ion-text-wrap" *ngFor="let task of phases[workshop!.phase].tasks"
<ng-container *ngIf="phases && phases[workshop.phase] && phases[workshop.phase].tasks &&
phases[workshop.phase].tasks.length">
<ion-item button class="ion-text-wrap" *ngFor="let task of phases[workshop.phase].tasks"
[class.item-dimmed]="task.code == 'submit' && !showSubmit" (click)="runTask(task)" detail="false">
<ion-icon slot="start" name="far-circle" *ngIf="task.completed == null"
[attr.aria-label]="'addon.mod_workshop.tasktodo' | translate"></ion-icon>
@ -45,7 +45,7 @@
</ion-card>
<!-- Description (setup phase only) -->
<ion-card *ngIf="description && workshop && workshop!.phase == PHASE_SETUP">
<ion-card *ngIf="description && workshop && workshop.phase == PHASE_SETUP">
<ion-item class="ion-text-wrap">
<ion-label>
<h3 class="item-heading">{{ 'core.description' | translate }}</h3>
@ -56,14 +56,14 @@
</ion-item>
</ion-card>
<div *ngIf="access && workshop && workshop!.phase >= PHASE_SUBMISSION">
<div *ngIf="access && workshop && workshop.phase >= PHASE_SUBMISSION">
<!-- CLOSED PHASE -->
<ng-container *ngIf="workshop!.phase >= PHASE_CLOSED">
<ion-card *ngIf="workshop!.conclusion">
<ng-container *ngIf="workshop.phase >= PHASE_CLOSED">
<ion-card *ngIf="workshop.conclusion">
<ion-item class="ion-text-wrap">
<ion-label>
<h3 class="item-heading">{{ 'addon.mod_workshop.conclusion' | translate }}</h3>
<core-format-text collapsible-item [component]="component" [componentId]="module.id" [text]="workshop!.conclusion"
<core-format-text collapsible-item [component]="component" [componentId]="module.id" [text]="workshop.conclusion"
contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
</core-format-text>
</ion-label>
@ -92,11 +92,11 @@
</ng-container>
<!-- SUBMISSION PHASE -->
<ion-card *ngIf="workshop!.phase == PHASE_SUBMISSION && workshop!.instructauthors">
<ion-card *ngIf="workshop.phase == PHASE_SUBMISSION && workshop.instructauthors">
<ion-item class="ion-text-wrap">
<ion-label>
<h3 class="item-heading">{{ 'addon.mod_workshop.areainstructauthors' | translate }}</h3>
<core-format-text collapsible-item [component]="component" [componentId]="module.id" [text]="workshop!.instructauthors"
<core-format-text collapsible-item [component]="component" [componentId]="module.id" [text]="workshop.instructauthors"
contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
</core-format-text>
</ion-label>
@ -106,10 +106,10 @@
<ion-card *ngIf="canSubmit">
<ion-item-divider class="ion-text-wrap">
<ion-label>
<h3 class="item-heading" *ngIf="workshop!.phase != PHASE_CLOSED || !submission">
<h3 class="item-heading" *ngIf="workshop.phase != PHASE_CLOSED || !submission">
{{ 'addon.mod_workshop.yoursubmission' | translate }}
</h3>
<h3 class="item-heading" *ngIf="workshop!.phase == PHASE_CLOSED && submission">
<h3 class="item-heading" *ngIf="workshop.phase == PHASE_CLOSED && submission">
{{ 'addon.mod_workshop.yoursubmissionwithassessments' | translate }}
</h3>
</ion-label>
@ -119,13 +119,13 @@
<p *ngIf="!submission">{{ 'addon.mod_workshop.noyoursubmission' | translate }}</p>
</ion-label>
</ion-item>
<addon-mod-workshop-submission *ngIf="submission" [submission]="submission" [courseId]="workshop!.course" [module]="module"
<addon-mod-workshop-submission *ngIf="submission" [submission]="submission" [courseId]="workshop.course" [module]="module"
[workshop]="workshop" [access]="access">
</addon-mod-workshop-submission>
</ion-card>
<ng-container *ngIf="workshop!.phase >= PHASE_CLOSED">
<ng-container *ngIf="workshop.phase >= PHASE_CLOSED">
<ion-card *ngIf="publishedSubmissions && publishedSubmissions.length">
<ion-item-divider class="ion-text-wrap">
<ion-label>
@ -133,7 +133,7 @@
</ion-label>
</ion-item-divider>
<ng-container *ngFor="let submission of publishedSubmissions">
<addon-mod-workshop-submission [submission]="submission" [courseId]="workshop!.course" [module]="module"
<addon-mod-workshop-submission [submission]="submission" [courseId]="workshop.course" [module]="module"
[workshop]="workshop" [access]="access" summary="true" class="core-as-item">
</addon-mod-workshop-submission>
</ng-container>
@ -141,14 +141,13 @@
</ng-container>
<!-- ASSESSMENT PHASE -->
<ng-container *ngIf="workshop!.phase >= PHASE_ASSESSMENT">
<ion-card *ngIf="workshop!.phase == PHASE_ASSESSMENT && workshop!.instructreviewers">
<ng-container *ngIf="workshop.phase >= PHASE_ASSESSMENT">
<ion-card *ngIf="workshop.phase == PHASE_ASSESSMENT && workshop.instructreviewers">
<ion-item class="ion-text-wrap">
<ion-label>
<h3 class="item-heading">{{ 'addon.mod_workshop.areainstructreviewers' | translate }}</h3>
<core-format-text collapsible-item [component]="component" [componentId]="module.id"
[text]="workshop!.instructreviewers" contextLevel="module" [contextInstanceId]="module.id"
[courseId]="courseId">
[text]="workshop.instructreviewers" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
</core-format-text>
</ion-label>
</ion-item>
@ -167,7 +166,7 @@
</ion-item>
<ng-container *ngFor="let assessment of (assessments || [])">
<addon-mod-workshop-submission [submission]="assessment.submission" [assessment]="assessment"
[courseId]="workshop!.course" [module]="module" [workshop]="workshop" [access]="access" summary="true"
[courseId]="workshop.course" [module]="module" [workshop]="workshop" [access]="access" summary="true"
class="core-as-item">
</addon-mod-workshop-submission>
</ng-container>
@ -175,13 +174,13 @@
</ng-container>
<!-- MULTIPLE PHASES SUBMISSION OR GREATER only teachers -->
<ion-card *ngIf="access.canviewallsubmissions && workshop!.phase >= PHASE_SUBMISSION &&
<ion-card *ngIf="access.canviewallsubmissions && workshop.phase >= PHASE_SUBMISSION &&
((grades && grades.length) || (groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)))">
<ion-item-divider class="ion-text-wrap">
<ion-label>
<h3 class="item-heading" *ngIf="workshop!.phase == PHASE_SUBMISSION">{{ 'addon.mod_workshop.submissionsreport' |
<h3 class="item-heading" *ngIf="workshop.phase == PHASE_SUBMISSION">{{ 'addon.mod_workshop.submissionsreport' |
translate }}</h3>
<h3 class="item-heading" *ngIf="workshop!.phase > PHASE_SUBMISSION">{{ 'addon.mod_workshop.gradesreport' | translate }}
<h3 class="item-heading" *ngIf="workshop.phase > PHASE_SUBMISSION">{{ 'addon.mod_workshop.gradesreport' | translate }}
</h3>
</ion-label>
</ion-item-divider>
@ -189,7 +188,7 @@
</core-group-selector>
<ng-container *ngFor="let submission of grades">
<addon-mod-workshop-submission [submission]="submission" [courseId]="workshop!.course" [module]="module"
<addon-mod-workshop-submission [submission]="submission" [courseId]="workshop.course" [module]="module"
[workshop]="workshop" [access]="access" summary="true" class="core-as-item">
</addon-mod-workshop-submission>
</ng-container>
@ -197,13 +196,13 @@
<ion-grid *ngIf="page > 0 || hasNextPage">
<ion-row class="ion-align-items-center">
<ion-col *ngIf="page > 0">
<ion-button expand="block" fill="outline" (click)="gotoSubmissionsPage(page! -1)">
<ion-button expand="block" fill="outline" (click)="gotoSubmissionsPage(page -1)">
<ion-icon name="fas-chevron-left" slot="start" aria-hidden="true"></ion-icon>
{{ 'core.previous' | translate }}
</ion-button>
</ion-col>
<ion-col *ngIf="hasNextPage">
<ion-button expand="block" (click)="gotoSubmissionsPage(page! + 1)">
<ion-button expand="block" (click)="gotoSubmissionsPage(page + 1)">
{{ 'core.next' | translate }}
<ion-icon name="fas-chevron-right" slot="end" aria-hidden="true"></ion-icon>
</ion-button>

View File

@ -291,13 +291,13 @@ export class AddonModWorkshopIndexComponent extends CoreCourseModuleMainActivity
await Promise.all(grades.map(async (grade) => {
const submission: AddonModWorkshopSubmissionDataWithOfflineData = {
id: grade.submissionid,
id: grade.submissionid || 0,
workshopid: workshop.id,
example: false,
authorid: grade.userid,
timecreated: grade.submissionmodified,
timemodified: grade.submissionmodified,
title: grade.submissiontitle,
timecreated: grade.submissionmodified || 0,
timemodified: grade.submissionmodified || 0,
title: grade.submissiontitle || '',
content: '',
contenttrust: 0,
attachment: 0,

View File

@ -4,7 +4,7 @@
<core-user-avatar [user]="profile" [courseId]="courseId" [userId]="profile?.id" slot="start">
</core-user-avatar>
<ion-label>
<h2>
<h2 *ngIf="submission.title">
<core-format-text [text]="submission.title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
</core-format-text>
</h2>
@ -68,7 +68,7 @@
<core-user-avatar [user]="profile" slot="start" [courseId]="courseId" [userId]="profile?.id">
</core-user-avatar>
<ion-label>
<h2>
<h2 *ngIf="submission.title">
<core-format-text [text]="submission.title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
</core-format-text>
</h2>

View File

@ -1766,9 +1766,9 @@ export type AddonModWorkshoGradesReportData = {
export type AddonModWorkshopGradesData = {
userid: number; // The id of the user being displayed in the report.
submissionid: number; // Submission id.
submissiontitle: string; // Submission title.
submissionmodified: number; // Timestamp submission was updated.
submissionid?: number; // Submission id.
submissiontitle?: string; // Submission title.
submissionmodified?: number; // Timestamp submission was updated.
submissiongrade?: number; // Aggregated grade for the submission.
gradinggrade?: number; // Computed grade for the assessment.
submissiongradeover?: number; // Grade for the assessment overrided by the teacher.

View File

@ -26,13 +26,6 @@
}
}
}
&.other {
img {
filter: var(--filter);
}
}
}
img {

View File

@ -12,7 +12,7 @@
<ion-content class="limited-width">
<core-loading [hideUntil]="loaded">
<ion-searchbar [(ngModel)]="textFilter" (ionInput)="filterChanged($event.target)" (ionCancel)="filterChanged($event.target)"
[placeholder]="'core.filter' | translate">
[placeholder]="'core.filter' | translate" class="ion-margin-top">
</ion-searchbar>
<ion-list>
<ion-item button *ngIf="error" class="ion-text-wrap" [href]="licensesUrl" core-link auto-login="no" detail="false">

View File

@ -1,6 +1,9 @@
:host {
.core-user-profile-maininfo::part(native) {
flex-direction: column;
.core-user-profile-maininfo {
padding-top: 16px;
&::part(native) {
flex-direction: column;
}
}
core-user-avatar {
--core-avatar-size: var(--core-large-avatar-size);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -800,7 +800,7 @@ body.core-iframe-fullscreen ion-router-outlet {
.item.item-file {
ion-thumbnail {
--size: 24px;
--size: 32px;
width: var(--size);
height: var(--size);
}