Moodle
  1. Moodle
  2. MDL-26674

Wiki Module activity report does not show activity

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.1.1, 2.2.1
    • Fix Version/s: 2.1.6, 2.2.3
    • Component/s: Wiki (2.x)
    • Labels:
    • Testing Instructions:
      Hide
      1. Log in as admin
      2. Add a new wiki activity to course
      3. Check live log and make sure "wiki add" is logged, with proper link (Name of wiki will be cm id and not name of the wiki)
      4. Add a new wiki page and check live log
      5. Add a comment and check live log
      6. Edit page and check live log
      7. click history and check live log
      8. compare tow versions and check live log
      9. click Map and check live log
      10. Click comments and add comments and check live log.
      Show
      Log in as admin Add a new wiki activity to course Check live log and make sure "wiki add" is logged, with proper link (Name of wiki will be cm id and not name of the wiki) Add a new wiki page and check live log Add a comment and check live log Edit page and check live log click history and check live log compare tow versions and check live log click Map and check live log Click comments and add comments and check live log.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      wip-mdl-26674

      Description

      No activity is displayed when clicking the module's activity report link.
      Other activities reports work fine.

        Gliffy Diagrams

        1. wiki_log.patch
          4 kB
          Daniel Servos
        2. wiki_log2.patch
          13 kB
          Daniel Servos
        3. wiki_log3.patch
          13 kB
          Daniel Servos
        4. wiki_log4.patch
          12 kB
          Diane Villemure

          Issue Links

            Activity

            Hide
            Helen Foster added a comment -

            Miki, thanks for your report. I've just reproduced the problem on http://qa.moodle.net/ (running 2.0.2+).

            (I'm not sure whether the activity report link wording has been changed since 2.0, as on the QA Testing site it was 'Logs'.)

            Show
            Helen Foster added a comment - Miki, thanks for your report. I've just reproduced the problem on http://qa.moodle.net/ (running 2.0.2+). (I'm not sure whether the activity report link wording has been changed since 2.0, as on the QA Testing site it was 'Logs'.)
            Hide
            miki Alliel added a comment - - edited

            Hi, actually the moodle version that I was checking this problem and others yesterday was the latest one 2.0.2
            I don't know if it has something to do only with this version.
            I'll check it again, but this is what I got when I checked it yesterday/
            thanks

            Show
            miki Alliel added a comment - - edited Hi, actually the moodle version that I was checking this problem and others yesterday was the latest one 2.0.2 I don't know if it has something to do only with this version. I'll check it again, but this is what I got when I checked it yesterday/ thanks
            Hide
            Daniel Servos added a comment -

            All of the calls to add_to_log in the wiki seem to be wrong. As the activity report obtains it's data from the log it shows 0 activity.

            I have attached a patch that seems to fix this issue for me.

            Show
            Daniel Servos added a comment - All of the calls to add_to_log in the wiki seem to be wrong. As the activity report obtains it's data from the log it shows 0 activity. I have attached a patch that seems to fix this issue for me.
            Hide
            Daniel Servos added a comment -

            Patch to fix the add_to_log issue.

            Show
            Daniel Servos added a comment - Patch to fix the add_to_log issue.
            Hide
            Daniel Servos added a comment -

            Better fix.

            Fixes the logging issue in the wiki module so the activity report shows activity and events are logged correctly.

            Show
            Daniel Servos added a comment - Better fix. Fixes the logging issue in the wiki module so the activity report shows activity and events are logged correctly.
            Hide
            Daniel Servos added a comment -

            Sorry for all the updates. This patch (wiki_log3.patch) is a bit better then the last two and correctly puts the wiki pages' name in the logs information section when a new page is created.

            Show
            Daniel Servos added a comment - Sorry for all the updates. This patch (wiki_log3.patch) is a bit better then the last two and correctly puts the wiki pages' name in the logs information section when a new page is created.
            Hide
            Diane Villemure added a comment -

            The wiki_log3.patch is not entirely compatible with version 2.1. I emailed the updated patch to Daniel Servos (I don't have the privileges to upload here).

            Show
            Diane Villemure added a comment - The wiki_log3.patch is not entirely compatible with version 2.1. I emailed the updated patch to Daniel Servos (I don't have the privileges to upload here).
            Hide
            Helen Foster added a comment -

            Diane, all logged in users should be able to upload attachments. You should find the option to attach files in the more actions dropdown menu. Thanks for updating the patch.

            Show
            Helen Foster added a comment - Diane, all logged in users should be able to upload attachments. You should find the option to attach files in the more actions dropdown menu. Thanks for updating the patch.
            Hide
            Diane Villemure added a comment -

            Thanks Helen for the tip. I hadn't notice the "More Actions" feature. Version 4 of the patch (compatible with Moodle 2.1) is now available.

            Show
            Diane Villemure added a comment - Thanks Helen for the tip. I hadn't notice the "More Actions" feature. Version 4 of the patch (compatible with Moodle 2.1) is now available.
            Hide
            Helen Foster added a comment -

            Yes, the attach files option is rather hidden away. Hopefully your patch can be reviewed soon.

            Show
            Helen Foster added a comment - Yes, the attach files option is rather hidden away. Hopefully your patch can be reviewed soon.
            Hide
            Helen Foster added a comment -

            Adding 2.1.1 as affected version as reported in MDL-29425.

            Show
            Helen Foster added a comment - Adding 2.1.1 as affected version as reported in MDL-29425 .
            Hide
            Yanfei Lu added a comment -

            I hope this will be fixed quickly.

            Show
            Yanfei Lu added a comment - I hope this will be fixed quickly.
            Hide
            Yanfei Lu added a comment -

            This bug still exists in 2.2.1

            Show
            Yanfei Lu added a comment - This bug still exists in 2.2.1
            Hide
            Helen Foster added a comment -

            Thanks Yanfei, adding 2.2.1 as affected version.

            Show
            Helen Foster added a comment - Thanks Yanfei, adding 2.2.1 as affected version.
            Hide
            Rajesh Taneja added a comment - - edited

            Created Branch, will review this before pushing it through the process.
            Thanks Daniel, Diane and Yanfei

            Show
            Rajesh Taneja added a comment - - edited Created Branch, will review this before pushing it through the process. Thanks Daniel, Diane and Yanfei
            Hide
            Rajesh Taneja added a comment -

            Thanks for the great patch
            Have cleaned few things and now up for peer review.

            Show
            Rajesh Taneja added a comment - Thanks for the great patch Have cleaned few things and now up for peer review.
            Hide
            Rossiani Wijaya added a comment -

            Hi Raj,

            Updating wiki setting still printting wiki id only. This is how the log looks like:

            master2c 	Tue 28 February 2012, 2:40 PM 	127.0.0.1 	Admin User 	course report live 	master 2C
            master2c 	Tue 28 February 2012, 2:39 PM 	127.0.0.1 	Admin User 	course report live 	master 2C
            bcc1 	Tue 28 February 2012, 2:39 PM 	127.0.0.1 	Admin User 	wiki view 	sss First page name
            bcc1 	Tue 28 February 2012, 2:39 PM 	127.0.0.1 	Admin User 	wiki update 	9
            bcc1 	Tue 28 February 2012, 2:39 PM 	127.0.0.1 	Admin User 	course update mod 	wiki 9
            

            Probably the action column, it could be more specific text, eg: 'wiki page view' or 'wiki page update' instead of just 'wiki view' or 'wiki update'.

            Show
            Rossiani Wijaya added a comment - Hi Raj, Updating wiki setting still printting wiki id only. This is how the log looks like: master2c Tue 28 February 2012, 2:40 PM 127.0.0.1 Admin User course report live master 2C master2c Tue 28 February 2012, 2:39 PM 127.0.0.1 Admin User course report live master 2C bcc1 Tue 28 February 2012, 2:39 PM 127.0.0.1 Admin User wiki view sss First page name bcc1 Tue 28 February 2012, 2:39 PM 127.0.0.1 Admin User wiki update 9 bcc1 Tue 28 February 2012, 2:39 PM 127.0.0.1 Admin User course update mod wiki 9 Probably the action column, it could be more specific text, eg: 'wiki page view' or 'wiki page update' instead of just 'wiki view' or 'wiki update'.
            Hide
            Rajesh Taneja added a comment -

            Thanks Rossie,

            Sounds Good, I am adding Helen to get her feedback

            Show
            Rajesh Taneja added a comment - Thanks Rossie, Sounds Good, I am adding Helen to get her feedback
            Hide
            Rajesh Taneja added a comment -

            Thanks Rossie,

            I have updated strings to wiki update page and wiki view page.
            As per 1 comment, I think I will add another bug for it, As this gets log in course/modedit.php, mod.php and rest.php and affects all module logs.
            Can you please review this again.

            Show
            Rajesh Taneja added a comment - Thanks Rossie, I have updated strings to wiki update page and wiki view page. As per 1 comment, I think I will add another bug for it, As this gets log in course/modedit.php, mod.php and rest.php and affects all module logs. Can you please review this again.
            Hide
            Helen Foster added a comment -

            Regarding text in the action column, looking at how actions for other modules are reported, it seems they are mostly 2 words e.g. 'quiz view', 'lesson view', 'forum update'. Thus I think 'wiki view', 'wiki edit' and 'wiki update' are fine.

            Show
            Helen Foster added a comment - Regarding text in the action column, looking at how actions for other modules are reported, it seems they are mostly 2 words e.g. 'quiz view', 'lesson view', 'forum update'. Thus I think 'wiki view', 'wiki edit' and 'wiki update' are fine.
            Hide
            Rajesh Taneja added a comment -

            Thanks Helen,

            In case of wiki, we have map, comment, history and page. So, while logging, it might be nice to have three words which explains what part of wiki is being added/updated/deleted.

            If it's fine, I would like to go with "wiki add page", "wiki update page", "wiki view map" etc. This explains more about, what action took place.

            Show
            Rajesh Taneja added a comment - Thanks Helen, In case of wiki, we have map, comment, history and page. So, while logging, it might be nice to have three words which explains what part of wiki is being added/updated/deleted. If it's fine, I would like to go with "wiki add page", "wiki update page", "wiki view map" etc. This explains more about, what action took place.
            Hide
            Helen Foster added a comment -

            Hi Raj,

            I don't think it's necessary to have such detailed logging of activity - other modules don't have it. I think 'wiki view' is fine to report when users view any part of the wiki - it's not important knowing whether they are viewing a page or a map.

            As far as I know with other modules 'update' is used when the teacher edits the module settings.

            If it's quick and easy we could have 'wiki add page' and 'wiki edit' but I don't think it's worth spending a lot of time over.

            Show
            Helen Foster added a comment - Hi Raj, I don't think it's necessary to have such detailed logging of activity - other modules don't have it. I think 'wiki view' is fine to report when users view any part of the wiki - it's not important knowing whether they are viewing a page or a map. As far as I know with other modules 'update' is used when the teacher edits the module settings. If it's quick and easy we could have 'wiki add page' and 'wiki edit' but I don't think it's worth spending a lot of time over.
            Hide
            Rajesh Taneja added a comment -

            Thanks Helen,

            All updated, in-line with your recommendation

            Show
            Rajesh Taneja added a comment - Thanks Helen, All updated, in-line with your recommendation
            Hide
            Rossiani Wijaya added a comment -

            Hi Raj,

            Everything seems ok except for wiki/admin page. The information column still displaying the page id.

            Other that, all looks good.

            Show
            Rossiani Wijaya added a comment - Hi Raj, Everything seems ok except for wiki/admin page. The information column still displaying the page id. Other that, all looks good.
            Hide
            Rajesh Taneja added a comment -

            Thanks Rossie,
            updated admin and pushing it up for integration review.

            Show
            Rajesh Taneja added a comment - Thanks Rossie, updated admin and pushing it up for integration review.
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Some hours ago...

            the main moodle.git repository has been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

            TIA and ciao

            Show
            Eloy Lafuente (stronk7) added a comment - Some hours ago... the main moodle.git repository has been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
            Hide
            Rajesh Taneja added a comment -

            Branches re-based

            Show
            Rajesh Taneja added a comment - Branches re-based
            Hide
            Sam Hemelryk added a comment -

            Hi Raj,

            I'm sending this back this week sorry.
            There are a couple of things to note:

            1. Having looked at what other modules are doing with their log calls and in light of MDL-32018 I think that the additional info provided to add_to_log should be the page id rather than the page title. Also noting I just looked in the log table and it appears nearly everywhere is using ids.
              While it doesn't appear any of the log reports are susceptible to that same formatting problem it does highlight an inconsistency and a potential problem.
            2. Also in light of MDL-32018 I think that it is a good idea to hold off on exposing page title through the page class. I think that there are a raft of issues that will need to be dealt with there very shortly and I think that again sticking with the id's as above is a better idea. If an id is not available then it may just be easier to no include it in the log call.

            Cheers
            Sam

            Show
            Sam Hemelryk added a comment - Hi Raj, I'm sending this back this week sorry. There are a couple of things to note: Having looked at what other modules are doing with their log calls and in light of MDL-32018 I think that the additional info provided to add_to_log should be the page id rather than the page title. Also noting I just looked in the log table and it appears nearly everywhere is using ids. While it doesn't appear any of the log reports are susceptible to that same formatting problem it does highlight an inconsistency and a potential problem. Also in light of MDL-32018 I think that it is a good idea to hold off on exposing page title through the page class. I think that there are a raft of issues that will need to be dealt with there very shortly and I think that again sticking with the id's as above is a better idea. If an id is not available then it may just be easier to no include it in the log call. Cheers Sam
            Hide
            Rajesh Taneja added a comment -

            Thanks Sam,

            I will replace page name with id.

            Show
            Rajesh Taneja added a comment - Thanks Sam, I will replace page name with id.
            Hide
            Rajesh Taneja added a comment -

            Hello Sam,

            I just checked the logs again and it is inconsistent. Some places they use id and most of the places they use name.
            I tried site, course, forum, data, quiz etc. and they all use activity/page name.

            Can you please confirm if you would like to see this as id. Also, which id should be visible, Page or wiki?

            Show
            Rajesh Taneja added a comment - Hello Sam, I just checked the logs again and it is inconsistent. Some places they use id and most of the places they use name. I tried site, course, forum, data, quiz etc. and they all use activity/page name. Can you please confirm if you would like to see this as id. Also, which id should be visible, Page or wiki?
            Hide
            Rajesh Taneja added a comment -

            Hello Sam, I have taken care of MDL-32018, and it seems to work fine now.
            Will wait for your advice before changing name to id. IMO name should be fine.

            Show
            Rajesh Taneja added a comment - Hello Sam, I have taken care of MDL-32018, and it seems to work fine now. Will wait for your advice before changing name to id. IMO name should be fine.
            Hide
            Rajesh Taneja added a comment - - edited

            Thanks Sam,

            I have updated the branches, replacing string with int (id).
            Agree, it should be id not string as used in most places.

            Show
            Rajesh Taneja added a comment - - edited Thanks Sam, I have updated the branches, replacing string with int (id). Agree, it should be id not string as used in most places.
            Hide
            Eloy Lafuente (stronk7) added a comment -

            The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

            TIA and ciao

            Show
            Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
            Hide
            Sam Hemelryk added a comment -

            Hi Raj, sending this back at the moment, just a couple of VERY minor things to tidy up.
            If you can get it back up today or tomorrow I'll put this in still.

            1. admin.php "admin.php?pageid=$wiki->id" should be "admin.php?pageid=$page->id"
            2. create.php No need for $newtitle now
            3. should instancecomments.php be using comments.php for its URL?
            4. view.php ln 298 is using $pageid but it doesn't appear to be set if $id is set.
            5. pagelib.php no need for the get_title method

            Cheers
            Sam

            Show
            Sam Hemelryk added a comment - Hi Raj, sending this back at the moment, just a couple of VERY minor things to tidy up. If you can get it back up today or tomorrow I'll put this in still. admin.php "admin.php?pageid=$wiki->id" should be "admin.php?pageid=$page->id" create.php No need for $newtitle now should instancecomments.php be using comments.php for its URL? view.php ln 298 is using $pageid but it doesn't appear to be set if $id is set. pagelib.php no need for the get_title method Cheers Sam
            Hide
            Rajesh Taneja added a comment -

            Thanks Sam,
            All suggestions integrated, except instancecomment.
            Yes, IMO instancecomment log should point to comment.php, as it's just doing the action and not setting any page for user to look at.
            Correct me if you think otherwise.

            Show
            Rajesh Taneja added a comment - Thanks Sam, All suggestions integrated, except instancecomment. Yes, IMO instancecomment log should point to comment.php, as it's just doing the action and not setting any page for user to look at. Correct me if you think otherwise.
            Hide
            Sam Hemelryk added a comment -

            Thanks Raj, this has been integrated now. No probs about instancecomment, makes sense.

            Cheers
            Sam

            Show
            Sam Hemelryk added a comment - Thanks Raj, this has been integrated now. No probs about instancecomment, makes sense. Cheers Sam
            Hide
            Tim Barker added a comment -

            Tested numerous actions with a wiki activity and the were all logged.

            Show
            Tim Barker added a comment - Tested numerous actions with a wiki activity and the were all logged.
            Hide
            Sam Hemelryk added a comment -

            Congratulations are in order, you've made it, or at least your code has!
            It's now part of Moodle and both the git and cvs repositories have been updated.

            This issue is being marked as fixed and closed.

            Thank you.

            Show
            Sam Hemelryk added a comment - Congratulations are in order, you've made it, or at least your code has! It's now part of Moodle and both the git and cvs repositories have been updated. This issue is being marked as fixed and closed. Thank you.

              People

              • Votes:
                4 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: