src/UI/SettingsForm.php
public static function handleSettingsPost() {
        global $USER;
        if ( ! $USER ) return false;

        if ( isset($_POST['settings_internal_post']) && $USER->instructor ) {
            $newsettings = array();
            foreach ( $_POST as $k => $v ) {
                if ( $k == session_name() ) continue;
                if ( $k == 'settings_internal_post' ) continue;
                if ( strpos('_ignore',$k) > 0 ) continue;
                $newsettings[$k] = $v;
            }

            // Merge these with the existing settings
            Settings::linkUpdate($newsettings);
            return true;
        }
        return false;
    }
public static function handleSettingsPost() {
        global $USER;
        if ( ! $USER ) return false;

        if ( isset($_POST['settings_internal_post']) && $USER->instructor ) {
            $newsettings = array();
            foreach ( $_POST as $k => $v ) {
                if ( $k == session_name() ) continue;
                if ( $k == 'settings_internal_post' ) continue;
                if ( strpos('_ignore',$k) > 0 ) continue;
                $newsettings[$k] = $v;
            }

            // Merge these with the existing settings
            Settings::linkUpdate($newsettings);
            return true;
        }
        return false;
    }
public static function handleSettingsPost ( ) { global $ USER ; if ( ! $ USER ) return false ; if ( isset ( $ _POST [ 'settings_internal_post' ] ) && $ USER -> instructor ) { $ newsettings = array ( ) ; foreach ( $ _POST as $ k => $ v ) { if ( $ k == session_name ( ) ) continue ; if ( $ k == 'settings_internal_post' ) continue ; if ( strpos ( '_ignore' , $ k ) > 0 ) continue ; $ newsettings [ $ k ] = $ v ; } // Merge these with the existing settings Settings :: linkUpdate ( $ newsettings ) ; return true ; } return false ; }
Handle incoming settings post data

@return boolean Returns true if there were settings to handle and false
if there was nothing done.  Generally the calling tool will redirect
when true is returned.

if ( SettingsForm::handleSettingsPost() ) {
header( 'Location: '.U::addSession('index.php?howdysuppress=1') ) ;
return;
}
Handle incoming settings post data