Letting students view their attendance with the activity hidden

Letting students view their attendance with the activity hidden

by Mike Worth -
Number of replies: 4
Ronseal really, I am using a custom script to import our attendance data so only want the data to be viewed by users. I am implementing a custom quicklink block and want links for both teacher and student to look at the class attendance report(teacher) and individual attendance report(student).

I have this working apart form the fact that the activity must be visible otherwise the error "Sorry, this activity is currently hidden" is displayed to the student.

It would be nice if I could completely hide the activity link and only have the links in my custom block (I can hide the attendance block no problem)

Thanks,
Mike
Average of ratings: -
In reply to Mike Worth

Re: Letting students view their attendance with the activity hidden

by Mike Worth -
I've found a solution for anyone else who has this issue.

What can be done it simply to take the id of the instance of the attendance activity out of 'sequence' in mdl_course_section. It will need to be set to visible but once it is taken out of here it will not be displayed on the course page while not having the permission problem due to being hidden.

Mike
In reply to Mike Worth

Re: Letting students view their attendance with the activity hidden

by Mike Worth -
While this appears to work properly, it is in fact a bad way to do it. Due to the way data is cached it will get broken should any other changes get made to the courses once it has been done.

Anyone else got any ideas?

Mike
In reply to Mike Worth

Re: Letting students view their attendance with the activity hidden

by A. T. Wyatt -
Greetings, Mike!

I am confused by your post. I always put the attendance activity link in my course summary area and then hide it. Then I use the attendance block provided by Dmitry to let students see their attendance records. I guess there is something about your custom block code that is different from the original block. I hope you figure it out.

atw

In reply to A. T. Wyatt

Re: Letting students view their attendance with the activity hidden

by Mike Worth -
For some reason the link in the original block lead to an error page for the student if the activity was hidden. It doesn't matter as I have now managed to make it 'extra-hidden' such that not even teachers can see the activity itself. This is an advantage as the limited access they need to reports I can link directly in my custom block

Mike