Herramientas de usuario

Herramientas del sitio


moodle:1.9:schema

Moodle 1.9 Schema

General

Configuración

  • config
  • config_log
  • config_plugins

Users and their profiles

  • user
  • user_enrolments
  • user_info_category
  • user_info_data
  • user_info_field
  • user_lastaccess
  • user_preferences
  • user_private_key

The roles and capabilities system

tabla comentario
role defines a role, its name, etc. Other parts of the role definition are stored in the role_capabilities and role_context_levels tables
capabilites the various permissions that can be granted
context a context is a scope in Moodle, for example the whole system, a course, a particular activity. The type is given by contextlevel, and depending on context level, instanceid points to one of a number of different tables
role_allow_assign which roles can assign which other roles
role_allow_override which roles can override which other roles
role_allow_switch which roles can switch to which other roles (Moodle 2.0 onwards.)
role_assignments which users are assigned which roles in which contexts
role_capabilities the permission for each capability in either a role definition (if contextid points to the system context) or a role override (if contextid points to some other context)
role_context_levels the context levels at which each role can be assigned. (Moodle 2.0 onwards)
role_names used to implement the feature where roles can be given different names in different courses (or, more gererally, contexts)
role_sortorder is not actually used anywhere in the code!

Courses and their organisation into categories

  • course
  • course_categories
  • course_display
  • course_meta
  • course_request
desc mdl_course;
+-------------------+-----------------------+------+-----+----------+----------------+
| Field             | Type                  | Null | Key | Default  | Extra          |
+-------------------+-----------------------+------+-----+----------+----------------+
| id                | bigint(10) unsigned   | NO   | PRI | NULL     | auto_increment |
| category          | bigint(10) unsigned   | NO   | MUL | 0        |                |
| sortorder         | bigint(10) unsigned   | NO   |     | 0        |                |
| password          | varchar(50)           | NO   |     |          |                |
| fullname          | varchar(254)          | NO   |     |          |                |
| shortname         | varchar(100)          | NO   | MUL |          |                |
| idnumber          | varchar(100)          | NO   | MUL |          |                |
| summary           | text                  | YES  |     | NULL     |                |
| format            | varchar(10)           | NO   |     | topics   |                |
| showgrades        | tinyint(2) unsigned   | NO   |     | 1        |                |
| modinfo           | longtext              | YES  |     | NULL     |                |
| newsitems         | mediumint(5) unsigned | NO   |     | 1        |                |
| teacher           | varchar(100)          | NO   |     | Teacher  |                |
| teachers          | varchar(100)          | NO   |     | Teachers |                |
| student           | varchar(100)          | NO   |     | Student  |                |
| students          | varchar(100)          | NO   |     | Students |                |
| guest             | tinyint(2) unsigned   | NO   |     | 0        |                |
| startdate         | bigint(10) unsigned   | NO   |     | 0        |                |
| enrolperiod       | bigint(10) unsigned   | NO   |     | 0        |                |
| numsections       | mediumint(5) unsigned | NO   |     | 1        |                |
| marker            | bigint(10) unsigned   | NO   |     | 0        |                |
| maxbytes          | bigint(10) unsigned   | NO   |     | 0        |                |
| showreports       | smallint(4) unsigned  | NO   |     | 0        |                |
| visible           | tinyint(1) unsigned   | NO   |     | 1        |                |
| hiddensections    | tinyint(2) unsigned   | NO   |     | 0        |                |
| groupmode         | smallint(4) unsigned  | NO   |     | 0        |                |
| groupmodeforce    | smallint(4) unsigned  | NO   |     | 0        |                |
| defaultgroupingid | bigint(10) unsigned   | NO   |     | 0        |                |
| lang              | varchar(30)           | NO   |     |          |                |
| theme             | varchar(50)           | NO   |     |          |                |
| cost              | varchar(10)           | NO   |     |          |                |
| currency          | varchar(3)            | NO   |     | USD      |                |
| timecreated       | bigint(10) unsigned   | NO   |     | 0        |                |
| timemodified      | bigint(10) unsigned   | NO   |     | 0        |                |
| metacourse        | tinyint(1) unsigned   | NO   |     | 0        |                |
| requested         | tinyint(1) unsigned   | NO   |     | 0        |                |
| restrictmodules   | tinyint(1) unsigned   | NO   |     | 0        |                |
| expirynotify      | tinyint(1) unsigned   | NO   |     | 0        |                |
| expirythreshold   | bigint(10) unsigned   | NO   |     | 0        |                |
| notifystudents    | tinyint(1) unsigned   | NO   |     | 0        |                |
| enrollable        | tinyint(1) unsigned   | NO   |     | 1        |                |
| enrolstartdate    | bigint(10) unsigned   | NO   |     | 0        |                |
| enrolenddate      | bigint(10) unsigned   | NO   |     | 0        |                |
| enrol             | varchar(20)           | NO   |     |          |                |
| defaultrole       | bigint(10) unsigned   | NO   |     | 0        |                |
+-------------------+-----------------------+------+-----+----------+----------------+
desc mdl_course_categories;
+--------------+---------------------+------+-----+---------+----------------+
| Field        | Type                | Null | Key | Default | Extra          |
+--------------+---------------------+------+-----+---------+----------------+
| id           | bigint(10) unsigned | NO   | PRI | NULL    | auto_increment |
| name         | varchar(255)        | NO   |     |         |                |
| description  | text                | YES  |     | NULL    |                |
| parent       | bigint(10) unsigned | NO   | MUL | 0       |                |
| sortorder    | bigint(10) unsigned | NO   |     | 0       |                |
| coursecount  | bigint(10) unsigned | NO   |     | 0       |                |
| visible      | tinyint(1)          | NO   |     | 1       |                |
| timemodified | bigint(10) unsigned | NO   |     | 0       |                |
| depth        | bigint(10) unsigned | NO   |     | 0       |                |
| path         | varchar(255)        | NO   |     |         |                |
| theme        | varchar(50)         | YES  |     | NULL    |                |
+--------------+---------------------+------+-----+---------+----------------+
desc mdl_course_display;
+---------+---------------------+------+-----+---------+----------------+
| Field   | Type                | Null | Key | Default | Extra          |
+---------+---------------------+------+-----+---------+----------------+
| id      | bigint(10) unsigned | NO   | PRI | NULL    | auto_increment |
| course  | bigint(10) unsigned | NO   | MUL | 0       |                |
| userid  | bigint(10) unsigned | NO   |     | 0       |                |
| display | bigint(10)          | NO   |     | 0       |                |
+---------+---------------------+------+-----+---------+----------------+
 desc mdl_course_meta;
