[FIXED] Announcements: Not sending mass email - User list invisible

 When U are on announcements and you create a new one I found several errors.

  1. If you select that you want to send a email to "all" members, no email is sent.
  2. If you create an announcement that has no attachment you see the message (after the post) -> Could not access file: /var/www/chamilo/courses/PRUEBA01/upload/announcements/
    1. If you select a file, all works fine (no message).
  3. If you decide to send the announcement to a specific user, you CANT SEE any name... There is a filled list but you cant read NO NAMES at all...
    1. If you make a sellection of "invisible names" and if you add them to the "list" then you can send the email to the sellected users...   ->> CONFIRMED, mail goes out. (but only to the first user on list)

 

Picture > DEMO Campus

 

This has been confirmed on 2 different PC, one runing at work, and one at home.

Both PC are running Ubuntu 9.10, apache2, php5, and PHPmailer updated to send on SSL.

The Work PC is linked to a LDAP-Active Dirtectory PC (Dokeos migrated)

My Home PC is a "fresh" setup of Chamilo 1.8.6.2 (just made it to confirm the problem on a fresh install and allso to develop)

The problem is not sending mails, aparently the problem is on announcements code, it does not fill well the user list.

 

Also the problem has been seen on CHAMILO DEMO CAMPUS

Comments

China Wholesaler Town -

China Wholesaler Town - China's most viable wholesale supplier of promotional gifts, Wholesale Umbrella you can customize your own logo, no matter anywhere in the world! Wholesale Lighter Successful corporations realize Wholesale Camerathat well-planned and well-executed employee incentives play an important Wholesale Speakersrole in helping reach objectives, Wholesale Razor building company morale, Wholesale Jewelryand rewarding both the employees and the valued customers.Wholesale Socks With promotional and novelty gift items, China Wholesale Town Wholesale FurnitureInternational became a specialist in providing branding services. Recorder PenWe proud ourselves in being fast and accurate. Wholesale Scarf We can put your logo on all the products from our OEM / ODM ection. Wholesale Chair Most of our items can be decorated with logo or personalized with personal engraving. ladies BriefcaseWe delivering to virtually every country in the world Computer Desk. Our warehouse and office
are staffed by a young team of Chinese and Western staff
Vacuum Storage Bag . Our professional staff will contact you as soon as possible to provide you with the best quality service through the mail and the telephone.Wholesale Briefcase We can provide customers around the world with many well-produced goods and good service,Wholesale Toys because of many years of
experience in friendly and
Wholesale Stress Ball cooperative relations with many Chinese factories and suppliers. Wholesale FanHere you can find all the most popular, Wholesale Clocksstylish, high-quality goods. Wholesale Sweatshirt China Suppliers, Custom Logo Imprinted, Wholesale WalletPromotional Products, Promotional Gifts, Promotional Items, Waterproof Waist PackWholesale Suppliers, Wholesale Merchandise, Dropship Wholesale, Wholesale Accessories, Wholesale Directory China Wholesale Town - Most Reliable China Wholesale Suppliers, Wholesale Ashtray Custom Logo Imprinted Promotional Gifts, Promotional Items Products, Giveaway Material!Wholesale Pen If you want to start your business with some daily used items, Wholesale Pillowhere is the site you need to check. It offeres many products like Bottle Opener, T-Shirts, Carabiner Wholesale Frisbee and Umbrella, Pen, Wholesale Carabiner ect. Under each product section, there are some detailes classification. For Wholesale Keychain, there are Coffee Mug, Water Bottle. For Wholesale Socks and Wholesale USB Products, there are also some detailed classifications. Wholesale Waterproof Case China Wholesale Town - China's most viable wholesale supplier of Promotional Gifts, you can customize your own logo, no matter anywhere in the world! China Wholesale Town - Most Reliable China Wholesale Suppliers, Custom Logo Imprinted Promotional Gifts, Promotional Products Items, Giveaway Material! If you want to start your business with some daily used items, Wholesale Kitchenwarehere is the site you need to check. It offeres many products like Wholesale Pom Poms, T-Shirts, Carabiner Wholesale First Aid Kit and Umbrella, Pen, Bottle Opener ect. Under each product section, there are some detailes classification. For Wholesale Cup, there are Coffee Mug, Water Bottle. For Wholesale Clap Hands and Wholesale Water Bottle, there are also some detailed classifications. China Wholesale Town - China's most viable wholesale supplier of Promotional Gifts, you can customize your own logo, no matter anywhere in the world! Wholesale ApronTop China Wholesaler-Buy Wholesale Promotional Gifts Promotional Products from China Our main products are consumer electronics, gifts and souvenirs, Wholesale Lanyard, health care products, beauty products, Wholesale Carabiner, automobile parts, household items, plastic products, metal products, wholesale Mug, kitchen supplies, stationery, sports goods, toys, Wholesale Christmas Gifts, watches, leather products, etc. Tips for Choosing Sports Wholesale Halloween Gift; One Way To Protect Your Device - Wholesale Waterproof Case; Introduce The Wholesale Lanyard For You; Customized Cheaply Prices Promotional Caps-Wholesale Bag; And the Wholesale Clothes Rack also gradually become recognized best promotional product; Buying A Gift For your Friend Who Likes Reading-Wholesale Golf Products; Customized Printed Wholesale Vase Personalization/Engraving Services
Some items, such as
Crystal Award and Metal Coaster and Metal Money Clip and Metal Luggage Tag and Metal Keychain etc, crystal material or metal material products. Camera Tripodrequire a plate to be added for engraving. Wholesale Clothing These plates can added as your request.Bean BagDebossing/Embossing
Debossing services are offered on leather items. Such as
Leather Wallet and Leather Mouse Pad and Conference Folder and Leather Name Card Holder etc, Debossing is a method that depresses yor company name or logo down into the surface of a leather item. Eye Mask WholesaleThis method displays your company logo through the leather goods without color, Water Guncommonly known as "blind debossing". Wholesale MatWe use this method to ensure quality of your goods. Over time, Wholesale Keyboardcolor that is added to leather will fade or flake away.
Screen/Silk Screen Printing
Wholesale Jacket
Screen or silkcreen printing is popular for our non-textile products. Poncho RaincoatThis screening can be either single or multicolored. such as Pen and and USB Flash Drive and Tape Measure and Mug and Water Bottle and Umbrella and Inflatable etc, plastic material, leather material, metal material, Wholesale Knifesilicone material, rubber material, Wholesale Candletextile material are available.
Embroidery
Wholesale Mouse
At Corporate Snobs we pride ourselves in offering some of the best choices of customization in the industry.Wholesale Calculator
Our embroidery options are available for most of our monogrammed Tote Bag and Apron and Cap and Embroidery Coaster and Towel etc textile products. Decoration styles vary per item. PVC Vase Each decoration style will be listed in the product page. Wholesale Mp3For various products, Wholesale Tie decoration options are available for customer to choose type of engraving desired. BB GunsThis will be noted as a choice with the item.Wholesale Earphone Promotional Products, Promotional Gifts, Electric Shaver Promotional items from China, Toy Guns Custom-made gift Wholesale, Promotional Giveaway Material! Sport Watch Wholesale Merchandise, Safety Belt Wholesale Suppliers, Wholesale Dropship, Door Mat Wholesale Distributors, Wholesale Accessories, Wholesale Watch Wholesale Directory, Discount Wholesaler Flexi Vase

