Giter Site home page Giter Site logo

polil's People

Contributors

altimario avatar steamycutie avatar vinail avatar

polil's Issues

Improve and update the documentation

There are some issues with the documentation on how to set up the environment and run it due to the latest change in the tools we built.

Quick notes took

  • clarify on cardano-connect the sample.env file has to be renamed into .env
  • clarify that the TRAX credentials are set by the admin during the installation (email/pwd) and it will be required on the web login
  • clarify that after TRAX login need to create the client for the connection (and point on it without credentials generates error 404)
  • clarify that installing Logstore xAPI from https://moodle.org/plugins/logstore_xapi is wrong, has to be installed in our modified version
  • to help more, suggest this link to follow https://extended.traxlrs.com/docs/2.0/first-steps
  • idNumber is a praram "Identify users by user's idnumber"
  • clarify that the command "php artisan trax:push2ipfs" is required every time there is a sync db-chain unless it is set in a cron
  • clarify that the param REACT_APP_TX_RECEIVER is the address where the user's ADA will be sent

Decide what LRS to use

This is the list of the LRS analysed:
https://traxlrs.com/ (push service not free)
https://docs.learninglocker.net/welcome/ (push service not free)
https://github.com/adlnet/ADL_LRS (push service to investigate)
www.sqllrs.com (push service to investigate)

Need to decide which one to choose

I researched about 4 LRS Servers.
First I started from SQL LRS.
It was great but it is not support async function.
So I ruled it out.
And I researched about ALD LRS.
It was good for us.
Then I researched about the Trax.
It is also good for us.
But it is developed by PHP.
As you know Python is much better than PHP.
So, I selected the Python.

These are ALD LRS's advantages.
• Storing and retrieving statements
• Intended as poof of concept
• Python interface
• Postgres DB
• standalone
• FREE!

Moodle login via Cardano wallet

We need a tool to authenticate Moodle users via a Cardano wallet without credentials.

Encrypt via MD5 the user's Cardano wallet address and make it the unique ID in Moodle. This is because the ID has to be shared safely to prevent revealing the Cardano user behind the moodle learner.

For example, an address like this addr1x8dgthgc5tgk9v70jzaesgsexs92yhqfq39gy5vnzyuvssw6shw33gk3v2euly9mnq3pjdq25fwqjpz2sfgexyfcepqsn3r7pu generates the moodle user ID like this 4dece4f7431e625b36ce27a4a09727a2 (collisions are rare and isolated per moodle server instance).

setup LMS and course

Use a compatible LMS (or install it locally) and run an xAPI course (found one available for free).
Configure the LMS to store the xAPI in our SQLRS and intercept/store all the xAPI transactions of a user journey.

Proof of lifelong learning (Polil) App connection page

We want to have a landing/connection page for polil, where the Cardano user uses his wallet to login into the main app and access his learning path stored on-chain.
This is a very minimal implementation, mainly using the code from the moodle-cardano plugin already done.
Later we can make it pretty.

image

moodle-cardano better template

