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
2aacf5fb
Commit
2aacf5fb
authored
5 years ago
by
Leonardo Piccioni de Almeida
Browse files
Options
Download
Plain Diff
Merge branch 'develop'
parents
e56bdee9
03bcd096
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
17 deletions
+11
-17
courses_legacy/static/js/reports/controllers.js
courses_legacy/static/js/reports/controllers.js
+10
-15
courses_legacy/static/templates/admin/activities/activity_reading.html
...y/static/templates/admin/activities/activity_reading.html
+1
-2
No files found.
courses_legacy/static/js/reports/controllers.js
View file @
2aacf5fb
...
...
@@ -37,8 +37,8 @@
search
:
$scope
.
filters
.
textsearch
,
},
(
data
)
=>
{
$scope
.
users_reports
=
removeDuplicated
(
data
)
$scope
.
user_reports_total_items
=
data
.
count
-
$scope
.
duplicatedCounter
;
$scope
.
users_reports
=
data
.
results
$scope
.
user_reports_total_items
=
data
.
count
$scope
.
reports_loaded
=
true
;
$scope
.
users_reports
.
$resolved
=
true
})
...
...
@@ -100,11 +100,6 @@
$scope
.
filter_stats
()
}
function
removeDuplicated
(
data
)
{
const
dataWithoutDup
=
data
.
results
.
filter
((
user
,
index
,
self
)
=>
self
.
findIndex
(
t
=>
t
.
username
===
user
.
username
&&
t
.
course_progress
>=
user
.
course_progress
)
===
index
)
$scope
.
duplicatedCounter
=
data
.
results
.
length
-
dataWithoutDup
.
length
return
dataWithoutDup
}
$scope
.
filter_stats
=
function
()
{
if
(
$scope
.
filters
.
selected_class
===
'
all
'
)
{
...
...
@@ -116,8 +111,8 @@
page
:
$scope
.
pagination
.
currentPage
,
search
:
$scope
.
filters
.
textsearch
},
function
(
data
)
{
$scope
.
users_reports
=
removeDuplicated
(
data
)
;
$scope
.
user_reports_total_items
=
data
.
count
-
$scope
.
duplicatedCounter
;
$scope
.
users_reports
=
data
.
results
;
$scope
.
user_reports_total_items
=
data
.
count
;
$scope
.
reports_loaded
=
true
;
});
}
else
if
(
$scope
.
filters
.
selected_class
===
'
my_classes
'
)
{
...
...
@@ -130,8 +125,8 @@
classes
:
sortedMyClasses
,
search
:
$scope
.
filters
.
textsearch
,
},
(
data
)
=>
{
$scope
.
users_reports
=
removeDuplicated
(
data
)
;
$scope
.
user_reports_total_items
=
data
.
count
-
$scope
.
duplicatedCounter
;
$scope
.
users_reports
=
data
.
results
;
$scope
.
user_reports_total_items
=
data
.
count
;
$scope
.
reports_loaded
=
true
;
});
$scope
.
course_stats
=
CourseStats
.
get
({
...
...
@@ -148,8 +143,8 @@
page
:
$scope
.
pagination
.
currentPage
,
search
:
$scope
.
filters
.
textsearch
,
},
(
data
)
=>
{
$scope
.
users_reports
=
removeDuplicated
(
data
)
;
$scope
.
user_reports_total_items
=
data
.
count
-
$scope
.
duplicatedCounter
;
$scope
.
users_reports
=
data
.
results
;
$scope
.
user_reports_total_items
=
data
.
count
;
$scope
.
reports_loaded
=
true
;
});
$scope
.
course_stats
=
CourseStats
.
get
({
...
...
@@ -163,8 +158,8 @@
page
:
$scope
.
pagination
.
currentPage
,
search
:
$scope
.
filters
.
textsearch
,
},
(
data
)
=>
{
$scope
.
users_reports
=
removeDuplicated
(
data
)
;
$scope
.
user_reports_total_items
=
data
.
count
-
$scope
.
duplicatedCounter
;
$scope
.
users_reports
=
data
.
results
;
$scope
.
user_reports_total_items
=
data
.
count
;
$scope
.
reports_loaded
=
true
;
});
$scope
.
course_stats
=
CourseStats
.
get
({
...
...
This diff is collapsed.
Click to expand it.
courses_legacy/static/templates/admin/activities/activity_reading.html
View file @
2aacf5fb
<div
class=
"question textleft"
>
<button
class=
"btn btn-danger"
ng-click=
"removeCurrentActivity()"
><i
class=
"fa fa-trash-o"
></i></button>
<modalmarkdowneditor
title=
"leitura"
content=
"currentActivity.data.question"
>
</modalmarkdowneditor>
<textarea
title=
"leitura"
ui-tinymce=
"tinymceOptions"
ng-model=
"currentActivity.data.question"
></textarea
</div
>
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