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

Assignment Submission agreement not translated to local language

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.7, 2.5.3, 2.6.6, 2.7.3, 2.8
    • Fix Version/s: 2.7.4, 2.8.2
    • Component/s: Assignment
    • Labels:
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Workaround:
      Show
      Apply https://github.com/scyrma/moodle/compare/moodle:MOODLE_28_STABLE...MDL-43628_v28
    • Testing Instructions:
      Hide
      • Enable French and English languages on a site
      • Activate multilang filter
      • Go to /admin/settings.php?section=modsettingassign
      • Activate requiresubmissionstatement
      • Add the following text to submissionstatement :
        <span lang="en" class="multilang">This assignment is my own work, except where I have acknowledged the use of the works of other people.</span>
        <span lang="fr" class="multilang">Ce devoir est le fruit de mon travail personnel, sauf aux endroits où l'utilisation d'oeuvre d'autres auteurs est clairement indiquée.</span>
      • Create an assignment and require the submission statement. Do not require that users press Submit
      • As a user, login and view the assignment. Choose to 'Add submission'
        • Confirm that the submision statement is shown in the current language only
      • Create a new assignment requiring the submission statement. Require that users press Submit
      • As a user, login and view the assignment. Choose to 'Add submission'
      • Upload your file and click continue
      • Click the Submit button
        • Confirm that the submision statement is shown in the current language only
      Show
      Enable French and English languages on a site Activate multilang filter Go to /admin/settings.php?section=modsettingassign Activate requiresubmissionstatement Add the following text to submissionstatement : <span lang="en" class="multilang">This assignment is my own work, except where I have acknowledged the use of the works of other people.</span> <span lang="fr" class="multilang">Ce devoir est le fruit de mon travail personnel, sauf aux endroits où l'utilisation d'oeuvre d'autres auteurs est clairement indiquée.</span> Create an assignment and require the submission statement. Do not require that users press Submit As a user, login and view the assignment. Choose to 'Add submission' Confirm that the submision statement is shown in the current language only Create a new assignment requiring the submission statement. Require that users press Submit As a user, login and view the assignment. Choose to 'Add submission' Upload your file and click continue Click the Submit button Confirm that the submision statement is shown in the current language only

      Description

      When Submission agreement option is enabled, user see Submission agreement text in English but not in the default local language.
      It looks like form element use $submissionstatement variable instead of get_string('submissionstatementdefault','mod_assign').
      When I changed string in file <moodle_home>/mod/assing/locallib.php from
      $mform->addElement('checkbox', 'submissionstatement', '', ' ' . $submissionstatement);
      to
      $mform->addElement('checkbox', 'submissionstatement', '', get_string('submissionstatementdefault','mod_assign'));
      everything start working good.
      Also <moodle_home>/mod/assing/submissionconfirmform.php file has similar string.
      Perhaps there are different places where $submissionstatement used instead of get_string() with text from language file.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              scyrma Mathieu Petit-Clair
              Reporter:
              chillofoctober Eugene Shwab
              Peer reviewer:
              Simey Lameze Simey Lameze
              Integrator:
              Sam Hemelryk Sam Hemelryk
              Tester:
              Andrew Lyons Andrew Lyons
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/Jan/15