| Línea 36... | 
            Línea 36... | 
          
          
            | 36 | 
            //=========================================================================
  | 
            36 | 
            //=========================================================================
  | 
          
          
            | 37 | 
            // First, you need to configure the database where all Moodle data       //
  | 
            37 | 
            // First, you need to configure the database where all Moodle data       //
  | 
          
          
            | 38 | 
            // will be stored.  This database must already have been created         //
  | 
            38 | 
            // will be stored.  This database must already have been created         //
  | 
          
          
            | 39 | 
            // and a username/password created to access it.                         //
  | 
            39 | 
            // and a username/password created to access it.                         //
  | 
          
          
            | Línea 40... | 
            Línea 40... | 
          
          
            | 40 | 
             
  | 
            40 | 
             
  | 
          
          
            | 41 | 
            $CFG->dbtype    = 'pgsql';      // 'pgsql', 'mariadb', 'mysqli', 'auroramysql', 'sqlsrv' or 'oci'
  | 
            41 | 
            $CFG->dbtype    = 'pgsql';                  // 'pgsql', 'mariadb', 'mysqli', 'auroramysql', or 'sqlsrv'
  | 
          
          
            | 42 | 
            $CFG->dblibrary = 'native';     // 'native' only at the moment
  | 
            42 | 
            $CFG->dblibrary = 'native';                 // 'native' only at the moment
  | 
          
          
            | 43 | 
            $CFG->dbhost    = 'localhost';  // eg 'localhost' or 'db.isp.com' or IP
  | 
            43 | 
            $CFG->dbhost    = 'localhost';              // eg 'localhost' or 'db.isp.com' or IP
  | 
          
          
            | 44 | 
            $CFG->dbname    = 'moodle';     // database name, eg moodle
  | 
            44 | 
            $CFG->dbname    = 'moodle';                 // database name, eg moodle
  | 
          
          
            | 45 | 
            $CFG->dbuser    = 'username';   // your database username
  | 
            45 | 
            $CFG->dbuser    = 'username';               // your database username
  | 
          
          
            | 46 | 
            $CFG->dbpass    = 'password';   // your database password
  | 
            46 | 
            $CFG->dbpass    = 'password';               // your database password
  | 
          
          
            | 47 | 
            $CFG->prefix    = 'mdl_';       // prefix to use for all table names
  | 
            47 | 
            $CFG->prefix    = 'mdl_';                   // prefix to use for all table names
  | 
          
          
            | 48 | 
            $CFG->dboptions = array(
  | 
            48 | 
            $CFG->dboptions = [
  | 
          
          
            | 49 | 
                'dbpersist' => false,       // should persistent database connections be
  | 
            49 | 
                'dbpersist' => false,                   // Should persistent database connections be
  | 
          
          
            | 50 | 
                                            //  used? set to 'false' for the most stable
  | 
            50 | 
                                                        //   used? Set to 'false' for the most stable
  | 
          
          
            | 51 | 
                                            //  setting, 'true' can improve performance
  | 
            51 | 
                                                        //   setting, 'true' can improve performance
  | 
          
          
            | 52 | 
                                            //  sometimes
  | 
            52 | 
                                                        //   sometimes
  | 
          
          
            | 53 | 
                'dbsocket'  => false,       // should connection via UNIX socket be used?
  | 
            53 | 
                'dbsocket'  => false,                   // Should connection via UNIX socket be used?
  | 
          
          
            | 54 | 
                                            //  if you set it to 'true' or custom path
  | 
            54 | 
                                                        //   if you set it to 'true' or custom path
  | 
          
          
            | 55 | 
                                            //  here set dbhost to 'localhost',
  | 
            55 | 
                                                        //   here set dbhost to 'localhost',
  | 
          
          
            | 56 | 
                                            //  (please note mysql is always using socket
  | 
            56 | 
                                                        //   (please note mysql is always using socket
  | 
          
          
            | 57 | 
                                            //  if dbhost is 'localhost' - if you need
  | 
            57 | 
                                                        //   if dbhost is 'localhost' - if you need
  | 
          
          
            | 58 | 
                                            //  local port connection use '127.0.0.1')
  | 
            58 | 
                                                        //   local port connection use '127.0.0.1')
  | 
          
          
            | 59 | 
                'dbport'    => '',          // the TCP port number to use when connecting
  | 
            59 | 
                'dbport'    => '',                      // The TCP port number to use when connecting
  | 
          
          
            | 60 | 
                                            //  to the server. keep empty string for the
  | 
            60 | 
                                                        //   to the server. Keep empty string for the
  | 
          
          
            | 61 | 
                                            //  default port
  | 
            61 | 
                                                        //   default port
  | 
          
          
            | 62 | 
                'dbhandlesoptions' => false,// On PostgreSQL poolers like pgbouncer don't
  | 
            62 | 
                'dbhandlesoptions' => false,            // On PostgreSQL poolers like pgbouncer don't
  | 
          
          
            | 63 | 
                                            // support advanced options on connection.
  | 
            63 | 
                                                        //   support advanced options on connection.
  | 
          
          
            | 64 | 
                                            // If you set those in the database then
  | 
            64 | 
                                                        //   If you set those in the database then
  | 
          
          
            | 65 | 
                                            // the advanced settings will not be sent.
  | 
            65 | 
                                                        //   the advanced settings will not be sent.
  | 
          
          
            | 66 | 
                'dbcollation' => 'utf8mb4_unicode_ci', // MySQL has partial and full UTF-8
  | 
            66 | 
                'dbcollation' => 'utf8mb4_unicode_ci',  // MySQL has partial and full UTF-8
  | 
          
          
            | 67 | 
                                            // support. If you wish to use partial UTF-8
  | 
            67 | 
                                                        //   support. If you wish to use partial UTF-8
  | 
          
          
            | 68 | 
                                            // (three bytes) then set this option to
  | 
            68 | 
                                                        //   (three bytes) then set this option to
  | 
          
          
            | 69 | 
                                            // 'utf8_unicode_ci'. If using the recommended
  | 
            69 | 
                                                        //   'utf8_unicode_ci'. If using the recommended
  | 
          
          
            | 70 | 
                                            // settings with full UTF-8 support this should
  | 
            70 | 
                                                        //   settings with full UTF-8 support this should
  | 
          
          
            | 71 | 
                                            // be set to 'utf8mb4_unicode_ci'. This option
  | 
            71 | 
                                                        //   be set to 'utf8mb4_unicode_ci'. This option
  | 
          
          
            | - | 
               | 
            72 | 
                                                        //   should be removed for all other databases.
  | 
          
          
            | - | 
               | 
            73 | 
                // 'dbschema'  => '',                   // On PostgreSQL this sets the database schema to use
  | 
          
          
            | - | 
               | 
            74 | 
                                                        //   for the connection.
  | 
          
          
            | - | 
               | 
            75 | 
                // 'dbtransactions' => null             // Set this to true to explicitly enable database transactions
  | 
          
          
            | - | 
               | 
            76 | 
                                                        //   for MySQL. By default only the following storage engines are
  | 
          
          
            | - | 
               | 
            77 | 
                                                        //   configured to use transactions: InnoDB, INNOBASE, BDB, XtraDB,
  | 
          
          
            | 72 | 
                                            // should be removed for all other databases.
  | 
            78 | 
                                                        //   Aria, Falcon.
  | 
          
          
            | 73 | 
                // 'versionfromdb' => false,   // On MySQL and MariaDB, this can force
  | 
            79 | 
                // 'versionfromdb' => false,            // On MySQL and MariaDB, this can force
  | 
          
          
            | 74 | 
                                            // the DB version to be evaluated using
  | 
            80 | 
                                                        //   the DB version to be evaluated using
  | 
          
          
            | 75 | 
                                            // the VERSION function instead of the version
  | 
            81 | 
                                                        //   the VERSION function instead of the version
  | 
          
          
            | 76 | 
                                            // provided by the PHP client which could be
  | 
            82 | 
                                                        //   provided by the PHP client which could be
  | 
          
          
            | 77 | 
                                            // wrong based on the DB server infrastructure,
  | 
            83 | 
                                                        //   wrong based on the DB server infrastructure,
  | 
          
          
            | 78 | 
                                            // e.g. PaaS on Azure. Default is false/unset.
  | 
            84 | 
                                                        //   e.g. PaaS on Azure. Default is false/unset.
  | 
          
          
            | 79 | 
                                            // Uncomment and set to true to force MySQL and
  | 
            85 | 
                                                        //   Uncomment and set to true to force MySQL and
  | 
          
          
            | 80 | 
                                            // MariaDB to use 'SELECT VERSION();'.
  | 
            86 | 
                                                        //   MariaDB to use 'SELECT VERSION();'.
  | 
          
          
            | 81 | 
                // 'extrainfo' => [],       // Extra information for the DB driver, e.g. SQL Server,
  | 
            87 | 
                // 'extrainfo' => [],                   // Extra information for the DB driver, e.g. SQL Server,
  | 
          
          
            | 82 | 
                                            // has additional configuration according to its environment,
  | 
            88 | 
                                                        //   has additional configuration according to its environment,
  | 
          
          
            | 83 | 
                                            // which the administrator can specify to alter and
  | 
            89 | 
                                                        //   which the administrator can specify to alter and
  | 
          
          
            | 84 | 
                                            // override any connection options.
  | 
            90 | 
                                                        //   override any connection options.
  | 
          
          
            | 85 | 
                // 'ssl' => '',             // A connection mode string from the list below.
  | 
            91 | 
                // 'ssl' => '',                         // A connection mode string from the list below.
  | 
          
          
            | 86 | 
                                            // Not supported by all drivers.
  | 
            92 | 
                                                        //   Not supported by all drivers.
  | 
          
          
            | 87 | 
                                            //   prefer       Use SSL if available - postgres default  Postgres only
  | 
            93 | 
                                                        //     prefer       Use SSL if available - postgres default  Postgres only
  | 
          
          
            | 88 | 
                                            //   disable      Force non secure connection              Postgres only
  | 
            94 | 
                                                        //     disable      Force non secure connection              Postgres only
  | 
          
          
            | 89 | 
                                            //   require      Force SSL                                Postgres and MySQL
  | 
            95 | 
                                                        //     require      Force SSL                                Postgres and MySQL
  | 
          
          
            | 90 | 
                                            //   verify-full  Force SSL and verify root CA             Postgres and MySQL
  | 
            96 | 
                                                        //     verify-full  Force SSL and verify root CA             Postgres and MySQL
  | 
          
          
            | 91 | 
                                            // All mode names are adopted from Postgres
  | 
            97 | 
                                                        //   All mode names are adopted from Postgres
  | 
          
          
            | 92 | 
                                            // and other databases align where possible:
  | 
            98 | 
                                                        //   and other databases align where possible:
  | 
          
          
            | 93 | 
                                            //   Postgres: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-SSLMODE
  | 
            99 | 
                                                        //     Postgres: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-SSLMODE
  | 
          
          
            | 94 | 
                                            //   MySql:    https://www.php.net/manual/en/mysqli.real-connect.php
  | 
            100 | 
                                                        //     MySQL:    https://www.php.net/manual/en/mysqli.real-connect.php
  | 
          
          
            | 95 | 
                                            // It is worth noting that for MySQL require and verify-full are the same - in both cases
  | 
            101 | 
                                                        //   It is worth noting that for MySQL require and verify-full are the same - in both cases
  | 
          
          
            | 96 | 
                                            // verification will take place if you specify hostname as a name,
  | 
            102 | 
                                                        //   verification will take place if you specify hostname as a name,
  | 
          
          
            | 97 | 
                                            // and it will be omitted if you put an IP address.
  | 
            103 | 
                                                        //   and it will be omitted if you put an IP address.
  | 
          
          
            | 98 | 
                // 'fetchbuffersize' => 100000, // On PostgreSQL, this option sets a limit
  | 
            104 | 
                // 'fetchbuffersize' => 100000,         // On PostgreSQL, this option sets a limit
  | 
          
          
            | 99 | 
                                            // on the number of rows that are fetched into
  | 
            105 | 
                                                        //   on the number of rows that are fetched into
  | 
          
          
            | 100 | 
                                            // memory when doing a large recordset query
  | 
            106 | 
                                                        //   memory when doing a large recordset query
  | 
          
          
            | 101 | 
                                            // (e.g. search indexing). Default is 100000.
  | 
            107 | 
                                                        //   (e.g. search indexing). Default is 100000.
  | 
          
          
            | 102 | 
                                            // Uncomment and set to a value to change it,
  | 
            108 | 
                                                        //   Uncomment and set to a value to change it,
  | 
          
          
            | 103 | 
                                            // or zero to turn off the limit. You need to
  | 
            109 | 
                                                        //   or zero to turn off the limit. You need to
  | 
          
          
            | 104 | 
                                            // set to zero if you are using pg_bouncer in
  | 
            110 | 
                                                        //   set to zero if you are using pg_bouncer in
  | 
          
          
            | 105 | 
                                            // 'transaction' mode (it is fine in 'session'
  | 
            111 | 
                                                        //   'transaction' mode (it is fine in 'session'
  | 
          
          
            | 106 | 
                                            // mode).
  | 
            112 | 
                                                        //   mode).
  | 
          
          
            | 107 | 
                // 'clientcompress' => true // Use compression protocol to communicate with the database server.
  | 
            113 | 
                // 'clientcompress' => true             // Use compression protocol to communicate with the database server.
  | 
          
          
            | 108 | 
                                            // Decreases traffic from the database server.
  | 
            114 | 
                                                        //   Decreases traffic from the database server.
  | 
          
          
            | 109 | 
                                            // Not needed if the databse is on the same host.
  | 
            115 | 
                                                        //   Not needed if the databse is on the same host.
  | 
          
          
            | - | 
               | 
            116 | 
                                                        //   Currently supported only with mysqli, mariadb, and aurora drivers.
  | 
          
          
            | - | 
               | 
            117 | 
                // 'connecttimeout' => null,            // Set connect timeout in seconds. Not all drivers support it.
  | 
          
          
            | - | 
               | 
            118 | 
                // 'logall' => false,                   // Log all queries to the database. They are stored in the table log_queries.
  | 
          
          
            | - | 
               | 
            119 | 
                // 'logslow' => 0,                      // Log slow queries to the database. They are stored in the table log_queries.
  | 
          
          
            | - | 
               | 
            120 | 
                                                        //   This parameter controls the threshold in milliseconds and requires an integer,
  | 
          
          
            | - | 
               | 
            121 | 
                                                        //   not a string!
  | 
          
          
            | - | 
               | 
            122 | 
                // 'logerror' => false,                 // Log erroneous queries to the database. They are stored in the table log_queries.
  | 
          
          
            | - | 
               | 
            123 | 
                // 'bulkinsertsize' => null,            // Set the bulk insert size for database operations. MySQL has a relatively small
  | 
          
          
            | - | 
               | 
            124 | 
                                                        //   query length limit by default, make sure 'max_allowed_packet' in my.cnf is
  | 
          
          
            | - | 
               | 
            125 | 
                                                        //   high enough if you set this setting.
  | 
          
          
            | - | 
               | 
            126 | 
                // 'readonly' => [                      // Set to read-only replica details, to get safe reads
  | 
          
          
            | - | 
               | 
            127 | 
                                                        //   from there instead of the primary node. Optional.
  | 
          
          
            | - | 
               | 
            128 | 
                                                        //   Currently supported by pgsql and mysqli variety classes.
  | 
          
          
            | - | 
               | 
            129 | 
                                                        //   If not supported silently ignored.
  | 
          
          
            | - | 
               | 
            130 | 
                //  'instance' => [                     // Readonly replica connection parameters
  | 
          
          
            | - | 
               | 
            131 | 
                //    [
  | 
          
          
            | - | 
               | 
            132 | 
                //      'dbhost' => 'replica.dbhost',
  | 
          
          
            | - | 
               | 
            133 | 
                //      'dbport' => '',                 // Defaults to primary port
  | 
          
          
            | - | 
               | 
            134 | 
                //      'dbuser' => '',                 // Defaults to primary user
  | 
          
          
            | - | 
               | 
            135 | 
                //      'dbpass' => '',                 // Defaults to primary password
  | 
          
          
            | - | 
               | 
            136 | 
                //    ],
  | 
          
          
            | - | 
               | 
            137 | 
                //    [...],
  | 
          
          
            | 110 | 
                                            // Currently supported only with mysqli, mariadb, and aurora drivers.
  | 
            138 | 
                //  ],
  | 
          
          
            | 111 | 
                /*
  | 
            - | 
               | 
          
          
            | 112 | 
                'connecttimeout' => null, // Set connect timeout in seconds. Not all drivers support it.
  | 
            - | 
               | 
          
          
            | 113 | 
                'readonly' => [          // Set to read-only slave details, to get safe reads
  | 
            - | 
               | 
          
          
            | 114 | 
                                         // from there instead of the master node. Optional.
  | 
            - | 
               | 
          
          
            | 115 | 
                                         // Currently supported by pgsql and mysqli variety classes.
  | 
            - | 
               | 
          
          
            | 116 | 
                                         // If not supported silently ignored.
  | 
            - | 
               | 
          
          
            | 117 | 
                  'instance' => [        // Readonly slave connection parameters
  | 
            - | 
               | 
          
          
            | 118 | 
                    [
  | 
            - | 
               | 
          
          
            | 119 | 
                      'dbhost' => 'slave.dbhost',
  | 
            - | 
               | 
          
          
            | 120 | 
                      'dbport' => '',    // Defaults to master port
  | 
            - | 
               | 
          
          
            | 121 | 
                      'dbuser' => '',    // Defaults to master user
  | 
            - | 
               | 
          
          
            | 122 | 
                      'dbpass' => '',    // Defaults to master password
  | 
            - | 
               | 
          
          
            | 123 | 
                    ],
  | 
            - | 
               | 
          
          
            | 124 | 
                    [...],
  | 
            - | 
               | 
          
          
            | 125 | 
                  ],
  | 
            - | 
               | 
          
          
            | 126 | 
             
  | 
            139 | 
                /*
  | 
          
          
            | - | 
               | 
            140 | 
                Instance(s) can alternatively be specified as:
  | 
          
          
            | - | 
               | 
            141 | 
                  'instance' => 'replica.dbhost',
  | 
          
          
            | - | 
               | 
            142 | 
                  'instance' => ['replica.dbhost1', 'replica.dbhost2'],
  | 
          
          
            | Línea 127... | 
            Línea -... | 
          
          
            | 127 | 
                Instance(s) can alternatively be specified as:
  | 
            - | 
               | 
          
          
            | 128 | 
             
  | 
            - | 
               | 
          
          
            | 129 | 
                  'instance' => 'slave.dbhost',
  | 
            - | 
               | 
          
          
            | 130 | 
                  'instance' => ['slave.dbhost1', 'slave.dbhost2'],
  | 
            - | 
               | 
          
          
            | 131 | 
                  'instance' => ['dbhost' => 'slave.dbhost', 'dbport' => '', 'dbuser' => '', 'dbpass' => ''],
  | 
            143 | 
                  'instance' => ['dbhost' => 'replica.dbhost', 'dbport' => '', 'dbuser' => '', 'dbpass' => ''],
  | 
          
          
            | 132 | 
             
  | 
            144 | 
             
  | 
          
          
            | 133 | 
                  'connecttimeout' => 2, // Set read-only slave connect timeout in seconds. See above.
  | 
            145 | 
                  'connecttimeout' => 2, // Set read-only replica connect timeout in seconds. See above.
  | 
          
          
            | 134 | 
                  'latency' => 0.5,      // Set read-only slave sync latency in seconds.
  | 
            146 | 
                  'latency' => 0.5,      // Set read-only replica sync latency in seconds.
  | 
          
          
            | 135 | 
                                         // When 'latency' seconds have lapsed after an update to a table
  | 
            147 | 
                                         // When 'latency' seconds have lapsed after an update to a table
  | 
          
          
            | 136 | 
                                         // it is deemed safe to use readonly slave for reading from the table.
  | 
            148 | 
                                         // it is deemed safe to use readonly replica for reading from the table.
  | 
          
          
            | 137 | 
                                         // It is optional, defaults to 1 second. If you want once written to a table
  | 
            149 | 
                                         // It is optional, defaults to 1 second. If you want once written to a table
  | 
          
          
            | 138 | 
                                         // to always use master handle for reading set it to something ridiculosly big,
  | 
            150 | 
                                         // to always use primary handle for reading set it to something ridiculosly big,
  | 
          
          
            | 139 | 
                                         // eg 10.
  | 
            151 | 
                                         // eg 10.
  | 
          
          
            | 140 | 
                                         // Lower values increase the performance, but setting it too low means
  | 
            152 | 
                                         // Lower values increase the performance, but setting it too low means
  | 
          
          
            | 141 | 
                                         // missing the master-slave sync.
  | 
            153 | 
                                         // missing the primary-replica sync.
  | 
          
          
            | 142 | 
                  'exclude_tables' => [  // Tables to exclude from read-only slave feature.
  | 
            154 | 
                  'exclude_tables' => [  // Tables to exclude from read-only replica feature.
  | 
          
          
            | 143 | 
                      'table1',          // Should not be used, unless in rare cases when some area of the system
  | 
            155 | 
                      'table1',          // Should not be used, unless in rare cases when some area of the system
  | 
          
          
            | Línea 144... | 
            Línea 156... | 
          
          
            | 144 | 
                      'table2',          // is malfunctioning and you still want to use readonly feature.
  | 
            156 | 
                      'table2',          // is malfunctioning and you still want to use readonly feature.
  | 
          
          
            | 145 | 
                  ],                     // Then one can exclude offending tables while investigating.
  | 
            157 | 
                  ],                     // Then one can exclude offending tables while investigating.
  | 
          
          
            | 146 | 
             
  | 
            158 | 
             
  | 
          
          
            | 147 | 
                More info available in lib/dml/moodle_read_slave_trait.php where the feature is implemented.
  | 
            - | 
               | 
          
          
            | 148 | 
                ]
  | 
            159 | 
                More info available in lib/dml/moodle_read_replica_trait.php where the feature is implemented.
  | 
          
          
            | Línea 149... | 
            Línea 160... | 
          
          
            | 149 | 
                 */
  | 
            160 | 
                ]
  | 
          
          
            | 150 | 
            // For all database config settings see https://docs.moodle.org/en/Database_settings
  | 
            161 | 
                */
  | 
          
          
            | 151 | 
            );
  | 
            162 | 
            ];
  | 
          
          
            | Línea 178... | 
            Línea 189... | 
          
          
            | 178 | 
            //
  | 
            189 | 
            //
  | 
          
          
            | 179 | 
            // - On Windows systems you might specify something like 'c:\moodledata'
  | 
            190 | 
            // - On Windows systems you might specify something like 'c:\moodledata'
  | 
          
          
            | Línea 180... | 
            Línea 191... | 
          
          
            | 180 | 
             
  | 
            191 | 
             
  | 
          
          
            | Línea -... | 
            Línea 192... | 
          
          
            | - | 
               | 
            192 | 
            $CFG->dataroot  = '/home/example/moodledata';
  | 
          
          
            | - | 
               | 
            193 | 
             
  | 
          
          
            | - | 
               | 
            194 | 
            // Whether the Moodle router is fully configured.
  | 
          
          
            | - | 
               | 
            195 | 
            //
  | 
          
          
            | - | 
               | 
            196 | 
            // From Moodle 4.5 this is set to false.
  | 
          
          
            | - | 
               | 
            197 | 
            // The default value will change in a future release.
  | 
          
          
            | - | 
               | 
            198 | 
            //
  | 
          
          
            | - | 
               | 
            199 | 
            // When not configured on the web server it must be accessed via https://example.com/moodle/r.php
  | 
          
          
            | Línea 181... | 
            Línea 200... | 
          
          
            | 181 | 
            $CFG->dataroot  = '/home/example/moodledata';
  | 
            200 | 
            // When configured the on the web server the 'r.php' may be removed.
  | 
          
          
            | 182 | 
             
  | 
            201 | 
            $CFG->routerconfigured = false;
  | 
          
          
            | 183 | 
             
  | 
            202 | 
             
  | 
          
          
            | 184 | 
            //=========================================================================
  | 
            203 | 
            //=========================================================================
  | 
          
          
            | Línea 326... | 
            Línea 345... | 
          
          
            | 326 | 
            // Some servers may need a special rewrite rule to work around internal path length limitations:
  | 
            345 | 
            // Some servers may need a special rewrite rule to work around internal path length limitations:
  | 
          
          
            | 327 | 
            // RewriteRule (^.*/theme/yui_combo\.php)(/.*) $1?file=$2
  | 
            346 | 
            // RewriteRule (^.*/theme/yui_combo\.php)(/.*) $1?file=$2
  | 
          
          
            | 328 | 
            //
  | 
            347 | 
            //
  | 
          
          
            | 329 | 
            //
  | 
            348 | 
            //
  | 
          
          
            | 330 | 
            // Following settings may be used to select session driver, uncomment only one of the handlers.
  | 
            349 | 
            // Following settings may be used to select session driver, uncomment only one of the handlers.
  | 
          
          
            | 331 | 
            //   Database session handler (not compatible with MyISAM):
  | 
            350 | 
            //   Database session handler:
  | 
          
          
            | 332 | 
            //      $CFG->session_handler_class = '\core\session\database';
  | 
            351 | 
            //      $CFG->session_handler_class = '\core\session\database';
  | 
          
          
            | 333 | 
            //      $CFG->session_database_acquire_lock_timeout = 120;
  | 
            352 | 
            //      $CFG->session_database_acquire_lock_timeout = 120;
  | 
          
          
            | 334 | 
            //
  | 
            353 | 
            //
  | 
          
          
            | 335 | 
            //   File session handler (file system locking required):
  | 
            354 | 
            //   File session handler (file system locking required):
  | 
          
          
            | 336 | 
            //      $CFG->session_handler_class = '\core\session\file';
  | 
            355 | 
            //      $CFG->session_handler_class = '\core\session\file';
  | 
          
          
            | Línea 360... | 
            Línea 379... | 
          
          
            | 360 | 
            //      $CFG->session_redis_acquire_lock_timeout = 120;      // Default is 2 minutes.
  | 
            379 | 
            //      $CFG->session_redis_acquire_lock_timeout = 120;      // Default is 2 minutes.
  | 
          
          
            | 361 | 
            //      $CFG->session_redis_acquire_lock_warn = 0;           // If set logs early warning if a lock has not been acquried.
  | 
            380 | 
            //      $CFG->session_redis_acquire_lock_warn = 0;           // If set logs early warning if a lock has not been acquried.
  | 
          
          
            | 362 | 
            //      $CFG->session_redis_lock_expire = 7200;              // Optional, defaults to session timeout.
  | 
            381 | 
            //      $CFG->session_redis_lock_expire = 7200;              // Optional, defaults to session timeout.
  | 
          
          
            | 363 | 
            //      $CFG->session_redis_lock_retry = 100;                // Optional wait between lock attempts in ms, default is 100.
  | 
            382 | 
            //      $CFG->session_redis_lock_retry = 100;                // Optional wait between lock attempts in ms, default is 100.
  | 
          
          
            | 364 | 
            //                                                           // After 5 seconds it will throttle down to once per second.
  | 
            383 | 
            //                                                           // After 5 seconds it will throttle down to once per second.
  | 
          
          
            | - | 
               | 
            384 | 
            //      $CFG->session_redis_connection_timeout = 3;          // Optional, default is 3.
  | 
          
          
            | - | 
               | 
            385 | 
            //      $CFG->session_redis_maxretries = 3;                  // Optional, default is 3.
  | 
          
          
            | 365 | 
            //
  | 
            386 | 
            //
  | 
          
          
            | 366 | 
            //      Use the igbinary serializer instead of the php default one. Note that phpredis must be compiled with
  | 
            387 | 
            //      Use the igbinary serializer instead of the php default one. Note that phpredis must be compiled with
  | 
          
          
            | 367 | 
            //      igbinary support to make the setting to work. Also, if you change the serializer you have to flush the database!
  | 
            388 | 
            //      igbinary support to make the setting to work. Also, if you change the serializer you have to flush the database!
  | 
          
          
            | 368 | 
            //      $CFG->session_redis_serializer_use_igbinary = false; // Optional, default is PHP builtin serializer.
  | 
            389 | 
            //      $CFG->session_redis_serializer_use_igbinary = false; // Optional, default is PHP builtin serializer.
  | 
          
          
            | 369 | 
            //      $CFG->session_redis_compressor = 'none';             // Optional, possible values are:
  | 
            390 | 
            //      $CFG->session_redis_compressor = 'none';             // Optional, possible values are:
  | 
          
          
            | Línea 595... | 
            Línea 616... | 
          
          
            | 595 | 
            // will be sent to supportemail.
  | 
            616 | 
            // will be sent to supportemail.
  | 
          
          
            | 596 | 
            //      $CFG->supportuserid = -20;
  | 
            617 | 
            //      $CFG->supportuserid = -20;
  | 
          
          
            | 597 | 
            //
  | 
            618 | 
            //
  | 
          
          
            | 598 | 
            // Moodle 2.7 introduces a locking api for critical tasks (e.g. cron).
  | 
            619 | 
            // Moodle 2.7 introduces a locking api for critical tasks (e.g. cron).
  | 
          
          
            | 599 | 
            // The default locking system to use is DB locking for Postgres, MySQL, MariaDB and
  | 
            620 | 
            // The default locking system to use is DB locking for Postgres, MySQL, MariaDB and
  | 
          
          
            | 600 | 
            // file locking for Oracle and SQLServer. If $CFG->preventfilelocking is set, then the
  | 
            621 | 
            // file locking for SQLServer. If $CFG->preventfilelocking is set, then the
  | 
          
          
            | 601 | 
            // default will always be DB locking. It can be manually set to one of the lock
  | 
            622 | 
            // default will always be DB locking. It can be manually set to one of the lock
  | 
          
          
            | 602 | 
            // factory classes listed below, or one of your own custom classes implementing the
  | 
            623 | 
            // factory classes listed below, or one of your own custom classes implementing the
  | 
          
          
            | 603 | 
            // \core\lock\lock_factory interface.
  | 
            624 | 
            // \core\lock\lock_factory interface.
  | 
          
          
            | 604 | 
            //
  | 
            625 | 
            //
  | 
          
          
            | 605 | 
            //      $CFG->lock_factory = "auto";
  | 
            626 | 
            //      $CFG->lock_factory = "auto";
  | 
          
          
            | Línea 719... | 
            Línea 740... | 
          
          
            | 719 | 
            //
  | 
            740 | 
            //
  | 
          
          
            | 720 | 
            //      $CFG->enable_read_only_sessions_debug = true;
  | 
            741 | 
            //      $CFG->enable_read_only_sessions_debug = true;
  | 
          
          
            | 721 | 
            //
  | 
            742 | 
            //
  | 
          
          
            | 722 | 
            // Uninstall plugins from CLI only. This stops admins from uninstalling plugins from the graphical admin
  | 
            743 | 
            // Uninstall plugins from CLI only. This stops admins from uninstalling plugins from the graphical admin
  | 
          
          
            | 723 | 
            // user interface, and forces plugins to be uninstalled from the Command Line tool only, found at
  | 
            744 | 
            // user interface, and forces plugins to be uninstalled from the Command Line tool only, found at
  | 
          
          
            | 724 | 
            // admin/cli/plugin_uninstall.php.
  | 
            745 | 
            // admin/cli/uninstall_plugins.php.
  | 
          
          
            | 725 | 
            //
  | 
            746 | 
            //
  | 
          
          
            | 726 | 
            //      $CFG->uninstallclionly = true;
  | 
            747 | 
            //      $CFG->uninstallclionly = true;
  | 
          
          
            | 727 | 
            //
  | 
            748 | 
            //
  | 
          
          
            | 728 | 
            // Course and category sorting
  | 
            749 | 
            // Course and category sorting
  | 
          
          
            | 729 | 
            //
  | 
            750 | 
            //
  | 
          
          
            | Línea 771... | 
            Línea 792... | 
          
          
            | 771 | 
            // where the user is re-authenticated on every request. Set it to 0 to force enrollment checking constantly
  | 
            792 | 
            // where the user is re-authenticated on every request. Set it to 0 to force enrollment checking constantly
  | 
          
          
            | 772 | 
            // and increase this number to improve performance at the cost of adding a latency for enrollment updates.
  | 
            793 | 
            // and increase this number to improve performance at the cost of adding a latency for enrollment updates.
  | 
          
          
            | 773 | 
            // Defaults to 60 minutes.
  | 
            794 | 
            // Defaults to 60 minutes.
  | 
          
          
            | 774 | 
            //
  | 
            795 | 
            //
  | 
          
          
            | 775 | 
            //      $CFG->enrolments_sync_interval = 3600
  | 
            796 | 
            //      $CFG->enrolments_sync_interval = 3600
  | 
          
          
            | - | 
               | 
            797 | 
            //
  | 
          
          
            | - | 
               | 
            798 | 
            // Stored progress polling interval
  | 
          
          
            | 776 | 
             
  | 
            799 | 
            //
  | 
          
          
            | - | 
               | 
            800 | 
            // Stored progress bars which can be polled for updates via AJAX can be controlled by the
  | 
          
          
            | - | 
               | 
            801 | 
            // `progresspollinterval` config setting, to determine the interval (in seconds) at which the
  | 
          
          
            | - | 
               | 
            802 | 
            // polling should be done and latest update retrieved.
  | 
          
          
            | - | 
               | 
            803 | 
            // If no value is set, then it will default to 5 seconds.
  | 
          
          
            | - | 
               | 
            804 | 
            //
  | 
          
          
            | - | 
               | 
            805 | 
            //      $CFG->progresspollinterval = 5;
  | 
          
          
            | - | 
               | 
            806 | 
            //
  | 
          
          
            | - | 
               | 
            807 | 
            // Default question bank module
  | 
          
          
            | - | 
               | 
            808 | 
            //
  | 
          
          
            | - | 
               | 
            809 | 
            //      $CFG->corequestion_defaultqbankmod = 'qbank'
  | 
          
          
            | - | 
               | 
            810 | 
            //
  | 
          
          
            | - | 
               | 
            811 | 
            // Question banks are only stored at activity module context and this setting defines which module type will
  | 
          
          
            | - | 
               | 
            812 | 
            // be used for creating question banks by default. This is in circumstances such as quiz backup & restores when
  | 
          
          
            | - | 
               | 
            813 | 
            // no target context can be found and the system needs to create a question bank to store the categories and questions.
  | 
          
          
            | - | 
               | 
            814 | 
            //
  | 
          
          
            | - | 
               | 
            815 | 
            // Set limit for grade items that can be shown on a single page of the grader
  | 
          
          
            | - | 
               | 
            816 | 
            // report. Browsers struggle when the number of grade items is very large and
  | 
          
          
            | - | 
               | 
            817 | 
            // one tries to view all students.
  | 
          
          
            | - | 
               | 
            818 | 
            //
  | 
          
          
            | - | 
               | 
            819 | 
            //      $CFG->maxgradesperpage = 200000;
  | 
          
          
            | - | 
               | 
            820 | 
            //
  | 
          
          
            | - | 
               | 
            821 | 
            //
  | 
          
          
            | 777 | 
            //=========================================================================
  | 
            822 | 
            //=========================================================================
  | 
          
          
            | 778 | 
            // 7. SETTINGS FOR DEVELOPMENT SERVERS - not intended for production use!!!
  | 
            823 | 
            // 7. SETTINGS FOR DEVELOPMENT SERVERS - not intended for production use!!!
  | 
          
          
            | 779 | 
            //=========================================================================
  | 
            824 | 
            //=========================================================================
  | 
          
          
            | 780 | 
            //
  | 
            825 | 
            //
  | 
          
          
            | 781 | 
            // Force a debugging mode regardless the settings in the site administration
  | 
            826 | 
            // Force a debugging mode regardless the settings in the site administration
  | 
          
          
            | 782 | 
            // @error_reporting(E_ALL | E_STRICT); // NOT FOR PRODUCTION SERVERS!
  | 
            827 | 
            // @error_reporting(E_ALL); // NOT FOR PRODUCTION SERVERS!
  | 
          
          
            | 783 | 
            // @ini_set('display_errors', '1');    // NOT FOR PRODUCTION SERVERS!
  | 
            828 | 
            // @ini_set('display_errors', '1');    // NOT FOR PRODUCTION SERVERS!
  | 
          
          
            | 784 | 
            // $CFG->debug = (E_ALL | E_STRICT);   // === DEBUG_DEVELOPER - NOT FOR PRODUCTION SERVERS!
  | 
            829 | 
            // $CFG->debug = (E_ALL);   // === DEBUG_DEVELOPER - NOT FOR PRODUCTION SERVERS!
  | 
          
          
            | 785 | 
            // $CFG->debugdisplay = 1;             // NOT FOR PRODUCTION SERVERS!
  | 
            830 | 
            // $CFG->debugdisplay = 1;             // NOT FOR PRODUCTION SERVERS!
  | 
          
          
            | 786 | 
            //
  | 
            831 | 
            //
  | 
          
          
            | 787 | 
            // Display exceptions using the 'pretty' Whoops! utility.
  | 
            832 | 
            // Display exceptions using the 'pretty' Whoops! utility.
  | 
          
          
            | 788 | 
            // This is only used when the following conditions are met:
  | 
            833 | 
            // This is only used when the following conditions are met:
  | 
          
          
            | 789 | 
            // - Composer dependencies are installed
  | 
            834 | 
            // - Composer dependencies are installed
  | 
          
          
            | Línea 845... | 
            Línea 890... | 
          
          
            | 845 | 
            //
  | 
            890 | 
            //
  | 
          
          
            | 846 | 
            // Prevent core_string_manager application caching
  | 
            891 | 
            // Prevent core_string_manager application caching
  | 
          
          
            | 847 | 
            // $CFG->langstringcache = false; // NOT FOR PRODUCTION SERVERS!
  | 
            892 | 
            // $CFG->langstringcache = false; // NOT FOR PRODUCTION SERVERS!
  | 
          
          
            | 848 | 
            //
  | 
            893 | 
            //
  | 
          
          
            | 849 | 
            // When working with production data on test servers, no emails or other messages
  | 
            894 | 
            // When working with production data on test servers, no emails or other messages
  | 
          
          
            | 850 | 
            // should ever be send to real users
  | 
            895 | 
            // should ever be sent to real users
  | 
          
          
            | 851 | 
            // $CFG->noemailever = true;    // NOT FOR PRODUCTION SERVERS!
  | 
            896 | 
            // $CFG->noemailever = true;    // NOT FOR PRODUCTION SERVERS!
  | 
          
          
            | 852 | 
            //
  | 
            897 | 
            //
  | 
          
          
            | - | 
               | 
            898 | 
            // To stop sending SMS to users in test servers
  | 
          
          
            | - | 
               | 
            899 | 
            // $CFG->nosmsever = true;    // NOT FOR PRODUCTION SERVERS!
  | 
          
          
            | - | 
               | 
            900 | 
            //
  | 
          
          
            | 853 | 
            // Divert all outgoing emails to this address to test and debug emailing features
  | 
            901 | 
            // Divert all outgoing emails to this address to test and debug emailing features
  | 
          
          
            | 854 | 
            // $CFG->divertallemailsto = 'root@localhost.local'; // NOT FOR PRODUCTION SERVERS!
  | 
            902 | 
            // $CFG->divertallemailsto = 'root@localhost.local'; // NOT FOR PRODUCTION SERVERS!
  | 
          
          
            | 855 | 
            //
  | 
            903 | 
            //
  | 
          
          
            | 856 | 
            // Except for certain email addresses you want to let through for testing. Accepts
  | 
            904 | 
            // Except for certain email addresses you want to let through for testing. Accepts
  | 
          
          
            | 857 | 
            // a comma separated list of regexes.
  | 
            905 | 
            // a comma separated list of regexes.
  | 
          
          
            | Línea 871... | 
            Línea 919... | 
          
          
            | 871 | 
            // $CFG->showcrondebugging = true;
  | 
            919 | 
            // $CFG->showcrondebugging = true;
  | 
          
          
            | 872 | 
            //
  | 
            920 | 
            //
  | 
          
          
            | 873 | 
            // Force result of checks used to determine whether a site is considered "public" or not (such as for site registration).
  | 
            921 | 
            // Force result of checks used to determine whether a site is considered "public" or not (such as for site registration).
  | 
          
          
            | 874 | 
            // $CFG->site_is_public = false;
  | 
            922 | 
            // $CFG->site_is_public = false;
  | 
          
          
            | 875 | 
            //
  | 
            923 | 
            //
  | 
          
          
            | - | 
               | 
            924 | 
            // The mod_subsection feature has been added in 4.5 but is disabled by default. For new 5.0 sites, however, it will be enabled
  | 
          
          
            | - | 
               | 
            925 | 
            // by default. When upgrading from an earlier version to 5.0 or later, mod_subsection will also be enabled unless the
  | 
          
          
            | - | 
               | 
            926 | 
            // 'keepsubsectiondisabled' setting is set to true. In that case, the status of mod_subsection will remain unchanged during the
  | 
          
          
            | - | 
               | 
            927 | 
            // upgrade process.
  | 
          
          
            | - | 
               | 
            928 | 
            // This setting applies only to upgrades from version 4.5 where subsections already exist. It does not affect other upgrades or
  | 
          
          
            | - | 
               | 
            929 | 
            // new installations.
  | 
          
          
            | - | 
               | 
            930 | 
            // Note that the 'keepsubsectiondisabled' setting will be removed in version 6.0. (MDL-83791)
  | 
          
          
            | - | 
               | 
            931 | 
            // $CFG->keepsubsectiondisabled = false;
  | 
          
          
            | - | 
               | 
            932 | 
            //
  | 
          
          
            | 876 | 
            //=========================================================================
  | 
            933 | 
            //=========================================================================
  | 
          
          
            | 877 | 
            // 8. FORCED SETTINGS
  | 
            934 | 
            // 8. FORCED SETTINGS
  | 
          
          
            | 878 | 
            //=========================================================================
  | 
            935 | 
            //=========================================================================
  | 
          
          
            | 879 | 
            // It is possible to specify normal admin settings here, the point is that
  | 
            936 | 
            // It is possible to specify normal admin settings here, the point is that
  | 
          
          
            | 880 | 
            // they can not be changed through the standard admin settings pages any more.
  | 
            937 | 
            // they can not be changed through the standard admin settings pages any more.
  |