## Attendance (plugin)

### New BETA version of Attendance (v2.2.0)

This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
New BETA version of Attendance (v2.2.0)

Hi!

• Implemented ability to add two types of sessions: common and group.
• Some interface improvements (sessions filtering by different criteries)
for manage.php, report.php, view.php.
• For redirecting from the block is taken into account the situation
when the current time are a few sessions.

Some screeshots: http://dropmocks.com/mKXRu

Also small change to block "Attendance": https://github.com/andreev-artem/moodle_blocks_attendance/commits/master/

Also I have course report for printing users attendances. Version 0.0.1a Can export attendance table (all taken sessions) for selected group to rtf. At this moment I don't publish it because of module is in early stage of development. But if someone needed in it, tell me...

Average of ratings: Useful (3)
Re: New BETA version of Attendance (v2.2.0)

Common and group sessions is a great addition!  I look forward to giving this a try this afternoon.

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

hey hii thats gr8!!

we are taking attendance little differently since there few needs like...

subjectwise attendance , which teacher have taken attendance, and subjectwise percentage where in it must highlight defaulters (such as <75%).

but how to acheive this?can we put some efforts to acheive this?

we are replaceing and adding more fields for subjects as shown here in image...

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)
Sorry, I do not quite understand what you mean.

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Going to give this a go. Might even be handier and maybe it will solve my problem with the All taken and Months reports disappearing.

Will report back.

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

So far its looking good!

All is working as it should now with the data showing up corectly. Part of the problem was me not having put in data, while thinking I had and using the wrong datas. Tricky what late nights can do to you

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Hi, this is the spanish language for v2.2.0

• About 10 news strings into attforblock.php (es_utf8)

It is possible to add "start of period" into export tab.

Thanks

Average of ratings: Useful (1)
Re: New BETA version of Attendance (v2.2.0)

Hello, Enrique!

Sorry for the delay in replying. Development for Moodle is not my main job. Therefore, I sometimes can answer with a considerable delay.

Language strings committed.

> It is possible to add "start of period" into export tab.

Is it feature request or you have patch?

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Hello Artem, thanks

"Start of period" is a featured request, something like this

Thanks again

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

I propose to remove option "Include not taken sessions" (I think it isn't necessary) and simply use date of first sessions as default value for "Start period" and today for "End of period". If a user needs a different range of dates, he will be able to change a certain value.

I think this approach is more explicit and convenient. Wait for comments/suggestions and later implements the proposal.

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

IMHO, it would be nice to keep the "Include not taken sessions" checkbox. Sometimes I plan to teach one day but something exceptional happens (i.e. extracurricular activities) and there is no teaching. The checkbox allows me to export those special days into the spreadsheet so I can take them into account.

We can accomplish the removal effect you proposed just switching the default value to "No".

Regarding the start and end period, I agree with you. I could implement the functionality if you don't have enough time to do so.

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

I can not remember why I thought this option unnecessary It seems I was wrong.

> Regarding the start and end period, I agree with you. I could implement the functionality if you don't have enough time to do so.

I would be grateful for it.

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Done and tested!

I added a new checkbox which selects all the sessions. When checked, it disables the date fields because they are no longer needed.

One remark: the default start of period is the course start date. It's easier to get it (it's on the course settings) than the first session date and the practical effect should be the same.

You can pull the changes from the latest commit in the test branch...

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Hi Luis, Love the work your doing on the attendance module. Is is stable enough do you think to install it to our current 1.9.10 implementation?

Regards,

Grant Beevers

Brisbane, Australia

grant.beevers@endeavour.edu.au

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Hi Artem,

I'd like to ask you for permission to use your work as the codebase for some new ideas regarding the attendance module.

This is what I intend to implement:

1. Today sessions. When you list the available sessions in the activity it's annoying having to scroll to the present day. I'd like to show those sessions in the first place. (Already done!)
2. Grid view. For the people who are not good at matching faces with names, like me. It is also better for touchscreen devices like the iPad or a smartphone. (Already done!, just giving the finishing touches...)
3. Allow more than one attendance activity per course. I grade the attendance on each quarter, and I'd like to have independent grades in the gradebook for each one.
4. Copying attendance data from other sessions. In some subjects I teach more than 1 hour a day but I must take attendance in a hourly manner. This feature would allow me to easily copy the attedance data from the hour before and then modify it.
5. Fast session switching. It would be nice to have a quick way to switch from one session to another, especially if they are in the same day.

Some real screenshots of my (Work-In-Progress) Grid View:

By the way, Merry Xmas!

Best regards,
Luis-Ramón

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Here we go: for those interested I'm attaching a Git patch which enables switching between list view and grid view.

I hope it works... it's the first time I generate a patch with Git.

Best regards!

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Hello, Luis!

Sorry for the delay in replying. Development for Moodle is not my main job. Therefore, I sometimes can answer with a considerable delay.

With regard to your suggestions, I think they need a broader discussion. As a minimum, with the participation of Dmitry and A. T. Wyatt.

My thoughts:

1. Which page do you mean? And the 2.2 version of attendance already has "Day" view mode...

2. Need more statistics, who need this functionality.

I looked at the patch. I think - it's controversial issue whether we should change the database structure and store the settings for each attendance instance. Or each user can select the view mode (selection can be saved in user_preferences).

3. Requires more planning (attendance block, user reports, etc...)

4, 5. Need more statistics, who need this functionality.

Happy new year!

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Hi Artem,

Don't worry, I understand that developers use to work in many projects at the same time (and I'm including your job, family and friends in those projects ).

I know that the module is GPL'ed, but I always like to ask for permission because I think it's better to work on the same code branch than fork the project.

I'd like to explain some background information about my intentions: Our goal is to let Moodle become the standard "teacher notebook" in my school. Moodle, in its 1.9 base setup, provides a rather nice gradebook and also stores the students' profiles. Two months ago we determined that, in order to fulfil all the requirements for the notebook, we needed an "attendance" module and an "academic program progress" module. That is why I started test and analyzing the attendance module.

1. Yes, you're right. The 2.2 version supports "Day" view mode. I thought I had 2.2.0beta installed on my test system but it was an older version. Nice work, by the way!
2. The grid view mode really enhances the user experience when taking attendance with a touchscreen device (e.g. iPad or smartphone). It is also convenient when you still don't know your student faces . I made a, kinda adhoc, survey with other teachers and almost all liked the new view better that the old one. Anyway, my idea was to let the user switch views at will. I really like your idea about making an user preference instead of a instance setting.
3. Yesterday I made all the changes on my testing system and it seems to work. I'm now in the testing phase just to make sure it doesn't affect any existing functionality.
4. I do! I think it would be convenient for those who teach more than one session with the same students in the same day.
5. Refer to point 4.

As I said before, these changes are pointed to adapt the actual attendance module to our needs, which are not necessarily the needs of anybody else.

I'd really like to discuss the suggestions with Dmitry, A.T. Wyatt and you. Should I contact them directly with a more ellaborated proposal?

Happy New Year to you too!

P.S.: I found a bug in the styles.php in 2.2.0beta. The appended styles for support YUI dialogs are affecting the entire Moodle site. I'm attaching a fix.

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

> I found a bug in the styles.php in 2.2.0beta. The appended styles for support YUI dialogs are affecting the entire Moodle site. I'm attaching a fix.

Thanks. Commited.

> Should I contact them directly with a more ellaborated proposal?

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

I took away the changes in the database structure for the grid mode. As you said, it's actually more convenient to store that info in the user preferences table (thanks for the idea!).

About allowing multiple instances, as you know, sessions and statuses where referred by 'courseid' in the database. So, in order to distinguish more than one instance in the same course, I had to add one field ('attendanceid') to attendance_sessions and attendance_statuses. I also studied the code thoroughfully and fixed the places where 'courseid' was taken as the module id or used in filters. Also I took into account the new field when creating new records.

So far, it works:

• Updating from an old version adds the new fields on the database and updates its value.
• Creating more than one instance in the same course is allowed.
• Attendance sessions are not shared among instances.
• Attendance logs put the attendance data in the right instance.
• Reports and exports work right, showing only the sessions belonging to the instance.
• Gradebook shows as many instances as you have, with different and independent grades.
• Backup and restore also seems to work. By the way, I've kept the backup format untouched (so it's backward compatible with old backups). I still have to test restoration in a different platform, through.

I'm looking forward to test grouping, as I don't have a real course with groups enabled. Is there any other test cases you find interesting?

