Attendance (plugin)

Attendance update - new maintainer

 
 
Picture of Dan Marsden
Attendance update - new maintainer
Group DevelopersGroup Moodle Course Creator Certificate holdersGroup Particularly helpful MoodlersGroup Plugins guardiansGroup TestersGroup Translators

Artem recently changed jobs and is no longer able to dedicate time to maintaining the Attendance module so I've volunteered to take on some of the work - Artem has transferred his git repositories to my account so the various github forks will remain connected - thanks heaps to Artem for allowing me to pick up the work.

I have updated the documentation here with details on some of the changes I have made already:
http://docs.moodle.org/en/Attendance_module

The biggest thing to mention is that the module has been renamed from 'attforblock' to 'attendance' - I've included information on how to upgrade from the old 'attforblock' here:
http://docs.moodle.org/en/Attendance_module#Upgrade_from_mod_attforblock_to_new_mod_attendance

The plugin has been submitted to the plugins database here on moodle.org but it may take a couple of weeks before it is made public in the plugins db.

As the plugin has been renamed if you have any Moodle backups that contain information about older 'attforblock' content this will not currently be restored during the restore process as I haven't written any handlers to restore this content - If someone wants to do this make sure you file a pull request or if this is really important to you and you can fund my time to do this drop me an e-mail smile

It's unlikely I'll be able to spend much time improving the existing feature-set of the attendance module as a volunteer but I'll endeavour to ensure that it works in future Moodle versions. The code now passes the Moodle codechecker tool and I have fixed some minor security issues with the previous code. If anyone else does any feature work I'm happy to review this (please make sure you file a pull request so I can integrate your changes)

I work for the NZ Moodle Partner Catalyst IT - we can also provide development services to improve the attendance module if you are able to fund my time.

Even though Artem isn't working on Moodle stuff at the moment he knows the code a lot better than I do - so if you are keen to fund work on improving the module you could drop him an e-mail too to see if he might be interested in working on it some more.

For those interested in the "what's changed" stuff here's a shortlist with some of the changes I've made this week:
* Renamed attforblock to attendance
* SECURITY: fixed some setType warnings, improved sesskey checks and better cleaning of raw data.
* removed all languages other than english from code as AMOS will handle this when it lands in the plugins db
* Lots of coding guideline work - the block and module now comply with the Moodle codechecker tool and some phpdoc fixes.
* CONTRIB-4246 when editing module name update name in gradebook.

 
Average of ratings:Useful (2)
Picture of cormier chris
Re: Attendance update - new maintainer
 

Hi,

Thanks for working. I want that the student ticks itself its box when present. Is it possible?

Regards

 
Average of ratings: -
Picture of Dan Marsden
Re: Attendance update - new maintainer
Group DevelopersGroup Moodle Course Creator Certificate holdersGroup Particularly helpful MoodlersGroup Plugins guardiansGroup TestersGroup Translators

Hi Cormier - I'm not aware of the full existing featureset in the current Attendance module yet - but anything is possible with open source code - you can pay someone else like your local Moodle Partner to add features to the existing code and then submit those changes to me so I can look at including them in the core version or you could fund my time to improve it.

 
Average of ratings: -
Picture of Erin Billy
Re: Attendance update - new maintainer
 

Dan, thanks for stepping up, and I'm sure I speak for others as well. I like this module and use it a lot, so your work is very helpful!

 
Average of ratings: -
Picture of Daniel Lombardo
Re: Attendance update - new maintainer
 

Big shout out to Artem who I have chatted to in the past, a really sincere and helpful guy. He has maintained this module for the longest time and has done some really fantastic and timely work to help us all.

Dan, thanks for jumping in. I'll get right to it: I need features developed for this module. I'm happy to risk the crowd-sourced funding for it and will make a major contribution from our organization. I feel as though for those schools using Moodle as a blended learning management solution a powerful attendance module will be a great addition to their technology tool set. I believe the module could have the following things in addition to its already wonderful features:

  • Produce printable PDF timetables and reports that can be styled and exported
  • Run a cron job that warns students and their instructors about exceeded absences
  • Have calculation functions for its grade component
  • Be optimized for taking attendance on a touchscreen device
  • Improved for creating and managing large numbers of sessions
  • Usability tested for teachers/users

