New Block - activeusers

New Block - activeusers

by Rashan Anushka -
Number of replies: 25
In fact this block has been added to the plug-ins database some times a go, but i thought to create a dedicated area to discuss on this block here.

The latest download information will be available at plug-ins database.

first of all, let me introduce the block.

The objective of the block was to list the most active users of the LMS along with a ranking. Each user is a given a rank according to the number of hits made by him. The rank is simply the Z-score of the number of hits made by the user.

Rank of User X = ( Hits by X – Avg. of hits made by a user ) /Std Dev of hits made by users

The top 10 users (this number can be configured) having the maximum rank will be displayed in the block along with his or her photo, rank. The objective of this block is to promote the usage of the LMS. By completing this basic implementation I have identified some future implementations or extensions to this block to get the maximum use of it, such as Improve the ranking algorithms, so that each activity can have a different weights attached to them. Further, different weights to be attached to different sub-activities related to a particular activity (e.g. viewing a forum vs. posting to the forum).

so could you pls try this block and give me some feedbacks. BTW you need to have at least moodle 1.8 to install this.


Average of ratings: -
In reply to Rashan Anushka

Re: New Block - activeusers

by Karl Linne -
Great idea, but ...
... I get a PARSE error on entering the admin page. Does it require PHP 5?

Regards
Karl
In reply to Rashan Anushka

Re: New Block - activeusers

by Rui Nascimento -

Hi there.

I've just downloaded you block and move it to the blocks folder of my moodle and i get:

Parse error: syntax error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/espalmel/public_html/moodle/blocks/activeusers/block_activeusers.php on line 257

I'm using Moodle 1.8.2 (2007021520) on PHP Version 4.4.7

Can you help me? Do I need PHP 5?

Thank you very much.

In reply to Rui Nascimento

Re: New Block - activeusers

by Rashan Anushka -
yes. the above error is due to the php version. I developed the above for php5 since we use only php5 in our servers smile

but, I will see wheteher I can easily modify the code to suite php4 also.
In reply to Rashan Anushka

Re: New Block - activeusers

by Marco Rota -

Hi Rashan,

First of all thank you for this nice Block!

I read in discussion you say "guess what, when adding to a course, now you can select the roles to be considered."

How can I do that? I don't want display admin user.

Thank you!

In reply to Marco Rota

Re: New Block - activeusers

by Rashan Anushka -
I hope you're using the latest version (i've added this very recently)

- Add the block to the course as usual and go to the block settings page
- At the botom of the page, you will see a list of roles defined in your system.
- Select the roles you want to be considered

PS: Initially also check the option "Update statistics now" so that you dont have to wait until your next cron execution to show the results
In reply to Rashan Anushka

Re: New Block - activeusers

by Marco Rota -

> - At the botom of the page, you will see a list of roles defined in your system

There isn't! Probably i'm not using the latest version... surprise

I've downloaded from here http://moodle.org/mod/data/view.php?d=13&rid=967 clicking on "Download latest version" (http://download.moodle.org/download.php/plugins/blocks/activeusers.zip)

Wrong link?

In reply to Marco Rota

Re: New Block - activeusers

by Rashan Anushka -
I have check the file and it is OK. What is the moodle version you're using, this block needs moodle 1.8 or later.

BTW the roles can not be selected when the block(s) added to the site page.


In reply to Rashan Anushka

Re: New Block - activeusers

by Marco Rota -

> BTW the roles can not be selected when the block(s) added to the site page

Ahhh... that's my problem!
BTW thank you for support!

Bye bye

In reply to Rashan Anushka

Re: New Block - activeusers

by Gianpaolo Valero -
Hey, I was trying to do the same but i couldn't

I neither understood what did you mean by "the roles can not be selected when the block(s) added to the site page". Did you meant like the startpage?
In reply to Gianpaolo Valero

Re: New Block - activeusers

by Rashan Anushka -
yes. home page, site page, start page , what ever smile

Calculating roles at the site level is bit complex and ambiguas, so I am still looking for an 'efficiant' way of doing that.


In reply to Rashan Anushka

Re: New Block - activeusers

by Gianpaolo Valero -
Thinking more about it I'll prefer for everybody to see this block. To create some sort of a competition between everybody to see who uses this tool more.

But, I got why I didn't understand your answer. The thing is that because i'm a newbie using moodle I don't know much about assigning roles to a block or to a complete course. Neither I know about override roles...

Thanks anyway,
newbie
In reply to Gianpaolo Valero

Re: New Block - activeusers

