daledavies / moodle-tool_registrationrules

GNU General Public License v3.0
2 stars 1 forks source link

Rejection points/scoring are not used #12

Closed daledavies closed 1 month ago

daledavies commented 2 months ago

Maybe implement this in rule_checker::is_registration_allowed(), I guess scoring needs to go into rule_base or rule_check_result.

Also need to implement fallback points.

Also I forgot what the "Invert rule" option is for.

phager-at commented 2 months ago

"Invert rule" was meant to invert the boolean outcome of the rule, so if a given rule evaluates to true for the current call/submission it would give no points as long as invert rule is active.

e.g. rule instance "disallow list" for IP address subnet "10.0.0.0/8" --> internal users would get denied. Activate invert rule, now only internal IPs are allowed to register. The disallow list becomes an allow list. Or simpler: rule nope gets converted to a rule "yup" if invert rule is active

daledavies commented 2 months ago

"Invert rule" was meant to invert the boolean outcome of the rule, so if a given rule evaluates to true for the current call/submission it would give no points as long as invert rule is active.

e.g. rule instance "disallow list" for IP address subnet "10.0.0.0/8" --> internal users would get denied. Activate invert rule, now only internal IPs are allowed to register. The disallow list becomes an allow list. Or simpler: rule nope gets converted to a rule "yup" if invert rule is active

This makes sense, thanks :)