File size: 8,061 Bytes
e107ee4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
from datetime import datetime, timedelta

SAMPLE_COURSES = [
    {
        'course_id': 'CS101',
        'title': 'Introduction to Computer Science',
        'description': 'This course covers the basics of computer science and programming.',
        'instructor': 'Dr. John Doe',
        'duration': '10 weeks'
    },
    {
        'course_id': 'CS102',
        'title': 'Data Structures and Algorithms',
        'description': 'This course introduces data structures and algorithms for efficient data processing.',
        'instructor': 'Dr. Jane Smith',
        'duration': '12 weeks'
    },
    {
        'course_id': 'CS103',
        'title': 'Advanced Python Programming',
        'description': 'This course covers advanced topics in Python programming, including file handling and exception management.',
        'instructor': 'Dr. Emily Johnson',
        'duration': '8 weeks'
    }
]

SAMPLE_SESSIONS = [
    {
        'id': 1,
        'course_id': 'CS101',
        'title': 'Introduction to Programming Fundamentals',
        'date': datetime.now() - timedelta(days=7),
        'status': 'completed',
        'pre_class': {
            'resources': [
                {'type': 'pdf', 'title': 'Introduction to Python Basics', 'url': '/assets/python_basics.pdf'},
                {'type': 'video', 'title': 'Programming Fundamentals', 'duration': '15:00'},
                {'type': 'reading', 'title': 'Chapter 1: Getting Started', 'pages': '1-15'}
            ],
            'completion_required': True
        },
        'in_class': {
            'topics': ['Variables', 'Data Types', 'Basic Operations'],
            'quiz': {
                'title': 'Python Basics Quiz',
                'questions': 5,
                'duration': 15
            },
            'polls': [
                {'question': 'How comfortable are you with Python syntax?', 'options': ['Very', 'Somewhat', 'Not at all']}
            ]
        },
        'post_class': {
            'assignments': [
                {
                    'id': 1,
                    'title': 'Basic Python Programs',
                    'due_date': datetime.now() + timedelta(days=2),
                    'status': 'pending'
                }
            ]
        }
    },
    {
        'id': 2,
        'course_id': 'CS101',
        'title': 'Control Flow and Functions',
        'date': datetime.now() - timedelta(days=3),
        'status': 'completed',
        'pre_class': {
            'resources': [
                {'type': 'pdf', 'title': 'Control Flow in Python', 'url': '/assets/control_flow.pdf'},
                {'type': 'video', 'title': 'Functions and Methods', 'duration': '20:00'}
            ],
            'completion_required': True
        },
        'in_class': {
            'topics': ['If-else statements', 'Loops', 'Function definitions'],
            'quiz': {
                'title': 'Control Flow Quiz',
                'questions': 8,
                'duration': 20
            },
            'polls': [
                {'question': 'Which loop type do you find more intuitive?', 'options': ['For loops', 'While loops', 'Both']}
            ]
        },
        'post_class': {
            'assignments': [
                {
                    'id': 2,
                    'title': 'Function Implementation Exercise',
                    'due_date': datetime.now() + timedelta(days=4),
                    'status': 'pending'
                }
            ]
        }
    },
    {
        'id': 3,
        'course_id': 'CS102',
        'title': 'Data Structures',
        'date': datetime.now(),
        'status': 'in_progress',
        'pre_class': {
            'resources': [
                {'type': 'pdf', 'title': 'Python Data Structures', 'url': '/assets/data_structures.pdf'},
                {'type': 'video', 'title': 'Lists and Dictionaries', 'duration': '25:00'}
            ],
            'completion_required': True
        },
        'in_class': {
            'topics': ['Lists', 'Tuples', 'Dictionaries', 'Sets'],
            'quiz': {
                'title': 'Data Structures Quiz',
                'questions': 10,
                'duration': 25
            },
            'polls': [
                {'question': 'Which data structure do you use most often?', 'options': ['Lists', 'Dictionaries', 'Sets', 'Tuples']}
            ]
        },
        'post_class': {
            'assignments': [
                {
                    'id': 3,
                    'title': 'Data Structure Implementation',
                    'due_date': datetime.now() + timedelta(days=7),
                    'status': 'not_started'
                }
            ]
        }
    },
    {
        'id': 4,
        'course_id': 'CS101',
        'title': 'Object-Oriented Programming',
        'date': datetime.now() + timedelta(days=4),
        'status': 'upcoming',
        'pre_class': {
            'resources': [
                {'type': 'pdf', 'title': 'OOP Concepts', 'url': '/assets/oop_concepts.pdf'},
                {'type': 'video', 'title': 'Classes and Objects', 'duration': '30:00'}
            ],
            'completion_required': True
        },
        'in_class': {
            'topics': ['Classes', 'Objects', 'Inheritance', 'Polymorphism'],
            'quiz': {
                'title': 'OOP Concepts Quiz',
                'questions': 12,
                'duration': 30
            },
            'polls': [
                {'question': 'Have you used OOP before?', 'options': ['Yes', 'No', 'Not sure'], 'responses': {'For loops': 12, 'While loops': 8, 'Both': 10}}
            ]
        },
        'post_class': {
            'assignments': [
                {
                    'id': 4,
                    'title': 'Class Implementation Project',
                    'due_date': datetime.now() + timedelta(days=11),
                    'status': 'not_started'
                }
            ]
        }
    },
    {
        'id': 5,
        'course_id': 'CS103',
        'title': 'File Handling and Exception Management',
        'date': datetime.now() + timedelta(days=7),
        'status': 'upcoming',
        'pre_class': {
            'resources': [
                {'type': 'pdf', 'title': 'File Operations in Python', 'url': '/assets/file_ops.pdf'},
                {'type': 'video', 'title': 'Exception Handling', 'duration': '20:00'}
            ],
            'completion_required': True
        },
        'in_class': {
            'topics': ['File Operations', 'Exception Handling', 'Context Managers'],
            'quiz': {
                'title': 'File Operations Quiz',
                'questions': 8,
                'duration': 20
            },
            'polls': [
                {'question': 'How often do you handle exceptions in your code?', 
                 'options': ['Always', 'Sometimes', 'Rarely', 'Never'],
                 'responses': {'Very': 10, 'Somewhat': 15, 'Not at all': 5} 
                }
            ]
        },
        'post_class': {
            'assignments': [
                {
                    'id': 5,
                    'title': 'File Processing Application',
                    'due_date': datetime.now() + timedelta(days=14),
                    'status': 'not_started'
                }
            ]
        }
    }
]

# Chatbot message history
SAMPLE_CHAT_HISTORY = {
    1: [
        {'user': 'student1', 'message': 'What is the difference between list and tuple?', 'timestamp': datetime.now()},
        {'user': 'chatbot', 'message': 'Lists are mutable (can be modified) while tuples are immutable (cannot be modified after creation).', 'timestamp': datetime.now()}
    ]
}

# Student progress data
SAMPLE_STUDENT_PROGRESS = {
    'user1': {
        1: {'pre_class': 50, 'in_class': 80, 'post_class': 90},
        2: {'pre_class': 100, 'in_class': 75, 'post_class': 85},
        3: {'pre_class': 50, 'in_class': 0, 'post_class': 0},
        4: {'pre_class': 0, 'in_class': 0, 'post_class': 0},
        5: {'pre_class': 0, 'in_class': 0, 'post_class': 0}
    }
}