Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.10
    • Component/s: Module: Attendance
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      21129

      Description

      Dmitry - Based on the discussion at http://moodle.org/mod/forum/discuss.php?d=153783#p672663 and http://moodle.org/mod/forum/discuss.php?d=153724 it is apparent that there is interest for getting the attendance package (mod and block) updated for use in Moodle 2.0. Let me know how I can be of help and any issues you run into and I will do my best to guide you through them. Peace - Anthony

        Activity

        Hide
        Dmitry Pupinin added a comment -

        Anthony, I use GIT for working with Moodle's sources. Is it possible to use GIT with Contrib?

        Show
        Dmitry Pupinin added a comment - Anthony, I use GIT for working with Moodle's sources. Is it possible to use GIT with Contrib?
        Hide
        Anthony Borrow added a comment -

        Dmitry - I need to check and see. I believe there is growing interest in GIT among the Moodle developers but I do not know where things currently stand. I will post back when I hear something and have invited some others to comment in the tracker with their suggestions. Peace - Anthony

        Show
        Anthony Borrow added a comment - Dmitry - I need to check and see. I believe there is growing interest in GIT among the Moodle developers but I do not know where things currently stand. I will post back when I hear something and have invited some others to comment in the tracker with their suggestions. Peace - Anthony
        Hide
        Daniel Neis added a comment -

        Hello, Dmitry

        you can use git-cvsexportcommit (http://www.kernel.org/pub/software/scm/git/docs/v1.5.6.6/git-cvsexportcommit.html) to send changes from git to cvs, and git-cvsimport (http://www.kernel.org/pub/software/scm/git/docs/git-cvsimport.html) to import changes from cvs into git.

        Show
        Daniel Neis added a comment - Hello, Dmitry you can use git-cvsexportcommit ( http://www.kernel.org/pub/software/scm/git/docs/v1.5.6.6/git-cvsexportcommit.html ) to send changes from git to cvs, and git-cvsimport ( http://www.kernel.org/pub/software/scm/git/docs/git-cvsimport.html ) to import changes from cvs into git.
        Hide
        Anthony Borrow added a comment -

        Daniel - Thanks for the links to the git cvs import and export commands! I've not had the chance to learn git yet. Peace - Anthony

        Show
        Anthony Borrow added a comment - Daniel - Thanks for the links to the git cvs import and export commands! I've not had the chance to learn git yet. Peace - Anthony
        Hide
        Anthony Borrow added a comment -

        Dmitry - Now that Moodle 2.0 is officially released, do you have an estimate on when you might have the migration work finished. Is there anything that the watchers can do to help. Let me know if there is anything I can do to be of assistance. Peace - Anthony

        Show
        Anthony Borrow added a comment - Dmitry - Now that Moodle 2.0 is officially released, do you have an estimate on when you might have the migration work finished. Is there anything that the watchers can do to help. Let me know if there is anything I can do to be of assistance. Peace - Anthony
        Hide
        Mack Murray added a comment -

        Hello Dmitry,
        Your attendance module is the most important part of Moodle for our corporate clients and we cannot overstate its usefulness. Not having this module is the only thing preventing us from moving to 2.0 so we'd like to offer you whatever help we can.

        Show
        Mack Murray added a comment - Hello Dmitry, Your attendance module is the most important part of Moodle for our corporate clients and we cannot overstate its usefulness. Not having this module is the only thing preventing us from moving to 2.0 so we'd like to offer you whatever help we can.
        Hide
        Aaron Cowell added a comment -

        Is funding an issue? We were close to completely implementing the 1.9 Attendance but didn't because Moodle 2.0 was around the corner and we're ready to move to 2.0 but really want the attendance module. I'm pretty sure I can pass some funding to someone if it'll get this module moving...

        Thanks for all the work already done!

        Aaron

        Show
        Aaron Cowell added a comment - Is funding an issue? We were close to completely implementing the 1.9 Attendance but didn't because Moodle 2.0 was around the corner and we're ready to move to 2.0 but really want the attendance module. I'm pretty sure I can pass some funding to someone if it'll get this module moving... Thanks for all the work already done! Aaron
        Hide
        Ashley Holman added a comment -

        Hi -

        What is the status of the Attendance module upgrade for 2.0?

        One of our clients requires this and hence we will be doing the development work. Has work started yet or should we get started based on the 1.9 code?

        Cheers

        Show
        Ashley Holman added a comment - Hi - What is the status of the Attendance module upgrade for 2.0? One of our clients requires this and hence we will be doing the development work. Has work started yet or should we get started based on the 1.9 code? Cheers
        Hide
        Artem Andreev added a comment -

        Hi, Ashley!

        I had planned to begin porting after making the planned changes (http://moodle.org/mod/forum/discuss.php?d=162960#p724169). But it is likely to take up a lot of time. Therefore, perhaps you should consider porting yourself, if you need a version for Moodle 2.0 as soon as possible.

        Show
        Artem Andreev added a comment - Hi, Ashley! I had planned to begin porting after making the planned changes ( http://moodle.org/mod/forum/discuss.php?d=162960#p724169 ). But it is likely to take up a lot of time. Therefore, perhaps you should consider porting yourself, if you need a version for Moodle 2.0 as soon as possible.
        Hide
        Anthony Borrow added a comment -

        Ashley - It appears Dmitry is not responding so he may have moved on to other things. Would you be interested in serving as the primary maintainer if Dmitry is no longer available? Peace - Anthony

        Show
        Anthony Borrow added a comment - Ashley - It appears Dmitry is not responding so he may have moved on to other things. Would you be interested in serving as the primary maintainer if Dmitry is no longer available? Peace - Anthony
        Hide
        Anthony Borrow added a comment -

        I'm linking these issues so that when the 2.0 version is worked on we might ensure that the data is being sanitized. Peace - Anthony

        Show
        Anthony Borrow added a comment - I'm linking these issues so that when the 2.0 version is worked on we might ensure that the data is being sanitized. Peace - Anthony
        Hide
        Luis Ramon Lopez added a comment -

        What do you think about defining the stages that we should take into account in the migration? Some kind of task list.

        We could setup a git branch to work on it and push/pull changes as the migration goes on.

        Also, this way would allow us to work in parallel in different aspects.

        Show
        Luis Ramon Lopez added a comment - What do you think about defining the stages that we should take into account in the migration? Some kind of task list. We could setup a git branch to work on it and push/pull changes as the migration goes on. Also, this way would allow us to work in parallel in different aspects.
        Hide
        Anthony Borrow added a comment -

        Luis - Feel free to start up a git branch and publish it here so that folks can participate. The only checklist like resource we have at the moment which is in need of improvement is http://docs.moodle.org/en/Development:Migrating_contrib_code_to_2.0. Let me know how I can be supportive. Peace - Anthony

        Show
        Anthony Borrow added a comment - Luis - Feel free to start up a git branch and publish it here so that folks can participate. The only checklist like resource we have at the moment which is in need of improvement is http://docs.moodle.org/en/Development:Migrating_contrib_code_to_2.0 . Let me know how I can be supportive. Peace - Anthony
        Hide
        Luis Ramon Lopez added a comment -

        I'm still reading through those Moodle Docs pages related to the migration. I expect to compile a to-do list in a few days with the changes that need to be applied.

        Should I start working on the old but stable Dmitry's 2.1.0 or Arteem's beta version? There are a lot of improvements on the later one...

        Show
        Luis Ramon Lopez added a comment - I'm still reading through those Moodle Docs pages related to the migration. I expect to compile a to-do list in a few days with the changes that need to be applied. Should I start working on the old but stable Dmitry's 2.1.0 or Arteem's beta version? There are a lot of improvements on the later one...
        Hide
        Anthony Borrow added a comment -

        Luis - I would go with the new and improved version and lets see if we can make the 2.0 version as awesome as possible. That will give Dmitry the option of pulling in whichever code he thinks is best but also give a version that is as fully functional to others. Peace - Anthony

        Show
        Anthony Borrow added a comment - Luis - I would go with the new and improved version and lets see if we can make the 2.0 version as awesome as possible. That will give Dmitry the option of pulling in whichever code he thinks is best but also give a version that is as fully functional to others. Peace - Anthony
        Hide
        Luis Ramon Lopez added a comment - - edited

        Ok, I'm done with database changes. Now I'm involved into update the page display issues. I hope to have a test version (with many bugs inside) that anyone can test real soon.

        I'm committing everything at git://github.com/andreev-artem/moodle_mod_attforblock.git into the branch WIP_MDL_20. You can browse and download the branch using this link: https://github.com/andreev-artem/moodle_mod_attforblock/tree/WIP_MDL_20

        By the way, it seems backup/restore functionality will be the last bit that will be migrated.

        Show
        Luis Ramon Lopez added a comment - - edited Ok, I'm done with database changes. Now I'm involved into update the page display issues. I hope to have a test version (with many bugs inside) that anyone can test real soon. I'm committing everything at git://github.com/andreev-artem/moodle_mod_attforblock.git into the branch WIP_MDL_20. You can browse and download the branch using this link: https://github.com/andreev-artem/moodle_mod_attforblock/tree/WIP_MDL_20 By the way, it seems backup/restore functionality will be the last bit that will be migrated.
        Hide
        Anthony Borrow added a comment -

        Luis - Many thanks for helping out with this. Hopefully some of the folks watching will have some time to help you do some testing and give you some feedback here in the tracker. Peace - Anthony

        Show
        Anthony Borrow added a comment - Luis - Many thanks for helping out with this. Hopefully some of the folks watching will have some time to help you do some testing and give you some feedback here in the tracker. Peace - Anthony
        Hide
        Luis Ramon Lopez added a comment -

        Just some info about the Work-In-Progress:

        It seems that the page display issues will take more time to solve than I expected. There is a lot of legacy output code that needs to me migrated and I'm considering rewriting it for scratch.

        I also found some problems with the YUI integration that Arteem included in 2.2.0beta. I still don't fully understand the new way in 2.0 for including Javascript libraries. May be he is able to fix it.

        Show
        Luis Ramon Lopez added a comment - Just some info about the Work-In-Progress: It seems that the page display issues will take more time to solve than I expected. There is a lot of legacy output code that needs to me migrated and I'm considering rewriting it for scratch. I also found some problems with the YUI integration that Arteem included in 2.2.0beta. I still don't fully understand the new way in 2.0 for including Javascript libraries. May be he is able to fix it.
        Hide
        Sergey Vidusov added a comment -

        Here's the version working for 2.0.

        Show
        Sergey Vidusov added a comment - Here's the version working for 2.0.
        Hide
        Andreas Hediger added a comment -

        i gave it a try: error/moodle/notlocalisederrormessage

        CLS-eltchyi1: Function isteacherinanycourse() was removed, please use capabilities instead! An attempt to bring a Moodle 1.9 solution to v2.0 ending in failure.

        Show
        Andreas Hediger added a comment - i gave it a try: error/moodle/notlocalisederrormessage CLS-eltchyi1: Function isteacherinanycourse() was removed, please use capabilities instead! An attempt to bring a Moodle 1.9 solution to v2.0 ending in failure.
        Hide
        Ashley Holman added a comment -

        Hi Andreas,

        Were you refering to the code posted by Sergey? I don't see any calls to "isteacherinanycourse()" inside his code. Can you make sure you're using the code from his zip file and if you get any errors, please post a stack trace (turn debug display on and debuglevel up to DEVEL).

        Thanks

        Show
        Ashley Holman added a comment - Hi Andreas, Were you refering to the code posted by Sergey? I don't see any calls to "isteacherinanycourse()" inside his code. Can you make sure you're using the code from his zip file and if you get any errors, please post a stack trace (turn debug display on and debuglevel up to DEVEL). Thanks
        Hide
        Luis Ramon Lopez added a comment -

        Lots of warnings when debugging is on, but it works! Good job Sergey! It seems to be based on 2.1.0 so there is no support for filtering sessions, grid viewmode nor multiple instances per course. I don't think it would be too difficult to backport some of the changes.

        Sergey, is your code located in any public repository?

        Show
        Luis Ramon Lopez added a comment - Lots of warnings when debugging is on, but it works! Good job Sergey! It seems to be based on 2.1.0 so there is no support for filtering sessions, grid viewmode nor multiple instances per course. I don't think it would be too difficult to backport some of the changes. Sergey, is your code located in any public repository?
        Hide
        Emma Richardson added a comment -

        I cannot get this to load. The block comes in just fine but when I add the activity, I get an incorrect code error and it will not let me load the activity. I am running 2.0.1.

        Show
        Emma Richardson added a comment - I cannot get this to load. The block comes in just fine but when I add the activity, I get an incorrect code error and it will not let me load the activity. I am running 2.0.1.
        Hide
        Sergey Vidusov added a comment -

        In Github my code is in netspotau/moodle-mod_attforblock.git and netspotau/moodle-block_attendance.git for module and block respectively.
        As for errors, I'll try to investigate them - maybe there's something that I overlooked.

        Show
        Sergey Vidusov added a comment - In Github my code is in netspotau/moodle-mod_attforblock.git and netspotau/moodle-block_attendance.git for module and block respectively. As for errors, I'll try to investigate them - maybe there's something that I overlooked.
        Hide
        Sergey Vidusov added a comment -

        Fixed some debug messages and other stuff.

        Show
        Sergey Vidusov added a comment - Fixed some debug messages and other stuff.
        Hide
        Emma Richardson added a comment -

        Turned debugging on - wondering if I am installing something wrong. This time when I installed the install page did come up on the site and said that both block and mod installed succesfully. This is the error I am getting when I try and add an attendance activity. I am choosing no grades and separate groups.
        I am on Moodle 2.0.2 (0211 version).
        Debug info: Argument 3 passed to moodle_database::get_field() must be an array, string given, called in /var/www/moodle/mod/attforblock/lib.php on line 37 and defined
        Stack trace:
        line 351 of /lib/setuplib.php: coding_exception thrown
        line 1287 of /lib/dml/moodle_database.php: call to default_error_handler()
        line 37 of /mod/attforblock/lib.php: call to moodle_database->get_field()
        line 410 of /course/modedit.php: call to attforblock_add_instance()

        Show
        Emma Richardson added a comment - Turned debugging on - wondering if I am installing something wrong. This time when I installed the install page did come up on the site and said that both block and mod installed succesfully. This is the error I am getting when I try and add an attendance activity. I am choosing no grades and separate groups. I am on Moodle 2.0.2 (0211 version). Debug info: Argument 3 passed to moodle_database::get_field() must be an array, string given, called in /var/www/moodle/mod/attforblock/lib.php on line 37 and defined Stack trace: line 351 of /lib/setuplib.php: coding_exception thrown line 1287 of /lib/dml/moodle_database.php: call to default_error_handler() line 37 of /mod/attforblock/lib.php: call to moodle_database->get_field() line 410 of /course/modedit.php: call to attforblock_add_instance()
        Hide
        Emma Richardson added a comment -

        Sorry, forgot to mention that I installed the attendance-fixed package.

        Show
        Emma Richardson added a comment - Sorry, forgot to mention that I installed the attendance-fixed package.
        Hide
        Emma Richardson added a comment -

        OK, think I have found my issue. Apparently, I had some instances of the attendance assignment already in the course which were messing things up.

        Show
        Emma Richardson added a comment - OK, think I have found my issue. Apparently, I had some instances of the attendance assignment already in the course which were messing things up.
        Hide
        Michael added a comment -

        I installed attendance_fixed.zip. Groups was not working for me, and on top of that, only the first 25 members were being shown. This fixed it:

        diff --git a/mod/attforblock/attendances.php b/mod/attforblock/attendances.php
        index 9298a3c..1e36fa7 100644
        — a/mod/attforblock/attendances.php
        +++ b/mod/attforblock/attendances.php
        @@ -8,6 +8,8 @@
        require_once('lib.php');
        require_once('../../enrol/locallib.php'); // to get a list of enrolled students

        + require_once($CFG->libdir.'/accesslib.php');
        +
        if (!function_exists('grade_update'))

        { //workaround for buggy PHP versions require_once($CFG->libdir.'/gradelib.php'); }

        @@ -110,25 +112,27 @@
        $currentgroup = groups_get_activity_group($cm, true);
        $manager = new course_enrolment_manager($course);

        • if ($currentgroup) {
        • /*
        • $sql = "SELECT u.*
        • FROM {role_assignments} ra, {user} u, {course} c, {context} cxt
          - WHERE ra.userid = u.id
          - AND ra.contextid = cxt.id
          - AND cxt.contextlevel = 50
          - AND cxt.instanceid = c.id
          - AND c.id = ?
          - AND roleid =5
          - AND u.id IN (SELECT userid FROM {groups_members} gm WHERE gm.groupid = ?)
          - ORDER BY u.$sort ASC";
          - $params = array($cm->course, $currentgroup);
          - $students = $DB->get_records_sql($sql, $params);
          - */
          - $students = $manager->get_users($sort); // FIXME add $currentgroup somehow
          - } else { - $students = $manager->get_users($sort); - }
          + //if ($currentgroup) {
          + // /*
          + // $sql = "SELECT u.*
          + // FROM {role_assignments}

          ra,

          {user}

          u,

          {course}

          c,

          {context}

          cxt
          + // WHERE ra.userid = u.id
          + // AND ra.contextid = cxt.id
          + // AND cxt.contextlevel = 50
          + // AND cxt.instanceid = c.id
          + // AND c.id = ?
          + // AND roleid =5
          + // AND u.id IN (SELECT userid FROM

          {groups_members}

          gm WHERE gm.groupid = ?)
          + // ORDER BY u.$sort ASC";
          + // $params = array($cm->course, $currentgroup);
          + // $students = $DB->get_records_sql($sql, $params);
          + // */
          + // $students = $manager->get_users($sort); // FIXME add $currentgroup somehow
          + //} else

          { + // $students = $manager->get_users($sort); + //}

          +
          + $students = get_enrolled_users($context, '', $currentgroup);

        $sort = $sort == 'firstname' ? 'firstname' : 'lastname';
        /// Now we need a menu for separategroups as well!

        1.7.5.2

        Show
        Michael added a comment - I installed attendance_fixed.zip. Groups was not working for me, and on top of that, only the first 25 members were being shown. This fixed it: diff --git a/mod/attforblock/attendances.php b/mod/attforblock/attendances.php index 9298a3c..1e36fa7 100644 — a/mod/attforblock/attendances.php +++ b/mod/attforblock/attendances.php @@ -8,6 +8,8 @@ require_once('lib.php'); require_once('../../enrol/locallib.php'); // to get a list of enrolled students + require_once($CFG->libdir.'/accesslib.php'); + if (!function_exists('grade_update')) { //workaround for buggy PHP versions require_once($CFG->libdir.'/gradelib.php'); } @@ -110,25 +112,27 @@ $currentgroup = groups_get_activity_group($cm, true); $manager = new course_enrolment_manager($course); if ($currentgroup) { /* $sql = "SELECT u.* FROM {role_assignments} ra, {user} u, {course} c, {context} cxt - WHERE ra.userid = u.id - AND ra.contextid = cxt.id - AND cxt.contextlevel = 50 - AND cxt.instanceid = c.id - AND c.id = ? - AND roleid =5 - AND u.id IN (SELECT userid FROM {groups_members} gm WHERE gm.groupid = ?) - ORDER BY u.$sort ASC"; - $params = array($cm->course, $currentgroup); - $students = $DB->get_records_sql($sql, $params); - */ - $students = $manager->get_users($sort); // FIXME add $currentgroup somehow - } else { - $students = $manager->get_users($sort); - } + //if ($currentgroup) { + // /* + // $sql = "SELECT u.* + // FROM {role_assignments} ra, {user} u, {course} c, {context} cxt + // WHERE ra.userid = u.id + // AND ra.contextid = cxt.id + // AND cxt.contextlevel = 50 + // AND cxt.instanceid = c.id + // AND c.id = ? + // AND roleid =5 + // AND u.id IN (SELECT userid FROM {groups_members} gm WHERE gm.groupid = ?) + // ORDER BY u.$sort ASC"; + // $params = array($cm->course, $currentgroup); + // $students = $DB->get_records_sql($sql, $params); + // */ + // $students = $manager->get_users($sort); // FIXME add $currentgroup somehow + //} else { + // $students = $manager->get_users($sort); + //} + + $students = get_enrolled_users($context, '', $currentgroup); $sort = $sort == 'firstname' ? 'firstname' : 'lastname'; /// Now we need a menu for separategroups as well! – 1.7.5.2
        Hide
        Tore Hogas added a comment -

        I assume Michael's code above has not been committed yet? I tried attendance_fixed with Moodle 2.0.1+ (Build: 20110105) and encountered two problems:

        1. The module doesn't differentiate roles, so teachers as well as students are listed. This is especially annoying for us, as we have up to 4-5 teachers for a given class.

        2. The block doesn't display for students, only teachers. I haven't investigated further, but it may be related to the group problem mentioned above - all our students are in a group, while teachers are not.

        Show
        Tore Hogas added a comment - I assume Michael's code above has not been committed yet? I tried attendance_fixed with Moodle 2.0.1+ (Build: 20110105) and encountered two problems: 1. The module doesn't differentiate roles, so teachers as well as students are listed. This is especially annoying for us, as we have up to 4-5 teachers for a given class. 2. The block doesn't display for students, only teachers. I haven't investigated further, but it may be related to the group problem mentioned above - all our students are in a group, while teachers are not.
        Hide
        Artem Andreev added a comment - - edited

        Hi, all!

        I finished porting attendance to Moodle 2.0.

        Attendance v2.4.0 BETA:

        • compatible only with Moodle 2.0 (Moodle 2.1 compatability not tested)
        • fully internals rewritten (OOP, renderers, etc)
        • support all 2.3 features
        • + taken into account information about students enrolment (start/end date) on different pages
        • + HTML-editor for session description with ability to add links, files, formatting, etc

        Git: https://github.com/andreev-artem/moodle_mod_attforblock/tree/MDL_20

        Zip: https://github.com/andreev-artem/moodle_mod_attforblock/zipball/MDL_20

        Show
        Artem Andreev added a comment - - edited Hi, all! I finished porting attendance to Moodle 2.0. Attendance v2.4.0 BETA: compatible only with Moodle 2.0 (Moodle 2.1 compatability not tested) fully internals rewritten (OOP, renderers, etc) support all 2.3 features + taken into account information about students enrolment (start/end date) on different pages + HTML-editor for session description with ability to add links, files, formatting, etc Git: https://github.com/andreev-artem/moodle_mod_attforblock/tree/MDL_20 Zip: https://github.com/andreev-artem/moodle_mod_attforblock/zipball/MDL_20
        Hide
        Anthony Borrow added a comment -

        Artem - Congratulations on getting the attendance activity module upgraded for Moodle 2.0. There have not been any significant API changes between 2.0 and 2.1 (that I am aware of) so the code for 2.0 should work just fine in 2.1 but it is always good to get some testing. Just in terms of consistency, would it be possible for you to rename the repository to moodle-mod_attforblock? I realize it is a small change but it would be helpful. Eventually, I would like to see if the primary maintainer of the code would be willing to pull over the code from CVS into the Git repository and create MOODLE_19_STABLE and MOODLE_20_STABLE branches. Speaking of primary maintainer, does anyone know what happened to Dmitry? Should we begin looking for a new maintainer? I am curious if Artem or Sergey would be interested. Also, is anyone working on the block. Ideally that would be maintained in a separate repository moodle-block_attendance. Let me know how I can best be of help in keeping this popular module available for folks. Peace - Anthony

        Show
        Anthony Borrow added a comment - Artem - Congratulations on getting the attendance activity module upgraded for Moodle 2.0. There have not been any significant API changes between 2.0 and 2.1 (that I am aware of) so the code for 2.0 should work just fine in 2.1 but it is always good to get some testing. Just in terms of consistency, would it be possible for you to rename the repository to moodle-mod_attforblock? I realize it is a small change but it would be helpful. Eventually, I would like to see if the primary maintainer of the code would be willing to pull over the code from CVS into the Git repository and create MOODLE_19_STABLE and MOODLE_20_STABLE branches. Speaking of primary maintainer, does anyone know what happened to Dmitry? Should we begin looking for a new maintainer? I am curious if Artem or Sergey would be interested. Also, is anyone working on the block. Ideally that would be maintained in a separate repository moodle-block_attendance. Let me know how I can best be of help in keeping this popular module available for folks. Peace - Anthony
        Hide
        Anthony Borrow added a comment -

        Might be good to get http://moodle.org/mod/data/view.php?d=13&rid=1062 updated once we figure out who is going to be the primary maintainer. Peace - Anthony

        Show
        Anthony Borrow added a comment - Might be good to get http://moodle.org/mod/data/view.php?d=13&rid=1062 updated once we figure out who is going to be the primary maintainer. Peace - Anthony
        Hide
        Artem Andreev added a comment -

        I am working on the block now.

        Show
        Artem Andreev added a comment - I am working on the block now.
        Hide
        Anthony Borrow added a comment -

        Awesome - let me know if you have any questions. I may throw out as a challenge to folks attending the Sydney Moot to consider working on the Attendance block and sharing code or their own repositories here. Michael de Raadt and I are giving a workshop on upgrading code from 1.9 to 2.0. Peace - Anthony

        Show
        Anthony Borrow added a comment - Awesome - let me know if you have any questions. I may throw out as a challenge to folks attending the Sydney Moot to consider working on the Attendance block and sharing code or their own repositories here. Michael de Raadt and I are giving a workshop on upgrading code from 1.9 to 2.0. Peace - Anthony
        Hide
        Artem Andreev added a comment - - edited
        Show
        Artem Andreev added a comment - - edited Thanks, Anthony! Block porting done: https://github.com/andreev-artem/moodle_blocks_attendance/tree/MDL_20
        Hide
        Anthony Borrow added a comment -

        Awesome - you made quick work of that! Peace - Anthony

        Show
        Anthony Borrow added a comment - Awesome - you made quick work of that! Peace - Anthony
        Hide
        Anthony Borrow added a comment -

        p.s. - Again, just a friendly reminder, that if you wish to follow the naming convention outlined in Guidelines for CONTRIB Code - http://docs.moodle.org/en/Development:Guidelines_for_contributed_code - the name of the repository would be moodle-block_attendance (a dash after moodle and blocks is singular).

        Show
        Anthony Borrow added a comment - p.s. - Again, just a friendly reminder, that if you wish to follow the naming convention outlined in Guidelines for CONTRIB Code - http://docs.moodle.org/en/Development:Guidelines_for_contributed_code - the name of the repository would be moodle-block_attendance (a dash after moodle and blocks is singular).
        Hide
        Artem Andreev added a comment -

        Sorry, at this moment I don't want follow naming convention strictly. Because these renamings require not only renamings on github. All my 12 repos are submodules. I have html links to these repos. And I must fix all these issues. Also I don't like "blocks in singular". Because when I adding submodule current name better fit submodule path ('moodle' contain 'blocks' directory not 'block').

        Show
        Artem Andreev added a comment - Sorry, at this moment I don't want follow naming convention strictly. Because these renamings require not only renamings on github. All my 12 repos are submodules. I have html links to these repos. And I must fix all these issues. Also I don't like "blocks in singular". Because when I adding submodule current name better fit submodule path ('moodle' contain 'blocks' directory not 'block').
        Hide
        Anthony Borrow added a comment -

        Artem - No worries about renaming the repository. It is clear you have reasons for having it the way it is. I personally like for the names to mirror the directory path name but that is not the way it is done. There is no strict rule that says that you must follow the naming convention. Perhaps we can make it a goal to move toward as you are able. I found it better it clone rather than use submodule. I would be interested in hearing your experiences of using submodule. Peace - Anthony

        Show
        Anthony Borrow added a comment - Artem - No worries about renaming the repository. It is clear you have reasons for having it the way it is. I personally like for the names to mirror the directory path name but that is not the way it is done. There is no strict rule that says that you must follow the naming convention. Perhaps we can make it a goal to move toward as you are able. I found it better it clone rather than use submodule. I would be interested in hearing your experiences of using submodule. Peace - Anthony
        Hide
        Artem Andreev added a comment -

        Today I tested compatability with Moodle 2.1. I don't find any problems with fresh install on Moodle 2.1.

        Show
        Artem Andreev added a comment - Today I tested compatability with Moodle 2.1. I don't find any problems with fresh install on Moodle 2.1.
        Hide
        Artem Andreev added a comment -

        > I found it better it clone rather than use submodule. I would be interested in hearing your experiences of using submodule.

        It depends...
        I have development repo which contain 12 other repos as submodules. Because of this I can easily at any time create an environment for development on any computer. This solution has both advantages and disadvantages...

        Show
        Artem Andreev added a comment - > I found it better it clone rather than use submodule. I would be interested in hearing your experiences of using submodule. It depends... I have development repo which contain 12 other repos as submodules. Because of this I can easily at any time create an environment for development on any computer. This solution has both advantages and disadvantages...
        Hide
        Anthony Borrow added a comment -

        Thanks for testing - I would not have expected any issues for 2.1. It is also good to know the advantages of submodule so thank you for sharing your experience. I may come back with more questions about it later. I just read how things can get out of sync and figured that for Moodle CONTRIB generally speaking it is probably better to avoid them. I like to keep things simple but I need to do a little more reading on them. Peace - Anthony

        Show
        Anthony Borrow added a comment - Thanks for testing - I would not have expected any issues for 2.1. It is also good to know the advantages of submodule so thank you for sharing your experience. I may come back with more questions about it later. I just read how things can get out of sync and figured that for Moodle CONTRIB generally speaking it is probably better to avoid them. I like to keep things simple but I need to do a little more reading on them. Peace - Anthony
        Hide
        Artem Andreev added a comment -

        I think does not make sense to recommend something in this case.
        If developer have moodle repo with custom changes to core (bug fixing, etc) and some repos with nonstandard modules he can:
        1. simply clone these modules in moodle repo subfolders
        2. use module's repos as submodules (http://progit.org/book/ch6-6.html)
        3. use subtree merging (http://progit.org/book/ch6-7.html)

        Developer must decide yourself which option to choose depending on his experience and requirements.

        Show
        Artem Andreev added a comment - I think does not make sense to recommend something in this case. If developer have moodle repo with custom changes to core (bug fixing, etc) and some repos with nonstandard modules he can: 1. simply clone these modules in moodle repo subfolders 2. use module's repos as submodules ( http://progit.org/book/ch6-6.html ) 3. use subtree merging ( http://progit.org/book/ch6-7.html ) Developer must decide yourself which option to choose depending on his experience and requirements.
        Hide
        Tore Hogas added a comment -

        I found an issue with Artem's beta version of this: clicking on the appropriate letter in the header in list view or grid view does NOT set all students' status. Instead it sets all students' status to A for Absent.

        So, if I click on the P for Present in the header, everyone is marked Absent.
        If I click L for Late in the header, everyone is marked Absent.

        Show
        Tore Hogas added a comment - I found an issue with Artem's beta version of this: clicking on the appropriate letter in the header in list view or grid view does NOT set all students' status. Instead it sets all students' status to A for Absent. So, if I click on the P for Present in the header, everyone is marked Absent. If I click L for Late in the header, everyone is marked Absent.
        Hide
        Artem Andreev added a comment -

        Which build of Moodle you use? I think it is not attendance problem: MDL-27658

        Show
        Artem Andreev added a comment - Which build of Moodle you use? I think it is not attendance problem: MDL-27658
        Hide
        dan ellis added a comment -

        could two date picker be added as an option to show attendance range, for eg. you want to view attendance for any 2 weeks.... on the report.php and export.php page ... could the developers explore or add that option it is really needed thanks in advance

        Show
        dan ellis added a comment - could two date picker be added as an option to show attendance range, for eg. you want to view attendance for any 2 weeks.... on the report.php and export.php page ... could the developers explore or add that option it is really needed thanks in advance
        Hide
        Craig Drayton added a comment -

        Hello,

        What is the current status of this module? Is it production-ready?

        We are migrating to Moodle 2.1 by January 2012 and this is a key module for some of our tutors. Any information on if/when I can install this on our production server would be greatly appreciated.

        Thanks,
        Craig

        Show
        Craig Drayton added a comment - Hello, What is the current status of this module? Is it production-ready? We are migrating to Moodle 2.1 by January 2012 and this is a key module for some of our tutors. Any information on if/when I can install this on our production server would be greatly appreciated. Thanks, Craig
        Hide
        Marty Gilbert added a comment - - edited

        Just a small bug noted in preferences.php and sessions.php - they were both calling a function 'update_all_users_grades()' that didn't exist by that name. locallib.php had 'att_update_all_users_grades()' which appeared to be the correct target.

        Applying the patch (below) should fix all of the occurrences I encountered.

        *****************************************************************************

        diff --git a/preferences.php b/preferences.php
        index 8bdfa92..83bf016 100644
        --- a/preferences.php
        +++ b/preferences.php
        @@ -78,7 +78,7 @@ switch ($att->pageparams->action) {
                 foreach ($acronym as $id => $v) {
                     $att->update_status($id, $acronym[$id], $description[$id], $grade[$id], null);
                 }
        -        update_all_users_grades($att->id, $att->course, $att->context);
        +        att_update_all_users_grades($att->id, $att->course, $att->context);
                 break;
         }
         
        diff --git a/sessions.php b/sessions.php
        index e2dd833..473734a 100644
        --- a/sessions.php
        +++ b/sessions.php
        @@ -72,7 +72,7 @@ switch ($att->pageparams->action) {
         
                 if (isset($confirm)) {
                     $att->delete_sessions(array($sessionid));
        -            update_all_users_grades($att->id, $att->course, $att->context);
        +            att_update_all_users_grades($att->id, $att->course, $att->context);
                     redirect($att->url_manage(), get_string('sessiondeleted','attforblock'));
                 }
         
        @@ -99,7 +99,7 @@ switch ($att->pageparams->action) {
                     $sessionsids = explode('_', $sessionsids);
         
                     $att->delete_sessions($sessionsids);
        -            update_all_users_grades($att->id, $att->course, $att->context);
        +            att_update_all_users_grades($att->id, $att->course, $att->context);
                     redirect($att->url_manage(), get_string('sessiondeleted','attforblock'));
                 }
        
        Show
        Marty Gilbert added a comment - - edited Just a small bug noted in preferences.php and sessions.php - they were both calling a function 'update_all_users_grades()' that didn't exist by that name. locallib.php had 'att_update_all_users_grades()' which appeared to be the correct target. Applying the patch (below) should fix all of the occurrences I encountered. ***************************************************************************** diff --git a/preferences.php b/preferences.php index 8bdfa92..83bf016 100644 --- a/preferences.php +++ b/preferences.php @@ -78,7 +78,7 @@ switch ($att->pageparams->action) { foreach ($acronym as $id => $v) { $att->update_status($id, $acronym[$id], $description[$id], $grade[$id], null); } - update_all_users_grades($att->id, $att->course, $att->context); + att_update_all_users_grades($att->id, $att->course, $att->context); break; } diff --git a/sessions.php b/sessions.php index e2dd833..473734a 100644 --- a/sessions.php +++ b/sessions.php @@ -72,7 +72,7 @@ switch ($att->pageparams->action) { if (isset($confirm)) { $att->delete_sessions(array($sessionid)); - update_all_users_grades($att->id, $att->course, $att->context); + att_update_all_users_grades($att->id, $att->course, $att->context); redirect($att->url_manage(), get_string('sessiondeleted','attforblock')); } @@ -99,7 +99,7 @@ switch ($att->pageparams->action) { $sessionsids = explode('_', $sessionsids); $att->delete_sessions($sessionsids); - update_all_users_grades($att->id, $att->course, $att->context); + att_update_all_users_grades($att->id, $att->course, $att->context); redirect($att->url_manage(), get_string('sessiondeleted','attforblock')); }
        Show
        Artem Andreev added a comment - Thanks, Marty! It is regressions after renaimings ( https://github.com/andreev-artem/moodle_mod_attforblock/commit/e91283a339865dc24234e4a98e962b9b9e3ec7fe ) Fixed: https://github.com/andreev-artem/moodle_mod_attforblock/commit/81e461d75c42282a285e3b9bb1aa4e6c5527219b
        Hide
        kiswap added a comment -

        moodle 2.3.1+:
        in mod/attforblock/db/access.php $mod_attforblock_capabilities should be only $capabilities and admin should be manager.

        Show
        kiswap added a comment - moodle 2.3.1+: in mod/attforblock/db/access.php $mod_attforblock_capabilities should be only $capabilities and admin should be manager.
        Hide
        Dan Marsden added a comment -

        this work appears to have all been done by Artem and has been available in github for a while - I'm hoping to get it into the plugins db on moodle.org in the next few weeks.

        Show
        Dan Marsden added a comment - this work appears to have all been done by Artem and has been available in github for a while - I'm hoping to get it into the plugins db on moodle.org in the next few weeks.

          People

          • Votes:
            51 Vote for this issue
            Watchers:
            49 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development