Proyectos de Subversion Moodle

Rev

Rev 247 | Rev 262 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 247 Rev 253
Línea 48... Línea 48...
48
 
48
 
49
        if (!$this->user || !core_user::is_real_user($this->userID)) {
49
        if (!$this->user || !core_user::is_real_user($this->userID)) {
50
            throw new moodle_exception('invaliduser', 'error');
50
            throw new moodle_exception('invaliduser', 'error');
Línea 51... Línea 51...
51
        }
51
        }
52
 
52
 
53
        //$PAGE->set_context(context_user::instance($this->userID));
53
        $PAGE->set_context(context_user::instance($this->userID));
-
 
54
        $PAGE->set_pagelayout('mydashboard');
-
 
55
        $PAGE->set_title("{$SITE->shortname}: " . $this->title);
-
 
56
    }
-
 
57
 
-
 
58
    public function __construct_statics_blocks($title, $blockNames, $regionName)
-
 
59
    {
-
 
60
        global $USER, $PAGE, $SITE;
-
 
61
        require_login(null, false);
-
 
62
 
-
 
63
        if (isguestuser()) {
-
 
64
            throw new require_login_exception('Guests are not allowed here.');
-
 
65
        }
-
 
66
 
-
 
67
        $this->userID = optional_param('userid', $USER->id, PARAM_INT);
-
 
68
        $this->currentUser = $this->userID == $USER->id;
-
 
69
        $this->user = core_user::get_user($this->userID);
-
 
70
        $this->title = get_string($title);
-
 
71
        $this->blockManager = $PAGE->blocks;
-
 
72
        $this->regionName = $regionName;
-
 
73
        $this->blockNames = is_array($blockNames) ? $blockNames : [$blockNames];
-
 
74
        $this->blockExists = true;
-
 
75
 
-
 
76
        if (!$this->user || !core_user::is_real_user($this->userID)) {
54
        //$PAGE->set_pagelayout('mydashboard');
77
            throw new moodle_exception('invaliduser', 'error');
Línea 55... Línea 78...
55
        //$PAGE->set_title("{$SITE->shortname}: " . $this->title);
78
        }
56
    }
79
    }
57
 
80