This commit is contained in:
Adrien Ufferte
2025-06-17 16:42:31 +02:00
parent 52fc4f0e62
commit 6be4e67b50
19 changed files with 38 additions and 38 deletions
@@ -3,7 +3,7 @@ extends EditorPlugin
enum EnvType { DEV, PROD }
const CONFIG_PATH := "user://environment.cfg"
const CONFIG_PATH: String = "user://environment.cfg"
var env_selector: OptionButton
var current_environment: EnvType = EnvType.DEV
@@ -41,7 +41,7 @@ func validate() -> bool:
for info: ValidatorInfo in list:
if info.validator.skip_validation:
continue
var control := info.control as Control
var control: Control = info.control as Control
if control == null:
Logger.error("FormValidator: ValidatorInfo.control is not a Control: %s" % [info.control])
continue
@@ -60,7 +60,7 @@ func validate() -> bool:
func _get_validator_info_list() -> Array[ValidatorInfo]:
var list: Array[ValidatorInfo] = []
for controlKey in _control_validator_map.keys():
var control := controlKey as Control
var control: Control = controlKey as Control
if control == null:
Logger.error("FormValidator: _control_validator_map key is not a Control")
continue
+1 -1
View File
@@ -87,7 +87,7 @@ func get_user_data() -> Dictionary:
func update_student_remediation_data(student_code: int, student_remediation: UserRemediation) -> Dictionary:
if not student_remediation:
Logger.trace("ServerManager: Cannot update studient remediation data because data does not exists")
Logger.trace("ServerManager: Cannot update student remediation data because data does not exists")
success = true
code = -1
json = {}
@@ -289,7 +289,7 @@ func _apply_server_response(response_body: Dictionary) -> void:
var new_scores: Dictionary[int, int] = {}
for index: int in new_array.size():
# TODO ADD SECURITY
new_scores[int(new_array[index][0])] = int(new_array[index][1])
new_scores[int(new_array[index][0] as float)] = int(new_array[index][1] as float)
UserDataManager.set_student_remediation_data(int(response_student_code), new_scores, response_student_data.remediation_gp.updated_at as String)