123456789101112131415161718192021222324252627 |
- <?php
-
- if (!function_exists('calcExtraCredits')) {
-
-
- function calcExtraCredits($credits, $student_count, $grad = false)
- {
- return max(0, round(($credits ?? 0) * (($student_count ?? 0) - ($grad ? 60 : 30)) / ($grad ? 60 : 30)) / 2);
- }
- }
-
- if (!function_exists('cmpCourseCode')) {
-
-
- function cmpCourseCode($c1, $c2) {
- return (substr($c1->code, -4) - substr($c2->code, -4)) ?: strcmp($c1->code, $c2->code);
- }
-
- }
|