5.1. Identifying Suitable Algorithms
Logging in (applies to both Desktop and Mobile Applications)
Mobile and desktop users will need to be given the database address and password in order to log in, and mobile users (a.k.a. Teachers) will be unable to log in until an administrator sets up their account through the desktop application. The algorithm should check in the “Users” table of the database for the username and password requested, and if they match a user get their access privileges and show them the appropriate form (Desktop) or allow/deny access on Mobile.
Username = USERINPUT
Password = USERINPUT
Success = FALSE
sqlConnection = connectionString #connectionString is public – Database info
sqlConnection.Open()
WHILE sqlReader.Read(UserName, UserPassword, AccessRights FROM dbo.Users)
tempUser = sqlReader(UserName, UserPassword, AccessRights)
listOfUsers.ADD(tempUser)
ENDWHILE
FOR i = 1 TO listOfUsers.Length
IF Username = listOfUsers[i].UserName AND Password = listOfUsers[i].UserPassword
Success = TRUE
CheckAccessRights(listOfUsers[i]) #on desktop, will grant access to secretaries and administrators only – on mobile, teachers only
ENDIF
ENDFOR
IF Success = FALSE
OUTPUT “Incorrect login credentials, please try again.”
ENDIFSigning up (applies to Desktop Application – Administrators Only)
One user named “admin” will be provided to the school along with the database information, so they are able to begin registering other users. The initial administrator will have to enter a new password after the first login, and from there they can use the Users Management tab in the Desktop Application to register new Administrators, Secretaries or Teachers.
Registering Students (applies to Desktop Application – Administrators and Secretaries Only)
From the control panel, students may be registered in bulk or individually. The former option requires a correctly written csv file to be imported, whereas the latter displays a new form to register the new Student.
Adding “Teachings”, A.K.A. the Teacher’s Timetable (applies to Desktop Application – Administrators Only)
From the control panel, an administrator may upload the timetable of each Teacher so that the mobile application can be utilised by them later. This will also be done by importing a csv file.
Creating ‘teaching’ dates and semesters (applies to Desktop Application – Administrators Only)
Administrators may create and delete dates for which Teachers may take attendance as Semesters. Sundays and Saturdays will be registered as non-teaching dates.
Disabling access to specific tabs in the control panel if the user logged in is a secretary (applies to Desktop Application)
As the user is switching tabs in the desktop control panel an event is “fired”, which can be linked to a custom method. Every time a tab is selected, the access rights of the currently logged-in user are checked, and if they are a secretary they should be denied access to 3 tabs in the control panel every time they are clicked on.
Changing a user’s password
Although administrators may not read the passwords of other users in the desktop control panel, they may ‘reset’ their passwords by entering a new password for them. The new password requires to be identical for two entries in order for changes to take effect.
Filling in the register (applies to Mobile application)
Teachers should be able to see the correct list of students for the period they select. This list will either be generated from the “Absences” table if the register has been submitted before for that date and period or from the Students table if the former condition is not applicable. In this case, only students from the correct group may be selected so that the appropriate Absence information can be sent to the “Absences” table.
Getting the correct schedule from the timetable according to what day it is on start-up (applies to Mobile application)
As the signed-in user opens the application, it should immediately populate a selectable list of their lessons schedule from the “Teachings” table, along with the lesson name from the “Lessons” table so that selecting the period they want to take the register for is as seamless and clear as possible.
Last updated