322d3a611ac2baf2ac9ad69d5ffd0ab1d4b1025d
[atutor.git] / mods / mediawiki / module_delete.php
1 <?php\r
2 /*******\r
3  * this function named [module_name]_delete is called whenever a course content is deleted\r
4  * which includes when restoring a backup with override set, or when deleting an entire course.\r
5  * the function must delete all module-specific material associated with this course.\r
6  * $course is the ID of the course to delete.\r
7  */\r
8 \r
9 function hello_world_delete($course) {\r
10         global $db;\r
11 \r
12         // delete hello_world course table entries\r
13         $sql = "DELETE FROM ".TABLE_PREFIX."hello_world WHERE course_id=$course";\r
14         mysql_query($sql, $db);\r
15 \r
16         // delete hello_world course files\r
17         $path = AT_CONTENT_DIR .'hello_world/' . $course .'/';\r
18         clr_dir($path);\r
19 }\r
20 \r
21 ?>