forked from doubtfire-lms/doubtfire-web
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #145 from satikaj/add-numbas-integration
Merge new dev commits to numbas branch
- Loading branch information
Showing
6 changed files
with
87 additions
and
74 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
124 changes: 67 additions & 57 deletions
124
src/app/common/header/unit-dropdown/unit-dropdown.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,82 @@ | ||
<div class="flex items-center"> | ||
@if (unit) { | ||
<div | ||
class="bg-formatif-blue text-white rounded-full cursor-pointer pl-6 pr-6 min-h-12 h-12 flex items-center" | ||
style="font-size: 14px" | ||
matTooltip="{{ unit.name }}" | ||
[matMenuTriggerFor]="menu" | ||
#menuState="matMenuTrigger" | ||
> | ||
<span class="text-md">{{ unit?.code }}</span> | ||
<mat-icon>{{ menuState.menuOpen ? 'arrow_drop_up' : 'arrow_drop_down' }} </mat-icon> | ||
</div> | ||
} @if (!unit) { | ||
|
||
<button mat-button [matMenuTriggerFor]="menu" #menuState="matMenuTrigger"> | ||
<span class="flex items-center"> | ||
<span>Select Unit</span> | ||
<div | ||
class="bg-formatif-blue text-white rounded-full cursor-pointer pl-6 pr-6 min-h-12 h-12 flex items-center" | ||
style="font-size: 14px" | ||
matTooltip="{{ unit.name }}" | ||
[matMenuTriggerFor]="menu" | ||
#menuState="matMenuTrigger" | ||
> | ||
<span class="text-md">{{ unit?.code }}</span> | ||
<mat-icon>{{ menuState.menuOpen ? 'arrow_drop_up' : 'arrow_drop_down' }} </mat-icon> | ||
</span> | ||
</button> | ||
|
||
</div> | ||
} | ||
@if (!unit) { | ||
<button mat-button [matMenuTriggerFor]="menu" #menuState="matMenuTrigger"> | ||
<span class="flex items-center"> | ||
<span>Select Unit</span> | ||
<mat-icon>{{ menuState.menuOpen ? 'arrow_drop_up' : 'arrow_drop_down' }} </mat-icon> | ||
</span> | ||
</button> | ||
} | ||
</div> | ||
|
||
<mat-menu #menu="matMenu" class="unit-dropdown-menu"> | ||
@if (media.isActive('xs')) { | ||
<button uiSref="home" mat-menu-item> | ||
<mat-icon | ||
uiSref="home" | ||
style="margin-right: 20px" | ||
svgIcon="formatif-logo" | ||
class="formatif-icon" | ||
aria-label="Home Icon" | ||
></mat-icon> | ||
<div class="unitName">Home</div> | ||
<span class="flex-grow"></span> | ||
</button> | ||
} @if (media.isActive('xs')) { | ||
<mat-divider></mat-divider> | ||
<button uiSref="home" mat-menu-item> | ||
<mat-icon | ||
uiSref="home" | ||
style="margin-right: 20px" | ||
svgIcon="formatif-logo" | ||
class="formatif-icon" | ||
aria-label="Home Icon" | ||
></mat-icon> | ||
<div class="unitName">Home</div> | ||
<span class="flex-grow"></span> | ||
</button> | ||
} | ||
@if (media.isActive('xs')) { | ||
<mat-divider></mat-divider> | ||
} | ||
|
||
<div mat-subheader [hidden]="unitRoles?.length === 0">Units you teach</div> | ||
@for (unitRole of unitRoles; track unitRole) { @if (!unitRole.unit.teachingPeriod || | ||
unitRole.unit.teachingPeriod?.active) { | ||
<div uiSref="units/tasks/inbox" [uiParams]="{ unitId: unitRole.unit.id }" mat-menu-item class="w-full"> | ||
<div class="flex items-center w-full"> | ||
<div class="flex-none unitName">{{ unitRole.unit.name }}</div> | ||
<div class="grow"></div> | ||
<f-chip> | ||
{{ unitRole.unit.code }} | ||
</f-chip> | ||
</div> | ||
</div> | ||
} } | ||
@for (unitRole of unitRoles; track unitRole) { | ||
@if (!unitRole.unit.teachingPeriod || unitRole.unit.teachingPeriod?.active) { | ||
<div | ||
uiSref="units/tasks/inbox" | ||
[uiParams]="{unitId: unitRole.unit.id}" | ||
mat-menu-item | ||
class="w-full" | ||
> | ||
<div class="flex items-center w-full"> | ||
<div class="flex-none unitName">{{ unitRole.unit.name }}</div> | ||
<div class="grow"></div> | ||
<f-chip> | ||
{{ unitRole.unit.code }} | ||
</f-chip> | ||
</div> | ||
</div> | ||
} | ||
} | ||
|
||
<mat-divider [hidden]="unitRoles?.length === 0 || projects?.length === 0"></mat-divider> | ||
<div mat-subheader [hidden]="projects?.length === 0">Units You Study</div> | ||
@for (project of projects; track project) { @if (!project.unit.teachingPeriod || project.unit.teachingPeriod.active) { | ||
<button | ||
uiSref="projects/dashboard" | ||
[uiParams]="{ projectId: project.id, taskAbbr: '' }" | ||
class="flex items-center mb-2" | ||
mat-menu-item | ||
> | ||
<div class="unitName">{{ project.unit.name }}</div> | ||
<span fxFlex style="flex-grow: 1"></span> | ||
<f-chip> | ||
{{ project.unit.code }} | ||
</f-chip> | ||
</button> | ||
} } | ||
@for (project of projects; track project) { | ||
@if (!project.unit.teachingPeriod || project.unit.teachingPeriod.active) { | ||
<button | ||
uiSref="projects/dashboard" | ||
[uiParams]="{projectId: project.id, taskAbbr: ''}" | ||
class="flex items-center mb-2" | ||
mat-menu-item | ||
> | ||
<span class="flex flex-row border-box"> | ||
<div class="unitName">{{ project.unit.name }}</div> | ||
<span class="flex-1 border-box"></span> | ||
<f-chip> | ||
{{ project.unit.code }} | ||
</f-chip> | ||
</span> | ||
</button> | ||
} | ||
} | ||
</mat-menu> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<div class="left-banner" fxLayout="column"> | ||
<div class="left-banner flex flex-col"> | ||
<div class="header"> | ||
<div class="wordmark" fxLayout="row" fxLayoutAlign="start center"> | ||
<div class="wordmark flex justify-start items-center"> | ||
<img src="../../../assets/images/logo-white.svg" width="40px" alt="Homepage Logo" style="padding-right: 6px" /> | ||
<p>{{ externalName.value }}</p> | ||
</div> | ||
<h1 class="mt-6">Manage your learning, with feedback you'll want to receive.</h1> | ||
</div> | ||
|
||
<div fxFlex="10"></div> | ||
<div fxFlex="grow" class="pattern"></div> | ||
<div class="flex-1" style="max-height: 10%;"></div> | ||
<div class="pattern flex-grow"></div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters