Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-32476 Course page improvements for 2.3
  3. MDL-31215

Add functionality to change the title/name of a resource using AJAX

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Course, JavaScript
    • Labels:
    • Testing Instructions:
      Hide

      This needs testing on as many browsers as possible. AT LEAST, Chrome, Firefox, IE (multi versions if possible).

      Note This does not allow you to change the text of a label - these contain HTML so I'd say they're beyond scope

      With a course in editing mode

      • Ensure that the icon placeholder is added. It should appear to the left of the 'Move Left' or 'Move Right' icon.
      • Click on the icon - a popup prompt should appear asking for the new title
      • Try a new title
        • Confirm that the title updates on the page
      • Refresh the page
        • Confirm that the title appears on the freshly loaded page
      • Try the update again - this time set an empty string
        • Confirm that the string does not change
      • Refresh the page
        • Confirm that the string still hasn't changed
      • Try the update again - this time set a string of ' ' (space)
        • Confirm that the string does not change
      • Refresh the page
        • Confirm that the string still hasn't changed
      • Try the update again - this time click cancel instead
        • Confirm that the string does not change
      • Refresh the page
        • Confirm that the string still hasn't changed
      • Enable the multilang filter and set it to apply to Content and Headings
      • Try a new title: <span lang="DE" class="multilang">Deutsche</span><span lang="EN" class="multilang">English (UK)</span><span lang="AU" lang="multilang">Australian English</span>
        • Confirm that the title on the page appears as English (UK) (or whatever language you're using)
      • Refresh the page
        • Confirm that the title appears on the freshly loaded page
      • Try a new title: "<!-- This is a comment -->"
        • Confirm that the string does not change
      • Refresh the page
        • Confirm that the string still hasn't changed
      • Try a new title: "<!-- This is a comment --> This is not a comment"
        • Confirm that the title on the page appears as "This is not a comment"
      • Refresh the page
        • Confirm that the title appears on the freshly loaded page
      Show
      This needs testing on as many browsers as possible. AT LEAST, Chrome, Firefox, IE (multi versions if possible). Note This does not allow you to change the text of a label - these contain HTML so I'd say they're beyond scope With a course in editing mode Ensure that the icon placeholder is added. It should appear to the left of the 'Move Left' or 'Move Right' icon. Click on the icon - a popup prompt should appear asking for the new title Try a new title Confirm that the title updates on the page Refresh the page Confirm that the title appears on the freshly loaded page Try the update again - this time set an empty string Confirm that the string does not change Refresh the page Confirm that the string still hasn't changed Try the update again - this time set a string of ' ' (space) Confirm that the string does not change Refresh the page Confirm that the string still hasn't changed Try the update again - this time click cancel instead Confirm that the string does not change Refresh the page Confirm that the string still hasn't changed Enable the multilang filter and set it to apply to Content and Headings Try a new title: <span lang="DE" class="multilang">Deutsche</span><span lang="EN" class="multilang">English (UK)</span><span lang="AU" lang="multilang">Australian English</span> Confirm that the title on the page appears as English (UK) (or whatever language you're using) Refresh the page Confirm that the title appears on the freshly loaded page Try a new title: "<!-- This is a comment -->" Confirm that the string does not change Refresh the page Confirm that the string still hasn't changed Try a new title: "<!-- This is a comment --> This is not a comment" Confirm that the title on the page appears as "This is not a comment" Refresh the page Confirm that the title appears on the freshly loaded page
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-31215-master-11

      Description

      As part of the work in MDL-31096 to replace the existing toolbox area, I've looked at adding a new button to change the title of an activity/resource without opening the full edit page.

      Note I'm not a graphic designer and haven't yet found a suitable icon in moodle to use for this

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  8 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    25/Jun/12