One teacher cannot add assignments, others can, permissions the same

One teacher cannot add assignments, others can, permissions the same

by Paul Nijbakker -
Number of replies: 40

Hi all,

(Moodle 3.9.7, PHP 7.3.20) I have a strange case in which one teacher cannot add or edit assignment modules in any course. No error messages are generated, the settings page simply won't save. Other teachers do not have this problem. The permissions for this teacher are normal (same as for other teachers). Changing the teacher's role to Manager, does not solve the issue.

Have you any suggestions as to the cause of this issue, or what I should check?

Thanks beforehand,

Paul.

Average of ratings: -
In reply to Paul Nijbakker

Re: One teacher cannot add assignments, others can, permissions the same

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Paul,

Have you tried logging in as the teacher?

In reply to Helen Foster

Re: One teacher cannot add assignments, others can, permissions the same

by Paul Nijbakker -
Hi Helen

Thanks for your response. Yes, I did log in as the teacher in question and when I log in as her, I cannot add or edit assignments either, but with my regular admin account I can. Also with other accounts (manually created or via our LDAP authentication) in the teacher role, I can add and edit assignments normally. In the courses I checked, the teacher in question has the same permissions as the other teachers (so mod/assign:addinstance is set to Yes).

Rgrds,
Paul.
In reply to Paul Nijbakker

Re: One teacher cannot add assignments, others can, permissions the same

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Just to be clear, when you say you have checked the permissions, have you checked them using the "Check permissions" feature: https://docs.moodle.org/en/Permissions#Checking_permissions

Sometimes, problems like this, can be due to a 'prohibit' capability set higher up in the site hierarchy.

Apologies if this is what you've already checked.
In reply to Davo Smith

Re: One teacher cannot add assignments, others can, permissions the same

by Paul Nijbakker -
Hi Davo,

No offence taken. Yes, I did check permissions at the activity level and course level, as well as the role definitions at site level.
In reply to Paul Nijbakker

Re: One teacher cannot add assignments, others can, permissions the same

by Paul Nijbakker -
The mysterious error mysteriously disappeared... I am baffled.
Thanks for the responses.

Paul.
In reply to Paul Nijbakker

Re: One teacher cannot add assignments, others can, permissions the same

by Joel Schaefer -
Shoot! I am having what sounds like the exact same problem but it still has not gone away.
In reply to Joel Schaefer

Re: One teacher cannot add assignments, others can, permissions the same

by Paul Nijbakker -
Hi Joel,

My colleague, discovered that enabling Poodll submission in the assignment, allows an affected teacher to save an assignment and after that the teacher can edit the assignment and take away Poodll submission. Do you have the Poodll plugin setin your Moodle?

This gives merely an indication of where the cause could lie. It does not explain why this affects only few teachers and only for a limited time.

Rgrds,
Paul.
In reply to Paul Nijbakker

Re: One teacher cannot add assignments, others can, permissions the same

by Paul Nijbakker -

Aaand the mysterious error mysteriously re-occurred for another teacher. All permissions are in place, the error occurs in all courses (with or without H5P, which is up-to-date) and purging caches has no effect. Changing browsers or changing roles has no effect. We have by now Moodle 3.10.7 (to be upgraded to 3.10.8 soon).

In reply to Paul Nijbakker

Re: One teacher cannot add assignments, others can, permissions the same

by Akashdeep Singh -

Hi Paul,

Were you ever able to find the cause of this problem ?

This mysterious error affected one of our teachers last year and now it's haunting another one. 

All permissions are same nothing have changed. Restored the affected course in a test instance and it works as expected there.

I am looking into the HVP plugin as suggested by one of the contributors.

Regards,

Akash


In reply to Akashdeep Singh

Re: One teacher cannot add assignments, others can, permissions the same

by Paul Nijbakker -
Hi Akashdeep,

My colleague, discovered that enabling Poodll submission in the assignment, allows an affected teacher to save an assignment and after that the teacher can edit the assignment and take away Poodll submission. Do you have the Poodll plugin setin your Moodle?

This gives merely an indication of where the cause could lie. It does not explain why this affects only few teachers and only for a limited time.

Rgrds,
Paul.
Average of ratings: Useful (1)
In reply to Paul Nijbakker

Re: One teacher cannot add assignments, others can, permissions the same

by Joel Schaefer -
If anyone has any additional info on this I would love the insight. Here are my details:
Moodle 3.8.2+

2 users:
1) Account created manually assigned Course Creator system level role
2) Account created through LDAP assigned Course Creator system level role

Course with Assignment:
Both users can see the Grading Summary screen


User 1 can see All students:


User 2 cannot see any users:

In reply to Joel Schaefer

Re: One teacher cannot add assignments, others can, permissions the same

by Tom Esson -
I've been having this exact issue recently with one of our long-time Faculty members. Suddenly, he can't add or save assignments. I created another account for him and merged it with the old one, then he was able to add/save, but now it has reverted again. All permissions seem to be in place, and nothing obvious has changed with his account. Also Moodle 3.9.7.

Anyone else run into this?
In reply to Tom Esson

Re: One teacher cannot add assignments, others can, permissions the same

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
How is the teacher in question authenticating? Are you sure that he is not switching role while in the site? Have you checked his permissions? Is it specific to a single course?
In reply to Emma Richardson

Re: One teacher cannot add assignments, others can, permissions the same

by Tom Esson -
Hi Emma,

He authenticates via SAML2, like all of our users. He is not role-switching, although even going to a different role doesn't help. I even tried adding him to the System Administrator group and it still didn't make a difference.

His permissions all check out, and it happens in every single course.

Tom
In reply to Tom Esson

Re: One teacher cannot add assignments, others can, permissions the same

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
And you have logged in as him from a different computer and verified the issue?
In reply to Emma Richardson

Re: One teacher cannot add assignments, others can, permissions the same

by Tom Esson -
Absolutely, multiple pcs and tested with Chrome, Firefox & Edge, although, interestingly, I tried Safari on a Macbook this morning and it had the same behaviour, but on Chrome with the Macbook, it worked. I then tried Internet Explorer on the pc, which threw a few errors loading the page, but it actually saved the assignment.

I've had one other instructor with the same issue, but he was fairly new, so removing and recreating his account was easy to do, and he hasn't had a reoccurrence.

Very strange.
In reply to Tom Esson

Re: One teacher cannot add assignments, others can, permissions the same

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Hold on, so the button etc is actually there to save the assignment? It just doesn't save? Have you tried clearing caches? Have you turned debugging on to full developer level to see if there are some useful messages?
In reply to Emma Richardson

Re: One teacher cannot add assignments, others can, permissions the same

by Ben Haensel -

I had this going on for a teacher last week. He told me one of the last things he did before he couldn't update assign mods in the site was to update a non-core h5p (hvp). I updated that plugin, purged site cache for good measure, and he was back in business! Do you use the hvp plugin possibly? -Ben

Average of ratings: Useful (1)
In reply to Ben Haensel

Re: One teacher cannot add assignments, others can, permissions the same

by Tom Esson -
Thanks Ben,

We do use hvp, but it is fully up to date. I did update any content types and cleared cache, but to no avail. I also ended up applying all available plugin updates as well, but no dice.
In reply to Tom Esson

Re: One teacher cannot add assignments, others can, permissions the same

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
I would take a look at what plugins the teacher is using and maybe try disabling them one at a time. Also, do you have another server that might also be caching? Have you also cleared browser caches? When I am trying to troubleshoot, I tend to manually delete the cache and localcache folders from the moodleDATA folder (not the code folder). And then clear the browser caches. You might see if chrome developer tools tools shows anything being blocked on the page...
In reply to Emma Richardson

Re: One teacher cannot add assignments, others can, permissions the same

by Tom Esson -

Yes, the button is there, just nothing happens when you click on it.   It just stays on the page.   Caches have been cleared, debugging gives no information, no error is logged.

In reply to Tom Esson

Re: One teacher cannot add assignments, others can, permissions the same

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Check Ben's response and see if that fixes it - if not h5p, maybe another plugin is responsible...
In reply to Tom Esson

Re: One teacher cannot add assignments, others can, permissions the same

by Tom Esson -
And now...unbelievably, it's happening to my account, and I'm the site administrator. I was editing an assignment for an instructor and suddenly it refused to save.

Now I can't add or edit Assignment activities. I can add/edit everything else. So very strange.
In reply to Tom Esson

Re: One teacher cannot add assignments, others can, permissions the same

by Andrei Boris -
Hi Tom,
Have you found the resolution ?
We have Moodle 3.9.7 and it just happened to one of our teachers.
We don't have H5P ; yes, we already tried every single suggestion in this topic.
Thank you!
In reply to Andrei Boris

Re: One teacher cannot add assignments, others can, permissions the same

by Paul Nijbakker -
Hi Andrei,

My colleague, discovered that enabling Poodll submission in the assignment, allows an affected teacher to save an assignment and after that the teacher can edit the assignment and take away Poodll submission. Do you have the Poodll plugin setin your Moodle?

This gives merely an indication of where the cause could lie. It does not explain why this affects only few teachers and only for a limited time.

Rgrds,
Paul.
In reply to Paul Nijbakker

Re: One teacher cannot add assignments, others can, permissions the same

by François Lizotte -
Picture of Particularly helpful Moodlers
I'm running into this strange problem right now on a Moodle 3.11.12+ that was just updated this morning. I tried:

1- Clearing caches
2- Unenrol and enrol back in the course
3- Added another editing teacher to course who could add an assignment no problem

François
In reply to François Lizotte

Re: One teacher cannot add assignments, others can, permissions the same

by Ken Task -
Picture of Particularly helpful Moodlers

Turn on debugging ... all the way to developer.  Login as that teacher and see what Moodle might be complaining about.

