Courses losing role assignments

Courses losing role assignments

by Todd Moore -
Number of replies: 22

Almost daily I am receiving support requests from teachers who's role as a course's teacher seems to have simply vanished.

I know that these courses previously had the teacher role assignments but now there are no teachers assigned?

I am also fairly certain that the teachers have not unenrolled themselves from the course but rather it has been done by the system; possibly during a cron job.

We are using Moodle 1.9.2.

Is there a setting somewhere in administration that automatically removes a role if a teacher hasn't logged in for a certain amount of time?  If so, I cannot find it. Has anyone else seen this issue?

Average of ratings: -
In reply to Todd Moore

Re: Courses losing role assignments

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 Todd,

Please see the question about users being unenrolled for no apparent reason in the Enrolment FAQ for possible causes of the problem.
In reply to Helen Foster

Re: Courses losing role assignments

by Todd Moore -

Helen,

Thanks but once again, I don't think that the teachers are unenrolling themselves.  In any case, I have changed the moodle/roles:unassignself setting to "not set" per the instructions and will see how that goes.

Also, the longtimenosee variable is set to 30 days and it is my understanding that this setting only applies to students. In any event, I have now found out that the teachers that this happened to had logged in within the last 7 days so that variable should not have come into play.

In reply to Todd Moore

Re: Courses losing role assignments

by Todd Moore -

Hello Everyone,

Well this is STILL happening and now I've seen the same issue popping up in the tracker for others but there is no solution.  It is getting VERY annoying.  Anyone have any other ideas?

In reply to Todd Moore

Re: Courses losing role assignments

by René Pijlman -

There's a known bug MDL-11428: longtimenosee applies to all users, students and teachers, whereas most people (and the option's description and the documentation) expect it to apply only to students.

Unfortunately, the bug description is somewhat unclear and the assigned priority is only 'minor'. Perhaps you can login to the tracker and expedite that bug.

In reply to Todd Moore

Re: Courses losing role assignments

by Ida Byrd-Hill -
Students i was logging in were considered admin users. So I went into site adminsistration to ensure the roles are set and my site admin box was reduce to course grade and profile.I lose the ability to make changes. Any way to fix it?
In reply to Todd Moore

Re: Courses losing role assignments

by P P -
Hi,
I am not sure if this can help. But with the default roles for the teachers, even after the period in which the course is defined, they should not be removed from the participant list. Have you made any changes to the teacher role?
In reply to P P

Re: Courses losing role assignments

by Todd Moore -

No, to my knowledge there have been no changes to the teacher role.  The course will just suddenly have no teacher assigned to them. 

I am not sure but I believe that it may be associated with the user accounts of the teachers since it appears to be happening to the same users multiple times.

In reply to Todd Moore

Re: Courses losing role assignments

by P P -
So..., it seems that we have to adopt the trial and error approach - the one and the only! wink smile)

Is it possible to create new accounts for that group and see if it happens again. If so, we should focus on other layers of teh applciation (may be the database layer).
In reply to Todd Moore

Re: Courses losing role assignments

by Alan Zaitchik -
I am not sure but my problem may be relevant.
I am using 1.9.3, Build from 24 December.
Using the external DB plugin I created various editingteacher accounts and assigned them to their courses. The courses are set hidden (visible=0) since we want instructors to add content before students can access the course.
But although Moodle knows that an instructor has the role "editingteacher" for the course the instructor CANNOT access the course. (See attached XML file.)
Tim Hunt suggested I try manually creating an editingteacher account to see if the problem is in the roles and capabilities system or in the external database enrolment plugin. I did so but got the same results. Neither the manually created test001 account nor the database-created '1018325' account can access the hidden course.
Note, too, that I double checked to make sure that the editingteacher role does indeed have the capabilty of accessing hidden courses. I didn't check this inside MySQL but rather through the administrative interface. If someone tells me how I would gladly check this internally as well.
As far as I know this problem did not occur in earlier releases/builds of 1.9.3, but maybe I am wrong.
Alan
PS/ There is obviously no chance that the "test001" instructor unassigned or changed its role in any way.
In reply to Alan Zaitchik

Re: Courses losing role assignments

by Peter Diedrichs -
Picture of Particularly helpful Moodlers
I have a problem with 1.9.3 that might be related: when setting up a new course, the editing teachers don't gets the drop-down menus for adding activities and resources. All other editing tools are visible.

If copying and restoring an existing course to create the new course, everything works just fine.
In reply to Todd Moore

Further update...

by Alan Zaitchik -
I just tried an experiment on a 1.9.3 build from 10 December, and the editingteacher account I created was able to access hidden courses to which it was assigned (manually) as an instructor. So perhaps the problems I saw are strictly issues for the 24 December build.
If this is irrelevant to the thread then I apologize for the noise.
In reply to Alan Zaitchik

Re: Further update...

by Todd Moore -

My problem is occuring with visible courses.  So the hidden course issue you are dealing with appears to be unrelated.

In reply to Todd Moore

Re: Further update...

by Tara Thompson -
I think we just started to experience the same problem. Our teachers reported over the break that they could not see their courses. When the administrator went in to our moodle to troubleshoot, these teachers were no longer assigned as teachers to their course. We are using Moodle 1.9.3.

If we figure out a fix, I'll let you know. Hope you'll do the same.
In reply to Tara Thompson

Re: Further update...

by Alan Zaitchik -
What exact build you are using? It will be in the version.php file in the Moodle root folder. I posted questions in multiple threads in various forums and was told that other people did not have this problem with 1.9.3. I only saw one other posting that it is a problem
http://moodle.org/mod/forum/discuss.php?d=113419#p497860
and then your reply.
I'm wondering if it affects only the recent builds (from December). I wouldn't mind rolling back to 1.9.3 from mid-October (the last non-weekly numbered build of 1.9.3)-- if that would solve the problem. It's a real show-stopper for us. I imagine that it is for you too.
Thank God I am not the only one facing this problem! thoughtful
Alan

In reply to Tara Thompson

Re: Further update...

by Alan Zaitchik -
This issues seems to be more actively pursued right now in this thread:
http://moodle.org/mod/forum/discuss.php?d=113419#p498149
Alan
In reply to Alan Zaitchik

Re: Further update...

by Todd Moore -

Alan,

Once again, this is occuring in visible courses.  The referenced thread addresses your hidden course issues but in mine and the above poster's case, this is happening in visible courses.

If by some method they are related, the issue is definitely not dependent on whether a course is hidden or not.

It happened to MANY teachers over our holiday break so it is more likely related to a variable like the longtimenosee variable. Is there a variable somewhere that would remove rights to a course after a period of inactivity?  If so, how can we disable it?

In reply to Tara Thompson

Re: Further update...

by Alan Zaitchik -
Here is the problem, as far as I have been able to determine. It is "solved" in all practical terms, but I am not sure why.

The problem was that when I decided to change the code in enrol/database/enrol.php so that the autocreated course would not be set to visible but would instead (so I thought) "inherit" the visibility setting (0) of the template course I am using, what ended up happening is... well, the new autocreated course ended up with visible=0 as far as MySQL was concerned but clearly was not "fully" set up "correctly". Thus editing Teachers could not see it or access it, despite the fact that the role of editing Teacher really did have the capabilities in question. When I explicitly added a line to enrol.php
$course->visible = 0;
then all was well. I am still not sure how this makes any sense, but those are the facts. I suppose I could spend some time studying the code which actually creates all the course-related tables but for now the fix seems to be: if you are using a template course and the external database plugin and want the autocreated courses to be invisible to students then be sure to explicitly make them so by adding the above line to enrol.php (around line 640 in my 1.9.3 release).

Alan

In reply to Alan Zaitchik

Re: Further update...

by Todd Moore -
That's wonderful and I'm glad you got your problem solved but I posted this thread to see if someone could help me solve my problem.
In reply to Todd Moore

Re: Further update...

by Alan Zaitchik -
Yeah, I am sorry to have become so self-absorbed in my problem. I didn't mean to divert the thread from the original issue, and I apologize if I gave offense in any way. thoughtful Initially I thought there might be a connection between losing capabilities in your scenario (visible courses) and in mine (invisible courses), but I guess there isn't.
In reply to Todd Moore

Re: Further update...

by Jez H -
Hello Todd,

I am afraid I cannot offer a solution, but I have exactly the same issue. I have been through all the other possible causes and now believe this is a bug.

If I look at the logs for the offending courses I can see teachers being assigned roles.
I can see these subsequently teachers adding resources.

So, from the logs I can be sure that these people were correctly assigned as teaches and they were able to maintain their course.

At the point I am asked to look at these courses there are no teachers assigned, they have all vanished.

There are no un-enrolments listed in the logs.

If teachers were being un-assigned, or un-assigning themeselves then that would show up in the logs. That is not happening. There are no un-assignmebts in the logs.

Many of our courses were actually imported from an older system. I am wondering if your courses were created in this version of Moodle or imported from another one?

Regards, Jeremy
In reply to Todd Moore

Re: Courses losing role assignments

by Lino Oliveira -

This is also happened to me, not only with teachers but also with a student.

I am using Moodle 2.1.1+ (Build: 20110803).

Regards,

Lino Oliveira