|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
{% import _self as table_tool %} |
|
|
|
|
|
|
|
|
|
{% macro row_tool(tool, is_child, _p) %} |
|
|
|
|
{% macro row_tool(tool, is_child, categories, _p) %} |
|
|
|
|
{% set url_params = {'id': tool.id}|url_encode() %} |
|
|
|
|
<tr class="{{ is_child ? 'child' : '' }}"> |
|
|
|
|
<td {% if is_child %} colspan="2" {% endif %}> |
|
|
|
@ -40,6 +40,26 @@ |
|
|
|
|
</a> |
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
{% if is_child %} |
|
|
|
|
{% for category in categories %} |
|
|
|
|
{% set url_eval_params = null %} |
|
|
|
|
{% if tool.session is not empty %} |
|
|
|
|
{% if category.get_course_code == tool.course.code and category.get_session_id == tool.session.id %} |
|
|
|
|
{% set url_eval_params = {'selectcat': category.get_id, 'cidReq': tool.course.code, 'id_session': tool.session.id, 'gidReq': 0, 'gradebook': 0}|url_encode() %} |
|
|
|
|
{% endif %} |
|
|
|
|
{% else %} |
|
|
|
|
{% if category.get_course_code == tool.course.code %} |
|
|
|
|
{% set url_eval_params = {'selectcat': category.get_id, 'cidReq': tool.course.code, 'id_session': 0, 'gidReq': 0, 'gradebook': 0}|url_encode() %} |
|
|
|
|
{% endif %} |
|
|
|
|
{% endif %} |
|
|
|
|
{% if url_eval_params is not null %} |
|
|
|
|
<a href="{{ _p.web_plugin }}ims_lti/gradebook/add_eval.php?{{ url_eval_params }}"> |
|
|
|
|
{{ 'gradebook.png'|img(22, 'MakeQualifiable'|get_lang) }} |
|
|
|
|
</a> |
|
|
|
|
{% endif %} |
|
|
|
|
{% endfor %} |
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
<a href="{{ _p.web_plugin }}ims_lti/edit.php?{{ url_params }}"> |
|
|
|
|
{{ 'edit.png'|img(22, 'Edit'|get_lang) }} |
|
|
|
|
</a> |
|
|
|
@ -73,9 +93,9 @@ |
|
|
|
|
</thead> |
|
|
|
|
<tbody> |
|
|
|
|
{% for tool in tools %} |
|
|
|
|
{{ table_tool.row_tool(tool, false, _p) }} |
|
|
|
|
{{ table_tool.row_tool(tool, false, categories, _p) }} |
|
|
|
|
{% for child_tool in tool.getChildren %} |
|
|
|
|
{{ table_tool.row_tool(child_tool, true, _p) }} |
|
|
|
|
{{ table_tool.row_tool(child_tool, true, categories, _p) }} |
|
|
|
|
{% endfor %} |
|
|
|
|
{% endfor %} |
|
|
|
|
</tbody> |
|
|
|
|