Non-core contributed modules

Contacts List Block

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.1
  • Fix Version/s: None
  • Component/s: Block: Contacts
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE

Description

A block for users to add and remove Contacts.

The Contacts bl9ock does this in a simple way by utilising the message_print_contacts() function within Moodle.

Activity

Hide
Dale Davies added a comment -

Have I submitted this correctly? I thought I'd give it a go, if it is incorrect in any way please accept my apologies.

Show
Dale Davies added a comment - Have I submitted this correctly? I thought I'd give it a go, if it is incorrect in any way please accept my apologies.
Hide
Anthony Borrow added a comment -

Dale - The submittal looks good. I'll try to give the code a look and quick test and get back with if I have any questions. Peace - Anthony

Show
Anthony Borrow added a comment - Dale - The submittal looks good. I'll try to give the code a look and quick test and get back with if I have any questions. Peace - Anthony
Hide
Anthony Borrow added a comment -

Dale - Sorry for dropping the ball on this. I became overwhelmed during the semester and am just now getting back to it. Thanks for sharing the code with the community. I'm going to go ahead and upload it to cvs. If I could get you to request CVS write access for contrib/plugins/blocks/contact then when I get back to San Francisco this afternoon I can approve it. I'll also create a component in the tracker and make you the component lead with elevated privileges in the tracker to manage issues related to the contact block. I like to encourage folks to review http://docs.moodle.org/en/Development:Guidelines_for_contributed_code to ensure that they are doing as much as possible in the "standard" in terms of letting others in the community know about their code. Peace - Anthony

p.s. I would encourage you to test the code with debugging set to show All PHP notices and warnings (not developer mode). I did find a couple things like:

Notice: Undefined property: stdClass::$title in /home/arborrow/Moodle/code/19stable/blocks/contacts/block_contacts.php on line 38

which are usually the result of not testing for a variable being populated with isset or !empty prior to using it or by simply not initializing the variable. You can use some of those as test cases for your CVS write access.

Show
Anthony Borrow added a comment - Dale - Sorry for dropping the ball on this. I became overwhelmed during the semester and am just now getting back to it. Thanks for sharing the code with the community. I'm going to go ahead and upload it to cvs. If I could get you to request CVS write access for contrib/plugins/blocks/contact then when I get back to San Francisco this afternoon I can approve it. I'll also create a component in the tracker and make you the component lead with elevated privileges in the tracker to manage issues related to the contact block. I like to encourage folks to review http://docs.moodle.org/en/Development:Guidelines_for_contributed_code to ensure that they are doing as much as possible in the "standard" in terms of letting others in the community know about their code. Peace - Anthony p.s. I would encourage you to test the code with debugging set to show All PHP notices and warnings (not developer mode). I did find a couple things like: Notice: Undefined property: stdClass::$title in /home/arborrow/Moodle/code/19stable/blocks/contacts/block_contacts.php on line 38 which are usually the result of not testing for a variable being populated with isset or !empty prior to using it or by simply not initializing the variable. You can use some of those as test cases for your CVS write access.
Hide
Anthony Borrow added a comment -

Also, Warning: block_contacts::require_once(../config.php) [block-contacts.require-once]: failed to open stream: No such file or directory in /home/arborrow/Moodle/code/19stable/blocks/contacts/block_contacts.php on line 47

Show
Anthony Borrow added a comment - Also, Warning: block_contacts::require_once(../config.php) [block-contacts.require-once]: failed to open stream: No such file or directory in /home/arborrow/Moodle/code/19stable/blocks/contacts/block_contacts.php on line 47
Hide
Anthony Borrow added a comment -

The require problems I would resolve by making use of $CFG->dirroot so you have:

require_once($CFG->dirroot.'/config.php');
require_once($CFG->dirroot.'/message/lib.php');

Also,

Notice: Undefined property: stdClass::$cssstyling in /home/arborrow/Moodle/code/19stable/blocks/contacts/block_contacts.php on line 65

Show
Anthony Borrow added a comment - The require problems I would resolve by making use of $CFG->dirroot so you have: require_once($CFG->dirroot.'/config.php'); require_once($CFG->dirroot.'/message/lib.php'); Also, Notice: Undefined property: stdClass::$cssstyling in /home/arborrow/Moodle/code/19stable/blocks/contacts/block_contacts.php on line 65
Hide
Anthony Borrow added a comment -

For the $cssstyling issue, I replaced it with:

if (empty($CFG->cssstyling)) {

to avoid the PHP notice

Show
Anthony Borrow added a comment - For the $cssstyling issue, I replaced it with: if (empty($CFG->cssstyling)) { to avoid the PHP notice
Hide
Anthony Borrow added a comment -

I'm removing the screenshot from CVS but it would be good to keep it in the documentation on Moodle Docs (docs.moodle.org) see http://docs.moodle.org/en/Development:Guidelines_for_contributed_code for more information about creating the Modules and Plugins entry (especially the section on creating the download link (http://download.moodle.org/download.php/plugins/blocks/contact.zip) and documentation. My apologies for rushing through this as I am getting ready to leave for the airport. Peace - Anthony

Show
Anthony Borrow added a comment - I'm removing the screenshot from CVS but it would be good to keep it in the documentation on Moodle Docs (docs.moodle.org) see http://docs.moodle.org/en/Development:Guidelines_for_contributed_code for more information about creating the Modules and Plugins entry (especially the section on creating the download link (http://download.moodle.org/download.php/plugins/blocks/contact.zip) and documentation. My apologies for rushing through this as I am getting ready to leave for the airport. Peace - Anthony
Hide
Anthony Borrow added a comment -

moving to Block: Contacts component

Show
Anthony Borrow added a comment - moving to Block: Contacts component
Hide
Anthony Borrow added a comment -

Resolving: I have added code to CVS, tracker component created, component lead privileges bumped, just waiting on CVS write request.

Show
Anthony Borrow added a comment - Resolving: I have added code to CVS, tracker component created, component lead privileges bumped, just waiting on CVS write request.
Hide
Anthony Borrow added a comment -

Closing all of my resolved issues. Peace - Anthony

Show
Anthony Borrow added a comment - Closing all of my resolved issues. Peace - Anthony

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: