Minor - format code, use course_url_params instead of web_cid_query

pull/3064/head
Julio 5 years ago
parent 8351f4825d
commit 9f8e73f58c
  1. 1
      public/main/inc/lib/template.lib.php
  2. 42
      src/ThemeBundle/Resources/views/LearnPath/list.html.twig
  3. 6
      src/ThemeBundle/Resources/views/Macros/box.html.twig

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Entity\SessionRelCourseRelUser;

@ -29,15 +29,15 @@
{% if lp_data.category.getId() > 0 %}
{% if not _c.session_id %}
<a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=add_lp_category&id=' ~ lp_data.category.getId() }}"
<a href="{{ 'lp_controller.php?' ~ course_url_params ~ '&action=add_lp_category&id=' ~ lp_data.category.getId() }}"
title="{{ "Edit"|trans }}">
<img src="{{ "edit.png"|icon }}" alt="{{ "Edit"|trans }}">
</a>
{% if subscription_settings.allow_add_users_to_lp_category %}
<a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=add_users_to_category&id=' ~ lp_data.category.getId() }}"
title="{{ "AddUsers"|trans }}">
<img src="{{ "user.png"|icon }}" alt="{{ "AddUsers"|trans }}">
<a href="{{ 'lp_controller.php?' ~ course_url_params ~ '&action=add_users_to_category&id=' ~ lp_data.category.getId() }}"
title="{{ "Add users"|trans }}">
<img src="{{ "user.png"|icon }}" alt="{{ "Add users"|trans }}">
</a>
{% endif %}
@ -46,7 +46,7 @@
<img src="{{ "up_na.png"|icon }}" alt="{{ "Move"|trans }}">
</a>
{% else %}
<a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=move_up_category&id=' ~ lp_data.category.getId() }}"
<a href="{{ 'lp_controller.php?' ~ course_url_params ~ '&action=move_up_category&id=' ~ lp_data.category.getId() }}"
title="{{ "Move"|trans }}">
<img src="{{ "up.png"|icon }}" alt="{{ "Move"|trans }}">
</a>
@ -57,7 +57,7 @@
<img src="{{ "down_na.png"|icon }}" alt="{{ "Move"|trans }}">
</a>
{% else %}
<a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=move_down_category&id=' ~ lp_data.category.getId() }}"
<a href="{{ 'lp_controller.php?' ~ course_url_params ~ '&action=move_down_category&id=' ~ lp_data.category.getId() }}"
title="{{ "Move"|trans }}">
<img src="{{ "down.png"|icon }}" alt="{{ "Move"|trans }}">
</a>
@ -65,31 +65,31 @@
{% endif %}
{% if lp_data.category_visibility == 0 %}
<a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_visibility', 'id':lp_data.category.id, 'new_status':1}|url_encode }}"
<a href="lp_controller.php?{{ course_url_params ~ '&' ~ {'action':'toggle_category_visibility', 'id':lp_data.category.id, 'new_status':1}|url_encode }}"
title="{{ 'Show'|trans }}">
<img src="{{ 'invisible.png'|icon }}" alt="{{ 'Show'|trans }}">
</a>
{% else %}
<a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_visibility', 'id':lp_data.category.id, 'new_status':0}|url_encode }}"
<a href="lp_controller.php?{{ course_url_params ~ '&' ~ {'action':'toggle_category_visibility', 'id':lp_data.category.id, 'new_status':0}|url_encode }}"
title="{{ 'Hide'|trans }}">
<img src="{{ 'visible.png'|icon }}" alt="{{ 'Hide'|trans }}">
</a>
{% endif %}
{% if lp_data.category_is_published == 0 %}
<a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_publish', 'id':lp_data.category.id, 'new_status':1}|url_encode }}"
<a href="lp_controller.php?{{ course_url_params ~ '&' ~ {'action':'toggle_category_publish', 'id':lp_data.category.id, 'new_status':1}|url_encode }}"
title="{{ 'LearnpathPublish'|trans }}">
<img src="{{ 'lp_publish_na.png'|icon }}"
alt="{{ 'LearnpathPublish'|trans }}">
</a>
{% else %}
<a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_publish', 'id':lp_data.category.id, 'new_status':0}|url_encode }}"
<a href="lp_controller.php?{{ course_url_params ~ '&' ~ {'action':'toggle_category_publish', 'id':lp_data.category.id, 'new_status':0}|url_encode }}"
title="{{ 'LearnpathDoNotPublish'|trans }}">
<img src="{{ 'lp_publish.png'|icon }}" alt="{{ 'Hide'|trans }}">
</a>
{% endif %}
{% if not _c.session_id %}
<a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=delete_lp_category&id=' ~ lp_data.category.getId() }}"
<a href="{{ 'lp_controller.php?' ~ course_url_params ~ '&action=delete_lp_category&id=' ~ lp_data.category.getId() }}"
title="{{ "Delete"|trans }}">
<img src="{{ "delete.png"|icon }}" alt="{{ "Delete"|trans }}">
</a>
@ -314,13 +314,13 @@
<div class="tools-actions pull-right">
{% if lp_data.category.getId() > 0 %}
{% if not _c.session_id %}
<a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=add_lp_category&id=' ~ lp_data.category.getId() }}"
<a href="{{ 'lp_controller.php?' ~ course_url_params ~ '&action=add_lp_category&id=' ~ lp_data.category.getId() }}"
title="{{ "Edit"|trans }}">
<img src="{{ "edit.png"|icon }}" alt="{{ "Edit"|trans }}">
</a>
{% if subscription_settings.allow_add_users_to_lp_category %}
<a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=add_users_to_category&id=' ~ lp_data.category.getId() }}"
<a href="{{ 'lp_controller.php?' ~ course_url_params ~ '&action=add_users_to_category&id=' ~ lp_data.category.getId() }}"
title="{{ "AddUsers"|trans }}">
<img src="{{ "user.png"|icon }}" alt="{{ "AddUsers"|trans }}">
</a>
@ -331,7 +331,7 @@
<img src="{{ "up_na.png"|icon }}" alt="{{ "Move"|trans }}">
</a>
{% else %}
<a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=move_up_category&id=' ~ lp_data.category.getId() }}"
<a href="{{ 'lp_controller.php?' ~ course_url_params ~ '&action=move_up_category&id=' ~ lp_data.category.getId() }}"
title="{{ "Move"|trans }}">
<img src="{{ "up.png"|icon }}" alt="{{ "Move"|trans }}">
</a>
@ -342,7 +342,7 @@
<img src="{{ "down_na.png"|icon }}" alt="{{ "Move"|trans }}">
</a>
{% else %}
<a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=move_down_category&id=' ~ lp_data.category.getId() }}"
<a href="{{ 'lp_controller.php?' ~ course_url_params ~ '&action=move_down_category&id=' ~ lp_data.category.getId() }}"
title="{{ "Move"|trans }}">
<img src="{{ "down.png"|icon }}" alt="{{ "Move"|trans }}">
</a>
@ -350,12 +350,12 @@
{% endif %}
{% if lp_data.category_visibility == 0 %}
<a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_visibility', 'id':lp_data.category.id, 'new_status':1}|url_encode }}"
<a href="lp_controller.php?{{ course_url_params ~ '&' ~ {'action':'toggle_category_visibility', 'id':lp_data.category.id, 'new_status':1}|url_encode }}"
title="{{ 'Show'|trans }}">
<img src="{{ 'invisible.png'|icon }}" alt="{{ 'Show'|trans }}">
</a>
{% else %}
<a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_visibility', 'id':lp_data.category.id, 'new_status':0}|url_encode }}"
<a href="lp_controller.php?{{ course_url_params ~ '&' ~ {'action':'toggle_category_visibility', 'id':lp_data.category.id, 'new_status':0}|url_encode }}"
title="{{ 'Hide'|trans }}">
<img src="{{ 'visible.png'|icon }}" alt="{{ 'Hide'|trans }}">
</a>
@ -363,13 +363,13 @@
{% if lp_data.category_visibility == 1 %}
{% if lp_data.category_is_published == 0 %}
<a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_publish', 'id':lp_data.category.id, 'new_status':1}|url_encode }}"
<a href="lp_controller.php?{{ course_url_params ~ '&' ~ {'action':'toggle_category_publish', 'id':lp_data.category.id, 'new_status':1}|url_encode }}"
title="{{ 'LearnpathPublish'|trans }}">
<img src="{{ 'lp_publish_na.png'|icon }}"
alt="{{ 'LearnpathPublish'|trans }}">
</a>
{% else %}
<a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_publish', 'id':lp_data.category.id, 'new_status':0}|url_encode }}"
<a href="lp_controller.php?{{ course_url_params ~ '&' ~ {'action':'toggle_category_publish', 'id':lp_data.category.id, 'new_status':0}|url_encode }}"
title="{{ 'LearnpathDoNotPublish'|trans }}">
<img src="{{ 'lp_publish.png'|icon }}" alt="{{ 'Hide'|trans }}">
</a>
@ -380,7 +380,7 @@
{% endif %}
{% if not _c.session_id %}
<a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=delete_lp_category&id=' ~ lp_data.category.getId() }}"
<a href="{{ 'lp_controller.php?' ~ course_url_params ~ '&action=delete_lp_category&id=' ~ lp_data.category.getId() }}"
title="{{ "Delete"|trans }}">
<img src="{{ "delete.png"|icon }}" alt="{{ "Delete"|trans }}">
</a>
@ -518,7 +518,7 @@
{{ 'IHaveFinishedTheLessonsNotifyTheTeacher'|trans }}
</button>
{% else %}
<a href="{{ web_self ~ "?" ~ _p.web_cid_query ~ "&action=send_notify_teacher" }}" class="btn btn-primary">
<a href="{{ web_self ~ "?" ~ course_url_params ~ "&action=send_notify_teacher" }}" class="btn btn-primary">
{{ 'IHaveFinishedTheLessonsNotifyTheTeacher'|trans }}
</a>
{% endif %}

