Proyectos de Subversion Moodle

Rev

Rev 4 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 4 Rev 5
Línea 274... Línea 274...
274
/**
274
/**
275
 * Call all required javascript for edit_form.
275
 * Call all required javascript for edit_form.
276
 *
276
 *
277
 * @param int $blockcontextid Context id of the block.
277
 * @param int $blockcontextid Context id of the block.
278
 */
278
 */
279
function block_point_view_require_edit_form_javascript($blockcontextid, $formpage = null) {
279
function block_point_view_require_edit_form_javascript($blockcontextid) {
280
    global $COURSE, $PAGE;
280
    global $COURSE, $PAGE;
281
    $envconf = [
281
    $envconf = [
282
            'courseid' => $COURSE->id,
282
            'courseid' => $COURSE->id,
283
            'contextid' => $blockcontextid,
283
            'contextid' => $blockcontextid,
284
    ];
284
    ];
Línea 285... Línea 285...
285
 
285
 
Línea 286... Línea 286...
286
    $trackcolors = block_point_view_get_track_colors();
286
    $trackcolors = block_point_view_get_track_colors();
Línea 287... Línea -...
287
 
-
 
288
    $params = [ $envconf, $trackcolors ];
-
 
289
 
287
 
290
    $jspage = $formpage ?? $PAGE;
288
    $params = [ $envconf, $trackcolors ];
291
 
289
 
292
    $jspage->requires->js_call_amd('block_point_view/script_config_point_view', 'init', $params);
290
    $PAGE->requires->js_call_amd('block_point_view/script_config_point_view', 'init', $params);
293
    $jspage->requires->string_for_js('resetreactionsconfirmation', 'block_point_view', format_string($COURSE->fullname));
291
    $PAGE->requires->string_for_js('resetreactionsconfirmation', 'block_point_view', format_string($COURSE->fullname));
294
    $jspage->requires->string_for_js('cleanupreactionsconfirmation', 'block_point_view', format_string($COURSE->fullname));
292
    $PAGE->requires->string_for_js('cleanupreactionsconfirmation', 'block_point_view', format_string($COURSE->fullname));
295
    $jspage->requires->strings_for_js([
293
    $PAGE->requires->strings_for_js([
296
                                            'deleteemojiconfirmation',
294
                                            'deleteemojiconfirmation',
297
                                            'reactionsresetsuccessfully',
295
                                            'reactionsresetsuccessfully',
298
                                            'reactionscleanedupsuccessfully',
296
                                            'reactionscleanedupsuccessfully',
299
                                            'resetreactionsonmoduleconfirmation',
-
 
300
                                    ], 'block_point_view');
-
 
301
    $jspage->requires->strings_for_js([ 'ok', 'info' ], 'moodle');
-
 
302
}
-
 
303
 
-
 
304
/**
-
 
305
 * Change where this block appears to display it in subcontexts (especially course module pages).
-
 
306
 *
-
 
307
 * @param int $blockinstanceid Block instance ID.
-
 
308
 */
-
 
309
function block_point_view_show_in_subcontexts($blockinstanceid) {
297
                                            'resetreactionsonmoduleconfirmation',