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

Quiz and Question bank: Display of HTML entity encode in Category and question names

XMLWordPrintable

    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MDL-76550_401
    • Hide

      Testing needs to be done with both category names and Question names having HTML entities in them.

      Steps for testing Questions > category names:

      1. Login to a course
      2. Navigate to Question bank > Categories
      3. Click on Add category. Enter category name as 'Moodle & testing'
      4. Save changes

      Expected result: The category name should be displayed without encoded HTML entities.

      Steps for testing Quiz > Add a random question:

      1. Login to a course
      2. Navigate to Question bank > Questions
      3. Create a new True/False question in above category (e.g., 'Moodle & testing') with question name as 'T & F'.
      4. Turn editing mode on and create a quiz.
      5. Click on 'Add question' > add a random question
      6. Choose category 'Moodle & testing'

      Expected result: Verify that the question name is displayed without encoded HTML entities.

      Show
      Testing needs to be done with both category names and Question names having HTML entities in them. Steps for testing Questions > category names: 1. Login to a course 2. Navigate to Question bank > Categories 3. Click on Add category. Enter category name as 'Moodle & testing' 4. Save changes Expected result: The category name should be displayed without encoded HTML entities. Steps for testing Quiz > Add a random question: 1. Login to a course 2. Navigate to Question bank > Questions 3. Create a new True/False question in above category (e.g., 'Moodle & testing') with question name as 'T & F'. 4. Turn editing mode on and create a quiz. 5. Click on 'Add question' > add a random question 6. Choose category 'Moodle & testing' Expected result: Verify that the question name is displayed without encoded HTML entities.

      When we create a new category/question with HTML entity, they are not encoded.

      Steps:

      • Login to a course 
      • Navigate to Question bank > Categories
      • Click on Add category. Enter category name as 'Moodle & testing'
      • Save changes

      Observe that category name is displayed with HTML entity (&) character name

       

      Also, similar thing is observed when we create a quiz and click on Add to add a random question. The question names are displayed with HTML entity

      Steps:

      • Login to a course 
      • Navigate to Question bank > Questions
      • Create a new True/False question in above category (e.g., 'Moodle & testing') with question name as 'T & F'.
      • Turn editing mode on and create a quiz.
      • Click on 'Add question' > add a random question
      • Choose category 'Moodle & testing'

      Observe that the question name is displayed with HTML entity (&) character name
       

       

            Anupama Sarjoshi Anupama Sarjoshi
            Anupama Sarjoshi Anupama Sarjoshi
            Mahmoud Kassaei Mahmoud Kassaei
            Andrew Lyons Andrew Lyons
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 6 minutes
                1h 6m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.