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

"Column 'alwaysshowdescription' cannot be null" message when updating mod_assign settings

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.5
    • 2.5
    • Assignment
    • MOODLE_25_STABLE
    • MOODLE_25_STABLE
    • MDL-39415-master
    • Hide
      1. Create an assignment with "Always show description" NOT checked
      2. Verify you can save the form with no error and that the correct value for "Always show description" is saved
      3. Create an assignment with "Always show description" checked
      4. Verify you can save the form with no error and that the correct value for "Always show description" is saved
      5. Update an assignment with "Always show description" NOT checked
      6. Verify you can save the form with no error and that the correct value for "Always show description" is saved
      7. Update an assignment with "Always show description" checked
      8. Verify you can save the form with no error and that the correct value for "Always show description" is saved
      Show
      Create an assignment with "Always show description" NOT checked Verify you can save the form with no error and that the correct value for "Always show description" is saved Create an assignment with "Always show description" checked Verify you can save the form with no error and that the correct value for "Always show description" is saved Update an assignment with "Always show description" NOT checked Verify you can save the form with no error and that the correct value for "Always show description" is saved Update an assignment with "Always show description" checked Verify you can save the form with no error and that the correct value for "Always show description" is saved

    Description

      I got the below error while editing an assignment's settings. The assignment previously had date restrictions ie cut off date etc, i went into the settings, unticked the three check boxes in that section and hit update.f

      Debug info: Column 'alwaysshowdescription' cannot be null
      UPDATE mdl_assign SET name = ?,timemodified = ?,course = ?,intro = ?,introformat = ?,alwaysshowdescription = ?,submissiondrafts = ?,requiresubmissionstatement = ?,sendnotifications = ?,sendlatenotifications = ?,duedate = ?,cutoffdate = ?,allowsubmissionsfromdate = ?,grade = ?,completionsubmit = ?,teamsubmission = ?,requireallteammemberssubmit = ?,teamsubmissiongroupingid = ?,blindmarking = ?,attemptreopenmethod = ?,maxattempts = ? WHERE id=?
      [array (
      0 => 'file upload assignment',
      1 => 1367289740,
      2 => '2',
      3 => '<p>upload something</p>',
      4 => '1',
      5 => NULL,
      6 => '0',
      7 => '0',
      8 => '1',
      9 => '1',
      10 => 0,
      11 => 0,
      12 => 0,
      13 => '100',
      14 => 0,
      15 => '0',
      16 => '0',
      17 => '0',
      18 => '0',
      19 => 'none',
      20 => '-1',
      21 => '3',
      )]
      Error code: dmlwriteexception
      Stack trace:

      line 426 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 1195 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 1227 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->update_record_raw()
      line 862 of /mod/assign/locallib.php: call to mysqli_native_moodle_database->update_record()
      line 142 of /mod/assign/lib.php: call to assign->update_instance()
      line 473 of /course/modlib.php: call to assign_update_instance()
      line 260 of /course/modedit.php: call to update_moduleinfo()

      Output buffer: <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined property: stdClass::$alwaysshowdescription in /home/andrew/Desktop/code/moodle/int/master/mod/assign/locallib.php on line <i>840</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0024</td><td bgcolor='#eeeeec' align='right'>343632</td><td bgcolor='#eeeeec'>

      Unknown macro: {main}

      ( )</td><td title='/home/andrew/Desktop/code/moodle/int/master/course/modedit.php' bgcolor='#eeeeec'>../modedit.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.8328</td><td bgcolor='#eeeeec' align='right'>35597328</td><td bgcolor='#eeeeec'>update_moduleinfo( )</td><td title='/home/andrew/Desktop/code/moodle/int/master/course/modedit.php' bgcolor='#eeeeec'>../modedit.php<b>:</b>260</td></tr> <tr><td bgcolor='#eeeeec' align='center'>3</td><td bgcolor='#eeeeec' align='center'>0.9160</td><td bgcolor='#eeeeec' align='right'>35688784</td><td bgcolor='#eeeeec'>assign_update_instance( )</td><td title='/home/andrew/Desktop/code/moodle/int/master/course/modlib.php' bgcolor='#eeeeec'>../modlib.php<b>:</b>473</td></tr> <tr><td bgcolor='#eeeeec' align='center'>4</td><td bgcolor='#eeeeec' align='center'>0.9179</td><td bgcolor='#eeeeec' align='right'>35691560</td><td bgcolor='#eeeeec'>assign->update_instance( )</td><td title='/home/andrew/Desktop/code/moodle/int/master/mod/assign/lib.php' bgcolor='#eeeeec'>../lib.php<b>:</b>142</td></tr> </table></font>

      Attachments

        Issue Links

          Activity

            People

              damyon Damyon Wiese
              andyjdavis Andrew Davis
              Dan Poltawski Dan Poltawski
              Adrian Greeve Adrian Greeve
              Adrian Greeve, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/May/13