This commit is contained in:
2024-11-15 13:29:52 -07:00
parent 283650d70a
commit 3725d40e6e
3 changed files with 27 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ export function useAuthoritativeUpdates({
[clientDataUpdatedAt, serverUpdatedAt]
);
console.log("client is authoritative", clientIsAuthoritative);
// console.log("client is authoritative", clientIsAuthoritative);
const textUpdate = useCallback((t: string, updateMonaco: boolean = false) => {
setText(t);
setClientDataUpdatedAt(Date.now());

View File

@@ -109,4 +109,29 @@ Which events are triggered when the user clicks on an input field?
essay`;
expect(questionMarkdown).toContain(expectedMarkdown);
});
// it("Can parse short answer with auto graded answers", () => {
// const rawMarkdownQuiz = `
// Name: Test Quiz
// ShuffleAnswers: true
// OneQuestionAtATime: false
// DueAt: 08/21/2023 23:59:00
// LockAt: 08/21/2023 23:59:00
// AssignmentGroup: Assignments
// AllowedAttempts: -1
// Description: this is the
// multi line
// description
// ---
// Which events are triggered when the user clicks on an input field?
// *a) test
// short_answer=
// `;
// const quiz = quizMarkdownUtils.parseMarkdown(rawMarkdownQuiz);
// const firstQuestion = quiz.questions[0];
// expect(firstQuestion.questionType).toBe(QuestionType.SHORT_ANSWER_WITH_ANSWERS)
// });
});

View File

@@ -1,7 +1,7 @@
"use client";
import { useState } from "react";
import superjson from "superjson";
import { httpBatchLink, httpLink } from "@trpc/client";
import { httpBatchLink } from "@trpc/client";
import { trpc } from "./trpcClient";
import { getQueryClient } from "@/app/providersQueryClientUtils";
import { isServer } from "@tanstack/react-query";