Skip to content

Commit

Permalink
Merge pull request #145 from satikaj/add-numbas-integration
Browse files Browse the repository at this point in the history
Merge new dev commits to numbas branch
  • Loading branch information
maddernd authored Mar 5, 2024
2 parents d63709a + 08a931b commit 61ae1d9
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 74 deletions.
9 changes: 6 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 67 additions & 57 deletions src/app/common/header/unit-dropdown/unit-dropdown.component.html
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>
8 changes: 4 additions & 4 deletions src/app/common/hero-sidebar/hero-sidebar.component.html
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>
4 changes: 2 additions & 2 deletions src/app/common/user-badge/user-badge.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div fxLayout="row" fxLayoutAlign="start start">
<div class="flex flex-row justify-start items-start">
<a (click)="!unselected ? goToStudent() : null" style="display: flex">
<user-icon
size="40"
Expand All @@ -7,7 +7,7 @@
style="margin-right: 8px"
></user-icon>
</a>
<div fxLayout="column" fxLayoutAlign="center start" style="line-height: 0.5em; margin-top: 4px">
<div class="flex-col justify-center items-start" style="line-height: 0.5em; margin-top: 4px">
<div style="margin-top: 6px" id="placeholder1" [hidden]="!unselected"></div>
<div id="placeholder2" [hidden]="!unselected"></div>
<a (click)="!unselected ? goToStudent() : null" style="display: flex">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<!-- Render if no PDF URL is available for the current view -->
<ng-template #noPdfUrl>
<div fxFlexFill fxLayout="column" fxLayoutAlign="center center">
<div class="flex flex-col w-full h-full justify-center items-center">
<mat-icon>subtitles_off</mat-icon>
</div>
</ng-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
>
<form class="search-options">
<div class="task-definition">
<div fxLayout="row" fxLayoutAlign="space-between center">
<mat-form-field fxFlex>
<div class="flex flex-row justify-between items-center">
<mat-form-field class="flex-1">
<mat-label>Task</mat-label>
<mat-select
[(ngModel)]="filters.taskDefinitionIdSelected"
Expand All @@ -112,8 +112,8 @@
</div>
</div>
<!--/task-definition-->
<div fxLayout="row" fxLayoutAlign="space-between center">
<mat-form-field fxFlex>
<div class="flex flex-row justify-between items-center">
<mat-form-field class="flex-1">
<mat-label>Students</mat-label>
<mat-select
[(ngModel)]="filters.tutorialIdSelected"
Expand Down Expand Up @@ -147,7 +147,7 @@
</ng-template>

<!-- Actual task-inbox -->
<div class="task-inbox" [ngClass]="isNarrow ? 'narrow-width' : 'full-width'" div fxLayout="column" fxLayoutAlign="none">
<div class="task-inbox flex flex-col justify-normal" [ngClass]="isNarrow ? 'narrow-width' : 'full-width'">
<div class="openSearchDialog" [hidden]="!isNarrow">
<button mat-icon-button (click)="openDialog()" aria-label="Seach Button">
<mat-icon>search</mat-icon>
Expand Down Expand Up @@ -200,8 +200,8 @@
similarities: task.similaritiesDetected
}"
></span>
<user-icon fxFlexAlign="center" [user]="task.project.student" [size]="30"> </user-icon>
<div class="task-list-data truncate" fxFlex [hidden]="isNarrow">
<user-icon class="self-center" [user]="task.project.student" [size]="30"> </user-icon>
<div class="task-list-data truncate flex-1" [hidden]="isNarrow">
<h4 class="student-name">{{ task.project.student.name }}</h4>
<div class="task-details truncate">
{{ task.definition.abbreviation }} -
Expand Down

0 comments on commit 61ae1d9

Please sign in to comment.