Proyectos de Subversion Moodle

Rev

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

Rev 924 Rev 934
Línea 2707... Línea 2707...
2707
 
2707
 
Línea 2708... Línea -...
2708
 
-
 
2709
 
2708
 
2710
        foreach ($sections as $key =>  $section) {
2709
 
2711
 
2710
        foreach ($sections as $key =>  $section) {
Línea 2712... Línea 2711...
2712
 
2711
 
2713
            if (!$section->visible) {
2712
            if (!$section->visible) {
Línea 2714... Línea -...
2714
                continue;
-
 
2715
            }
2713
                continue;
Línea 2716... Línea -...
2716
 
-
 
2717
            $activities = [];
-
 
2718
            $section_active = false;
-
 
2719
 
-
 
2720
 
-
 
2721
            foreach ($modules as $module) {
-
 
2722
 
-
 
2723
                /*
-
 
2724
                                       echo '<pre>';
-
 
2725
                    print_r($module);
-
 
2726
                    echo '</pre>';
-
 
2727
                    // exit;
-
 
2728
                    
-
 
2729
                     */
-
 
2730
 
2714
            }
2731
 
-
 
2732
 
-
 
2733
 
-
 
2734
 
2715
 
2735
 
2716
            $activities = [];
Línea 2736... Línea 2717...
2736
 
2717
            $section_active = false;
2737
                if ($module->section  != $section->id) {
-
 
2738
 
2718
 
2739
 
2719
            foreach ($modules as $module) {
2740
 
2720
 
2741
                    continue;
-
 
2742
                }
-
 
2743
 
-
 
2744
                if (!$module->uservisible || $module->is_stealth()) {
-
 
2745
 
-
 
2746
                    // if (!$module->uservisible || $module->is_stealth() || empty($module->url)) {
-
 
2747
                    continue;
-
 
2748
                }
-
 
2749
                $mods[$module->id] = $module;
-
 
2750
 
-
 
2751
                /*
-
 
2752
                    if($module->instance == 649) {
-
 
Línea -... Línea 2721...
-
 
2721
                if ($module->section  != $section->id) {
Línea 2753... Línea 2722...
2753
                        
2722
                    continue;
2754
                        echo '<pre>';
2723
                }
2755
                        echo 'module->section = '.  $module->section .  ' $section->id = '  . $section->id . "\r\n";
2724
 
Línea 2807... Línea 2776...
2807
                            }
2776
                            }
2808
                        }
2777
                        }
2809
                    }
2778
                    }
2810
                }
2779
                }
Línea 2811... Línea -...
2811
 
-
 
2812
 
-
 
2813
 
2780
 
-
 
2781
                $modname = $module->get_formatted_name();
2814
                $modname = $module->get_formatted_name();
2782
 
2815
                if (empty($module->url)) {
2783
                if (empty($module->url)) {
2816
                    $linkurl = '';
2784
                    $linkurl = '';
2817
                    $currentLink = '';
2785
                    $currentLink = '';
Línea 2826... Línea 2794...
2826
                    } else {
2794
                    } else {
2827
                        $currentLink = $linkurl;
2795
                        $currentLink = $linkurl;
2828
                    }
2796
                    }
2829
                }
2797
                }
Línea 2830... Línea -...
2830
 
-
 
2831
 
-
 
2832
 
-
 
2833
 
-
 
2834
 
2798
 
Línea 2835... Línea -...
2835
                $completiondata = $completioninfo->get_data($module, true);
-
 
2836
 
2799
                $completiondata = $completioninfo->get_data($module, true);
2837
 
2800
 
2838
                if (strcasecmp($currentLink,  $currentServerLink) == 0) {
2801
                if (strcasecmp($currentLink,  $currentServerLink) == 0) {
2839
                    $active = true;
2802
                    $active = true;
2840
                    $section_active = true;
2803
                    $section_active = true;
Línea 2852... Línea 2815...
2852
                    'duration' => $duration,
2815
                    'duration' => $duration,
2853
                    'type' =>  $type,
2816
                    'type' =>  $type,
2854
                    'completed' => $completiondata->completionstate == COMPLETION_COMPLETE || $completiondata->completionstate == COMPLETION_COMPLETE_PASS,
2817
                    'completed' => $completiondata->completionstate == COMPLETION_COMPLETE || $completiondata->completionstate == COMPLETION_COMPLETE_PASS,
2855
                    'url' => $linkurl,
2818
                    'url' => $linkurl,
Línea 2856... Línea -...
2856
 
-
 
2857
 
2819
 
2858
                ]);
2820
                ]);
Línea 2859... Línea 2821...
2859
            }
2821
            }
Línea 2869... Línea 2831...
2869
                }
2831
                }
Línea 2870... Línea 2832...
2870
 
2832
 
2871
                array_push($menu, [
2833
                array_push($menu, [
2872
                    'active' => $section_active,
2834
                    'active' => $section_active,
-
 
2835
                    'indexElement' => $key,
2873
                    'indexElement' => $key,
2836
                    'id' => $section->id,
2874
                    'numberOfTemary' => $numberOfTemary,
2837
                    'numberOfTemary' => $numberOfTemary,
2875
                    'section' => true,
2838
                    'section' => true,
2876
                    'name' => $this->substr_cesa_navigation_course_menu_name($sectionname),
2839
                    'name' => $this->substr_cesa_navigation_course_menu_name($sectionname),
2877
                    'close_section_parent' => $section->close_section_parent,
2840
                    'close_section_parent' => $section->close_section_parent,