Deleting course users

Deleting course users

by Tim Williams -
Number of replies: 8
Picture of Plugin developers
Is there any way of automatically deleting all the users associated with a specific course ?
Average of ratings: -
In reply to Tim Williams

Re: Deleting course users

by Joe Griffin -
Hi

I found this in another post:

In Martin's words:

User accounts are never deleted, they just get marked deleted. The username field gets changed to something unique so that that username is freed up to be used again.

The reason we keep the user data is that other data (like forum posts) may still exist throughout in your installation that references that user. For example, it would be impossible to show the name of the person who made a forum post if the user record was missing.


So looks like you can't delete users anyway.

Joe
In reply to Joe Griffin

Re: Deleting course users

by Tim Williams -
Picture of Plugin developers
This dosn't really change the nature of my problem, however the system itself handles deleting, I would still like to find a way of marking all users associated with a specific course as deleted.
In reply to Tim Williams

Re: Deleting course users

by Jeff Wood -

So... you don't want them unenrolled... you want then GONE!?

Can be done as admin, but I only know how by deleting one user at a time.

Jeff

In reply to Tim Williams

Re: Deleting course users

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
In Moodle 1.3 you go to the "Students" page in your course and hit the button at the bottom named "Unenroll all students".
In reply to Tim Williams

Re: Deleting course users

by Jeff Wood -

Another optin

Backup the course - choose no user data

When you restore the course under users choose none

Jeff

In reply to Jeff Wood

Re: Deleting course users

by Marc Dastous -

However, I want to delete all the user files after I create a backup.  How do I do that? 

My host has a 25,000 file limit and I am at 18,000+ now.  I need to start thinking about deleting old classes and archiving them as zip files.

Is there a way to delete the course AND all the associated files at the same time?

Marc

In reply to Marc Dastous

Re: Deleting course users

by Jeff Wood -

Marc,

As far as I know - not very far sometimes... if you delete a course ALL associated files (except users) are deleted! All forums, resources, uploaded files.

Jeff

In reply to Jeff Wood

Re: Deleting course users

by Tim Williams -
Picture of Plugin developers
That removes the users from the course, it dosn't remove them from Moodle. I want to mark the user accounts as deleted as well as removing them from the course.