-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1302 lines (1173 loc) · 71.4 KB
/
index.html
File metadata and controls
1302 lines (1173 loc) · 71.4 KB
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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI-Mediated Learning Assessment Tool</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #f5f7fa; }
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }
.header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 30px; border-radius: 10px; margin-bottom: 30px; }
.header h1 { font-size: 2.5em; margin-bottom: 10px; }
.header p { font-size: 1.2em; opacity: 0.9; }
/* New Layout Styles */
.main-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.left-panel { display: flex; flex-direction: column; gap: 20px; }
.right-panel { display: flex; flex-direction: column; gap: 20px; }
.collapsible-card { background: white; border-radius: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); overflow: hidden; }
.collapsible-header { background: #667eea; color: white; padding: 15px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.collapsible-content { padding: 20px; display: none; }
.collapsible-content.active { display: block; }
.dashboard { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.card { background: white; padding: 25px; border-radius: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.card h3 { color: #333; margin-bottom: 15px; font-size: 1.3em; }
.assessment-form { background: white; padding: 30px; border-radius: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.dimension { margin-bottom: 25px; padding: 20px; background: #f8f9fa; border-radius: 8px; }
.dimension h4 { color: #495057; margin-bottom: 15px; }
.question { margin-bottom: 15px; }
.question label { display: block; margin-bottom: 5px; font-weight: 500; }
.slider-container { display: flex; align-items: center; gap: 10px; }
.slider { flex: 1; }
.slider-value { font-weight: bold; color: #667eea; min-width: 30px; }
input[type="range"] { width: 100%; height: 6px; border-radius: 3px; background: #ddd; outline: none; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #667eea; cursor: pointer; }
.calculate-btn { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 15px 30px; border: none; border-radius: 8px; font-size: 1.1em; cursor: pointer; margin-top: 20px; }
.calculate-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0,0,0,0.2); }
.results { background: white; padding: 30px; border-radius: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); margin-top: 30px; }
.matrix-display { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 20px 0; }
.matrix-cell { background: #f8f9fa; padding: 15px; text-align: center; border-radius: 5px; border: 2px solid #e9ecef; }
.matrix-cell.header { background: #667eea; color: white; font-weight: bold; }
.recommendations { background: #e8f5e8; padding: 20px; border-radius: 8px; margin-top: 20px; }
.risk-indicator { padding: 15px; border-radius: 8px; margin: 15px 0; text-align: center; font-weight: bold; }
.risk-low { background: #d4edda; color: #155724; }
.risk-medium { background: #fff3cd; color: #856404; }
.risk-high { background: #f8d7da; color: #721c24; }
/* Chat Interface Styles */
.chat-container { background: white; padding: 30px; border-radius: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); margin-top: 30px; }
/* Persistent Profile Sidebar */
.profile-sidebar { position: fixed; top: 20px; right: 20px; width: 250px; background: white; padding: 15px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); z-index: 1000; display: none; }
.profile-sidebar h4 { margin-bottom: 10px; color: #333; font-size: 0.9em; }
.profile-mini-matrix { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 0.8em; }
.profile-mini-cell { padding: 8px; text-align: center; border-radius: 4px; background: #f8f9fa; }
.profile-mini-cell.header { background: #667eea; color: white; font-weight: bold; }
.chat-messages { height: 400px; overflow-y: auto; border: 1px solid #e9ecef; border-radius: 8px; padding: 15px; margin-bottom: 15px; background: #f8f9fa; }
.message { margin-bottom: 15px; padding: 10px; border-radius: 8px; }
.message.user { background: #667eea; color: white; margin-left: 20px; }
.message.assistant { background: white; border: 1px solid #ddd; margin-right: 20px; }
/* Markdown styling in chat messages */
.message h1, .message h2, .message h3 { margin: 10px 0; color: #333; }
.message h1 { font-size: 1.2em; }
.message h2 { font-size: 1.1em; }
.message h3 { font-size: 1.05em; }
.message strong { font-weight: bold; }
.message em { font-style: italic; }
.message code { background: #f1f3f4; padding: 2px 4px; border-radius: 3px; font-family: monospace; }
.message pre { background: #f8f9fa; padding: 8px; border-radius: 5px; margin: 8px 0; overflow-x: auto; }
.message pre code { background: none; padding: 0; }
.message ul { margin: 8px 0; padding-left: 20px; }
.message li { margin: 2px 0; }
.message p { margin: 5px 0; }
.message table, .message .chat-table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: 0.9em; }
.message th, .message td { border: 1px solid #ddd; padding: 8px; text-align: left; vertical-align: top; }
.message th { background: #f1f3f4; font-weight: bold; color: #333; }
.message .chat-table th { background: #667eea; color: white; }
.message .chat-table tbody tr:nth-child(even) { background: #f8f9fa; }
.message .chat-table tbody tr:hover { background: #e9ecef; }
.chat-input { display: flex; gap: 10px; }
.chat-input input { flex: 1; padding: 10px; border: 1px solid #ddd; border-radius: 5px; }
.chat-input button { padding: 10px 20px; background: #667eea; color: white; border: none; border-radius: 5px; cursor: pointer; }
.chat-input button:disabled { background: #ccc; cursor: not-allowed; }
.loading { display: none; text-align: center; padding: 10px; color: #666; }
/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
.container { padding: 10px; }
/* Make header text smaller on mobile */
.header h1 { font-size: 1.8em; }
.header p { font-size: 1em; }
.header { padding: 20px; margin-bottom: 20px; }
/* Single column layout on mobile */
.main-layout {
display: block;
gap: 15px;
}
/* Stack dashboard items vertically */
.dashboard {
display: block;
gap: 15px;
margin-bottom: 20px;
}
.card { padding: 15px; margin-bottom: 15px; }
/* Make collapsible cards smaller */
.collapsible-header { padding: 12px; font-size: 0.9em; }
.collapsible-content { padding: 15px; }
/* Adjust questions and sliders for mobile */
.question { margin-bottom: 20px; }
.question label {
font-size: 0.9em;
margin-bottom: 8px;
line-height: 1.3;
}
.slider-container {
flex-direction: column;
gap: 8px;
align-items: stretch;
}
.slider-container > span:first-child,
.slider-container > span:nth-child(3) {
font-size: 0.8em;
text-align: center;
padding: 4px;
background: #f0f0f0;
border-radius: 4px;
}
.slider-value {
text-align: center;
font-size: 1.2em;
background: #667eea;
color: white;
padding: 8px;
border-radius: 8px;
margin-top: 5px;
}
/* Mobile-friendly matrix display */
.matrix-display {
display: block;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
padding-bottom: 10px;
}
.matrix-display > div {
display: inline-block;
min-width: 80px;
margin: 5px;
white-space: nowrap;
vertical-align: top;
}
.matrix-cell {
padding: 12px 8px;
font-size: 0.85em;
text-align: center;
width: 100%;
}
/* Hide profile sidebar on mobile */
.profile-sidebar { display: none !important; }
/* Mobile chat interface */
.chat-container { padding: 15px; margin-top: 20px; }
.chat-messages { height: 300px; padding: 10px; }
.message {
padding: 12px;
font-size: 0.9em;
margin-bottom: 12px;
}
.chat-input input {
padding: 12px;
font-size: 16px; /* Prevents zoom on iOS */
}
.chat-input button {
padding: 12px 15px;
font-size: 0.9em;
}
/* Make calculate button more prominent on mobile */
.calculate-btn {
width: 100%;
padding: 18px 20px;
font-size: 1.1em;
margin-top: 25px;
border-radius: 12px;
}
/* Responsive tables */
.message table, .message .chat-table {
font-size: 0.8em;
display: block;
overflow-x: auto;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
}
.message th, .message td {
padding: 6px 8px;
min-width: 100px;
}
/* Make touch targets larger */
.collapsible-header {
min-height: 44px;
display: flex;
align-items: center;
}
/* Better spacing for recommendations */
.recommendations { padding: 15px; }
.recommendations h3 { font-size: 1.1em; margin-bottom: 15px; }
.recommendations p { margin-bottom: 12px; line-height: 1.4; }
/* Risk indicator mobile styles */
.risk-indicator {
padding: 12px;
font-size: 0.9em;
line-height: 1.3;
}
/* How it works table mobile optimization */
#howworks-content table {
font-size: 0.7em;
display: block;
overflow-x: auto;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
margin: 15px -15px; /* Extend to edges */
width: calc(100% + 30px);
}
#howworks-content th, #howworks-content td {
padding: 4px 6px;
min-width: 80px;
}
}
/* Tablet-specific adjustments */
@media screen and (min-width: 769px) and (max-width: 1024px) {
.container { padding: 15px; }
.main-layout { gap: 15px; }
.header h1 { font-size: 2.2em; }
.collapsible-header { padding: 12px; }
.collapsible-content { padding: 18px; }
}
/* Very small mobile devices */
@media screen and (max-width: 480px) {
.header h1 { font-size: 1.5em; }
.header p { font-size: 0.9em; }
.container { padding: 8px; }
.question label { font-size: 0.85em; }
.matrix-cell { font-size: 0.75em; padding: 8px 4px; }
.chat-messages { height: 250px; }
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>AI-Mediated Learning Assessment Tool</h1>
<p>Comprehensive diagnostic framework for personalized education</p>
<div style="margin-top: 15px; font-size: 0.9em; opacity: 0.8;">
Developed by <strong>Prahlad Menon, PhD, PMP</strong> |
<a href="mailto:prahlad.menon@quant.md" style="color: white; text-decoration: underline;">prahlad.menon@quant.md</a> |
<a href="https://www.thinkcreate.ai" target="_blank" style="color: white; text-decoration: underline;">www.thinkcreate.ai</a>
</div>
</div>
<!-- New Collapsible Layout -->
<div class="main-layout">
<!-- Left Panel: Assessment Questions -->
<div class="left-panel">
<div class="collapsible-card">
<div class="collapsible-header" onclick="toggleCollapse('overview')">
<span>📊 Assessment Overview</span>
<span id="overview-icon">▼</span>
</div>
<div class="collapsible-content active" id="overview-content">
<p>Complete the 5x4 diagnostic matrix to identify learning needs across cognitive, socioeconomic, emotional, learning style, and cultural learning dimensions.</p>
<ul style="margin-top: 15px; padding-left: 20px;">
<li>20 key indicators</li>
<li>Personalized recommendations</li>
<li>Risk assessment</li>
<li>Progress tracking</li>
<li>Cultural learning context analysis</li>
</ul>
</div>
</div>
<div class="collapsible-card">
<div class="collapsible-header" onclick="toggleCollapse('cognitive')">
<span>🧠 Cognitive Processing</span>
<span id="cognitive-icon">▼</span>
</div>
<div class="collapsible-content active" id="cognitive-content">
<div class="question">
<label>Information Processing Speed - How quickly do you understand new concepts?</label>
<div class="slider-container">
<span>Slow</span>
<input type="range" class="slider" min="1" max="10" value="5" id="c1">
<span>Fast</span>
<span class="slider-value" id="c1-value">5</span>
</div>
</div>
<div class="question">
<label>Working Memory Capacity - How much information can you hold in mind while solving problems?</label>
<div class="slider-container">
<span>Limited</span>
<input type="range" class="slider" min="1" max="10" value="5" id="c2">
<span>Extensive</span>
<span class="slider-value" id="c2-value">5</span>
</div>
</div>
<div class="question">
<label>Attention Regulation - How well can you maintain focus during learning?</label>
<div class="slider-container">
<span>Difficult</span>
<input type="range" class="slider" min="1" max="10" value="5" id="c3">
<span>Easy</span>
<span class="slider-value" id="c3-value">5</span>
</div>
</div>
<div class="question">
<label>Metacognitive Awareness - How well do you understand your own learning process?</label>
<div class="slider-container">
<span>Unaware</span>
<input type="range" class="slider" min="1" max="10" value="5" id="c4">
<span>Very Aware</span>
<span class="slider-value" id="c4-value">5</span>
</div>
</div>
</div>
</div>
<div class="collapsible-card">
<div class="collapsible-header" onclick="toggleCollapse('socioeconomic')">
<span>💰 Socioeconomic Factors</span>
<span id="socioeconomic-icon">▼</span>
</div>
<div class="collapsible-content active" id="socioeconomic-content">
<div class="question">
<label>Resource Availability - Access to books, technology, study materials</label>
<div class="slider-container">
<span>Very Limited</span>
<input type="range" class="slider" min="1" max="10" value="5" id="s1">
<span>Abundant</span>
<span class="slider-value" id="s1-value">5</span>
</div>
</div>
<div class="question">
<label>Family Educational Support - Help available from family members</label>
<div class="slider-container">
<span>No Support</span>
<input type="range" class="slider" min="1" max="10" value="5" id="s2">
<span>Strong Support</span>
<span class="slider-value" id="s2-value">5</span>
</div>
</div>
<div class="question">
<label>Economic Stress Impact - How much do financial concerns affect your studies?</label>
<div class="slider-container">
<span>High Stress</span>
<input type="range" class="slider" min="1" max="10" value="5" id="s3">
<span>No Stress</span>
<span class="slider-value" id="s3-value">5</span>
</div>
</div>
<div class="question">
<label>Technology Access - Reliable internet and devices for learning</label>
<div class="slider-container">
<span>Very Limited</span>
<input type="range" class="slider" min="1" max="10" value="5" id="s4">
<span>Excellent</span>
<span class="slider-value" id="s4-value">5</span>
</div>
</div>
</div>
</div>
<div class="collapsible-card">
<div class="collapsible-header" onclick="toggleCollapse('emotional')">
<span>😊 Emotional Well-being</span>
<span id="emotional-icon">▼</span>
</div>
<div class="collapsible-content active" id="emotional-content">
<div class="question">
<label>Academic Anxiety Levels - How anxious do you feel about academic performance?</label>
<div class="slider-container">
<span>Very Anxious</span>
<input type="range" class="slider" min="1" max="10" value="5" id="e1">
<span>Very Calm</span>
<span class="slider-value" id="e1-value">5</span>
</div>
</div>
<div class="question">
<label>Motivation and Engagement - How motivated are you to learn?</label>
<div class="slider-container">
<span>Not Motivated</span>
<input type="range" class="slider" min="1" max="10" value="5" id="e2">
<span>Highly Motivated</span>
<span class="slider-value" id="e2-value">5</span>
</div>
</div>
<div class="question">
<label>Self-Efficacy Beliefs - How confident are you in your ability to succeed?</label>
<div class="slider-container">
<span>Not Confident</span>
<input type="range" class="slider" min="1" max="10" value="5" id="e3">
<span>Very Confident</span>
<span class="slider-value" id="e3-value">5</span>
</div>
</div>
<div class="question">
<label>Stress Management Capacity - How well do you handle academic stress?</label>
<div class="slider-container">
<span>Poorly</span>
<input type="range" class="slider" min="1" max="10" value="5" id="e4">
<span>Very Well</span>
<span class="slider-value" id="e4-value">5</span>
</div>
</div>
</div>
</div>
<div class="collapsible-card">
<div class="collapsible-header" onclick="toggleCollapse('learning')">
<span>🎨 Learning Style Preferences</span>
<span id="learning-icon">▼</span>
</div>
<div class="collapsible-content active" id="learning-content">
<div class="question">
<label>Modality Preferences - Do you learn better through visual, auditory, or hands-on methods?</label>
<div class="slider-container">
<span>Single Mode</span>
<input type="range" class="slider" min="1" max="10" value="5" id="l1">
<span>Multi-Modal</span>
<span class="slider-value" id="l1-value">5</span>
</div>
</div>
<div class="question">
<label>Social vs Individual Learning - Do you prefer group work or individual study?</label>
<div class="slider-container">
<span>Individual</span>
<input type="range" class="slider" min="1" max="10" value="5" id="l2">
<span>Group</span>
<span class="slider-value" id="l2-value">5</span>
</div>
</div>
<div class="question">
<label>Sequential vs Global Processing - Do you prefer step-by-step or big-picture learning?</label>
<div class="slider-container">
<span>Sequential</span>
<input type="range" class="slider" min="1" max="10" value="5" id="l3">
<span>Global</span>
<span class="slider-value" id="l3-value">5</span>
</div>
</div>
<div class="question">
<label>Abstract vs Concrete Thinking - Do you prefer theoretical concepts or practical examples?</label>
<div class="slider-container">
<span>Concrete</span>
<input type="range" class="slider" min="1" max="10" value="5" id="l4">
<span>Abstract</span>
<span class="slider-value" id="l4-value">5</span>
</div>
</div>
</div>
</div>
<div class="collapsible-card">
<div class="collapsible-header" onclick="toggleCollapse('cultural')">
<span>🌍 Cultural Learning Context</span>
<span id="cultural-icon">▼</span>
</div>
<div class="collapsible-content active" id="cultural-content">
<div class="question">
<label>Educational Authority Expectations - How do you prefer instructors to communicate feedback and guidance?</label>
<div class="slider-container">
<span>Gentle Support</span>
<input type="range" class="slider" min="1" max="10" value="5" id="cu1">
<span>Direct/Firm</span>
<span class="slider-value" id="cu1-value">5</span>
</div>
</div>
<div class="question">
<label>Learning Struggle Tolerance - How comfortable are you with academic challenge and temporary confusion?</label>
<div class="slider-container">
<span>Need Clarity</span>
<input type="range" class="slider" min="1" max="10" value="5" id="cu2">
<span>Embrace Struggle</span>
<span class="slider-value" id="cu2-value">5</span>
</div>
</div>
<div class="question">
<label>Cultural Communication Style - How do you interpret direct academic feedback?</label>
<div class="slider-container">
<span>Personal Criticism</span>
<input type="range" class="slider" min="1" max="10" value="5" id="cu3">
<span>Caring Guidance</span>
<span class="slider-value" id="cu3-value">5</span>
</div>
</div>
<div class="question">
<label>Learning Independence Expectation - How much guidance do you expect from instructors?</label>
<div class="slider-container">
<span>Full Service</span>
<input type="range" class="slider" min="1" max="10" value="5" id="cu4">
<span>Self-Directed</span>
<span class="slider-value" id="cu4-value">5</span>
</div>
</div>
</div>
</div>
<button class="calculate-btn" onclick="calculateProfile()">🔍 Analyze Learning Profile & Generate Recommendations</button>
</div>
<!-- Right Panel: Results and Analysis -->
<div class="right-panel">
<div class="collapsible-card">
<div class="collapsible-header" onclick="toggleCollapse('howworks')">
<span>🎯 How It Works</span>
<span id="howworks-icon">▼</span>
</div>
<div class="collapsible-content active" id="howworks-content">
<h4>🔬 The 5x4 Diagnostic Matrix</h4>
<p>This assessment uses a comprehensive 5x4 matrix (20 indicators) where each dimension influences and interacts with others:</p>
<div style="margin: 20px 0;">
<table style="width: 100%; border-collapse: collapse; font-size: 0.8em;">
<thead>
<tr style="background: #667eea; color: white;">
<th style="padding: 6px; border: 1px solid #ddd;">Dimension Interactions</th>
<th style="padding: 6px; border: 1px solid #ddd;">Cognitive</th>
<th style="padding: 6px; border: 1px solid #ddd;">Socioeconomic</th>
<th style="padding: 6px; border: 1px solid #ddd;">Emotional</th>
<th style="padding: 6px; border: 1px solid #ddd;">Learning Style</th>
<th style="padding: 6px; border: 1px solid #ddd;">Cultural</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 6px; border: 1px solid #ddd; font-weight: bold; background: #f1f3f4;">Cognitive</td>
<td style="padding: 6px; border: 1px solid #ddd; background: #e3f2fd;">Processing × Memory</td>
<td style="padding: 6px; border: 1px solid #ddd;">Resources affect load</td>
<td style="padding: 6px; border: 1px solid #ddd;">Stress impacts focus</td>
<td style="padding: 6px; border: 1px solid #ddd;">Modality preferences</td>
<td style="padding: 6px; border: 1px solid #ddd;">Communication styles</td>
</tr>
<tr>
<td style="padding: 6px; border: 1px solid #ddd; font-weight: bold; background: #f1f3f4;">Socioeconomic</td>
<td style="padding: 6px; border: 1px solid #ddd;">Access affects tools</td>
<td style="padding: 6px; border: 1px solid #ddd; background: #e8f5e8;">Resources × Support</td>
<td style="padding: 6px; border: 1px solid #ddd;">Financial stress</td>
<td style="padding: 6px; border: 1px solid #ddd;">Technology shapes methods</td>
<td style="padding: 6px; border: 1px solid #ddd;">Economic barriers</td>
</tr>
<tr>
<td style="padding: 6px; border: 1px solid #ddd; font-weight: bold; background: #f1f3f4;">Emotional</td>
<td style="padding: 6px; border: 1px solid #ddd;">Anxiety affects focus</td>
<td style="padding: 6px; border: 1px solid #ddd;">Support systems crucial</td>
<td style="padding: 6px; border: 1px solid #ddd; background: #fff3e0;">Motivation × Confidence</td>
<td style="padding: 6px; border: 1px solid #ddd;">Emotions shape preferences</td>
<td style="padding: 6px; border: 1px solid #ddd;">Cultural stress response</td>
</tr>
<tr>
<td style="padding: 6px; border: 1px solid #ddd; font-weight: bold; background: #f1f3f4;">Learning Style</td>
<td style="padding: 6px; border: 1px solid #ddd;">Style affects processing</td>
<td style="padding: 6px; border: 1px solid #ddd;">Resources determine options</td>
<td style="padding: 6px; border: 1px solid #ddd;">Comfort affects engagement</td>
<td style="padding: 6px; border: 1px solid #ddd; background: #f3e5f5;">Individual × Social</td>
<td style="padding: 6px; border: 1px solid #ddd;">Cultural methods match</td>
</tr>
<tr>
<td style="padding: 6px; border: 1px solid #ddd; font-weight: bold; background: #f1f3f4;">Cultural</td>
<td style="padding: 6px; border: 1px solid #ddd;">Communication affects understanding</td>
<td style="padding: 6px; border: 1px solid #ddd;">Cultural capital impacts access</td>
<td style="padding: 6px; border: 1px solid #ddd;">Feedback interpretation varies</td>
<td style="padding: 6px; border: 1px solid #ddd;">Authority expectations shape style</td>
<td style="padding: 6px; border: 1px solid #ddd; background: #fce4ec;">Authority × Independence</td>
</tr>
</tbody>
</table>
</div>
<h4>📊 How It Works:</h4>
<ol style="margin-top: 15px; padding-left: 20px;">
<li><strong>Assessment:</strong> 20 indicators across 5 dimensions</li>
<li><strong>Weighted Analysis:</strong> Each factor weighted by research importance</li>
<li><strong>Interaction Mapping:</strong> Cross-dimensional relationships identified</li>
<li><strong>Risk Calculation:</strong> Higher performance = Lower risk (inverse relationship)</li>
<li><strong>Cultural Context:</strong> Learning preferences shaped by cultural background</li>
<li><strong>AI Recommendations:</strong> Personalized strategies based on your unique profile</li>
</ol>
<div style="margin-top: 20px; padding: 15px; background: #f0f8ff; border-radius: 8px; border-left: 4px solid #667eea;">
<strong>💡 Why 5x4?</strong><br>
Each dimension contains 4 key indicators, creating 20 total measurements. The "interactions" occur when your scores in one dimension influence recommendations for another (e.g., low socioeconomic resources + high cognitive ability + cultural preference for guidance = recommend free structured online courses with instructor support).
</div>
</div>
</div>
<div class="collapsible-card" id="results" style="display: none;">
<div class="collapsible-header" onclick="toggleCollapse('results')">
<span>📋 Your Learning Profile Analysis</span>
<span id="results-icon">▼</span>
</div>
<div class="collapsible-content active" id="results-content">
<div class="matrix-display">
<div class="matrix-cell header">Cognitive</div>
<div class="matrix-cell header">Socioeconomic</div>
<div class="matrix-cell header">Emotional</div>
<div class="matrix-cell header">Learning Style</div>
<div class="matrix-cell header">Cultural</div>
<div class="matrix-cell" id="cog-score">0.0</div>
<div class="matrix-cell" id="ses-score">0.0</div>
<div class="matrix-cell" id="emo-score">0.0</div>
<div class="matrix-cell" id="learn-score">0.0</div>
<div class="matrix-cell" id="cultural-score">0.0</div>
</div>
<div id="risk-assessment"></div>
<div class="recommendations">
<h3>🎯 Personalized AI Recommendations</h3>
<div id="ai-recommendations">
<p>Complete the assessment to receive personalized recommendations...</p>
</div>
</div>
<div style="margin-top: 30px;">
<h3>📊 Detailed Breakdown</h3>
<div id="detailed-analysis"></div>
</div>
</div>
</div>
</div>
</div>
<!-- Persistent Profile Sidebar -->
<div class="profile-sidebar" id="profile-sidebar">
<h4>📊 Your Learning Profile</h4>
<div class="profile-mini-matrix">
<div class="profile-mini-cell header">Cognitive</div>
<div class="profile-mini-cell header">Socioeconomic</div>
<div class="profile-mini-cell header">Emotional</div>
<div class="profile-mini-cell header">Learning</div>
<div class="profile-mini-cell" id="sidebar-cog">-</div>
<div class="profile-mini-cell" id="sidebar-ses">-</div>
<div class="profile-mini-cell" id="sidebar-emo">-</div>
<div class="profile-mini-cell" id="sidebar-learn">-</div>
</div>
<div style="margin-top: 10px; font-size: 0.8em; text-align: center;">
<strong>Risk: <span id="sidebar-risk">-</span></strong>
</div>
</div>
<!-- Dr. Menon Chat Interface -->
<div class="chat-container" id="chat-container" style="display: none;">
<h2>💬 Chat with Dr. Menon</h2>
<p style="margin-bottom: 20px; color: #666;">Ask questions about your learning profile, get study advice, or discuss specific academic challenges with Dr. Prahlad Menon.</p>
<div class="chat-messages" id="chat-messages">
<div class="message assistant">
<strong>Dr. Menon:</strong> Hi! I've analyzed your learning profile. Feel free to ask me questions about your results, request specific study strategies, or discuss any academic challenges you're facing. How can I help you today?
</div>
</div>
<div class="loading" id="loading">
🤖 GPT-5 is thinking...
</div>
<div class="chat-input">
<input type="text" id="user-input" placeholder="Ask about your learning profile or study strategies..." onkeypress="handleEnter(event)">
<button onclick="sendMessage()" id="send-btn">Send</button>
</div>
</div>
</div>
<!-- Configuration Script - Load before main script -->
<script src="config.js" onerror="console.warn('config.js not found - chat functionality will be disabled')"></script>
<script>
// Load configuration on page load
window.addEventListener('DOMContentLoaded', function() {
if (!loadConfig()) {
console.warn('AI configuration not loaded - chat functionality disabled');
const chatContainer = document.getElementById('chat-container');
if (chatContainer) {
chatContainer.innerHTML = `
<h2>💬 Chat with Dr. Menon</h2>
<div style="padding: 20px; background: #fff3cd; border: 1px solid #ffeaa7; border-radius: 8px; color: #856404;">
<strong>⚠️ Configuration Required</strong><br>
To enable the AI chat feature, please:
<ol style="margin: 10px 0; padding-left: 20px;">
<li>Copy <code>config.template.js</code> to <code>config.js</code></li>
<li>Add your Azure OpenAI credentials to <code>config.js</code></li>
<li>Refresh the page</li>
</ol>
<p><strong>Note:</strong> The assessment tool works perfectly without the chat feature!</p>
</div>
`;
}
}
});
// Toggle collapsible sections with auto-collapse
function toggleCollapse(sectionId) {
const content = document.getElementById(sectionId + '-content');
const icon = document.getElementById(sectionId + '-icon');
// If clicking to open a section, first close all other sections
if (content.style.display === 'none' || !content.style.display) {
// Close all other collapsible sections
const allSections = ['overview', 'cognitive', 'socioeconomic', 'emotional', 'learning', 'howworks', 'results'];
allSections.forEach(section => {
if (section !== sectionId) {
const otherContent = document.getElementById(section + '-content');
const otherIcon = document.getElementById(section + '-icon');
if (otherContent && otherIcon) {
otherContent.style.display = 'none';
otherContent.classList.remove('active');
otherIcon.textContent = '▶';
}
}
});
// Open the clicked section
content.style.display = 'block';
content.classList.add('active');
icon.textContent = '▼';
} else {
// Close the clicked section
content.style.display = 'none';
content.classList.remove('active');
icon.textContent = '▶';
}
}
// Auto-advance to next section after completing current one
function autoAdvanceSection(currentSection) {
const sectionOrder = ['overview', 'cognitive', 'socioeconomic', 'emotional', 'learning', 'cultural'];
const currentIndex = sectionOrder.indexOf(currentSection);
if (currentIndex !== -1 && currentIndex < sectionOrder.length - 1) {
const nextSection = sectionOrder[currentIndex + 1];
// Delay to let user see their input, then auto-advance
setTimeout(() => {
toggleCollapse(currentSection); // Close current
setTimeout(() => {
toggleCollapse(nextSection); // Open next
document.getElementById(nextSection + '-content').scrollIntoView({
behavior: 'smooth',
block: 'start'
});
}, 300);
}, 1500); // 1.5 second delay
}
}
// Update slider values in real-time and check for section completion
document.querySelectorAll('input[type="range"]').forEach(slider => {
slider.addEventListener('input', function() {
document.getElementById(this.id + '-value').textContent = this.value;
// Check if all sliders in current section are set (not default value of 5)
checkSectionCompletion(this.id);
});
});
// Check if section is completed and auto-advance
function checkSectionCompletion(sliderId) {
let sectionId = '';
let sliderIds = [];
// Determine which section we're in
if (sliderId.startsWith('c') && !sliderId.startsWith('cu')) {
sectionId = 'cognitive';
sliderIds = ['c1', 'c2', 'c3', 'c4'];
} else if (sliderId.startsWith('s')) {
sectionId = 'socioeconomic';
sliderIds = ['s1', 's2', 's3', 's4'];
} else if (sliderId.startsWith('e')) {
sectionId = 'emotional';
sliderIds = ['e1', 'e2', 'e3', 'e4'];
} else if (sliderId.startsWith('l')) {
sectionId = 'learning';
sliderIds = ['l1', 'l2', 'l3', 'l4'];
} else if (sliderId.startsWith('cu')) {
sectionId = 'cultural';
sliderIds = ['cu1', 'cu2', 'cu3', 'cu4'];
}
// Check if all sliders in this section have been moved from default value
if (sectionId && sliderIds.length > 0) {
const allMoved = sliderIds.every(id => {
const slider = document.getElementById(id);
return slider && slider.value !== '5'; // Default value is 5
});
// If all sliders in section are set, auto-advance after a brief delay
if (allMoved) {
autoAdvanceSection(sectionId);
}
}
}
function calculateProfile() {
// Get all values including cultural dimension
const cognitive = [
parseInt(document.getElementById('c1').value),
parseInt(document.getElementById('c2').value),
parseInt(document.getElementById('c3').value),
parseInt(document.getElementById('c4').value)
];
const socioeconomic = [
parseInt(document.getElementById('s1').value),
parseInt(document.getElementById('s2').value),
parseInt(document.getElementById('s3').value),
parseInt(document.getElementById('s4').value)
];
const emotional = [
parseInt(document.getElementById('e1').value),
parseInt(document.getElementById('e2').value),
parseInt(document.getElementById('e3').value),
parseInt(document.getElementById('e4').value)
];
const learning = [
parseInt(document.getElementById('l1').value),
parseInt(document.getElementById('l2').value),
parseInt(document.getElementById('l3').value),
parseInt(document.getElementById('l4').value)
];
const cultural = [
parseInt(document.getElementById('cu1').value),
parseInt(document.getElementById('cu2').value),
parseInt(document.getElementById('cu3').value),
parseInt(document.getElementById('cu4').value)
];
// Calculate weighted scores (implementing the paper's matrix multiplication)
const weights = [0.3, 0.25, 0.25, 0.2]; // From the paper
const cogScore = (cognitive[0] * weights[0] + cognitive[1] * weights[1] +
cognitive[2] * weights[2] + cognitive[3] * weights[3]).toFixed(1);
const sesScore = (socioeconomic[0] * weights[0] + socioeconomic[1] * weights[1] +
socioeconomic[2] * weights[2] + socioeconomic[3] * weights[3]).toFixed(1);
const emoScore = (emotional[0] * weights[0] + emotional[1] * weights[1] +
emotional[2] * weights[2] + emotional[3] * weights[3]).toFixed(1);
const learnScore = (learning[0] * weights[0] + learning[1] * weights[1] +
learning[2] * weights[2] + learning[3] * weights[3]).toFixed(1);
const culturalScore = (cultural[0] * weights[0] + cultural[1] * weights[1] +
cultural[2] * weights[2] + cultural[3] * weights[3]).toFixed(1);
// Update display
document.getElementById('cog-score').textContent = cogScore;
document.getElementById('ses-score').textContent = sesScore;
document.getElementById('emo-score').textContent = emoScore;
document.getElementById('learn-score').textContent = learnScore;
document.getElementById('cultural-score').textContent = culturalScore;
// Fixed risk calculation - Higher scores should mean LOWER risk (now includes cultural)
const averageScore = (parseFloat(cogScore) + parseFloat(sesScore) + parseFloat(emoScore) + parseFloat(learnScore) + parseFloat(culturalScore)) / 5;
// Convert to risk scale (10 - average gives us risk where higher performance = lower risk)
const riskScore = Math.max(0, 10 - averageScore).toFixed(2);
let riskLevel, riskClass, riskMessage;
if (riskScore <= 2) {
riskLevel = "Low Risk";
riskClass = "risk-low";
riskMessage = "Excellent indicators for academic success! You're performing well across all dimensions.";
} else if (riskScore <= 4) {
riskLevel = "Medium Risk";
riskClass = "risk-medium";
riskMessage = "Good overall performance with some areas for improvement. Targeted support recommended.";
} else if (riskScore <= 6) {
riskLevel = "Moderate Risk";
riskClass = "risk-medium";
riskMessage = "Several areas need attention. Consider implementing the AI-powered recommendations below.";
} else {
riskLevel = "High Risk";
riskClass = "risk-high";
riskMessage = "Multiple challenges identified. Immediate support and intervention recommended.";
}
document.getElementById('risk-assessment').innerHTML = `
<div class="risk-indicator ${riskClass}">
Risk Score: ${riskScore} - ${riskLevel}
<br><small>${riskMessage}</small>
</div>
`;
// Generate recommendations based on scores including cultural
generateRecommendations(cogScore, sesScore, emoScore, learnScore, culturalScore, cognitive, socioeconomic, emotional, learning, cultural);
// Show results and auto-expand
document.getElementById('results').style.display = 'block';
// Auto-expand results section and collapse others
setTimeout(() => {
const allSections = ['overview', 'cognitive', 'socioeconomic', 'emotional', 'learning', 'cultural', 'howworks', 'results'];
allSections.forEach(section => {
const otherContent = document.getElementById(section + '-content');
const otherIcon = document.getElementById(section + '-icon');
if (otherContent && otherIcon) {
if (section === 'results') {
// Expand results section
otherContent.style.display = 'block';
otherContent.classList.add('active');
otherIcon.textContent = '▼';
} else {
// Collapse all other sections
otherContent.style.display = 'none';
otherContent.classList.remove('active');
otherIcon.textContent = '▶';
}
}
});
document.getElementById('results').scrollIntoView({ behavior: 'smooth' });
}, 500);
}
function generateRecommendations(cogScore, sesScore, emoScore, learnScore, culturalScore, cognitive, socioeconomic, emotional, learning, cultural) {
let recommendations = [];
// Cognitive recommendations
if (cogScore < 5) {
recommendations.push("🧠 <strong>Cognitive Support:</strong> Use AI-powered study tools with visual aids and step-by-step explanations. Consider spaced repetition techniques.");
}
if (cognitive[2] < 5) { // Attention regulation
recommendations.push("⏰ <strong>Attention Management:</strong> Try the Pomodoro technique with 25-minute focused study sessions. Use AI apps that send break reminders.");
}
// Socioeconomic recommendations
if (sesScore < 5) {
recommendations.push("📚 <strong>Resource Access:</strong> Utilize free online resources like Khan Academy, Coursera audits, and library digital collections. Explore financial aid options.");
}
if (socioeconomic[3] < 5) { // Technology access
recommendations.push("💻 <strong>Technology Solutions:</strong> Use mobile-optimized learning apps. Look into campus computer labs and WiFi hotspot lending programs.");
}
// Emotional recommendations
if (emoScore < 5) {
recommendations.push("😌 <strong>Emotional Support:</strong> Practice stress-reduction techniques. Consider counseling services. Use AI-powered mood tracking apps.");
}
if (emotional[0] < 5) { // High anxiety
recommendations.push("🧘 <strong>Anxiety Management:</strong> Try mindfulness apps, breathing exercises before exams, and gradual exposure to test situations.");
}
// Learning style recommendations
if (learning[0] > 7) { // Multi-modal preference
recommendations.push("🎨 <strong>Multi-Modal Learning:</strong> Use AI tools that combine visual, auditory, and interactive elements. Try video tutorials with hands-on practice.");
}
if (learning[1] > 6) { // Group learning preference
recommendations.push("👥 <strong>Collaborative Learning:</strong> Join study groups, use AI-powered team formation tools, and engage in peer tutoring.");
}
// Cultural learning recommendations (based on Dr. Menon's interview insights)
if (cultural[0] < 5) { // Prefers gentle support over direct feedback
recommendations.push("🌸 <strong>Cultural Communication:</strong> Seek instructors who use supportive, encouraging language. Consider AI tutors with gentle feedback modes. Frame mistakes as learning opportunities.");
}
if (cultural[1] < 5) { // Low tolerance for learning struggle
recommendations.push("🎯 <strong>Structured Learning:</strong> Use AI-powered step-by-step tutorials that break complex topics into clear, manageable chunks. Avoid ambiguous learning situations.");
}
if (cultural[2] < 5) { // Interprets feedback as personal criticism
recommendations.push("💬 <strong>Feedback Reframing:</strong> Practice viewing academic feedback as caring guidance. Use AI tools that provide growth-oriented feedback rather than deficit-focused corrections.");
}
if (cultural[3] < 5) { // Expects full-service guidance
recommendations.push("🗺️ <strong>Guided Learning Path:</strong> Use AI-powered learning platforms with clear curriculums and instructor-led courses. Gradually build independence through scaffolded AI assistance.");
}
// Cross-cultural recommendations
if (culturalScore > 7) {
recommendations.push("🌍 <strong>Leadership Opportunity:</strong> Your strong cultural adaptability makes you ideal for peer mentoring and cross-cultural study groups. Consider AI-powered collaboration tools.");
}
// AI-specific recommendations
recommendations.push("🤖 <strong>AI Tools:</strong> Try ChatGPT for concept explanations, NotebookLM for research synthesis, and Duolingo for language learning.");
recommendations.push("📊 <strong>Progress Tracking:</strong> Use AI-powered learning analytics to monitor your improvement and adjust strategies accordingly.");
document.getElementById('ai-recommendations').innerHTML = recommendations.map(rec => `<p>${rec}</p>`).join('');