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,13 +1,13 @@
<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 TextArea from '$lib/components/Form/TextArea.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;
export let code = '';
export let name = '';
export let onSubmit = () => {};
export let onPrevious = () => {};
@@ -16,7 +16,7 @@
export let isLast = false;
export let isPreview = false;
export let disabled = false;
export let grade;
export let grade: number | undefined;
export let gradeMax = 0;
export let disableGrading = false;
@@ -34,24 +34,13 @@
</script>
<form on:submit|preventDefault={handleFormSubmit}>
<div class="flex items-center justify-between">
<div class="flex items-center justify-between mb-2">
<HtmlRender className="mt-4">
<svelte:fragment slot="content">
<h3 class={!isNaN(grade) ? 'w-3/4' : ''}>{title}</h3>
<h3 class={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}