Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-45301

Add font option in EditPDF configuration

    XMLWordPrintable

Details

    • MOODLE_26_STABLE, MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_32_STABLE, MOODLE_39_STABLE
    • MDL-45301_master
    • Hide

      Functionality test

      1. Add font setting in config.php `$CFG->pdfexportfont = ['freesans' => 'freesans', 'kozminproregular' => 'kozminproregular'];`
      2. Create a course and set "PDF export font" with "freesans".
      3. Create an Assignment activity and set "Submission types" with "File submissions".
      4. Login as a student and submit a PDF file for the assignment activity.
      5. Login as a teacher and choose "View all submissions" for the assignment activity.
      6. Click "Grade" button for the student to show grading page.
      7. Add a comment in Japanese "テストの注釈1" using annotation tool.
      8. Click "Save changes"
      9. Click a file from "Download feedback PDF" to download the annotated PDF file.
      10. Confirm the comment in the last page of downloaded PDF is NOT same as what input "テストの注釈1".
      11. Go to the course setting page and set "PDF export font" from "freesans" to "kozminproregular".
      12. Go grading page again, and add another comment with "テストの注釈2"
      13. Click "Save changes" and download the file from "Download feedback PDF".
      14. Confirm the comment in the last page of downloaded PDF is same as what input "テストの注釈2".

      Backup/restore test

      1. Backup the course which is used in functionality test.
      2. Restore the course and confirm the setting of "PDF export font" is "kozminproregular".
      Show
      Functionality test Add font setting in config.php `$CFG->pdfexportfont = ['freesans' => 'freesans', 'kozminproregular' => 'kozminproregular'] ;` Create a course and set "PDF export font" with "freesans". Create an Assignment activity and set "Submission types" with "File submissions". Login as a student and submit a PDF file for the assignment activity. Login as a teacher and choose "View all submissions" for the assignment activity. Click "Grade" button for the student to show grading page. Add a comment in Japanese "テストの注釈1" using annotation tool. Click "Save changes" Click a file from "Download feedback PDF" to download the annotated PDF file. Confirm the comment in the last page of downloaded PDF is NOT same as what input "テストの注釈1". Go to the course setting page and set "PDF export font" from "freesans" to "kozminproregular". Go grading page again, and add another comment with "テストの注釈2" Click "Save changes" and download the file from "Download feedback PDF". Confirm the comment in the last page of downloaded PDF is same as what input "テストの注釈2". Backup/restore test Backup the course which is used in functionality test. Restore the course and confirm the setting of "PDF export font" is "kozminproregular".

    Description

      Using multi-byte string like Japanese, EditPDF editor page display properly (fig1). But download annotated PDF are not properly (fig2).
      $this->SetFont() method in mod/feedback/editpdf/classes/pdf.php cause this problem. When I change font to 'kozgopromedium', problem is resolved (fig3).

      So please add font option in EditPDF configuration.

      Attachments

        1. fig1.png
          fig1.png
          28 kB
        2. fig2.png
          fig2.png
          11 kB
        3. fig3.png
          fig3.png
          12 kB
        4. Organic Agriculture.pdf
          211 kB
        5. pdfexportfont_coursesetting.png
          pdfexportfont_coursesetting.png
          32 kB

        Issue Links

          Activity

            People

              tomotsuyuki Tomo Tsuyuki
              papillon326 Mitsuru Udagawa
              cameron1729 cameron1729
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Adrian Greeve, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              14 Vote for this issue
              Watchers:
              28 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 50 minutes
                  50m