CLASSROOMIO-T-154: Notify tutors when a student submits an exercise

CLASSROOMIO-T-154: Fix textarea grade issue

CLASSROOMIO-T-154: Get it to work properly

Merge branch 'CLASSROOMIO-T-154' of https://gitlab.com/thenextgreat/classroomio into CLASSROOMIO-T-154

CLASSROOMIO-T-154: PR fixes
CLASSROOMIO-T-154:Updated the code

Merge branch 'main' into CLASSROOMIO-T-154

CLASSROOMIO-T-154:Notify tutors when a student submits an exercise


Co-authored-by: Ifeanyi Nwosu <[email protected]>
Co-authored-by: Rotimi Best <[email protected]>


Merge-request: CLASSROOMIO-MR-109
Merged-by: Best Admin <[email protected]>
This commit is contained in:
emmanuel
2023-10-20 04:16:07 +00:00
committed by Space Cloud
co-authored by Rotimi Best
parent 91f28a345f
commit 0f2d60534d
15 changed files with 159 additions and 91 deletions
@@ -1,10 +1,10 @@
<script>
<script lang="ts">
import CodeSnippet from '$lib/components/CodeSnippet/index.svelte';
import PrimaryButton from '$lib/components/PrimaryButton/index.svelte';
import { VARIANTS } from '$lib/components/PrimaryButton/constants';
import RadioItem from '$lib/components/Form/RadioItem.svelte';
import TextField from '$lib/components/Form/TextField.svelte';
import HtmlRender from '$lib/components/HTMLRender/HTMLRender.svelte';
import Grade from '$lib/components/Question/Grade.svelte';
export let title = '';
export let code = '';
@@ -17,7 +17,7 @@
export let disabled = false;
export let isPreview = false;
export let nextButtonProps = {};
export let grade = undefined;
export let grade: number;
export let gradeMax = 0;
export let disableGrading = false;
export let labelClassName = '';
@@ -65,23 +65,12 @@
<div class="flex items-center justify-between">
<HtmlRender className="mt-4">
<svelte:fragment slot="content">
<h3 class="dark:text-white {labelClassName} {!isNaN(grade) && 'w-3/4'}">
{@html title}
<h3 class="dark:text-white {labelClassName} {typeof grade === 'number' && 'w-3/4'}">
{title}
</h3>
</svelte:fragment>
</HtmlRender>
{#if !isNaN(grade)}
<div class="flex items-center">
<TextField
placeholder="Points"
bind:value={grade}
type="number"
className="w-20"
isDisabled={disableGrading}
/>
<p class="dark:text-white ml-2 text-lg">/ {gradeMax}</p>
</div>
{/if}
<Grade {gradeMax} {grade} {disableGrading} />
</div>
{#if code}