Proyectos de Subversion Moodle

Rev

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

Rev 1132 Rev 1133
Línea 223... Línea 223...
223
 
223
 
224
            return true;
224
            return true;
Línea 225... Línea 225...
225
        });
225
        });
226
 
226
 
227
        usort($mycourses, function ($a, $b) {
227
        usort($mycourses, function ($a, $b) {
228
            
228
 
229
            if($a->timecreated == $b->timecreated) { 
229
            if ($a->timecreated == $b->timecreated) {
230
                return $a->fullname <=> $b->fullname;
230
                return $a->fullname <=> $b->fullname;
231
            } else { 
231
            } else {
232
                return $a->timecreated > $b->timecreated ? -1 : 1; 
232
                return $a->timecreated > $b->timecreated ? -1 : 1;
Línea 233... Línea 233...
233
            }
233
            }
234
        });
234
        });
Línea 239... Línea 239...
239
         */
239
         */
Línea 240... Línea 240...
240
 
240
 
241
        $total_courses = count($mycourses);
241
        $total_courses = count($mycourses);
242
        $total_pages = ceil($total_courses / $perpage);
242
        $total_pages = ceil($total_courses / $perpage);
243
        if ($total_pages * $perpage < $total_courses) {
243
        if ($total_pages * $perpage < $total_courses) {
244
            $total_pages ++;
244
            $total_pages++;
Línea 245... Línea 245...
245
        }
245
        }
Línea 246... Línea 246...
246
 
246
 
Línea 316... Línea 316...
316
                    break;
316
                    break;
317
                }
317
                }
318
            }
318
            }
Línea 319... Línea 319...
319
 
319
 
320
            if (has_capability('moodle/course:manageactivities', $course_context, $USER->id) || has_capability('moodle/course:viewhiddenactivities', $course_context, $USER->id) || $completion_edit_curso) {
320
            if (has_capability('moodle/course:manageactivities', $course_context, $USER->id) || has_capability('moodle/course:viewhiddenactivities', $course_context, $USER->id) || $completion_edit_curso) {
321
                $editurl = $CFG->wwwroot . '/course/view.php?id=' . $course->id . '&notifyeditingon=1';
321
                $editurl = $CFG->wwwroot . '/course/edit.php?id=' . $course->id;
322
            } else {
322
            } else {
323
                $editurl = '';
323
                $editurl = '';
Línea 324... Línea 324...
324
            }
324
            }