You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the return value of that function is as indicated in the truth table below (note, in the scenario under consideration, $USER->id == $userid):
ojt:evaluate
ojt:evaluateself
function returns
TRUE
TRUE
TRUE
TRUE
FALSE
TRUE
FALSE
TRUE
TRUE
FALSE
FALSE
FALSE
The function should return false for the combination in the second line of the above table, ie. TRUE && FALSE should return FALSE.
BTW, the next line, FALSE && TRUE, should also return FALSE, however returning TRUE as the function currently does could be justified on the premise that there may be cases (unlikely) where a user should not be able to evaluate others but be able to evaluate themself.
The text was updated successfully, but these errors were encountered:
Hi,
There is no combination of mod/ojt:evaluate and mod/ojt:evaluateself that would enable a user to be able to evaluate others but not evaluate themself.
The issue is with the return value of the function ojt_can_evaluate() -
totara-mod-ojt/locallib.php
Line 340 in a91ead6
Currently the return value of that function is as indicated in the truth table below (note, in the scenario under consideration, $USER->id == $userid):
The function should return false for the combination in the second line of the above table, ie. TRUE && FALSE should return FALSE.
BTW, the next line, FALSE && TRUE, should also return FALSE, however returning TRUE as the function currently does could be justified on the premise that there may be cases (unlikely) where a user should not be able to evaluate others but be able to evaluate themself.
The text was updated successfully, but these errors were encountered: