Your Moodle version

Activities: Attendance

Maintained by Picture of Dan Marsden Dan Marsden
A plugin that allows an attendance log to be kept. - includes an optional block for easy access to relevant functions.

The attendance module and block are designed to facilitate keeping an attendance log of the students. The instructor can  set the frequency of their classes (# of days per week & length of course) or create specific sessions. To take attendance, the instructor clicks on the "Update Attendance" button and is presented with a list of all the students in that course, along with configurable options and a Remarks textbox (The default options provided are: Present, Absent, Late & Excused). Instructors can download the attendance for their course in Excel format or text format.

Attendance sessions can also be configured to allow students to submit their record.


This plugin is part of set Attendance.


Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4


Picture of Dan Marsden
Dan Marsden (Lead maintainer)
Artem Andreev: Previous maintainer/developer
Picture of Dmitry Pupinin
Dmitry Pupinin: Original author
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Alberto Brandi
    Thu, Apr 23, 2015, 4:38 AM
    hello i have installed this plug-in on moodle 2.8.5 and NOT work. When i install from "install now" add on activities click on it ...SERVER ERROR!!!!
  • Picture of Dan Marsden
    Thu, Apr 23, 2015, 8:40 AM
    HI Alberto, that's probably not an issue with the attendance plugin but likely an issue with your server or configuration. Please turn debugging on( to obtain more information then ask for further help in the community forums on
  • Picture of Alberto Brandi
    Sat, Apr 25, 2015, 2:41 PM
    ok but i have to install all the set of Attendance? can you give me the link pease?
  • Picture of Dan Marsden
    Tue, Apr 28, 2015, 6:46 AM
    All the relevant links are provided above. If you continue to experience difficulty, please ask for further help in the community forums.
  • Picture of Chris Clark
    Fri, Jun 26, 2015, 5:17 AM
    Hi Dan,

    Loving the plugin, teachers find it very easy to keep track of students.

    I do have one question about the visibility of groups in my scenario:

    A teacher is in multiple groups.
    There are multiple attendance module instances with access restriction limiting them by group.
    Each individual instance only has sessions setup for a single group at a time.
    students are only ever in a single group.

    When a teacher enters and individual instance of the attendance module the filtering defaults to common if they are part of multiple groups and the list contains every group they are a part of.

    I'm wondering if it's possible to have this list only contain the groups that are involved in the instances sessions rather than every group a facilitator is a part of.

    Slightly unrelated but, is there any setup that can have teachers only able to view the sessions of groups they are members of?

    Thanks for your time

  • Picture of Dan Marsden
    Fri, Jun 26, 2015, 5:42 AM
    HI Chris,

    great to hear you find the plugin useful - Kudos goes to Artem for the work he did creating the plugin.

    Feature improvement is not something I am able to spend much time on as a volunteer, however many other people have contributed significant patches with various improvements. If you have someone internally that is able to help add the improvements you require I'm happy to review those changes for inclusion in the core version. Alternatively you could try contracting a Moodle Partner to help make the changes for you (I work for the Moodle Partner Catalyst IT)
  • Just wondering . . .
    Tue, Aug 11, 2015, 1:58 PM
    Dan, last week I had a request to see if Attendance reports could be exported out by cohort from a tutor at our Music school in Auckland. Any thoughts on this? Would it be a big fix?

  • Picture of Dan Marsden
    Tue, Aug 11, 2015, 3:47 PM
    Hey Derek, feel free to add that as a feature request in the github tracker. We have some incoming improvements ( to the reports but nothing that adds cohort information that I'm aware of at this stage.
  • Picture of Bill Junkin
    Fri, Aug 14, 2015, 12:54 AM
    Hi, Dan,
    We have written a Moodle module for in-class polling called IPAL (In-class Polling for All Learners). At the request of the Moodle team at the University of Jerusalem I have added a utility so that teachers who use your Attendance module can easily use ipal to take attendance.
    If have posted this latest version at and will soon move this version into the official Moodle site for this module ( There is nothing that you have to do, but since ipal now can interact with your wonderful attendance module, I wanted you to know of this development.
    In case you are interested, here is how this works.
    1) A teacher sets up at least one attendance instance with at least one session in the course.
    2) In the ipal interface that allows the teacher to create polling questions, there is now an option to add one or more "Attendance questions." If the teacher selects this option, the ipal program parses the database and displays all the sessions already created in that course. The teacher can select one or more of these sessions and the ipal "Attendance Question(s)" are automatically created.
    3) In class when the teacher sends an Attendance Question to the students a unique number is generated and displayed to the teacher beside the question. The teacher can then give this unique number to all the students present in the class at that time. The Attendance Question asks the students to enter this unique number.
    4) At any time the teacher can click on a button in ipal beside a given Attendance Question requesting ipal to "Update Attendance." The ipal program then parses all the student answers to that particular question and every student whose answer matches the unique number for that Attendance Session is automatically marked present.
    Students can use any device with a browser to answer the ipal questions. Since ipal also has Apps for both the Android and the iOS smart phones, students can also use these apps on their smart phones to answer questions. At any time the teacher can go in by hand and update the attendance record. (Students that don't have a device (or the battery on their device is dead) can answer the question on a piece of paper and turn it in and the teacher can mark them present by hand.) However, we think that this may greatly facilitate using your module to take attendance.
    If you ever change the names of tables or fields in the tables if you will let me know, I will appreciate it, since the ipal script (obviously) interacts directly with the tables in your module.
    If you want more information or want to discuss this in greater detail, I will be happy to discuss this with you.
  • Picture of Dan Marsden
    Fri, Aug 14, 2015, 5:28 AM
    Thanks Bill - sounds interesting. It would probably make sense to write some shared functions that you could leverage from within the attendance lib files to use instead of direct access to the db - that way if the structure in the attendance plugin changes, as long as the internal functions are adjusted your plugin shouldn't care which version of the attendance is installed.
    Daniel Neis started to add some web-services functions which also made some of the internal functions more generic:
    He didn't finish that off in the end but if that code got revived it could provide some more generic methods for you to leverage.
    I'll try to remember to get in touch if that work gets finished off.
  • Picture of Bill Junkin
    Fri, Aug 14, 2015, 6:07 AM
    Hi, Dan -- Having something like an API within the attendance code that I and others could use probably would be useful. (Ipal can also interact with the EJS module ( so that EJS simulations that are created in a course can be included in a polling question, and the ipal code uses an API that the EJS module authors created.) This would insure that you could change the attendance module as you wished and, as long as you also updated the API, nothing would get broken. However, I would recommend that we see if this becomes very popular before you spend much time on this. If work on that "gets revived" it probably would be useful if I sent you a list of all the queries that ipal makes on attendance tables.
  • Picture of Helen Foster
    Tue, Aug 25, 2015, 5:55 PM
    I'm pleased to announce that the Attendance module has received the Featured Moodle plugin award! See the post Featured plugin: Attendance module for an interview with Dan.

    Many thanks Dan, Artem and all other contributors for your work.
  • Just wondering . . .
    Wed, Aug 26, 2015, 5:20 AM
    Suggestion for enhancement, filter by cohort:
    And well deserved FMP award. Great plugin. and Responsiveness from Dan is about as good as you can get.

  • Picture of Carlos Alberto Utrera Burgal
    Tue, Sep 1, 2015, 7:50 PM
    Good afternoon (almost here) Dan.

    I was iupgrading my moodle version (from 2.3.1+ to 2.9) using cli. After login I gone to notifications and saw that i missed attendance and other modules. After I have uploaded new versions y have clicked on upgrade and got this error:

    Debug info: Table 'attendance' already exists
    CREATE TABLE attendance (
    id BIGINT(10) NOT NULL auto_increment,
    course BIGINT(10) NOT NULL DEFAULT 0,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
    grade BIGINT(10) NOT NULL DEFAULT 100,
    , KEY atte_cou_ix (course)
    ENGINE = InnoDB
    DEFAULT COLLATE = utf8_unicode_ci
    COMMENT='Attendance module table'
    CREATE TABLE attendance_sessions (
    id BIGINT(10) NOT NULL auto_increment,
    attendanceid BIGINT(10) NOT NULL DEFAULT 0,
    groupid BIGINT(10) NOT NULL DEFAULT 0,
    sessdate BIGINT(10) NOT NULL DEFAULT 0,
    duration BIGINT(10) NOT NULL DEFAULT 0,
    lasttaken BIGINT(10),
    lasttakenby BIGINT(10) NOT NULL DEFAULT 0,
    timemodified BIGINT(10),
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
    descriptionformat TINYINT(2) NOT NULL DEFAULT 0,
    studentscanmark TINYINT(1) NOT NULL DEFAULT 0,
    , KEY attesess_att2_ix (attendanceid)
    , KEY attesess_gro2_ix (groupid)
    , KEY attesess_ses2_ix (sessdate)
    ENGINE = InnoDB
    DEFAULT COLLATE = utf8_unicode_ci
    COMMENT='attendance_sessions table retrofitted from MySQL'
    CREATE TABLE attendance_log (
    id BIGINT(10) NOT NULL auto_increment,
    sessionid BIGINT(10) NOT NULL DEFAULT 0,
    studentid BIGINT(10) NOT NULL DEFAULT 0,
    statusid BIGINT(10) NOT NULL DEFAULT 0,
    statusset VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
    timetaken BIGINT(10) NOT NULL DEFAULT 0,
    takenby BIGINT(10) NOT NULL DEFAULT 0,
    remarks VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
    , KEY attelog_ses2_ix (sessionid)
    , KEY attelog_stu2_ix (studentid)
    , KEY attelog_sta2_ix (statusid)
    ENGINE = InnoDB
    DEFAULT COLLATE = utf8_unicode_ci
    COMMENT='attendance_log table retrofitted from MySQL'
    CREATE TABLE attendance_statuses (
    id BIGINT(10) NOT NULL auto_increment,
    attendanceid BIGINT(10) NOT NULL DEFAULT 0,
    acronym VARCHAR(2) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    description VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    visible TINYINT(1) NOT NULL DEFAULT 1,
    deleted TINYINT(1) NOT NULL DEFAULT 0,
    , KEY attestat_att2_ix (attendanceid)
    , KEY attestat_vis2_ix (visible)
    , KEY attestat_del2_ix (deleted)
    ENGINE = InnoDB
    DEFAULT COLLATE = utf8_unicode_ci
    COMMENT='attendance_statuses table retrofitted from MySQL'
    Error code: ddlexecuteerror

    Stack trace:

    line 449 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
    line 905 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
    line 76 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
    line 412 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
    line 364 of /lib/ddl/database_manager.php: call to database_manager->install_from_xmldb_structure()
    line 671 of /lib/upgradelib.php: call to database_manager->install_from_xmldb_file()
    line 424 of /lib/upgradelib.php: call to upgrade_plugins_modules()
    line 1630 of /lib/upgradelib.php: call to upgrade_plugins()
    line 433 of /admin/index.php: call to upgrade_noncore()

    Seem like instead of updating tables script is trying to create them and mysql launch an error because the table already exists.

    Could you help me.

    Thanks and best regards.

    PS: this is no my production modle site, is a test site in order to upgrade it and check possible problems ans errors.
  • Picture of Dan Marsden
    Wed, Sep 2, 2015, 5:28 AM
    Carlos - it sounds like you have the old attforblock plugin installed. The last version that supported migration from that code was the 2.7 version of the mod_attendance code. it's called in the version.php file here:

    as your db is in a corrupt state you may need to start the upgrade process all over again.
1 2 3 4 5
Please login to post comments