Adds general conditions step and summary step to the register form. Adds devices summary to the teacher settings scene.

This commit is contained in:
Dylan Sarrazyn
2024-02-14 16:58:30 +01:00
parent d894e912d1
commit efaad2a0d0
24 changed files with 730 additions and 464 deletions
+13 -1
View File
@@ -16,7 +16,7 @@ enum EducationMethod {
@export var account_type : AccountType
@export var education_method : EducationMethod
@export var devices_count : int
@export var students : Dictionary
@export var students : Dictionary # int : Array[StudentData]
@export var email : String
@export var password : String # Temporary
@@ -36,5 +36,17 @@ func get_new_code() -> String :
return code
func get_students_count() -> int :
if not students:
return 0
var count = 0
for device in students.keys():
var students_array = students[device] as Array
if students_array:
count += students[device].size()
return count
func _to_string():
return "{Account Type: %s, Education Method: %s, Devices count: %d, Students: %s, Email: %s, Password: %s}" % [AccountType.keys()[account_type], EducationMethod.keys()[education_method], devices_count, str(students), email, password]