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

Feedback: Updating a label, single quotes cause save to fail

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Minor Minor
    • None
    • 1.9.13
    • Feedback
    • None
    • MySQL
    • MOODLE_19_STABLE
    • Hide

      Use double quotes instead

      Show
      Use double quotes instead
    • Hide

      In the Feedback module, edit a label and put in some single quotes:
      <my moodle base url>/mod/feedback/edit_item.php?id=277724&do_show=edit&itemid=6510&typ=label

      Click Save. You'll get this error:

      Error occurred in feedback module action handling
      Array
      (
      [0] =>
      [[item_update_failed]]
      )

      Sample label HTML:
      <div>
      <ol>
      <li>Complete
      <a href="about:blank" target="_blank">Monitoring and Evaluating Your Time Use Questionnaire</a>
      <ul style="list-style-type: square;">
      <li>Login: beginning of your e-mail (everything before the @somewhere.com part)
      </li>
      <li>Password: edd101
      </li>
      </ul>
      </li>
      <li>Find your score: in Web Questionnaire, click
      <span style="text-decoration: underline;">'View Report'
      </span> to the right of the Monitoring and Evaluating Your Time Use Questionnaire
      </li>
      <li>Open
      <span style="font-weight: bold;">Chart
      </span>
      </li>
      <li>Calculate your score by taking the "ODD" number and subtracting the "EVEN" number beside 'your score' (
      <span style="font-style: italic;">ignore "overall" score
      </span>).<br />
      <ul style="list-style-type: square;">
      </ul>
      </li>
      </ol>
      </div>

      Start digging at mod/feedback/edit_item.php:: ~line 97:
      if($updateitem){
      $newposition = optional_param('position', 0, PARAM_INT);
      //update the item and go back
      if (!feedback_update_item($item)) {
      $SESSION->feedback->errors[] = get_string('item_update_failed', 'feedback');

      Show
      In the Feedback module, edit a label and put in some single quotes: <my moodle base url>/mod/feedback/edit_item.php?id=277724&do_show=edit&itemid=6510&typ=label Click Save. You'll get this error: Error occurred in feedback module action handling Array ( [0] => [ [item_update_failed] ] ) Sample label HTML: <div> <ol> <li>Complete <a href="about:blank" target="_blank">Monitoring and Evaluating Your Time Use Questionnaire</a> <ul style="list-style-type: square;"> <li>Login: beginning of your e-mail (everything before the @somewhere.com part) </li> <li>Password: edd101 </li> </ul> </li> <li>Find your score: in Web Questionnaire, click <span style="text-decoration: underline;">'View Report' </span> to the right of the Monitoring and Evaluating Your Time Use Questionnaire </li> <li>Open <span style="font-weight: bold;">Chart </span> </li> <li>Calculate your score by taking the "ODD" number and subtracting the "EVEN" number beside 'your score' ( <span style="font-style: italic;">ignore "overall" score </span>).<br /> <ul style="list-style-type: square;"> </ul> </li> </ol> </div> Start digging at mod/feedback/edit_item.php:: ~line 97: if($updateitem){ $newposition = optional_param('position', 0, PARAM_INT); //update the item and go back if (!feedback_update_item($item)) { $SESSION->feedback->errors[] = get_string('item_update_failed', 'feedback');

      When updating a feedback module label, single quotes cause the save to fail with an error.

            grabs Andreas Grabs
            mwebster Mark van Hoek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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