7
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-05-29 12:20:49 +00:00

Collect some usage stats

This commit is contained in:
Régis Behmo 2018-09-18 20:17:42 +02:00
parent 30bc6df091
commit 22872412c3
4 changed files with 18 additions and 1 deletions

View File

@ -5,7 +5,10 @@ USERID ?= $$(id -u)
EDX_PLATFORM_SETTINGS ?= universal.production
DOCKER_COMPOSE = docker-compose -f docker-compose.yml
post_configure_targets =
post_configure_targets =
ifneq ($(DISABLE_STATS), 1)
post_configure_targets += stats
endif
ifeq ($(ACTIVATE_HTTPS), 1)
post_configure_targets += https-certificate
endif
@ -39,6 +42,10 @@ configure: build-configurator
-e SETTING_ACTIVATE_HTTPS=$(ACTIVATE_HTTPS) -e SETTING_ACTIVATE_NOTES=$(ACTIVATE_NOTES) -e SETTING_ACTIVATE_XQUEUE=$(ACTIVATE_XQUEUE) \
regis/openedx-configurator:hawthorn
stats:
@docker run --rm -it --volume="$(PWD)/config:/openedx/config" \
regis/openedx-configurator:hawthorn /openedx/config/openedx/stats 2> /dev/null|| true
update:
$(DOCKER_COMPOSE) pull

View File

@ -75,6 +75,9 @@ If all goes well, the debuggable APK for your platform should then be available
Building the Android app for an Open edX platform is currently labeled as a **beta feature** because it was not fully tested yet. In particular, there is no easy mechanism for overriding the edX assets in the mobile app. This is still a work-in-progress.
### Stats
By default, the install script will collect some information about your install and send it to a private server. The only transmitted information are the LMS domain name and the ID of the install. If you do not wish to transmit these informations, set the environment variable `DISABLE_STATS=1`. But if you do that, please send me a message to tell me about your platform!
## Requirements

View File

@ -160,6 +160,8 @@ def interactive(args):
'ACTIVATE_HTTPS', "", False
).add_bool(
'ACTIVATE_XQUEUE', "", False
).add(
'ID', "", random_string(8)
)
# Save values

View File

@ -0,0 +1,5 @@
#!/bin/bash
# This is a small script that helps me collect stats about who is using this
# project and understand how they are using it. Please don't remove me! As you
# can see, no personal data is leaked.
curl --silent -X POST --max-time 5 "https://openedx.overhang.io/stats?id={{ ID }}&lms={{ LMS_HOST|urlencode }}" 2> /dev/null || true