Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 231... Línea 231...
231
    public function check_configuration(): array {
231
    public function check_configuration(): array {
232
        global $CFG, $DB;
232
        global $CFG, $DB;
Línea 233... Línea 233...
233
 
233
 
234
        $results = [];
234
        $results = [];
235
        // Check Mobile services enabled.
235
        // Check Mobile services enabled.
236
        $summary = html_writer::link((new moodle_url('/admin/settings.php', ['section' => 'mobilesettings'])),
236
        $summary = html_writer::link(new moodle_url('/admin/search.php', ['query' => 'enablemobilewebservice']),
237
                get_string('enablemobilewebservice', 'admin'));
237
                get_string('enablemobilewebservice', 'admin'));
238
        if (empty($CFG->enablewebservices) || empty($CFG->enablemobilewebservice)) {
238
        if (empty($CFG->enablewebservices) || empty($CFG->enablemobilewebservice)) {
239
            $results[] = new core\check\result(core\check\result::CRITICAL, $summary, get_string('enablewsdescription', 'webservice'));
239
            $results[] = new core\check\result(core\check\result::CRITICAL, $summary, get_string('enablewsdescription', 'webservice'));
240
        } else {
240
        } else {
Línea 400... Línea 400...
400
     *
400
     *
401
     * @param  string $appname the app to check
401
     * @param  string $appname the app to check
402
     * @param  int $userid the user to check the devices for (empty for current user)
402
     * @param  int $userid the user to check the devices for (empty for current user)
403
     * @return bool true when the user has enabled devices, false otherwise
403
     * @return bool true when the user has enabled devices, false otherwise
404
     */
404
     */
405
    public function has_enabled_devices(string $appname, int $userid = null): bool {
405
    public function has_enabled_devices(string $appname, ?int $userid = null): bool {
406
        $enableddevices = false;
406
        $enableddevices = false;
407
        $devices = $this->get_user_devices($appname, $userid);
407
        $devices = $this->get_user_devices($appname, $userid);
Línea 408... Línea 408...
408
 
408
 
409
        foreach ($devices as $device) {
409
        foreach ($devices as $device) {