Permalink
Browse files

Fixed small bug resulting in a warning message when creating new rubric

  • Loading branch information...
1 parent fa4cbd2 commit 2d41a9115b1e0a1af4b39bbf7cc736ba4376720e @marinaglancy marinaglancy committed Nov 7, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 grade/grading/form/lib.php
@@ -397,6 +397,9 @@ public function get_active_instances($itemid) {
*/
public function has_active_instances() {
global $DB;
+ if (empty($this->definition->id)) {
+ return false;
+ }
if ($this->hasactiveinstances === null) {
$conditions = array('formid' => $this->definition->id,
'status' => gradingform_instance::INSTANCE_STATUS_ACTIVE);

0 comments on commit 2d41a91

Please sign in to comment.