KQMATH / moodle-mod_capquiz

:mushroom: Computer adaptive practice activity module for Moodle
https://moodle.org/plugins/mod_capquiz
GNU General Public License v3.0
4 stars 5 forks source link

Implement new delete_instance callback. #228

Open sumaiyamannan opened 8 months ago

sumaiyamannan commented 8 months ago

Hi,

Currently a capquiz activity cannot be deleted. It gets deleted and then goes to the recycle bin. See details here in the report issue #206

Testing instructions

[array ( 'cmid' => 3, 'modulename' => 'capquiz', )]): /var/www/html/lib/dml/moodle_database.php(1682) #0 /var/www/html/lib/datalib.php(1266): moodle_database->get_record_sql('SELECT cm.*, m....', Array, 2)

1 /var/www/html/mod/capquiz/classes/capquiz.php(75): get_coursemodule_from_id('capquiz', 1, 0, false, 2)

2 /var/www/html/mod/capquiz/lib.php(67): mod_capquiz\capquiz->__construct(1)

3 /var/www/html/course/lib.php(907): capquiz_delete_instance(1)

4 /var/www/html/course/classes/task/course_delete_modules.php(66): course_delete_module('6')

5 /var/www/html/lib/cronlib.php(367): core_course\task\course_delete_modules->execute()

6 /var/www/html/lib/cronlib.php(198): cron_run_inner_adhoc_task(Object(core_course\task\course_delete_modules))

7 /var/www/html/lib/cronlib.php(76): cron_run_adhoc_tasks(1706240953)

8 /var/www/html/admin/cli/cron.php(178): cron_run()



Regards,
Sumaiya