Register Module to solve logout problem and session time calculation

Register Module to solve logout problem and session time calculation

by Domenico Pontari -
Number of replies: 30

I developed a new module that can calculate the session time for a user and to declare the amount of hours that the user studied offline.

This first version has to be tested for results and functionalities.

Fair

Average of ratings: -
In reply to Domenico Pontari

Re: Register Module to solve logout problem and session time calculation

by W Page -
Hi Domenico!

Is this for v1.4.x or v1.5??

WP1
In reply to W Page

Re: Register Module to solve logout problem and session time calculation

by Sami Parvez -
How much it will cost in Indian rupees to register. I Know PHP and MySQl Little bit can i will be utilizing it effectively.
In reply to Sami Parvez

Re: Register Module to solve logout problem and session time calculation

by Domenico Pontari -

I corrected some problem of the previous version.

This is the new version under GPL license.

Bye,

Fair

In reply to Domenico Pontari

Re: Register Module to solve logout problem and session time calculation

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
Interesting.  Can you describe the approach you are using for this module?  How are you making your calculations?
In reply to Martin Dougiamas

Re: Register Module to solve logout problem and session time calculation

by Domenico Pontari -

We started with a course certificated by our region. For the certification (if we want funds to do this course), each student must declare the amount of hours spent online (on Moodle) and offline (reading books and so on).

So I developed an activity for 1.4.2 through every student can declare the number of hours spent offline and can see the duration of his sessions on Moodle. Teachers can see the sessions of all students both online and offline.

How can I calculate session time?

Any technical notes: HTTP is a stateless protocol, so you cannot calculate connection time (delay, elapse, duration, ecc...). You can only see requests to an HTTP server. But you can fix a timeout, so that if you don't request any page for that period, the activity module breaks you session. In the module I set this timeout at 30 min (REGISTER_SESSION_TIMEOUT), but it's simple to put the same value of Moodle system session timeout.

Bye,

Fair

In reply to Domenico Pontari

Re: Register Module to solve logout problem and session time calculation

by W Page -
Hi Domenico!!

Can you post an image of how the module looks when installed?

WP1
In reply to W Page

Re: Register Module to solve logout problem and session time calculation

by Domenico Pontari -

This is what you see when you are student:

example for students

This is what you see when you are teacher (I deleted the names for privacy reasons):

example for teachers

Bye,

Fair

In reply to Domenico Pontari

Re: Register Module to solve logout problem and session time calculation

by W Page -
Hi Domenico!

Thanks for responding.

Just wanted to ask the following:
  • Is there a way to know the time a student visited each type of resource/activity?
  • Can the results be exported to Excel and then analyzed?
  • Is there a way for students to see a graphical display of their time off and online?
  • Can the "offline" feature be togged on or off by course or resource/activity?
  • Can a teacher upload an "offline" time for some or all the students in a course.
    • For Example, let up say there was a classroom activity that all or some of the students participated in that relates to the course.  Could a teacher just upload the time into each affected student's file?
  • Are you considering upgrading the mod to v1.5?

Thanks again for posting the screenshot.

WP1


  
In reply to W Page

Re: Register Module to solve logout problem and session time calculation

by Domenico Pontari -

Ok, step by step:

> Is there a way to know the time a student visited each type of resource/activity?

Yes, there is; but I didn't develop it. Register activity takes data from logs table in Moodle DB, where there is also the information about which resourse / activity you visited, but I don't care about this in my module, because I only want to solve the session problem.

> Can the results be exported to Excel and then analyzed?

Yes, using Copy & Paste from HTML table to Excel. It may be difficult converting data from Moodle format to Excel format, so I include here an example.

> Is there a way for students to see a graphical display of their time off and online?

No, there isn't. But if you export data to Excel, you'll be able to create a graphic (that is static, and you need to update it)

> Can the "offline" feature be togged on or off by course or resource/activity?

No, it can't. But I'll introduce this feature at soon at possible.

> Can a teacher upload an "offline" time for some or all the students in a course.

No, he can't. Each student must certify itself.

  • For Example, let up say there was a classroom activity that all or some of the students participated in that relates to the course.  Could a teacher just upload the time into each affected student's file?

It could be an interesting future feature. Do you need it?

> Are you considering upgrading the mod to v1.5?

Yes, I'm. We're using 1.4.2 version, but we'll challange to 1.5 version for the next year; so I need to "upgrade" my activity module.

Bye,

Fair

In reply to W Page

Re: Register Module to solve logout problem and session time calculation

by Domenico Pontari -

It's for v1.4.x.

Sorry, but is there a different management of activity modules in v1.5 respect to v1.4.x?

Fair

In reply to Domenico Pontari

Re: Register Module to solve logout problem and session time calculation

by John O'Reilly -

Hi Domenico,

Will you be producing a version for moodle 1.5?

John

In reply to John O'Reilly

Re: Register Module to solve logout problem and session time calculation

by Domenico Pontari -

Yes, I'll be.

Anyway I test that the actual version works well with 1.5 too.

The next version will have also more features than this one.

Bye,

Fair

In reply to Domenico Pontari

Re: Register Module to solve logout problem and session time calculation

by John O'Reilly -

Thanks Domenico,

This is great because I need to be able to report students' time on line.

John

In reply to Domenico Pontari

Re: Register Module to solve logout problem and session time calculation

by John O'Reilly -

Hi Domenico,