Thanks a lot for enjoying

Thanks a lot for enjoying this theory secern with me. I am appreciating it dread untold! Adscititious nervy to try penalise cerebration. Morality assets to the communicator! all the transactions! hip hop 2012

Came across your blog when I

Came across your blog when I was searching bing I have found a lot of info that I found to be quite useful.
john lennon quotes

I am tiring the same best

I am tiring the same best work from me in the future as well. www.ForeclosureHelp.org

My Home PC is a "fresh" setup

My Home PC is a "fresh" setup of Chamilo 1.8.6.2 (just made it to confirm the problem on a fresh install and allso to develop)Quotes about me

Reported in

Reported in http://support.chamilo.org/issues/562 for application into the code this week

[ FIXED ]

you can download the corrected code from 

www.ceroble.edu.gt/announcements2.tar.gz

 

Email sending problem tracked to file -> /main/announcements/announcements.php

on code "send mail one by one to avoid spam"

The problem is that you enter to a while with one "$result" variable and there inside the while you are making another SQL Query...

So I fixed the code by changing the names of the inner sql's and result's variables to

$sql2, $result2 ..... $sql3, $result3, etc...

I checked Dokeos 1.8.6.1 code and also has the same problem. 

 

---------------------------------------------------------------------------------------------------------- 

 

The attachment error was corrected by changing

This

if (!empty($_FILES['user_upload'])) {

$courseDir = $_course['path'].'/upload/announcements/';

$sys_course_path = api_get_path(SYS_COURSE_PATH);

$sql2 = 'SELECT path, filename FROM '.$tbl_announcement_attachment.'

     WHERE announcement_id = "'.$insert_id.'"';

$result2 = Database::query($sql2, __FILE__, __LINE__);

$row2 = Database::fetch_array($result2);

$data_file = array('path' => $sys_course_path.$courseDir.$row2['path'],

  'filename' => $row2['filename']);

}

 

To this -->>

 

