Auto Attendance Block
Maintained by
Fumikazu Iseki
This autoattend block is modification of the Attendance block by Mr. Dmitry Pupinin (v1.0.8, 2007).
In addition to the original manual mode, automatic attendance mode (from the access log of Moodle) and semi-automatic attendance mode (user clicks a link) are also possible.
Comments
Comments are no longer open for new posts. Existing comments remain available to read.
After investigating the incorrect time issue, I found that the above code (fix) is still not correct, since if I comment it out, the time which is used by the module is correct again.
Please be more specific.
Do you mean that when you checked the summer time setting in the attendance module, and attendance block is not reflected?
Thanks.
That is certainly incorrect.
I have now fixed the problem.
To fix it, please uncheck "Use Timeoffset of the Timezone" in the block settings or download a newer version using SVN.
# svn co http://www.nsl.tuis.ac.jp/svn/php/autoattend/trunk/ autoattend
Thanks.
Correct code
--------------------------------------------------------------
$TIME_OFFSET = 0;
if (property_exists($CFG, 'use_timeoffset')) {
if ($CFG->use_timeoffset) {
//
$ver = jbxl_get_moodle_version();
if ($ver>=2.7) {
if (is_numeric($CFG->timezone)) {
$TIME_OFFSET = $CFG->timezone*ONE_HOUR_TIME;
}
else {
$dtz = new DateTimeZone($CFG->timezone);
$now = new DateTime("now", $dtz);
$TIME_OFFSET = $dtz->getOffset($now);
}
}
} else {
if (jbxl_is_admin($USER->id)) {
if (is_numeric($USER->timezone) && $USER->timezone!=99) {
$TIME_OFFSET = $USER->timezone*ONE_HOUR_TIME;
}
else if (is_numeric($CFG->timezone) && $CFG->timezone!=99) {
$TIME_OFFSET = $CFG->timezone*ONE_HOUR_TIME;
}
}
}
}
}
Translated with www.DeepL.com/Translator (free version)
I have a problem with setting up a new session.
My platform is set to the Polish language, and the following message is associated with it:
Time type dzieńs is not supported by html_writer::select_time().
I have a question, do you meet similar messages on your platforms?
Automatic presence checking is GREAT, it would be hard without a properly working plug-in. So far it has worked properly, I wonder if it is related to the MOODLE version or something in the configuration.
I would be grateful for tips on how to solve this problem.
Regards
Currently under debugging.
You can download the development version from the sunversion repository.
http://www.nsl.tuis.ac.jp/svn/php/autoattend/trunk/
http://www.nsl.tuis.ac.jp/svn/php/autoattendmod/trunk/
Support for moodle4 is also being checked.
Thanks.
Invalid get_string() identifier: 'autoattend:myaddinstance' or component 'block_autoattend'. Perhaps you are missing $string['autoattend:myaddinstance'] = ''; in /var/www/html/elearning/blocks/autoattend/lang/en/block_autoattend.php?
line 353 of /lib/classes/string_manager_standard.php: call to debugging()
line 7282 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 2589 of /lib/accesslib.php: call to get_string()
line 2434 of /lib/accesslib.php: call to get_capability_string()
line 118 of /admin/roles/classes/capability_table_base.php: call to get_capability_docs_link()
line 135 of /admin/roles/classes/capability_table_with_risks.php: call to core_role_capability_table_base->display()
line 708 of /admin/roles/classes/define_role_table_advanced.php: call to core_role_capability_table_with_risks->display()
line 257 of /admin/roles/define.php: call to core_role_define_role_table_advanced->display()
I don't know about 4.0 because I have never used it before.