From: Eloy Lafuente <stronk7@moodle.org>
Date: Wed, 13 Jan 2010 16:50:27 +0000 (+0000)
Subject: NOBUG: Fix notice (and something more?). Like MDL-12961 but in data module; merged... 
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=1fb0e43005c4c49f989eb01382a1dae4a08c775f;p=moodle.git

NOBUG: Fix notice (and something more?). Like MDL-12961 but in data module; merged from 19_STABLE
---

diff --git a/mod/data/rate.php b/mod/data/rate.php
index 9e05cd085d..91682656b2 100755
--- a/mod/data/rate.php
+++ b/mod/data/rate.php
@@ -17,6 +17,8 @@ if (!$course = $DB->get_record('course', array('id'=>$data->course))) {
 
 if (!$cm = get_coursemodule_from_instance('data', $data->id)) {
     print_error('invalidcoursemodule');
+} else {
+    $data->cmidnumber = $cm->id; //MDL-12961
 }
 
 require_login($course, false, $cm);