Skip to content

Commit

Permalink
🚸(provisioning) add number of video downloads
Browse files Browse the repository at this point in the history
User can download videos to watch them offline. It is an information
that has to be taken into account in the video actvity analysis.
  • Loading branch information
quitterie-lcs committed Jan 26, 2022
1 parent ebb5eef commit 69a1f84
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to

### Added

- Download panel on Teachers Course Video Overview dashboard
- Links between Teachers folder dashboards
- Metadata panels for Teachers dashboard
- Teachers dashboards for video activity
Expand Down
1 change: 1 addition & 0 deletions src/dashboards/common.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@
completed: 'http://adlnet.gov/expapi/verbs/completed',
initialized: 'http://adlnet.gov/expapi/verbs/initialized',
played: 'https://w3id.org/xapi/video/verbs/played',
downloaded: 'http://id.tincanapi.com/verb/downloaded',
},
}
39 changes: 37 additions & 2 deletions src/dashboards/teachers/details.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ dashboard.new(
timeField='timestamp'
)
),
gridPos={ x: 0, y: 1, w: 4.8, h: 4.5 }
gridPos={ x: 0, y: 1, w: 4.8, h: 3 }
)
.addPanel(
statPanel.new(
Expand Down Expand Up @@ -137,7 +137,7 @@ dashboard.new(
timeField='timestamp'
)
),
gridPos={ x: 0, y: 4, w: 4.8, h: 4.5 },
gridPos={ x: 0, y: 3, w: 4.8, h: 3 },
)
.addPanel(
statPanel.new(
Expand Down Expand Up @@ -176,6 +176,41 @@ dashboard.new(
),
gridPos={ x: 4.8, y: 3, w: 4.8, h: 3 },
)
.addPanel(
statPanel.new(
title='Downloads',
description=|||
Number of video downloads.
|||,
datasource=common.datasources.lrs,
reducerFunction='sum',
graphMode='none',
unit='none'
).addTarget(
elasticsearch.target(
datasource=common.datasources.lrs,
query='%(video_query)s AND verb.id:"%(verb_downloaded)s"' % {
video_query: teachers_common.queries.video_id,
verb_downloaded: common.verb_ids.downloaded,
},
metrics=[common.metrics.count],
bucketAggs=[
{
id: 'date',
field: '@timestamp',
type: 'date_histogram',
settings: {
interval: '1d',
min_doc_count: '0',
trimEdges: '0',
},
},
],
timeField='timestamp'
)
),
gridPos={ x: 0, y: 5, w: 4.8, h: 3 }
)
.addPanel(
statPanel.new(
title='Completion threshold',
Expand Down

0 comments on commit 69a1f84

Please sign in to comment.