Moodle
  1. Moodle
  2. MDL-11382

View own activity report and Edit your own profile should be re-activated in Administration block

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7, 1.8, 1.9
    • Fix Version/s: 1.8.6, 1.9.1
    • Component/s: Accessibility, Blocks
    • Labels:
      None
    • Affected Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      View own activity report and Edit your own profile should be re-activated in Administration block.
      These two links have been commented out in 1.7, 1.8 and 1.9, preceded with this comment: "Should the following two be in this block?"
      Unfortunately they have never been re-located to any other block so far.
      Having only recently upgraded from 1.6 to 1.8 I am missing this link very much and I am really surprised that no-one has ever raised the question since 1.7 was introduced... anyway, please can someone urgently comment out those lines in in blocks>admin>block_admin.php to restore those links?
      Thanks
      lines to be commented out:
      /// Should the following two be in this block?

      /// View own activity report
      // if ($course->showreports)

      { // $this->content->items[]='<a href="user.php?id='.$this->instance->pageid.'&user='.$USER->id.'">'.get_string('activityreport').'</a>'; // $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/report.gif" alt="" />'; // }

      /// Edit your own profile

      // $fullname = fullname($USER, has_capability('moodle/site:viewfullnames', $context));
      // $editmyprofile = '<a title="'.$fullname.'" href="'.$CFG->wwwroot.'/user/edit.php?id='.$USER->id.'&course='.$this->instance->pageid.'">'.get_string('editmyprofile').'</a>';
      // if (empty($USER->description))

      { // //Accessibility: replace non-standard <blink> with CSS (<a> makes title visible in IE). // $text = get_string('profile').' '.get_string('missingdescription'); // $this->content->items[]= $editmyprofile.' <a title="'.$text.'" class="useredit blink">*<span class="accesshide">'.$text.'</span></a>'; // }

      else

      { // $this->content->items[]= $editmyprofile; // }

      // $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" alt="" />';

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Joseph Rézeau added a comment -

            Can we have this problem fixed ASAP please! It's only a matter of commenting out a dozen lines...
            Joseph

            Show
            Joseph Rézeau added a comment - Can we have this problem fixed ASAP please! It's only a matter of commenting out a dozen lines... Joseph
            Hide
            Joseph Rézeau added a comment -

            BUMP!
            Can we have this problem fixed, please? It should take about one minute... and would be really useful.
            Thanks
            Joseph

            Show
            Joseph Rézeau added a comment - BUMP! Can we have this problem fixed, please? It should take about one minute... and would be really useful. Thanks Joseph
            Hide
            Ann Adamcik added a comment -

            I've tested the suggested change in 1.8.3 and 1.9 (both from Nov. 9) - works just fine, and it quite useful to have these links in this block.

            Show
            Ann Adamcik added a comment - I've tested the suggested change in 1.8.3 and 1.9 (both from Nov. 9) - works just fine, and it quite useful to have these links in this block.
            Hide
            Joseph Rézeau added a comment -

            Ann,
            I know the suggested changes do work, I need them urgently. What we need now is for some moodle developer with committing rights to commit them to 1.8 and 1.9 as soon as possible.
            Joseph

            Show
            Joseph Rézeau added a comment - Ann, I know the suggested changes do work, I need them urgently. What we need now is for some moodle developer with committing rights to commit them to 1.8 and 1.9 as soon as possible. Joseph
            Hide
            Joseph Rézeau added a comment -

            Assigned to Petr Skoda in the hope that this bug will finally be fixed. I still need it urgently...
            Thanks
            Joseph

            Show
            Joseph Rézeau added a comment - Assigned to Petr Skoda in the hope that this bug will finally be fixed. I still need it urgently... Thanks Joseph
            Hide
            Petr Skoda added a comment -

            Assigning back to MD.
            You can get there from user section - click on your own name.

            Show
            Petr Skoda added a comment - Assigning back to MD. You can get there from user section - click on your own name.
            Hide
            Joseph Rézeau added a comment -

            Petr > You can get there from user section - click on your own name.

            Of course I know that, but it is not so easy to have to explain it to the students.

            Quite frankly I do not know why for students the Administration block isnow almost empty when it should be the natural place to hold those "edit profile" and "activity report" links as they used to be in moodle 1.6.

            What's keeping Moodle from restoring those links? I'm still waiting for a reasonable explanation...

            Joseph

            Show
            Joseph Rézeau added a comment - Petr > You can get there from user section - click on your own name. Of course I know that, but it is not so easy to have to explain it to the students. Quite frankly I do not know why for students the Administration block isnow almost empty when it should be the natural place to hold those "edit profile" and "activity report" links as they used to be in moodle 1.6. What's keeping Moodle from restoring those links? I'm still waiting for a reasonable explanation... Joseph
            Hide
            Martin Dougiamas added a comment -

            Hmm, there was a good reason but I can't remember what it was: http://cvs.moodle.org/moodle/blocks/admin/block_admin.php?r1=1.70&r2=1.71

            We can't just uncomment it anyway.

            I think we need to:

            1) add some capability checks, exactly the same as the destination pages, to determine if the link should be shown. $course->showreports shouldn't be used any more.

            2) remove all that blink junk

            3) keep it efficient.

            Jerome, want to have a go and produce a diff patch here as an attachment?

            Show
            Martin Dougiamas added a comment - Hmm, there was a good reason but I can't remember what it was: http://cvs.moodle.org/moodle/blocks/admin/block_admin.php?r1=1.70&r2=1.71 We can't just uncomment it anyway. I think we need to: 1) add some capability checks, exactly the same as the destination pages, to determine if the link should be shown. $course->showreports shouldn't be used any more. 2) remove all that blink junk 3) keep it efficient. Jerome, want to have a go and produce a diff patch here as an attachment?
            Hide
            Jérôme Mouneyrac added a comment -

            I attached a patch to this issue. It should work. Activity reports and Edit profile are back in the administration block.
            I didn't commit yet. It needs to be reviewed (it's my first patch .

            Show
            Jérôme Mouneyrac added a comment - I attached a patch to this issue. It should work. Activity reports and Edit profile are back in the administration block. I didn't commit yet. It needs to be reviewed (it's my first patch .
            Hide
            Jérôme Mouneyrac added a comment -

            Ok it has been commited to HEAD

            Show
            Jérôme Mouneyrac added a comment - Ok it has been commited to HEAD
            Hide
            Joseph Rézeau added a comment -

            Jerome,
            I have tested your fix on moodle HEAD. It works fine.
            Could you please backport the fix to 1.8 and 1.9 ?
            Joseph

            Show
            Joseph Rézeau added a comment - Jerome, I have tested your fix on moodle HEAD. It works fine. Could you please backport the fix to 1.8 and 1.9 ? Joseph
            Hide
            Martin Dougiamas added a comment -

            I'm just trying this out and thinking about it. Yes it's convenient to have them there but it's not consistent and I think this affects usability (obviously we can't put links to everything everywhere). The main problem is that these links don't work so well for teachers/admins.

            1) The link "Activity report" has two problems. Firstly it looks like a link to an activity report for all people in the whole course, when it's not, it's just your own (and surely you know your own activity because you were there . Secondly, it conflicts with the other link to "Reports" which is where all the course reports are (including course activity reports). Overall it just looks shoddy to me and I think the original removal was correct.

            2) The link to "Edit my profile" again, is not a course administration thing, and it goes straight to a form and doesn't take you back again (which is bad design). At very least we should link to the profile page and call the link "My profile" (then they can use the Edit tab there). This link used to be in the "Participants" block but apparently many people don't use that block and complained, which is why it went to the course admin block as the next best thing. Overall I'm tending to believe that none of these are ideal and if clicking on one's name is deemed insufficient then we need a new solution (beyond you just adding these links to your theme's header.html).

            -100 for backporting these to stable versions.

            Show
            Martin Dougiamas added a comment - I'm just trying this out and thinking about it. Yes it's convenient to have them there but it's not consistent and I think this affects usability (obviously we can't put links to everything everywhere). The main problem is that these links don't work so well for teachers/admins. 1) The link "Activity report" has two problems. Firstly it looks like a link to an activity report for all people in the whole course, when it's not, it's just your own (and surely you know your own activity because you were there . Secondly, it conflicts with the other link to "Reports" which is where all the course reports are (including course activity reports). Overall it just looks shoddy to me and I think the original removal was correct. 2) The link to "Edit my profile" again, is not a course administration thing, and it goes straight to a form and doesn't take you back again (which is bad design). At very least we should link to the profile page and call the link "My profile" (then they can use the Edit tab there). This link used to be in the "Participants" block but apparently many people don't use that block and complained, which is why it went to the course admin block as the next best thing. Overall I'm tending to believe that none of these are ideal and if clicking on one's name is deemed insufficient then we need a new solution (beyond you just adding these links to your theme's header.html). -100 for backporting these to stable versions.
            Hide
            Joseph Rézeau added a comment -

            Martin,
            As the original reporter of this bug, I appreciate your taking the time to give your opinion. Here are my answers.

            • Martin > 1) The link "Activity report" has two problems. Firstly it looks like a link to an activity report for all people in the whole course, when it's not, it's just your own (and surely you know your own activity because you were there . Secondly, it conflicts with the other link to "Reports" which is where all the course reports are (including course activity reports). Overall it just looks shoddy to me and I think the original removal was correct.
            • Joseph Totally agree. Easy fix: the link Activity report shoud only appear in the Administration block for participants with a role of "student", i.e. participants who can only view their own activity, not anybody else's.
            • Martin.- 2) The link to "Edit my profile" again, is not a course administration thing, and it goes straight to a form and doesn't take you back again (which is bad design).
            • Joseph.- Yes, but... If a user clicks on their "logged in as" name link, they are taken to the Profile page, and they are not taken back to the course front page again except by clicking on its name in the navigation breadcrumb (but see below).
            • Martin.- At very least we should link to the profile page and call the link "My profile" (then they can use the Edit tab there). This link used to be in the "Participants" block but apparently many people don't use that block and complained, which is why it went to the course admin block as the next best thing.
            • Joseph.- I agree that rather than having "Edit profile" and "Activity reports" links in the Admin block (for students) we should have a unique link, but it's hard to think of a unique name to cover all the possible actions on the "Profile" page: View Profile, Edit profile, Forum posts, Blog, Activity reports. I would accept "My Profile" for want of a better word.
            • Martin.- Overall I'm tending to believe that none of these are ideal and if clicking on one's name is deemed insufficient then we need a new solution (beyond you just adding these links to your theme's header.html).
            • Joseph.- When I complained to our admin about the disparition of the "Edit profile" and "Activity reports" links in the Admin block in Moodle 1.8, he said "clicking on one's own "logged in as" name link is the standard way of editing one's profile, etc. This maybe the case, but I can tell from experience that NONE of my students (and NONE of the teachers) will ever think of clicking on their name up there to do any action! That's why I wanted more explicit links in the Administration block, which seems to me a "natural" place to look for it.

            CONCLUSION
            Can we agree on the following solution:
            Put in the Administration block (for everyone) one link called "My Profile" (for want of a better wording) which takes a participant to their Profile page.

            Joseph

            Show
            Joseph Rézeau added a comment - Martin, As the original reporter of this bug, I appreciate your taking the time to give your opinion. Here are my answers. Martin > 1) The link "Activity report" has two problems. Firstly it looks like a link to an activity report for all people in the whole course, when it's not, it's just your own (and surely you know your own activity because you were there . Secondly, it conflicts with the other link to "Reports" which is where all the course reports are (including course activity reports). Overall it just looks shoddy to me and I think the original removal was correct. Joseph Totally agree. Easy fix: the link Activity report shoud only appear in the Administration block for participants with a role of "student", i.e. participants who can only view their own activity, not anybody else's. Martin.- 2) The link to "Edit my profile" again, is not a course administration thing, and it goes straight to a form and doesn't take you back again (which is bad design). Joseph.- Yes, but... If a user clicks on their "logged in as" name link, they are taken to the Profile page, and they are not taken back to the course front page again except by clicking on its name in the navigation breadcrumb (but see below). Martin.- At very least we should link to the profile page and call the link "My profile" (then they can use the Edit tab there). This link used to be in the "Participants" block but apparently many people don't use that block and complained, which is why it went to the course admin block as the next best thing. Joseph.- I agree that rather than having "Edit profile" and "Activity reports" links in the Admin block (for students) we should have a unique link, but it's hard to think of a unique name to cover all the possible actions on the "Profile" page: View Profile, Edit profile, Forum posts, Blog, Activity reports. I would accept "My Profile" for want of a better word. Martin.- Overall I'm tending to believe that none of these are ideal and if clicking on one's name is deemed insufficient then we need a new solution (beyond you just adding these links to your theme's header.html). Joseph.- When I complained to our admin about the disparition of the "Edit profile" and "Activity reports" links in the Admin block in Moodle 1.8, he said "clicking on one's own "logged in as" name link is the standard way of editing one's profile, etc. This maybe the case, but I can tell from experience that NONE of my students (and NONE of the teachers) will ever think of clicking on their name up there to do any action! That's why I wanted more explicit links in the Administration block, which seems to me a "natural" place to look for it. CONCLUSION Can we agree on the following solution: Put in the Administration block (for everyone) one link called "My Profile" (for want of a better wording) which takes a participant to their Profile page. Joseph
            Hide
            Jérôme Mouneyrac added a comment -

            I modified the patch. It adds a link 'Profil' to the administration block. Any user is redirect to his own profil.
            'Activity' link disappears.

            Show
            Jérôme Mouneyrac added a comment - I modified the patch. It adds a link 'Profil' to the administration block. Any user is redirect to his own profil. 'Activity' link disappears.
            Hide
            Joseph Rézeau added a comment -

            Jerome, I agree with your most recent patch.
            If everyone else concerned agrees I would like it to be committed to 1.8, 1.9 and 2.0 as soon as possible.
            Joseph

            Show
            Joseph Rézeau added a comment - Jerome, I agree with your most recent patch. If everyone else concerned agrees I would like it to be committed to 1.8, 1.9 and 2.0 as soon as possible. Joseph
            Hide
            Martin Dougiamas added a comment -

            Yep, just fix:

            1) the spaces (4 space indents)
            2) the if() can go. It may as well be on the site course too for consistency.

            Show
            Martin Dougiamas added a comment - Yep, just fix: 1) the spaces (4 space indents) 2) the if() can go. It may as well be on the site course too for consistency.
            Hide
            Jérôme Mouneyrac added a comment -

            Patch updated. I commited the changes in trunk, 1.9, 1.8 and 1.7.

            Show
            Jérôme Mouneyrac added a comment - Patch updated. I commited the changes in trunk, 1.9, 1.8 and 1.7.
            Hide
            Helen Foster added a comment -

            Thanks for everyones' comments and thanks to Jerome for fixing

            Show
            Helen Foster added a comment - Thanks for everyones' comments and thanks to Jerome for fixing
            Hide
            Mark Drechsler added a comment -

            I know this is closed, but does this mean that there is still no way for a student to view their own activity report? If so then is there anything else around that will let that happen? This has come out of the question of how students know what they have viewed (and not viewed) - and I can't think of any other way to do it.

            Show
            Mark Drechsler added a comment - I know this is closed, but does this mean that there is still no way for a student to view their own activity report? If so then is there anything else around that will let that happen? This has come out of the question of how students know what they have viewed (and not viewed) - and I can't think of any other way to do it.
            Hide
            Helen Foster added a comment -

            Hi Mark,

            If "Show activity reports" is set to yes, in the course settings, a student can view their own activity report via the activity reports tab in their profile.

            Show
            Helen Foster added a comment - Hi Mark, If "Show activity reports" is set to yes, in the course settings, a student can view their own activity report via the activity reports tab in their profile.
            Hide
            Mark Drechsler added a comment -

            Hi Helen,
            Thanks for that - just what I was after
            Cheers,
            Mark.

            Show
            Mark Drechsler added a comment - Hi Helen, Thanks for that - just what I was after Cheers, Mark.

              People

              • Votes:
                6 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: