Closed smurthys closed 6 years ago
Function ClassDB.isStudent (and 2 other functions) has the following unnecessary code which can be simplified (a possible rewrite is also shown):
ClassDB.isStudent
IF NOT ClassDB.isUser($1) THEN RETURN FALSE; ELSIF NOT ClassDB.isMember($1, 'classdb_student') THEN RETURN FALSE; ELSE RETURN TRUE; END IF;
The code can be simplified as follows:
IF NOT ClassDB.isUser($1) THEN RETURN FALSE; ELSE RETURN ClassDB.isMember($1, 'classdb_student'); END IF;
Function
ClassDB.isStudent
(and 2 other functions) has the following unnecessary code which can be simplified (a possible rewrite is also shown):The code can be simplified as follows: