Closed philipsiwinski closed 2 years ago
Hi @philipsiwinski
What do you see if you try it without the progress bar? Try it with just the {profile_field_progressvalue1} tag to see what is happening to the value.
Thanks a lot for the answer @michael-milette. Without the progress bar, I always see the value (0.5 for example). I noticed that the progress bar disappears in the mobile app only after visiting the dashboard from the browser. I added the code to a block on the default dashboard. When I press the "Reset Dashboard for all users", the progress bar appears again on mobile until I visit again the dashboard in the browser. I test that on Moodle 4.0.
Please find the whole html code I added to a text/html block in the default dashboard:
{ifnotmobile}<div class="progress">
<div class="progress-bar" role="progressbar" style="width: {profile_field_progresspercentage1}%;" aria-valuenow="{profile_field_progresspercentage1}" aria-valuemin="0" aria-valuemax="100">{profile_field_progresspercentage1}%</div>
</div>{/ifnotmobile}
{ifmobile}{profile_field_progressvalue1}<ion-progress-bar value="{profile_field_progressvalue1}"></ion-progress-bar>{/ifmobile}
Hi @philipsiwinski ,
I am not sure about the mobile app however, for the browser-based version, if 0.5 is supposed to represent 50%, you need to find a way to change that number to 50 instead of 0,5. At 0.5 out of 100 (0.5%), the progress bar would appear empty.
Hi @michael-milette, yes I use both 0.5 and 50 values in two different profile fields. I made a test without the filtercodes tags and I have exactly the same issue so it's not related to the filtercodes plugin. When the dashboard is display in the browser, the ionic progress bar disappears in the mobile app. I will investigate this issue but I guess we can close it here. Thanks a lot for the help :)
You're welcome. Thanks for the feedback, Hope you figure it out quickly.
Best regards,
Michael
Hi @michael-milette, I tried to display a progress bar in a dashboard block in the Moodle mobile app.
The tags
{ifmobile}{/ifmobile}
and{ifnotmobile}{/ifnotmobile}
help a lot. Currently, a tag such as{ifmobile}<ion-progress-bar value="{profile_field_progressvalue1}"></ion-progress-bar>{/ifmobile}
works but when the value of the custom profile field changes, the progress bar does not appear anymore in the mobile app. It's like the value of the profile field gets stripped out.What do you think?
Thank you