Skip to content

Commit

Permalink
Merge 4b02274 into ec964c8
Browse files Browse the repository at this point in the history
  • Loading branch information
sjschlapbach authored Nov 6, 2024
2 parents ec964c8 + 4b02274 commit ea7c3e8
Show file tree
Hide file tree
Showing 84 changed files with 653 additions and 855 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// @ts-nocheck

import type { PrismaMigrationClient } from '@klicker-uzh/graphql/src/types/app.js'
// import { PrismaClient } from '@klicker-uzh/prisma'

Expand Down
10 changes: 5 additions & 5 deletions apps/backend-docker/scripts/checkRedisConsistency.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PrismaClient } from '@klicker-uzh/prisma'
import { PrismaClient, PublicationStatus } from '@klicker-uzh/prisma'
import { Redis } from 'ioredis'

async function run() {
Expand All @@ -12,18 +12,18 @@ async function run() {
tls: process.env.REDIS_TLS ? {} : undefined,
})

const sessions = await prisma.liveSession.findMany({
const quizzes = await prisma.liveQuiz.findMany({
where: {
status: {
not: 'RUNNING',
not: PublicationStatus.PUBLISHED,
},
},
})

let count = 0

for (const session of sessions) {
const invalidKeys = await redisExec.keys(`s:${session.id}:*`)
for (const quiz of quizzes) {
const invalidKeys = await redisExec.keys(`s:${quiz.id}:*`)

if (invalidKeys.length > 0) {
count += invalidKeys.length
Expand Down
10 changes: 5 additions & 5 deletions apps/backend-docker/scripts/fixPointsInconsistency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ const redisExec = new Redis({
tls: process.env.REDIS_TLS ? {} : undefined,
})

// deduct points from course leaderboard entries: 1x points in sessionLB
// deduct points from course leaderboard entries: 1x points in quizLB
const FAILURES = 1

const COURSE_ID = ''
const SESSION_ID = ''
const QUIZ_ID = ''

const sessionLB = await redisExec.hgetall(`s:${SESSION_ID}:lb`)
const sessionXP = await redisExec.hgetall(`s:${SESSION_ID}:xp`)
const quizLB = await redisExec.hgetall(`s:${QUIZ_ID}:lb`)
const quizXP = await redisExec.hgetall(`s:${QUIZ_ID}:xp`)

const results = await Promise.allSettled(
Object.entries(sessionLB).map(async ([participantId, score]) => {
Object.entries(quizLB).map(async ([participantId, score]) => {
const lbEntry = await prisma.leaderboardEntry.findFirst({
where: {
participantId,
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/docs/gamification/experience.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: XP and Levels
---

While participants collect points for correct answers on a course level, experience points (XP) are collected across courses and allow students to level up. This represents an important part of our gamification concept, making sure that students keep making progress across different courses and activities. However, students are not only awarded experience points for answering questions correctly (in live settings as well as learning elements and micro sessions), but also when obtaining achievements, solving group challenges and many more activities.
While participants collect points for correct answers on a course level, experience points (XP) are collected across courses and allow students to level up. This represents an important part of our gamification concept, making sure that students keep making progress across different courses and activities. However, students are not only awarded experience points for answering questions correctly (in live settings as well as practice quizzes and microlearnings), but also when obtaining achievements, solving group challenges and many more activities.

As usual, levelling up will be faster in the beginning and then require a growing amount of additional points later on. KlickerUZH currently uses the following formula to compute the required amount of experience points for some level $i$ as $\text{XP}_{\text{req}}(i)$:

Expand Down
10 changes: 5 additions & 5 deletions apps/docs/docs/gamification/grading_logic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Grading Logic

In order to distribute points, XP and achievements based on the performance of the participants in various activities, an automated grading logic has been implemented in KlickerUZH. This chapter provides a detailed explanation of the approaches employed for different element and activity types, including practice quizzes, microlearnings and live quizzes.

The presented grading approach assumes that all considered questions have a defined correct solution (or possibly multiple solutions), as this is required in asynchronous activities, except for free-text questions. During live sessions where questions without sample solutions were used, the participants are awarded a fixed amount of 10 points for taking part in each poll. Please also note that the [grading approach for live quizzes](#grading-in-live-quizzes) slightly extends the logic of asynchronous activities and that some element types are only available in select activities.
The presented grading approach assumes that all considered questions have a defined correct solution (or possibly multiple solutions), as this is required in asynchronous activities, except for free-text questions. During live quizzes where questions without sample solutions were used, the participants are awarded a fixed amount of 10 points for taking part in each poll. Please also note that the [grading approach for live quizzes](#grading-in-live-quizzes) slightly extends the logic of asynchronous activities and that some element types are only available in select activities.

## Grading by Question Type

Expand All @@ -14,7 +14,7 @@ The grading logic will first be described on the example of practice quizzes and

The point multipliers, which can be specified both on a question and activity level, are combined during the creation of the activity and applied to the total awarded points (including basic points and potential bonuses). If no multipliers were specified, this factor defaults to 1.

Multipliers can be used to weigh questions according to their difficulty and reward participation in certain quizzes with more points (e.g. quiz on exam level during the last lecture of the semester vs. an introductory quiz in the first lecture). The same multiplier concept also applies to live sessions.
Multipliers can be used to weigh questions according to their difficulty and reward participation in certain quizzes with more points (e.g. quiz on exam level during the last lecture of the semester vs. an introductory quiz in the first lecture). The same multiplier concept also applies to live quizzes.

### Grading Single Choice Questions

Expand Down Expand Up @@ -70,14 +70,14 @@ For free text questions, you can currently specify a selection of correct respon

During synchronous live quizzes, every participant will receive 10 points for each submitted answer, independent of its correctness. If the submitted answer is correct, 5 additional points will be awarded. For partially correct answers, these 5 points are multiplied with a factor described in the sections above. If no sample solution is defined, students will not receive any time-dependent bonus, but only the fixed amount of 10 points (no multiplication with multiplier).

To incentivize fast and correct answers during live sessions, additional bonus points are awarded. Starting time with the first correct answer, players will receive up to 45 points (default setting), depending on the time that passed between the first correct answer and theirs. By default, the slope to zero points is implemented with a duration of 20 seconds.
To incentivize fast and correct answers during live quizzes, additional bonus points are awarded. Starting time with the first correct answer, players will receive up to 45 points (default setting), depending on the time that passed between the first correct answer and theirs. By default, the slope to zero points is implemented with a duration of 20 seconds.

The corresponding resulting point curves for correct and wrong answers during live sessions, when starting time with the first correct response, are shown in the plot below (not considering multipliers).
The corresponding resulting point curves for correct and wrong answers during live quizzes, when starting time with the first correct response, are shown in the plot below (not considering multipliers).

<div align="center">
<img
style={{ width: 600 }}
alt="Illustration of Grading in Live Sessions"
alt="Illustration of Grading in Live Quizzes"
src="/img_v3/21_live_quiz_awarded_points.svg"
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/docs/tutorials/course_management.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@ This process helps ensure that groups are formed **fairly and efficiently**. The
1. Participants that are **alone** in a group are automatically added to the random assignment pool, while their group is resolved.
2. Students remaining in the assignment pool are evenly distributed into **new groups** to match the preferred group size.

5. **Manual group creation** during the creation period: Lecturers can manually finalize group assignments at any time through the course's **group overview page** (ahead of the group formation deadline). This allows you to use randomized group formation in a single in-class session instead of across a longer timespan. To do so, you can select the "**Assign random groups**" button within the group overview on the course page (screenshot below). This will close group creation and distribute students from the pool into existing groups as described in the previous step. To reopen group formation after manual finalization, lecturers can **extend the deadline** in the course settings.
5. **Manual group creation** during the creation period: Lecturers can manually finalize group assignments at any time through the course's **group overview page** (ahead of the group formation deadline). This allows you to use randomized group formation in a single in-class quizzes instead of across a longer timespan. To do so, you can select the "**Assign random groups**" button within the group overview on the course page (screenshot below). This will close group creation and distribute students from the pool into existing groups as described in the previous step. To reopen group formation after manual finalization, lecturers can **extend the deadline** in the course settings.

![Random Group Creation - Lecturer View](/img_v3/18_random_groups_lecturer.png)
2 changes: 1 addition & 1 deletion apps/docs/docs/tutorials/element_management.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,5 @@ Elements (questions, flashcards, and content elements) are the building blocks o
- **Delete**: Remove unwanted elements (note: this action is irreversible)

:::info
Most elements can be used in any learning activity, with some restrictions. For detailed information on embedding elements into different activities, refer to the following sections. Remember, elements are persistent within existing sessions, even if deleted from your element pool.
Most elements can be used in any learning activity, with some restrictions. For detailed information on embedding elements into different activities, refer to the following sections. Remember, elements are persistent within existing quizzes, even if deleted from your element pool.
:::
2 changes: 1 addition & 1 deletion apps/docs/docs/tutorials/group_activity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ To create a group activity, navigate to the question pool and use the button at

In a first step, you will be asked to provide general information about the group activity. The following fields are available for customization:

- **Name**: The name of the group activity allows the user to distinguish the particular session from others. It is therefore only visible to the users themselves.
- **Name**: The name of the group activity allows the user to distinguish the particular activity from others. It is therefore only visible to the users themselves.
- **Display Name**: This name will be shown to the participants while the group activity is being performed.
- **Description**: A description of the group activity can optionally be added and will be displayed to the participants as an introduction to the group activity. While not required, we highly recommend to provide general information about the group activity here.

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/docs/tutorials/live_qa.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Live Quizzes in KlickerUZH can be coupled with a Live Q&A that enables students
title="KlickerUZH - Live Q&A"
></iframe>

A Live Q&A is embedded in the Live Quiz and can be activated during a Live Quiz session. For more details on the Live Quiz, review the dedicated [tutorial on live quiz creation](/tutorials/live_quiz/).
A Live Q&A is embedded in the Live Quiz and can be activated during its execution. For more details on the Live Quiz, review the dedicated [tutorial on live quiz creation](/tutorials/live_quiz/).

1. Activate Live Q&A: As soon as you activate a question block (displayed in green), the Live Q&A can be activated.
2. Manage questions: By clicking on the eye symbol, you can make the question visible for all the participants. The question can then not only be seen by others, but also be upvoted. Furthermore, you can sort the incoming questions or delete them.
Expand Down
12 changes: 6 additions & 6 deletions apps/docs/docs/tutorials/live_quiz.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ Live Quizzes in KlickerUZH involve real-time interaction during lectures to fost

**Add a description:**

1. Name: The name of the Live Quiz allows the user to distinguish the particular session from others. It is therefore only visible to the users themselves.
1. Name: The name of the Live Quiz allows the user to distinguish the particular quiz from others. It is therefore only visible to the users themselves.
2. Display Name: This name will be shown to the participants while the Live Quiz is being performed.
3. Description: A description of the Live Quiz can optionally be added and will be displayed to the participants at the beginning of the session.
3. Description: A description of the Live Quiz can optionally be added and will be displayed to the participants at the beginning of the live quiz.

**Adjust the settings:**

Expand Down Expand Up @@ -69,9 +69,9 @@ For this step, existing questions are required. If you need help with creating q
title="KlickerUZH - Live Quiz Execution"
></iframe>

The prepared Live Quiz can be found under Sessions. Here it is possible to edit the session before it is started. Once Start Session is clicked, the session can no longer be edited. Also note that once Live Quizzes are closed, they cannot be reopened.
The prepared Live Quiz can be found under "Live Quizzes". Here it is possible to edit the quiz before it is started. Once the live quiz is started, it can no longer be edited. Also note that once Live Quizzes are closed, they cannot be reopened.

Once the session is stared, there are the following steps to take:
Once the quiz is stared, there are the following steps to take:

1. QR Code: To share the QR code, you can either click on "Present QR code" and copy the link (recommended) or take a screenshot of the QR code and share it.
2. Start first/next block: In order for the participants to see the particular block of questions, click the Start first/next block button.
Expand All @@ -83,7 +83,7 @@ Once the session is stared, there are the following steps to take:

## How can I edit a Live Quiz?

It is possible to edit a Live Quiz only before it has been started. Once Start Session is clicked, the session can no longer be edited.
It is possible to edit a Live Quiz only before it has been started. Once the quiz is started, it can no longer be edited.

## How can participants join a Live Quiz?

Expand All @@ -103,7 +103,7 @@ It is possible to edit a Live Quiz only before it has been started. Once Start S
title="KlickerUZH - Join Live Quiz"
></iframe>

Once the session is started, click on the QR code button in the top bar of the session page. You can send the direct link to your participants or show them the QR code (Present QR code displays the QR code on a separate page).
Once the live quiz is started, click on the QR code button in the top bar of the quiz page. You can send the direct link to your participants or show them the QR code (Present QR code displays the QR code on a separate page).

## What should I look out for when creating a gamified Live Quiz?

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/docs/tutorials/lti_integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Create a KlickerUZH structure with the following LTI pages:

1. **Course overview and documentation**: At the very top of your KlickerUZH course page, you can add a description entailing an overview of how the KlickerUZH will be used in your course, including the timing and purpose of its features. This section can also include information on initial login and account setup. The information given in this text box can then be integrated into your OLAT course, providing your students with an overview and guidance.

2. **Live Quiz and Q&A**: Make sure to integrate a page where your students can access the live quizzes and Q&A sessions (if you are using them) directly from OLAT.
2. **Live Quiz and Q&A**: Make sure to integrate a page where your students can access the live quizzes and Q&A quizzes (if you are using them) directly from OLAT.

3. **Leaderboard**: If your course includes gamification elements and/or groups and group activities, it makes sense to dedicate a page to the leaderboard (where students can also manage their groups). Motivate students by presenting the leaderboard that tracks individual and group points from time to time.

Expand Down
Loading

0 comments on commit ea7c3e8

Please sign in to comment.