@ -86,8 +86,8 @@
<h4 class="title">
<a href="{{ subitem.url }}" title="{{ subitem.title }}" class="{{ subitem.visibility != '1' ? 'text-muted': '' }}">{{ subitem.title }}</a>
{% if subitem.forum_of_group != 0 %}
<a class="forum-goto" href="../group/group_space.php?{{ _p.web_cid_query }}&gidReq={{ subitem.forum_of_group }}">
{{ "forum.png"|img(22) }} {{ "GoTo"|trans }} {{ subitem.forum_group_title }}
<a class="forum-goto" href="../group/group_space.php?{{ course_url_params }}&gidReq={{ subitem.forum_of_group }}">
{{ "forum.png"|img(22) }} {{ "Go to"|trans }} {{ subitem.forum_group_title }}
</a>
{% endif %}
{{ subitem.icon_session }}
@ -98,7 +98,7 @@
</div>
</h4>
<ul class="forum-threads">
<li class="threads">{{ 'ForumThreads'| trans }}: {{ subitem.number_threads }} </li>
<li class="threads">{{ 'Forum threads'| trans }}: {{ subitem.number_threads }} </li>
{% if subitem.last_poster_id is not empty %}
<li class="date">
<i class="fa fa-comments" aria-hidden="true"></i>

Loading…
Cancel
Save