I am attaching a diff related to the head on your repository. It's from my 'test' branch (I'm really get excited on git workflow...)

On the to-do list:

• I have to modify both index.php and the 'attendance block' to show the list of the instances (they assume only one!).
• I've also added a new user preference (attforblock_showendtime) which allows showing the time when a sessions ends instead of its duration (for those cases where is more useful to the teacher). I still have to add a button to switch the pref.

Best regards!

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Hello, Luis!

I plan to look at a patch in the next few days. Maybe you have accumulated some other changes?

Have you changed manually patch? Please do not delete section with credentials. Then git can not recognize the format of the patch and take into account your contribution to the development.

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Hello, Luis!

I looked at the diff.

Enable please maximum debug level and debugdisplay on your development server. Then you can see PHP notices. For example, in manage.php you must declare $showendtime as global. Grid view mode works good for me. I only suggest define view modes as constants. Allowing multiple instances don't work for me. On page attendances.php I have error 'Found more than one record in get_record_sql !'. This means that you need to fix query to the database so that it returns only one necessary instance. I think the debug mode should help with the remaining invalid database queries. P.S. Send please patches not diffs. Git patches contain your credentials for commits. Average of ratings: - Re: New BETA version of Attendance (v2.2.0) Hello Artem, Sorry about any inconvenience with my patches... I'm still getting used to the Git workflow and Moodle coding guides About the "view modes" constants, I agree as it's easier to interpret and to maintain. Sometime in the future I intend to add a customized view where you can move the students in order to match the real placement in the classroom. My latest changes are always in the "test" branch on my fork. Should I generate patches with git format-patch? (still learning!) I will have a look into the get_record_sql error. It does work for me, but it's true that I ignored the debug level... Thank you! Average of ratings: - Re: New BETA version of Attendance (v2.2.0) > My latest changes are always in the "test" branch on my fork. Should I generate patches with git format-patch? (still learning!) No. Now I can work with your code. Average of ratings: - Re: New BETA version of Attendance (v2.2.0) I just fixed the$showendtime problem. I also added view modes as constants in locallib.php.

Regarding the get_record_sql errors, I switched on debug mode and reviewed (and corrected) all the queries.

I'm still getting this on manage.php:

Notice: Undefined variable: sessiontypeselector in /home/ixl03065/public_html/informatica/moodle-test/mod/attforblock/locallib.php on line 508

I'm reviewing the code (you wrote it, didn't you?). If print_filter_controls() is called with \$printselector=SESSION_TYPE_SELECTOR but group mode is none, the variable doesn't get defined. Should I initialize it with an empty string?

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

All the intended features are now implemented. I've done some testing, but some nasty bugs could be inside so I still don't recommend upgrading on production servers.

Please, don't hesitate in giving feedback...

Best regards!

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Hello, Luis!

I've added you as contributor to moodle_mod_attforblock and moodle_blocks_attendance. Now we can work with one repo.

Also I've created branches MDL_19 and v2.3. Branch v2.3 contains your improvements and some fixes from me. I think v2.3 needs some time to test. Branch MDL_19 will be contain lastest release for Moodle 1.9. If you do not plan any changes for version 2.3, you (or I ) can create a branch MDL_20 and start porting.

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

I thought a branch for porting should be named WIP_MDL_20 (work in progress), to make it clear that work is not finished yet. When major changes are implemented, we rename it to MDL_20. V2.3 branch I probably will not be renamed, since has given people a link to it.

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Thanks for taking care of all the setup!

I will use now to your repository for both 2.3 and WIP_MDL_20 branches.

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Hi,

I've been auditing the 2.3 source code and I didn't find any bug in the last four days so, today, I decided to move it to my production server. It seems to work flawlessly.

Does anyone have any comments about it? If there are not strange behaviours nor any pending feature requests, I could now spend 100% of my free (but scarce ) time into the porting to Moodle 2.0.

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

What is the setup of this module and I will test it on a live, but limited, site.

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

You can download the latest v2.3 beta version from this URL: (ZIP package)

https://github.com/andreev-artem/moodle_mod_attforblock/zipball/v2.3

You should decompress the archive on the mod/ folder of your Moodle setup and browse to admin/index.php for installing or upgrading the database.

From that point, you can add Attendance activities in any course you want.

Best regards!

