Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 106... Línea 106...
106
     *
106
     *
107
     * @param stdClass $user The user to check
107
     * @param stdClass $user The user to check
108
     * @param int|null $groupid The current activity group id
108
     * @param int|null $groupid The current activity group id
109
     * @return bool
109
     * @return bool
110
     */
110
     */
111
    public function can_create_discussions(stdClass $user, int $groupid = null): bool {
111
    public function can_create_discussions(stdClass $user, ?int $groupid = null): bool {
112
        if (isguestuser($user) or !isloggedin()) {
112
        if (isguestuser($user) or !isloggedin()) {
113
            return false;
113
            return false;
114
        }
114
        }
Línea 115... Línea 115...
115
 
115
 
Línea 720... Línea 720...
720
     *
720
     *
721
     * @param stdClass $grader The user grading
721
     * @param stdClass $grader The user grading
722
     * @param stdClass $gradee The user being graded
722
     * @param stdClass $gradee The user being graded
723
     * @return bool
723
     * @return bool
724
     */
724
     */
725
    public function can_grade(stdClass $grader, stdClass $gradee = null): bool {
725
    public function can_grade(stdClass $grader, ?stdClass $gradee = null): bool {
726
        if (!has_capability('mod/forum:grade', $this->get_context(), $grader)) {
726
        if (!has_capability('mod/forum:grade', $this->get_context(), $grader)) {
727
            return false;
727
            return false;
728
        }
728
        }
Línea 729... Línea 729...
729
 
729