Proyectos de Subversion Moodle

Rev

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

Rev 446 Rev 497
Línea 23... Línea 23...
23
            /*
23
            /*
24
             stdClass Object ( [id] => 61 [category] => 13 [sortorder] => 20001 [shortname] => MAS - Diseño de landing pages [fullname] => MAS - Diseño de landing pages [idnumber] => [startdate] => 1645324020 [visible] => 1 [defaultgroupingid] => 0 [groupmode] => 0 [groupmodeforce] => 0 [ctxid] => 1606 [ctxpath] => /1/1005/3521/1606 [ctxdepth] => 4 [ctxlevel] => 50 [ctxinstance] => 61 [ctxlocked] => 0 )
24
             stdClass Object ( [id] => 61 [category] => 13 [sortorder] => 20001 [shortname] => MAS - Diseño de landing pages [fullname] => MAS - Diseño de landing pages [idnumber] => [startdate] => 1645324020 [visible] => 1 [defaultgroupingid] => 0 [groupmode] => 0 [groupmodeforce] => 0 [ctxid] => 1606 [ctxpath] => /1/1005/3521/1606 [ctxdepth] => 4 [ctxlevel] => 50 [ctxinstance] => 61 [ctxlocked] => 0 )
25
             */
25
             */
Línea 26... Línea 26...
26
 
26
 
27
            if (!in_array($course->category, $category_ids)) {
27
            if (!in_array($course->category, $category_ids)) {
28
                $category = $DB->get_record('course_categories', array('id' => $course->category, 'visible' => 1));
28
                $category = $DB->get_records('course_categories', array('id' => $course->category, 'visible' => 1));
29
                if ($category) {
-
 
30
 
-
 
31
 
-
 
32
 
29
                if ($category) {
-
 
30
                    array_push($category_ids, $course->category);
33
                    array_push($category_ids, $course->category);
31
                    foreach ($category as $cat) {
34
                    array_push($categories, [
32
                        array_push($categories, [
35
                        'id' => $category->id,
33
                            'id' => $cat->id,
-
 
34
                            'name' => trim($cat->name),
36
                        'name' => trim($category->name),
35
                        ]);
37
                    ]);
36
                    }
38
                }
37
                }
39
            }
38
            }