diff --git a/main/announcements/announcements.php b/main/announcements/announcements.php index e0bf6aac79..97b281285e 100644 --- a/main/announcements/announcements.php +++ b/main/announcements/announcements.php @@ -1067,7 +1067,19 @@ if ($display_announcement_list) { if (!isset($_GET['action']) || !in_array($_GET['action'], array('add', 'modify','view'))) if ($num_rows == 0) { - Display::display_warning_message(get_lang('NoAnnouncements')); + if ((api_is_allowed_to_edit(false,true) OR (api_get_course_setting('allow_user_edit_announcement') && !api_is_anonymous())) and (empty($_GET['origin']) or $_GET['origin'] !== 'learnpath')) { + echo '
'; + echo '

'.get_lang('Announcements').'

'; + echo Display::return_icon('valves.png', '', array(), 64); + echo '
'; + echo Display::url(get_lang('AddAnnouncement'), api_get_self()."?".api_get_cidreq()."&action=add&origin=".(empty($_GET['origin'])?'':$_GET['origin']) , array('class' => 'a_button white')); + echo '
'; + echo '
'; + } else { + //echo "".Display::return_icon('new_announce.png',get_lang('AddAnnouncement'),'','32').""; + Display::display_warning_message(get_lang('NoAnnouncements')); + } + } else { $iterator = 1; $bottomAnnouncement = $announcement_number; diff --git a/main/css/base.css b/main/css/base.css index a30e50479c..642ddd1328 100644 --- a/main/css/base.css +++ b/main/css/base.css @@ -4050,3 +4050,27 @@ input.liteoption { text-align: left; vertical-align: middle; } + +#no-data-view { + padding: 20px 0 0px; + text-align: center; +} + +div#no-data-view img { + margin-bottom: 25px; +} + + +div#no-data-view h2 { + border: 0 none; + color: #212121; + font-size: 18px; + font-weight: bold; + margin: 0 0 6px; + padding: 0; +} + +div#no-data-view div.controls { + padding-top: 1px; +} + diff --git a/main/exercice/exercice.php b/main/exercice/exercice.php index d4e165b74a..1504eee9f5 100644 --- a/main/exercice/exercice.php +++ b/main/exercice/exercice.php @@ -729,6 +729,16 @@ if (!empty($exercise_list)) { $count++; } // end foreach() } +} else { + if ($is_allowedToEdit && $origin != 'learnpath') { + echo '
'; + echo '

'.get_lang('Quiz').'

'; + echo Display::return_icon('quiz.png', '', array(), 64); + echo '
'; + echo Display::url(get_lang('NewEx'), 'exercise_admin.php?' . api_get_cidreq(), array('class' => 'a_button white')); + echo '
'; + echo '
'; + } } // end exercise list diff --git a/main/img/icons/32/import.png b/main/img/icons/32/import.png new file mode 100644 index 0000000000..d227e1e554 Binary files /dev/null and b/main/img/icons/32/import.png differ diff --git a/main/newscorm/lp_list.php b/main/newscorm/lp_list.php index e2f686c5f6..a6af1544ff 100644 --- a/main/newscorm/lp_list.php +++ b/main/newscorm/lp_list.php @@ -90,9 +90,9 @@ if ($is_allowed_to_edit) { } echo '
'; - echo ''.Display::return_icon('new_learnpath.png', get_lang('_add_learnpath'),'','32').'' . + echo ''.Display::return_icon('add.png', get_lang('_add_learnpath'),'','32').'' . str_repeat(' ', 3). - ''.Display::return_icon('import_scorm.png', get_lang('UploadScorm'),'','32').''; + ''.Display::return_icon('import.png', get_lang('UploadScorm'),'','32').''; if (api_get_setting('service_ppt2lp', 'active') == 'true') { echo str_repeat(' ', 3).' '.Display::return_icon('import_powerpoint.png', get_lang('PowerPointConvert'),'','32').''; @@ -101,49 +101,52 @@ if ($is_allowed_to_edit) { echo '
'; } -echo ''; -$is_allowed_to_edit ? $colspan = 9 : $colspan = 3; -if (!empty($curDirPath)) { - if (substr($curDirPath, 1, 1) == '/') { - $tmpcurDirPath=substr($curDirPath,1,strlen($curDirPath)); - } else { - $tmpcurDirPath = $curDirPath; - } - ?> - - - - - '; - -if ($is_allowed_to_edit) { - echo ''; - echo ''; - echo ''; - echo '"; - echo '"; -} else { - echo ''; - echo '"; - echo '"; -} -echo ''; /* DISPLAY SCORM LIST */ $list = new LearnpathList(api_get_user_id()); $flat_list = $list->get_flat_list(); -//var_dump($flat_list); -if (is_array($flat_list)) { + +if (!empty($flat_list)) { + + echo '
- open_dir - -
'.get_lang('Title').''.get_lang('PublicationDate').''.get_lang('ExpirationDate').''.get_lang('Progress')."'.get_lang('AuthoringOptions')."'.get_lang('Title').''.get_lang('Progress')."'.get_lang('Actions')."
'; + $is_allowed_to_edit ? $colspan = 9 : $colspan = 3; + + if (!empty($curDirPath)) { + if (substr($curDirPath, 1, 1) == '/') { + $tmpcurDirPath=substr($curDirPath,1,strlen($curDirPath)); + } else { + $tmpcurDirPath = $curDirPath; + } + ?> + + + + + '; + + if ($is_allowed_to_edit) { + echo ''; + echo ''; + echo ''; + echo '"; + echo '"; + } else { + echo ''; + echo '"; + echo '"; + } + echo ''; + $test_mode = api_get_setting('server_type'); $max = count($flat_list); $counter = 0; @@ -502,8 +505,17 @@ if (is_array($flat_list)) { $current ++; //counter for number of elements treated } // end foreach ($flat_list) // TODO: Erint some user-friendly message if counter is still = 0 to tell nothing can be displayd yet. -} // end if ( is_array($flat_list) -echo "
+ open_dir + +
'.get_lang('Title').''.get_lang('PublicationDate').''.get_lang('ExpirationDate').''.get_lang('Progress')."'.get_lang('AuthoringOptions')."'.get_lang('Title').''.get_lang('Progress')."'.get_lang('Actions')."
"; -echo "

"; -/* FOOTER */ -Display::display_footer(); + echo ""; +} else { + if ($is_allowed_to_edit) { + echo '
'; + echo '

'.get_lang('LearningPaths').'

'; + echo Display::return_icon('scorms.png', '', array(), 64); + echo '
'; + echo Display::url(get_lang('_add_learnpath'), api_get_self().'?'.api_get_cidreq().'&action=add_lp' , array('class' => 'a_button white')); + echo '
'; + echo '
'; + } +} + +Display::display_footer(); \ No newline at end of file