pull/2818/head
Yannick Warnier 6 years ago
parent 2b88812884
commit 05b2358ed7
  1. 20
      main/dropbox/index.php
  2. 27
      main/forum/index.php
  3. 27
      main/gradebook/lib/fe/displaygradebook.php
  4. 9
      main/lp/learnpath.class.php
  5. 24
      main/lp/lp_list.php
  6. 24
      main/wiki/wiki.inc.php

@ -273,6 +273,11 @@ if ($action != 'add') {
/* Menu Sent */
if (api_get_session_id() == 0) {
echo '<div class="actions">';
if (empty($viewSentCategory)) {
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".
Display::return_icon('upload_file.png', get_lang('UploadNewFile'), '', ICON_SIZE_MEDIUM).
"</a>";
}
if ($view_dropbox_category_sent != 0) {
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.
Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'), '', ICON_SIZE_MEDIUM).
@ -282,15 +287,15 @@ if ($action != 'add') {
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".
Display::return_icon('new_folder.png', get_lang('AddNewCategory'), '', ICON_SIZE_MEDIUM)."</a>\n";
}
if (empty($viewSentCategory)) {
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".
Display::return_icon('upload_file.png', get_lang('UploadNewFile'), '', ICON_SIZE_MEDIUM).
"</a>";
}
echo '</div>';
} else {
if (api_is_allowed_to_session_edit(false, true)) {
echo '<div class="actions">';
if (empty($viewSentCategory)) {
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".
Display::return_icon('upload_file.png', get_lang('UploadNewFile'), '', ICON_SIZE_MEDIUM).
"</a>";
}
if ($view_dropbox_category_sent != 0) {
echo get_lang('CurrentlySeeing').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_sent]['cat_name']).'</strong> ';
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.
@ -300,11 +305,6 @@ if ($action != 'add') {
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".
Display::return_icon('new_folder.png', get_lang('AddNewCategory'), '', ICON_SIZE_MEDIUM)."</a>\n";
}
if (empty($viewSentCategory)) {
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".
Display::return_icon('upload_file.png', get_lang('UploadNewFile'), '', ICON_SIZE_MEDIUM).
"</a>";
}
echo '</div>';
}
}

@ -170,21 +170,8 @@ if (!empty($_GET['lp_id']) || !empty($_POST['lp_id'])) {
$url
);
}
if (!empty($allCourseForums)) {
$actionLeft .= search_link();
}
if (api_is_allowed_to_edit(false, true)) {
$actionLeft .= Display::url(
Display::return_icon(
'new_folder.png',
get_lang('AddForumCategory'),
null,
ICON_SIZE_MEDIUM
),
api_get_self().'?'.api_get_cidreq().'&action=add&content=forumcategory&lp_id='.$lp_id
);
if (is_array($forumCategories) && !empty($forumCategories)) {
$actionLeft .= Display::url(
Display::return_icon(
@ -196,6 +183,20 @@ if (api_is_allowed_to_edit(false, true)) {
api_get_self().'?'.api_get_cidreq().'&action=add&content=forum&lp_id='.$lp_id
);
}
$actionLeft .= Display::url(
Display::return_icon(
'new_folder.png',
get_lang('AddForumCategory'),
null,
ICON_SIZE_MEDIUM
),
api_get_self().'?'.api_get_cidreq().'&action=add&content=forumcategory&lp_id='.$lp_id
);
}
if (!empty($allCourseForums)) {
$actionLeft .= search_link();
}
$actions = Display::toolbarAction('toolbar-forum', [$actionLeft]);

@ -400,15 +400,6 @@ class DisplayGradebook
$actionsRight = '';
$my_api_cidreq = api_get_cidreq();
if (api_is_allowed_to_edit(null, true)) {
if (empty($grade_model_id) || $grade_model_id == -1) {
$actionsLeft .= '<a href="gradebook_add_cat.php?'.api_get_cidreq().'&selectcat='.$catobj->get_id().'">'.
Display::return_icon(
'new_folder.png',
get_lang('AddGradebook'),
[],
ICON_SIZE_MEDIUM
).'</a></td>';
}
if ($selectcat != '0') {
$my_category = $catobj->showAllCategoryInfo($catobj->get_id());
if ($my_api_cidreq == '') {
@ -426,13 +417,25 @@ class DisplayGradebook
if ($cats[0]->get_course_code() != null && !$message_resource) {
$actionsLeft .= '<a href="gradebook_add_link.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'.
Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '',
ICON_SIZE_MEDIUM).'</a>';
} else {
$actionsLeft .= '<a href="gradebook_add_link_select_course.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'.
Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '',
ICON_SIZE_MEDIUM).'</a>';
}
}
}
if (empty($grade_model_id) || $grade_model_id == -1) {
$actionsLeft .= '<a href="gradebook_add_cat.php?'.api_get_cidreq().'&selectcat='.$catobj->get_id().'">'.
Display::return_icon(
'new_folder.png',
get_lang('AddGradebook'),
[],
ICON_SIZE_MEDIUM
).'</a></td>';
}
if ($selectcat != '0') {
if (!$message_resource) {
$actionsLeft .= '<a href="gradebook_flatview.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'.
Display::return_icon('statistics.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM).'</a>';

@ -6751,6 +6751,15 @@ class learnpath
) {
$actionsLeft = '';
$actionsRight = '';
$actionsLeft .= Display::url(
Display::return_icon(
'back.png',
get_lang('ReturnToLearningPaths'),
'',
ICON_SIZE_MEDIUM
),
'lp_controller.php?'.api_get_cidreq()
);
$actionsLeft .= Display::url(
Display::return_icon(
'preview_view.png',

@ -90,18 +90,6 @@ if ($is_allowed_to_edit) {
}
}
$actionLeft = '';
if (!$sessionId) {
$actionLeft .= Display::url(
Display::return_icon(
'new_folder.png',
get_lang('AddCategory'),
[],
ICON_SIZE_MEDIUM
),
api_get_self().'?'.api_get_cidreq().'&action=add_lp_category'
);
}
$actionLeft .= Display::url(
Display::return_icon(
'new_learnpath.png',
@ -132,6 +120,18 @@ if ($is_allowed_to_edit) {
'../upload/upload_ppt.php?'.api_get_cidreq().'&curdirpath=/&tool='.TOOL_LEARNPATH
);
}
if (!$sessionId) {
$actionLeft .= Display::url(
Display::return_icon(
'new_folder.png',
get_lang('AddCategory'),
[],
ICON_SIZE_MEDIUM
),
api_get_self().'?'.api_get_cidreq().'&action=add_lp_category'
);
}
$actions = Display::toolbarAction('actions-lp', [$actionLeft]);
}

@ -6009,7 +6009,7 @@ class Wiki
'addnew'
).'>'
.Display::return_icon(
'add.png',
'new_document.png',
get_lang('AddNew'),
'',
ICON_SIZE_MEDIUM
@ -6045,7 +6045,7 @@ class Wiki
get_lang('SearchPages'),
'',
ICON_SIZE_MEDIUM
).'</a></li>';
).'</a>';
///menu more
$actionsLeft .= '<a href="index.php?cidReq='.$_course['id'].'&action=searchpages&session_id='.$session_id.'&group_id='.$groupId.'&action=more&title='.api_htmlentities(
urlencode($page)
@ -6055,18 +6055,28 @@ class Wiki
get_lang('Statistics'),
'',
ICON_SIZE_MEDIUM
).'</a></li>';
).'</a>';
// menu all pages
$actionsLeft .= '<a class="btn btn-default" href="index.php?cidReq='.$_course['id'].'&action=allpages&session_id='.$session_id.'&group_id='.$groupId.'"'.self::is_active_navigation_tab(
$actionsLeft .= '<a href="index.php?cidReq='.$_course['id'].'&action=allpages&session_id='.$session_id.'&group_id='.$groupId.'"'.self::is_active_navigation_tab(
'allpages'
).'>'.
get_lang('AllPages').'</a>';
Display::return_icon(
'list_badges.png',
get_lang('AllPages'),
'',
ICON_SIZE_MEDIUM
).'</a>';
// menu recent changes
$actionsLeft .= '<a class="btn btn-default" href="index.php?cidReq='.$_course['id'].'&action=recentchanges&session_id='.$session_id.'&group_id='.$groupId.'"'.self::is_active_navigation_tab(
$actionsLeft .= '<a href="index.php?cidReq='.$_course['id'].'&action=recentchanges&session_id='.$session_id.'&group_id='.$groupId.'"'.self::is_active_navigation_tab(
'recentchanges'
).'>'.
get_lang('RecentChanges').'</a>';
Display::return_icon(
'history.png',
get_lang('RecentChanges'),
'',
ICON_SIZE_MEDIUM
) .'</a>';
echo Display::toolbarAction('toolbar-wiki', [$actionsLeft]);
}

Loading…
Cancel
Save