Proyectos de Subversion Moodle

Rev

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

Rev 1074 Rev 1075
Línea 234... Línea 234...
234
                    $image = $url_noimage;
234
                    $image = $url_noimage;
235
                }
235
                }
236
            }
236
            }
Línea 237... Línea 237...
237
 
237
 
238
            $lastaccess = null;
238
            $lastaccess = null;
239
            $sql = "select timecreated  from {logstore_standard_log} where courseid  = :courseid and userid  = :userid " .
-
 
240
                "order by id asc";
239
            $sql = "SELECT timecreated FROM {logstore_standard_log} WHERE courseid = :courseid AND userid = :userid ORDER BY timecreated DESC LIMIT :perpage";
241
            $params_a = ['courseid' => $course->id, 'userid' => $userid];
240
            $params_a = ['courseid' => $course->id, 'userid' => $userid];
242
            $timecreated = $DB->get_field_sql($sql,  $params_a);
241
            $timecreated = $DB->get_field_sql($sql,  $params_a);
Línea 243... Línea 242...
243
            if ($timecreated) {
242
            if ($timecreated) {
244
 
243
 
Línea 245... Línea 244...
245
                $lastaccess = date('d/m/Y h:i a', $timecreated);
244
                $lastaccess = date('d/m/Y h:i a', $timecreated);
246
            }
245
            }
Línea 247... Línea 246...
247
 
246
 
248
            $first_section = 0;
247
            $first_section = 0;
249
            $sections = $DB->get_records('course_sections', ['course' => $course->id], 'section DESC', 'id,name,section,sequence,visible');
248
            $sections = $DB->get_records('course_sections', ['course' => $course->id], 'section desc', 'id,name,section,sequence,visible');
250
 
249