Skip to content

Commit cbfb424

Browse files
testing seeds
1 parent b9a0474 commit cbfb424

3 files changed

Lines changed: 163 additions & 1 deletion

File tree

Client/src/app/pages/proposal-ai-review/proposal-ai-review-page.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ <h1 class="text-2xl mb-2 flex flex-wrap items-center gap-2">
1313
<p class="text-muted-foreground mb-6">{{ introText }}</p>
1414

1515
@if (loading()) {
16-
<div class="flex items-center gap-3 py-12 text-muted-foreground">
16+
<div class="flex flex-col items-center gap-4 py-12 text-muted-foreground text-center max-w-lg mx-auto">
1717
<p-progress-spinner strokeWidth="4" styleClass="w-10 h-10" ariaLabel="Loading review" />
1818
<span>{{ loadingMessage() }}</span>
1919
</div>
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
databaseChangeLog:
2+
# Demo data for AI review testing: guidelines + one strong, one weak, and one inconsistent module proposal.
3+
- changeSet:
4+
id: 0020a-seed-ai-review-guidelines-and-proposals
5+
author: module-management
6+
changes:
7+
- sql:
8+
sql: |
9+
INSERT INTO app_user_role (user_id, role)
10+
VALUES ('f47ac10b-58cc-4372-a567-0e02b2c3d479', 'AI_REVIEW_GUIDELINE_MANAGER')
11+
ON CONFLICT (user_id, role) DO NOTHING;
12+
13+
INSERT INTO ai_review_guideline (section, title, instruction, sort_order, created_by, updated_by, created_at, updated_at)
14+
VALUES
15+
('GENERAL', 'Academic tone',
16+
'Use formal academic English. Avoid marketing language and vague superlatives.',
17+
0, 'f47ac10b-58cc-4372-a567-0e02b2c3d479', 'f47ac10b-58cc-4372-a567-0e02b2c3d479', NOW(), NOW()),
18+
('GENERAL', 'Handbook alignment',
19+
'Content should match TUM module handbook expectations: clear scope, workload, assessment, and prerequisites.',
20+
1, 'f47ac10b-58cc-4372-a567-0e02b2c3d479', 'f47ac10b-58cc-4372-a567-0e02b2c3d479', NOW(), NOW()),
21+
('TITLE_ENG', 'Descriptive title',
22+
'The English title must name the subject area and indicate the academic level. Reject titles like "Intro to X" without a clear topic.',
23+
0, 'f47ac10b-58cc-4372-a567-0e02b2c3d479', 'f47ac10b-58cc-4372-a567-0e02b2c3d479', NOW(), NOW()),
24+
('CONTENT', 'Thematic structure',
25+
'Describe at least three clearly separated thematic blocks with 2-4 sentences each.',
26+
0, 'f47ac10b-58cc-4372-a567-0e02b2c3d479', 'f47ac10b-58cc-4372-a567-0e02b2c3d479', NOW(), NOW()),
27+
('CONTENT', 'Avoid filler',
28+
'Flag content that only states that students will "learn about" a topic without naming concrete concepts, methods, or tools.',
29+
1, 'f47ac10b-58cc-4372-a567-0e02b2c3d479', 'f47ac10b-58cc-4372-a567-0e02b2c3d479', NOW(), NOW()),
30+
('LEARNING_OUTCOMES', 'Measurable outcomes',
31+
'Learning outcomes must use measurable verbs (e.g. analyze, design, implement, evaluate) and state what students can do after the module.',
32+
0, 'f47ac10b-58cc-4372-a567-0e02b2c3d479', 'f47ac10b-58cc-4372-a567-0e02b2c3d479', NOW(), NOW()),
33+
('CREDITS', 'ECTS value',
34+
'Master modules must specify ECTS credits. Typical values are 3, 6, or 9 ECTS.',
35+
0, 'f47ac10b-58cc-4372-a567-0e02b2c3d479', 'f47ac10b-58cc-4372-a567-0e02b2c3d479', NOW(), NOW()),
36+
('HOURS_TOTAL', 'Workload consistency',
37+
'Total workload should align with ECTS (approximately 30 hours per ECTS). Flag large mismatches between credits and stated hours.',
38+
0, 'f47ac10b-58cc-4372-a567-0e02b2c3d479', 'f47ac10b-58cc-4372-a567-0e02b2c3d479', NOW(), NOW()),
39+
('EXAMINATION_ACHIEVEMENTS', 'Assessment clarity',
40+
'State examination type (written exam, project, oral exam), duration or scope, and pass criteria.',
41+
0, 'f47ac10b-58cc-4372-a567-0e02b2c3d479', 'f47ac10b-58cc-4372-a567-0e02b2c3d479', NOW(), NOW()),
42+
('DEGREE_PROGRAM_ASSIGNMENTS', 'Program assignment',
43+
'At least one degree program and area of specialization must be assigned for MSc modules.',
44+
0, 'f47ac10b-58cc-4372-a567-0e02b2c3d479', 'f47ac10b-58cc-4372-a567-0e02b2c3d479', NOW(), NOW());
45+
46+
INSERT INTO proposal (proposal_id, created_by, creation_date, status)
47+
VALUES
48+
(1, '7bb1edd9-02c5-411c-a1e2-9aed33808437', NOW(), 'WAITING_FOR_COORDINATORS_SUBMISSION'),
49+
(2, '7bb1edd9-02c5-411c-a1e2-9aed33808437', NOW(), 'WAITING_FOR_COORDINATORS_SUBMISSION'),
50+
(3, 'a0442163-c9c0-4542-9b61-3f154091c7ad', NOW(), 'WAITING_FOR_COORDINATORS_SUBMISSION');
51+
52+
- changeSet:
53+
id: 0020b-seed-ai-review-good-module
54+
author: module-management
55+
changes:
56+
- sql:
57+
splitStatements: false
58+
sql: |
59+
INSERT INTO module_version (
60+
module_version_id, version, module_id, creation_date, status,
61+
title_eng, title_de, level_eng, language_eng, frequency_eng,
62+
credits, duration, hours_total, hours_self_study, hours_presence,
63+
hours_lecture, hours_exercise, hours_practical, hours_seminar,
64+
first_semester_available,
65+
content_eng, learning_outcomes_eng, teaching_methods_eng,
66+
examination_achievements_eng, recommended_prerequisites_eng,
67+
media_eng, literature_eng, responsibles_eng, lv_sws_lecturer_eng,
68+
repetition_eng, bullet_points, proposal_id
69+
) VALUES (
70+
1, 1, 'CIT4310999', NOW(), 'WAITING_FOR_COORDINATORS_SUBMISSION',
71+
'Advanced Database Systems',
72+
'Fortgeschrittene Datenbanksysteme',
73+
'Master',
74+
'English',
75+
'Winter and Summer semester',
76+
6,
77+
'1 semester',
78+
180,
79+
120,
80+
60,
81+
4,
82+
4,
83+
0,
84+
0,
85+
'WS/SS',
86+
E'1. Query processing and optimization: relational algebra review, cost-based optimization, indexing strategies, join algorithms, and execution plans.\n\n2. Transaction management and concurrency: ACID properties, isolation levels, two-phase locking, MVCC, and recovery after failure.\n\n3. Distributed and modern data stores: replication, partitioning, consensus basics, and comparison of relational vs. document-oriented systems.',
87+
E'After successful completion of the module, students are able to:\n- analyze query execution plans and propose concrete optimization measures for relational workloads\n- design transaction boundaries and choose appropriate isolation levels for given consistency requirements\n- evaluate trade-offs between normalization, indexing, and denormalization in application schemas\n- explain replication and partitioning concepts in distributed database systems',
88+
'Lectures introduce concepts and worked examples. Exercises apply techniques to realistic schemas and query workloads. A small implementation assignment reinforces indexing and transaction design. Optional office hours support exam preparation.',
89+
'Written examination (90 minutes, graded). A passed project assignment on query optimization is required for admission to the exam. Grading: 70% written exam, 30% project assignment.',
90+
'Undergraduate-level databases (relational model, SQL, basic normalization) and algorithms and data structures.',
91+
'Slides, recorded lecture videos, PostgreSQL lab environment, course forum.',
92+
E'- A. Silberschatz, H. Korth, S. Sudarshan: Database System Concepts, latest edition.\n- Course exercise sheets and sample exam published on the course page.',
93+
'Prof. Dr. Maria Schulz (module responsible), Dr. Jonas Klein (exercise lead)',
94+
'2 SWS lecture, 2 SWS exercise',
95+
'Once per semester',
96+
'Strong example module for AI review testing (complete and consistent).',
97+
1
98+
);
99+
100+
- changeSet:
101+
id: 0020c-seed-ai-review-bad-module
102+
author: module-management
103+
changes:
104+
- sql:
105+
sql: |
106+
INSERT INTO module_version (
107+
module_version_id, version, module_id, creation_date, status,
108+
title_eng, content_eng, proposal_id
109+
) VALUES (
110+
2, 1, 'CIT4310888', NOW(), 'WAITING_FOR_COORDINATORS_SUBMISSION',
111+
'Intro to Stuff',
112+
'Students learn things about computers and technology. The module covers various topics that are useful for later studies.',
113+
2
114+
);
115+
116+
- changeSet:
117+
id: 0020d-seed-ai-review-inconsistent-module
118+
author: module-management
119+
changes:
120+
- sql:
121+
splitStatements: false
122+
sql: |
123+
INSERT INTO module_version (
124+
module_version_id, version, module_id, creation_date, status,
125+
title_eng, level_eng, language_eng, frequency_eng,
126+
credits, duration, hours_total, hours_self_study, hours_presence,
127+
hours_lecture, hours_exercise,
128+
content_eng, learning_outcomes_eng, examination_achievements_eng,
129+
proposal_id
130+
) VALUES (
131+
3, 1, 'CIT4310777', NOW(), 'WAITING_FOR_COORDINATORS_SUBMISSION',
132+
'Distributed Systems',
133+
'Master',
134+
'English',
135+
'Winter semester',
136+
6,
137+
'1 semester',
138+
45,
139+
30,
140+
15,
141+
2,
142+
1,
143+
'Overview of distributed systems. Students learn about communication, fault tolerance, and cloud platforms. Some labs may use containers.',
144+
'Students understand distributed systems and know important concepts.',
145+
'Written exam at the end.',
146+
3
147+
);
148+
149+
- changeSet:
150+
id: 0020e-seed-ai-review-assignments-and-sequences
151+
author: module-management
152+
changes:
153+
- sql:
154+
sql: |
155+
INSERT INTO module_version_degree_program_assignment (module_version_id, degree_program_id, degree_program_specialization_id)
156+
VALUES (1, 4, 2);
157+
158+
SELECT setval('proposal_proposal_id_seq', (SELECT COALESCE(MAX(proposal_id), 1) FROM proposal));
159+
SELECT setval('module_version_module_version_id_seq', (SELECT COALESCE(MAX(module_version_id), 1) FROM module_version));

Server/src/main/resources/db/changelog/master.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,6 @@ databaseChangeLog:
5353
- include:
5454
relativeToChangelogFile: true
5555
file: changes/0018_proposal_ai_review.yaml
56+
- include:
57+
relativeToChangelogFile: true
58+
file: initialize/0020_seed_ai_review_test_data.yaml

0 commit comments

Comments
 (0)