NO LOGS FOR STUDENTS

NO LOGS FOR STUDENTS

by Kevin Kimick -
Number of replies: 2

I have a site running on 1.2 dev. I recently noticed there are no logs created for student activity, but there are logs for admins and teacher activity. Does anyone know what the possible problem might be???  Yes...I will be upgrading to a later version soon but don't want the same problem to follow.

Thanx,
Kevin

Average of ratings: -
In reply to Kevin Kimick

Re: NO LOGS FOR STUDENTS

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Well, it's more likely that you'll have problems when using old development versions.  Part of the upgrade to Moodle 1.2.1 from 1.1.1 involves log changes so you may have somehow got mixed up in the middle of that.
In reply to Martin Dougiamas

Re: NO LOGS FOR STUDENTS

by Kevin Kimick -

I have upgraded from 1.2 dev to 1.3 final and went smoothly for the most part. However, in the classes when clicking on 'Participants' the page shows normally but without the list of students. The following error appears at the top:

 Warning: Invalid argument supplied for foreach() in c:\program files\easyphp\www\user\index.php on line 190

Warning: Invalid argument supplied for foreach() in c:\program files\easyphp\www\user\index.php on line 212

The code referred to is this:
line 190 :
  foreach ($students as $key => $student) {
            $students[$key]->country = $countries[$student->country];
        }
        if ($sort == "country") {  // Need to re-sort by full country name, not code
            foreach ($students as $student) {
                $sstudents[$student->id] = $student->country;
            }
            asort($sstudents);
            foreach ($sstudents as $key => $value) {
                $nstudents[] = $students[$key];
            }
            $students = $nstudents;
        }

line 212:

 foreach ($students as $student) {

            if ($student->lastaccess) {
                $lastaccess = format_time(time() - $student->lastaccess, $datestring);
            } else {
                $lastaccess = $strnever;
            }
Also, the instructor has been removed from the class. And Cannot add any instructors to the course!

Still no logs being recorded either. Should I try re-installing backuped course/moodle and upgrading to 1.2.1 first?

Any Ideas? Thanx, Kevin