Spaces:
Build error
Build error
Update src/utils/session.py
Browse files- src/utils/session.py +1 -10
src/utils/session.py
CHANGED
|
@@ -13,13 +13,10 @@ def initialize_session_state():
|
|
| 13 |
|
| 14 |
if 'user_progress' not in st.session_state:
|
| 15 |
st.session_state.user_progress = {
|
| 16 |
-
'current_path': None,
|
| 17 |
'completed_modules': [],
|
| 18 |
'achievements': [],
|
| 19 |
'learning_streak': 0,
|
| 20 |
-
'last_active': None
|
| 21 |
-
'mastery_levels': {}, # Added mastery_levels dictionary
|
| 22 |
-
'quiz_scores': {}
|
| 23 |
}
|
| 24 |
|
| 25 |
def get_tutor_context():
|
|
@@ -28,12 +25,6 @@ def get_tutor_context():
|
|
| 28 |
initialize_session_state()
|
| 29 |
return st.session_state.tutor_context
|
| 30 |
|
| 31 |
-
def get_user_progress():
|
| 32 |
-
"""Get user progress from session state"""
|
| 33 |
-
if 'user_progress' not in st.session_state:
|
| 34 |
-
initialize_session_state()
|
| 35 |
-
return st.session_state.user_progress
|
| 36 |
-
|
| 37 |
def clear_chat_history():
|
| 38 |
"""Clear the chat history"""
|
| 39 |
context = get_tutor_context()
|
|
|
|
| 13 |
|
| 14 |
if 'user_progress' not in st.session_state:
|
| 15 |
st.session_state.user_progress = {
|
|
|
|
| 16 |
'completed_modules': [],
|
| 17 |
'achievements': [],
|
| 18 |
'learning_streak': 0,
|
| 19 |
+
'last_active': None
|
|
|
|
|
|
|
| 20 |
}
|
| 21 |
|
| 22 |
def get_tutor_context():
|
|
|
|
| 25 |
initialize_session_state()
|
| 26 |
return st.session_state.tutor_context
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
def clear_chat_history():
|
| 29 |
"""Clear the chat history"""
|
| 30 |
context = get_tutor_context()
|