$sql2 = 'SELECT path, filename FROM '.$tbl_announcement_attachment.'

     WHERE announcement_id = "'.$insert_id.'"';

$result2 = Database::query($sql2, __FILE__, __LINE__);

$row2 = Database::fetch_array($result2);

if ($row2['filename'] != "")

{

$courseDir = $_course['path'].'/upload/announcements/';

$sys_course_path = api_get_path(SYS_COURSE_PATH);

$data_file = array('path' => $sys_course_path.$courseDir.$row2['path'],

  'filename' => $row2['filename']);

}

 

 

Other changes to announcements.inc.php

 On file /main/announcements/announcements.inc.php

 

Function -> construct_not_selected_select_form

Changed

 

if (!(in_array("USER:".$this_user["user_id"],$to_already_selected))) // $to_already_selected is the array containing the users (and groups) that are already selected

{

echo "\t\t<option value=\"USER:",$this_user["user_id"],"\">",

"", api_get_person_name($this_user['firstName'], $this_user['lastName']),

"</option>\n";

}

to

 

if (!(in_array("USER:".$this_user["user_id"],$to_already_selected))) // $to_already_selected is the array containing the users (and groups) that are already selected

{

$this_user_info = api_get_user_info($this_user["user_id"]);

echo "\t\t<option value=\"USER:".$this_user["user_id"]."\">".

"".api_get_person_name($this_user_info['firstName'], $this_user_info['lastName']).

"</option>\n";

}

 

Also Funcition -> construct_selected_select_form

Changed

 

// adding the individual users to the select form

foreach($ref_array_users as $this_user)

{

if (!is_array($to_already_selected) || !in_array("USER:".$this_user['user_id'],$to_already_selected)) // $to_already_selected is the array containing the users (and groups) that are already selected

{

echo "\t\t<option value=\"USER:",$this_user['user_id'],"\">",

"", api_get_person_name($this_user['lastName'], $this_user['firstName']),

"</option>\n";

}

}

to

 

// adding the individual users to the select form

foreach($ref_array_users as $this_user)

{

if (!is_array($to_already_selected) || !in_array("USER:".$this_user['user_id'],$to_already_selected)) // $to_already_selected is the array containing the users (and groups) that are already selected

{

$this_user_info = api_get_user_info($this_user["user_id"]);

echo "\t\t<option value=\"USER:".$this_user['user_id']."\">".

"". api_get_person_name($this_user_info['lastName'], $this_user_info['firstName']).

"</option>\n";

}

}

 

Example of the error without fix

Example of the error without fix

 

HTML generated code >>>>   you can see that no name is written in <option> tags.

 <td>

<strong>Usuarios</strong><br />

<select name="not_selected_form[]" size=5 style="width:200px" multiple>

<option value="USER:1"></option>

<option value="USER:101"></option>

</select>

</td>

 

It should be something like -->

<option value="USER:1">MR Bean</option>

<option value="USER:101">Student X</option>

 

Hi carlos

Hi Carlos, Thanks you for report this bug, but I can't see these bug in the version stable, could you say me which version are you using and where you download?. I mean, I have two version of chamilo, the stable version ( working well announcement) and the developmentversion, so I only can see in the development  version this bug, maybe you are downloading the  wrong version. mmm also I try to use the code than you set in this forum, but not all run with my version, for example i can fix with you code the bug number 3 (user list).

Tell me if continuos the problem.

.

Hi

Yep, is on Chamilo Stable

 

http://www.chamilo.org/es/download

http://chamilo.googlecode.com/files/chamilo-1.8.6.2.zip

 

you should check what version are you running on the DEMO campus, cause it has the same problem. (the screenshot is from it).

 

At the begining I thougth Chamilo was woking ok, because I was the first on the list (teacher), but because I was testing chamilo the students where my same email with an alias.... (no extra emails received).

Chamilo aparently works (at least in the version I downloaded) but only the first person on the list receives a message.

 

The problem (on the code I downloaded) was tracked to the mailing part.... someone coded a "send mail one by one to avoid spam" 

there he made a While bucle, but inside that while he has some sql queryes that "drop" his while variable($result) and the next time that repeats it exits...

 

 

The problem was completily fixed by the "hacks" I made... 

Fixed the issue

Hello carlosbrolotobar, the problem is now fixed.

You can see http://code.google.com/p/chamilo/source/detail?r=d2fead88f7177ec4dc1122717ac419bcf04812bb&repo=classic

Thanks for you contribution. Greetings :D 

Social network

Youtube

Subscribe to our newsletter

Leave us your e-mail in the box below, then make sure you approve the confirmation e-mail you will receive

 


 

New forum topics

Upcoming events

  • No upcoming events available