Skip to content
Permalink
Browse files

Merge branch 'MDL-29848-master' of https://github.com/mackensen/moodle

  • Loading branch information...
Aparup Banerjee
Aparup Banerjee committed Mar 20, 2012
2 parents 7d2b2e8 + 464ee75 commit aa4edcf614c6458cc45730f9a5d8eeeeed356b5a
Showing with 6 additions and 1 deletion.
  1. +6 −1 mod/glossary/lib.php
@@ -2890,7 +2890,12 @@ function glossary_comment_validate($comment_param) {
if (!$record = $DB->get_record('glossary_entries', array('id'=>$comment_param->itemid))) {
throw new comment_exception('invalidcommentitemid');
}
if (!$glossary = $DB->get_record('glossary', array('id'=>$record->glossaryid))) {
if ($record->sourceglossaryid && $record->sourceglossaryid == $comment_param->cm->instance) {
$glossary = $DB->get_record('glossary', array('id'=>$record->sourceglossaryid));
} else {
$glossary = $DB->get_record('glossary', array('id'=>$record->glossaryid));
}
if (!$glossary) {
throw new comment_exception('invalidid', 'data');
}
if (!$course = $DB->get_record('course', array('id'=>$glossary->course))) {

0 comments on commit aa4edcf

Please sign in to comment.
You can’t perform that action at this time.