/**
  * A list of all participating organizations.
  *
  * @return \MUtil_Html_HtmlElement
  */
 private function _getOrganizationsList()
 {
     $html = new \MUtil_Html_Sequence();
     $sql = '
         SELECT *
         FROM gems__organizations
         WHERE gor_active=1 AND gor_url IS NOT NULL AND gor_task IS NOT NULL
         ORDER BY gor_name';
     // $organizations = array();
     // $organizations = array(key($organizations) => reset($organizations));
     $organizations = $this->db->fetchAll($sql);
     $orgCount = count($organizations);
     switch ($orgCount) {
         case 0:
             return $html->pInfo(sprintf($this->_('%s is still under development.'), $this->project->getName()));
         case 1:
             $organization = reset($organizations);
             $p = $html->pInfo(sprintf($this->_('%s is run by: '), $this->project->getName()));
             $p->a($organization['gor_url'], $organization['gor_name']);
             $p->append('.');
             $html->pInfo()->sprintf($this->_('Please contact the %s if you have any questions regarding %s.'), $organization['gor_name'], $this->project->getName());
             return $html;
         default:
             $p = $html->pInfo(sprintf($this->_('%s is a collaboration of these organizations:'), $this->project->getName()));
             $data = \MUtil_Lazy::repeat($organizations);
             $ul = $p->ul($data, array('class' => 'indent'));
             $li = $ul->li();
             $li->a($data->gor_url->call($this, '_'), $data->gor_name, array('rel' => 'external'));
             $li->append(' (');
             $li->append($data->gor_task->call(array($this, '_')));
             $li->append(')');
             $html->pInfo()->sprintf($this->_('You can contact any of these organizations if you have questions regarding %s.'), $this->project->getName());
             return $html;
     }
 }
 /**
  * A reports on code files
  */
 protected function addFileReports()
 {
     $sCode = $this->html->sequence();
     $output = false;
     foreach ($this->getRecursiveDirectoryIterator(APPLICATION_PATH) as $filename) {
         $output = $this->addFileReport($filename) || $output;
     }
     if ($this->appNamespaceError) {
         $sCode->h2('Code change issues found');
         $sCode->pInfo('The application code has code change issues. You can try to fix them by running this phing script:');
         $sCode->pre('cd ' . APPLICATION_PATH . "\n" . 'phing -f ' . GEMS_LIBRARY_DIR . DIRECTORY_SEPARATOR . 'scripts' . DIRECTORY_SEPARATOR . 'namespacer.xml');
         $p = $sCode->pInfo('To use this script you have to install ');
         $p->a('https://www.phing.info/', 'Phing');
         $p->append('. Then run the script and check again for issues not fixed by the script.');
     } elseif (!$output) {
         $this->html->pInfo('No compatibility issues found in the code for this project.');
     }
 }
 /**
  * Displays textual information what checking tokens does
  *
  * @param \MUtil_Html_Sequence $html
  * @param \Zend_Translate $translate
  * @param string $itemDescription Describe which tokens will be checked
  */
 public static function addCheckInformation(\MUtil_Html_Sequence $html, \Zend_Translate $translate, $itemDescription)
 {
     $html->pInfo($translate->_('Check tokens for being answered or not, reruns survey and round event code on completed tokens and recalculates the start and end times of all tokens in tracks that have completed tokens.'));
     $html->pInfo($translate->_('Run this code when survey result fields, survey or round events or the event code has changed or after bulk changes in a survey source.'));
     $html->pInfo($itemDescription);
 }