Quickmail / Moodle 1.9 / error finding users

Quickmail / Moodle 1.9 / error finding users

by Brian Schmidt -
Number of replies: 14
We've successfully used the Quickmail block on several past versions of Moodle. However, on 1.9, we're now having issues. Whenever I try to either compose a new message, or view the history of messages, I get the following error returned:
No course users found to email

However, we have several users in the course. I'm guessing perhaps the function to retrieve users has changed in 1.9, so this is why it's failing? Anyone know how to fix this for 1.9?

TIA
Average of ratings: -
In reply to Brian Schmidt

Re: Quickmail / Moodle 1.9 / error finding users

by Brian Schmidt -
BTW, this is in reference to the Quickmail for large classes version...
In reply to Brian Schmidt

Re: Quickmail / Moodle 1.9 / error finding users

by Glenn Enright -
Hi Brian,

I am new to moodle and I seem to be having the same issue. It appears the problem is related to the sort order option within the blocks/quickmail/email.php get_course_users() function on line 76.

Try changing line 76 as follows:
//Get list of users enrolled in the course including teachers and students
// if (!$courseusers = get_course_users($course->id, 'lastname')) {
// error('No course users found to email');
// }

// Modified
if (!$courseusers = get_course_users($course->id)) {
error('No course users found to email');
}

I also had to alter line 196 to fix another smaller error:
//$messagetext = messagetext."-------------------------------------------------\n";
// Modified
$messagetext = "----------------------------------------------------\n";

I have not fully tested these changes so please use with caution!!

Glenn
In reply to Glenn Enright

Re: Quickmail / Moodle 1.9 / error finding users

by Brian Schmidt -
Glenn,

Thanks for sharing your workaround. So far, in my limited testing, this is working exactly as I need it to.

Brian
In reply to Glenn Enright

Works for me, but

by Mark Penny -
Getting rid of , "lastname" did the trick for me -- to a point. All the students' names in a course came up, but so did Guest User {root@localhost}, whom I presume to be me, though why I should be demoted to guest user is beyond me. Perhaps because my role is administrator, not teacher.

Later: Yep. When I added myself as teacher, I came up in the list. When I quickmailed myself, it was indeed very quick. I got both a message and a dispatch receipt.

Thanks to Glenn for the fix and Wen Hao for the adapted block.

The next trick would be to get Quickmail to retrieve all users when invoked from the home page. Right now it just retrieves Guest User {root@localhost}.

Anybody got any clues?
In reply to Brian Schmidt

Re: Quickmail / Moodle 1.9 / error finding users

by Jeff Wood -
I too had this for large classes. When I tried the regular Quickmail (updated to latest version for 1.9) I am presented with ALL site users as possible recipients in a class of 20.

Something odd here thoughtful

Jeff
In reply to Jeff Wood

Re: Quickmail / Moodle 1.9 / error finding users

by Greg Rodenhiser -
I'm using Moodle 1.9 (latest official release), NOT the 1.9+. downloading either Quickmail (regular or for large classes) yeilds the same error:

No course users found to email

I've tried the fix mentioned earlier and the issue persists. Did I miss a step in fixing this?
In reply to Greg Rodenhiser

Re: Quickmail / Moodle 1.9 / error finding users

by Khurram Iqbal -
I am fcing the same problem. Can anyone please reply?
In reply to Khurram Iqbal

Re: Quickmail / Moodle 1.9 / error finding users

by Jürg Hoerner -
In the moodle block I deselect groups in the configuration in the cours -> no groups, than I can work as usual, but no groups are visible.
In reply to Brian Schmidt

Re: Quickmail / Moodle 1.9 / error finding users

by Patrick Enaholo -

It didn't work for me as well until I did this...

// Original
//if (!$courseusers = get_course_users($course->id, 'lastname')) {
//error('No course users found to email');
//}

// Modified
if (!$courseusers = get_course_users($course->id), ' ') {
error('No course users found to email');
}

...and I didn't see the 'Guest User' Mark referred to. smile

In reply to Patrick Enaholo

Re: Quickmail / Moodle 1.9 / error finding users

by Jim Bennett -

I know this is an old discussion, but I have just downloaded Quickmail and am having what appears to be a related issue. When I go to compose a message I don't see any users.

When I open email.php to make the modifications described here, I can't find the function or code listed in this discussion.

Any ideas????

Thx!

In reply to Jim Bennett

Re: Quickmail / Moodle 1.9 / error finding users

by Jim Bennett -

Found my problem - I need to set the Groups to No Groups under settings ... Doh!

 

In reply to Brian Schmidt

Most recent Quickmail version?

by John Dlugosz -

What is the most recent version of Quickmail (and where can it be found), and what version of Moodle will it work with? I've read both 2.6 and 2.7, and it's not clear if any version works with Moodle beyond 1.9.8. We're contemplating an upgrade but are limited by this critical block.

In reply to John Dlugosz

회신: Most recent Quickmail version?

by Lee Mark -

I have a problem in quickmail block, particularly in history section.

When I go to history tab, unlike compose tab, the screen shows messed up real estate for all the blocks.  (such as stretched Navigation bar and things like that). I assume that there's div problem but I can't pinpoint the bug. Anyone?

Thanks,