Please let me know the best place to start. I would be happy to hear from others who want to be involved with the project.

 
Average of ratings: -
Picture of Dan Marsden
Re: Attendance update - new maintainer
Group DevelopersGroup Moodle Course Creator Certificate holdersGroup Particularly helpful MoodlersGroup Plugins guardiansGroup TestersGroup Translators

Hi Daniel, The best place to start would be to develop some more detailed requirements - for small stuff you may be able to use a tracker issue but the larger pieces of work you may need to use a wiki page to include mockups and workflow details(with a tracker issue that links to the wiki page)

Feel free to use the wiki on github attached to the mod_attendance code:
https://github.com/danmarsden/moodle-mod_attendance/wiki
(From what I understand of github wikis - anyone with a github login should be able to create pages there.)

I can then place estimates on the cost of implementing each feature and then discuss further.

 
Average of ratings: -
Star
Re: Attendance update - new maintainer
 

Hi, Dan

Great work for the plugins!
As I found your notice at http://docs.moodle.org/25/en/Attendance_module#Upgrade_from_mod_attforblock_to_new_mod_attendance, said

1.  make sure you are running the latest attforblock code - the new attendance module will only allow upgrades from attforblock version 2012120700

Currently, I still using version 2011071601, should I upgrade to version 2012120700 first or OK to upgrade to latest one.

Also, after I download the version 2013070301(latest one), should I upgrade to both block and mod using the same files?

 
Average of ratings: -
Picture of Dan Marsden
Re: Attendance update - new maintainer
Group DevelopersGroup Moodle Course Creator Certificate holdersGroup Particularly helpful MoodlersGroup Plugins guardiansGroup TestersGroup Translators

Hey - the code currently does a check for 2012120700 before allowing the upgrade to run but I just took a closer look at the upgrade scripts and it doesn't look like any db level changes have been made for quite a while so I can relax that version requirement a bit - I'll push through a new version of the plugin into the db today that should allow upgrades for 2011071601 as well.

 
Average of ratings: -
Picture of Dan Marsden
Re: Attendance update - new maintainer
Group DevelopersGroup Moodle Course Creator Certificate holdersGroup Particularly helpful MoodlersGroup Plugins guardiansGroup TestersGroup Translators

I've updated the code in the plugins db - it now supports upgrades from any old mod_attforblock version higher than 2011061800 - if you are using an earlier version you will need to upgrade your mod_attforblock code before moving to the newer mod_attendance.

 
Average of ratings: -
Star
Re: Attendance update - new maintainer
 

Hi, Dan

Thanks for your reply, should I delete attforblock this module or just keep it on the directory?

 
Average of ratings: -
Picture of Dan Marsden
Re: Attendance update - new maintainer
Group DevelopersGroup Moodle Course Creator Certificate holdersGroup Particularly helpful MoodlersGroup Plugins guardiansGroup TestersGroup Translators

If you click on the link in my first post above to the docs that explain how to upgrade from mod_attforblock you might find out! smile

 
Average of ratings: -
Picture of Longfei Yu
Re: Attendance update - new maintainer
 

Dan,

In the code, line 1391 of locallib.php, should be "<" not ">".

Thanks.

Longfei

