| 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) {
  | 
            279 | 
            function block_point_view_require_edit_form_javascript($blockcontextid, $formpage = null) {
  | 
          
          
            | 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 -... | 
            Línea 287... | 
          
          
            | - | 
               | 
            287 | 
             
  | 
          
          
            | - | 
               | 
            288 | 
                $params = [ $envconf, $trackcolors ];
  | 
          
          
            | 287 | 
             
  | 
            289 | 
             
  | 
          
          
            | 288 | 
                $params = [ $envconf, $trackcolors ];
  | 
            290 | 
                $jspage = $formpage ?? $PAGE;
  | 
          
          
            | 289 | 
             
  | 
            291 | 
             
  | 
          
          
            | 290 | 
                $PAGE->requires->js_call_amd('block_point_view/script_config_point_view', 'init', $params);
  | 
            292 | 
                $jspage->requires->js_call_amd('block_point_view/script_config_point_view', 'init', $params);
  | 
          
          
            | 291 | 
                $PAGE->requires->string_for_js('resetreactionsconfirmation', 'block_point_view', format_string($COURSE->fullname));
  | 
            293 | 
                $jspage->requires->string_for_js('resetreactionsconfirmation', 'block_point_view', format_string($COURSE->fullname));
  | 
          
          
            | 292 | 
                $PAGE->requires->string_for_js('cleanupreactionsconfirmation', 'block_point_view', format_string($COURSE->fullname));
  | 
            294 | 
                $jspage->requires->string_for_js('cleanupreactionsconfirmation', 'block_point_view', format_string($COURSE->fullname));
  | 
          
          
            | 293 | 
                $PAGE->requires->strings_for_js([
  | 
            295 | 
                $jspage->requires->strings_for_js([
  | 
          
          
            | 294 | 
                                                        'deleteemojiconfirmation',
  | 
            296 | 
                                                        'deleteemojiconfirmation',
  | 
          
          
            | 295 | 
                                                        'reactionsresetsuccessfully',
  | 
            297 | 
                                                        'reactionsresetsuccessfully',
  | 
          
          
            | 296 | 
                                                        'reactionscleanedupsuccessfully',
  | 
            298 | 
                                                        '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 | 
             */
  | 
          
          
            | 297 | 
                                                        'resetreactionsonmoduleconfirmation',
  | 
            309 | 
            function block_point_view_show_in_subcontexts($blockinstanceid) {
  |