protected function getStatusLevelText($status_level, $count)
 {
     switch ($status_level) {
         case self::DELETE:
             $message = sprintf(CME::ngettext('Reset the following %s?', 'Reset the following %s?', $count), $this->getTitle($count));
             break;
         case self::NODELETE:
             $message = sprintf(CME::ngettext('The following %s can not be reset:', 'The following %s can not be reset:', $count), $this->getTitle($count));
             break;
         default:
             $message = parent::getStatusLevelText($status_level, $count);
             break;
     }
     return $message;
 }
Пример #2
0
 protected function buildNavBar()
 {
     parent::buildNavBar();
     $this->navbar->popEntries(1);
     $this->navbar->createEntry(CME::ngettext('Delete CME Front Matter', 'Delete CME Front Matters', count($this->items)));
 }
Пример #3
0
 protected function displayQuizDetailsIncomplete()
 {
     $locale = SwatI18NLocale::get();
     // quiz description
     $description = $this->getQuizDescription();
     if ($description != '') {
         echo '<div class="quiz-description">';
         echo $description;
         echo '</div>';
     }
     // passing grade
     echo '<div class="quiz-passing-grade">';
     $grade_span = new SwatHtmlTag('span');
     $grade_span->setContent($locale->formatNumber($this->front_matter->passing_grade * 100) . '%');
     printf(CME::_('A grade of %s is required'), $grade_span);
     echo '</div>';
     // number of questions and time estimate
     echo '<div class="quiz-intro-status">';
     $total_questions = count($this->quiz->question_bindings);
     if ($total_questions > 30) {
         $time_estimate = round($total_questions * 2 / 30) / 2;
         $time_estimate = sprintf(CME::ngettext('one hour', '%s hours', $time_estimate), $locale->formatNumber($time_estimate));
     } else {
         $time_estimate = ceil($total_questions * 2 / 10) * 10;
         $time_estimate = sprintf(CME::_('%s minutes'), $locale->formatNumber($time_estimate));
     }
     printf(CME::_('%s questions, about %s.'), $locale->formatNumber($total_questions), $time_estimate);
     echo '</div>';
 }