function attforblock_upgrade() {
global $DB, $CFG;
$module = $DB->get_record('modules', array('name' => 'attforblock'));
if ($module->version > '2011061800') {
print_error("noupgradefromthisversion", 'attendance');
}

 
Average of ratings: -
Picture of Dan Marsden
Re: Attendance update - new maintainer
Group DevelopersGroup Moodle Course Creator Certificate holdersGroup Particularly helpful MoodlersGroup Plugins guardiansGroup TestersGroup Translators

that was a dumb mistake to make! - thanks for letting me know, I've fixed it and published a new version in the plugins db

 
Average of ratings: -
Picture of Brian Schmidt
Re: Attendance update - new maintainer
 

I cannot seem to get the upgrade to run for me.  I've gone through the instructions for converting the attforblock to attendance in the docs.  I've also tried using both the latest 2.5.2 as well as 2.4.2 as an intermediary.  I keep getting the message that it cannot upgrade me, and that I need to be running version 2012120700.  That is, indeed, the version I am running.  I'm using Moodle 2.6.  Any ideas?

From my version.php:
$module->version = 2012120700; // The current module version (Date: YYYYMMDDXX)
$module->release = '2.4.0';

 
Average of ratings: -
Picture of Dan Marsden
Re: Attendance update - new maintainer
Group DevelopersGroup Moodle Course Creator Certificate holdersGroup Particularly helpful MoodlersGroup Plugins guardiansGroup TestersGroup Translators

That error is saying that you have previously installed the old attforblock module but you had a really old version of the attforblock module when you were using it last. If you want to keep the data from your old attforblock module you will need to do a few things first.

find the version of the attforblock module you had installed (it's not 2012120700)
Then take a look at the old attforblock upgrade script here:
https://github.com/danmarsden/moodle_mod_attforblock_old/blob/MDL_23/db/upgrade.php
Then run all upgrade statements that need to run to bring your attforblock code up to date.
Then try to run the latest attendance module upgrade.

Alternatively - you could delete the old mod/attforblock tables and data and do a fresh install.

to do this - delete the attforblock table and all "attendance" prefixed tables, then delete the entry in the mdl_modules table related to the old attforblock module.

Good luck!

 
Average of ratings:Useful (1)
Picture of Michael O'Brien
Re: Attendance update - new maintainer
 

I've the same issue (can't upgrade from attforblock to attendance) but I'm unclear how to find the version of the attforblock if not by reading the version.php file

 
Average of ratings: -
Just wondering . . .
Re: Attendance update - new maintainer
Group Particularly helpful Moodlers

Have you read the instructions in the docs and seen Dan's comment here: https://moodle.org/mod/forum/discuss.php?d=245358

-Derek

 
Average of ratings: -
Picture of Michael O'Brien
Re: Attendance update - new maintainer
 

Yes but I suspect I'm mixing up something as I have tried different combinations of attforblock and attendance in the same folder (I get the upgrade error I mentioned) but can't see whats old thats stopping the upgrade or if the plugin overview is telling me 1 think but some upgrade script didn't get executed last time I upgraded attforblock

State Before

in my mod folder I have a folder called attforblock and the plugin overview reports it as version 2012120700 with no listing of upgrades available

Required State

I want to have 1 module in mod folder called attendance running the latest code on moodle 2.6.1

I also want to keep my old attendance data so can't delete the attforblock

 

When I have the code /mod/attforblock does upgrading that mean actually adding 2 downloads from the plugin site to my moodle code in /blocks/ and in /mod/? before I can then upgrade to the master code from github ?

 

 
Average of ratings: -
Picture of Dan Marsden
Re: Attendance update - new maintainer
Group DevelopersGroup Moodle Course Creator Certificate holdersGroup Particularly helpful MoodlersGroup Plugins guardiansGroup TestersGroup Translators

Hi Michael,

your post suggests that you haven't read or understood the docs - Please confirm that you have read:
http://docs.moodle.org/26/en/Attendance_module#Upgrade_from_mod_attforblock_to_new_mod_attendance

and then clarify what part of the upgrade you don't understand?

 
Average of ratings: -
Picture of Michael O'Brien
Re: Attendance update - new maintainer
 

Hi Dan,

I've documented my steps with screen shots but the file upload limit on moodle.org is too low. I've added a pdf version here http://sharesend.com/09d2gmcf

My attforblock is version 2012120700 according to its version.php contents as mentioned in the documentation as the required version to upgrade from. I do copy the attendance block from moodle.org plugin to mod and move the old attforblock out but I get the upgrade error as the original posted mentioned.

My confusion stems from how do I identify the version of attforblock moodle thinks it has if not by the version.php file so I can run the correct database upgrade scripts you suggest to get it to 2012120700 so the migration to attendance works correctly

 
Average of ratings: -
Picture of Daniel Lombardo
Re: Attendance update - new maintainer
 

Thank you for the encouragement, Dan.

I have done exactly that: Proposed New Features

 
Average of ratings: -
Picture of Dan Marsden
Re: Attendance update - new maintainer
Group DevelopersGroup Moodle Course Creator Certificate holdersGroup Particularly helpful MoodlersGroup Plugins guardiansGroup TestersGroup Translators

whoops - previous versions broke backup/restore - have just updated the plugins db with version 2013070403 that fixes it.

 
Average of ratings: -
Picture of cormier chris
Re: Attendance update - new maintainer
 

Hi,

moodle 2.5.1

2.4.1 (2013070403)

 for Moodle 2.4, 2.5
Release date
mercredi 10 juillet 2013, 05:05

I must create attendance activity to reload previous attendance activity created with moodle 2.4 and attforblock plugin. Then I must delete new attendance activity to have only the previous.

Thanks a lot

 
Average of ratings: -
Picture of Dan Marsden
Re: Attendance update - new maintainer
Group DevelopersGroup Moodle Course Creator Certificate holdersGroup Particularly helpful MoodlersGroup Plugins guardiansGroup TestersGroup Translators

I'm not sure what you mean - perhaps you could take some screeshots of the errors you are seeing?

 
Average of ratings: -
Picture of cormier chris
Re: Attendance update - new maintainer
 

Hi,

Sorry, auto attendance plugin is a solution to my request.

Thanks a lot.

 
Average of ratings: -
Picture of Paul LaRiviere
Re: Attendance update - new maintainer
 

Hi Dan,

Kudos for stepping up to maintain the Attendance add-ons.

This week I installed the most recent version of moodle-mod_attendance cloned from your Github repo into a fresh installation of Moodle 2.4 and ran into a problem with the install.xml spec attempting to create the new attendance table. When I logged in as Site Admin, after installing the components in /mod/attendance/, I got an error message complaining that the PREVIOUS and NEXT attributes were incorrect. A check of your commit message in the git repo showed that you had recently removed those attributes in keeping with new XMLDB editor guidelines.

That change didn't make much sense to me until I found this page by Pavel Timoshenko explaining how his XSLT transform script 'correct-xmldb-format.xslt' saves developers from the tedious task of ensuring that those attributes are correctly inserted into an install.xml file. It's a great utility (and I have been previously bitten by not getting those attributes correctly inserted!), and when I ran your source through a transform engine with that script, and substituted the resulting XML into the mod/attendance/db/ directory, the installation ran to completion without a hitch.

My question is, did I miss completely miss something in the add-on's documentation (or elsewhere in Moodle support docs) that explained that procedure, or is it only an issue in a new (i.e. fresh) Moodle installation, rather than in an upgrade/update scenario? If that's the case, I think that adding a link in the Attendance doc page and Pavel's doc page would provide some helpful clarity to newbs like me.

 

Thanks,

Paul

 

 
Average of ratings: -
Picture of Dan Marsden
Re: Attendance update - new maintainer
Group DevelopersGroup Moodle Course Creator Certificate holdersGroup Particularly helpful MoodlersGroup Plugins guardiansGroup TestersGroup Translators

Hi Paul - I probably need to revisit the versions I have packaged - most of my testing has been done on 2.5 and higher which no longer requires prev/next - I'd incorrectly assumed that those were removed in 2.4 but I must have that incorrect.

Last week I generated a 2.3 version of my latest code which includes the old prev/next vars - I'll update the packages this week and make sure that the 2.4 version still includes those vars in the install.xml - thanks for the update!

 
Average of ratings: -
Picture of Dan Marsden
Re: Attendance update - new maintainer
Group DevelopersGroup Moodle Course Creator Certificate holdersGroup Particularly helpful MoodlersGroup Plugins guardiansGroup TestersGroup Translators

I've just modified the download versions in the plugins db so that the version with the prev/next has a Moodle version set to 2.3 and 2.4 and the other version is set for 2.5 and higher only - thanks for the info.

 
Average of ratings: -
Profile Picture
Re: Attendance update - new maintainer
 

Hi Dan, I'm new to this forum and I happen to get bumped on this topic as I am looking for a module to monitor the attendance of every courses. Where can I possibly download the module for attendance update? I'm using moodle ver 2.5. Thanks!

 
Average of ratings: -
Picture of Dan Marsden
Re: Attendance update - new maintainer
 
Average of ratings: -
DasNic
Re: Attendance update - new maintainer
 

Hi Dan,

Is there a way to disable the "common" feature or to only allow administrators access to it? I'd prefer my instructors to only be able to see their group attendance / report.

As of now, when they login and click report, it defaults to common and shows the attendance of participants from multiple groups. If they click "Take Attendance" and use the pulldown menu to show their own session, then they can click the "Report" tab and only see their class. If someone could steer me to where I need to go, that'd be great!

Using Moodle 2.5.1.

 
Average of ratings: -
Picture of Eddie None
Re: Attendance update - new maintainer
 

Hi Guys,

Having read through the post it appears there is a lot going on with this add-on. I am hoping someone will be able to help me with some code to create an ad-hoc report to show the individual students attendance from all courses for the week and term/semester. Equally I am hoping someone could point me in the right direction to find the marks in the database system. The individual course reports available to teachers are great but where to I find the code to help me create my own.

Thanks in advance for your help

Using Moodle 2.52+

 
Average of ratings: -
Picture of Mykl Belfatto
Re: Attendance update - new maintainer
 

I've come across the same prblem...in Attendance Report, it shows the group plus all "Common"

 
Average of ratings: -
Picture of Dan Marsden
Re: Attendance update - new maintainer
Group DevelopersGroup Moodle Course Creator Certificate holdersGroup Particularly helpful MoodlersGroup Plugins guardiansGroup TestersGroup Translators

there have been a few changes to the way groups are managed since the last post - make sure you're using the latest code - if it's still doesn't do exactly what you are after feel free to create a new feature request in the tracker (use the add-ons project in the tracker and select Attendance - don't use the Moodle project as that is for core bugs.)

