Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moodle 4.0 | PHP 7.4 Strange behavior when building a template #500

Closed
gemguardian opened this issue May 27, 2022 · 11 comments
Closed

Moodle 4.0 | PHP 7.4 Strange behavior when building a template #500

gemguardian opened this issue May 27, 2022 · 11 comments

Comments

@gemguardian
Copy link

Hi Mark,
i having an issue while building a template with a background image.
For some reasons the background image is moving "out" of the field while adding new elements to the template.

I have created a video to show you what happens. I am thinking it is a css class that is not acting as it should but I am not sure.
https://vimeo.com/714380853

Hope you can solve this puzzle for me.
Thank you
Gemma

@Sunoyon
Copy link

Sunoyon commented Jul 5, 2022

I am facing similar issue for version 4.0. Can anyone be kind enough to solve this issue?

@alihamas575
Copy link

alihamas575 commented Sep 3, 2022

I have the same problem, I supported the subject with images #513 to explain a little more in detail. However, although the same problem has been opened before, the solution is still not found, which scared me a little.

Obviously I use this plugin very often, I need to solve this problem,

I am running an education service temel isg eğitimi that is legally compulsory in the laws of the country through my website. Our businesses with the definition of bursa osgb Companies are established and managed with an official document called OHS Services regulation.

@mdjnelson
Copy link
Owner

Linking #513 to this.

@alihamas575
Copy link

Hello @mdjnelson , will there be an update on this topic? I don't know exactly how it works in moodle developer part. Isn't there any voluntary development here? Do you stop development because you stopped working at moodle? There are many people who need help with this, just like me. Can you help us?

@mdjnelson
Copy link
Owner

I am hoping someone will contribute from the community. I am no longer involved in Moodle work (I was a Moodle developer for 12 years) and work on newer technologies now. Frankly, after normal work hours I do not feel the desire to come home and do more programming. :) I am not sure how big of a fix this is - whether it's a simple CSS issue or a complete JS rewrite. I'll see if I can at least investigate at some time.

@baris83
Copy link

baris83 commented Nov 29, 2022

Found out that in boost theme the tiny scrollbar on the right of the page causing the problem. I've added a line of css code and now working as expected.

#page-mod-customcert-rearrange #page.drawers { overflow-y: initial; }

@alihamas575
Copy link

Hello Mr. Barış,
how did you solve this problem did you do a manual update?

Or is this problem fixed in the new update of moodle?

@baris83
Copy link

baris83 commented Nov 29, 2022

Oh sorry, i've a custom child theme based on boost theme, but you can also add that css line to "Site administration > Appearance > Additional HTML" "Within HEAD" section. But this time wrap it with style tag as shown below. Remember to purge cache after adding that line. Hope this helps
<style>#page-mod-customcert-rearrange #page.drawers { overflow-y: initial; }</style>

@abautu
Copy link
Contributor

abautu commented Dec 4, 2022

Oh sorry, i've a custom child theme based on boost theme, but you can also add that css line to "Site administration > Appearance > Additional HTML" "Within HEAD" section. But this time wrap it with style tag as shown below. Remember to purge cache after adding that line. Hope this helps <style>#page-mod-customcert-rearrange #page.drawers { overflow-y: initial; }</style>

This did not work for me.

@abautu
Copy link
Contributor

abautu commented Dec 4, 2022

I found the problem to be created by the two issues:

  • JS code caches the X,Y coordinated of the #pdf element; however sometimes the coordinates of the #pdf element change (for example, when user closes some notification), but the JS is not updated; Since the certificate elements (including background) are positioned absoluted, they will overlap other parts of the page.
  • The YUI getX, getY function return different values when scrolling the page.

You can see these issues here: https://user-images.githubusercontent.com/4072355/205483443-c8a2c7a4-3434-4767-8987-ccd8dc9bcde0.mp4

This patch is included in the linked pull request.

I tested this in Moodle 4.0.5 and with this fix everything work correct (ref #495).

abautu added a commit to abautu/moodle-mod_customcert that referenced this issue Dec 4, 2022
@mdjnelson
Copy link
Owner

Pulled in @abautu patch and pushed, releasing in plugins DB now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants