Subscribing students

Subscribing students

by Gustav W Delius -
Number of replies: 14
I sometimes need to be able to subscribe a set of students to a particular forum. It would be convenient for me if I had a similar interface for this to the one for adding students to a course. I think this would be quite easy to implement. Would others find this useful as well?
Average of ratings: -
In reply to Gustav W Delius

Re: Subscribing students

by Gustav W Delius -
It was indeed easy to implement. My subscribers.php page now has a "Turn editing on" button which I can use to switch to subscription editing mode. In editing mode I have an interface familiar from elsewhere in Moodle (and indeed simply copied from there), see attached screenshot. I would like to put this into CVS.
Attachment subscriptions.gif
In reply to Gustav W Delius

Re: Subscribing students

by Art Lader -
Wow,

That is a really useful, practical enhancement, Gustav. Way to go!

-- Art
In reply to Gustav W Delius

Re: Subscribing students

by N Hansen -
The list of "potential subscribers" would consist of students who are enrolled in the course, correct? Or could it include others as well?
In reply to N Hansen

Re: Subscribing students

by Gustav W Delius -
The potential subscribers are students enrolled in the course or teachers teaching on the course. It wouldn't really make sense to include anyone else, I think.
In reply to Gustav W Delius

Re: Subscribing students

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
Yep, go on.
In reply to Martin Dougiamas

Re: Subscribing students

by Gustav W Delius -

I have submitted it to 1.4dev. Someone should probably go over my code and clean it up. I had to use some explicit SQL involving UNION and I am sure I have done it in the least elegant way possible blush.

Note that the editing page is not groups-aware. I think it shouldn't but I am happy to be corrected.

In reply to Gustav W Delius

Re: Subscribing students

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
Yes, it needs to be group-aware (like the old interface was). Non-editing teachers confined to a groups do not and should not see the whole list of students.

If you can't work on this I may have to leave it out of 1.4.  I'm trying to get a beta out and time is short.
In reply to Martin Dougiamas

Re: Subscribing students

by Gustav W Delius -

Sorry, I wasn't clear in my previous post. All I meant was that the new subscription editing feature is not and does not have to be group-aware. It is only available to editing teachers anyways. I have not changed the old interface at all except for adding a "Turn editing on" button that is shown only to editing teachers.

I'll be happy to work to improve the feature, just let me know what is missing.

In reply to Gustav W Delius

Re: Subscribing students

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
Ah, OK. I'm looking at it now. I'd assumed it would replace the current interface but now I can see how it's added on.

It's very wierd because the old interface already allowed unsubcribing one user, all users or a group of users, plus subscribing of all users or a group of users. Which is quite a lot of editing already before "editing" gets turned on. wink Two interfaces to do the same thing is not a good idea ...

I would be happier if the new two-pane selection interface was just to replace the existing list of subscribers in the current group or course context. You should be able to reuse the selection code from the old interface I would think .. Basically it would be in 'editing mode' all the time.

Also, there needs to be a way to access the user profile (currently the image is a link but that will be gone ... we probably need something like the groups interface has). The reason is that I often do this process with the current interface:

  1. encounter lots of forum mail bounces from someone who has a full mailbox or dead mail account
  2. click on the forum link in one of these posts
  3. click on edit subscribers
  4. find their email address in the list ... note the sorting by email address ... note also that often I have no idea what their name is until this point, because it may not be mentioned in the bounces
  5. click their picture
  6. disable their email address for the whole site

I know I could use the users list and have searched for their email there but this is click click, done, done, on to the next one.
In reply to Martin Dougiamas

Re: Subscribing students

by Gustav W Delius -

One thing I really like about Moodle is that it always shows me the user pictures everywhere. So I really like the current subscribers list and wouldn't want to see it go entirely. How about a compromise: I could make the editing page groups-aware and move the buttons for subscribing or unsubscribing all users from the viewing page to the editing page or even get rid of them alltogether. I could also remove the "Unsubscribe" links from the subscribers list.

I really like this Moodle idea of having two versions of a page, one for nice viewing and one for powerful editing. After all the groups pages do it the same way. Are you really sure that I have to get rid of the current subscribers list? Or would you be happy with a version of the above compromise?

In reply to Gustav W Delius

Re: Subscribing students

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
Yeah, sure, that sounds OK to me. So we'd keep just the lists of names (with a group selection menu at the top for non-restricted teachers), and add the same group selection menu at the top of the editing page.
In reply to Martin Dougiamas

Re: Subscribing students

by Gustav W Delius -

I am very happy with this solution approve. It is in CVS.

In reply to Gustav W Delius

Re: Subscribing students

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
That works very well from a user interface POV, Gustav, thanks! approve

Some remaining issues:
  • The potential list is always empty for me here on moodle.org, when I'm in a non-grouped forum or looking at "all participants". It works well when looking at groups.
  • You can't use UNION at all, it's MySQL 4 only.
  • All the SQL code in that file has got to be put in a function in the mod/forum/lib.php file instead.
In reply to Martin Dougiamas

Re: Subscribing students

by Gustav W Delius -

If you get empty lists for non-grouped forums then it must be to do with my use of UNION. It works fine on my machine. I didn't know UNION wasn't standard SQL. Where can I find the definition of standard SQL?