My Analytics Dashboard is an alternative project of the Apereo OpenDashboard application. It is made for University of Lorraine and the ESUP-Portail consortium.
MAD is an efficient CASified application that provide visualizations and data for professors and students about their Learning Analytics.
- CAS Authentication
- GDPR compliant
- LDAP Access
- Roles (admin, professor and student)
- Admin tools
- Multilingual
- Modern Design
- Responsive-Design
- Dynamic Charts
- Apache or Nginx
- OpenLRW
- PHP β©Ύ 7.1
- PHP modules:
- LDAP module
- Back-End:
- Front-End:
$ git clone https://github.com/xchopin/my-analytics-dashboard
$ composer install
You will have to give write permissions to the var/cache/
and var/logs/
folders
Example given
$ chown -R someuser:somegroup var/cache var/logs
$ cp .env.dist .env ; nano .env
Example of a Virtual Host:
<VirtualHost *:80>
ServerAdmin foo.bar.com
ServerName foo.bar.com
ServerAlias www.foo.bar.com
DocumentRoot /Library/WebServer/www/mad/public
<Directory /Library/WebServer/www/mad/public>
AllowOverride None
Order Allow,Deny
Allow from All
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
</Directory>
# optionally disable the RewriteEngine for the asset directories
# which will allow apache to simply reply with a 404 when files are
# not found instead of passing the request into the full symfony stack
<Directory /Library/WebServer/www/mad/public/bundles>
<IfModule mod_rewrite.c>
RewriteEngine Off
</IfModule>
</Directory>
ErrorLog "/private/var/log/apache2/mad-error_log"
CustomLog "/private/var/log/apache2/mad-access_log" combined
</VirtualHost>
server {
server_name domain.tld www.domain.tld;
root /var/www/project/public;
location / {
# try to serve file directly, fallback to index.php
try_files $uri /index.php$is_args$args;
}
location ~ ^/index\.php(/|$) {
fastcgi_pass unix:/var/run/php7.2-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
# When you are using symlinks to link the document root to the
# current version of your application, you should pass the real
# application path instead of the path to the symlink to PHP
# FPM.
# Otherwise, PHP's OPcache may not properly detect changes to
# your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
# for more information).
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
# Prevents URIs that include the front controller. This will 404:
# http://domain.tld/index.php/some-path
# Remove the internal directive to allow URIs like this
internal;
}
# return 404 for all other php files not matching the front controller
# this prevents access to other php files you don't want to be accessible.
location ~ \.php$ {
return 404;
}
error_log /var/log/nginx/project_error.log;
access_log /var/log/nginx/project_access.log;
}
For a faster loading you have to add the MongoDB indices written in the OpenLRW documentation. Enable OPCache and APCu for better cache performances.
Go to the translations/
directory then copy the en.json
file in order to use it as a template. Once you translated into the desired language, you have to save the file by only using the alpha-2 of the language (eg: de.json
for a German translation).
That's it! the application is smart enough for adding it by itself to your navbar menu.
In order to use the included dashboards you need to have the following structure for the Risk data collection
{
"_id" : "533332b21c83439383278409cc46d27c",
"orgId" : "62313a4d-f633-4be1-94b0-863067302671",
"tenantId" : "5888c16a53f86dab4261523d",
"userSourcedId" : "foobar",
"classSourcedId" : "28138",
"dateTime" : ISODate("2019-10-14T00:00:00.000+0000"),
"timeZoneOffset" : NumberLong(3600),
"active" : true,
"metadata" : {
"consultedResources" : "33/35",
"activeDays" : "28/52",
"clicksCount" : "220/356",
"submittedWorkWeight" : "0.31",
"activitiesResultsWeight" : "0.56",
"forumViews" : "1/2",
"activitiesResults" : "9.81/10.0",
"global18" : "14/100",
"consultedResourcesWeight" : "0.28",
"forumViewsWeight" : "0.37",
"activeDaysWeight" : "0.32",
"global12" : "52/100",
"clicksCountWeight" : "0.13",
"global10" : "14.3/100",
"global16" : "33/100",
"submittedWork" : "8/9",
"global14" : "49/100"
},
"_class" : "org.apereo.openlrw.risk.MongoRisk"
}
globalX
attributes represent the score of a student for the value X. Other attributes are indicators for the pie chart. All the attributes with Weight
as a suffix are the visual 'weight' (width) of an indicator (reminder: a full chart is 2pi, the application will adjust automatically if it's less than this value).
You will have to edit the full ClassController.php
in order to create the own logic of your dashboards. For the front-end part, it is managed in templates/User/Student/Class/*.twig
and templates/User/Professor/class.twig
.