missing Activity reports with 1.7

missing Activity reports with 1.7

by Guido van der Waals -
Number of replies: 12

Since I made an upgrade from moodle 1.6 to moodle 1.7 I have lost an important feature.

When I login with my admin account and select course>>participants>>pupil

You can see the frame beneath this. In this frame you can see the tab: “Activity reports”.

Leer Ling

But when I do the same with an account from a teacher the result is:

Leer Ling

I can’t see the tab: “Activity reports”.

What do I have to change to see this tab from one of my students.

Average of ratings: -
In reply to Guido van der Waals

Re: missing Activity reports with 1.7

by Yu Zhang -
Hi Guido,

Please check that your upgrade is successful. I suspect you have lost your admin provilages through a bad upgrade. Do you see the admin block on the site page?

Cheers,

Yu
In reply to Yu Zhang

Re: missing Activity reports with 1.7

by Guido van der Waals -

perhaps I miss something.

When I login as an administrator I can see all tabs, but when I teacher goes to a student he got only two tabs. He misses an important one: activity reports.

By the way; how can I check if my upgrade is succesfull?

In reply to Guido van der Waals

Re: missing Activity reports with 1.7

by Guido van der Waals -

I make the next tryout:

As an admin I give someone on site-level the role of a teacher. Such a teacher could see all the details of a student:

Leer Ling

Profile

Edit profile

Forum posts

Activity reports

But when I give someone the role teacher on the level of a category or lower some tabs are missing.

He gets only:

Leer Ling

Profile

Forum posts

Please help me!

In reply to Guido van der Waals

Re: missing Activity reports with 1.7

by Laura Anderson -

Hello,

I am having the same problem as Guido and would appreciate any help on this issue as well. 

Thank you very much.

In reply to Laura Anderson

Re: missing Activity reports with 1.7

by jon s -

Well, The same problem here.

I did a fresh install of moodle 1.7

I have one site-level admin and all the other users are not defined in any role.

I created a course and defined a course-level teacher. Some students enroled in that course.

The course-level teacher cannot see the report for any student of that specific course.

Is there any bug of 1.7?

In reply to jon s

Re: missing Activity reports with 1.7

by Guido van der Waals -

Until now I haven't seen a proper solution. It's really a big problem. Please help me. dood

In this case I believe that the solution must be a simple one.

Only a teacher with a link to contextid=1 has the possibility to see all “activity reports”.

In reply to Guido van der Waals

Re: missing Activity reports with 1.7

by Guido van der Waals -

I try it again. Here more information.

  • In the database mdl-role-capablities contextid=30 is missing. I am sure that I have assign role 3 to a person on courselevel. It’s strange.
  • When I delete in user\tabs.php line 150 the condition: if ( has_capability ('moodle/user:viewuseractivitiesreport', $personalcontext ) || ( $course -> showreports and $USER -> id == $user -> id ))
    it's obvious that also a teacher on course-level, role 3, can see all details.
  • It’s for me also clear that it’s a bug in the capability software.!

Please can a software engineer take a look at it? I'm desperate.

In reply to Guido van der Waals

Re: missing Activity reports with 1.7

by Guido van der Waals -

I’m desperate.

When I look in the table: mdl_role_capbilities I found:

176

1

1

moodle/user:readuserblogs

1

1165171501

0

179

1

2

moodle/user: viewuseractivitiesreport

1

1165171501

0

180

1

1

moodle/user:viewuseractivitiesreport

1

1165171501

0

You can see that only an admin and a coursecreator has the capability to see the viewuseracitivitiesreport.

So I must go to “editingteacher “
Users/permissions/define roles/editingteacher
I found:

Users

See all user posts moodle/user:readuserposts

See all user blogs moodle/user:readuserblogs

See user activity reports moodle/user:viewuseractivitiesreport

Edit user profile moodle/user:editprofile

therefore: it must be a bug!! Vote for it.
http://tracker.moodle.org/browse/MDL-8336

It seems to me that manage.php doesn’t save the changes correctly.

In reply to Guido van der Waals

Re: missing Activity reports with 1.7

by Guido van der Waals -

I have made a quick fix (it's more a hack):

I add in line 150 from moodle/user/tabs.php: isteacherinanycourse()

        if (has_capability('moodle/user:viewuseractivitiesreport', $personalcontext) || (($course->showreports and $USER->id == $user->id) or isteacherinanycourse())) {

In reply to Guido van der Waals

Re: missing Activity reports with 1.7

by Roger Clark -
I came across this bug as well, but unfortunately the fix didn't help as there was code in user.php doing the same check

So in both locations I've replaced

has_capability('moodle/user:viewuseractivitiesreport', $personalcontext)

with

has_capability('moodle/user:viewuseractivitiesreport', $coursecontext)

which seems to work

But I'm not a mMoodle expert and would really like a fix from someone who really understand how this whole moodle context system works smile


In reply to Roger Clark

Re: missing Activity reports with 1.7

by Yu Zhang -
Hi,

This will break parent role, please upgrade you Moodle instead.

Cheers,

Yu