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

Support right to left certificates #371

Open
wants to merge 1 commit into
base: MOODLE_38_STABLE
Choose a base branch
from

Conversation

rezaies
Copy link

@rezaies rezaies commented Aug 23, 2020

No description provided.

@mdjnelson
Copy link
Owner

Excuse my ignorance but can't people using RTL languages just move the words to the right instead of the left?

@rezaies
Copy link
Author

rezaies commented Oct 13, 2020 via email

@rezaies
Copy link
Author

rezaies commented Oct 13, 2020 via email

@rezaies
Copy link
Author

rezaies commented Nov 11, 2020

Hi Mark,
I was wondering if this is still under your radar or probably forgotten :)

@mdjnelson
Copy link
Owner

Definitely has not been forgotten. It is in the list of issues I am going to do before releasing a new version. I am in the middle of moving countries and right now am working on other things to make much needed money rather than my open source projects. This should settle down once I am back in Australia.

@mdjnelson
Copy link
Owner

So, I have worked with RTL languages before. In this case I still don't see why a user can not type out the string in a RTL language and then position it accordingly. I would download the Hebrew language pack and check how this works when filling in an input field but the internet is so slow at the hotel I am being quarantined at that it fails to download. What happens on input fields, do the new characters get added to the start of the input field when you are typing? Can you please provide an example for my ignorant mind on what this setting does. Pretend you are writing testing instructions on Jira :) Also, can you address my PR comments, an ignorant person like myself will have no idea what direction means when editing the certificate. Thanks Shamim!

@rezaies
Copy link
Author

rezaies commented Dec 10, 2020

Hi Mark,
First of all, an RTL designed certificate should always remain RTL no matter what language its designer use and an LTR certificate should also remain LTR no matter what language its designer use. Being LTR or RTL is an attribute of the certificate, and should be independent of the teacher's language.

Apart from the above, here is just a case that the current code fails.

Fail case 1

  1. Log in as an admin
  2. Switch your language to an RTL language
  3. Go into a course and create a certificate activity
  4. Add a text element to the certificate and position the text at roughly 2 cm from the top of the page and 1 cm from the RIGHT of the page
  5. Save your design
  6. Click on save changes and preview
  7. Download the PDF somewhere and then open it
  8. You expect the text to be at 2cm from the top and 1cm from right, but you see that the text is 2cm from the top and 1cm from left!

@@ -58,6 +58,10 @@
$string['deletepageconfirm'] = 'Are you sure you want to delete this certificate page?';
$string['deletetemplateconfirm'] = 'Are you sure you want to delete this certificate template?';
$string['description'] = 'Description';
$string['direction'] = 'Direction';
$string['direction_help'] = 'This is the direction of the certificate PDF.';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be more descriptive. To people who are not familiar with RTL language, or vice versa this will be very confusing.

@@ -24,7 +24,7 @@

defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');

$plugin->version = 2019111804; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2020082000; // The current module version (Date: YYYYMMDDXX).
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only bump by 1 on the 3.8 branch please.

@mdjnelson mdjnelson linked an issue Apr 5, 2021 that may be closed by this pull request
@mdjnelson mdjnelson changed the title Issue #370: Support right to left certificates Support right to left certificates May 27, 2021
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

Successfully merging this pull request may close these issues.

Support right-to-left certificates
2 participants