Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 76... Línea 76...
76
     *
76
     *
77
     * @return \moodle_url
77
     * @return \moodle_url
78
     */
78
     */
79
    public function get_url() {
79
    public function get_url() {
80
        $cat = $this->other['newcategoryid'] . ',' . $this->contextid;
80
        $cat = $this->other['newcategoryid'] . ',' . $this->contextid;
81
        if ($this->courseid) {
-
 
82
            if ($this->contextlevel == CONTEXT_MODULE) {
-
 
83
                return new \moodle_url('/question/edit.php',
-
 
84
                        ['cmid' => $this->contextinstanceid, 'cat' => $cat, 'lastchanged' => $this->objectid]);
-
 
85
            }
-
 
86
            return new \moodle_url('/question/edit.php',
-
 
87
                    ['courseid' => $this->courseid, 'cat' => $cat, 'lastchanged' => $this->objectid]);
-
 
88
        }
81
 
89
        // Lets try viewing from the frontpage for contexts above course.
-
 
90
        return new \moodle_url('/question/edit.php',
82
        return new \moodle_url('/question/edit.php',
91
                ['courseid' => SITEID, 'cat' => $cat, 'lastchanged' => $this->objectid]);
83
                ['cmid' => $this->contextinstanceid, 'cat' => $cat, 'lastchanged' => $this->objectid]
-
 
84
        );
92
    }
85
    }
Línea 93... Línea 86...
93
 
86
 
94
    /**
87
    /**
95
     * Custom validations.
88
     * Custom validations.