Merged in feature/VBV-278-vorbereitungsauftrag (pull request #96)
Feature/VBV-278 vorbereitungsauftrag Approved-by: Elia Bieri
This commit is contained in:
commit
4b06654954
|
|
@ -131,8 +131,8 @@ const sendFeedback = () => {
|
|||
<template>
|
||||
<LearningContentMultiLayout
|
||||
:title="title"
|
||||
subtitle="Feedback"
|
||||
learning-content-type="learnpath.LearningContentFeedback"
|
||||
sub-title="Feedback"
|
||||
:learning-content="page"
|
||||
:show-start-button="stepNo === 0"
|
||||
:show-next-button="stepNo > 0 && stepNo + 1 < numSteps"
|
||||
:show-previous-button="stepNo > 0"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ const router = useRouter();
|
|||
defineProps<{
|
||||
show: boolean;
|
||||
courseSession: CourseSession | undefined;
|
||||
mediaUrl: string | undefined;
|
||||
mediaUrl?: string;
|
||||
user: UserState | undefined;
|
||||
}>();
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<div v-if="label" class="mb-2 block">{{ label }}</div>
|
||||
<textarea
|
||||
:value="modelValue"
|
||||
class="h-40 w-full border-gray-500"
|
||||
class="h-40 w-full border-gray-500 placeholder-gray-800 placeholder-opacity-100"
|
||||
:data-cy="`it-textarea-${cyKey}`"
|
||||
:disabled="disabled"
|
||||
:placeholder="placeholder"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-
|
|||
const documents = {
|
||||
"\n mutation SendFeedbackMutation($input: SendFeedbackInput!) {\n send_feedback(input: $input) {\n feedback_response {\n id\n }\n errors {\n field\n messages\n }\n }\n }\n": types.SendFeedbackMutationDocument,
|
||||
"\n mutation UpsertAssignmentCompletion(\n $assignmentId: ID!\n $courseSessionId: ID!\n $assignmentUserId: ID\n $completionStatus: String!\n $completionDataString: String!\n $evaluationGrade: Float\n $evaluationPoints: Float\n ) {\n upsert_assignment_completion(\n assignment_id: $assignmentId\n course_session_id: $courseSessionId\n assignment_user_id: $assignmentUserId\n completion_status: $completionStatus\n completion_data_string: $completionDataString\n evaluation_grade: $evaluationGrade\n evaluation_points: $evaluationPoints\n ) {\n assignment_completion {\n id\n completion_status\n submitted_at\n evaluation_submitted_at\n evaluation_grade\n evaluation_points\n completion_data\n }\n }\n }\n": types.UpsertAssignmentCompletionDocument,
|
||||
"\n query assignmentCompletionQuery(\n $assignmentId: ID!\n $courseSessionId: ID!\n $assignmentUserId: ID\n ) {\n assignment(id: $assignmentId) {\n id\n content_type\n evaluation_description\n evaluation_document_url\n evaluation_tasks\n performance_objectives\n starting_position\n tasks\n title\n translation_key\n slug\n }\n assignment_completion(\n assignment_id: $assignmentId\n course_session_id: $courseSessionId\n assignment_user_id: $assignmentUserId\n ) {\n id\n completion_status\n submitted_at\n evaluation_submitted_at\n evaluation_user {\n id\n }\n assignment_user {\n id\n }\n evaluation_grade\n evaluation_points\n completion_data\n }\n }\n": types.AssignmentCompletionQueryDocument,
|
||||
"\n query assignmentCompletionQuery(\n $assignmentId: ID!\n $courseSessionId: ID!\n $assignmentUserId: ID\n ) {\n assignment(id: $assignmentId) {\n assignment_type\n content_type\n effort_required\n evaluation_description\n evaluation_document_url\n evaluation_tasks\n id\n intro_text\n performance_objectives\n slug\n tasks\n title\n translation_key\n }\n assignment_completion(\n assignment_id: $assignmentId\n course_session_id: $courseSessionId\n assignment_user_id: $assignmentUserId\n ) {\n id\n completion_status\n submitted_at\n evaluation_submitted_at\n evaluation_user {\n id\n }\n assignment_user {\n id\n }\n evaluation_grade\n evaluation_points\n completion_data\n }\n }\n": types.AssignmentCompletionQueryDocument,
|
||||
"\n query courseQuery($courseId: Int!) {\n course(id: $courseId) {\n id\n slug\n title\n category_name\n learning_path {\n id\n }\n }\n }\n": types.CourseQueryDocument,
|
||||
};
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ export function graphql(source: "\n mutation UpsertAssignmentCompletion(\n $
|
|||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n query assignmentCompletionQuery(\n $assignmentId: ID!\n $courseSessionId: ID!\n $assignmentUserId: ID\n ) {\n assignment(id: $assignmentId) {\n id\n content_type\n evaluation_description\n evaluation_document_url\n evaluation_tasks\n performance_objectives\n starting_position\n tasks\n title\n translation_key\n slug\n }\n assignment_completion(\n assignment_id: $assignmentId\n course_session_id: $courseSessionId\n assignment_user_id: $assignmentUserId\n ) {\n id\n completion_status\n submitted_at\n evaluation_submitted_at\n evaluation_user {\n id\n }\n assignment_user {\n id\n }\n evaluation_grade\n evaluation_points\n completion_data\n }\n }\n"): (typeof documents)["\n query assignmentCompletionQuery(\n $assignmentId: ID!\n $courseSessionId: ID!\n $assignmentUserId: ID\n ) {\n assignment(id: $assignmentId) {\n id\n content_type\n evaluation_description\n evaluation_document_url\n evaluation_tasks\n performance_objectives\n starting_position\n tasks\n title\n translation_key\n slug\n }\n assignment_completion(\n assignment_id: $assignmentId\n course_session_id: $courseSessionId\n assignment_user_id: $assignmentUserId\n ) {\n id\n completion_status\n submitted_at\n evaluation_submitted_at\n evaluation_user {\n id\n }\n assignment_user {\n id\n }\n evaluation_grade\n evaluation_points\n completion_data\n }\n }\n"];
|
||||
export function graphql(source: "\n query assignmentCompletionQuery(\n $assignmentId: ID!\n $courseSessionId: ID!\n $assignmentUserId: ID\n ) {\n assignment(id: $assignmentId) {\n assignment_type\n content_type\n effort_required\n evaluation_description\n evaluation_document_url\n evaluation_tasks\n id\n intro_text\n performance_objectives\n slug\n tasks\n title\n translation_key\n }\n assignment_completion(\n assignment_id: $assignmentId\n course_session_id: $courseSessionId\n assignment_user_id: $assignmentUserId\n ) {\n id\n completion_status\n submitted_at\n evaluation_submitted_at\n evaluation_user {\n id\n }\n assignment_user {\n id\n }\n evaluation_grade\n evaluation_points\n completion_data\n }\n }\n"): (typeof documents)["\n query assignmentCompletionQuery(\n $assignmentId: ID!\n $courseSessionId: ID!\n $assignmentUserId: ID\n ) {\n assignment(id: $assignmentId) {\n assignment_type\n content_type\n effort_required\n evaluation_description\n evaluation_document_url\n evaluation_tasks\n id\n intro_text\n performance_objectives\n slug\n tasks\n title\n translation_key\n }\n assignment_completion(\n assignment_id: $assignmentId\n course_session_id: $courseSessionId\n assignment_user_id: $assignmentUserId\n ) {\n id\n completion_status\n submitted_at\n evaluation_submitted_at\n evaluation_user {\n id\n }\n assignment_user {\n id\n }\n evaluation_grade\n evaluation_points\n completion_data\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -34,6 +34,16 @@ export type Scalars = {
|
|||
JSONString: any;
|
||||
};
|
||||
|
||||
/** An enumeration. */
|
||||
export enum AssignmentAssignmentAssignmentTypeChoices {
|
||||
/** CASEWORK */
|
||||
Casework = 'CASEWORK',
|
||||
/** PREP_ASSIGNMENT */
|
||||
PrepAssignment = 'PREP_ASSIGNMENT',
|
||||
/** REFLECTION */
|
||||
Reflection = 'REFLECTION'
|
||||
}
|
||||
|
||||
/** An enumeration. */
|
||||
export enum AssignmentAssignmentCompletionCompletionStatusChoices {
|
||||
/** EVALUATION_IN_PROGRESS */
|
||||
|
|
@ -70,6 +80,7 @@ export type AssignmentCompletionType = {
|
|||
|
||||
export type AssignmentType = CoursePageInterface & {
|
||||
__typename?: 'AssignmentType';
|
||||
assignment_type: AssignmentAssignmentAssignmentTypeChoices;
|
||||
content_type?: Maybe<Scalars['String']>;
|
||||
/** Zeitaufwand als Text */
|
||||
effort_required: Scalars['String'];
|
||||
|
|
@ -80,11 +91,11 @@ export type AssignmentType = CoursePageInterface & {
|
|||
evaluation_tasks?: Maybe<Scalars['JSONStreamField']>;
|
||||
frontend_url?: Maybe<Scalars['String']>;
|
||||
id?: Maybe<Scalars['ID']>;
|
||||
/** Erläuterung der Ausgangslage */
|
||||
intro_text: Scalars['String'];
|
||||
live?: Maybe<Scalars['Boolean']>;
|
||||
performance_objectives?: Maybe<Scalars['JSONStreamField']>;
|
||||
slug?: Maybe<Scalars['String']>;
|
||||
/** Erläuterung der Ausgangslage */
|
||||
starting_position: Scalars['String'];
|
||||
tasks?: Maybe<Scalars['JSONStreamField']>;
|
||||
title?: Maybe<Scalars['String']>;
|
||||
translation_key?: Maybe<Scalars['String']>;
|
||||
|
|
@ -273,7 +284,7 @@ export type AssignmentCompletionQueryQueryVariables = Exact<{
|
|||
}>;
|
||||
|
||||
|
||||
export type AssignmentCompletionQueryQuery = { __typename?: 'Query', assignment?: { __typename?: 'AssignmentType', id?: string | null, content_type?: string | null, evaluation_description: string, evaluation_document_url: string, evaluation_tasks?: any | null, performance_objectives?: any | null, starting_position: string, tasks?: any | null, title?: string | null, translation_key?: string | null, slug?: string | null } | null, assignment_completion?: { __typename?: 'AssignmentCompletionType', id: string, completion_status: AssignmentAssignmentCompletionCompletionStatusChoices, submitted_at?: any | null, evaluation_submitted_at?: any | null, evaluation_grade?: number | null, evaluation_points?: number | null, completion_data?: any | null, evaluation_user?: { __typename?: 'UserType', id: string } | null, assignment_user: { __typename?: 'UserType', id: string } } | null };
|
||||
export type AssignmentCompletionQueryQuery = { __typename?: 'Query', assignment?: { __typename?: 'AssignmentType', assignment_type: AssignmentAssignmentAssignmentTypeChoices, content_type?: string | null, effort_required: string, evaluation_description: string, evaluation_document_url: string, evaluation_tasks?: any | null, id?: string | null, intro_text: string, performance_objectives?: any | null, slug?: string | null, tasks?: any | null, title?: string | null, translation_key?: string | null } | null, assignment_completion?: { __typename?: 'AssignmentCompletionType', id: string, completion_status: AssignmentAssignmentCompletionCompletionStatusChoices, submitted_at?: any | null, evaluation_submitted_at?: any | null, evaluation_grade?: number | null, evaluation_points?: number | null, completion_data?: any | null, evaluation_user?: { __typename?: 'UserType', id: string } | null, assignment_user: { __typename?: 'UserType', id: string } } | null };
|
||||
|
||||
export type CourseQueryQueryVariables = Exact<{
|
||||
courseId: Scalars['Int'];
|
||||
|
|
@ -285,5 +296,5 @@ export type CourseQueryQuery = { __typename?: 'Query', course?: { __typename?: '
|
|||
|
||||
export const SendFeedbackMutationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SendFeedbackMutation"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SendFeedbackInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"send_feedback"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"feedback_response"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"errors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"field"}},{"kind":"Field","name":{"kind":"Name","value":"messages"}}]}}]}}]}}]} as unknown as DocumentNode<SendFeedbackMutationMutation, SendFeedbackMutationMutationVariables>;
|
||||
export const UpsertAssignmentCompletionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpsertAssignmentCompletion"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"assignmentId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"courseSessionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"assignmentUserId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"completionStatus"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"completionDataString"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"evaluationGrade"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"evaluationPoints"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"upsert_assignment_completion"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"assignment_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"assignmentId"}}},{"kind":"Argument","name":{"kind":"Name","value":"course_session_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"courseSessionId"}}},{"kind":"Argument","name":{"kind":"Name","value":"assignment_user_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"assignmentUserId"}}},{"kind":"Argument","name":{"kind":"Name","value":"completion_status"},"value":{"kind":"Variable","name":{"kind":"Name","value":"completionStatus"}}},{"kind":"Argument","name":{"kind":"Name","value":"completion_data_string"},"value":{"kind":"Variable","name":{"kind":"Name","value":"completionDataString"}}},{"kind":"Argument","name":{"kind":"Name","value":"evaluation_grade"},"value":{"kind":"Variable","name":{"kind":"Name","value":"evaluationGrade"}}},{"kind":"Argument","name":{"kind":"Name","value":"evaluation_points"},"value":{"kind":"Variable","name":{"kind":"Name","value":"evaluationPoints"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"assignment_completion"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"completion_status"}},{"kind":"Field","name":{"kind":"Name","value":"submitted_at"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_submitted_at"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_grade"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_points"}},{"kind":"Field","name":{"kind":"Name","value":"completion_data"}}]}}]}}]}}]} as unknown as DocumentNode<UpsertAssignmentCompletionMutation, UpsertAssignmentCompletionMutationVariables>;
|
||||
export const AssignmentCompletionQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"assignmentCompletionQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"assignmentId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"courseSessionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"assignmentUserId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"assignment"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"assignmentId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content_type"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_description"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_document_url"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_tasks"}},{"kind":"Field","name":{"kind":"Name","value":"performance_objectives"}},{"kind":"Field","name":{"kind":"Name","value":"starting_position"}},{"kind":"Field","name":{"kind":"Name","value":"tasks"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"translation_key"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}},{"kind":"Field","name":{"kind":"Name","value":"assignment_completion"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"assignment_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"assignmentId"}}},{"kind":"Argument","name":{"kind":"Name","value":"course_session_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"courseSessionId"}}},{"kind":"Argument","name":{"kind":"Name","value":"assignment_user_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"assignmentUserId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"completion_status"}},{"kind":"Field","name":{"kind":"Name","value":"submitted_at"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_submitted_at"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"assignment_user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_grade"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_points"}},{"kind":"Field","name":{"kind":"Name","value":"completion_data"}}]}}]}}]} as unknown as DocumentNode<AssignmentCompletionQueryQuery, AssignmentCompletionQueryQueryVariables>;
|
||||
export const AssignmentCompletionQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"assignmentCompletionQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"assignmentId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"courseSessionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"assignmentUserId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"assignment"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"assignmentId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"assignment_type"}},{"kind":"Field","name":{"kind":"Name","value":"content_type"}},{"kind":"Field","name":{"kind":"Name","value":"effort_required"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_description"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_document_url"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_tasks"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"intro_text"}},{"kind":"Field","name":{"kind":"Name","value":"performance_objectives"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"tasks"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"translation_key"}}]}},{"kind":"Field","name":{"kind":"Name","value":"assignment_completion"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"assignment_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"assignmentId"}}},{"kind":"Argument","name":{"kind":"Name","value":"course_session_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"courseSessionId"}}},{"kind":"Argument","name":{"kind":"Name","value":"assignment_user_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"assignmentUserId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"completion_status"}},{"kind":"Field","name":{"kind":"Name","value":"submitted_at"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_submitted_at"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"assignment_user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_grade"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_points"}},{"kind":"Field","name":{"kind":"Name","value":"completion_data"}}]}}]}}]} as unknown as DocumentNode<AssignmentCompletionQueryQuery, AssignmentCompletionQueryQueryVariables>;
|
||||
export const CourseQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"courseQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"courseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"course"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"courseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"category_name"}},{"kind":"Field","name":{"kind":"Name","value":"learning_path"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]}}]} as unknown as DocumentNode<CourseQueryQuery, CourseQueryQueryVariables>;
|
||||
|
|
@ -97,8 +97,10 @@ enum CoreUserLanguageChoices {
|
|||
}
|
||||
|
||||
type AssignmentType implements CoursePageInterface {
|
||||
assignment_type: AssignmentAssignmentAssignmentTypeChoices!
|
||||
|
||||
"""Erläuterung der Ausgangslage"""
|
||||
starting_position: String!
|
||||
intro_text: String!
|
||||
|
||||
"""Zeitaufwand als Text"""
|
||||
effort_required: String!
|
||||
|
|
@ -120,6 +122,18 @@ type AssignmentType implements CoursePageInterface {
|
|||
performance_objectives: JSONStreamField
|
||||
}
|
||||
|
||||
"""An enumeration."""
|
||||
enum AssignmentAssignmentAssignmentTypeChoices {
|
||||
"""CASEWORK"""
|
||||
CASEWORK
|
||||
|
||||
"""PREP_ASSIGNMENT"""
|
||||
PREP_ASSIGNMENT
|
||||
|
||||
"""REFLECTION"""
|
||||
REFLECTION
|
||||
}
|
||||
|
||||
scalar JSONStreamField
|
||||
|
||||
type AssignmentCompletionType {
|
||||
|
|
|
|||
|
|
@ -7,17 +7,19 @@ export const ASSIGNMENT_COMPLETION_QUERY = graphql(`
|
|||
$assignmentUserId: ID
|
||||
) {
|
||||
assignment(id: $assignmentId) {
|
||||
id
|
||||
assignment_type
|
||||
content_type
|
||||
effort_required
|
||||
evaluation_description
|
||||
evaluation_document_url
|
||||
evaluation_tasks
|
||||
id
|
||||
intro_text
|
||||
performance_objectives
|
||||
starting_position
|
||||
slug
|
||||
tasks
|
||||
title
|
||||
translation_key
|
||||
slug
|
||||
}
|
||||
assignment_completion(
|
||||
assignment_id: $assignmentId
|
||||
|
|
|
|||
|
|
@ -74,7 +74,11 @@ async function startEvaluation() {
|
|||
</p>
|
||||
|
||||
<div>
|
||||
<button class="btn-primary" data-cy="start-evaluation" @click="startEvaluation()">
|
||||
<button
|
||||
class="btn-primary text-large"
|
||||
data-cy="start-evaluation"
|
||||
@click="startEvaluation()"
|
||||
>
|
||||
<span
|
||||
v-if="
|
||||
props.assignmentCompletion.completion_status === 'EVALUATION_IN_PROGRESS'
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ const evaluationUser = computed(() => {
|
|||
Uhr
|
||||
</div>
|
||||
<div v-else>
|
||||
<button class="btn-primary" @click="submitEvaluation()">
|
||||
<button class="btn-primary text-large" @click="submitEvaluation()">
|
||||
Bewertung freigeben
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -153,7 +153,7 @@ const evaluationUser = computed(() => {
|
|||
<div v-for="(task, index) in props.assignment.evaluation_tasks" :key="task.id">
|
||||
<article class="border-t py-4">
|
||||
<div class="flex flex-row justify-between">
|
||||
<div class="mb-4">
|
||||
<div class="mb-4 text-gray-900">
|
||||
Bewertungskriterium {{ index + 1 }}: {{ task.value.title }}
|
||||
</div>
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -66,9 +66,9 @@ const assignmentDetail = computed(() =>
|
|||
</div>
|
||||
|
||||
<div>
|
||||
<router-link :to="props.assignment.frontend_url" class="link">
|
||||
<a :href="props.assignment.frontend_url" class="link" target="_blank">
|
||||
Im Circle anzeigen
|
||||
</router-link>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ onMounted(async () => {
|
|||
{{ props.assignment.title }}
|
||||
</div>
|
||||
<div><ItProgress :status-count="state.progressStatusCount" /></div>
|
||||
<div>
|
||||
<div class="text-gray-900" :class="{ 'text-gray-900': showTitle }">
|
||||
{{ state.progressStatusCount.success || 0 }} von
|
||||
{{
|
||||
(state.progressStatusCount.success || 0) +
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ const assignments = computed(() => {
|
|||
<div>Geleitete Fallarbeiten</div>
|
||||
</h3>
|
||||
|
||||
<div v-for="assignment in assignments" :key="assignment.id">
|
||||
<div v-for="assignment in assignments" :key="assignment.id" class="mb-4">
|
||||
<AssignmentSubmissionProgress
|
||||
:show-title="true"
|
||||
:course-session="props.courseSession"
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
<script setup lang="ts">
|
||||
import type { LearningContentType } from "@/types";
|
||||
import type { LearningContent } from "@/types";
|
||||
import { learningContentTypeData } from "@/utils/typeMaps";
|
||||
|
||||
const props = defineProps<{
|
||||
learningContentType: LearningContentType;
|
||||
learningContent: LearningContent;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
v-if="props.learningContentType !== 'learnpath.LearningContentPlaceholder'"
|
||||
v-if="props.learningContent.content_type !== 'learnpath.LearningContentPlaceholder'"
|
||||
class="flex h-min w-min items-center gap-2 rounded-full bg-gray-200 px-2.5 py-0.5"
|
||||
>
|
||||
<component
|
||||
:is="learningContentTypeData(props.learningContentType).icon"
|
||||
:is="learningContentTypeData(props.learningContent).icon"
|
||||
class="h-6 w-6"
|
||||
></component>
|
||||
<p class="whitespace-nowrap">
|
||||
{{ learningContentTypeData(props.learningContentType).title }}
|
||||
{{ learningContentTypeData(props.learningContent).title }}
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -174,9 +174,7 @@ const learningSequenceBorderClass = computed(() => {
|
|||
</button>
|
||||
<div class="hidden sm:block"></div>
|
||||
<div class="w-full sm:w-auto">
|
||||
<LearningContentBadge
|
||||
:learning-content-type="learningContent.content_type"
|
||||
/>
|
||||
<LearningContentBadge :learning-content="learningContent" />
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -17,30 +17,25 @@ const step = useRouteQuery("step");
|
|||
|
||||
<template>
|
||||
<!-- eslint-disable vue/no-v-html -->
|
||||
<h3 class="mt-8">{{ $t("assignment.initialSituationTitle") }}</h3>
|
||||
|
||||
<p
|
||||
v-if="props.assignment.starting_position"
|
||||
v-if="props.assignment.intro_text"
|
||||
class="default-wagtail-rich-text text-large"
|
||||
v-html="props.assignment.starting_position"
|
||||
v-html="props.assignment.intro_text"
|
||||
></p>
|
||||
|
||||
<h3 class="mt-8">{{ $t("assignment.taskDefinitionTitle") }}</h3>
|
||||
<h3 class="mb-4 mt-8">{{ $t("assignment.taskDefinitionTitle") }}</h3>
|
||||
<p class="text-large">
|
||||
{{ $t("assignment.taskDefinition") }}
|
||||
</p>
|
||||
<ul>
|
||||
<li v-for="(task, index) in props.assignment.tasks" :key="task.id">
|
||||
<button
|
||||
class="text-large text-left underline"
|
||||
@click="step = (index + 1).toString()"
|
||||
>
|
||||
<li v-for="(task, index) in props.assignment.tasks" :key="task.id" class="py-1">
|
||||
<button class="text-large link" @click="step = (index + 1).toString()">
|
||||
- {{ task.value.title }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3 class="mt-8">{{ $t("assignment.dueDateTitle") }}</h3>
|
||||
<h3 class="mb-4 mt-8">{{ $t("assignment.dueDateTitle") }}</h3>
|
||||
<p v-if="props.dueDate" class="text-large">
|
||||
{{
|
||||
$t("assignment.dueDateIntroduction", {
|
||||
|
|
@ -53,10 +48,13 @@ const step = useRouteQuery("step");
|
|||
{{ $t("assignment.dueDateNotSet") }}
|
||||
</p>
|
||||
|
||||
<h3 class="mt-8">{{ $t("assignment.effortTitle") }}</h3>
|
||||
<div v-if="props.assignment.effort_required">
|
||||
<h3 class="mb-4 mt-8">{{ $t("assignment.effortTitle") }}</h3>
|
||||
<p class="text-large">{{ props.assignment.effort_required }}</p>
|
||||
</div>
|
||||
|
||||
<h3 class="mt-8 border-b border-gray-500 pb-2">
|
||||
<div v-if="props.assignment.performance_objectives.length">
|
||||
<h3 class="mt-8 border-b border-gray-500 pb-4">
|
||||
{{ $t("assignment.performanceObjectivesTitle") }}
|
||||
</h3>
|
||||
<p
|
||||
|
|
@ -66,13 +64,21 @@ const step = useRouteQuery("step");
|
|||
>
|
||||
{{ performance_objective.value.text }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<h3 class="mt-8">{{ $t("assignment.assessmentTitle") }}</h3>
|
||||
<div
|
||||
v-if="
|
||||
props.assignment.evaluation_description ||
|
||||
props.assignment.evaluation_document_url
|
||||
"
|
||||
>
|
||||
<h3 class="mb-4 mt-8">{{ $t("assignment.assessmentTitle") }}</h3>
|
||||
<p
|
||||
v-if="props.assignment.evaluation_description"
|
||||
class="default-wagtail-rich-text text-large"
|
||||
v-html="props.assignment.evaluation_description"
|
||||
></p>
|
||||
<p v-if="props.assignment.evaluation_document_url">
|
||||
<a
|
||||
:href="props.assignment.evaluation_document_url"
|
||||
target="_blank"
|
||||
|
|
@ -80,4 +86,6 @@ const step = useRouteQuery("step");
|
|||
>
|
||||
{{ $t("assignment.showAssessmentDocument") }}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import AssignmentIntroductionView from "@/pages/learningPath/learningContentPage
|
|||
import AssignmentSubmissionView from "@/pages/learningPath/learningContentPage/assignment/AssignmentSubmissionView.vue";
|
||||
import AssignmentTaskView from "@/pages/learningPath/learningContentPage/assignment/AssignmentTaskView.vue";
|
||||
import LearningContentMultiLayout from "@/pages/learningPath/learningContentPage/layouts/LearningContentMultiLayout.vue";
|
||||
import { useCourseSessionsStore } from "@/stores/courseSessions";
|
||||
import { useUserStore } from "@/stores/user";
|
||||
import type {
|
||||
Assignment,
|
||||
|
|
@ -75,6 +76,10 @@ onMounted(async () => {
|
|||
props.learningContent
|
||||
);
|
||||
|
||||
state.courseSessionAssignmentDetails = useCourseSessionsStore().findAssignmentDetails(
|
||||
props.learningContent.id
|
||||
);
|
||||
|
||||
// create initial `AssignmentCompletion` first, so that it exists and we don't
|
||||
// have reactivity problem accessing it.
|
||||
// noinspection TypeScriptValidateTypes
|
||||
|
|
@ -102,7 +107,14 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const numTasks = computed(() => assignment.value?.tasks?.length ?? 0);
|
||||
const numPages = computed(() => numTasks.value + 2);
|
||||
const numPages = computed(() => {
|
||||
if (assignmentType.value === "CASEWORK") {
|
||||
// casework has extra submission page
|
||||
return numTasks.value + 2;
|
||||
}
|
||||
|
||||
return numTasks.value + 1;
|
||||
});
|
||||
const showPreviousButton = computed(() => stepIndex.value != 0);
|
||||
const showNextButton = computed(() => stepIndex.value + 1 < numPages.value);
|
||||
const showExitButton = computed(() => numPages.value === stepIndex.value + 1);
|
||||
|
|
@ -144,17 +156,48 @@ const jumpToTask = (task: AssignmentTask) => {
|
|||
const getTitle = () => {
|
||||
if (0 === stepIndex.value) {
|
||||
return t("general.introduction");
|
||||
} else if (stepIndex.value === numPages.value - 1) {
|
||||
} else if (
|
||||
assignmentType.value === "CASEWORK" &&
|
||||
stepIndex.value === numPages.value - 1
|
||||
) {
|
||||
return t("general.submission");
|
||||
}
|
||||
return currentTask?.value?.value.title ?? "Unknown";
|
||||
};
|
||||
|
||||
const assignmentType = computed(() => {
|
||||
return assignment.value?.assignment_type ?? "CASEWORK";
|
||||
});
|
||||
|
||||
const subTitle = computed(() => {
|
||||
if (assignment.value) {
|
||||
let prefix = "Geleitete Fallarbeit";
|
||||
if (assignmentType.value === "PREP_ASSIGNMENT") {
|
||||
prefix = "Vorbereitungsauftrag";
|
||||
} else if (assignmentType.value === "REFLECTION") {
|
||||
prefix = "Reflexion";
|
||||
}
|
||||
return `${prefix}: ${assignment.value?.title ?? ""}`;
|
||||
}
|
||||
return "";
|
||||
});
|
||||
|
||||
const assignmentUser = computed(() => {
|
||||
return courseSession.value.users.find(
|
||||
(user) => user.user_id === Number(userStore.id)
|
||||
) as CourseSessionUser;
|
||||
});
|
||||
|
||||
const endBadgeText = computed(() => {
|
||||
if (assignmentType.value === "PREP_ASSIGNMENT") {
|
||||
return "Aufgaben";
|
||||
} else if (assignmentType.value === "CASEWORK") {
|
||||
return "Abgabe";
|
||||
}
|
||||
|
||||
// just return the number of tasks as default
|
||||
return (assignment.value?.tasks.length ?? 0).toString();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -162,9 +205,9 @@ const assignmentUser = computed(() => {
|
|||
<div class="flex">
|
||||
<LearningContentMultiLayout
|
||||
:current-step="stepIndex"
|
||||
:subtitle="assignment.title ?? ''"
|
||||
:sub-title="subTitle"
|
||||
:title="getTitle()"
|
||||
:learning-content-type="props.learningContent.content_type"
|
||||
:learning-content="props.learningContent"
|
||||
:steps-count="numPages"
|
||||
:show-next-button="showNextButton && stepIndex !== 0"
|
||||
:show-exit-button="showExitButton"
|
||||
|
|
@ -173,7 +216,7 @@ const assignmentUser = computed(() => {
|
|||
:base-url="props.learningContent.frontend_url"
|
||||
step-query-param="step"
|
||||
start-badge-text="Einleitung"
|
||||
end-badge-text="Abgabe"
|
||||
:end-badge-text="endBadgeText"
|
||||
close-button-variant="close"
|
||||
@previous="handleBack()"
|
||||
@next="handleContinue()"
|
||||
|
|
@ -186,13 +229,13 @@ const assignmentUser = computed(() => {
|
|||
:assignment="assignment"
|
||||
></AssignmentIntroductionView>
|
||||
<AssignmentTaskView
|
||||
v-if="currentTask"
|
||||
v-else-if="currentTask"
|
||||
:task="currentTask"
|
||||
:assignment-id="props.learningContent.content_assignment_id"
|
||||
:assignment-completion="assignmentCompletion"
|
||||
></AssignmentTaskView>
|
||||
<AssignmentSubmissionView
|
||||
v-if="stepIndex + 1 === numPages"
|
||||
v-else-if="assignmentType === 'CASEWORK' && stepIndex + 1 === numPages"
|
||||
:due-date="dueDate"
|
||||
:assignment="assignment"
|
||||
:assignment-completion="assignmentCompletion"
|
||||
|
|
|
|||
|
|
@ -17,10 +17,7 @@ const courseSessionAttendanceCourse = computed(() => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<LearningContentSimpleLayout
|
||||
:title="content.title"
|
||||
:learning-content-type="props.content.content_type"
|
||||
>
|
||||
<LearningContentSimpleLayout :title="content.title" :learning-content="props.content">
|
||||
<div class="container-medium">
|
||||
<div class="lg:mt-8">
|
||||
<div class="text-large my-4">
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
<script setup lang="ts">
|
||||
import LearningContentSimpleLayout from "@/pages/learningPath/learningContentPage/layouts/LearningContentSimpleLayout.vue";
|
||||
import type { LearningContentInterface } from "@/types";
|
||||
import type { LearningContent } from "@/types";
|
||||
|
||||
const props = defineProps<{
|
||||
content: LearningContentInterface;
|
||||
content: LearningContent;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<LearningContentSimpleLayout :learning-content-type="props.content.content_type">
|
||||
<LearningContentSimpleLayout :learning-content="props.content">
|
||||
<div class="h-screen">
|
||||
<iframe
|
||||
width="100%"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ log.debug("LearningContentMediaLibraryBlock.vue created");
|
|||
<template>
|
||||
<LearningContentSimpleLayout
|
||||
:title="props.content.title"
|
||||
:learning-content-type="props.content.content_type"
|
||||
:learning-content="props.content"
|
||||
>
|
||||
<div class="container-medium">
|
||||
<!-- eslint-disable vue/no-v-html -->
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
<script setup lang="ts">
|
||||
import LearningContentSimpleLayout from "@/pages/learningPath/learningContentPage/layouts/LearningContentSimpleLayout.vue";
|
||||
import type { LearningContentInterface } from "@/types";
|
||||
import type { LearningContent } from "@/types";
|
||||
|
||||
const props = defineProps<{
|
||||
content: LearningContentInterface;
|
||||
content: LearningContent;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<LearningContentSimpleLayout
|
||||
:title="props.content.title"
|
||||
:learning-content-type="props.content.content_type"
|
||||
:learning-content="props.content"
|
||||
>
|
||||
<!-- eslint-disable vue/no-v-html -->
|
||||
<div class="container-medium">
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const props = defineProps<{
|
|||
<template>
|
||||
<LearningContentSimpleLayout
|
||||
:title="props.content.title"
|
||||
:learning-content-type="props.content.content_type"
|
||||
:learning-content="props.content"
|
||||
>
|
||||
<!-- eslint-disable vue/no-v-html -->
|
||||
<div class="container-medium">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<LearningContentSimpleLayout
|
||||
:title="props.content.title"
|
||||
:learning-content-type="props.content.content_type"
|
||||
:learning-content="props.content"
|
||||
>
|
||||
<div class="container-medium">
|
||||
<iframe
|
||||
|
|
|
|||
|
|
@ -3,13 +3,15 @@
|
|||
import ItNavigationProgress from "@/components/ui/ItNavigationProgress.vue";
|
||||
import type { ClosingButtonVariant } from "@/pages/learningPath/learningContentPage/layouts/LearningContentFooter.vue";
|
||||
import LearningContentFooter from "@/pages/learningPath/learningContentPage/layouts/LearningContentFooter.vue";
|
||||
import type { LearningContentType } from "@/types";
|
||||
import type { LearningContent } from "@/types";
|
||||
import { learningContentTypeData } from "@/utils/typeMaps";
|
||||
import { computed } from "vue";
|
||||
|
||||
interface Props {
|
||||
title?: string;
|
||||
subtitle: string;
|
||||
learningContentType: LearningContentType;
|
||||
subTitle?: string;
|
||||
icon?: string;
|
||||
learningContent?: LearningContent;
|
||||
showStartButton: boolean;
|
||||
showPreviousButton: boolean;
|
||||
showNextButton: boolean;
|
||||
|
|
@ -24,7 +26,10 @@ interface Props {
|
|||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
title: undefined,
|
||||
title: "",
|
||||
subTitle: "",
|
||||
icon: "",
|
||||
learningContent: undefined,
|
||||
startBadgeText: undefined,
|
||||
endBadgeText: undefined,
|
||||
closeButtonVariant: "mark_as_done",
|
||||
|
|
@ -32,25 +37,44 @@ const props = withDefaults(defineProps<Props>(), {
|
|||
stepQueryParam: undefined,
|
||||
});
|
||||
|
||||
const subTitle = computed(() => {
|
||||
if (props.subTitle) {
|
||||
return props.subTitle;
|
||||
}
|
||||
if (props.learningContent) {
|
||||
return learningContentTypeData(props.learningContent).title;
|
||||
}
|
||||
return "";
|
||||
});
|
||||
|
||||
const icon = computed(() => {
|
||||
if (props.icon) {
|
||||
return props.icon;
|
||||
}
|
||||
if (props.learningContent) {
|
||||
return learningContentTypeData(props.learningContent).icon;
|
||||
}
|
||||
return "";
|
||||
});
|
||||
|
||||
const emit = defineEmits(["previous", "next", "exit"]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="container-large">
|
||||
<div
|
||||
v-if="props.learningContentType !== 'learnpath.LearningContentPlaceholder'"
|
||||
v-if="
|
||||
props.learningContent?.content_type !== 'learnpath.LearningContentPlaceholder'
|
||||
"
|
||||
class="flex h-min items-center gap-2 rounded-full pb-10"
|
||||
>
|
||||
<component
|
||||
:is="learningContentTypeData(props.learningContentType).icon"
|
||||
class="h-6 w-6 text-gray-900"
|
||||
></component>
|
||||
<p class="text-gray-900" data-cy="lc-subtitle">
|
||||
{{ props.subtitle }}
|
||||
<component :is="icon" v-if="icon" class="h-6 w-6 text-gray-900"></component>
|
||||
<p v-if="subTitle" class="text-gray-900" data-cy="lc-subtitle">
|
||||
{{ subTitle }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<h2 v-if="props.title" class="pb-6 text-3xl" data-cy="lc-title">
|
||||
<h2 v-if="props.title" class="mb-6 text-3xl" data-cy="lc-title">
|
||||
{{ props.title }}
|
||||
</h2>
|
||||
<ItNavigationProgress
|
||||
|
|
@ -61,7 +85,7 @@ const emit = defineEmits(["previous", "next", "exit"]);
|
|||
:end-badge-text="props.endBadgeText"
|
||||
:base-url="props.baseUrl"
|
||||
:query-param="props.stepQueryParam"
|
||||
class="overflow-hidden pb-12"
|
||||
class="mb-8 overflow-hidden"
|
||||
></ItNavigationProgress>
|
||||
<slot></slot>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,30 +1,56 @@
|
|||
<script setup lang="ts">
|
||||
// Basic layout for a learning content that only has a single step
|
||||
import LearningContentFooter from "@/pages/learningPath/learningContentPage/layouts/LearningContentFooter.vue";
|
||||
import type { LearningContentType } from "@/types";
|
||||
import type { LearningContent } from "@/types";
|
||||
import { learningContentTypeData } from "@/utils/typeMaps";
|
||||
import { computed } from "vue";
|
||||
|
||||
export interface Props {
|
||||
title?: string;
|
||||
learningContentType: LearningContentType;
|
||||
icon?: string;
|
||||
subTitle?: string;
|
||||
learningContent?: LearningContent;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
title: "",
|
||||
icon: "",
|
||||
subTitle: "",
|
||||
learningContent: undefined,
|
||||
});
|
||||
|
||||
const type = learningContentTypeData(props.learningContentType);
|
||||
const subTitle = computed(() => {
|
||||
if (props.subTitle) {
|
||||
return props.subTitle;
|
||||
}
|
||||
if (props.learningContent) {
|
||||
return learningContentTypeData(props.learningContent).title;
|
||||
}
|
||||
return "";
|
||||
});
|
||||
|
||||
const icon = computed(() => {
|
||||
if (props.icon) {
|
||||
return props.icon;
|
||||
}
|
||||
if (props.learningContent) {
|
||||
return learningContentTypeData(props.learningContent).icon;
|
||||
}
|
||||
return "";
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="container-medium">
|
||||
<div
|
||||
v-if="props.learningContentType !== 'learnpath.LearningContentPlaceholder'"
|
||||
v-if="
|
||||
props.learningContent?.content_type !== 'learnpath.LearningContentPlaceholder'
|
||||
"
|
||||
class="flex h-min w-full items-center gap-2 pb-8"
|
||||
>
|
||||
<component :is="type.icon" class="h-6 w-6 text-gray-900"></component>
|
||||
<p class="whitespace-nowrap text-gray-900" data-cy="lc-subtitle">
|
||||
{{ type.title }}
|
||||
<component :is="icon" v-if="icon" class="h-6 w-6 text-gray-900"></component>
|
||||
<p v-if="subTitle" class="whitespace-nowrap text-gray-900" data-cy="lc-subtitle">
|
||||
{{ subTitle }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -69,9 +69,9 @@ onUnmounted(() => {
|
|||
>
|
||||
<LearningContentMultiLayout
|
||||
:current-step="questionIndex"
|
||||
:subtitle="$t('selfEvaluation.title')"
|
||||
:sub-title="$t('selfEvaluation.title')"
|
||||
:title="$t('selfEvaluation.title', { title: learningUnit.title })"
|
||||
learning-content-type="learnpath.LearningContentLearningModule"
|
||||
icon="it-icon-lc-learning-module"
|
||||
:steps-count="questions.length"
|
||||
:show-next-button="showNextButton"
|
||||
:show-exit-button="showExitButton"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,9 @@ export function calcAssignmentLearningContents(learningPath?: LearningPath) {
|
|||
|
||||
return learningPath.circles.flatMap((circle) => {
|
||||
const learningContents = circle.flatLearningContents.filter(
|
||||
(lc) => lc.content_type === "learnpath.LearningContentAssignment"
|
||||
(lc) =>
|
||||
lc.content_type === "learnpath.LearningContentAssignment" &&
|
||||
lc.assignment_type === "CASEWORK"
|
||||
) as LearningContentAssignment[];
|
||||
return learningContents.map((lc) => {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ export interface LearningContentInterface extends BaseCourseWagtailPage {
|
|||
export interface LearningContentAssignment extends LearningContentInterface {
|
||||
readonly content_type: "learnpath.LearningContentAssignment";
|
||||
readonly content_assignment_id: number;
|
||||
readonly assignment_type: AssignmentType;
|
||||
}
|
||||
|
||||
export interface LearningContentAttendanceCourse extends LearningContentInterface {
|
||||
|
|
@ -326,9 +327,12 @@ export interface AssignmentEvaluationTask {
|
|||
};
|
||||
}
|
||||
|
||||
export type AssignmentType = "CASEWORK" | "PREP_ASSIGNMENT" | "REFLECTION";
|
||||
|
||||
export interface Assignment extends BaseCourseWagtailPage {
|
||||
readonly content_type: "assignment.Assignment";
|
||||
readonly starting_position: string;
|
||||
readonly assignment_type: AssignmentType;
|
||||
readonly intro_text: string;
|
||||
readonly effort_required: string;
|
||||
readonly performance_objectives: AssignmentPerformanceObjective[];
|
||||
readonly evaluation_description: string;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { LearningContentType } from "@/types";
|
||||
import type { LearningContent } from "@/types";
|
||||
import { assertUnreachable } from "@/utils/utils";
|
||||
|
||||
export interface LearningContentIdentifier {
|
||||
|
|
@ -7,11 +7,23 @@ export interface LearningContentIdentifier {
|
|||
}
|
||||
|
||||
export function learningContentTypeData(
|
||||
t: LearningContentType
|
||||
lc: LearningContent
|
||||
): LearningContentIdentifier {
|
||||
switch (t) {
|
||||
case "learnpath.LearningContentAssignment":
|
||||
return { title: "Transferauftrag", icon: "it-icon-lc-assignment" };
|
||||
switch (lc.content_type) {
|
||||
case "learnpath.LearningContentAssignment": {
|
||||
let title = "unknown";
|
||||
if (lc.assignment_type === "CASEWORK") {
|
||||
title = "Geleitete Fallarbeit";
|
||||
} else if (lc.assignment_type === "PREP_ASSIGNMENT") {
|
||||
title = "Vorbereitungsaufgabe";
|
||||
} else if (lc.assignment_type === "REFLECTION") {
|
||||
title = "Reflexion";
|
||||
}
|
||||
return {
|
||||
title: title,
|
||||
icon: "it-icon-lc-assignment",
|
||||
};
|
||||
}
|
||||
case "learnpath.LearningContentAttendanceCourse":
|
||||
return { title: "Präsenzkurs", icon: "it-icon-lc-training" };
|
||||
case "learnpath.LearningContentLearningModule":
|
||||
|
|
|
|||
|
|
@ -29,12 +29,18 @@ body {
|
|||
|
||||
.default-wagtail-rich-text h3 {
|
||||
margin-bottom: 1em;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.default-wagtail-rich-text p {
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.default-wagtail-rich-text a {
|
||||
text-decoration-line: underline;
|
||||
text-underline-offset: 2px;
|
||||
}
|
||||
|
||||
.default-wagtail-rich-text ul {
|
||||
list-style-type: disc;
|
||||
margin-left: 24px;
|
||||
|
|
@ -129,7 +135,7 @@ textarea {
|
|||
}
|
||||
|
||||
.btn-secondary {
|
||||
@apply inline-block border-2 border-blue-900 bg-white px-4
|
||||
@apply inline-block border-2 border-blue-900 bg-transparent px-4
|
||||
py-2 align-middle font-semibold text-blue-900
|
||||
hover:bg-gray-200
|
||||
disabled:cursor-not-allowed disabled:opacity-50;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { login } from "./helpers";
|
||||
|
||||
describe("circle page", () => {
|
||||
describe("circle.cy.js", () => {
|
||||
beforeEach(() => {
|
||||
cy.manageCommand("cypress_reset");
|
||||
|
||||
|
|
@ -47,20 +47,12 @@ describe("circle page", () => {
|
|||
);
|
||||
cy.get('[data-cy="complete-and-continue"]').click({ force: true });
|
||||
|
||||
cy.get('[data-cy="ls-continue-button"]').click();
|
||||
cy.get('[data-cy="lc-title"]').should("contain", "Vorbereitungsauftrag");
|
||||
cy.get('[data-cy="complete-and-continue"]').click({ force: true });
|
||||
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-fahrzeug-lc-verschaffe-dir-einen-überblick-checkbox"] > .cy-checkbox-checked'
|
||||
).should("have.class", "cy-checkbox-checked");
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-fahrzeug-lc-handlungsfeld-fahrzeug-checkbox"] > .cy-checkbox-checked'
|
||||
).should("have.class", "cy-checkbox-checked");
|
||||
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-fahrzeug-lc-vorbereitungsauftrag-checkbox"] > .cy-checkbox-checked'
|
||||
).should("have.class", "cy-checkbox-checked");
|
||||
});
|
||||
|
||||
it("continue button works", () => {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { login } from "./helpers";
|
||||
|
||||
describe("Competence", () => {
|
||||
describe("competence.cy.js", () => {
|
||||
beforeEach(() => {
|
||||
cy.manageCommand("cypress_reset");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { login } from "./helpers";
|
||||
|
||||
describe("learningPath page", () => {
|
||||
describe("learningPath.cy.js", () => {
|
||||
beforeEach(() => {
|
||||
cy.manageCommand("cypress_reset");
|
||||
login("test-student1@example.com", "test");
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { login } from "./helpers";
|
||||
|
||||
describe("login", () => {
|
||||
describe("login.cy.js", () => {
|
||||
Cypress.on("uncaught:exception", (err, runnable) => {
|
||||
// do not fail on failed requests during tests
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { login } from "./helpers";
|
||||
|
||||
describe("MediaLibrary", () => {
|
||||
describe("mediaLibrary.cy.js", () => {
|
||||
beforeEach(() => {
|
||||
cy.manageCommand("cypress_reset");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { login } from "./helpers";
|
||||
|
||||
describe("notifications page", () => {
|
||||
describe("notifications.cy.js", () => {
|
||||
beforeEach(() => {
|
||||
cy.manageCommand("cypress_reset");
|
||||
cy.manageCommand("create_default_notifications");
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
from vbv_lernwelt.assignment.models import (
|
||||
AssignmentListPage,
|
||||
AssignmentType,
|
||||
EvaluationSubTaskBlock,
|
||||
TaskContentStreamBlock,
|
||||
)
|
||||
from vbv_lernwelt.assignment.tests.assignment_factories import (
|
||||
AssignmentFactory,
|
||||
AssignmentListPageFactory,
|
||||
EvaluationSubTaskBlockFactory,
|
||||
EvaluationTaskBlockFactory,
|
||||
ExplanationBlockFactory,
|
||||
|
|
@ -13,30 +14,35 @@ from vbv_lernwelt.assignment.tests.assignment_factories import (
|
|||
UserTextInputBlockFactory,
|
||||
)
|
||||
from vbv_lernwelt.core.utils import replace_whitespace
|
||||
from vbv_lernwelt.course.consts import COURSE_TEST_ID, COURSE_UK
|
||||
from vbv_lernwelt.course.consts import COURSE_UK
|
||||
from vbv_lernwelt.course.models import CoursePage
|
||||
from wagtail.blocks import StreamValue
|
||||
from wagtail.blocks.list_block import ListBlock, ListValue
|
||||
from wagtail.rich_text import RichText
|
||||
|
||||
|
||||
def create_uk_assignments(course_id=COURSE_UK):
|
||||
course_page = CoursePage.objects.get(course_id=course_id)
|
||||
assignment_page = AssignmentListPageFactory(
|
||||
parent=course_page,
|
||||
def create_uk_casework(course_id=COURSE_UK):
|
||||
assignment_list_page = (
|
||||
CoursePage.objects.get(course_id=course_id)
|
||||
.get_children()
|
||||
.exact_type(AssignmentListPage)
|
||||
.first()
|
||||
)
|
||||
|
||||
assignment = AssignmentFactory(
|
||||
parent=assignment_page,
|
||||
parent=assignment_list_page,
|
||||
title="Überprüfen einer Motorfahrzeugs-Versicherungspolice",
|
||||
effort_required="ca. 5 Stunden",
|
||||
starting_position=replace_whitespace(
|
||||
intro_text=replace_whitespace(
|
||||
"""
|
||||
<h3>Ausgangslage</h3>
|
||||
<p>
|
||||
Jemand aus deiner Familie oder aus deinem Freundeskreis möchte sein
|
||||
Versicherungspolice überprüfen lassen. Diese Person kommt nun mit ihrer Police auf dich zu
|
||||
und bittet dich als Versicherungsprofi, diese kritisch zu überprüfen und ihr ggf. Anpassungsvorschläge
|
||||
zu unterbreiten. In diesem Kompetenznachweis kannst du nun dein Wissen und Können im Bereich
|
||||
der Motorfahrzeugversicherung unter Beweis stellen.
|
||||
</p>
|
||||
"""
|
||||
),
|
||||
performance_objectives=[
|
||||
|
|
@ -459,220 +465,50 @@ def create_uk_assignments(course_id=COURSE_UK):
|
|||
return assignment
|
||||
|
||||
|
||||
def create_test_assignment(course_id=COURSE_TEST_ID):
|
||||
course_page = CoursePage.objects.get(course_id=course_id)
|
||||
assignment_page = AssignmentListPageFactory(
|
||||
parent=course_page,
|
||||
def create_uk_prep_assignment(course_id=COURSE_UK):
|
||||
assignment_list_page = (
|
||||
CoursePage.objects.get(course_id=course_id)
|
||||
.get_children()
|
||||
.exact_type(AssignmentListPage)
|
||||
.first()
|
||||
)
|
||||
|
||||
assignment = AssignmentFactory(
|
||||
parent=assignment_page,
|
||||
title="Überprüfen einer Motorfahrzeugs-Versicherungspolice",
|
||||
effort_required="ca. 5 Stunden",
|
||||
starting_position=replace_whitespace(
|
||||
"""
|
||||
Jemand aus deiner Familie oder aus deinem Freundeskreis möchte sein
|
||||
Versicherungspolice überprüfen lassen. Diese Person kommt nun mit ihrer Police auf dich zu
|
||||
und bittet dich als Versicherungsprofi, diese kritisch zu überprüfen und ihr ggf. Anpassungsvorschläge
|
||||
zu unterbreiten. In diesem Kompetenznachweis kannst du nun dein Wissen und Können im Bereich
|
||||
der Motorfahrzeugversicherung unter Beweis stellen.
|
||||
"""
|
||||
),
|
||||
performance_objectives=[
|
||||
(
|
||||
"performance_objective",
|
||||
PerformanceObjectiveBlockFactory(
|
||||
text="Sie erläutern die Leistungen und Produkte im Versicherungsbereich."
|
||||
),
|
||||
),
|
||||
(
|
||||
"performance_objective",
|
||||
PerformanceObjectiveBlockFactory(
|
||||
text="Sie beurteilen gängige Versicherungslösungen fachkundig."
|
||||
),
|
||||
),
|
||||
],
|
||||
evaluation_document_url="/static/media/assignments/UK_03_09_NACH_KN_Beurteilungsraster.pdf",
|
||||
evaluation_description="Diese geleitete Fallarbeit wird auf Grund des folgenden Beurteilungsintrument bewertet.",
|
||||
)
|
||||
|
||||
assignment.evaluation_tasks = []
|
||||
assignment.evaluation_tasks.append(
|
||||
(
|
||||
"task",
|
||||
EvaluationTaskBlockFactory(
|
||||
title="Ausgangslage des Auftrags",
|
||||
description=RichText(
|
||||
"Beschreibt der/die Lernende die Ausgangslage des Auftrags vollständig?"
|
||||
),
|
||||
max_points=6,
|
||||
sub_tasks=ListValue(
|
||||
ListBlock(EvaluationSubTaskBlock()),
|
||||
values=[
|
||||
EvaluationSubTaskBlockFactory(
|
||||
title="Die Ausgangslage des Auftrag ist vollständig beschrieben.",
|
||||
description=RichText(
|
||||
replace_whitespace(
|
||||
parent=assignment_list_page,
|
||||
assignment_type=AssignmentType.PREP_ASSIGNMENT.name,
|
||||
title="Fahrzeug - Mein erstes Auto",
|
||||
effort_required="ca. 3 Stunden",
|
||||
intro_text=replace_whitespace(
|
||||
"""
|
||||
<h3>Handlungskompetenzen, Arbeitssituationen & Leistungsziele</h3>
|
||||
<p>
|
||||
Handlungskompetenz d2: Informations- und Beratungsgespräch mit Kunden oder Lieferanten führen<br/>
|
||||
Arbeitssituation 4: Kunden beraten und dazugehörige Prozesse abwickeln<br/>
|
||||
<ul>
|
||||
<li>Worum geht es? Was ist die Aufgabe?</li>
|
||||
<li>Sind das Kundenprofil und die Kundenbeziehung vollständig und nachvollziehbar dargestellt?</li>
|
||||
<li>Ist das Alter des Fahrzeugs dokumentiert?</li>
|
||||
<li>Welche Ressourcen stehen zur Verfügung?</li>
|
||||
<li>d2.pv.ük3: Sie erläutern die Leistungen und Produkte im Versicherungsbereich. (K2)</li>
|
||||
<li>d2pv.ük4: Sie erläutern die Prozesse und Abläufe im privaten Versicherungsbereich. (K2)</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Handlungskompetenz e4: Betriebsbezogene Inhalte multimedial aufbereiten<br/>
|
||||
Arbeitssituation 1: Charakteristiken der Branche und Stärken des Betriebs einbringen<br/>
|
||||
<ul>
|
||||
<li>e4.pv.ük1: Sie erläutern die Dienstleistungen des Betriebs. (K2)</li>
|
||||
<li>e4.pv.ük2: Sie unterscheiden Mitbewerber in der privaten Versicherungsbranche anhand der relevanten Kriterien.(K2)</li>
|
||||
<li>e4.pv.ük4: Sie erläutern die Grundlagen der Produkte von Privatversicherungen. (K2)</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<h3>Ausgangslage</h3>
|
||||
<p>
|
||||
Stell dir vor, du hast die Autoprüfung abgeschlossen und nun kann es endlich losgehen mit deiner Mobilität.
|
||||
Welches wird dein erstes eigenes Auto sein? Dieses Auto möchtest du natürlich auch schützen und richtig
|
||||
versichern.
|
||||
</p>
|
||||
"""
|
||||
)
|
||||
),
|
||||
points=6,
|
||||
),
|
||||
EvaluationSubTaskBlockFactory(
|
||||
title="Die Ausgangslage ist grösstenteils vollständig beschrieben.",
|
||||
points=4,
|
||||
),
|
||||
EvaluationSubTaskBlockFactory(
|
||||
title="Die Ausgangslage ist unvollständig - nur 2 Punkte wurden beschrieben.",
|
||||
points=2,
|
||||
),
|
||||
EvaluationSubTaskBlockFactory(
|
||||
title="Die Ausgangslage des Auftrag ist unvollständig - es fehlen mehr als 2 Punkte in der Beschreibung.",
|
||||
points=0,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
assignment.evaluation_tasks.append(
|
||||
(
|
||||
"task",
|
||||
EvaluationTaskBlockFactory(
|
||||
title="Inhaltsanalyse und Struktur",
|
||||
max_points=6,
|
||||
description=RichText(
|
||||
"Sind die Deckungen der Police vollständig und nachvollziehbar dokumentiert?"
|
||||
),
|
||||
sub_tasks=ListValue(
|
||||
ListBlock(EvaluationSubTaskBlock()),
|
||||
values=[
|
||||
EvaluationSubTaskBlockFactory(
|
||||
title="Die Analyse beinhaltet alle in der Police vorhandenen Deckungen und ist logisch aufgebaut.",
|
||||
points=6,
|
||||
),
|
||||
EvaluationSubTaskBlockFactory(
|
||||
title="Die Analyse beinhaltet die meisten vorhandenen Deckungen in der Police und ist grösstenteils logisch aufgebaut.",
|
||||
points=4,
|
||||
),
|
||||
EvaluationSubTaskBlockFactory(
|
||||
title="Die Analyse ist unvollständig (es fehlen mehr als 3 Deckungen) und der rote Faden ist nicht erkennbar.",
|
||||
points=2,
|
||||
),
|
||||
EvaluationSubTaskBlockFactory(
|
||||
title="Die Analyse ist insgesamt nicht nachvollziehbar und es fehlen einige Deckungen.",
|
||||
points=0,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
assignment.evaluation_tasks.append(
|
||||
(
|
||||
"task",
|
||||
EvaluationTaskBlockFactory(
|
||||
title="Sinnvolle Empfehlungen",
|
||||
max_points=6,
|
||||
description=RichText(
|
||||
"Leitet die lernende Person sinnvolle und geeignete Empfehlungen ab?"
|
||||
),
|
||||
sub_tasks=ListValue(
|
||||
ListBlock(EvaluationSubTaskBlock()),
|
||||
values=[
|
||||
EvaluationSubTaskBlockFactory(
|
||||
title="Die Empfehlungen sind durchgängig sinnvoll und nachvollziehbar begründet.",
|
||||
points=6,
|
||||
),
|
||||
EvaluationSubTaskBlockFactory(
|
||||
title="Die Empfehlungen sind grösstenteils sinnvoll und nachvollziehbar begründet.",
|
||||
points=4,
|
||||
),
|
||||
EvaluationSubTaskBlockFactory(
|
||||
title="Die Empfehlungen sind wenig sinnvoll und unvollständig begründet.",
|
||||
points=2,
|
||||
),
|
||||
EvaluationSubTaskBlockFactory(
|
||||
title="Die Empfehlungen sind weder sinnvoll nch nachvollziehbar begründet.",
|
||||
points=0,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
assignment.evaluation_tasks.append(
|
||||
(
|
||||
"task",
|
||||
EvaluationTaskBlockFactory(
|
||||
title="Qualität der Reflexion",
|
||||
max_points=3,
|
||||
description=RichText(
|
||||
"Reflektiert die lernende Person die Durchführung der geleiteten Fallarbeit?"
|
||||
),
|
||||
sub_tasks=ListValue(
|
||||
ListBlock(EvaluationSubTaskBlock()),
|
||||
values=[
|
||||
EvaluationSubTaskBlockFactory(
|
||||
title="Die Reflexion bezieht sich auf die geleitete Fallarbeit und umfasst nachvollziehbare positive wie negative Aspekte.",
|
||||
points=3,
|
||||
),
|
||||
EvaluationSubTaskBlockFactory(
|
||||
title="Die Reflexion bezieht sich auf die geleitete Fallarbeit und umfasst grösstenteils nachvollziehbare positive wie negative Aspekte.",
|
||||
points=2,
|
||||
),
|
||||
EvaluationSubTaskBlockFactory(
|
||||
title="Die Reflexion ist unvollständig.",
|
||||
points=1,
|
||||
),
|
||||
EvaluationSubTaskBlockFactory(
|
||||
title="Die Reflexion bezieht sich nicht auf die geleitete Fallarbeit.",
|
||||
points=0,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
assignment.evaluation_tasks.append(
|
||||
(
|
||||
"task",
|
||||
EvaluationTaskBlockFactory(
|
||||
title="Eignung der Learnings",
|
||||
max_points=3,
|
||||
description=RichText(
|
||||
"Leitet die lernende Person geeignete Learnings aus der Reflexion ab?"
|
||||
),
|
||||
sub_tasks=ListValue(
|
||||
ListBlock(EvaluationSubTaskBlock()),
|
||||
values=[
|
||||
EvaluationSubTaskBlockFactory(
|
||||
title="Die Learnings beziehen sich auf die geleitete Fallarbeit und sind inhaltlich sinnvoll.",
|
||||
points=3,
|
||||
),
|
||||
EvaluationSubTaskBlockFactory(
|
||||
title="Die Learnings beziehen sich grösstenteils auf die geleitete Fallarbeit und sind inhaltlich sinnvoll.",
|
||||
points=2,
|
||||
),
|
||||
EvaluationSubTaskBlockFactory(
|
||||
title="Die Learnings beziehen sich teilweise auf die geleitete Fallarbeit und sind inhaltlich wenig sinnvoll.",
|
||||
points=1,
|
||||
),
|
||||
EvaluationSubTaskBlockFactory(
|
||||
title="Die Learnings beziehen sich nicht auf die geleitete Fallarbeit.",
|
||||
points=0,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
performance_objectives=[],
|
||||
)
|
||||
|
||||
assignment.tasks = []
|
||||
|
|
@ -680,7 +516,7 @@ def create_test_assignment(course_id=COURSE_TEST_ID):
|
|||
(
|
||||
"task",
|
||||
TaskBlockFactory(
|
||||
title="Teilaufgabe 1: Beispiel einer Versicherungspolice finden",
|
||||
title="Teilaufgabe 1: Verschaffe dir einen ersten Überblick zum Thema.",
|
||||
# it is hard to create a StreamValue programmatically, we have to
|
||||
# create a `StreamValue` manually. Ask Daniel and/or Ramon
|
||||
content=StreamValue(
|
||||
|
|
@ -690,7 +526,7 @@ def create_test_assignment(course_id=COURSE_TEST_ID):
|
|||
"explanation",
|
||||
ExplanationBlockFactory(
|
||||
text=RichText(
|
||||
"Bitte jemand aus deiner Familie oder deinem Freundeskreis darum, dir seine/ihre Motorfahrzeugversicherungspolice zur Verfügung zu stellen."
|
||||
'Schaue dazu das folgende Video: <a href="https://www.youtube.com/watch?v=GY2VRYyhwjM" target="_blank">Wie funktioniert eine Autoversicherung? – Einfach erklärt</a>'
|
||||
)
|
||||
),
|
||||
),
|
||||
|
|
@ -698,7 +534,7 @@ def create_test_assignment(course_id=COURSE_TEST_ID):
|
|||
"user_confirmation",
|
||||
ExplanationBlockFactory(
|
||||
text=RichText(
|
||||
"Ja, ich habe Motorfahrzeugversicherungspolice von jemandem aus meiner Familie oder meinem Freundeskreis erhalten."
|
||||
"Ja, ich habe das Video angeschaut und verstanden."
|
||||
)
|
||||
),
|
||||
),
|
||||
|
|
@ -712,7 +548,41 @@ def create_test_assignment(course_id=COURSE_TEST_ID):
|
|||
(
|
||||
"task",
|
||||
TaskBlockFactory(
|
||||
title="Teilaufgabe 2: Kundensituation und Ausgangslage",
|
||||
title="Teilaufgabe 2: Kapitel «Haftpflichtrecht und Motorfahrzeugversicherung» lesen",
|
||||
# it is hard to create a StreamValue programmatically, we have to
|
||||
# create a `StreamValue` manually. Ask Daniel and/or Ramon
|
||||
content=StreamValue(
|
||||
TaskContentStreamBlock(),
|
||||
stream_data=[
|
||||
(
|
||||
"explanation",
|
||||
ExplanationBlockFactory(
|
||||
text=RichText(
|
||||
"Lese und bearbeite im Buch «Haftpflichtrecht und Motorfahrzeugversicherung» die entsprechenden Kapitel"
|
||||
)
|
||||
),
|
||||
),
|
||||
(
|
||||
"user_confirmation",
|
||||
ExplanationBlockFactory(
|
||||
text=RichText(
|
||||
"Ja, ich habe das Kapitel gelesen und verstanden."
|
||||
)
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
assignment.tasks.append(
|
||||
(
|
||||
"task",
|
||||
TaskBlockFactory(
|
||||
title="Teilaufgabe 3: Offerte erstellen",
|
||||
# it is hard to create a StreamValue programmatically, we have to
|
||||
# create a `StreamValue` manually. Ask Daniel and/or Ramon
|
||||
content=StreamValue(
|
||||
TaskContentStreamBlock(),
|
||||
stream_data=[
|
||||
|
|
@ -722,17 +592,28 @@ def create_test_assignment(course_id=COURSE_TEST_ID):
|
|||
text=RichText(
|
||||
replace_whitespace(
|
||||
"""
|
||||
Erläutere die Kundensituation und die Ausgangslage.
|
||||
<ul>
|
||||
<li>Hast du alle Informationen, die du für den Policen-Check benötigst?</li>
|
||||
<li>Halte die wichtigsten Eckwerte des aktuellen Versicherungsverhältnisse in deiner Dokumentation fest (z.B wie lang wo versichert, Alter des Fahrzeugs, Kundenprofil, etc.</li>
|
||||
</ul>
|
||||
<p>
|
||||
Nun geht es los! Erstelle dir für dein erstes eigenes Auto eine entsprechende
|
||||
Offerte. Überlege dir, welche Deckungen du unbedingt abschliessen musst und
|
||||
welche Deckungen für dich zusätzlich wünschenswert sind. Nutze dazu das
|
||||
Offertentool deiner Unternehmung. Alternativ dazu kannst du auch irgendein
|
||||
Onlinetool nutzen.
|
||||
</p>
|
||||
<p>
|
||||
Möglicherweise musst du mit deinem Geburtsjahrgang etwas schummeln,
|
||||
damit du alt genug bist, um für dich eine Offerte zu machen.
|
||||
</p>
|
||||
"""
|
||||
)
|
||||
)
|
||||
),
|
||||
),
|
||||
("user_text_input", UserTextInputBlockFactory()),
|
||||
(
|
||||
"user_confirmation",
|
||||
ExplanationBlockFactory(
|
||||
text=RichText("Ja, ich habe eine Offerte erstellt.")
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
@ -743,8 +624,7 @@ def create_test_assignment(course_id=COURSE_TEST_ID):
|
|||
(
|
||||
"task",
|
||||
TaskBlockFactory(
|
||||
title="Teilaufgabe 3: Aktuelle Versicherung",
|
||||
# TODO: add document upload
|
||||
title="Teilaufgabe 4: Notizen und Fragestellungen",
|
||||
content=StreamValue(
|
||||
TaskContentStreamBlock(),
|
||||
stream_data=[
|
||||
|
|
@ -752,30 +632,7 @@ def create_test_assignment(course_id=COURSE_TEST_ID):
|
|||
"explanation",
|
||||
ExplanationBlockFactory(
|
||||
text=RichText(
|
||||
"Zeige nun detailliert auf, wie dein Kundenbeispiel momentan versichert ist."
|
||||
)
|
||||
),
|
||||
),
|
||||
("user_text_input", UserTextInputBlockFactory()),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
assignment.tasks.append(
|
||||
(
|
||||
"task",
|
||||
TaskBlockFactory(
|
||||
title="Teilaufgabe 4: Deine Empfehlungen",
|
||||
content=StreamValue(
|
||||
TaskContentStreamBlock(),
|
||||
stream_data=[
|
||||
(
|
||||
"explanation",
|
||||
ExplanationBlockFactory(
|
||||
text=RichText(
|
||||
"Erarbeite nun basierend auf deinen Erkenntnissen eine Empfehlung für die Person."
|
||||
"Mache dir im Verlauf des Prozesses Notizen zu den folgenden Fragestellungen:"
|
||||
)
|
||||
),
|
||||
),
|
||||
|
|
@ -783,7 +640,7 @@ def create_test_assignment(course_id=COURSE_TEST_ID):
|
|||
"user_text_input",
|
||||
UserTextInputBlockFactory(
|
||||
text=RichText(
|
||||
"Gibt es zusätzliche Deckungen, die du der Person empfehlen würdest? Begründe deine Empfehlung"
|
||||
"Wie bist du bei der Erstellung deiner Offerte vorgegangen?"
|
||||
)
|
||||
),
|
||||
),
|
||||
|
|
@ -791,7 +648,7 @@ def create_test_assignment(course_id=COURSE_TEST_ID):
|
|||
"user_text_input",
|
||||
UserTextInputBlockFactory(
|
||||
text=RichText(
|
||||
"Gibt es Deckungen, die du streichen würdest? Begründe deine Empfehlung."
|
||||
"Welches waren die Schwierigkeiten bei der Erstellung der Offerte? Wie hast du die Schwierigkeiten gelöst?"
|
||||
)
|
||||
),
|
||||
),
|
||||
|
|
@ -799,7 +656,23 @@ def create_test_assignment(course_id=COURSE_TEST_ID):
|
|||
"user_text_input",
|
||||
UserTextInputBlockFactory(
|
||||
text=RichText(
|
||||
"Wenn die Person gemäss deiner Einschätzung genau richtig versichert ist, argumentiere, warum dies der Fall ist."
|
||||
"Welche Angaben sind zwingend notwendig, um eine saubere Motorfahrzeugofferte erstellen zu können?"
|
||||
)
|
||||
),
|
||||
),
|
||||
(
|
||||
"user_text_input",
|
||||
UserTextInputBlockFactory(
|
||||
text=RichText(
|
||||
"Welche zusätzlichen Deckungen hast du gewählt? Was waren die Überlegungen dazu?"
|
||||
)
|
||||
),
|
||||
),
|
||||
(
|
||||
"user_text_input",
|
||||
UserTextInputBlockFactory(
|
||||
text=RichText(
|
||||
"Welche Faktoren/Elemente bestimmen hauptsächlich die Höhe der Prämie?"
|
||||
)
|
||||
),
|
||||
),
|
||||
|
|
@ -813,7 +686,7 @@ def create_test_assignment(course_id=COURSE_TEST_ID):
|
|||
(
|
||||
"task",
|
||||
TaskBlockFactory(
|
||||
title="Teilaufgabe 5: Reflexion",
|
||||
title="Teilaufgabe 5: Präzenz-Training",
|
||||
content=StreamValue(
|
||||
TaskContentStreamBlock(),
|
||||
stream_data=[
|
||||
|
|
@ -821,31 +694,8 @@ def create_test_assignment(course_id=COURSE_TEST_ID):
|
|||
"explanation",
|
||||
ExplanationBlockFactory(
|
||||
text=RichText(
|
||||
"Reflektiere dein Handeln und halte deine Erkenntnisse fest. Frage dich dabei:"
|
||||
)
|
||||
),
|
||||
),
|
||||
(
|
||||
"user_text_input",
|
||||
UserTextInputBlockFactory(
|
||||
text=RichText(
|
||||
"War die Bearbeitung dieser geleiteten Fallarbeit erfolgreich? Begründe deine Einschätzung."
|
||||
)
|
||||
),
|
||||
),
|
||||
(
|
||||
"user_text_input",
|
||||
UserTextInputBlockFactory(
|
||||
text=RichText(
|
||||
"Was ist dir bei der Bearbeitung des Auftrags gut gelungen?"
|
||||
)
|
||||
),
|
||||
),
|
||||
(
|
||||
"user_text_input",
|
||||
UserTextInputBlockFactory(
|
||||
text=RichText(
|
||||
"Was ist dir bei der Bearbeitung des Auftrags weniger gut gelungen?"
|
||||
"<p>Bringe die Offerte und diese Notizen mit ins Präsenz-Training.</p>"
|
||||
"<p>Vergiss die dazugehörenden AVB nicht. Es ist auch okay, wenn du die Unterlagen nur elektronisch dabei hast.</p>"
|
||||
)
|
||||
),
|
||||
),
|
||||
|
|
@ -859,7 +709,7 @@ def create_test_assignment(course_id=COURSE_TEST_ID):
|
|||
(
|
||||
"task",
|
||||
TaskBlockFactory(
|
||||
title="Teilaufgabe 6: Learnings",
|
||||
title="Aufgaben zum Vorbereitungsauftrag",
|
||||
content=StreamValue(
|
||||
TaskContentStreamBlock(),
|
||||
stream_data=[
|
||||
|
|
@ -867,7 +717,7 @@ def create_test_assignment(course_id=COURSE_TEST_ID):
|
|||
"explanation",
|
||||
ExplanationBlockFactory(
|
||||
text=RichText(
|
||||
"Leite aus der Teilaufgabe 5 deine persönlichen Learnings ab."
|
||||
"Schnappt euch euren Vorbereitungsauftrag und setzt euch zu dritt zusammen. Diskutiert miteinander die folgenden Fragen."
|
||||
)
|
||||
),
|
||||
),
|
||||
|
|
@ -875,7 +725,7 @@ def create_test_assignment(course_id=COURSE_TEST_ID):
|
|||
"user_text_input",
|
||||
UserTextInputBlockFactory(
|
||||
text=RichText(
|
||||
"Was würdest du beim nächsten Mal anders machen?"
|
||||
"Wie seid ihr bei der Erstellung der Offerte vorgegangen?"
|
||||
)
|
||||
),
|
||||
),
|
||||
|
|
@ -883,7 +733,195 @@ def create_test_assignment(course_id=COURSE_TEST_ID):
|
|||
"user_text_input",
|
||||
UserTextInputBlockFactory(
|
||||
text=RichText(
|
||||
"Was hast du beim Bearbeiten des Auftrags Neues gelernt?"
|
||||
"Welches waren die Schwierigkeiten bei der Erstellung der Offerte? Wie hast du die Schwierigkeiten gelöst?"
|
||||
)
|
||||
),
|
||||
),
|
||||
(
|
||||
"user_text_input",
|
||||
UserTextInputBlockFactory(
|
||||
text=RichText(
|
||||
"Welche Angaben sind zwingend notwendig, um eine saubere Motorfahrzeugofferte erstellen zu können?"
|
||||
)
|
||||
),
|
||||
),
|
||||
(
|
||||
"user_text_input",
|
||||
UserTextInputBlockFactory(
|
||||
text=RichText(
|
||||
"Welche zusätzlichen Deckungen hast du gewählt? Was waren die Überlegungen dazu?"
|
||||
)
|
||||
),
|
||||
),
|
||||
(
|
||||
"user_text_input",
|
||||
UserTextInputBlockFactory(
|
||||
text=RichText(
|
||||
"Welche Faktoren/Elemente bestimmen hauptsächlich die Höhe der Prämie?"
|
||||
)
|
||||
),
|
||||
),
|
||||
(
|
||||
"user_text_input",
|
||||
UserTextInputBlockFactory(
|
||||
text=RichText(
|
||||
"Wenn ihr mit der Diskussion und dem Vergleich fertig seid, schreibt doch die Prämie eurer eigenen Offerte jeweils auf den Flipchart/Whiteboard/Wandtafel."
|
||||
)
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
assignment.save()
|
||||
|
||||
return assignment
|
||||
|
||||
|
||||
def create_uk_reflection(course_id=COURSE_UK, circle_title="Fahrzeug"):
|
||||
assignment_list_page = (
|
||||
CoursePage.objects.get(course_id=course_id)
|
||||
.get_children()
|
||||
.exact_type(AssignmentListPage)
|
||||
.first()
|
||||
)
|
||||
|
||||
assignment = AssignmentFactory(
|
||||
parent=assignment_list_page,
|
||||
assignment_type=AssignmentType.REFLECTION.name,
|
||||
title=f"{circle_title} - Reflexionsfragen",
|
||||
effort_required="ca. 1 Stunde",
|
||||
intro_text=replace_whitespace(
|
||||
"""
|
||||
<p>
|
||||
Du hast in diesem Circle viele neue Inhalte und Inputs erhalten.
|
||||
Nun ist es Zeit, nochmals auf dein Kompetenzprofil zu schauen.
|
||||
Das Beantworten von Reflexionsfragen hilft dir den eigenen Lern- und Denkprozess sichtbar und begreifbar zu machen.
|
||||
Es deckt deine persönlichen Stärken und Schwächen während der Erarbeitung auf und hilft dir, dich laufend zu verbessern.
|
||||
</p>
|
||||
"""
|
||||
),
|
||||
performance_objectives=[],
|
||||
)
|
||||
|
||||
assignment.tasks = []
|
||||
assignment.tasks.append(
|
||||
(
|
||||
"task",
|
||||
TaskBlockFactory(
|
||||
title="Frage 1: Was gelingt mir bereits gut?",
|
||||
content=StreamValue(
|
||||
TaskContentStreamBlock(),
|
||||
stream_data=[
|
||||
(
|
||||
"user_text_input",
|
||||
UserTextInputBlockFactory(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
assignment.tasks.append(
|
||||
(
|
||||
"task",
|
||||
TaskBlockFactory(
|
||||
title="Frage 2: Vertiefung",
|
||||
content=StreamValue(
|
||||
TaskContentStreamBlock(),
|
||||
stream_data=[
|
||||
(
|
||||
"user_text_input",
|
||||
UserTextInputBlockFactory(
|
||||
text=RichText(
|
||||
"Wo muss ich mich noch vertiefen oder nochmals repetieren? "
|
||||
)
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
assignment.tasks.append(
|
||||
(
|
||||
"task",
|
||||
TaskBlockFactory(
|
||||
title="Frage 3: Was nehme ich mit?",
|
||||
content=StreamValue(
|
||||
TaskContentStreamBlock(),
|
||||
stream_data=[
|
||||
(
|
||||
"user_text_input",
|
||||
UserTextInputBlockFactory(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
assignment.tasks.append(
|
||||
(
|
||||
"task",
|
||||
TaskBlockFactory(
|
||||
title="Frage 4: Vorbereitung",
|
||||
content=StreamValue(
|
||||
TaskContentStreamBlock(),
|
||||
stream_data=[
|
||||
(
|
||||
"user_text_input",
|
||||
UserTextInputBlockFactory(
|
||||
text=RichText(
|
||||
"Wie habe ich mich auf den Circle vorbereitet (z. B. Lernzeit eingeplant)?"
|
||||
)
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
assignment.tasks.append(
|
||||
(
|
||||
"task",
|
||||
TaskBlockFactory(
|
||||
title="Frage 5: Präsenzunterricht",
|
||||
content=StreamValue(
|
||||
TaskContentStreamBlock(),
|
||||
stream_data=[
|
||||
(
|
||||
"user_text_input",
|
||||
UserTextInputBlockFactory(
|
||||
text=RichText(
|
||||
"Wie engagiert war ich im Präsenzunterricht?"
|
||||
)
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
assignment.tasks.append(
|
||||
(
|
||||
"task",
|
||||
TaskBlockFactory(
|
||||
title="Frage 6: Verbesserung",
|
||||
content=StreamValue(
|
||||
TaskContentStreamBlock(),
|
||||
stream_data=[
|
||||
(
|
||||
"user_text_input",
|
||||
UserTextInputBlockFactory(
|
||||
text=RichText(
|
||||
"Was will ich für den nächsten Circle im Lernprozess ändern/verbessern?"
|
||||
)
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ class AssignmentType(DjangoObjectType):
|
|||
model = Assignment
|
||||
interfaces = (CoursePageInterface,)
|
||||
fields = (
|
||||
"starting_position",
|
||||
"assignment_type",
|
||||
"intro_text",
|
||||
"effort_required",
|
||||
"evaluation_description",
|
||||
"evaluation_document_url",
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
|
|
@ -30,7 +29,7 @@ class Migration(migrations.Migration):
|
|||
),
|
||||
),
|
||||
(
|
||||
"starting_position",
|
||||
"intro_text",
|
||||
wagtail.fields.RichTextField(
|
||||
help_text="Erläuterung der Ausgangslage"
|
||||
),
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
# Generated by Django 3.2.13 on 2023-05-19 13:43
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("assignment", "0003_initial"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="assignment",
|
||||
name="assignment_type",
|
||||
field=models.CharField(
|
||||
choices=[
|
||||
("CASEWORK", "CASEWORK"),
|
||||
("PREP_ASSIGNMENT", "PREP_ASSIGNMENT"),
|
||||
("REFLECTION", "REFLECTION"),
|
||||
],
|
||||
default="CASEWORK",
|
||||
max_length=50,
|
||||
),
|
||||
),
|
||||
]
|
||||
|
|
@ -8,7 +8,10 @@ from wagtail.admin.panels import FieldPanel
|
|||
from wagtail.fields import RichTextField, StreamField
|
||||
from wagtail.models import Page
|
||||
|
||||
from vbv_lernwelt.core.constants import DEFAULT_RICH_TEXT_FEATURES
|
||||
from vbv_lernwelt.core.constants import (
|
||||
DEFAULT_RICH_TEXT_FEATURES,
|
||||
DEFAULT_RICH_TEXT_FEATURES_WITH_HEADER,
|
||||
)
|
||||
from vbv_lernwelt.core.model_utils import find_available_slug
|
||||
from vbv_lernwelt.core.models import User
|
||||
from vbv_lernwelt.course.models import CourseBasePage
|
||||
|
|
@ -104,9 +107,19 @@ class EvaluationTaskBlock(blocks.StructBlock):
|
|||
label = "Beurteilungskriterium"
|
||||
|
||||
|
||||
AssignmentType = Enum(
|
||||
"AssignmentType",
|
||||
[
|
||||
"CASEWORK", # Geleitete Fallarbeit
|
||||
"PREP_ASSIGNMENT", # Vorbereitungsauftrag
|
||||
"REFLECTION", # Reflexion
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
class Assignment(CourseBasePage):
|
||||
serialize_field_names = [
|
||||
"starting_position",
|
||||
"intro_text",
|
||||
"effort_required",
|
||||
"performance_objectives",
|
||||
"evaluation_description",
|
||||
|
|
@ -115,8 +128,15 @@ class Assignment(CourseBasePage):
|
|||
"evaluation_tasks",
|
||||
]
|
||||
|
||||
starting_position = RichTextField(
|
||||
help_text="Erläuterung der Ausgangslage", features=DEFAULT_RICH_TEXT_FEATURES
|
||||
assignment_type = models.CharField(
|
||||
max_length=50,
|
||||
choices=[(tag.name, tag.name) for tag in AssignmentType],
|
||||
default=AssignmentType.CASEWORK.name,
|
||||
)
|
||||
|
||||
intro_text = RichTextField(
|
||||
help_text="Erläuterung der Ausgangslage",
|
||||
features=DEFAULT_RICH_TEXT_FEATURES_WITH_HEADER,
|
||||
)
|
||||
effort_required = models.CharField(
|
||||
max_length=100, help_text="Zeitaufwand als Text", blank=True
|
||||
|
|
@ -161,7 +181,8 @@ class Assignment(CourseBasePage):
|
|||
)
|
||||
|
||||
content_panels = Page.content_panels + [
|
||||
FieldPanel("starting_position"),
|
||||
FieldPanel("assignment_type"),
|
||||
FieldPanel("intro_text"),
|
||||
FieldPanel("effort_required"),
|
||||
FieldPanel("performance_objectives"),
|
||||
FieldPanel("tasks"),
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ class PerformanceObjectiveBlockFactory(wagtail_factories.StructBlockFactory):
|
|||
|
||||
class AssignmentFactory(wagtail_factories.PageFactory):
|
||||
title = "Auftrag"
|
||||
starting_position = replace_whitespace(
|
||||
intro_text = replace_whitespace(
|
||||
"""
|
||||
Jemand aus deiner Familie oder aus deinem Freundeskreis möchte sein
|
||||
Versicherungspolice überprüfen lassen. Diese Person kommt nun mit ihrer Police auf dich zu
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import json
|
|||
from django.utils import timezone
|
||||
from rest_framework.test import APITestCase
|
||||
|
||||
from vbv_lernwelt.assignment.creators.create_assignments import create_uk_casework
|
||||
from vbv_lernwelt.assignment.models import (
|
||||
Assignment,
|
||||
AssignmentCompletion,
|
||||
AssignmentCompletionAuditLog,
|
||||
)
|
||||
|
|
@ -20,8 +20,7 @@ class AssignmentApiTestCase(APITestCase):
|
|||
def setUp(self) -> None:
|
||||
create_default_users()
|
||||
create_test_course(include_vv=False)
|
||||
|
||||
self.assignment = Assignment.objects.first()
|
||||
self.assignment = create_uk_casework(course_id=COURSE_TEST_ID)
|
||||
self.assignment_subtasks = self.assignment.filter_user_subtasks()
|
||||
|
||||
self.cs = CourseSession.objects.create(
|
||||
|
|
|
|||
|
|
@ -4,30 +4,32 @@ from django.test import TestCase
|
|||
from django.utils import timezone
|
||||
from rest_framework import serializers
|
||||
|
||||
from vbv_lernwelt.assignment.creators.create_assignments import create_test_assignment
|
||||
from vbv_lernwelt.assignment.models import (
|
||||
Assignment,
|
||||
AssignmentCompletion,
|
||||
AssignmentCompletionAuditLog,
|
||||
)
|
||||
from vbv_lernwelt.assignment.services import update_assignment_completion
|
||||
from vbv_lernwelt.core.create_default_users import create_default_users
|
||||
from vbv_lernwelt.core.models import User
|
||||
from vbv_lernwelt.core.tests.helpers import create_locales_for_wagtail
|
||||
from vbv_lernwelt.core.utils import find_first
|
||||
from vbv_lernwelt.course.consts import COURSE_TEST_ID
|
||||
from vbv_lernwelt.course.factories import CourseFactory, CoursePageFactory
|
||||
from vbv_lernwelt.course.creators.test_course import create_test_course
|
||||
from vbv_lernwelt.course.models import CourseSession
|
||||
from vbv_lernwelt.learnpath.models import LearningContentAssignment
|
||||
|
||||
|
||||
class UpdateAssignmentCompletionTestCase(TestCase):
|
||||
def setUp(self):
|
||||
create_default_users()
|
||||
create_locales_for_wagtail()
|
||||
course = CourseFactory(
|
||||
id=COURSE_TEST_ID,
|
||||
self.course = create_test_course(include_vv=False)
|
||||
self.assignment = (
|
||||
self.course.coursepage.get_descendants()
|
||||
.exact_type(Assignment)
|
||||
.filter(assignment__assignment_type="CASEWORK")
|
||||
.first()
|
||||
.specific
|
||||
)
|
||||
course_page = CoursePageFactory(course=course)
|
||||
self.assignment = create_test_assignment()
|
||||
self.course_session = CourseSession.objects.create(
|
||||
course_id=COURSE_TEST_ID,
|
||||
title="Bern 2022 a",
|
||||
|
|
@ -182,19 +184,22 @@ class UpdateAssignmentCompletionTestCase(TestCase):
|
|||
self.assertEqual(acl.assignment_user_email, "student")
|
||||
self.assertEqual(
|
||||
acl.assignment_slug,
|
||||
"versicherungsvermittler-in-assignment-überprüfen-einer-motorfahrzeugs-versicherungspolice",
|
||||
"test-lehrgang-assignment-überprüfen-einer-motorfahrzeugs-versicherungspolice",
|
||||
)
|
||||
|
||||
# AssignmentCompletionAuditLog entry will remain event after deletion of foreign keys
|
||||
ac.delete()
|
||||
self.user.delete()
|
||||
self.course.coursepage.get_descendants().exact_type(
|
||||
LearningContentAssignment
|
||||
).delete()
|
||||
self.assignment.delete()
|
||||
acl = AssignmentCompletionAuditLog.objects.get(id=acl.id)
|
||||
self.assertEqual(acl.created_at.date(), date.today())
|
||||
self.assertEqual(acl.assignment_user_email, "student")
|
||||
self.assertEqual(
|
||||
acl.assignment_slug,
|
||||
"versicherungsvermittler-in-assignment-überprüfen-einer-motorfahrzeugs-versicherungspolice",
|
||||
"test-lehrgang-assignment-überprüfen-einer-motorfahrzeugs-versicherungspolice",
|
||||
)
|
||||
self.assertIsNone(acl.assignment_user)
|
||||
self.assertIsNone(acl.assignment)
|
||||
|
|
@ -516,7 +521,7 @@ class UpdateAssignmentCompletionTestCase(TestCase):
|
|||
self.assertEqual(acl.assignment_user_email, "student")
|
||||
self.assertEqual(
|
||||
acl.assignment_slug,
|
||||
"versicherungsvermittler-in-assignment-überprüfen-einer-motorfahrzeugs-versicherungspolice",
|
||||
"test-lehrgang-assignment-überprüfen-einer-motorfahrzeugs-versicherungspolice",
|
||||
)
|
||||
trainer_input = acl.completion_data[evaluation_task["id"]]
|
||||
self.assertDictEqual(
|
||||
|
|
@ -530,13 +535,16 @@ class UpdateAssignmentCompletionTestCase(TestCase):
|
|||
# AssignmentCompletionAuditLog entry will remain event after deletion of foreign keys
|
||||
ac.delete()
|
||||
self.user.delete()
|
||||
self.course.coursepage.get_descendants().exact_type(
|
||||
LearningContentAssignment
|
||||
).delete()
|
||||
self.assignment.delete()
|
||||
acl = AssignmentCompletionAuditLog.objects.get(id=acl.id)
|
||||
self.assertEqual(acl.created_at.date(), date.today())
|
||||
self.assertEqual(acl.assignment_user_email, "student")
|
||||
self.assertEqual(
|
||||
acl.assignment_slug,
|
||||
"versicherungsvermittler-in-assignment-überprüfen-einer-motorfahrzeugs-versicherungspolice",
|
||||
"test-lehrgang-assignment-überprüfen-einer-motorfahrzeugs-versicherungspolice",
|
||||
)
|
||||
self.assertIsNone(acl.assignment_user)
|
||||
self.assertIsNone(acl.assignment)
|
||||
|
|
|
|||
|
|
@ -6,9 +6,13 @@ from slugify import slugify
|
|||
from wagtail.models import Site
|
||||
from wagtail.rich_text import RichText
|
||||
|
||||
from vbv_lernwelt.assignment.creators.create_assignments import create_test_assignment
|
||||
from vbv_lernwelt.assignment.creators.create_assignments import (
|
||||
create_uk_casework,
|
||||
create_uk_prep_assignment,
|
||||
)
|
||||
from vbv_lernwelt.assignment.models import Assignment
|
||||
from vbv_lernwelt.assignment.services import update_assignment_completion
|
||||
from vbv_lernwelt.assignment.tests.assignment_factories import AssignmentListPageFactory
|
||||
from vbv_lernwelt.competence.factories import (
|
||||
CompetencePageFactory,
|
||||
CompetenceProfilePageFactory,
|
||||
|
|
@ -63,7 +67,13 @@ def create_test_course(include_uk=True, include_vv=True, with_sessions=False):
|
|||
|
||||
create_test_competence_profile()
|
||||
if include_uk:
|
||||
create_test_assignment()
|
||||
# assignments create assignments parent page
|
||||
course_page = CoursePage.objects.get(course_id=COURSE_TEST_ID)
|
||||
_assignment_list_page = AssignmentListPageFactory(
|
||||
parent=course_page,
|
||||
)
|
||||
create_uk_casework(course_id=COURSE_TEST_ID)
|
||||
create_uk_prep_assignment(course_id=COURSE_TEST_ID)
|
||||
|
||||
create_test_learning_path(include_uk=include_uk, include_vv=include_vv)
|
||||
create_test_media_library()
|
||||
|
|
@ -225,10 +235,14 @@ damit du erfolgreich mit deinem Lernpfad (durch-)starten kannst.
|
|||
),
|
||||
content_url=f"/course/{lp.get_course().slug}/media/category/{slugify(title)}",
|
||||
)
|
||||
LearningContentPlaceholderFactory(
|
||||
title="Vorbereitungsauftrag",
|
||||
LearningContentAssignmentFactory(
|
||||
title="Fahrzeug - Mein erstes Auto",
|
||||
assignment_type="PREP_ASSIGNMENT",
|
||||
parent=circle,
|
||||
)
|
||||
content_assignment=Assignment.objects.get(
|
||||
slug__startswith="test-lehrgang-assignment-fahrzeug-mein-erstes-auto"
|
||||
),
|
||||
),
|
||||
|
||||
PerformanceCriteriaFactory(
|
||||
parent=CompetencePage.objects.get(competence_id="X1"),
|
||||
|
|
|
|||
|
|
@ -59,3 +59,5 @@ def create_versicherungsvermittlerin_with_categories(
|
|||
)
|
||||
course.slug = course_page.slug
|
||||
course.save()
|
||||
|
||||
return course
|
||||
|
|
|
|||
|
|
@ -2,9 +2,14 @@ import random
|
|||
|
||||
import djclick as click
|
||||
|
||||
from vbv_lernwelt.assignment.creators.create_assignments import create_uk_assignments
|
||||
from vbv_lernwelt.assignment.creators.create_assignments import (
|
||||
create_uk_casework,
|
||||
create_uk_prep_assignment,
|
||||
create_uk_reflection,
|
||||
)
|
||||
from vbv_lernwelt.assignment.models import Assignment
|
||||
from vbv_lernwelt.assignment.services import update_assignment_completion
|
||||
from vbv_lernwelt.assignment.tests.assignment_factories import AssignmentListPageFactory
|
||||
from vbv_lernwelt.competence.create_uk_competence_profile import (
|
||||
create_uk_competence_profile,
|
||||
create_uk_fr_competence_profile,
|
||||
|
|
@ -145,10 +150,19 @@ def create_versicherungsvermittlerin_course():
|
|||
|
||||
def create_course_uk_de():
|
||||
# Überbetriebliche Kurse DE
|
||||
create_versicherungsvermittlerin_with_categories(
|
||||
course = create_versicherungsvermittlerin_with_categories(
|
||||
course_id=COURSE_UK, title="Überbetriebliche Kurse"
|
||||
)
|
||||
create_uk_assignments(course_id=COURSE_UK)
|
||||
|
||||
# assignments create assignments parent page
|
||||
_assignment_list_page = AssignmentListPageFactory(
|
||||
parent=course.coursepage,
|
||||
)
|
||||
create_uk_casework(course_id=COURSE_UK)
|
||||
create_uk_prep_assignment(course_id=COURSE_UK)
|
||||
create_uk_reflection(course_id=COURSE_UK)
|
||||
|
||||
# learning path
|
||||
create_uk_learning_path(course_id=COURSE_UK)
|
||||
create_uk_competence_profile(course_id=COURSE_UK)
|
||||
create_default_media_library(course_id=COURSE_UK)
|
||||
|
|
@ -174,7 +188,14 @@ def create_course_uk_de():
|
|||
).id,
|
||||
"submissionDeadlineDateTimeUtc": "2023-06-13T19:00:00Z",
|
||||
"evaluationDeadlineDateTimeUtc": "2023-06-27T19:00:00Z",
|
||||
}
|
||||
},
|
||||
{
|
||||
"learningContentId": LearningContentAssignment.objects.get(
|
||||
slug="überbetriebliche-kurse-lp-circle-fahrzeug-lc-fahrzeug-mein-erstes-auto"
|
||||
).id,
|
||||
"submissionDeadlineDateTimeUtc": "2023-06-13T19:00:00Z",
|
||||
"evaluationDeadlineDateTimeUtc": "2023-06-27T19:00:00Z",
|
||||
},
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ from vbv_lernwelt.learnpath.tests.learning_path_factories import (
|
|||
LearningContentFeedbackFactory,
|
||||
LearningContentMediaLibraryFactory,
|
||||
LearningContentPlaceholderFactory,
|
||||
LearningContentRichTextFactory,
|
||||
LearningPathFactory,
|
||||
LearningSequenceFactory,
|
||||
LearningUnitFactory,
|
||||
|
|
@ -230,9 +231,21 @@ damit du erfolgreich mit deinem Lernpfad (durch-)starten kannst.
|
|||
title="Vorbereitung", parent=circle, icon="it-icon-ls-start"
|
||||
)
|
||||
LearningUnitFactory(title="Vorbereitung", parent=circle)
|
||||
LearningContentPlaceholderFactory(
|
||||
LearningContentRichTextFactory(
|
||||
title="Verschaffe dir einen Überblick",
|
||||
parent=circle,
|
||||
text=RichText(
|
||||
"""
|
||||
<h3>Arbeitsblätter «Vorbereitungsauftrag»</h3>
|
||||
<p>Handlungskompetenz d2: Informations-und Beratungsgespräch mit Kunden oder Lieferanten führen</p>
|
||||
<p>Arbeitssituation 4: Kunden beraten und dazugehörige Prozesse abwickeln</p>
|
||||
<p>Die Kaufleute führen Bedarfserhebungen für Kunden durch und schlagen ihnen angemessene Versicherungslösungen vor. Sie führen Beratungs-und Verkaufsgespräche und erteilen Auskünfte. Sieführen Kundenaufträge aus und behandeln Beschwerden. Sie formulieren Aufträge an relevante Anspruchsgruppen und unterstützen den Aussendient in verkaufsrelevanten Belangen.</p>
|
||||
<ul>
|
||||
<li>d2.pv.ük3: Sie erläutern die Leistungen und Produkte im Versicherungsbereich. (K2)</li>
|
||||
<li>d2pv.ük4: Sie erläutern die Prozesse und Abläufe im privaten Versicherungsbereich. (K2)</li>
|
||||
</ul>
|
||||
"""
|
||||
),
|
||||
)
|
||||
LearningContentMediaLibraryFactory(
|
||||
title=f"Handlungsfeld «{title}»",
|
||||
|
|
@ -243,10 +256,14 @@ damit du erfolgreich mit deinem Lernpfad (durch-)starten kannst.
|
|||
),
|
||||
content_url=f"/course/überbetriebliche-kurse/media/category/{slugify(title)}",
|
||||
)
|
||||
LearningContentPlaceholderFactory(
|
||||
title="Vorbereitungsauftrag",
|
||||
LearningContentAssignmentFactory(
|
||||
title="Fahrzeug - Mein erstes Auto",
|
||||
assignment_type="PREP_ASSIGNMENT",
|
||||
parent=circle,
|
||||
)
|
||||
content_assignment=Assignment.objects.get(
|
||||
slug__startswith="überbetriebliche-kurse-assignment-fahrzeug-mein-erstes-auto"
|
||||
),
|
||||
),
|
||||
LearningSequenceFactory(title="Training", parent=circle)
|
||||
LearningUnitFactory(title="Unterlagen", parent=circle)
|
||||
LearningContentPlaceholderFactory(
|
||||
|
|
@ -265,10 +282,14 @@ damit du erfolgreich mit deinem Lernpfad (durch-)starten kannst.
|
|||
)
|
||||
LearningSequenceFactory(title="Transfer", parent=circle, icon="it-icon-ls-end")
|
||||
LearningUnitFactory(title="Transfer", parent=circle)
|
||||
LearningContentPlaceholderFactory(
|
||||
title="Reflexion",
|
||||
LearningContentAssignmentFactory(
|
||||
title="Reflexionsfragen Fahrzeug",
|
||||
assignment_type="REFLECTION",
|
||||
parent=circle,
|
||||
)
|
||||
content_assignment=Assignment.objects.get(
|
||||
slug__startswith="überbetriebliche-kurse-assignment-fahrzeug-reflexionsfragen"
|
||||
),
|
||||
),
|
||||
LearningContentAssignmentFactory(
|
||||
title="Überprüfen einer Motorfahrzeug-Versicherungspolice",
|
||||
parent=circle,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
# Generated by Django 3.2.13 on 2023-05-19 15:21
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
(
|
||||
"learnpath",
|
||||
"0003_rename_learningcontentattendanceday_learningcontentattendancecourse",
|
||||
),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="learningcontentassignment",
|
||||
name="assignment_type",
|
||||
field=models.CharField(
|
||||
choices=[
|
||||
("CASEWORK", "CASEWORK"),
|
||||
("PREP_ASSIGNMENT", "PREP_ASSIGNMENT"),
|
||||
("REFLECTION", "REFLECTION"),
|
||||
],
|
||||
default="CASEWORK",
|
||||
max_length=50,
|
||||
),
|
||||
),
|
||||
]
|
||||
|
|
@ -6,6 +6,7 @@ from wagtail.admin.panels import FieldPanel, PageChooserPanel
|
|||
from wagtail.fields import RichTextField
|
||||
from wagtail.models import Page
|
||||
|
||||
from vbv_lernwelt.assignment.models import AssignmentType
|
||||
from vbv_lernwelt.core.constants import DEFAULT_RICH_TEXT_FEATURES_WITH_HEADER
|
||||
from vbv_lernwelt.core.model_utils import find_available_slug
|
||||
from vbv_lernwelt.course.models import CourseBasePage, CoursePage
|
||||
|
|
@ -322,6 +323,7 @@ class LearningContentRichText(LearningContent):
|
|||
class LearningContentAssignment(LearningContent):
|
||||
serialize_field_names = LearningContent.serialize_field_names + [
|
||||
"content_assignment_id",
|
||||
"assignment_type",
|
||||
]
|
||||
parent_page_types = ["learnpath.Circle"]
|
||||
subpage_types = []
|
||||
|
|
@ -332,6 +334,12 @@ class LearningContentAssignment(LearningContent):
|
|||
related_name="+",
|
||||
)
|
||||
|
||||
assignment_type = models.CharField(
|
||||
max_length=50,
|
||||
choices=[(tag.name, tag.name) for tag in AssignmentType],
|
||||
default=AssignmentType.CASEWORK.name,
|
||||
)
|
||||
|
||||
content_panels = [
|
||||
FieldPanel("title", classname="full title"),
|
||||
FieldPanel("minutes"),
|
||||
|
|
|
|||
Loading…
Reference in New Issue