Blocks: Activity track

block_activity_track
Maintained by Picture of Swati Sra Swati Sra
This block show the total no. of activities pending and completed in percentage and number in a course where course completion is activated.
184 sites
10 downloads
1 fans

This block will help the students to view all the courses they are enrolled to along with the total number of activities in that course and how many of them are finished with overall percentage. Student can navigate to a specific course by just clicking on the course name. Please note that the block will only work if the course completion is activated on the course. This block will be actively maintained and support by Xeo InfoSoft Moodle team

Screenshots

Screenshot #0

Contributors

Picture of Swati Sra
Swati Sra (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Chris M
    Wed, 15 Aug 2012, 1:27 PM
    Hi, great block thank you smile I am trying to track Facetoface with it. Although the activity shows as 1, completion isn't picked up even after attendee marked as attended. There is no debug message.
  • Picture of Lorenzo Nicora
    Wed, 22 Aug 2012, 2:42 PM
    Hi
    Useful block. But I'm trying to use it on Moodle 2.3 with PostgreSQL and it does not work.
    Looking at the error, I suppose there is some MySQL-only code in it
  • Picture of Lorenzo Nicora
    Wed, 22 Aug 2012, 2:46 PM
    (It is the same error Ibra Melhem reported)
  • Picture of Lorenzo Nicora
    Fri, 31 Aug 2012, 9:10 PM
    Hi, I think I found the bug.
    It is due an hardwired query that works only on MySQL and only if table prefix is the default "mdl_"

    Here is the fix.
    The query on line 248 and following should be rewritten as:
    $result = $DB->get_records_sql('SELECT mc.coursemoduleid,mc.userid,mc.completionstate,
    m.id,m.course FROM {course_modules_completion} mc
    LEFT JOIN {course_modules} m ON mc.coursemoduleid=m.id WHERE mc.userid = ? AND m.course = ?', array( $user->id ,$course->id ));
  • Wazza
    Fri, 9 Nov 2012, 6:43 PM
    Does anyone have a screenshot of this block?
  • Picture of Swati Sra
    Wed, 2 Jan 2013, 11:58 AM
    Hi Lorenzo,
    Thank you very much for this help, I will update my query and post you back.
  • Picture of Swati Sra
    Wed, 2 Jan 2013, 11:20 PM
    Hi Richard van Iwaarden,
    Screenshot added
  • Picture of German Valero
    Thu, 3 Jan 2013, 4:13 AM
    Hi Swati,
    Nice block. It can be improved if you replace some hard-wired English language strings with language strings declared in the /lang/en language folder, so that they can be translated in AMOS (http://lang.moodle.org/) for Moodle users of languages other than English.

    The hard-wired strings I saw in your code are: "Over", "Total", "inprogress", "notyetstarted", as for example in:
    $this->content->text .= 'Over';$this->content->text .= 'Total';

    As of today, the only language string available for translation is the plugin name itself sad

    Please read this forum post about translations of contributed plugins: http://lang.moodle.org/mod/forum/discuss.php?d=2485

    Thanks in advance for your help and thanks for a nice plugin.

    Greetings from México.
  • Picture of Jackie Zhang
    Mon, 22 Apr 2013, 3:52 PM
    Hi Swati,
    it is a great block. But i don't know why the total activity number of a course is always 0, and the status of the course is 0%. but the over number is correct.
    please give me a hand and thank you very much
  • Picture of Seth Mengal
    Fri, 6 Sep 2013, 8:38 PM


    Screenshot. Works Great, had to do some edits because of width of columns etc
  • Picture of Amy Groshek
    Wed, 18 Dec 2013, 12:35 AM
    On 2.5 This block throws a warning. Needs a capability added:
    Dec 17 10:34:10 Amys-MacBook-Pro httpd[9136]: PHP Notice: The block activity_track does not define the standard capability block/activity_track:addinstance
    • line 606 of /blocks/moodleblock.class.php: call to debugging()
    • line 584 of /blocks/moodleblock.class.php: call to block_base->has_add_block_capability()
    • line 236 of /lib/blocklib.php: call to block_base->user_can_addto()
    • line 1866 of /lib/blocklib.php: call to block_manager->get_addable_blocks()
    • line 1005 of /lib/blocklib.php: call to block_add_block_ui()
    • line 353 of /lib/blocklib.php: call to block_manager->ensure_content_created()
    • line 6 of /theme/base/layout/general.php: call to block_manager->region_has_content()
    • line 860 of /lib/outputrenderers.php: call to include()
    • line 790 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
    • line 99 of /backup/backup.php: call to core_renderer->header()
    in /Users/macpro/code/gao25/lib/weblib.php on line 2817
    Dec 17 10:34:10 Amys-MacBook-Pro httpd[9136]: PHP Stack trace:
    Dec 17 10:34:10 Amys-MacBook-Pro httpd[9136]: PHP 1. {main}() /Users/macpro/code/gao25/backup/backup.php:0
    Dec 17 10:34:10 Amys-MacBook-Pro httpd[9136]: PHP 2. core_renderer->header() /Users/macpro/code/gao25/backup/backup.php:99
    Dec 17 10:34:10 Amys-MacBook-Pro httpd[9136]: PHP 3. core_renderer->render_page_layout() /Users/macpro/code/gao25/lib/outputrenderers.php:790
    Dec 17 10:34:10 Amys-MacBook-Pro httpd[9136]: PHP 4. include() /Users/macpro/code/gao25/lib/outputrenderers.php:860
    Dec 17 10:34:10 Amys-MacBook-Pro httpd[9136]: PHP 5. block_manager->region_has_content() /Users/macpro/code/gao25/theme/base/layout/general.php:6
    Dec 17 10:34:10 Amys-MacBook-Pro httpd[9136]: PHP 6. block_manager->ensure_content_created() /Users/macpro/code/gao25/lib/blocklib.php:353
    Dec 17 10:34:10 Amys-MacBook-Pro httpd[9136]: PHP 7. block_add_block_ui() /Users/macpro/code/gao25/lib/blocklib.php:1005
    Dec 17 10:34:10 Amys-MacBook-Pro httpd[9136]: PHP 8. block_manager->get_addable_blocks() /Users/macpro/code/gao25/lib/blocklib.php:1866
    Dec 17 10:34:10 Amys-MacBook-Pro httpd[9136]: PHP 9. block_base->user_can_addto() /Users/macpro/code/gao25/lib/blocklib.php:236
    Dec 17 10:34:10 Amys-MacBook-Pro httpd[9136]: PHP 10. block_base->has_add_block_capability() /Users/macpro/code/gao25/blocks/moodleblock.class.php:584
    Dec 17 10:34:10 Amys-MacBook-Pro httpd[9136]: PHP 11. debugging() /Users/macpro/code/gao25/blocks/moodleblock.class.php:606
    Dec 17 10:34:10 Amys-MacBook-Pro httpd[9136]: PHP 12. trigger_error() /Users/macpro/code/gao25/lib/weblib.php:2817
  • Picture of Manoj Navalkar
    Fri, 17 Jan 2014, 3:03 PM
    Hi Swati,

    Are there any plans to release the compatible version for Moodle 2.5 or 2.6?

    regards,
    Manoj
  • Just wondering . . .
    Fri, 31 Oct 2014, 3:33 PM
    Or 2.7?

    -Derek
  • Picture of milhouse van houten
    Tue, 10 Mar 2015, 9:03 PM
    Or 2.8?
  • Picture of Ruan Vermeulen
    Thu, 6 Oct 2016, 7:25 PM
    Is this compatible with 3.1.
    The plugin cannot be installed

    Validating block_activity_track ... Error
    [Error] Plugin does not declare its component name [null] Help with Plugin does not declare its component name
    Installation aborted due to validation failure
1 2
Please login to post comments