Non-core contributed modules

Allow users to type names directly in to the To, CC, and BCC fields.

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.1
  • Fix Version/s: None
  • Component/s: Block: Email_list
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE

Description

Currently, users can only choose names on the new email form by bringing up the contacts pop-up. We'd like to have the ability to type in names directly. An autocomplete feature, where the user can type in the first few letters of a name and select from a list of possible matches, would be very useful.

I'm testing a patch now and will attach it later today.

Activity

Hide
Ann Adamcik added a comment -

The attached contacts directory needs to be unzipped and placed in the blocks/email_list/email directory, and the attached patch file makes changes to lib.php, mail_edit_form.php, manage.js, and sendmail.php.

These changes allow users to type names directly into the contact fields. Additionally, when the first letter (or first few letters) of a name are entered, a list of matching names will appear. The list is filtered by the user's group if the course group mode is set.

Show
Ann Adamcik added a comment - The attached contacts directory needs to be unzipped and placed in the blocks/email_list/email directory, and the attached patch file makes changes to lib.php, mail_edit_form.php, manage.js, and sendmail.php. These changes allow users to type names directly into the contact fields. Additionally, when the first letter (or first few letters) of a name are entered, a list of matching names will appear. The list is filtered by the user's group if the course group mode is set.
Hide
Ann Adamcik added a comment -

I found an issue with the previous patch - if users add contacts (through the contacts pop-up or the autocomplete feature), and then delete names from the text fields, the message gets sent to the deleted users.

The updated patch adds a validate function that makes sure the user ids in the hidden to/cc/bcc fields match up with the names entered in the fields. I also added an error if the user types in an invalid name.

Show
Ann Adamcik added a comment - I found an issue with the previous patch - if users add contacts (through the contacts pop-up or the autocomplete feature), and then delete names from the text fields, the message gets sent to the deleted users. The updated patch adds a validate function that makes sure the user ids in the hidden to/cc/bcc fields match up with the names entered in the fields. I also added an error if the user types in an invalid name.
Hide
Ann Adamcik added a comment -

I discovered last week that there was a YUI library update in Moodle core that breaks this autocomplete patch (see MDL-14383). So, the attached contacts patch works on builds prior to July 25, 2008 (YUI 2.5.0). For builds after that date (YUI 2.5.2), the following change needs to be made:

In moodle/blocks/email_list/email/contacts/yui_autocomplete.html, change line 37 from

var fieldid = oMyAcInstance["_oTextbox"].id;

to

var fieldid = oMyAcInstance["_elTextbox"].id;

Show
Ann Adamcik added a comment - I discovered last week that there was a YUI library update in Moodle core that breaks this autocomplete patch (see MDL-14383). So, the attached contacts patch works on builds prior to July 25, 2008 (YUI 2.5.0). For builds after that date (YUI 2.5.2), the following change needs to be made: In moodle/blocks/email_list/email/contacts/yui_autocomplete.html, change line 37 from var fieldid = oMyAcInstance["_oTextbox"].id; to var fieldid = oMyAcInstance["_elTextbox"].id;
Hide
Toni Mas added a comment -

Hi Ann,

In contacts.zip file isn't mail_edit_form.php, can you send me?

Toni

Show
Toni Mas added a comment - Hi Ann, In contacts.zip file isn't mail_edit_form.php, can you send me? Toni
Hide
Ann Adamcik added a comment -

Hi Toni,

The yuiautocomplete_updated.patch file contains the changes to mail_edit_form.php, as well as a few other files in the main email directory.

Note that the recent core update to YUI 2.6.0 has broken this functionality. I'm working on fixing it now.

Thanks,
-Ann

Show
Ann Adamcik added a comment - Hi Toni, The yuiautocomplete_updated.patch file contains the changes to mail_edit_form.php, as well as a few other files in the main email directory. Note that the recent core update to YUI 2.6.0 has broken this functionality. I'm working on fixing it now. Thanks, -Ann
Hide
Anthony Borrow added a comment -

Toni - I have not heard from you in a while. I figured I would comment here to make sure you are OK. Are you still able to work on helping to resolve this issue? Peace - Anthony

Show
Anthony Borrow added a comment - Toni - I have not heard from you in a while. I figured I would comment here to make sure you are OK. Are you still able to work on helping to resolve this issue? Peace - Anthony
Hide
Toni Mas added a comment -

Hi Anthony,

Before apply this patch I needed to improve eMail class. Should have created another issue/improvement associated on this. Sorry, i'm working to applied this patch.

Rgs,
Toni

Show
Toni Mas added a comment - Hi Anthony, Before apply this patch I needed to improve eMail class. Should have created another issue/improvement associated on this. Sorry, i'm working to applied this patch. Rgs, Toni
Hide
Toni Mas added a comment -

Hi Ann,

Your all patches are applied, but I have a problem with an screen selection users. The autocomplete screen are not displayed. Can you help me?

Thanks,
Toni

Show
Toni Mas added a comment - Hi Ann, Your all patches are applied, but I have a problem with an screen selection users. The autocomplete screen are not displayed. Can you help me? Thanks, Toni
Hide
Toni Mas added a comment -

Applied this patch. Now, it's necessary apply improvements. Thanks Ann.

Show
Toni Mas added a comment - Applied this patch. Now, it's necessary apply improvements. Thanks Ann.

People

Vote (2)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: