Print student's report

Print student's report

Cécile Deruy -
Кількість відповідей: 14

There is an error when a student click on the top-left print icon in his/her report: permission missing.
I have modified report.php to check the "readallresponses" capability instead of function "can_view_all_responses()", is it OK?

У відповідь на Cécile Deruy

Re: Print student's report

Joseph Rézeau -
Фото Core developers Фото Plugin developers Фото Testers Фото Translators
Hi Cécile,
Which version of Moodle? Which version of Questionnaire?
Using Moodle 3.10 and Questionnaire 2020111100 I do not see any problem with student capability to read their responses.
What exactly do you want your students to be able to do? You want or you don't want to allow them to print their own responses?
У відповідь на Joseph Rézeau

Re: Print student's report

Joseph Rézeau -
Фото Core developers Фото Plugin developers Фото Testers Фото Translators

Hi Cecile,

Usual forum rules apply, one question/topic only per discussion thread! I just split your reply to a new discussion, because the second part was a new question, unrelated to the first.

Below I have copied the first part of your post:


Hi Joseph,
Sorry,I forgot! Moodle 3.9.2 and Questionnaire 3.9.1, but I also tried with Moodle 3.10 and it's the same.
The problem is when a student wants to print the report with this icon ("Print this response") :

He/she gets this message:

Only for students, not for teachers.

У відповідь на Joseph Rézeau

Re: Print student's report

Joseph Rézeau -
Фото Core developers Фото Plugin developers Фото Testers Фото Translators

Hi Cecile,

1.- You wrote "I have modified report.php to check the "readallresponses" capability instead of function "can_view_all_responses()", is it OK?"

Did you do this modification before or after you noticed the error message? If you did the modification after you noticed the error, did the error disappear?

2.- As I wrote before I do not see that error on my own Moodle sites. If I can't reproduce it then I can't help.

У відповідь на Joseph Rézeau

Re: Print student's report

Cécile Deruy -
Hi Joseph,
1: I made this modif after getting the message to try to fix the problem and it worked, the error disappeared.
2: I understand well! In fact this is OK now with my modif, I was just wondering if it was a known bug.
Thank you for these answers!
У відповідь на Cécile Deruy

Re: Print student's report

Rik van den Eijnden -

Hi all,

We are running into the exact same issue here.

Students trying to print their own questionnaire response receive an error message. See attached images.

Moodle 3.10 (Build: 20201109)

Questionnaire
mod_questionnaire
3.9.0 (Build - 2020062300)
2020062301

Thanks for your assistance.

Rik

Вкладення Screenshot 2021-01-18 at 15.54.16.png
Вкладення Screenshot 2021-01-18 at 15.54.45.png
У відповідь на Rik van den Eijnden

Re: Print student's report

Joseph Rézeau -
Фото Core developers Фото Plugin developers Фото Testers Фото Translators

Somewhere in the questionnaire files this comment says:

"If questionnaire is set to separate groups, prevent user who is not member of any group and is not a non-editing teacher to view All responses. "

  1. is your questionnaire set to separate groups?
  2. Is that "anonymous" student a member of any of those groups?
У відповідь на Joseph Rézeau

Re: Print student's report

Rik van den Eijnden -
Hi Joseph,

Thanks for looking into this issue. The questionnaire is NOT set to separate groups. See attached image.

Best,
Rik
Вкладення Screenshot 2021-01-19 at 13.41.12.png
У відповідь на Rik van den Eijnden

Re: Print student's report

Joseph Rézeau -
Фото Core developers Фото Plugin developers Фото Testers Фото Translators

I think I got it.

The bug happens when student clicks on the "Print this Response button" of a questionnaire which is still open. The Questionnaire mod then wrongly tries to print "all responses" instead of the student's individual report, which triggers the error message.задумався

I will investigate and post my results here after I've hopefully found a fix.

У відповідь на Joseph Rézeau

Re: Print student's report

Joseph Rézeau -
Фото Core developers Фото Plugin developers Фото Testers Фото Translators
У відповідь на Joseph Rézeau

Re: Print student's report

Blair F. -
Фото Particularly helpful Moodlers
It seems like this patch hasn't been implemented, am I right? We've got the latest build installed (3.10.1 (Build - 2021080400) 2020111101) and the problem still exists.