| 1320 |
efrain |
1 |
<?php
|
|
|
2 |
$acl = $this->viewModel()->getRoot()->getVariable('acl');
|
|
|
3 |
$currentUser = $this->currentUserHelper();
|
|
|
4 |
|
|
|
5 |
$routeReports = $this->url('microlearning/reports/comments-for-capsule');
|
|
|
6 |
|
|
|
7 |
$roleName = $currentUser->getUserTypeId();
|
|
|
8 |
|
|
|
9 |
|
| 16822 |
efrain |
10 |
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
|
|
|
11 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
|
|
|
12 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jsrender/jsrender.js'));
|
| 1320 |
efrain |
13 |
|
|
|
14 |
|
|
|
15 |
|
|
|
16 |
$this->inlineScript()->captureStart();
|
|
|
17 |
echo <<<JS
|
|
|
18 |
jQuery( document ).ready(function( $ ) {
|
|
|
19 |
|
|
|
20 |
$.fn.changeFilter = function() {
|
|
|
21 |
NProgress.start();
|
|
|
22 |
$.ajax({
|
|
|
23 |
'dataType' : 'json',
|
|
|
24 |
'accept' : 'application/json',
|
|
|
25 |
'method' : 'get',
|
|
|
26 |
'url' : $('#form-filter').attr('action'),
|
|
|
27 |
'data' : $('#form-filter').serialize(),
|
|
|
28 |
}).done(function(response) {
|
|
|
29 |
if(response['success']) {
|
|
|
30 |
|
|
|
31 |
$('#tableStudents tbody').empty();
|
|
|
32 |
$('#tableStudents tbody').append(
|
|
|
33 |
$( "#progressRowTemplate" ).render( response['data'] )
|
|
|
34 |
|
|
|
35 |
);
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
} else {
|
|
|
39 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
40 |
$.fn.showError(response['data']);
|
|
|
41 |
} else {
|
|
|
42 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
43 |
$.fn.showFormErrorValidator('#form-slide-video-edit #' + fieldname, errors);
|
|
|
44 |
});
|
|
|
45 |
}
|
|
|
46 |
}
|
|
|
47 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
48 |
$.fn.showError(textStatus);
|
|
|
49 |
}).always(function() {
|
|
|
50 |
NProgress.done();
|
|
|
51 |
});
|
|
|
52 |
return false;
|
|
|
53 |
}
|
|
|
54 |
|
|
|
55 |
$('#form-filter #topic_uuid').change(function(e) {
|
|
|
56 |
e.preventDefault();
|
|
|
57 |
|
|
|
58 |
$('#form-filter #capsule_uuid').empty();
|
|
|
59 |
$.fn.changeFilter();
|
|
|
60 |
})
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
$('#form-filter #capsule_uuid').change(function(e) {
|
|
|
64 |
e.preventDefault();
|
|
|
65 |
|
|
|
66 |
$.fn.changeFilter();
|
|
|
67 |
})
|
|
|
68 |
|
|
|
69 |
|
|
|
70 |
$.fn.changeFilter();
|
|
|
71 |
|
|
|
72 |
});
|
|
|
73 |
JS;
|
|
|
74 |
$this->inlineScript()->captureEnd();
|
|
|
75 |
?>
|
|
|
76 |
|
|
|
77 |
<!-- Content Header (Page header) -->
|
|
|
78 |
<section class="content-header">
|
|
|
79 |
<div class="container-fluid">
|
|
|
80 |
<div class="row mb-2">
|
|
|
81 |
<div class="col-sm-12">
|
|
|
82 |
<h1>LABEL_COMMENTS_FOR_CAPSULE</h1>
|
|
|
83 |
</div>
|
|
|
84 |
</div>
|
|
|
85 |
</div><!-- /.container-fluid -->
|
|
|
86 |
</section>
|
|
|
87 |
|
|
|
88 |
<section class="content">
|
|
|
89 |
<div class="container-fluid">
|
|
|
90 |
<div class="row">
|
|
|
91 |
<div class="col-12">
|
|
|
92 |
<div class="card">
|
|
|
93 |
<div class="card-header">
|
|
|
94 |
<?php
|
|
|
95 |
$form = $this->form;
|
|
|
96 |
$form->setAttributes([
|
|
|
97 |
'name' => 'form-filter',
|
|
|
98 |
'id' => 'form-filter',
|
|
|
99 |
]);
|
|
|
100 |
|
|
|
101 |
$form->prepare();
|
|
|
102 |
echo $this->form()->openTag($form);
|
|
|
103 |
?>
|
|
|
104 |
<div class="row">
|
|
|
105 |
<div class="col-md-6 col-sm-12">
|
|
|
106 |
<div class="form-group">
|
|
|
107 |
<?php
|
|
|
108 |
$element = $form->get('topic_uuid');
|
|
|
109 |
|
|
|
110 |
$element->setOptions(['label' => 'LABEL_TOPIC']);
|
|
|
111 |
|
|
|
112 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
113 |
echo $this->formLabel($element);
|
|
|
114 |
echo $this->formSelect($element);
|
|
|
115 |
?>
|
|
|
116 |
</div>
|
|
|
117 |
</div>
|
|
|
118 |
<div class="col-md-6 col-sm-12">
|
|
|
119 |
<div class="form-group">
|
|
|
120 |
<?php
|
|
|
121 |
$element = $form->get('capsule_uuid');
|
|
|
122 |
$element->setOptions(['label' => 'LABEL_CAPSULE']);
|
|
|
123 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
124 |
echo $this->formLabel($element);
|
|
|
125 |
echo $this->formSelect($element);
|
|
|
126 |
?>
|
|
|
127 |
</div>
|
|
|
128 |
</div>
|
|
|
129 |
<div
|
|
|
130 |
class="col-md-12 col-sm-12"
|
|
|
131 |
>
|
|
|
132 |
<div style="float:right;">
|
|
|
133 |
<button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
|
|
|
134 |
<?php if($allowUpload) : ?>
|
|
|
135 |
<button type="button" class="btn btn-primary btn-upload"><i class="fa fa-upload"></i> LABEL_UPLOAD </button>
|
|
|
136 |
<?php endif; ?>
|
|
|
137 |
<?php if($allowNotification) : ?>
|
|
|
138 |
<button type="button" class="btn btn-primary btn-notification"><i class="fa fa-tablet"></i> LABEL_NOTIFICATION </button>
|
|
|
139 |
<?php endif; ?>
|
|
|
140 |
</div>
|
|
|
141 |
</div>
|
|
|
142 |
</div>
|
|
|
143 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
144 |
</div>
|
|
|
145 |
<div class="card-body">
|
|
|
146 |
<table id="gridTable" class="table table-hover">
|
|
|
147 |
<thead>
|
|
|
148 |
<tr>
|
|
|
149 |
<th style="width: 12%">LABEL_FIRST_NAME</th>
|
|
|
150 |
<th style="width: 12%">LABEL_LAST_NAME</th>
|
|
|
151 |
<th style="width: 16%">LABEL_EMAIL_NAME</th>
|
|
|
152 |
<th style="width: 10%">LABEL_RATING</th>
|
|
|
153 |
<th style="width: 50%">LABEL_COMMENT</th>
|
|
|
154 |
|
|
|
155 |
</tr>
|
|
|
156 |
</thead>
|
|
|
157 |
<tbody>
|
|
|
158 |
</tbody>
|
|
|
159 |
</table>
|
|
|
160 |
</div>
|
|
|
161 |
</div>
|
|
|
162 |
</div>
|
|
|
163 |
</div>
|
|
|
164 |
</div>
|
|
|
165 |
</section>
|
|
|
166 |
|
|
|
167 |
|
|
|
168 |
|
|
|
169 |
|
|
|
170 |
<script id="progressRowTemplate" type="text/x-jsrender">
|
|
|
171 |
<tr>
|
|
|
172 |
<td style="width: 12%">
|
|
|
173 |
{{>first_name}}
|
|
|
174 |
</td>
|
|
|
175 |
<td style="width: 12%">
|
|
|
176 |
{{>last_name}}
|
|
|
177 |
</td>
|
|
|
178 |
<td style="width: 16%">
|
|
|
179 |
{{>email}}
|
|
|
180 |
</td>
|
|
|
181 |
|
|
|
182 |
<td style="width: 20%">
|
|
|
183 |
LABEL_REPORTS_FIRST_DATE
|
|
|
184 |
<br>
|
|
|
185 |
{{>first_date}} {{>first_time}}
|
|
|
186 |
<br>
|
|
|
187 |
LABEL_REPORTS_LAST_DATE
|
|
|
188 |
<br>
|
|
|
189 |
{{>last_date}} {{>last_time}}
|
|
|
190 |
</td>
|
|
|
191 |
<td style="width: 12%">
|
|
|
192 |
<div class="progress progress-xs progress-striped active">
|
|
|
193 |
<div class="progress-bar bg-primary" style="width: {{>total_capsules_percentaje}}%"></div>
|
|
|
194 |
</div>
|
|
|
195 |
</td>
|
|
|
196 |
<td style="width: 8%" class="text-right">{{>total_capsules_percentaje}}</td>
|
|
|
197 |
</tr>
|
|
|
198 |
</script>
|
|
|
199 |
|
|
|
200 |
|
|
|
201 |
|
|
|
202 |
|
|
|
203 |
|
|
|
204 |
|
|
|
205 |
|