please make sure you include more detail than you have given in your forum post - explain exactly what you are looking for - screenshots or mock-ups are also useful. Think about ways to inspire me to work on the feature - funding helps (a lot) but if you politely and succinctly describe what you are looking for that can help a long way too.

It's unlikely I'll have time to work on the feature as a volunteer but occasionally I have some free time and feel inspired to work on the attendance code - so the better you can describe and detail the feature the more likely I might find it interesting to work on.

 
Average of ratings: -
Picture of Don Hinkelman
Re: Attendance update - new maintainer
Group Particularly helpful Moodlers

Hi Dan,

Thanks so much for your work. We love the Attendance Module and we will help with a few added features during the next year.  Perhaps you know that the Additional Name Fields functionality was added in Moodle 2.6.  Since we work in Japan, we really need display and sorting through multiple name sets and configurable name sets as well as student number.  So over the next 12 months we hope to get this into the Attendance module somehow.  We also need a configurable date format. We will keep you abreast and I hope our programmer can merge his additions smoothly with yours. I think he knows github well to do that. 

Cheers,   Don

P.S.  We have a block called Attendance Site Data which collects all Attendance data across a site.  Anyone can contact me directly if you interested.

 
Average of ratings: -
Picture of Dan Marsden
Re: Attendance update - new maintainer
Group DevelopersGroup Moodle Course Creator Certificate holdersGroup Particularly helpful MoodlersGroup Plugins guardiansGroup TestersGroup Translators

Hi Don - sounds great! - any chance you could add your block to the plugins db?

 
Average of ratings: -
Picture of Don Hinkelman
Re: Attendance update - new maintainer
Group Particularly helpful Moodlers

I just posted the attendance_csv_all code on a new forum thread here.  Sorry, I don't have time or expertise to get it into the plugins database.  Hope it helps! 

Don

 
Average of ratings: -