Index: questiontype.php =================================================================== RCS file: /cvsroot/moodle/moodle/question/type/questiontype.php,v retrieving revision 1.171 diff -u -r1.171 questiontype.php --- questiontype.php 22 Nov 2010 09:52:44 -0000 1.171 +++ questiontype.php 29 Nov 2010 15:43:02 -0000 @@ -1662,7 +1662,6 @@ * array with keys 'text', 'format' and 'itemid'. However, when we are * importing, it will be an array with keys 'text', 'format' and 'files' * @param object $context the context the question is in. - * @param string $component indentifies the file area question. * @param string $filearea indentifies the file area questiontext, generalfeedback,answerfeedback. * @param integer $itemid identifies the file area. * @@ -1777,4 +1776,28 @@ return base64_decode($file->content); } } + + /** + * If your question type has a datasets that are related to the question category + * e.g. calculated questiontype then you should set this to true so that + * the move_category_datasets() function wll be called when the question category is changed + * + * @return true or false. + */ + function has_category_datasets() { + return false ; + } + + /** + * If your question type has a datasets that are related to the question category + * e.g. calculated questiontype then this function will be called + * when the question category is changed. + * the question parameter contains the last question table record with the new category value + * @return true or false. + */ + + function move_category_datasets($question){ + return true ; + } + }