We did this simple SPA to show how simply moodle can be connected with a Cardano wallet
https://github.com/e-Learning-DAO/moodle-cardano-connect
However, the template comes from a starter-kit we want to modify to fit our scope.

  • rename the title to "Moodle Cardano connection"
  • move the logo (and starter-kit info) to the right-bottom of the page
  • substitute the current colours (blu-ish) with the moodle template colours (from here https://moodle.org)
  • don't open any popup
  • show the URL and make it clickable (that opens a new page)

image

xAPI interceptor - Components to setup

  • Setup an LRS server in AWS 🟩 DONE
  • Setup an LMS server in AWS 🟩 DONE
  • Setup the LMS plugin to send transactions as xAPI statements 🟩 DONE
  • Setup a web application server + DB, this will have the code that reads statements from the LRS and store their UUID in the DB 🟩 DONE
  • Create a custom xAPI HTML package (xAPI course) that sends some statements for testing (or found something already available online) 🟩 DONE
  • Document the steps 🟩 DONE

Diagram of the components:
https://raw.githubusercontent.com/AltiMario/PoLiL/main/resources/xapi-interception.png 🟩 DONE (implemented in a slightly different way, by customizing the LRS)

Related sub-tasks:

  • #6
  • #8 🟥 Abandoned
  • #9 🟩 DONE
  • #16 🟩 DONE

Customise the Learning Record Store to save statements ID in Cardano

Let's recap the goal of the project to better understand this task.
The scope of the project is to give the students ownership of their learning data.
The learning data will be "stored" globally in Cardano blockchain to avoid centralisation and give learners data ownership.
The learning data is xAPI statements collected through an LRS.

Problems:
1- we cannot fully store the statements in the blockchain, but we can store a unique ID (statement_ID) in a transaction (in the metadata of the transaction) that links to the xAPI statement (inside the LRS).
The solution is storing in IPFS: statement_ID + statement_xAPI and in the Cardano blockchain the IPFS link as metadata value of a transaction between the "LRS wallet" and the user wallet

2- Our moodle-cardano connector does not store the user wallet and user email, both values are mandatory for xAPI statements and blockchain transactions.
The solution is to modify the plugin and ask the user to fill in these data if not yet available in the moodle user profile. The first time, the data will be stored in the local browser storage, when manually logout and with a new login, the plugin will query moodle and if necessary ask to input the data again.

3- LRS does not send data elsewhere other than locally (and for sure not in a blockchain)
The solution is to take an easy LRS and modify it.

Scope of this task
We want to modify TRAX LRS (the last version 2) in order to store the xAPI statements_ID in the blockchain, but also to have an LRS-wallet_address.
moodle-cardano plugin needs to be modified to ask for user email and user-wallet_address.

Workflow:
1- Cardano users will log in to moodle via our new moodle-cardano plugin.
2- Moodle tracks the activities via the xAPI plugin (that need to be installed)
3- The xAPI plugin stores the statements into Trax LRS (modified)
4- Our modified Trax
4.1- generates hashes of statements (statement_ID)
4.2- stores statement_ID and statement_xAPI in IPFS
4.3- stores statement_ID in Cardano via ADA transaction from LRS-wallet_address to user-wallet_address

Supporting links:

managing wallet errors

Errors coming from the wallet connection are not managed. We need an area to show the user what's wrong.

wallet-error-management

I don't get the meaning of this info, plus the link is broken.

wrong-clickable-info

xAPI interceptor - implementation

To recap what we did until now
xapi-interception-steps
-1, -2, and -3 are done.
-4 and -5 are the goals of this ticket.
Now that the statements are correctly stored in our LRS we have to intercept/get them and generate a hash (better if SHA256) for every single statement (or a bunch of them).
For example, this xAPI statement of MCQ: is
"object": { "id": "http://iMN2Cp-biyUt-jvXp_Ecw2A5z-SfiY9V_rise/RpCLjWOYobK8Fi2p7ZZr_NDLlE9ei8rt/cjz7jfvyd002y3h5y51r4rrtg_1658239762358", "objectType": "Activity", "definition": { "type": "http://adlnet.gov/expapi/activities/cmi.interaction", "name": { "und": "Did you know that you can add images to your questions? After adding a question, simply click the camera icon. " }, "description": { "und": "Did you know that you can add images to your questions? After adding a question, simply click the camera icon. " }, "interactionType": "choice", "correctResponsesPattern": [ "cjz7jfvye002z3h5ymcx3exy8" ], "choices": [ { "id": "cjz7jfvye002z3h5ymcx3exy8", "description": { "und": "Choice 1" } }, { "id": "cjz7jfvye00303h5yfekkhzb7", "description": { "und": "Choice 2" } }, { "id": "cjza807kk003g3h635zjvg69v", "description": { "und": "Choice 3" } }, { "id": "cjza8095b003h3h63dltfuyf4", "description": { "und": "Choice 4" } } ] } },
will be transformed via SHA256 into
bdb0db3636c43f3093b25ba14ab050e669876be05327deb82de8b5d38b9283ea
Therefore, the unique hashes generated will be temporarily stored in a log or DB. I mentioned temporarily because, at another development stage, these hashes will be stored on-chain and associated with the learner.

There are 3 ways to intercept the statements:
-via LRS push (but it seems to me the SQLRS we use doesn't support it)
-via LRS pull (it is possible to read SQLRS DB or API in a corn way, every X minute)
-via forwarding through LRSpipe (https://www.sqllrs.com/lrspipe).
I don't know yet if LRSpipe is sync or async and if it does LRS to LRS only but it could be configurable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.