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->objectid . ',' . $this->contextid;
53
        $cat = $this->objectid . ',' . $this->contextid;
54
        if ($this->courseid) {
-
 
55
            if ($this->contextlevel == CONTEXT_MODULE) {
-
 
-
 
54
 
56
                return new \moodle_url('/question/edit.php', ['cmid' => $this->contextinstanceid, 'cat' => $cat]);
55
        return new \moodle_url('/question/edit.php', ['cmid' => $this->contextinstanceid, 'cat' => $cat]);
57
            }
-
 
58
            return new \moodle_url('/question/edit.php', ['courseid' => $this->courseid, 'cat' => $cat]);
-
 
59
        }
-
 
60
        // Lets try viewing from the frontpage for contexts above course.
-
 
61
        return new \moodle_url('/question/edit.php', ['courseid' => SITEID, 'cat' => $cat, 'edit' => $this->objectid]);
-
 
62
    }
56
    }
Línea 63... Línea 57...
63
 
57
 
64
    /**
58
    /**
65
     * Returns DB mappings used with backup / restore.
59
     * Returns DB mappings used with backup / restore.