Custom plugin for Moodle App

Custom plugin for Moodle App

על ידי Jimmy Samalenge בתאריך
מספר תגובות: 3

Good day, I have developed a custom plugin for Moodle App which is successfully displaying on the App but I have 2 challenges:

  1. My anchor tags display properly but do not respond when clicked: 
    I have <%={{ }}=%> at the top
    the template as per Moodle custom plugin documentation.
    1. I have used 
      <ion-row>
      <ion-col>
      <a href="<% link %>" target="_blank">
      Click to pay <% code %> account
      </a>
      </ion-col>
      </ion-row>

      even <ion-row>
      <ion-col>
      <ion-button href="<% link %>" target="_blank">
      Click to pay <% code %> account
      </ion-button>
      </ion-col>
      </ion-row>
      They both display nicely, including the text with the actual value of <% code %>, but when I click on them, I get no response.
  2. I am unable to pass values using the following:
    1. <p [innerHTML]=" 'plugin.local_studentspayment.fees' | translate: {$a: <% fullname %> "></p>. The string is being translated
      successfully including the innerHTML, but the value of full name is not being passed to the string. The string = $string['fees'] = 'Dear {$a}, your account has been suspended due to fees owing. Should you want to
      make a payment reinstate your account, please click on the link below. If you have an account query, please email
      <a href="mailto:example@gmail.net">example@gmail.net</a>.'

      I get : 'Dear {{$a}}, your account has been suspended due to fees owing. Should you want to make
      a payment reinstate your account, please click on the link below. If you have an account query,
      please email example@gmail.net.'


ממוצע דרוגים: -
בתגובה ל: Jimmy Samalenge

Re: Custom plugin for Moodle App

על ידי Jimmy Samalenge בתאריך
Anyone to assist me please? I need to find a solution ASAP.
בתגובה ל: Jimmy Samalenge

Re: Custom plugin for Moodle App

על ידי Marcus Green בתאריך
תמונה של Core developers תמונה של Particularly helpful Moodlers תמונה של Plugin developers תמונה של Testers
You will need to provide more information, how are you testing this? I recently adapted a Moodle plugin to run on the mobile app and used special version of chrom/ium (?) and this location
https://main.apps.moodledemo.net/
So I could see what was output to the browser console.
בתגובה ל: Marcus Green

Re: Custom plugin for Moodle App

על ידי Jimmy Samalenge בתאריך

Hi Marcus, Thank you for replying to my post.

I have the App installed on both an iOS and Android phones. The plugin pulls through successfully. All other features display properly except for the anchor tags are not responding and the parameter value not being translated.

When I use chromium, I am unable to load the Moodle App. I get the message below. But the same website link works perfectly when I use my Android or iOS devices.

image.png

The image below is how the plugin shows on a mobile phone. The circled links are displaying the correct values (dynamic values), but when clicked there is no response.
WhatsApp%20Image%202024-07-01%20at%2009.40.49_2b34ce0e.jpg