| 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 |
|
| 16910 |
efrain |
77 |
<div class="container">
|
|
|
78 |
<div class="card" id="">
|
|
|
79 |
<div class="card-header">
|
|
|
80 |
<h6 class="card-title">LABEL_COMMENTS_FOR_CAPSULE</h6>
|
|
|
81 |
</div>
|
|
|
82 |
|
|
|
83 |
<?php
|
| 1320 |
efrain |
84 |
$form = $this->form;
|
|
|
85 |
$form->setAttributes([
|
|
|
86 |
'name' => 'form-filter',
|
|
|
87 |
'id' => 'form-filter',
|
|
|
88 |
]);
|
|
|
89 |
|
|
|
90 |
$form->prepare();
|
|
|
91 |
echo $this->form()->openTag($form);
|
|
|
92 |
?>
|
| 16910 |
efrain |
93 |
|
|
|
94 |
<div class="card-body">
|
|
|
95 |
<div class="row">
|
|
|
96 |
<div class="col-6 mt-3">
|
|
|
97 |
|
| 1320 |
efrain |
98 |
<?php
|
|
|
99 |
$element = $form->get('topic_uuid');
|
|
|
100 |
|
|
|
101 |
$element->setOptions(['label' => 'LABEL_TOPIC']);
|
|
|
102 |
|
|
|
103 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
104 |
echo $this->formLabel($element);
|
|
|
105 |
echo $this->formSelect($element);
|
|
|
106 |
?>
|
| 16910 |
efrain |
107 |
</div>
|
|
|
108 |
<div class="col-6 mt-3">
|
|
|
109 |
|
| 1320 |
efrain |
110 |
<?php
|
|
|
111 |
$element = $form->get('capsule_uuid');
|
|
|
112 |
$element->setOptions(['label' => 'LABEL_CAPSULE']);
|
|
|
113 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
114 |
echo $this->formLabel($element);
|
|
|
115 |
echo $this->formSelect($element);
|
|
|
116 |
?>
|
| 16910 |
efrain |
117 |
</div>
|
|
|
118 |
</div>
|
|
|
119 |
<div class="row">
|
|
|
120 |
<div class="col-12 mt-3">
|
|
|
121 |
|
|
|
122 |
<table id="gridTable" class="table table-bordered">
|
| 1320 |
efrain |
123 |
<thead>
|
|
|
124 |
<tr>
|
|
|
125 |
<th style="width: 12%">LABEL_FIRST_NAME</th>
|
|
|
126 |
<th style="width: 12%">LABEL_LAST_NAME</th>
|
|
|
127 |
<th style="width: 16%">LABEL_EMAIL_NAME</th>
|
|
|
128 |
<th style="width: 10%">LABEL_RATING</th>
|
|
|
129 |
<th style="width: 50%">LABEL_COMMENT</th>
|
|
|
130 |
|
|
|
131 |
</tr>
|
|
|
132 |
</thead>
|
|
|
133 |
<tbody>
|
|
|
134 |
</tbody>
|
|
|
135 |
</table>
|
| 16910 |
efrain |
136 |
|
|
|
137 |
</div>
|
|
|
138 |
</div>
|
|
|
139 |
</div>
|
|
|
140 |
<div class="card-footer text-right">
|
| 16992 |
efrain |
141 |
<button type="button" class="btn btn-info btn-refresh"><i class="fa fa-sync"></i> LABEL_REFRESH </button>
|
| 16910 |
efrain |
142 |
<?php if($allowUpload) : ?>
|
|
|
143 |
<button type="button" class="btn btn-primary btn-upload"><i class="fa fa-upload"></i> LABEL_UPLOAD </button>
|
|
|
144 |
<?php endif; ?>
|
|
|
145 |
<?php if($allowNotification) : ?>
|
|
|
146 |
<button type="button" class="btn btn-primary btn-notification"><i class="fa fa-tablet"></i> LABEL_NOTIFICATION </button>
|
|
|
147 |
<?php endif; ?>
|
|
|
148 |
</div>
|
|
|
149 |
|
|
|
150 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
151 |
</div>
|
|
|
152 |
</div>
|
|
|
153 |
|
|
|
154 |
|
|
|
155 |
|
| 1320 |
efrain |
156 |
|
|
|
157 |
|
|
|
158 |
|
|
|
159 |
|
|
|
160 |
<script id="progressRowTemplate" type="text/x-jsrender">
|
|
|
161 |
<tr>
|
|
|
162 |
<td style="width: 12%">
|
|
|
163 |
{{>first_name}}
|
|
|
164 |
</td>
|
|
|
165 |
<td style="width: 12%">
|
|
|
166 |
{{>last_name}}
|
|
|
167 |
</td>
|
|
|
168 |
<td style="width: 16%">
|
|
|
169 |
{{>email}}
|
|
|
170 |
</td>
|
|
|
171 |
|
|
|
172 |
<td style="width: 20%">
|
|
|
173 |
LABEL_REPORTS_FIRST_DATE
|
|
|
174 |
<br>
|
|
|
175 |
{{>first_date}} {{>first_time}}
|
|
|
176 |
<br>
|
|
|
177 |
LABEL_REPORTS_LAST_DATE
|
|
|
178 |
<br>
|
|
|
179 |
{{>last_date}} {{>last_time}}
|
|
|
180 |
</td>
|
|
|
181 |
<td style="width: 12%">
|
|
|
182 |
<div class="progress progress-xs progress-striped active">
|
|
|
183 |
<div class="progress-bar bg-primary" style="width: {{>total_capsules_percentaje}}%"></div>
|
|
|
184 |
</div>
|
|
|
185 |
</td>
|
|
|
186 |
<td style="width: 8%" class="text-right">{{>total_capsules_percentaje}}</td>
|
|
|
187 |
</tr>
|
|
|
188 |
</script>
|
|
|
189 |
|
|
|
190 |
|
|
|
191 |
|
|
|
192 |
|
|
|
193 |
|
|
|
194 |
|
|
|
195 |
|