mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
MDL-1883 - /course/scales.php very slow. "Backported" the fix by Petr from 1.9 to 1.8. Not a direct merge as the code has been refactored.
This commit is contained in:
parent
f99ed7c86d
commit
186b0a1537
8 changed files with 129 additions and 41 deletions
|
@ -307,6 +307,16 @@ function journal_scale_used ($journalid,$scaleid) {
|
|||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the scale is in use in the system.
|
||||
*
|
||||
* @param $scaleid int The scale to be counted.
|
||||
* @return boolean
|
||||
*/
|
||||
function journal_scale_used_anywhere($scaleid) {
|
||||
return record_exists("journal","assessed","-$scaleid");
|
||||
}
|
||||
|
||||
// SQL FUNCTIONS ///////////////////////////////////////////////////////////////////
|
||||
|
||||
function journal_get_users_done($journal) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue