Removing student from Category Cohorts

Removing student from Category Cohorts

by Brian Gaehring -
Number of replies: 5

I have been using Category cohorts to quickly and efficiently add new students to relevant courses.  However, when I receive a notification to remove a student, it is difficult to determine which cohort(s) he/she is located in.  I can see what courses they are enrolled into by clicking their user info, but I then have to check the enrollment settings of each course to see which cohort is used to enroll the individual.

Is there an easy way to list/determine which category cohorts a person is enrolled into?  Thanks,

Average of ratings: -
In reply to Brian Gaehring

Re: Removing student from Category Cohorts

by Randy Thornton -
Picture of Documentation writers

The following basic query should help you out:

 

SELECT u.firstname, u.lastname, h.idnumber, h.name
FROM prefix_cohort AS h
JOIN prefix_cohort_members AS hm ON h.id = hm.cohortid
JOIN prefix_user AS u ON hm.userid = u.id
ORDER BY u.firstname

If you run this in Configurable Reports, it should give you users name and cohort info.

Too bad that the Browse users filter only works by Cohort ID. Would be nice to have ability to do this by user, there or in the Cohorts area.

 

Average of ratings: Useful (1)
In reply to Randy Thornton

Re: Removing student from Category Cohorts

by Brian Gaehring -

Hello Randy

Thank you for the direction.  I do not see Configurable Reports listed under Site Administration/Reports  on my system. Ver.2.4  Is this something new in 2.5?  Thanks,

In reply to Brian Gaehring

Re: Removing student from Category Cohorts

by Randy Thornton -
Picture of Documentation writers

 

Brian,

Configurable Reports is a plugin. https://moodle.org/plugins/view.php?plugin=block_configurable_reports

It is very good and lets you put in SQL to make reports, including the queries listed here: http://docs.moodle.org/25/en/ad-hoc_contributed_reports

There is another good, similar plugin too: https://moodle.org/plugins/view.php?plugin=report_customsql

 

Randy

Average of ratings: Useful (2)
In reply to Randy Thornton

Re: Removing student from Category Cohorts

by Brian Gaehring -

Thanks again for the good advice.  I will give it a try.smile

One thought. Does this plugin only read from the database, or is there a risk that it could also write information to it?  Reading is fine, but I do not want anyone to accidentially damage or over write the database by using the wrong SQL statements. (I'm very protective of the database since it has been working fine since Moodle 2.3. smile

In reply to Brian Gaehring

Re: Removing student from Category Cohorts

by Randy Thornton -
Picture of Documentation writers

Totally understand the protective part.

Configurable Reports only reads from the database (except, of course, to store its own information as a plugin).

The most risk would be a badly written report that slows things down.