jmontoyaa пре 7 година
родитељ
комит
c4caaebb91

+ 3 - 25
main/inc/lib/pear/HTML/QuickForm/select.php

@@ -54,7 +54,6 @@ class HTML_QuickForm_select extends HTML_QuickForm_element
      * @access    private
      */
     protected $_values;
-    private $columnsSize;
 
     /**
      * Class constructor
@@ -78,17 +77,11 @@ class HTML_QuickForm_select extends HTML_QuickForm_element
             if (!empty($attributes['class'])) {
                 $oldClass = $attributes['class'];
             }
-
+            if (empty($attributes)) {
+                $attributes = []; // Initialize variable to avoid warning in PHP 7.1
+            }
             $attributes['class'] = $oldClass . ' selectpicker show-tick form-control';
             $attributes['data-live-search'] = 'true';
-            // Ofaj
-            if (isset($attributes['disable_select_effect']) && $attributes['disable_select_effect']) {
-                $attributes['class'] = 'form-control';
-            }
-            // Ofaj
-            if (isset($attributes['select_chosen']) && $attributes['select_chosen']) {
-                $attributes['class'] = 'chzn-select';
-            }
 
             if (isset($attributes['placeholder'])) {
                 $addBlank =  $attributes['placeholder'];
@@ -336,21 +329,6 @@ class HTML_QuickForm_select extends HTML_QuickForm_element
     // }}}
     // {{{ setMultiple()
 
-    /**
-     * @return null
-     */
-    public function getColumnsSize()
-    {
-        return $this->columnsSize;
-    }
-
-    /**
-     * @param null $columnsSize
-     */
-    public function setColumnsSize($columnsSize)
-    {
-        $this->columnsSize = $columnsSize;
-    }
 
     /**
      * Sets the select mutiple attribute

+ 1 - 0
main/inc/lib/sessionmanager.lib.php

@@ -466,6 +466,7 @@ class SessionManager
         $limit = $conditions['limit'];
 
         $isMakingOrder = false;
+        $showCountUsers = false;
 
         if ($get_count == true) {
             $select = " SELECT count(DISTINCT s.id) as total_rows";

+ 8 - 0
main/template/rainbow/course_progress/layout.tpl

@@ -0,0 +1,8 @@
+<div class="row">
+    <div class="col-md-12">
+        {{ actions }}
+        <div class="blog">
+            {{ content }}
+        </div>
+    </div>
+</div>

+ 46 - 0
main/template/rainbow/course_progress/pdf_general_thematic.tpl

@@ -0,0 +1,46 @@
+
+<table style="margin-top: 30px;" class="full-width border-thin">
+    <thead>
+        <tr>
+            <th width="30%" style="display:inline-block; padding: 10px; text-align: center; background-color: #E5E5E5;">
+                {{ "Thematic"|get_lang }}
+            </th>
+            <th width="50%" style="display:inline-block; padding: 10px; text-align: center; background-color: #E5E5E5;">
+                {{ "ThematicPlan"|get_lang }}
+            </th>
+            <th width="20%" style="display:inline-block; padding: 10px; text-align: center; background-color: #E5E5E5;">
+                {{ "ThematicAdvance"|get_lang }}
+           </th>
+        </tr>
+    </thead>
+    <tbody>
+        {% for item in data %}
+            <tr>
+                <td>
+                    <h4 style="margin-bottom: 10px;">{{ item.title }}</h4>
+                    <br>
+                    {{ item.content }}
+                </td>
+                <td>
+                    {% for plan in item.thematic_plan %}
+                        <br>
+                        <h4 style="margin-bottom: 10px;">{{ plan.title }}</h4>
+                        <br>
+                        {{ plan.description }}
+                    {% endfor %}
+                </td>
+                <td>
+                    {% for advance in item.thematic_advance %}
+                        <br>
+                        <h4 style="margin-bottom: 10px;">
+                            {{ advance.duration }} {{ "MinHours" | get_lang }}
+                        </h4>
+                        {{ advance.start_date | api_convert_and_format_date(2) }}
+                        <br>
+                        {{ advance.content }}
+                    {% endfor %}
+                </td>
+            </tr>
+        {% endfor %}
+    </tbody>
+</table>

+ 36 - 0
main/template/rainbow/course_progress/pdf_single_thematic.tpl

@@ -0,0 +1,36 @@
+<table class="full-width border-thin">
+    <thead>
+    <tr>
+        <th width="30%" style="display:inline-block; padding: 10px; text-align: center; background-color: #E5E5E5;">{{ 'Thematic'|get_lang }}</th>
+        <th width="50%" style="display:inline-block; padding: 10px; text-align: center; background-color: #E5E5E5;">{{ 'ThematicPlan'|get_lang }}</th>
+        <th width="20%" style="display:inline-block; padding: 10px; text-align: center; background-color: #E5E5E5;">{{ 'ThematicAdvance'|get_lang }}</th>
+    </tr>
+    </thead>
+    <tbody>
+    <tr>
+        <td>
+            <h4>{{ theme.title }}</h4>
+            <br>
+            {{ theme.content }}
+        </td>
+        <td>
+            {% for plan in plans %}
+                <br>
+                <h4>{{ plan.title }}</h4>
+                <br>
+                {{ plan.description }}
+            {% endfor %}
+        </td>
+        <td>
+            {% for advance in advances %}
+                <h4 style="margin-bottom: 10px;">
+                    {{ advance.duration }} {{ "MinHours" | get_lang }}
+                </h4>
+                <p>{{ advance.start_date|api_convert_and_format_date(2) }}</p>
+                {{ advance.content }}
+                <br>
+            {% endfor %}
+        </td>
+    </tr>
+    </tbody>
+</table>

+ 126 - 0
main/template/rainbow/course_progress/progress.tpl

@@ -0,0 +1,126 @@
+{{ actions }}
+{{ message }}
+{{ flash_messages }}
+{% if data is not empty %}
+{% set tutor =  false | api_convert_and_format_date(true) %}
+<div id="course-progress" class="thematic">
+    <div class="row">
+        <div class="col-md-12">
+            <div class="bar-progress">
+                <div class="pull-right">
+                    <div class="score-progress">
+                        <h3>{{ 'Progress' | get_lang }}: <span id="div_result">{{ score_progress }}</span> %</h3>
+                    </div>
+                </div>
+            </div>
+            <div class="table-responsive">
+                <table width="100%" class="table table-hover">
+                    <tr>
+                        <th style="width: 25%">{{ 'Thematic' | get_lang }}</th>
+                        <th style="width: 40%">{{ 'ThematicPlan' | get_lang }}</th>
+                        <th style="width: 35%">{{ 'ThematicAdvance' | get_lang }}</th>
+                    </tr>
+                    {% for item in data %}
+                        <tr>
+                            <td id="id-thematic-{{ item.id }}">
+                                {% if session_star is empty %}
+                                    <h3>{{ item.title }}</h3>
+                                {% else %}
+                                    <h3>{{ item.title }} {{ session_star }}</h3>
+                                {% endif %}
+                                {{ item.content }}
+                                <div class="btn-group btn-group-sm">
+                                    {{ item.toolbar }}
+                                </div>
+                            </td>
+                            <td>
+                                {% if tutor %}
+                                <div class="pull-right">
+                                    <a title="{{ 'EditThematicPlan' | get_lang }}" href="index.php?{{ _p.web_cid_query }}&origin=thematic_details&action=thematic_plan_list&thematic_id={{ item.id }}&width=700&height=500'" class="btn btn-default">
+                                        <i class="fa fa-pencil" aria-hidden="true"></i>
+                                    </a>
+                                </div>
+                                {% endif %}
+                                <div class="thematic_plan_{{ item.id }}">
+                                    {% if item.thematic_plan is empty %}
+                                    <div class="alert-thematic">
+                                        <div class="alert alert-info" role="alert">{{ 'StillDoNotHaveAThematicPlan' | get_lang }}</div>
+                                    </div>
+                                    {% else %}
+                                        {% for subitem in item.thematic_plan %}
+                                        <h4>{{ subitem.title }}</h4>
+                                        <p>{{ subitem.description }}</p>
+                                        {% endfor %}
+                                    {% endif %}
+                                </div>
+                            </td>
+                            <td>
+                                {% if tutor %}
+                                <div class="pull-right">
+                                    <a title="{{ 'NewThematicAdvance' | get_lang }}" href="index.php?{{ _p.web_cid_query }}&action=thematic_advance_add&thematic_id={{ item.id }}" class="btn btn-default">
+                                        <i class="fa fa-plus-circle" aria-hidden="true"></i>
+                                    </a>
+                                </div>
+                                {% endif %}
+                                <div class="thematic-advance">
+                                <table width="100%" class="table">
+                                {% if item.thematic_advance is not empty %}
+                                {% for advance in item.thematic_advance %}
+                                <tr>
+                                    <td style="width: 90%" class="thematic_advance_content" id="thematic_advance_content_id_{{ advance.id }}">
+                                        <div id="thematic_advance_{{ advance.id }}">
+                                        <strong>{{ advance.start_date | format_date }}</strong>
+                                        {{ advance.content }}
+                                        </div>
+                                        {% if tutor %}
+                                            <div class="toolbar-actions">
+                                                <div id="thematic_advance_tools_{{ advance.id }}" class="thematic_advance_actions">
+                                                    <div class="btn-group btn-group-sm">
+                                                        <a class="btn btn-default btn-sm" href="index.php?{{ _p.web_cid_query }}&action=thematic_advance_edit&thematic_id={{ item.id }}&thematic_advance_id={{ advance.id }}" title="{{ 'Edit' |get_lang }}">
+                                                            <i class="fa fa-pencil" aria-hidden="true"></i>
+                                                        </a>
+                                                        <a class="btn btn-default btn-sm" onclick="javascript:if(!confirm('{{ 'AreYouSureToDelete' | get_lang }}')) return false;" href="index.php?{{ _p.web_cid_query }}&action=thematic_advance_delete&thematic_id={{ item.id }}&thematic_advance_id={{ advance.id }}" title="{{ 'Delete' |get_lang }}">
+                                                            <i class="fa fa-trash" aria-hidden="true"></i>
+                                                        </a>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        {% endif %}
+                                        </div>
+                                    </td>
+                                    {% if advance.done_advance == 1 %}
+                                        {% set color = "background-color:#E5EDF9;" %}
+                                    {% else %}
+                                        {% set color = "background-color:#FFFFFF;" %}
+                                    {% endif %}
+                                    {% if tutor %}
+                                        <td style="width: 10%; {{ color }}" id="td_done_thematic_{{ advance.id }}">
+                                        {% set check = ""  %}
+                                        {% if item.last_done == advance.id %}
+                                            {% set check = "checked"  %}
+                                        {% endif %}
+                                        <center>
+                                            <input type="radio" class="done_thematic" id="done_thematic_{{ advance.id }}" name="done_thematic" value="{{ advance.id }}" {{ check }} onclick="update_done_thematic_advance(this.value)">
+                                        </center>
+                                    {% else %}
+                                        </td>
+                                    {% endif %}
+                                </tr>
+                                {% endfor %}
+                                {% else %}
+                                    <div class="alert alert-info" role="alert">{{ 'ThereIsNoAThematicAdvance' | get_lang }}</div>
+                                {% endif %}
+                                </table>
+                                </div>
+                            </td>
+                        </tr>
+                    {% endfor %}
+
+                </table>
+            </div>
+        </div>
+    </div>
+</div>
+{% else %}
+    <div class="alert alert-info" role="alert">{{ 'ThereIsNoAThematicSection' | get_lang }}</div>
+{% endif %}