I am new at moodle, I have tried configurable report block but I couldn't achieve my requirement. Basically I want how many users are accessing the site, here I should select the duration, e.g. weekly, monthly.
Re: I want count for how many users have accessed the site
You could try going to Site Admin, Users, Browse list, sort by last access.
Re: I want count for how many users have accessed the site
You can do a configurable report which identifies how many discrete users have visited during a time frame. You just have to do it with a sql report rather than one of the 'simple' ones. I know this because I've done it. I don't currently use the plug in (changed jobs), else I would share that sql code. Once you've created one time frame, it is easy to copy the code to a new report and modify the time frame to another one. My report was for pretty specific time frames (August 2016, for example), but I'm sure there are ways to do it differently.
And, just a note, I'm not very techie. I learned a little sql in self-defense some time ago...it really isn't my thing. Mostly I steal code from other people and make it do what I want. As I recall, I got a lot of good info looking at stackoverflow sql questions, too. And there might be some pregen reports in the configurable reports forum. I may have even posted this one at one point (or part of it)...that was a long time ago. So, I'm just saying, while it isn't easy, it is not impossible.
Re: I want count for how many users have accessed the site
Please see you can find the code and provide me, I will be thankful.
Re: I want count for how many users have accessed the site
Unfortunately, I doubt I can get a hold of it...I left that job five months ago and they have since migrated to a different LMS. If I did post it, it would be in the config reports forum area...I found this post I put out and some help I got: https://moodle.org/mod/forum/discuss.php?d=349920. It might point you in the right direction.
I printed copies of some of my final, regularly used code (the cool stuff) but that wasn't one of them.
Re: I want count for how many users have accessed the site
In configurable report format, try my code below. You still need to decide what dates you are interested in seeing, and how you want to group them. (When I run this, for example, dates shown as "1969" are for users who have never accessed the site.)
SELECT firstname, lastname,
from_unixtime(lastaccess)
FROM prefix_user
order by lastaccess desc