original_string: public function data_preprocessing(&$defaultvalues) {
          if ($this->current->instance) {
              $draftitemid = file_get_submitted_draft_itemid('page');
              $defaultvalues['page']['format'] = $defaultvalues['contentformat'];
              $defaultvalues['page']['text']   = file_prepare_draft_area($draftitemid, $this->context->id, 'mod_page',
                      'content', 0, page_get_editor_options($this->context), $defaultvalues['content']);
              $defaultvalues['page']['itemid'] = $draftitemid;
          }
          if (!empty($defaultvalues['displayoptions'])) {
              $displayoptions = unserialize($defaultvalues['displayoptions']);
              if (isset($displayoptions['printintro'])) {
                  $defaultvalues['printintro'] = $displayoptions['printintro'];
              }
              if (isset($displayoptions['printheading'])) {
                  $defaultvalues['printheading'] = $displayoptions['printheading'];
              }
              if (isset($displayoptions['printlastmodified'])) {
                  $defaultvalues['printlastmodified'] = $displayoptions['printlastmodified'];
              }
              if (!empty($displayoptions['popupwidth'])) {
                  $defaultvalues['popupwidth'] = $displayoptions['popupwidth'];
              }
              if (!empty($displayoptions['popupheight'])) {
                  $defaultvalues['popupheight'] = $displayoptions['popupheight'];
              }
          }
      }
code: public function data_preprocessing(&$defaultvalues) {
          if ($this->current->instance) {
              $draftitemid = file_get_submitted_draft_itemid('page');
              $defaultvalues['page']['format'] = $defaultvalues['contentformat'];
              $defaultvalues['page']['text']   = file_prepare_draft_area($draftitemid, $this->context->id, 'mod_page',
                      'content', 0, page_get_editor_options($this->context), $defaultvalues['content']);
              $defaultvalues['page']['itemid'] = $draftitemid;
          }
          if (!empty($defaultvalues['displayoptions'])) {
              $displayoptions = unserialize($defaultvalues['displayoptions']);
              if (isset($displayoptions['printintro'])) {
                  $defaultvalues['printintro'] = $displayoptions['printintro'];
              }
              if (isset($displayoptions['printheading'])) {
                  $defaultvalues['printheading'] = $displayoptions['printheading'];
              }
              if (isset($displayoptions['printlastmodified'])) {
                  $defaultvalues['printlastmodified'] = $displayoptions['printlastmodified'];
              }
              if (!empty($displayoptions['popupwidth'])) {
                  $defaultvalues['popupwidth'] = $displayoptions['popupwidth'];
              }
              if (!empty($displayoptions['popupheight'])) {
                  $defaultvalues['popupheight'] = $displayoptions['popupheight'];
              }
          }
      }
code_tokens: public function data_preprocessing ( & $ defaultvalues ) { if ( $ this -> current -> instance ) { $ draftitemid = file_get_submitted_draft_itemid ( 'page' ) ; $ defaultvalues [ 'page' ] [ 'format' ] = $ defaultvalues [ 'contentformat' ] ; $ defaultvalues [ 'page' ] [ 'text' ] = file_prepare_draft_area ( $ draftitemid , $ this -> context -> id , 'mod_page' , 'content' , 0 , page_get_editor_options ( $ this -> context ) , $ defaultvalues [ 'content' ] ) ; $ defaultvalues [ 'page' ] [ 'itemid' ] = $ draftitemid ; } if ( ! empty ( $ defaultvalues [ 'displayoptions' ] ) ) { $ displayoptions = unserialize ( $ defaultvalues [ 'displayoptions' ] ) ; if ( isset ( $ displayoptions [ 'printintro' ] ) ) { $ defaultvalues [ 'printintro' ] = $ displayoptions [ 'printintro' ] ; } if ( isset ( $ displayoptions [ 'printheading' ] ) ) { $ defaultvalues [ 'printheading' ] = $ displayoptions [ 'printheading' ] ; } if ( isset ( $ displayoptions [ 'printlastmodified' ] ) ) { $ defaultvalues [ 'printlastmodified' ] = $ displayoptions [ 'printlastmodified' ] ; } if ( ! empty ( $ displayoptions [ 'popupwidth' ] ) ) { $ defaultvalues [ 'popupwidth' ] = $ displayoptions [ 'popupwidth' ] ; } if ( ! empty ( $ displayoptions [ 'popupheight' ] ) ) { $ defaultvalues [ 'popupheight' ] = $ displayoptions [ 'popupheight' ] ; } } }
docstring: Enforce defaults here.
  
  @param array $defaultvalues Form defaults
  @return void
docstring_tokens: Enforce defaults here .