I'd like to just check on a point which is puzzling me. Perhaps Mike could answer this?
mod/questionnaire/lib.php, function questionnaire_get_survey_list, near the start has some functionality which is invoked if $courseid == 0. The purpose of the function is to return a list of template questionnaire surveys that can be copied to provide the questions for the new one, or public surveys that can be re-used.
Could somebody please tell me what situation the $courseid == 0 test is supposed to cater for? Presumably this is not a test for the questionnaire being in the site course (which would normally be course ID 1 anyway). I could be wrong, but I'm not aware of any way of creating a questionnaire outside of a course in Moodle, so I would not have thought that this condition would happen.
I'd like to find out, because this clause calls isadmin() which is really something I should replace in the roles and capabilities upgrade.
I'd like to just check on a point which is puzzling me. Perhaps Mike could answer this?
mod/questionnaire/lib.php, function questionnaire_get_survey_list, near the start has some functionality which is invoked if $courseid == 0. The purpose of the function is to return a list of template questionnaire surveys that can be copied to provide the questions for the new one, or public surveys that can be re-used.
Could somebody please tell me what situation the $courseid == 0 test is supposed to cater for? Presumably this is not a test for the questionnaire being in the site course (which would normally be course ID 1 anyway). I could be wrong, but I'm not aware of any way of creating a questionnaire outside of a course in Moodle, so I would not have thought that this condition would happen.
I'd like to find out, because this clause calls isadmin() which is really something I should replace in the roles and capabilities upgrade.