+---------------+---------------------+------+-----+---------+----------------+
| Field         | Type                | Null | Key | Default | Extra          |
+---------------+---------------------+------+-----+---------+----------------+
| id            | bigint(10) unsigned | NO   | PRI | NULL    | auto_increment |
| parent_course | bigint(10) unsigned | NO   | MUL | 0       |                |
| child_course  | bigint(10) unsigned | NO   | MUL | 0       |                |
+---------------+---------------------+------+-----+---------+----------------+
desc mdl_course_request;
+-----------+---------------------+------+-----+---------+----------------+
| Field     | Type                | Null | Key | Default | Extra          |
+-----------+---------------------+------+-----+---------+----------------+
| id        | bigint(10) unsigned | NO   | PRI | NULL    | auto_increment |
| fullname  | varchar(254)        | NO   |     |         |                |
| shortname | varchar(15)         | NO   | MUL |         |                |
| summary   | text                | NO   |     | NULL    |                |
| reason    | text                | NO   |     | NULL    |                |
| requester | bigint(10) unsigned | NO   |     | 0       |                |
| password  | varchar(50)         | NO   |     |         |                |
+-----------+---------------------+------+-----+---------+----------------+

http://docs.moodle.org/19/en/Course_request

Activities and their arrangement within courses

  • modules
  • course_allowed_modules
  • course_modules
  • course_sections

Groups and groupings

  • groups
  • groups_members
  • groupings
  • groupings_groups

The logging system

  • log
  • log_display

Blocks system

  • block
  • block_instance
  • block_rss_client
  • block_pinned
  • block_search_documents

http://docs.moodle.org/dev/Blocks#Database_support

Events

  • event
  • events_handlers
  • events_queue
  • events_queue_handlers

Backup and restore

  • backup_config
  • backup_courses
  • backup_files
  • backup_ids
  • backup_log

Statistics

  • stats_daily
  • stats_monthly
  • stats_user_daily
  • stats_user_monthly
  • stats_user_weekly
  • stats_weekly

Tags

  • tag_*

Gradebook

  • grade_*

Question bank and question engine

Note that the tables for the core question bank, and also the tables for the individual question types, all have names starting with question_, however, it is easier to think of them separately.

  • question
  • question_answers
  • question_attempts
  • question_categories
  • question_sessions
  • question_states

http://docs.moodle.org/dev/Database_schema_introduction#Question_types

Referencias

moodle/1.9/schema.txt · Última modificación: 2013/11/20 19:00 por jherrero