Livestats Block

Livestats Block

by Graham Stone -
Number of replies: 15
Picture of Testers
Hi,

I'm not sure if this is being posted in the right place so please feel free to move to a better forum if there is one more relevent.

I've downloaded the new Livestats block but I can't get it to work, when I go to my front page I get a message at the top saying 'Module "livestats" is not readable - check permissions'  but this is my test site and everytihng is set to 777.  I've tried putting it in both the mod folder and the blocks folder as i'm not sure which folder it should go in but I'm still getting the same error message either way.

Please can somebody offer me some advice,

Thanks,
Average of ratings: -
In reply to Graham Stone

Re: Livestats Block

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Graham,

You should put the folder named livestats in the blocks folder.

In reply to Helen Foster

Re: Livestats Block

by Graham Stone -
Picture of Testers
Hi Helen,

I've tried that and unfortunatly i'm still getting the same error message.  I've checked and double checked the permissions but i'm getting no further.

Thanks for taking the time to try and help.
In reply to Graham Stone

Re: Livestats Block

by Keith Wilkinson -

Hi Graham

Question.

Did you copy the livestats folder to you moodle blocks folder or just the php file?

Keith

In reply to Keith Wilkinson

Re: Livestats Block

by Graham Stone -
Picture of Testers
Hi Keith,

I've put the actual folder into the Blocks folder and inside that is the block_livestats.php file.

Do I need to take out the PHP file and put that there instead?

Thanks,
In reply to Graham Stone

Re: Livestats Block

by Keith Wilkinson -

Hi

No. You have installed the folders correctly. The only other thing that I can think of is the permissions of both the folder and the file. Other than that, it should work - it is a very straight forward block that just makes a couple of calls to the database.

Just one more thought - have you accessed the Administration page - and has moodle picked it up?

In reply to Keith Wilkinson

Re: Livestats Block

by Graham Stone -
Picture of Testers
Hi Keith,

Your right, thats the one thing that I forgot to do becasue when I got the error message I just thoght that it hadn't worked, I feel such an idiot now.

Many thanks for your help, I can't believe that I never thought of that.
In reply to Keith Wilkinson

Re: Livestats Block

by Mark Little -
Hi,

Is there anyway we can modify this block so it works on each Course and not just the front page?

We have moved our Student Intranet into Moodle and we want to see how many students are accessing the course.

Thanks
In reply to Mark Little

Re: Livestats Block

by Julian Ridden -
Is this not somewthing you can do with the 'statistics' reports built into moodle?
In reply to Julian Ridden

Re: Livestats Block

by Mark Little -
Yes we have been using the Statistics reports which are built into Moodle, I was just wondering if was any way to modify the block so we could show it in the course instead.

One thing I have noticed with the statistics in Moodle is that the graphs are not that accurate unless its our server. For example Thursday results appear on Friday.

Any reason why this happens?

Thanks
Attachment pic.jpg
In reply to Mark Little

Re: Livestats Block

by Paolo Oprandi -
Hi Mark,
How do you get these graphs?
Paolo
In reply to Paolo Oprandi

Re: Livestats Block

by Mark Little -
Hi,

Turn on statistics in 1.6 to get the graphs working...

Look under Configuration and Variables in the Admin menu, you will also need the cron working.



In reply to Mark Little

Re: Livestats Block

by Paolo Oprandi -
Hi,

Yes, I have stats running (moodle 1.6.2 and 1.6.3) and I can see some stats results (lists with Most Active Courses, Most Active Courses (weighted)), but I don't have any graph funtionality (looking at 'reports' from the front page)... maybe I need to be using a different platform or browser? I have tried it on Firefox and Safari on a Mac.

Paolo
In reply to Paolo Oprandi

Re: Livestats Block

by Paolo Oprandi -

I still do not get graphs, but nevertheless I have made some alterations to the live stats block so it will give site statistics on students, teachers, sites starting this academic year, all sites, logins this week and today. It will also give course stats on students, teachers, logins this week and today.
site statsCourse statistics

See attachment.

Paolo
In reply to Julian Ridden

Re: Livestats Block

by Paolo Oprandi -
I am not sure where to put my question - its about the statistics package rather than livestats blocks. Nevertheless, I will post here for the time being.

The statistics we get are for teachers and students together. The most used course in the last week may just be the one an administrator has been feverishily working on. What is more ridiculous is the data views such as participation ratios and post to view rations are completely skewed by this.

The data that is collected is reasonably sensible - activity is recorded by students and by teachers, but there is no division when viewing the results. I have written a noddy script to do this, without touching statslib.php... I simply add another field to the table and then parse out references to teachers or students depending on what user requests, but I was wondering if anyone had written anything more sensible so I don't have to reinvent the wheel?

$param = stats_get_parameters($time,$report,SITEID,STATS_MODE_RANKED);
$param->fields=$usertype==1 ? str_replace('+teachers','',str_replace('+activeteachers','',str_replace('+teacherwrites','',str_replace('+teacherreads','',$param->fields)))) : $param->fields;
$param->extras=$usertype==1 ? str_replace('+teachers','',(str_replace('+teacherwrites','',(str_replace('+teacherreads','',$param->extras))))) : $param->extras;

$param->fields=$usertype==2 ? str_replace('students','',str_replace('activestudents','',str_replace('+studentwrites','',str_replace('studentreads','',$param->fields)))) : $param->fields;
$param->extras=$usertype==2 ? str_replace('students','',(str_replace('+studentwrites','',(str_replace('studentreads','',$param->extras))))) : $param->extras;