Skip to content

Commit

Permalink
Fixed small bug resulting in a warning message when creating new rubric
Browse files Browse the repository at this point in the history
  • Loading branch information
marinaglancy committed Nov 7, 2011
1 parent fa4cbd2 commit 2d41a91
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions grade/grading/form/lib.php
Expand Up @@ -397,6 +397,9 @@ public function get_active_instances($itemid) {
*/ */
public function has_active_instances() { public function has_active_instances() {
global $DB; global $DB;
if (empty($this->definition->id)) {
return false;
}
if ($this->hasactiveinstances === null) { if ($this->hasactiveinstances === null) {
$conditions = array('formid' => $this->definition->id, $conditions = array('formid' => $this->definition->id,
'status' => gradingform_instance::INSTANCE_STATUS_ACTIVE); 'status' => gradingform_instance::INSTANCE_STATUS_ACTIVE);
Expand Down

0 comments on commit 2d41a91

Please sign in to comment.