chore: remove feedback_user
removed in favor of just using the course-level configuration.
This commit is contained in:
parent
70ebe97671
commit
e3f8e4556f
|
|
@ -37,7 +37,7 @@ const questionIndex = useRouteQuery("step", "0", { transform: Number, mode: "pus
|
|||
const previousRoute = getPreviousRoute();
|
||||
|
||||
const learningUnitHasFeedbackPage = computed(
|
||||
() => props.learningUnit?.feedback_user !== "NO_FEEDBACK"
|
||||
() => courseSession.value.course.configuration.enable_learning_mentor
|
||||
);
|
||||
|
||||
const currentQuestion = computed(() => questions.value[questionIndex.value]);
|
||||
|
|
@ -163,7 +163,7 @@ onUnmounted(() => {
|
|||
</div>
|
||||
</div>
|
||||
<SelfEvaluationRequestFeedbackPage
|
||||
v-else-if="isLastStep && learningUnit.feedback_user == 'MENTOR_FEEDBACK'"
|
||||
v-else-if="isLastStep && learningUnitHasFeedbackPage"
|
||||
:learning-unit="props.learningUnit"
|
||||
:criteria="questions"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ const documents = {
|
|||
"\n query attendanceCheckQuery($courseSessionId: ID!) {\n course_session_attendance_course(id: $courseSessionId) {\n id\n attendance_user_list {\n user_id\n status\n }\n }\n }\n": types.AttendanceCheckQueryDocument,
|
||||
"\n query assignmentCompletionQuery(\n $assignmentId: ID!\n $courseSessionId: ID!\n $learningContentId: ID\n $assignmentUserId: UUID\n ) {\n assignment(id: $assignmentId) {\n assignment_type\n needs_expert_evaluation\n max_points\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 solution_sample {\n id\n url\n }\n competence_certificate {\n ...CoursePageFields\n }\n }\n assignment_completion(\n assignment_id: $assignmentId\n course_session_id: $courseSessionId\n assignment_user_id: $assignmentUserId\n learning_content_page_id: $learningContentId\n ) {\n id\n completion_status\n submitted_at\n evaluation_submitted_at\n evaluation_user {\n id\n first_name\n last_name\n }\n assignment_user {\n avatar_url\n first_name\n last_name\n id\n }\n evaluation_points\n evaluation_max_points\n evaluation_passed\n edoniq_extended_time_flag\n completion_data\n task_completion_data\n }\n }\n": types.AssignmentCompletionQueryDocument,
|
||||
"\n query competenceCertificateQuery($courseSlug: String!, $courseSessionId: ID!) {\n competence_certificate_list(course_slug: $courseSlug) {\n ...CoursePageFields\n competence_certificates {\n ...CoursePageFields\n assignments {\n ...CoursePageFields\n assignment_type\n max_points\n completion(course_session_id: $courseSessionId) {\n id\n completion_status\n submitted_at\n evaluation_points\n evaluation_max_points\n evaluation_passed\n }\n learning_content {\n ...CoursePageFields\n circle {\n id\n title\n slug\n }\n }\n }\n }\n }\n }\n": types.CompetenceCertificateQueryDocument,
|
||||
"\n query courseSessionDetail($courseSessionId: ID!) {\n course_session(id: $courseSessionId) {\n id\n title\n course {\n id\n title\n slug\n configuration {\n enable_circle_documents\n enable_learning_mentor\n enable_competence_certificates\n }\n }\n users {\n id\n user_id\n first_name\n last_name\n email\n avatar_url\n role\n circles {\n id\n title\n slug\n }\n }\n attendance_courses {\n id\n location\n trainer\n due_date {\n id\n start\n end\n }\n learning_content_id\n learning_content {\n id\n title\n circle {\n id\n title\n slug\n }\n }\n }\n assignments {\n id\n submission_deadline {\n id\n start\n }\n evaluation_deadline {\n id\n start\n }\n learning_content {\n id\n title\n content_assignment {\n id\n title\n assignment_type\n }\n }\n }\n edoniq_tests {\n id\n deadline {\n id\n start\n end\n }\n learning_content {\n id\n title\n content_assignment {\n id\n title\n assignment_type\n }\n }\n }\n }\n }\n": types.CourseSessionDetailDocument,
|
||||
"\n query courseQuery($slug: String!) {\n course(slug: $slug) {\n id\n title\n slug\n category_name\n configuration {\n enable_circle_documents\n enable_learning_mentor\n enable_competence_certificates\n }\n action_competences {\n competence_id\n ...CoursePageFields\n performance_criteria {\n competence_id\n learning_unit {\n id\n slug\n evaluate_url\n }\n ...CoursePageFields\n }\n }\n learning_path {\n ...CoursePageFields\n topics {\n is_visible\n ...CoursePageFields\n circles {\n description\n goals\n ...CoursePageFields\n learning_sequences {\n icon\n ...CoursePageFields\n learning_units {\n feedback_user\n evaluate_url\n ...CoursePageFields\n performance_criteria {\n ...CoursePageFields\n }\n learning_contents {\n can_user_self_toggle_course_completion\n content_url\n minutes\n description\n ...CoursePageFields\n ... on LearningContentAssignmentObjectType {\n assignment_type\n content_assignment {\n id\n assignment_type\n }\n competence_certificate {\n ...CoursePageFields\n }\n }\n ... on LearningContentEdoniqTestObjectType {\n checkbox_text\n has_extended_time_test\n content_assignment {\n id\n assignment_type\n }\n competence_certificate {\n ...CoursePageFields\n }\n }\n ... on LearningContentRichTextObjectType {\n text\n }\n }\n }\n }\n }\n }\n }\n }\n }\n": types.CourseQueryDocument,
|
||||
"\n query dashboardConfig {\n dashboard_config {\n id\n slug\n name\n dashboard_type\n course_configuration {\n enable_circle_documents\n enable_learning_mentor\n enable_competence_certificates\n }\n }\n }\n": types.DashboardConfigDocument,
|
||||
"\n query courseSessionDetail($courseSessionId: ID!) {\n course_session(id: $courseSessionId) {\n id\n title\n course {\n id\n title\n slug\n configuration {\n id\n enable_circle_documents\n enable_learning_mentor\n enable_competence_certificates\n }\n }\n users {\n id\n user_id\n first_name\n last_name\n email\n avatar_url\n role\n circles {\n id\n title\n slug\n }\n }\n attendance_courses {\n id\n location\n trainer\n due_date {\n id\n start\n end\n }\n learning_content_id\n learning_content {\n id\n title\n circle {\n id\n title\n slug\n }\n }\n }\n assignments {\n id\n submission_deadline {\n id\n start\n }\n evaluation_deadline {\n id\n start\n }\n learning_content {\n id\n title\n content_assignment {\n id\n title\n assignment_type\n }\n }\n }\n edoniq_tests {\n id\n deadline {\n id\n start\n end\n }\n learning_content {\n id\n title\n content_assignment {\n id\n title\n assignment_type\n }\n }\n }\n }\n }\n": types.CourseSessionDetailDocument,
|
||||
"\n query courseQuery($slug: String!) {\n course(slug: $slug) {\n id\n title\n slug\n category_name\n configuration {\n id\n enable_circle_documents\n enable_learning_mentor\n enable_competence_certificates\n }\n action_competences {\n competence_id\n ...CoursePageFields\n performance_criteria {\n competence_id\n learning_unit {\n id\n slug\n evaluate_url\n }\n ...CoursePageFields\n }\n }\n learning_path {\n ...CoursePageFields\n topics {\n is_visible\n ...CoursePageFields\n circles {\n description\n goals\n ...CoursePageFields\n learning_sequences {\n icon\n ...CoursePageFields\n learning_units {\n evaluate_url\n ...CoursePageFields\n performance_criteria {\n ...CoursePageFields\n }\n learning_contents {\n can_user_self_toggle_course_completion\n content_url\n minutes\n description\n ...CoursePageFields\n ... on LearningContentAssignmentObjectType {\n assignment_type\n content_assignment {\n id\n assignment_type\n }\n competence_certificate {\n ...CoursePageFields\n }\n }\n ... on LearningContentEdoniqTestObjectType {\n checkbox_text\n has_extended_time_test\n content_assignment {\n id\n assignment_type\n }\n competence_certificate {\n ...CoursePageFields\n }\n }\n ... on LearningContentRichTextObjectType {\n text\n }\n }\n }\n }\n }\n }\n }\n }\n }\n": types.CourseQueryDocument,
|
||||
"\n query dashboardConfig {\n dashboard_config {\n id\n slug\n name\n dashboard_type\n course_configuration {\n id\n enable_circle_documents\n enable_learning_mentor\n enable_competence_certificates\n }\n }\n }\n": types.DashboardConfigDocument,
|
||||
"\n query dashboardProgress($courseId: ID!) {\n course_progress(course_id: $courseId) {\n _id\n course_id\n session_to_continue_id\n competence {\n _id\n total_count\n success_count\n fail_count\n }\n assignment {\n _id\n total_count\n points_max_count\n points_achieved_count\n }\n }\n }\n": types.DashboardProgressDocument,
|
||||
"\n query courseStatistics($courseId: ID!) {\n course_statistics(course_id: $courseId) {\n _id\n course_id\n course_title\n course_slug\n course_session_properties {\n _id\n sessions {\n id\n name\n }\n generations\n circles {\n id\n name\n }\n }\n course_session_selection_ids\n course_session_selection_metrics {\n _id\n session_count\n participant_count\n expert_count\n }\n attendance_day_presences {\n _id\n records {\n _id\n course_session_id\n generation\n circle_id\n due_date\n participants_present\n participants_total\n details_url\n }\n summary {\n _id\n days_completed\n participants_present\n }\n }\n feedback_responses {\n _id\n records {\n _id\n course_session_id\n generation\n circle_id\n experts\n satisfaction_average\n satisfaction_max\n details_url\n }\n summary {\n _id\n satisfaction_average\n satisfaction_max\n total_responses\n }\n }\n assignments {\n _id\n summary {\n _id\n completed_count\n average_passed\n }\n records {\n _id\n course_session_id\n course_session_assignment_id\n circle_id\n generation\n assignment_title\n assignment_type_translation_key\n details_url\n deadline\n metrics {\n _id\n passed_count\n failed_count\n unranked_count\n ranking_completed\n average_passed\n }\n }\n }\n competences {\n _id\n summary {\n _id\n success_total\n fail_total\n }\n records {\n _id\n course_session_id\n generation\n circle_id\n title\n success_count\n fail_count\n details_url\n }\n }\n }\n }\n": types.CourseStatisticsDocument,
|
||||
"\n mutation SendFeedbackMutation(\n $courseSessionId: ID!\n $learningContentId: ID!\n $learningContentType: String!\n $data: GenericScalar!\n $submitted: Boolean\n ) {\n send_feedback(\n course_session_id: $courseSessionId\n learning_content_page_id: $learningContentId\n learning_content_type: $learningContentType\n data: $data\n submitted: $submitted\n ) {\n feedback_response {\n id\n data\n submitted\n }\n errors {\n field\n messages\n }\n }\n }\n": types.SendFeedbackMutationDocument,
|
||||
|
|
@ -68,15 +68,15 @@ export function graphql(source: "\n query competenceCertificateQuery($courseSlu
|
|||
/**
|
||||
* 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 courseSessionDetail($courseSessionId: ID!) {\n course_session(id: $courseSessionId) {\n id\n title\n course {\n id\n title\n slug\n configuration {\n enable_circle_documents\n enable_learning_mentor\n enable_competence_certificates\n }\n }\n users {\n id\n user_id\n first_name\n last_name\n email\n avatar_url\n role\n circles {\n id\n title\n slug\n }\n }\n attendance_courses {\n id\n location\n trainer\n due_date {\n id\n start\n end\n }\n learning_content_id\n learning_content {\n id\n title\n circle {\n id\n title\n slug\n }\n }\n }\n assignments {\n id\n submission_deadline {\n id\n start\n }\n evaluation_deadline {\n id\n start\n }\n learning_content {\n id\n title\n content_assignment {\n id\n title\n assignment_type\n }\n }\n }\n edoniq_tests {\n id\n deadline {\n id\n start\n end\n }\n learning_content {\n id\n title\n content_assignment {\n id\n title\n assignment_type\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query courseSessionDetail($courseSessionId: ID!) {\n course_session(id: $courseSessionId) {\n id\n title\n course {\n id\n title\n slug\n configuration {\n enable_circle_documents\n enable_learning_mentor\n enable_competence_certificates\n }\n }\n users {\n id\n user_id\n first_name\n last_name\n email\n avatar_url\n role\n circles {\n id\n title\n slug\n }\n }\n attendance_courses {\n id\n location\n trainer\n due_date {\n id\n start\n end\n }\n learning_content_id\n learning_content {\n id\n title\n circle {\n id\n title\n slug\n }\n }\n }\n assignments {\n id\n submission_deadline {\n id\n start\n }\n evaluation_deadline {\n id\n start\n }\n learning_content {\n id\n title\n content_assignment {\n id\n title\n assignment_type\n }\n }\n }\n edoniq_tests {\n id\n deadline {\n id\n start\n end\n }\n learning_content {\n id\n title\n content_assignment {\n id\n title\n assignment_type\n }\n }\n }\n }\n }\n"];
|
||||
export function graphql(source: "\n query courseSessionDetail($courseSessionId: ID!) {\n course_session(id: $courseSessionId) {\n id\n title\n course {\n id\n title\n slug\n configuration {\n id\n enable_circle_documents\n enable_learning_mentor\n enable_competence_certificates\n }\n }\n users {\n id\n user_id\n first_name\n last_name\n email\n avatar_url\n role\n circles {\n id\n title\n slug\n }\n }\n attendance_courses {\n id\n location\n trainer\n due_date {\n id\n start\n end\n }\n learning_content_id\n learning_content {\n id\n title\n circle {\n id\n title\n slug\n }\n }\n }\n assignments {\n id\n submission_deadline {\n id\n start\n }\n evaluation_deadline {\n id\n start\n }\n learning_content {\n id\n title\n content_assignment {\n id\n title\n assignment_type\n }\n }\n }\n edoniq_tests {\n id\n deadline {\n id\n start\n end\n }\n learning_content {\n id\n title\n content_assignment {\n id\n title\n assignment_type\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query courseSessionDetail($courseSessionId: ID!) {\n course_session(id: $courseSessionId) {\n id\n title\n course {\n id\n title\n slug\n configuration {\n id\n enable_circle_documents\n enable_learning_mentor\n enable_competence_certificates\n }\n }\n users {\n id\n user_id\n first_name\n last_name\n email\n avatar_url\n role\n circles {\n id\n title\n slug\n }\n }\n attendance_courses {\n id\n location\n trainer\n due_date {\n id\n start\n end\n }\n learning_content_id\n learning_content {\n id\n title\n circle {\n id\n title\n slug\n }\n }\n }\n assignments {\n id\n submission_deadline {\n id\n start\n }\n evaluation_deadline {\n id\n start\n }\n learning_content {\n id\n title\n content_assignment {\n id\n title\n assignment_type\n }\n }\n }\n edoniq_tests {\n id\n deadline {\n id\n start\n end\n }\n learning_content {\n id\n title\n content_assignment {\n id\n title\n assignment_type\n }\n }\n }\n }\n }\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 courseQuery($slug: String!) {\n course(slug: $slug) {\n id\n title\n slug\n category_name\n configuration {\n enable_circle_documents\n enable_learning_mentor\n enable_competence_certificates\n }\n action_competences {\n competence_id\n ...CoursePageFields\n performance_criteria {\n competence_id\n learning_unit {\n id\n slug\n evaluate_url\n }\n ...CoursePageFields\n }\n }\n learning_path {\n ...CoursePageFields\n topics {\n is_visible\n ...CoursePageFields\n circles {\n description\n goals\n ...CoursePageFields\n learning_sequences {\n icon\n ...CoursePageFields\n learning_units {\n feedback_user\n evaluate_url\n ...CoursePageFields\n performance_criteria {\n ...CoursePageFields\n }\n learning_contents {\n can_user_self_toggle_course_completion\n content_url\n minutes\n description\n ...CoursePageFields\n ... on LearningContentAssignmentObjectType {\n assignment_type\n content_assignment {\n id\n assignment_type\n }\n competence_certificate {\n ...CoursePageFields\n }\n }\n ... on LearningContentEdoniqTestObjectType {\n checkbox_text\n has_extended_time_test\n content_assignment {\n id\n assignment_type\n }\n competence_certificate {\n ...CoursePageFields\n }\n }\n ... on LearningContentRichTextObjectType {\n text\n }\n }\n }\n }\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query courseQuery($slug: String!) {\n course(slug: $slug) {\n id\n title\n slug\n category_name\n configuration {\n enable_circle_documents\n enable_learning_mentor\n enable_competence_certificates\n }\n action_competences {\n competence_id\n ...CoursePageFields\n performance_criteria {\n competence_id\n learning_unit {\n id\n slug\n evaluate_url\n }\n ...CoursePageFields\n }\n }\n learning_path {\n ...CoursePageFields\n topics {\n is_visible\n ...CoursePageFields\n circles {\n description\n goals\n ...CoursePageFields\n learning_sequences {\n icon\n ...CoursePageFields\n learning_units {\n feedback_user\n evaluate_url\n ...CoursePageFields\n performance_criteria {\n ...CoursePageFields\n }\n learning_contents {\n can_user_self_toggle_course_completion\n content_url\n minutes\n description\n ...CoursePageFields\n ... on LearningContentAssignmentObjectType {\n assignment_type\n content_assignment {\n id\n assignment_type\n }\n competence_certificate {\n ...CoursePageFields\n }\n }\n ... on LearningContentEdoniqTestObjectType {\n checkbox_text\n has_extended_time_test\n content_assignment {\n id\n assignment_type\n }\n competence_certificate {\n ...CoursePageFields\n }\n }\n ... on LearningContentRichTextObjectType {\n text\n }\n }\n }\n }\n }\n }\n }\n }\n }\n"];
|
||||
export function graphql(source: "\n query courseQuery($slug: String!) {\n course(slug: $slug) {\n id\n title\n slug\n category_name\n configuration {\n id\n enable_circle_documents\n enable_learning_mentor\n enable_competence_certificates\n }\n action_competences {\n competence_id\n ...CoursePageFields\n performance_criteria {\n competence_id\n learning_unit {\n id\n slug\n evaluate_url\n }\n ...CoursePageFields\n }\n }\n learning_path {\n ...CoursePageFields\n topics {\n is_visible\n ...CoursePageFields\n circles {\n description\n goals\n ...CoursePageFields\n learning_sequences {\n icon\n ...CoursePageFields\n learning_units {\n evaluate_url\n ...CoursePageFields\n performance_criteria {\n ...CoursePageFields\n }\n learning_contents {\n can_user_self_toggle_course_completion\n content_url\n minutes\n description\n ...CoursePageFields\n ... on LearningContentAssignmentObjectType {\n assignment_type\n content_assignment {\n id\n assignment_type\n }\n competence_certificate {\n ...CoursePageFields\n }\n }\n ... on LearningContentEdoniqTestObjectType {\n checkbox_text\n has_extended_time_test\n content_assignment {\n id\n assignment_type\n }\n competence_certificate {\n ...CoursePageFields\n }\n }\n ... on LearningContentRichTextObjectType {\n text\n }\n }\n }\n }\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query courseQuery($slug: String!) {\n course(slug: $slug) {\n id\n title\n slug\n category_name\n configuration {\n id\n enable_circle_documents\n enable_learning_mentor\n enable_competence_certificates\n }\n action_competences {\n competence_id\n ...CoursePageFields\n performance_criteria {\n competence_id\n learning_unit {\n id\n slug\n evaluate_url\n }\n ...CoursePageFields\n }\n }\n learning_path {\n ...CoursePageFields\n topics {\n is_visible\n ...CoursePageFields\n circles {\n description\n goals\n ...CoursePageFields\n learning_sequences {\n icon\n ...CoursePageFields\n learning_units {\n evaluate_url\n ...CoursePageFields\n performance_criteria {\n ...CoursePageFields\n }\n learning_contents {\n can_user_self_toggle_course_completion\n content_url\n minutes\n description\n ...CoursePageFields\n ... on LearningContentAssignmentObjectType {\n assignment_type\n content_assignment {\n id\n assignment_type\n }\n competence_certificate {\n ...CoursePageFields\n }\n }\n ... on LearningContentEdoniqTestObjectType {\n checkbox_text\n has_extended_time_test\n content_assignment {\n id\n assignment_type\n }\n competence_certificate {\n ...CoursePageFields\n }\n }\n ... on LearningContentRichTextObjectType {\n text\n }\n }\n }\n }\n }\n }\n }\n }\n }\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 dashboardConfig {\n dashboard_config {\n id\n slug\n name\n dashboard_type\n course_configuration {\n enable_circle_documents\n enable_learning_mentor\n enable_competence_certificates\n }\n }\n }\n"): (typeof documents)["\n query dashboardConfig {\n dashboard_config {\n id\n slug\n name\n dashboard_type\n course_configuration {\n enable_circle_documents\n enable_learning_mentor\n enable_competence_certificates\n }\n }\n }\n"];
|
||||
export function graphql(source: "\n query dashboardConfig {\n dashboard_config {\n id\n slug\n name\n dashboard_type\n course_configuration {\n id\n enable_circle_documents\n enable_learning_mentor\n enable_competence_certificates\n }\n }\n }\n"): (typeof documents)["\n query dashboardConfig {\n dashboard_config {\n id\n slug\n name\n dashboard_type\n course_configuration {\n id\n enable_circle_documents\n enable_learning_mentor\n enable_competence_certificates\n }\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -210,6 +210,7 @@ enum DashboardType {
|
|||
}
|
||||
|
||||
type CourseConfigurationObjectType {
|
||||
id: ID!
|
||||
enable_circle_documents: Boolean!
|
||||
enable_learning_mentor: Boolean!
|
||||
enable_competence_certificates: Boolean!
|
||||
|
|
@ -276,7 +277,6 @@ type PerformanceCriteriaObjectType implements CoursePageInterface {
|
|||
|
||||
type LearningUnitObjectType implements CoursePageInterface {
|
||||
title_hidden: Boolean!
|
||||
feedback_user: LearnpathLearningUnitFeedbackUserChoices!
|
||||
id: ID!
|
||||
title: String!
|
||||
slug: String!
|
||||
|
|
@ -290,15 +290,6 @@ type LearningUnitObjectType implements CoursePageInterface {
|
|||
evaluate_url: String!
|
||||
}
|
||||
|
||||
"""An enumeration."""
|
||||
enum LearnpathLearningUnitFeedbackUserChoices {
|
||||
"""NO_FEEDBACK"""
|
||||
NO_FEEDBACK
|
||||
|
||||
"""MENTOR_FEEDBACK"""
|
||||
MENTOR_FEEDBACK
|
||||
}
|
||||
|
||||
interface LearningContentInterface {
|
||||
id: ID!
|
||||
title: String!
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@ export const LearningPathObjectType = "LearningPathObjectType";
|
|||
export const LearningSequenceObjectType = "LearningSequenceObjectType";
|
||||
export const LearningUnitObjectType = "LearningUnitObjectType";
|
||||
export const LearnpathLearningContentAssignmentAssignmentTypeChoices = "LearnpathLearningContentAssignmentAssignmentTypeChoices";
|
||||
export const LearnpathLearningUnitFeedbackUserChoices = "LearnpathLearningUnitFeedbackUserChoices";
|
||||
export const Mutation = "Mutation";
|
||||
export const PerformanceCriteriaObjectType = "PerformanceCriteriaObjectType";
|
||||
export const PresenceRecordStatisticsType = "PresenceRecordStatisticsType";
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ export const COURSE_SESSION_DETAIL_QUERY = graphql(`
|
|||
title
|
||||
slug
|
||||
configuration {
|
||||
id
|
||||
enable_circle_documents
|
||||
enable_learning_mentor
|
||||
enable_competence_certificates
|
||||
|
|
@ -215,6 +216,7 @@ export const COURSE_QUERY = graphql(`
|
|||
slug
|
||||
category_name
|
||||
configuration {
|
||||
id
|
||||
enable_circle_documents
|
||||
enable_learning_mentor
|
||||
enable_competence_certificates
|
||||
|
|
@ -245,7 +247,6 @@ export const COURSE_QUERY = graphql(`
|
|||
icon
|
||||
...CoursePageFields
|
||||
learning_units {
|
||||
feedback_user
|
||||
evaluate_url
|
||||
...CoursePageFields
|
||||
performance_criteria {
|
||||
|
|
@ -299,6 +300,7 @@ export const DASHBOARD_CONFIG = graphql(`
|
|||
name
|
||||
dashboard_type
|
||||
course_configuration {
|
||||
id
|
||||
enable_circle_documents
|
||||
enable_learning_mentor
|
||||
enable_competence_certificates
|
||||
|
|
|
|||
|
|
@ -60,12 +60,6 @@ const feedbackEvaluationCounts = computed(
|
|||
() => selfEvaluationFeedbackSummaries.aggregates.value?.feedback_assessment
|
||||
);
|
||||
|
||||
const isFeedbackEvaluationVisible = computed(
|
||||
() =>
|
||||
selfEvaluationFeedbackSummaries.aggregates.value?.feedback_assessment_visible ??
|
||||
false
|
||||
);
|
||||
|
||||
const currentCourseSession = useCurrentCourseSession();
|
||||
|
||||
const isLoaded = computed(
|
||||
|
|
@ -201,7 +195,10 @@ const isLoaded = computed(
|
|||
</div>
|
||||
|
||||
<!-- Feedback evaluation -->
|
||||
<div v-if="isFeedbackEvaluationVisible" class="mb-8 border-t pt-8">
|
||||
<div
|
||||
v-if="courseSession.course.configuration.enable_learning_mentor"
|
||||
class="mb-8 border-t pt-8"
|
||||
>
|
||||
<h3 class="mb-4 pb-4 lg:pb-0">
|
||||
{{ $t("a.Fremdeinschätzungen") }}
|
||||
</h3>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@ const selfEvaluationFeedbackSummaries = useSelfEvaluationFeedbackSummaries(
|
|||
useCurrentCourseSession().value.id
|
||||
);
|
||||
|
||||
const courseSession = useCurrentCourseSession();
|
||||
const course = computed(() => courseSession.value.course);
|
||||
|
||||
const isLoaded = computed(() => !selfEvaluationFeedbackSummaries.loading.value);
|
||||
|
||||
const selectedCircle = ref({ name: t("a.AlleCircle"), id: "_all" });
|
||||
|
|
@ -32,10 +35,7 @@ const summaries = computed(() => {
|
|||
});
|
||||
|
||||
const headerTitle = computed(() => {
|
||||
const canHaveFeedback =
|
||||
selfEvaluationFeedbackSummaries.aggregates.value?.feedback_assessment_visible ??
|
||||
false;
|
||||
if (canHaveFeedback) {
|
||||
if (course.value.configuration.enable_learning_mentor) {
|
||||
return t("a.Selbst- und Fremdeinschätzungen");
|
||||
} else {
|
||||
return t("a.Selbsteinschätzungen");
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@ export interface FeedbackSummaryAggregates {
|
|||
// totals across all learning units in the course session
|
||||
self_assessment: FeedbackSummaryCounts;
|
||||
feedback_assessment: FeedbackSummaryCounts;
|
||||
// does this course have any feedback?
|
||||
feedback_assessment_visible: boolean;
|
||||
}
|
||||
|
||||
interface FeedbackAssessmentSummary {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ from vbv_lernwelt.learnpath.models import (
|
|||
LearningContentEdoniqTest,
|
||||
LearningPath,
|
||||
LearningUnit,
|
||||
LearningUnitPerformanceFeedbackType,
|
||||
)
|
||||
from vbv_lernwelt.learnpath.tests.learning_path_factories import (
|
||||
CircleFactory,
|
||||
|
|
@ -277,7 +276,6 @@ def create_learning_unit(
|
|||
circle: Circle,
|
||||
course: Course,
|
||||
course_category_title: str = "Course Category",
|
||||
feedback_user: LearningUnitPerformanceFeedbackType = LearningUnitPerformanceFeedbackType.NO_FEEDBACK,
|
||||
) -> LearningUnit:
|
||||
cat, _ = CourseCategory.objects.get_or_create(
|
||||
course=course,
|
||||
|
|
@ -288,7 +286,6 @@ def create_learning_unit(
|
|||
title="Learning Unit",
|
||||
parent=circle,
|
||||
course_category=cat,
|
||||
feedback_user=feedback_user.value,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ class CourseConfigurationObjectType(DjangoObjectType):
|
|||
class Meta:
|
||||
model = CourseConfiguration
|
||||
fields = (
|
||||
"id",
|
||||
"enable_circle_documents",
|
||||
"enable_learning_mentor",
|
||||
"enable_competence_certificates",
|
||||
|
|
|
|||
|
|
@ -238,19 +238,20 @@ def create_versicherungsvermittlerin_course(
|
|||
course_session=cs,
|
||||
user=User.objects.get(username="student-vv@eiger-versicherungen.ch"),
|
||||
)
|
||||
expert1 = CourseSessionUser.objects.create(
|
||||
|
||||
CourseSessionUser.objects.create(
|
||||
course_session=cs,
|
||||
user=User.objects.get(username="expert-vv.expert1@eiger-versicherungen.ch"),
|
||||
role=CourseSessionUser.Role.EXPERT,
|
||||
)
|
||||
|
||||
expert2 = CourseSessionUser.objects.create(
|
||||
CourseSessionUser.objects.create(
|
||||
course_session=cs,
|
||||
user=User.objects.get(username="expert-vv.expert2@eiger-versicherungen.ch"),
|
||||
role=CourseSessionUser.Role.EXPERT,
|
||||
)
|
||||
|
||||
expert3 = CourseSessionUser.objects.create(
|
||||
CourseSessionUser.objects.create(
|
||||
course_session=cs,
|
||||
user=User.objects.get(username="expert-vv.expert3@eiger-versicherungen.ch"),
|
||||
role=CourseSessionUser.Role.EXPERT,
|
||||
|
|
@ -263,17 +264,6 @@ def create_versicherungsvermittlerin_course(
|
|||
|
||||
lemme.participants.add(csu)
|
||||
|
||||
experts = [expert1, expert2, expert3]
|
||||
|
||||
circles = Circle.objects.filter(
|
||||
slug__startswith="versicherungsvermittler-in-lp"
|
||||
)
|
||||
|
||||
# for i, circle in enumerate(circles):
|
||||
# expert = experts[i % len(experts)]
|
||||
# expert.expert.add(circle)
|
||||
# create_feedback(circle, cs, 3)
|
||||
|
||||
for admin_email in ADMIN_EMAILS:
|
||||
CourseSessionUser.objects.create(
|
||||
course_session=cs,
|
||||
|
|
@ -290,7 +280,7 @@ def create_versicherungsvermittlerin_pruefung_course(
|
|||
"it": "Intermediario/a assicurativo/a AFA Esame",
|
||||
}
|
||||
# Versicherungsvermittler/in mit neuen Circles
|
||||
course = create_course_with_categories(
|
||||
course = create_course_with_categories( # noqa
|
||||
course_id=course_id,
|
||||
title=names[language],
|
||||
)
|
||||
|
|
@ -318,7 +308,7 @@ def create_motorfahrzeug_pruefung_course(
|
|||
"it": "Veicolo a motore Intermediario/a assicurativo/a AFA Esame",
|
||||
}
|
||||
# Versicherungsvermittler/in mit neuen Circles
|
||||
course = create_versicherungsvermittlerin_with_categories(
|
||||
course = create_course_with_categories( # noqa
|
||||
course_id=course_id,
|
||||
title=names[language],
|
||||
)
|
||||
|
|
@ -394,7 +384,7 @@ def create_course_uk_de_course_sessions():
|
|||
tuesday_in_two_weeks = (
|
||||
datetime.now() + relativedelta(weekday=TU(2)) + relativedelta(weeks=2)
|
||||
)
|
||||
csac.due_date.start = timezone.make_aware(
|
||||
csac.due_date.start = timezone.make_aware( # noqa
|
||||
tuesday_in_two_weeks.replace(hour=8, minute=30, second=0, microsecond=0)
|
||||
)
|
||||
csac.due_date.end = timezone.make_aware(
|
||||
|
|
@ -484,21 +474,6 @@ def create_course_uk_de_course_sessions():
|
|||
user=User.objects.get(username="patrick.muster@eiger-versicherungen.ch"),
|
||||
)
|
||||
|
||||
# TODO: feedback must now contain a `feedback_user`
|
||||
# create_feedback(
|
||||
# Circle.objects.get(slug="überbetriebliche-kurse-lp-circle-kickoff"),
|
||||
# cs,
|
||||
# 3,
|
||||
# )
|
||||
# create_feedback(
|
||||
# Circle.objects.get(slug="überbetriebliche-kurse-lp-circle-haushalt-teil-2"),
|
||||
# cs,
|
||||
# 14,
|
||||
# )
|
||||
# create_feedback(
|
||||
# Circle.objects.get(slug="überbetriebliche-kurse-lp-circle-basis"), cs, 4
|
||||
# )
|
||||
|
||||
|
||||
def create_course_uk_fr():
|
||||
# Überbetriebliche Kurse FR
|
||||
|
|
@ -704,7 +679,7 @@ def create_course_training_de():
|
|||
|
||||
cs = CourseSession.objects.get(course_id=COURSE_UK, title="Demo üK 2023 DE")
|
||||
|
||||
for user in users:
|
||||
for user in users: # noqa
|
||||
csu, _created = CourseSessionUser.objects.get_or_create(
|
||||
course_session_id=cs.id, user_id=user.id
|
||||
)
|
||||
|
|
@ -810,7 +785,7 @@ def create_course_training_fr():
|
|||
title="Demo ci 2023 FR",
|
||||
)
|
||||
|
||||
for user in users:
|
||||
for user in users: # noqa
|
||||
csu, _created = CourseSessionUser.objects.get_or_create(
|
||||
course_session_id=cs.id, user_id=user.id
|
||||
)
|
||||
|
|
@ -897,7 +872,7 @@ def create_course_training_it():
|
|||
title="Demo ci 2023 IT",
|
||||
)
|
||||
|
||||
for user in users:
|
||||
for user in users: # noqa
|
||||
csu, _created = CourseSessionUser.objects.get_or_create(
|
||||
course_session_id=cs.id, user_id=user.id
|
||||
)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ from vbv_lernwelt.learning_mentor.entities import (
|
|||
)
|
||||
from vbv_lernwelt.learnpath.models import (
|
||||
LearningUnit,
|
||||
LearningUnitPerformanceFeedbackType,
|
||||
)
|
||||
from vbv_lernwelt.self_evaluation_feedback.models import SelfEvaluationFeedback
|
||||
|
||||
|
|
@ -49,17 +48,16 @@ def get_self_feedback_evaluation(
|
|||
evaluation_user: User,
|
||||
course: Course,
|
||||
) -> Tuple[List[MentorAssignmentStatus], Set[int]]:
|
||||
if not participants or not course.configuration.enable_learning_mentor:
|
||||
return [], set()
|
||||
|
||||
records: List[MentorAssignmentStatus] = []
|
||||
circle_ids: Set[int] = set()
|
||||
|
||||
if not participants:
|
||||
return records, circle_ids
|
||||
|
||||
# very unfortunate: we can't simply get all SelfEvaluationFeedback objects since then
|
||||
# we would miss the one where no feedback was requested -> so we get all learning units
|
||||
# and check if we have to take them into account (course, feedback type, etc.)
|
||||
for learning_unit in LearningUnit.objects.filter(
|
||||
feedback_user=LearningUnitPerformanceFeedbackType.MENTOR_FEEDBACK.value,
|
||||
course_category__course_id=course.id,
|
||||
):
|
||||
feedbacks = SelfEvaluationFeedback.objects.filter(
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ from vbv_lernwelt.course.creators.test_utils import (
|
|||
)
|
||||
from vbv_lernwelt.course.models import CourseSessionUser
|
||||
from vbv_lernwelt.learning_mentor.models import LearningMentor
|
||||
from vbv_lernwelt.learnpath.models import LearningUnitPerformanceFeedbackType
|
||||
from vbv_lernwelt.self_evaluation_feedback.models import SelfEvaluationFeedback
|
||||
|
||||
|
||||
|
|
@ -132,13 +131,6 @@ class LearningMentorAPITest(APITestCase):
|
|||
course=self.course,
|
||||
)
|
||||
|
||||
# performance criteria under this learning unit shall be evaluated by the mentor
|
||||
learning_unit.feedback_user = (
|
||||
LearningUnitPerformanceFeedbackType.MENTOR_FEEDBACK.name
|
||||
)
|
||||
|
||||
learning_unit.save()
|
||||
|
||||
# 1: we already evaluated
|
||||
SelfEvaluationFeedback.objects.create(
|
||||
feedback_requester_user=self.participant_1.user,
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ from vbv_lernwelt.course.consts import (
|
|||
COURSE_VERSICHERUNGSVERMITTLERIN_PRUEFUNG_ID,
|
||||
)
|
||||
from vbv_lernwelt.course.models import CourseCategory, CoursePage
|
||||
from vbv_lernwelt.learnpath.models import LearningUnitPerformanceFeedbackType
|
||||
from vbv_lernwelt.learnpath.tests.learning_path_factories import (
|
||||
CircleFactory,
|
||||
LearningContentAssignmentFactory,
|
||||
|
|
@ -175,7 +174,6 @@ def create_circle_basis(lp, title="Basis", course_page=None):
|
|||
LearningSequenceFactory(title="Arbeitsalltag", parent=circle)
|
||||
lu = LearningUnitFactory(
|
||||
title="Mein neuer Job, Arbeitstechnik, Soziale Medien, Datenschutz und Beratungspflichten",
|
||||
feedback_user=LearningUnitPerformanceFeedbackType.MENTOR_FEEDBACK.name,
|
||||
parent=circle,
|
||||
)
|
||||
|
||||
|
|
@ -432,7 +430,6 @@ def create_circle_fahrzeug(lp, title="Fahrzeug", course_page=None):
|
|||
title="Transfer",
|
||||
title_hidden=True,
|
||||
parent=circle,
|
||||
feedback_user=LearningUnitPerformanceFeedbackType.MENTOR_FEEDBACK.name,
|
||||
)
|
||||
|
||||
LearningContentPlaceholderFactory(
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ class LearningUnitObjectType(DjangoObjectType):
|
|||
class Meta:
|
||||
model = LearningUnit
|
||||
interfaces = (CoursePageInterface,)
|
||||
fields = ["evaluate_url", "title_hidden", "feedback_user"]
|
||||
fields = ["evaluate_url", "title_hidden"]
|
||||
|
||||
def resolve_evaluate_url(self: LearningUnit, info, **kwargs):
|
||||
return self.get_evaluate_url()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
# Generated by Django 3.2.20 on 2024-02-29 10:22
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('learnpath', '0015_set_feedback_user_mentor_for_vv'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='learningunit',
|
||||
name='feedback_user',
|
||||
),
|
||||
]
|
||||
|
|
@ -1,10 +1,9 @@
|
|||
import re
|
||||
from enum import Enum
|
||||
from typing import Tuple
|
||||
|
||||
from django.db import models
|
||||
from django.utils.text import slugify
|
||||
from wagtail.admin.panels import FieldPanel, HelpPanel, PageChooserPanel
|
||||
from wagtail.admin.panels import FieldPanel, PageChooserPanel
|
||||
from wagtail.fields import RichTextField, StreamField
|
||||
from wagtail.models import Page
|
||||
|
||||
|
|
@ -119,13 +118,6 @@ class Circle(CourseBasePage):
|
|||
return f"{self.title}"
|
||||
|
||||
|
||||
class LearningUnitPerformanceFeedbackType(Enum):
|
||||
"""Defines how feedback on the performance criteria (n) of a learning unit are given."""
|
||||
|
||||
NO_FEEDBACK = "NO_FEEDBACK"
|
||||
MENTOR_FEEDBACK = "MENTOR_FEEDBACK"
|
||||
|
||||
|
||||
class LearningSequence(CourseBasePage):
|
||||
serialize_field_names = ["icon"]
|
||||
|
||||
|
|
@ -178,21 +170,10 @@ class LearningUnit(CourseBasePage):
|
|||
"course.CourseCategory", on_delete=models.SET_NULL, null=True, blank=True
|
||||
)
|
||||
title_hidden = models.BooleanField(default=False)
|
||||
feedback_user = models.CharField(
|
||||
max_length=255,
|
||||
choices=[(tag.name, tag.name) for tag in LearningUnitPerformanceFeedbackType],
|
||||
default=LearningUnitPerformanceFeedbackType.NO_FEEDBACK.name,
|
||||
)
|
||||
|
||||
content_panels = Page.content_panels + [
|
||||
FieldPanel("course_category"),
|
||||
FieldPanel("title_hidden"),
|
||||
FieldPanel("feedback_user"),
|
||||
HelpPanel(
|
||||
content="👆 Feedback zur Selbsteinschätzung: Normalerweise <code>NO_FEEDBACK</code>, "
|
||||
"ausser bei den Lerninhalten Selbsteinschätzungen, die eine Bewertung haben von einer "
|
||||
"Lernbegleitung haben sollen (z.B. VV)."
|
||||
),
|
||||
]
|
||||
|
||||
class Meta:
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ class LearningUnitSerializer(
|
|||
"course_category",
|
||||
"children",
|
||||
"title_hidden",
|
||||
"feedback_user",
|
||||
],
|
||||
)
|
||||
):
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ from vbv_lernwelt.course.creators.test_utils import (
|
|||
from vbv_lernwelt.course.models import CourseCompletionStatus, CourseSessionUser
|
||||
from vbv_lernwelt.course.services import mark_course_completion
|
||||
from vbv_lernwelt.learning_mentor.models import LearningMentor
|
||||
from vbv_lernwelt.learnpath.models import LearningUnitPerformanceFeedbackType
|
||||
from vbv_lernwelt.self_evaluation_feedback.models import (
|
||||
CourseCompletionFeedback,
|
||||
SelfEvaluationFeedback,
|
||||
|
|
@ -253,7 +252,6 @@ class SelfEvaluationFeedbackAPI(APITestCase):
|
|||
learning_unit = create_learning_unit(
|
||||
course=self.course,
|
||||
circle=self.circle,
|
||||
feedback_user=LearningUnitPerformanceFeedbackType.MENTOR_FEEDBACK,
|
||||
)
|
||||
|
||||
feedback = create_self_evaluation_feedback(
|
||||
|
|
@ -337,7 +335,6 @@ class SelfEvaluationFeedbackAPI(APITestCase):
|
|||
learning_unit_with_success_feedback = create_learning_unit(
|
||||
course=self.course,
|
||||
circle=self.circle,
|
||||
feedback_user=LearningUnitPerformanceFeedbackType.MENTOR_FEEDBACK,
|
||||
)
|
||||
|
||||
performance_criteria_page = create_performance_criteria_page(
|
||||
|
|
@ -382,7 +379,6 @@ class SelfEvaluationFeedbackAPI(APITestCase):
|
|||
learning_unit = create_learning_unit( # noqa
|
||||
course=self.course,
|
||||
circle=self.circle,
|
||||
feedback_user=LearningUnitPerformanceFeedbackType.MENTOR_FEEDBACK,
|
||||
)
|
||||
|
||||
create_performance_criteria_page(
|
||||
|
|
@ -415,7 +411,6 @@ class SelfEvaluationFeedbackAPI(APITestCase):
|
|||
learning_unit = create_learning_unit( # noqa
|
||||
course=self.course,
|
||||
circle=self.circle,
|
||||
feedback_user=LearningUnitPerformanceFeedbackType.MENTOR_FEEDBACK,
|
||||
)
|
||||
|
||||
create_performance_criteria_page(
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ from vbv_lernwelt.learning_mentor.models import LearningMentor
|
|||
from vbv_lernwelt.learnpath.models import (
|
||||
Circle,
|
||||
LearningUnit,
|
||||
LearningUnitPerformanceFeedbackType,
|
||||
)
|
||||
from vbv_lernwelt.notify.services import NotificationService
|
||||
from vbv_lernwelt.self_evaluation_feedback.models import (
|
||||
|
|
@ -181,15 +180,6 @@ def get_self_evaluation_feedbacks_as_requester(request, course_session_id: int):
|
|||
+ received_feedback_counts_aggregate.unknown_count,
|
||||
)
|
||||
|
||||
# check if there are any learning units with mentor feedback
|
||||
feedback_assessment_visible = (
|
||||
LearningUnit.objects.filter(
|
||||
feedback_user=LearningUnitPerformanceFeedbackType.MENTOR_FEEDBACK.value,
|
||||
course_category__course=course_session.course,
|
||||
).count()
|
||||
> 0
|
||||
)
|
||||
|
||||
return Response(
|
||||
{
|
||||
"results": results,
|
||||
|
|
@ -197,7 +187,6 @@ def get_self_evaluation_feedbacks_as_requester(request, course_session_id: int):
|
|||
Circle.objects.filter(id__in=circle_ids).values("id", "title")
|
||||
),
|
||||
"aggregates": {
|
||||
"feedback_assessment_visible": feedback_assessment_visible,
|
||||
"feedback_assessment": {
|
||||
"pass": feedback_assessment_counts_aggregate.pass_count,
|
||||
"fail": feedback_assessment_counts_aggregate.fail_count,
|
||||
|
|
|
|||
Loading…
Reference in New Issue