Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 49... Línea 49...
49
     *
49
     *
50
     * @return \moodle_url
50
     * @return \moodle_url
51
     */
51
     */
52
    public function get_url() {
52
    public function get_url() {
53
        $cat = $this->other['categoryid'] . ',' . $this->contextid;
53
        $cat = $this->other['categoryid'] . ',' . $this->contextid;
-
 
54
 
54
        if ($this->courseid) {
55
        return new \moodle_url(
55
            if ($this->contextlevel == CONTEXT_MODULE) {
-
 
56
                return new \moodle_url('/question/edit.php',
56
            '/question/edit.php',
57
                        ['cmid' => $this->contextinstanceid, 'cat' => $cat, 'lastchanged' => $this->objectid]);
57
            ['cmid' => $this->contextinstanceid, 'cat' => $cat, 'lastchanged' => $this->objectid]
58
            }
-
 
59
            return new \moodle_url('/question/edit.php',
-
 
60
                    ['courseid' => $this->courseid, 'cat' => $cat, 'lastchanged' => $this->objectid]);
-
 
61
        }
58
        );
62
        // Lets try viewing from the frontpage for contexts above course.
-
 
63
        return new \moodle_url('/question/edit.php',
-
 
64
                ['courseid' => SITEID, 'edit' => $cat, 'lastchanged' => $this->objectid]);
-
 
65
    }
59
    }
Línea 66... Línea 60...
66
 
60
 
67
    /**
61
    /**
68
     * Custom validations.
62
     * Custom validations.