Skip to content

Commit

Permalink
renaming of classes and files in frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
ooemperor committed Nov 23, 2023
1 parent 314dbac commit 40a3bba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions codeGrader/frontend/admin/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from flask_login import LoginManager, login_user, login_required, logout_user
from codeGrader.frontend.config import config
from codeGrader.frontend.admin import templates
from codeGrader.frontend.admin.handlers import AdminUserLoginHandler, AdminUserSessionHandler, SessionAdminUser, \
from codeGrader.frontend.admin.handlers import AdminUserLoginHandler, AdminSessionHandler, SessionAdmin, \
UserListHandler, UserHandler, HomeHandler, AdminListHandler, AdminHandler, ProfileListHandler, \
ProfileHandler, SubjectListHandler, SubjectHandler, TaskHandler, TaskListHandler, ExerciseHandler, \
ExerciseListHandler, AddAdminHandler, AddProfileHandler, AddUserHandler, AddTaskHandler, AddExerciseHandler, \
Expand All @@ -22,16 +22,16 @@


@login_manager.user_loader
def adminUser_login(adminUser_id):
def adminUser_login(admin_id):
"""
User load of the login_manager
Returns the frontend represenation of the user
@param adminUser_id: the id of the user
@type adminUser_id: int
@param admin_id: the id of the user
@type admin_id: int
@return: The frontend User Object
@rtype: SessionAdminUser
@rtype: SessionAdmin
"""
user = SessionAdminUser(adminUser_id)
user = SessionAdmin(admin_id)
return user


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import json


class SessionAdminUser(UserMixin):
class SessionAdmin(UserMixin):
"""
Representation of a AdminUser used for the CookieGeneration.
"""
Expand All @@ -19,13 +19,13 @@ def __init__(self, adminUser_id):
@param adminUser_id: The
"""

user_dict = AdminUserSessionHandler().get(adminUser_id)
user_dict = AdminSessionHandler().get(adminUser_id)
self.id = user_dict["id"]
self.username = user_dict["username"]
profile = user_dict["profile"]


class AdminUserSessionHandler(BaseHandler):
class AdminSessionHandler(BaseHandler):
"""
UserHandler
Handles all the operations that can be done on a User in the backend
Expand Down
4 changes: 2 additions & 2 deletions codeGrader/frontend/admin/handlers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""

from .Login import AdminUserLoginHandler
from .SessionAdminUser import AdminUserSessionHandler, SessionAdminUser
from .SessionAdmin import AdminSessionHandler, SessionAdmin
from .User import UserListHandler, UserHandler, AddUserHandler
from .Home import HomeHandler
from .AdminUser import AdminListHandler, AdminHandler, AddAdminHandler
Expand All @@ -13,7 +13,7 @@
from .Task import TaskHandler, TaskListHandler, AddTaskHandler
from .Exercise import ExerciseHandler, ExerciseListHandler, AddExerciseHandler

__all__ = ["AdminUserLoginHandler", "AdminUserSessionHandler", "SessionAdminUser", "UserListHandler", "UserHandler",
__all__ = ["AdminUserLoginHandler", "AdminSessionHandler", "SessionAdmin", "UserListHandler", "UserHandler",
"HomeHandler", "AdminHandler", "AdminListHandler", "ProfileListHandler", "ProfileHandler",
"SubjectListHandler", "SubjectHandler", "ExerciseListHandler", "ExerciseHandler", "TaskHandler",
"TaskListHandler", "AddAdminHandler", "AddProfileHandler", "AddExerciseHandler", "AddTaskHandler",
Expand Down

0 comments on commit 40a3bba

Please sign in to comment.