Merge pull request #2768 from crazyserver/MOBILE-3563
MOBILE-3563 workshop: Show submission button if late submission allowedmain
commit
2f8333d516
|
@ -61,7 +61,7 @@
|
|||
|
||||
<!-- User can view all submissions (teacher). -->
|
||||
<ng-container *ngIf="assign && canViewAllSubmissions">
|
||||
<ion-list class="core-list-align-detail-right with-borders">
|
||||
<ion-list class="core-list-align-detail-right">
|
||||
<ion-item class="ion-text-wrap" *ngIf="(groupInfo.separateGroups || groupInfo.visibleGroups)">
|
||||
<ion-label id="addon-assign-groupslabel">
|
||||
<ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-refresher slot="fixed" [disabled]="!activityComponent?.loaded" (ionRefresh)="activityComponent?.doRefresh($event)">
|
||||
<ion-refresher slot="fixed" [disabled]="!activityComponent?.loaded" (ionRefresh)="activityComponent?.doRefresh($event.target)">
|
||||
<ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
(completionChanged)="onCompletionChange()">
|
||||
</core-course-module-info>
|
||||
|
||||
<ion-card class="with-borders" *ngIf="phases">
|
||||
<ion-card *ngIf="phases">
|
||||
<ion-item button (click)="viewPhaseInfo()" detail="true">
|
||||
<ion-label>
|
||||
<h2 class="ion-text-wrap">{{ phases[workshop!.phase].title }}</h2>
|
||||
|
@ -95,7 +95,7 @@
|
|||
</ion-item>
|
||||
</ion-card>
|
||||
|
||||
<ion-card class="with-borders" *ngIf="userGrades">
|
||||
<ion-card *ngIf="userGrades">
|
||||
<ion-item-divider class="ion-text-wrap">
|
||||
<ion-label><h2>{{ 'addon.mod_workshop.yourgrades' | translate }}</h2></ion-label>
|
||||
</ion-item-divider>
|
||||
|
@ -128,30 +128,26 @@
|
|||
</ion-card>
|
||||
|
||||
<ion-card *ngIf="canSubmit">
|
||||
<ion-item-divider class="ion-text-wrap">
|
||||
<ion-label>
|
||||
<h2 *ngIf="workshop!.phase != PHASE_CLOSED || !submission">
|
||||
{{ 'addon.mod_workshop.yoursubmission' | translate }}
|
||||
</h2>
|
||||
<h2 *ngIf="workshop!.phase == PHASE_CLOSED && submission">
|
||||
{{ 'addon.mod_workshop.yoursubmissionwithassessments' | translate }}
|
||||
</h2>
|
||||
</ion-label>
|
||||
</ion-item-divider>
|
||||
<ion-item class="ion-text-wrap" *ngIf="!submission">
|
||||
<ion-label>
|
||||
<h2>{{ 'addon.mod_workshop.yoursubmission' | translate }}</h2>
|
||||
<p>{{ 'addon.mod_workshop.noyoursubmission' | translate }}</p>
|
||||
<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"
|
||||
[workshop]="workshop" [access]="access">
|
||||
</addon-mod-workshop-submission>
|
||||
|
||||
<ng-container *ngIf="submission">
|
||||
<ion-item-divider class="ion-text-wrap">
|
||||
<ion-label>
|
||||
<h2 *ngIf="workshop!.phase != PHASE_CLOSED">{{ 'addon.mod_workshop.yoursubmission' | translate }}</h2>
|
||||
<h2 *ngIf="workshop!.phase == PHASE_CLOSED">
|
||||
{{ 'addon.mod_workshop.yoursubmissionwithassessments' | translate }}
|
||||
</h2>
|
||||
</ion-label>
|
||||
</ion-item-divider>
|
||||
<addon-mod-workshop-submission [submission]="submission" [courseId]="workshop!.course" [module]="module"
|
||||
[workshop]="workshop" [access]="access">
|
||||
</addon-mod-workshop-submission>
|
||||
</ng-container>
|
||||
</ion-card>
|
||||
|
||||
<!-- Show only on current phase -->
|
||||
<ng-container *ngIf="workshop!.phase == PHASE_SUBMISSION">
|
||||
<!-- Show only on current phase -->
|
||||
<ion-item class="ion-text-wrap" *ngIf="showSubmit">
|
||||
<ion-label>
|
||||
<ion-button expand="block" *ngIf="access.creatingsubmissionallowed && !submission" (click)="gotoSubmit()">
|
||||
|
@ -164,10 +160,11 @@
|
|||
</ion-button>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ng-container>
|
||||
</ion-card>
|
||||
|
||||
|
||||
<ng-container *ngIf="workshop!.phase >= PHASE_CLOSED">
|
||||
<ion-card class="with-borders" *ngIf="publishedSubmissions && publishedSubmissions.length">
|
||||
<ion-card *ngIf="publishedSubmissions && publishedSubmissions.length">
|
||||
<ion-item-divider class="ion-text-wrap">
|
||||
<ion-label><h2>{{ 'addon.mod_workshop.publishedsubmissions' | translate }}</h2></ion-label>
|
||||
</ion-item-divider>
|
||||
|
@ -193,7 +190,7 @@
|
|||
</ion-item>
|
||||
</ion-card>
|
||||
|
||||
<ion-card class="with-borders" *ngIf="canAssess">
|
||||
<ion-card *ngIf="canAssess">
|
||||
<ion-item-divider class="ion-text-wrap">
|
||||
<ion-label><h2>{{ 'addon.mod_workshop.assignedassessments' | translate }}</h2></ion-label>
|
||||
</ion-item-divider>
|
||||
|
@ -210,7 +207,7 @@
|
|||
</ng-container>
|
||||
|
||||
<!-- MULTIPLE PHASES SUBMISSION OR GREATER only teachers -->
|
||||
<ion-card class="with-borders" *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>
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-refresher slot="fixed" [disabled]="!activityComponent?.loaded" (ionRefresh)="activityComponent?.doRefresh($event)">
|
||||
<ion-refresher slot="fixed" [disabled]="!activityComponent?.loaded" (ionRefresh)="activityComponent?.doRefresh($event.target)">
|
||||
<ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
ion-item {
|
||||
--border-color: var(--core-more-item-border,
|
||||
var(--ion-item-border-color,
|
||||
var(--ion-border-color,
|
||||
var(--ion-color-step-150,
|
||||
rgba(0, 0, 0, 0.13)))));
|
||||
|
||||
ion-icon {
|
||||
color: var(--core-more-icon, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54));
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(ion-app.ios) {
|
||||
ion-item ion-icon {
|
||||
color: var(--core-more-icon, inherit);
|
||||
}
|
||||
}
|
|
@ -34,6 +34,7 @@ import { Translate } from '@singletons';
|
|||
@Component({
|
||||
selector: 'page-core-mainmenu-more',
|
||||
templateUrl: 'more.html',
|
||||
styleUrls: ['more.scss'],
|
||||
})
|
||||
export class CoreMainMenuMorePage implements OnInit, OnDestroy {
|
||||
|
||||
|
|
|
@ -250,3 +250,6 @@ $addon-forum-highlight-color: $gray-lighter !default;
|
|||
|
||||
$addon-forum-border-color-dark: $gray-darker !default;
|
||||
$addon-forum-highlight-color-dark: $gray-dark !default;
|
||||
|
||||
$core-more-icon: null !default;
|
||||
$core-more-item-border: null !default;
|
||||
|
|
|
@ -244,4 +244,11 @@
|
|||
|
||||
--core-dd-question-selected-shadow: 2px 2px 4px var(--gray-dark);
|
||||
|
||||
@if ($core-more-icon) {
|
||||
--core-more-icon: #{$core-more-icon};
|
||||
}
|
||||
|
||||
@if ($core-more-item-border) {
|
||||
--core-more-item-border: #{$core-more-item-border};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue