Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-respondents list: undefined variable $hiddenfields #238

Open
MartinGauk opened this issue Nov 5, 2019 · 2 comments
Open

Non-respondents list: undefined variable $hiddenfields #238

MartinGauk opened this issue Nov 5, 2019 · 2 comments

Comments

@MartinGauk
Copy link
Contributor

The code in show_nonrespondents.php tries to read from an undefined variable $hiddenfields.

https://github.com/PoetOS/moodle-mod_questionnaire/blob/5509c94f97c672a290db15aac7960b1b7c4a456e/show_nonrespondents.php#L214:L225

Actually, I wanted to hide the last access column and found this issue.

@mchurchward
Copy link
Contributor

Weird. That file was added back in 2.4 as part of https://tracker.moodle.org/browse/CONTRIB-4058. Those fields have been there since then. I need to see if they are supposed to be doing something important.

@mchurchward
Copy link
Contributor

I'm pretty sure that is supposed to ensure that fields configured as "hidden" on the site (admin/settings.php?section=userpolicies) are not exported. But apparently is was never implemented correctly.
It should have code like:
$hiddenfields = array_filter(explode(',', $CFG->hiddenuserfields));
and
has_capability('moodle/course:viewhiddenuserfields', $context);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants