Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 166... Línea 166...
166
            'id' => $cm->id, // We always need the activity id.
166
            'id' => $cm->id, // We always need the activity id.
167
            'forceview' => 1, // Stop file downloads in resources.
167
            'forceview' => 1, // Stop file downloads in resources.
168
        ];
168
        ];
169
        $activityurl = new moodle_url("/mod/$module->name/view.php", $urlparams);
169
        $activityurl = new moodle_url("/mod/$module->name/view.php", $urlparams);
170
        redirect($activityurl);
170
        redirect($activityurl);
-
 
171
    } else if (plugin_supports('mod', $module->name, FEATURE_PUBLISHES_QUESTIONS)) {
-
 
172
        redirect(\core_question\local\bank\question_bank_helper::get_url_for_qbank_list($course->id));
171
    } else {
173
    } else {
172
        $options = [];
174
        $options = [];
173
        if (!is_null($sectionreturn)) {
175
        if (!is_null($sectionreturn)) {
174
            $options['sr'] = $sectionreturn;
176
            $options['sr'] = $sectionreturn;
175
        }
177
        }
Línea 190... Línea 192...
190
    if (isset($fromform->submitbutton)) {
192
    if (isset($fromform->submitbutton)) {
191
        $url = new moodle_url("/mod/$module->name/view.php", array('id' => $fromform->coursemodule, 'forceview' => 1));
193
        $url = new moodle_url("/mod/$module->name/view.php", array('id' => $fromform->coursemodule, 'forceview' => 1));
192
        if (!empty($fromform->showgradingmanagement)) {
194
        if (!empty($fromform->showgradingmanagement)) {
193
            $url = $fromform->gradingman->get_management_url($url);
195
            $url = $fromform->gradingman->get_management_url($url);
194
        }
196
        }
-
 
197
    } else if (plugin_supports('mod', $fromform->modulename, FEATURE_PUBLISHES_QUESTIONS)) {
-
 
198
        $url = \core_question\local\bank\question_bank_helper::get_url_for_qbank_list($course->id);
195
    } else {
199
    } else {
196
        $options = [];
200
        $options = [];
197
        if (!is_null($sectionreturn)) {
201
        if (!is_null($sectionreturn)) {
198
            $options['sr'] = $sectionreturn;
202
            $options['sr'] = $sectionreturn;
199
        }
203
        }
200
        $url = course_get_url($course, $cw->section, $options);
204
        $url = course_get_url($course, $cw->section, $options);
201
    }
205
    }
Línea 202... Línea -...
202
 
-
 
203
    // If we need to regrade the course with a progress bar as a result of updating this module,
-
 
204
    // redirect first to the page that will do this.
-
 
205
    if (isset($fromform->needsfrontendregrade)) {
-
 
206
        $url = new moodle_url('/course/modregrade.php', ['id' => $fromform->coursemodule,
-
 
207
                'url' => $url->out_as_local_url(false)]);
-
 
208
    }
-
 
209
 
206
 
210
    redirect($url);
207
    redirect($url);
Línea 211... Línea 208...
211
    exit;
208
    exit;
212
 
209