Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add new tables to moodle database

Tags:

mysql

moodle

I just want to know is it ok to add new tables to the moodle database or should I create a new database for that? I need a table to save a unique id and a token in one table and client's ip address, client's MAC address and computer name in another table.(and what are the best data types to store those?) And I just want to know does moodle save these things in there tables? Then it will be easy for me. Thank You

like image 430
Ravindu Avatar asked Nov 04 '22 18:11

Ravindu


1 Answers

The question is not clear and you haven't mentioned how you are going to fill those extra tables.. I'm not sure how to get the MAC address from an HTTP request/response.

Moodle has an in-built logging mechanism which keeps track of the IP Addresses of visited users. It also has a unique id(primary key) and the user id.

If you want to add new tables, you can add it via the plugins(block, module or local plugin). Moodle also has a robust Event API allows you to trigger some actions without actually modifying the core code.

Hope this helps.

like image 58
gnuwings Avatar answered Nov 11 '22 08:11

gnuwings