Skip to content

Commit

Permalink
cleaning for PR
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreDoneux committed Feb 28, 2024
1 parent e799111 commit d85b106
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions inginious/frontend/pages/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ def register_user(self, data):
"password": passwd_hash,
"activate": activate_hash,
"bindings": {},
"language": self.user_manager.session_language(),
"code_indentation": self.user_manager.session_code_indentation(),
"tos_accepted": True
})
try:
Expand Down
6 changes: 4 additions & 2 deletions inginious/frontend/user_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,11 @@ def set_session_language(self, language):
self._session["language"] = language

def set_session_code_indentation(self, code_indentation):
self._session["code_indentation"] = code_indentation
""" Sets the code indentation of the current user in the session, if one is open."""
if self.session_logged_in():
self._session["code_indentation"] = code_indentation

def _set_session(self, user): # pass all data as dict and .get() with fallback values
def _set_session(self, user):
""" Init the session. Preserves potential LTI information. """
self._session["loggedin"] = True
self._session["email"] = user["email"]
Expand Down

0 comments on commit d85b106

Please sign in to comment.