Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-2822

Assignment word count doesn't handle new lines right in the app

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 3.6.0
    • Fix Version/s: 3.6.1
    • Component/s: Assignment add-on
    • Labels:
    • Testing Instructions:
      Hide

      Test on a device of your choice.

      1. Enter into an assignment with text submission and word count enabled (i.e master site > dev testing course > assignment > online text only.
      2. Add or edit the submission.
      3. In the RTE click on View code and enter the following text:
      4. <p> Word1</p><p>Word2</p>Word3<br>W<b>o</b>rd4<br/>Word5<p><ul><li>Word6</li><li>Word7</li></ul>Word8
      5. Check it correctly count the number of words (8).
      Show
      Test on a device of your choice. Enter into an assignment with text submission and word count enabled (i.e master site > dev testing course > assignment > online text only. Add or edit the submission. In the RTE click on View code and enter the following text: <p> Word1</p><p>Word2</p>Word3<br>W<b>o</b>rd4<br/>Word5<p><ul><li>Word6</li><li>Word7</li></ul>Word8 Check it correctly count the number of words (8).
    • Affected Branches:
      MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_36_STABLE
    • Pull Master Branch:
    • Sprint:
      Moodle Mobile 3.6.1

      Description

      If you separate two lines using <br>, <p> or similar, the app's word count thinks that the last word of the first line and the first word of the second line are the same word. E.g.:

      <p>This is</p><p>some text</p>

      The result will be 3 words because "is" and "some" are considered to be the same word.

      This happens in web too, but the web editor usually adds new lines when you add a new line using the visual editor so it's harder to get this problem.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                29/Mar/19

                Time Tracking

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                0m
                Logged:
                Time Not Required
                Not Specified