Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
MOOC packages by hacklab
django-courses-legacy
Commits
711f2a8a
Commit
711f2a8a
authored
4 years ago
by
Matheus Miranda
Browse files
Options
Download
Plain Diff
Merge branch 'develop' into 'master'
Add feature to download user reports See merge request
!67
parents
85efd392
1803d054
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
11 deletions
+20
-11
courses_legacy/static/js/reports/city-participation-report-list/city-participation-report-list.component.js
...n-report-list/city-participation-report-list.component.js
+4
-3
courses_legacy/static/js/reports/city-participation-report/city-participation-report.component.js
...rticipation-report/city-participation-report.component.js
+4
-0
courses_legacy/static/js/reports/user-actions-report-list/user-actions-report-list.component.js
...actions-report-list/user-actions-report-list.component.js
+6
-0
courses_legacy/templates/components/classroom-participation-report.template.html
...s/components/classroom-participation-report.template.html
+0
-7
courses_legacy/templates/user-actions-report-list.html
courses_legacy/templates/user-actions-report-list.html
+6
-1
No files found.
courses_legacy/static/js/reports/city-participation-report-list/city-participation-report-list.component.js
View file @
711f2a8a
...
...
@@ -36,6 +36,7 @@
function
fetchNtes
()
{
var
params
=
{
date
:
ctrl
.
date
};
ctrl
.
openned
=
0
;
if
(
ctrl
.
role
)
{
params
[
'
role
'
]
=
ctrl
.
role
;
...
...
@@ -48,7 +49,7 @@
ctrl
.
openned
=
nte
.
id
;
}
}
}
}
NteParticipationReport
.
query
(
params
,
(
data
)
=>
{
ctrl
.
ntes
=
data
;
...
...
@@ -57,9 +58,9 @@
}
function
filterNtes
()
{
if
(
ctrl
.
search
)
{
if
(
ctrl
.
city
)
{
ctrl
.
filteredNtes
=
ctrl
.
ntes
.
filter
(
nte
=>
{
return
nte
.
name
.
toLowerCase
().
includes
(
ctrl
.
search
.
toLowerCase
()
);
return
nte
.
municipios
.
includes
(
ctrl
.
city
);
});
}
else
{
ctrl
.
filteredNtes
=
ctrl
.
ntes
;
...
...
This diff is collapsed.
Click to expand it.
courses_legacy/static/js/reports/city-participation-report/city-participation-report.component.js
View file @
711f2a8a
...
...
@@ -27,6 +27,10 @@
ctrl
.
minimized
=
true
;
toggleDetails
();
}
if
(
ctrl
.
openned
===
0
)
{
ctrl
.
minimized
=
true
;
}
};
ctrl
.
$onInit
=
function
()
{
...
...
This diff is collapsed.
Click to expand it.
courses_legacy/static/js/reports/user-actions-report-list/user-actions-report-list.component.js
View file @
711f2a8a
...
...
@@ -40,6 +40,12 @@
}
}
$scope
.
download_actions
=
function
()
{
var
options
=
'
?
'
;
options
+=
(
'
user=
'
+
ctrl
.
user
.
id
);
window
.
open
(
'
/api/iat/actions-user
'
+
options
+
'
&format=xlsx
'
,
'
_blank
'
);
}
function
fetchUserActivitiesPage
(
page
)
{
ActionsUserReport
.
get
({
user
:
ctrl
.
user
.
id
,
page
},
(
data
)
=>
{
if
(
ctrl
.
actions
!==
undefined
)
{
...
...
This diff is collapsed.
Click to expand it.
courses_legacy/templates/components/classroom-participation-report.template.html
View file @
711f2a8a
...
...
@@ -41,13 +41,6 @@
<td><b>
{{ classroom.participation.total }}
</b></td>
</tr>
</div>
<tr
class=
"total"
>
<td><b>
TOTAL GERAL
</b></td>
<td><b>
{{ $ctrl.total.actives }}
</b></td>
<td><b>
{{ $ctrl.total.not_actives }}
</b></td>
<td><b>
{{ $ctrl.total.not_involved }}
</b></td>
<td><b>
{{ $ctrl.total.total }}
</b></td>
</tr>
</tbody>
</table>
</div>
...
...
This diff is collapsed.
Click to expand it.
courses_legacy/templates/user-actions-report-list.html
View file @
711f2a8a
{% verbatim %}
<h3
class=
"widget-title"
>
Percursos
</h3>
<div>
<h3
class=
"widget-title"
>
Percursos
</h3>
<button
class=
"btn btn-primary download classroom-report--btn-download pull-right"
ng-if=
"$ctrl.actions.length > 0"
ng-click=
"download_actions()"
>
Baixar percursos
</button>
</div>
<div
class=
"classroom-report--kv-table classroom-report--table"
ng-if=
"$ctrl.actions.length > 0"
>
<dl
ng-repeat=
"action in $ctrl.actions | limitTo: limit"
>
<dt>
{{ action.action_phrase }}
</dt>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment