+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
protected $_surveyActivities;
/**
- * Build all the data structures needed to build the form
+ * Build all the data structures needed to build the form.
*
* @return void
*/
}
/**
- * Build the form object
+ * Build the form object.
*
*
* @return void
}
}
- //set survey activites as deleted = true.
+ //set survey activities as deleted = true.
if (!empty($deleteActivityIds)) {
$query = 'UPDATE civicrm_activity SET is_deleted = 1 WHERE id IN ( ' . implode(', ', $deleteActivityIds) . ' )';
CRM_Core_DAO::executeQuery($query);
- $status = array(ts("%1 respondent(s) have been released.", array(1 => count($deleteActivityIds))));
+ if ($deleteActivityIds) {
+ $status = ts("Respondent has been released.", array(
+ 'count' => count($deleteActivityIds),
+ 'plural' => '%count respondents have been released.',
+ ));
+ CRM_Core_Session::setStatus($status, ts('Released'), 'success');
+ }
+
if (count($this->_contactIds) > count($deleteActivityIds)) {
- $status[] = ts("%1 respondents did not release.",
- array(1 => (count($this->_contactIds) - count($deleteActivityIds)))
+ $status = ts('1 respondent did not release.',
+ array(
+ 'count' => (count($this->_contactIds) - count($deleteActivityIds)),
+ 'plural' => '%count respondents did not release.',
+ )
);
+ CRM_Core_Session::setStatus($status, ts('Notice'), 'alert');
}
- CRM_Core_Session::setStatus(implode(' ', $status), '', 'info');
}
}