Suspended users removal from cohort

Suspended users removal from cohort

by Richard van Iwaarden -
Number of replies: 3
Picture of Particularly helpful Moodlers

Every summer/schoolyear we have many teacher leaving and joining the institution.

The accounts of the teachers that leave the schools are suspended in Moodle. However, the stay in all cohorts.

How do other Moodle-admins deal with this? It is virtually impossible to remove 123 teachers from around 5 cohorts each.

Is there a quick way to this? I do not want to delete the teachers' accounts for two reasons:

  1. They might come back at some point
  2. I don't know what will happen to the grades given by these teachers. The grades should remain intact. Anyone knows what happens with grades that are given by a teacher account that has been deleted?

Thanks!

Richard.

Average of ratings: -
In reply to Richard van Iwaarden

Re: Suspended users removal from cohort

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

If they are suspended, what does it hurt that they still show in the cohort...?  I am just wondering what the effect is of them being in a cohort but suspended.  I presume that they are no longer showing in the courses.  I would think the grades would stay as they should attach to the course and the student.  Sorry, not really an answer, just more questions!

In reply to Emma Richardson

Re: Suspended users removal from cohort

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers

Hi Emma,

Thanks for your reply.

I want them to be out of the cohorts for several reasons:

1. If you add this cohort to a course, the users become a member of this course and are still visible

2. We have a big Moodle. If you want to add users to cohorts there's a limit in the search of 1000 results. This often creates a problem when you want to add say all teachers from a certain department and you search for this department. I get results above 1000 with many inactive users.

3. We are experiencing huge performance issues on our Moodle which has been running over 10 years. Our databases are exploding. Lots of stuff from Moodle never gets deleted: logs, messages, grades, etc. I would like to administer a bit here and there. Removing users from cohorts that left the institution 8 years ago is one of them smile

I must seriously say that Moodle runs really well for schools with not to many students. When you get to many students, teachers, courses and cohorts, serious problems arise in administrating Moodle.

One very simpel example for this is: try adding 5 cohorts to 85 courses.... Moodle can not so this quickly. It will take you days. Which is really weird, because it happens to me all the time. You will end up adding users to categories just to save time, but this is neither wanted nor recommended...


In reply to Richard van Iwaarden

Re: Suspended users removal from cohort

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

I think you could actually delete the teachers without much issue.  A deleted user actually stays in the database but just has the deleted tag set to 1 instead of zero.  So, if the teacher returned several years later, you could actually reinstate them directly in the database.  (I discovered this when one my admins randomly deleted two students by mistake!)  I would of course, recommend testing this first with a test teacher to verify that everything still works the same way but I suspect that it will.