Please note that current module is in the early stages of development and could be unstable or have serious issues. Please do not use it in production environment.
Ellu viidud projekti Mobilitas Pluss MOBEC001 "Piireületav haridusuuendus tehnoloogiapõhiste teadusuuringute toel" tegevuskava raames.
- Drupal 9.1 (9.2 has a few changes that would still need testing)
- PHP 7.3 or newer
- Setup Drupal 9 instance
- Go to
DRUPAL_ROOT/modules
and rungit clone git@github.com:centre-for-educational-technology/la_pills.git
- Make sure that required libraries are installed in
DRUPAL_WEB_ROOT/libraries
. Usela_pills.libraries.yml
as a source for information- d3.js in
libraries/d3
with onlyd3.min.js
being used - c3.js in
libraries/c3
with onlyc3.min.js
andc3.min.css
being used - Font Awesome in
libraries/fontawesome
, only minified versions of JS and CSS + assets are really required
- d3.js in
- Go into administration and activate the module
- Visit
structure/session_entity
for the list of available sessions and their management - It would be needed to configure the permissions in order for certain user
roles to have access to pages
- These are the currently recommended default permissions (TEACHER is an
example role that would be creating content)
- Create new LA Pills Session entities - TEACHER USER
- Edit own LA Pills Session entities - TEACHER USER
- View published LA Pills Session entities - ANONYMOUS USER
- View unpublished LA Pills Session entities - TEACHER USER
- These are the currently recommended default permissions (TEACHER is an
example role that would be creating content)
- NB! Uninstall the Internal Page Cache (page_cache) module to resolve cache issues for Anonymous users
- Manual changes
- Visit the
Basic site settings
configuration page located atadmin/config/system/site-information
and setFront page
field value to/la_pills/home
. This should replace the default home page with one specific to LaPills
- Visit the
The module is automatically loading any packaged session templates into the database. It is also possible to upload new templates later through the administration interface. Existing templates could also be removed, along with any data gathering session entities that have been based on that template.
- LA Pills Timer - a module that provides activity logging functionality to
data gathering sessions. A user with sufficient permissions could create
activities to be tracked. The ones that are currently active could be attached
to a newly created or an existing session (copies are made). Later on session
owner could use those for the activity tracking effort.
- Install the module and configure permissions
- Currently recommended permissions are (TEACHER is an example role that would
be creating content)
- Create new Timer and Timer sessions - TEACHER USER
- View active Timer and Timer sessions - TEACHER USER
- View inactive Timer and Timer sessions - TEACHER USER
- LA Pills Quick Feedback - a module that provides quick feedback functionality
to data gathering sessions. A user with sufficient permissions could create
questions and mark them as active. Active ones can be used to construct a Quick
Feedback questionnaire for an existing session, making copies of question data.
This newly added questionnaire has all the questions marked as optional and
behaves in a similar manner to others. Quick Feedback questionnaire replies are
available for download along with the rest of the data. Dashboard would also
show a visualisation for it (similar to others), yet it would only be displayed
to the teacher.
- Install module and configure permissions
- Currently recommended permissions are (TEACHER is an example role that would
be creating content)
- Create new LaPills Question Entity entities - TEACHER USER
- Create new LaPills Questionnaire Entity entities - TEACHER USER
- View published LaPills Question Entity entities - TEACHER USER
- LAPills RESTful Web Services - a module that enables REST API for LAPills
specific data. Requires OAuth to be present and configured with suitable clients
and their their settings.
- Make sure that all the dependencies are present and configured as needed
- Simple OAuth module requires League\OAuth2 to be installed. Using composer should be the most convenient way on installing the module. Please follow the installation instructions provided by the author.
- Install the module and configure permissions
- RESTful API resources would be configured automatically. Please use REST UI module if you need to make changes or check out the configuration.
- Make sure that you create an API user role that has permission to access the newly registered resources. Please make sure that correct role(s) are assigned to consumers that will be created.
- Configure the OAuth module and create Consumer(s)
- Create a special role for the API calls naming it API
- Make sure that this role is assigned all the required permissions to access the REST resources.
- Visit the Simple OAuth configuration page and expirations times and batch size. Please make sure that keys are present and stored outside the WWW root
- Create all the necessary clients as needed. Please make sure to set the default user account and and Redirect URI if you plan to use the same client for all of the API calls. It depends on the OAuth flow that would be used.
- Endpoints
/oauth/token
- used for all of the OAuth token specific communication/oauth/authorize
- used to start the OAuth user authorisation flow- TODO Document own API once it is done
- Make sure that all the dependencies are present and configured as needed
- LAPills Onboarding - a module that allows users to create User Packages that
include activities and questions that could later be user for Activity Log
and Quick Feedback functionalities. Later on those packages could either
be used when creating new user accounts or editing an existing ones. The latter
is only allowed to the users with administrator privileges. The code would
check if the user a package is being applied to has permissions to create
content types from the package and would only create those that are possible to
create. All the applied content would be marked as active and would instantly
become usable with Sessions. When editing an existing account and applying
a package any previously existing content of certain type would be marked as
inactive, provided that package has any content of that type.
- Install module and configure permissions
- Currently recommended permissions are (TEACHER is an example role that would
be creating content)
- Create new User package entities - TEACHER USER
- View published User package entities - ANONYMOUS USER
- This one is required for the preview functionality to work when new accounts are being created by users themselves
- LAPills Analytics - a simple analytics solution that captures certain usage data and allows administrators to view and download that data
Bootstrap theme is a must as large parts of the UI are based on visual elements and capabilities provided by the Bootstrap component library.
- Redirect after login as
a means of redirecting specific user role to a certain URL. Currently it is
suggested to redirect user without permission to create sessions to PIN code
entry page and the rest of the roles to session list page.
- Authenticated:
/session_entity_code
- Teacher:
/session/mine
- Admin:
/admin/structure/session_entity
- Authenticated:
- Dropdown Language as a
means of adding a language select. It does play well with
Bootstrap theme and our own codebase
has a small fix to pace it to the right and apply small UI tunes if suitable
theme is active.
- UI fix only applies if dropdown element is added to the footer of the page