feat: org and course student analytics page (#509)

* UI initialization

* feat: structure API

* feat: audience & people analytics

* feat: quick changes

* feat: add comments

* redesign course student page

* chore: make requests to db more efficient

* clean up analytics page for course

* feat: finish up audience analytics page

* chore: minor UI tweaks

* translate all

* replace inserts of log in events to update

* catch error if last_login isn't inserted

---------

Co-authored-by: Rotimi Best <[email protected]>
This commit is contained in:
Adeyemi Adetunji
2024-12-30 02:59:10 +01:00
committed by GitHub
co-authored by Rotimi Best
parent 381776f388
commit f69bf920a9
46 changed files with 1916 additions and 437 deletions
@@ -1,13 +1,13 @@
<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 Checkbox from '$lib/components/Form/Checkbox.svelte';
import HtmlRender from '$lib/components/HTMLRender/HTMLRender.svelte';
import { VARIANTS } from '$lib/components/PrimaryButton/constants';
import PrimaryButton from '$lib/components/PrimaryButton/index.svelte';
import Grade from '$lib/components/Question/Grade.svelte';
import { t } from '$lib/utils/functions/translations';
import ReasonBox from '../ReasonBox.svelte';
import QuestionTitle from '../QuestionTitle.svelte';
import ReasonBox from '../ReasonBox.svelte';
export let title = '';
export let index = 1;
@@ -81,6 +81,8 @@
}
$: gradeWithAI = isGradeWithAI;
$: console.log('grade', grade, 'hideGrading', hideGrading);
</script>
<form on:submit|preventDefault={handleFormSubmit}>
@@ -102,7 +104,7 @@
<div class="ml-4">
{#each options as option}
<button
class="cursor-pointer text-left my-2 border-2 border-gray-300 rounded-md hover:bg-gray-200 dark:hover:bg-neutral-800 w-full {getValidationClassName(
class="my-2 w-full cursor-pointer rounded-md border-2 border-gray-300 text-left hover:bg-gray-200 dark:hover:bg-neutral-800 {getValidationClassName(
option
)}"
type="button"
@@ -123,7 +125,7 @@
{/if}
{#if !isPreview}
<div class="mt-3 flex items-center justify-between w-full">
<div class="mt-3 flex w-full items-center justify-between">
<PrimaryButton
onClick={handlePrevious}
label={$t('course.navItem.lessons.exercises.all_exercises.previous')}