Also check web services error logs as well as any WAF logs you might have.

'SoS', Ken


In reply to Ken Task

Re: One teacher cannot add assignments, others can, permissions the same

by François Lizotte -
Picture of Particularly helpful Moodlers
Debugging mode didn't show anything.

I'll ask our tech to check the logs again. The problem persists 24 hours later.
In reply to François Lizotte

Re: One teacher cannot add assignments, others can, permissions the same

by François Lizotte -
Picture of Particularly helpful Moodlers
New check this morning and the problem is gone. Might not be magic since Apache and PHP were both restarted earlier.

François
In reply to François Lizotte

Re: One teacher cannot add assignments, others can, permissions the same

by Paul Nijbakker -
Hi Francois,

My colleague, discovered that enabling Poodll submission in the assignment, allows an affected teacher to save an assignment and after that the teacher can edit the assignment and take away Poodll submission. Do you have the Poodll plugin setin your Moodle?

This gives merely an indication of where the cause could lie. It does not explain why this affects only few teachers and only for a limited time.

Rgrds,
Paul.
In reply to Paul Nijbakker

Re: One teacher cannot add assignments, others can, permissions the same

by Serge FELIX -
Hello,

We've got exactly the same problem this week on 4.1.2+ for 2 two teachers.

- For one of them, the problem gone itself ...
- The problem stays for the other.

The problem :
 - occurs only for assignment activity
 - is not dependant of the course

I've try to activate debug mode but nothing appears. Moreover, It's not comfortable to analyze on the production platform in exams period sad
We never had this issue in the past

Serge



In reply to Serge FELIX

Re: One teacher cannot add assignments, others can, permissions the same

by Paul Nijbakker -
Hi Serge,

See my other messages, do you have the Poodll assignment plugins?
Sorry about flooding the thread with the same information, but I am eager to find out if this is the entry needed to fix this issue.

Rgrds,
Paul.
In reply to Paul Nijbakker

Re: One teacher cannot add assignments, others can, permissions the same

by Serge FELIX -
Yes we have poodl plugin, but the problem also went away on its own for the second teacher ...

In reply to Serge FELIX

Re: One teacher cannot add assignments, others can, permissions the same

by Paul Nijbakker -
Hi Serge,

You can take a test account and try this:
  1. Go to a test course as teacher.
  2. Add an assignment (This should work)
  3. Add an H5P Dialog card activity to the course.
  4. Try and add another assignment (This will likely not work anymore)
  5. Try and add an assignment and select Poodll submission (This should work)
  6. Edit the assignment and take away the Poodll submission from the assignment settings (This should work)
To someone more knowledgeable than me, the Pooddll workaround should give a clue as to what kind of problem the H5P activity causes for the user account, which in turn should give leads as to how it can be fixed.

Rgrds,
Paul.
In reply to Paul Nijbakker

Re: One teacher cannot add assignments, others can, permissions the same

by Serge FELIX -
Sorry for my late response, I've try to reproduce the bug with your procedure but without success.

My colleagues are aware of the bug and your workaround, so they can investigate further if they encounter it again.
As well as they can try to reproduce it when the exam period will over.


I'm just a system admin smile

Serge
In reply to Paul Nijbakker

Re: One teacher cannot add assignments, others can, permissions the same

by Paul Nijbakker -
Hi all,

While testing how this problem occurs, we noticed that it comes up after a teacher has edited an H5P activity in the Moodle content bank! (So, not the hvp plugin but Moodle's own h5p plugin). If we now can also find out what makes it go away, we would be happy, but for now activating the Poodle assignment submission plugin allows the assignment to be saved (and subsequently edited) and that will be our workaround for now.

Rgrds,
Paul.
In reply to Paul Nijbakker

Re: One teacher cannot add assignments, others can, permissions the same

by Jean-François Rouleau -
Hi, we've had the exact same problem at our institution for months and I managed to reproduce it in a non-production environment just yesterday so I could finally debug it. If I'm not mistaken, the bug comes from the assignsubmission_onlinepoodll plugin when the "Online Poodll" submission type is not selected and the "backimage" filemanager element does not have any image and when there exists some draft files with itemid = 0 for the current user. Thats why it only affect one user and why it goes away after a few day when Moodle deletes old draft files.

Here is the bug report with all the technical details I found:
https://github.com/justinhunt/moodle-assign_submission_onlinepoodll/issues/7

Meanwhile, the workaround proposed by Paul is also the one I recommend.

Jean-François
Average of ratings: Useful (2)
In reply to Paul Nijbakker

Re: One teacher cannot add assignments, others can, permissions the same

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers
I have added a fix for this now in the latest release of: assignsubmission_onlinepoodll (version 3.1.13 Build 2023120800)
You can get it here:
https://moodle.org/plugins/assignsubmission_onlinepoodll

Paul's steps in this thread to reproduce the issue were very helpful, and Jean-François detailed analysis of the problem was terrific. Apologies that it took so long.