Proyectos de Subversion Moodle

Rev

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

Rev 497 Rev 498
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_records('course_categories', array('id' => $course->category, 'visible' => 1));
28
                $category = $DB->get_record('course_categories', array('id' => $course->category, 'visible' => 1));
-
 
29
                if ($category) {
-
 
30
 
-
 
31
 
29
                if ($category) {
32
 
30
                    array_push($category_ids, $course->category);
-
 
31
                    foreach ($category as $cat) {
33
                    array_push($category_ids, $course->category);
32
                        array_push($categories, [
34
                    array_push($categories, [
33
                            'id' => $cat->id,
35
                        'id' => $category->id,
34
                            'name' => trim($cat->name),
-
 
35
                        ]);
36
                        'name' => trim($category->name),
36
                    }
37
                    ]);
37
                }
38
                }
38
            }
39
            }