diff --git a/CHANGES.md b/CHANGES.md index fab580c13a9c0fe28588f4986f437f9665b3aff5..cb0f37b7b30e13fb93b6af17faa07e0a9ae72f9d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,7 @@ Changes in 6.8 - Fix #291 XSS Use URLEscape() for links href, program wide - Fix hide remove button for "No Address" in Address.inc.php - Prompt() make Cancel primary button in Prompts.php +- Fix SQL error foreign keys: Roll again Courses when rolling Marking Periods in Rollover.php Changes in 6.7.2 ---------------- diff --git a/modules/School_Setup/Rollover.php b/modules/School_Setup/Rollover.php index 4e77e6a0de65bcd931721346ddf0dbe63b0d22ce..2a0cdc2ca0e5f66aa78ce38613928749e1f2c845 100644 --- a/modules/School_Setup/Rollover.php +++ b/modules/School_Setup/Rollover.php @@ -95,6 +95,14 @@ if ( Prompt( $_REQUEST['tables']['REPORT_CARD_COMMENTS'] = 'Y'; } + if ( $_REQUEST['tables']['SCHOOL_MARKING_PERIODS'] + && $exists_RET['COURSES'][1]['COUNT'] + && ! $_REQUEST['tables']['COURSES'] ) + { + // Fix SQL error foreign keys: Roll again Courses when rolling Marking Periods. + $_REQUEST['tables']['COURSES'] = 'Y'; + } + if ( ! ( $_REQUEST['tables']['COURSES'] && ( ( ! $_REQUEST['tables']['STAFF'] && $exists_RET['STAFF'][1]['COUNT'] < 1 ) || ( ! $_REQUEST['tables']['SCHOOL_PERIODS'] && $exists_RET['SCHOOL_PERIODS'][1]['COUNT'] < 1 )