Aquesta pàgina forma part de la documentació de Moodle en català, tot i que no ha estat traduïda encara. Podeu contribuir obertament a les tasques de traducció. Podeu consultar la Guia d'edició de la documentació i també participar ens els debats del fòrum de traductors de la documentació a moodle.org

Using XMLDB

De MoodleDocs
Salta a:navegació, cerca

(This docs is in progress of writing and editing, aimed to help third-party module developer to switch to XMLDB)

XMLDB in your module

Everywhere in Moodle now use XMLDB. Created to prevent from creating custom database schemas for different database system. If you don't know what XMLDB is, You can learn more about it here Development:XMLDB_introduction

In every module, there is "db/" directory where database structure stored. usually contains mysql.php, mysql.sql and so on for different database.

It's mean that you have to create different files for each database systems. If there are 5 database, you have to create 10 files (2 each). XMLDB solves this problem as well. Switching to XMLDB is very easy, save your time and effort by creating just 1 file.

Convert MySQL syntax to XMLDB

This can be done easily by using XMLDB Editor built in every Moodle. Simply go to Administration >> Miscellaneous >> XMLDB Editor