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