P.S.: Take into account that downgrade is not possible because of some changes in the database

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Kindly explain the procedure now to install the module..... do we still need the blocks or not or installation is now simply the extraction into the mod ... also a script that drop all the attendance related tables so that if we update or re-install it dont mess up

thanks

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

The mod folder should be enough if you don't need the block. The database should upgrade itself when you install the new version, just remember to head to the admin menu and select "Notifications" on the top.

Once upgraded, you cannot use older versions anymore as the table layout is different.

If you want to drop all the attendance tables and start from scratch, you can follow these instructions.

Good luck!

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

So, this is working with Moodle 2.0?   Is there somewhere that I can get this to run on my test site?  I too am waiting for this to be fixed before upgrading.

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)
No, at this moment v2.2.0 doesn't work with Moodle 2.0.

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

How is the beta going atm and which version should I get for a live server?

Is this:

http://moodle.org/mod/data/view.php?d=13&rid=1062

still the most recent stable version?

I really like some of the new options, but don't know how much trouble I will get into if I start using it. Recommendations please.

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

I've used the Artem's 2.2.0beta for a whole week in a production server without any big issues. 2.3.0beta needs some further testing (altough it's currently used in my production server).

Notice that it's not possible to downgrade from 2.2.0/2.3.0 to 2.1.0: If you want to stay on the safe path, I would install the 2.1.0 stable version you linked and wait for some weeks to polish any rough edge that may be still hidden on the beta versions. You can upgrade later easily.

Drop me some lines if you need further advice...

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

I was running 2.2.0 for a few weeks now and it seems to wrok correctly. But only with test courses and not in all classes.

I'll revert back to 2.1.0 as you suggest and upgrade to the newest version later. Still with all the courses starting soon I think that will be over the summer.

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Installed the latest 2.3.0 version for now. So hard to go back to 2.1.0

Would love to run with this, but it might be tricky?

Going to run some test with it. Special area's I should focus on?

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

I think the less tested areas are backup/restore and groups with multiple instances of the activity in the same course. Anyway, any suggestion about improving usability or optimizing the workflow will be welcome.

Thanks!

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Luis and Artem,

Brilliant! In fact, double plus brilliant. I have just been wrestling with the current Attendance module trying to figure out how to implment separate instances for grading Attendance and Participation. I will be poking it thoroughly in the next couple of days on 1.9.9. Thanks for all the hard work on this one guys! Much appreciated.

Интендантство для Верховного Совета Академичного Мудлэрс

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

#Luis Ramón I have installed the last Beta module from 08/Apr/11 (Attendance Fixed) for MOODLE 2.0 and I want to ask some issues: 1.-Say me "There is no session".... because it is empty. I have installed without problems, added to one course, but what should I do now? can you give me a Clue? 2.-When I try to delete several session at once added manually give me errors. Not deleting one by one. Do you have the same problem? I ask to you because you say that you have installed properly. Thanks

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Hi,

I don't know what the problem is as I didn't finished the porting to Moodle 2.0. The code you installed is from Sergey Vidusov.

Did you install 2.2.0 or 2.3.0 before? If that's the case, the table layout has been upgraded and is not compatible with the module you downloaded.

Regards!

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Hi Luis

I love your ideas for the Attendance Module. I'm using the Artem version found here: http://github.com/andreev-artem/moodle_mod_attforblock/zipball/MDL_23

Which version did your work end up in? I was wondering what's happening with the mod and would love to contribute in usability testing and brainstorming some more enhancements. I'm not equiped with the skills in mysql and php yet to develop for it, but I wish I could pick it up and help in some way. A feature we are all dying to see is multiple session marking on one page. For example, a week in a grid on a single page. Either that or a whole new thinking about attendance, rather than grids and individual pages, a wizard or step-through form of some kind.

Thanks for reading my message. Ciao

Average of ratings: -
Re: New BETA version of Attendance (v2.2.0)

Hope this is the right place to note bugs!

I just installed the attendance block and mod on moodle 2.03 and noticed that whenever i try to delete sessions (multiple) using the dropdown choice at the bottom of the attendace page it gives me this error:

Coding error detected, it must be fixed by a programmer: PHP catchable fatal error

It would be really helpful to be able to use the multiple session delete rather than one by one. thought you should know.

Average of ratings: -