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

Add a mustache helper to shorten text

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 3.3
    • Component/s: Libraries
    • Labels:
    • Testing Instructions:
      Hide
      1. Cherry-pick the testing commit from my test branch
        • git@github.com:ryanwyllie/moodle.git MDL-57972-master-test
        • cf243f5d6f0f7326f57315c10102e728f70ebf58
      2. go to <your_moodle_site>/test.php
      3. see all of the unit test cases for the shorten_text function rendered with PHP and with Javascript implementations of the shortentext mustache helpers
      4. All of the PHP results should match exactly to the expected output (since it's using the same function)
      5. All of the JS results should match pretty closely to the expected out (if not exactly the same). There are a few notable exceptions when handling unicode characters and very short string, e.g. The mix of Japanese characters and english letters all as one word.
      Show
      Cherry-pick the testing commit from my test branch git@github.com:ryanwyllie/moodle.git MDL-57972 -master-test cf243f5d6f0f7326f57315c10102e728f70ebf58 go to <your_moodle_site>/test.php see all of the unit test cases for the shorten_text function rendered with PHP and with Javascript implementations of the shortentext mustache helpers All of the PHP results should match exactly to the expected output (since it's using the same function) All of the JS results should match pretty closely to the expected out (if not exactly the same). There are a few notable exceptions when handling unicode characters and very short string, e.g. The mix of Japanese characters and english letters all as one word.
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Pull Master Branch:
      MDL-57972-master
    • Sprint:
      3.3 Project Team Sprint 3

      Description

      We need to add mustache helpers to shorten the course summary. At the moment we display the whole course summary, we need to short it to match the prototype.

      The mustache helper needs to be available in both JS and PHP and should work the same as the "shorten_text" function in Moodle.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ryanwyllie Ryan Wyllie
              Reporter:
              lameze Simey Lameze
              Peer reviewer:
              cameron1729
              Integrator:
              Andrew Nicols
              Tester:
              Adrian Greeve
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/May/17