Step 1 of Bug 1223 done.

(http://moodle.org/bugs/bug.php?op=show&bugid=1223)
This commit is contained in:
stronk7 2004-05-15 23:18:24 +00:00
parent 9d05e26118
commit 0f1a97c2fb
4 changed files with 56 additions and 0 deletions

View File

@ -377,6 +377,20 @@ function assignment_get_participants($assignmentid) {
return ($students);
}
function assignment_scale_used ($assignmentid,$scaleid) {
//This function returns if a scale is being used by one assignment
$return = false;
$rec = get_record("assignment","id","$assignmentid","grade","-$scaleid");
if (!empty($rec)) {
$return = true;
}
return $return;
}
/// SQL STATEMENTS //////////////////////////////////////////////////////////////////
function assignment_log_info($log) {

View File

@ -584,6 +584,20 @@ function forum_get_participants($forumid) {
return ($st_subscriptions);
}
function forum_scale_used ($forumid,$scaleid) {
//This function returns if a scale is being used by one forum
$return = false;
$rec = get_record("forum","id","$forumid","scale","-$scaleid");
if (!empty($rec)) {
$return = true;
}
return $return;
}
/// SQL FUNCTIONS ///////////////////////////////////////////////////////////
function forum_get_post_full($postid) {

View File

@ -362,6 +362,20 @@ function glossary_get_participants($glossaryid) {
return ($students);
}
function glossary_scale_used ($glossaryid,$scaleid) {
//This function returns if a scale is being used by one glossary
$return = false;
$rec = get_record("glossary","id","$glossaryid","scale","-$scaleid");
if (!empty($rec)) {
$return = true;
}
return $return;
}
//////////////////////////////////////////////////////////////////////////////////////
/// Any other glossary functions go here. Each of them must have a name that
/// starts with glossary_

View File

@ -292,6 +292,20 @@ function journal_get_participants($journalid) {
return ($students);
}
function journal_scale_used ($journalid,$scaleid) {
//This function returns if a scale is being used by one journal
$return = false;
$rec = get_record("journal","id","$journalid","assessed","-$scaleid");
if (!empty($rec)) {
$return = true;
}
return $return;
}
// SQL FUNCTIONS ///////////////////////////////////////////////////////////////////
function journal_get_users_done($journal) {