How to add a new QR Code function to Moodle Mobile (written in Javascript)

How to add a new QR Code function to Moodle Mobile (written in Javascript)

by Ting Yi Tee -
Number of replies: 1

Hi, I am tasked with adding a QR code generating feature to Moodle Mobile. But I have no idea where to start as I have never worked with Javascript before.

The below image shows a quick sketch of how I want the mobile app to look like (the image is captured from PC Firefox)

In this case I want to:
1. Add a "QR Code" button to the menu bar.
2. When clicked, will take the user to a QR Code "Page" in which the user can enter a string then see the corresponding QR code generated immediately.

I have already done the QR code segment which is by davidshimjs (http://davidshimjs.github.io/qrcodejs/)

I tried inspecting elements using Firefox but I cannot find where do I "add a button" to the menu bar, not to mention where do I add a new "page" to the app. So I would like to know how do I integrate the QR code functionality into the Moodle app? Do I need to create a new plugin and how do I do that?

Your help is much appreciated. smile


A sketch of how my planned app should look like

Average of ratings: -
In reply to Ting Yi Tee

Re: How to add a new QR Code function to Moodle Mobile (written in Javascript)

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi,

first you need to get familiar with Javascript and then learn some AngularJS and read carefully https://docs.moodle.org/dev/Moodle_Mobile and review the app code

We are working in a feature for adding custom links in the side menu in the Moodle site settings, if you can wait to Moodle 3.3 you will be able to add a link to a html or php page hosted in your site with the QR code generator instead creating a plugin for the app that will be not easy to do.

Juan