Have Moodle 1.5 installed and I am having difficulty getting the register module to work. When I install module in maintenence mode all seems well, the db tables are created ok: mdl_register and mdl_register_logs. Problem is when I include register in a course I am seeing error 'HTMLArea is undefined' and 'Notice: Undefined property: stdClass::$tolleranceevaluation ' and 'Undefined property:  stdClass::$name'.

Do you think I have missed something in the installation?

Thanks a lot

John

In reply to John O'Reilly

Re: Register Module to solve logout problem and session time calculation

by Domenico Pontari -

Sorry John,

I'm abroad at the moment, can't answer you before 3th of July 'cause here I haven't my computer.

I'll answer in 20 days.

Bye,

Fair

In reply to Domenico Pontari

Re: Register Module to solve logout problem and session time calculation

by John O'Reilly -

Thanks Domenico,

Look foward to hearing from you then.

enjoy your trip!

John

In reply to John O'Reilly

Re: Register Module to solve logout problem and session time calculation

by Domenico Pontari -

Hi John,

here I attach my new register for Moodle 1.5; I corrected some bugs and I developed new features.

Release Notes:

  1. I verified XHTML 1.0 Transitional compatibility.
  2. If you use register in a metacourse, it'll calculate logs for all courses in that category. Otherwise it counts only logs of that course.
  3. You can switch off user's offline certification.
  4. I added online help pages.
  5. I used code comments, so that you can create a developer document with PhpDocumentator.

Best regards,

Fair

In reply to Domenico Pontari

Re: Register Module to solve logout problem and session time calculation

by Philippe Ramette -
Hi Domenico,

Where is the help file ? which folder ?

Where is the online help pages ?

I look in your latest version zip.gif register_for_Moodle_1.5.zip


Is it possible to see a real exemple  on your site.

thank you

Philippe
In reply to Philippe Ramette

Re: Register Module to solve logout problem and session time calculation

by Domenico Pontari -

Hi Philippe,

All help files are in lang/en/help/register and they are organized following Moodle help pages standard: it means that when you open the page to edit or create a new Register, you can click on the question mark to obtain some other information.

> Is it possible to see a real exemple  on your site.

I can't show you a real example for privacy matters (all users in my platform are real users), sorry.

Bye,

Fair

In reply to Philippe Ramette

Re: Register Module to solve logout problem and session time calculation

by Julian Ridden -

A Real example has been installed on the Playpen

Full guest access is enabled, you can create your own login or you can log in as teacher:teacher to see the teacher view as well.

It is called the "Time Register" in the playpen

In reply to Domenico Pontari

Re: Register Module to solve logout problem and session time calculation

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers
Hi Domenico - a nice module, thanks! Is there a way to alter the way the list of all students is sorted? It is currently sorted on surname, but I would prefer to have mine sorted on most recent log in (like the participants page).

Any help would be much appreciated smile
In reply to Jon Bolton

Re: Register Module to solve logout problem and session time calculation

by Domenico Pontari -

Sorry Jon,

if you want to do this, you have to modify the code. Anyway it should not be too difficult.

Bye,

Fair

In reply to Domenico Pontari

Re: Register Module to solve logout problem and session time calculation

by Rhonda Goetz -
I need to export this data.  Can you put in an option for that or is there another way to do it?  I love this module.  Just what I was looking for!
Average of ratings: Useful (1)
In reply to Rhonda Goetz

Re: Register Module to solve logout problem and session time calculation

by Domenico Pontari -

Hay Rhonda,

I described above how to export data. Do you think that is too difficult?

Bye,

Fair

PS: do you think that is better changing register in a block module instead of an activity module?

In reply to Domenico Pontari

Re: Register Module to solve logout problem and session time calculation

by Rhonda Goetz -

Yes I can copy paste, I was looking for an export button...

Also, is there someway to show the data based on group?  That would really help me.

Thanks, Rhonda

In reply to Rhonda Goetz

Re: Register Module to solve logout problem and session time calculation

by juan pablo ramirez -
I am also looking for integration with groups. I have to say that Domenico has done a great job!!! Bravo Domencico mille gracie.
I use in in moodle 1.9+ and works just perfect. The only problemi is that we have almost 300 students in each course separated in groups of 10 people and the register module shows the aaaaallll together.
Is there a way to separate these stats in groups?


In reply to juan pablo ramirez

Re: Register Module to solve logout problem and session time calculation

by Xinghua Chen -
Hi Juan!

" I use in in moodle 1.9+ and works just perfect."

Really? I couldn't find where the get_record function defined. And "Course module is incorrect" error message on screen all the time.

Any suggestion for appreciated.
In reply to Xinghua Chen

Re: Register Module to solve logout problem and session time calculation

by juan pablo ramirez -
Just download the register for 1.8 module and put the folder "register" in the "mod" folder of moodle.

Try it on a clean instalation. I just tested it on 1.9.2 and works smoothly. I now am trying to display the group of each user...
In reply to Rhonda Goetz

Re: Register Module to solve logout problem and session time calculation

by juan pablo ramirez -
I need the exact same things.... can anyone give a clue where to start from?
In reply to juan pablo ramirez

Re: Register Module to solve logout problem and session time calculation

by Xinghua Chen -
Thanks for reply,Juan!

I have installed the register for 1.8 edtion on my moodle site, As you say it works smoothly.

I need more functions on my situation, Such as per year/month/group/student learning time statistics and can be downloaded as moodle download formats. Accordding to the learning time calc the online learning score of each student etc.

So there is much things base the register for moodle 1.8 edition we need to do.

Hope we can do something more! For it's open!