From cace67bdcfae05605bbdafffcfcaf0b1789a19cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Fri, 14 May 2021 15:53:33 +0200 Subject: [PATCH] MOBILE-3563 workshop: Show submission button if late submission allowed --- .../index/addon-mod-assign-index.html | 2 +- src/addons/mod/data/pages/index/index.html | 2 +- .../index/addon-mod-workshop-index.html | 47 +++++++++---------- .../mod/workshop/components/index/index.ts | 2 +- .../mod/workshop/pages/index/index.html | 2 +- 5 files changed, 26 insertions(+), 29 deletions(-) diff --git a/src/addons/mod/assign/components/index/addon-mod-assign-index.html b/src/addons/mod/assign/components/index/addon-mod-assign-index.html index 74bcc59ab..3a5789600 100644 --- a/src/addons/mod/assign/components/index/addon-mod-assign-index.html +++ b/src/addons/mod/assign/components/index/addon-mod-assign-index.html @@ -61,7 +61,7 @@ - + {{'core.groupsseparate' | translate }} diff --git a/src/addons/mod/data/pages/index/index.html b/src/addons/mod/data/pages/index/index.html index cd9d63d28..d9d8edfcf 100644 --- a/src/addons/mod/data/pages/index/index.html +++ b/src/addons/mod/data/pages/index/index.html @@ -14,7 +14,7 @@ - + diff --git a/src/addons/mod/workshop/components/index/addon-mod-workshop-index.html b/src/addons/mod/workshop/components/index/addon-mod-workshop-index.html index 0b14cbaa0..b2b61caa4 100644 --- a/src/addons/mod/workshop/components/index/addon-mod-workshop-index.html +++ b/src/addons/mod/workshop/components/index/addon-mod-workshop-index.html @@ -33,7 +33,7 @@ (completionChanged)="onCompletionChange()"> - +

{{ phases[workshop!.phase].title }}

@@ -95,7 +95,7 @@
- +

{{ 'addon.mod_workshop.yourgrades' | translate }}

@@ -128,30 +128,26 @@
+ + +

+ {{ 'addon.mod_workshop.yoursubmission' | translate }} +

+

+ {{ 'addon.mod_workshop.yoursubmissionwithassessments' | translate }} +

+
+
-

{{ 'addon.mod_workshop.yoursubmission' | translate }}

-

{{ 'addon.mod_workshop.noyoursubmission' | translate }}

+

{{ 'addon.mod_workshop.noyoursubmission' | translate }}

+ + - - - -

{{ 'addon.mod_workshop.yoursubmission' | translate }}

-

- {{ 'addon.mod_workshop.yoursubmissionwithassessments' | translate }} -

-
-
- - -
-
- - - + @@ -164,10 +160,11 @@ - +
+ - +

{{ 'addon.mod_workshop.publishedsubmissions' | translate }}

@@ -193,7 +190,7 @@
- +

{{ 'addon.mod_workshop.assignedassessments' | translate }}

@@ -210,7 +207,7 @@
- = PHASE_SUBMISSION && ((grades && grades.length) || (groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)))"> diff --git a/src/addons/mod/workshop/components/index/index.ts b/src/addons/mod/workshop/components/index/index.ts index 4f3717f4a..d47607361 100644 --- a/src/addons/mod/workshop/components/index/index.ts +++ b/src/addons/mod/workshop/components/index/index.ts @@ -434,7 +434,7 @@ export class AddonModWorkshopIndexComponent extends CoreCourseModuleMainActivity this.phases![AddonModWorkshopPhase.PHASE_SUBMISSION].tasks, ); - this.showSubmit = this.workshop!.phase == AddonModWorkshopPhase.PHASE_SUBMISSION && this.canSubmit && + this.showSubmit = this.canSubmit && ((this.access!.creatingsubmissionallowed && !this.submission) || (this.access!.modifyingsubmissionallowed && !!this.submission)); diff --git a/src/addons/mod/workshop/pages/index/index.html b/src/addons/mod/workshop/pages/index/index.html index 4c9704015..fded8cdc1 100644 --- a/src/addons/mod/workshop/pages/index/index.html +++ b/src/addons/mod/workshop/pages/index/index.html @@ -13,7 +13,7 @@ - +