by Rashan Anushka -
well, at the moment everybody can see the block but here the issue is who is gonna listed inside the block.

On of the complications with the roles is, say a particular user is a "Student" of the course A and a "teacher" of a course B, then what is his role at the site level (student or teacher). To make things simple, I am considering 'everyone' at the site level.




In reply to Rashan Anushka

Re: New Block - activeusers

by Helen Whitehead -
This block sounds like exactly what I need, but when I uploaded it into my moodle/blocks directory, the admin interface completely disappeared - I just got a blank page at moodle/admin/index.php!

I deleted the activeusers directory and it came back...

Any ideas what might have happened (Moodle 1.9.2 latest build)

Helen
In reply to Helen Whitehead

Re: New Block - activeusers

by Rashan Anushka -
check the file permissions after you extracted the directory, all the files should be readable by the web server.


In reply to Rashan Anushka

Re: New Block - activeusers

by Helen Whitehead -
Permissions on that folder were exactly the same as for all the other blocks - 755 for the directory and 644 for the files.

I changed all the files to 755 and still get a blank screen in admin sad

Helen
In reply to Helen Whitehead

Re: New Block - activeusers

by Rashan Anushka -
if it is possible, could you enable the debug mode and see for any errors.

In reply to Rashan Anushka

Re: New Block - activeusers

by Helen Whitehead -
Parse error: syntax error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /PATH/public_html/vle/blocks/activeusers/block_activeusers.php on line 257

Any help?
In reply to Helen Whitehead

Re: New Block - activeusers

by Rashan Anushka -
what is the php version you have? usually this error occured due to older php versions (e.g. php4). If it is possible try to upgrade to php5 (moodle will require it in future anyway).
In reply to Rashan Anushka

Re: New Block - activeusers

by leena gour -
hi Rashan, its good to have such block.

But i am facing problem as i have extracted .zip into blocks directory, and i am getting activeuser folder in blocks but not showing in the blocks at runtime. while notifying it is not giving any error.
What to do , please suggest. i am using moodle 1.9

Best regards
In reply to Rashan Anushka

回复: New Block - activeusers

by 静霞 缪 -
I  really appreciate you for developing the "active user". It is remarkable.But is it necessary to update it manually to show new data? I have no idea how to update the information automatically. And everytime I have to choose the "Update Statistics Now" to get new information.
In reply to 静霞 缪

Re: 回复: New Block - activeusers

by Rashan Anushka -
The statistics are updated via the moodle cron (/admin/cron.php), so you have to configure your moodle setup to run the moodle cron regularly.

You may also change certain defaut settings in the block's global settings
i.e.
Site Administration Block -> Blocks -> Most Active Users
In reply to Rashan Anushka

Re: 回复: New Block - activeusers

by Rui Nascimento -

Hello Rashan.

The block is excellent! Thank you very much! It's working fine.

But when I go to:
Site Administration Block -> Blocks -> Most Active Users
I get:

Most Active Users

Warning: block_base::include(/home/espalmel/public_html/moodle/blocks/activeusers/config_global.html) [function.block-base-include]: failed to open stream: No such file or directory in /home/espalmel/public_html/moodle/blocks/moodleblock.class.php on line 453

Warning: block_base::include() [function.include]: Failed opening '/home/espalmel/public_html/moodle/blocks/activeusers/config_global.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/espalmel/public_html/moodle/blocks/moodleblock.class.php on line 453
We have moodle 1.8.2 with PHP 5.2.5
Any help? Thanks.
In reply to Rui Nascimento

Re: 回复: New Block - activeusers

by Barbara Lawrence -
Hi Rashan,
I get the same PHP warning.
There is no config_global.html in the download, and no form displayed when I try to configure the block globally. There are no fields for the activeusers block in the config table. I am not convinced that the list of most active users is being updated if I do not choose Update Statistics Now.

I am running Moodle 1.8.7, PostgreSQL 8.2, PHP 5.2.6.

Can you suggest anything? I'd be grateful for your help, because apart from this problem I think it's a really useful block.
In reply to Rashan Anushka

Re: New Block - activeusers

by Cavin Mugarura -
Hi,

the module is very good, however, they are few problems, i have the latest version of moodle 1.9.
the module is a global module. So if you have five courses, with students offering different subjects, the module is going to display the students with the highest rank (hits), on moodle, even if they are enrolled for a different subject.
For example if Paul is the most active user, but he's enrolled for Economics, in the Accounting course where he is not enrolled, will also display as the most active.
I have also failed to see the section for defining roles.