Kerikim commited on
Commit
0bef02b
1 Parent(s): c8b5a53

elkay frontend xp

Browse files
Files changed (1) hide show
  1. dashboards/student_db.py +17 -19
dashboards/student_db.py CHANGED
@@ -138,25 +138,7 @@ def show_student_dashboard():
138
  progress_cols[2].metric("馃敟 Study Streak", f"{study_streak} days")
139
  st.write("")
140
 
141
- # --- My Assignments (from DB) ---
142
- st.markdown("---")
143
- st.subheader("馃摌 My Work")
144
- if not rows:
145
- st.info("No assignments yet. Ask your teacher to assign a lesson.")
146
- else:
147
- for a in rows:
148
- title = a.get("title", "Untitled")
149
- subj = a.get("subject", "General")
150
- lvl = a.get("level", "Beginner")
151
- status = a.get("status", "not_started")
152
- due = a.get("due_at")
153
- due_txt = f" 路 Due {str(due)[:10]}" if due else ""
154
- st.markdown(f"**{title}** 路 {subj} 路 {lvl}{due_txt}")
155
- st.caption(f"Status: {status} 路 Resume at section {a.get('current_pos', 1)}")
156
- st.markdown("---")
157
-
158
- # --- XP Bar ---
159
- # stats already fetched above
160
  xp = int(stats.get("xp", 0))
161
  level = int(stats.get("level", 1))
162
  study_streak = int(stats.get("streak", 0))
@@ -206,6 +188,22 @@ def show_student_dashboard():
206
  # )
207
  # st.write("")
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
 
210
  # --- Recent Lessons & Achievements ---
211
  col1, col2 = st.columns(2)
 
138
  progress_cols[2].metric("馃敟 Study Streak", f"{study_streak} days")
139
  st.write("")
140
 
141
+ # --- XP Bar ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  xp = int(stats.get("xp", 0))
143
  level = int(stats.get("level", 1))
144
  study_streak = int(stats.get("streak", 0))
 
188
  # )
189
  # st.write("")
190
 
191
+ # --- My Assignments (from DB) ---
192
+ st.markdown("---")
193
+ st.subheader("馃摌 My Work")
194
+ if not rows:
195
+ st.info("No assignments yet. Ask your teacher to assign a lesson.")
196
+ else:
197
+ for a in rows:
198
+ title = a.get("title", "Untitled")
199
+ subj = a.get("subject", "General")
200
+ lvl = a.get("level", "Beginner")
201
+ status = a.get("status", "not_started")
202
+ due = a.get("due_at")
203
+ due_txt = f" 路 Due {str(due)[:10]}" if due else ""
204
+ st.markdown(f"**{title}** 路 {subj} 路 {lvl}{due_txt}")
205
+ st.caption(f"Status: {status} 路 Resume at section {a.get('current_pos', 1)}")
206
+ st.markdown("---")
207
 
208
  # --- Recent Lessons & Achievements ---
209
  col1, col2 = st.columns(2)