original_string: public function set_data($defaultvalues) {
          $defaultvalues = (array)$defaultvalues;
  
          if (isset($defaultvalues['scormtype']) and isset($defaultvalues['reference'])) {
              switch ($defaultvalues['scormtype']) {
                  case SCORM_TYPE_LOCALSYNC :
                  case SCORM_TYPE_EXTERNAL:
                  case SCORM_TYPE_AICCURL:
                      $defaultvalues['packageurl'] = $defaultvalues['reference'];
              }
          }
          unset($defaultvalues['reference']);
  
          if (!empty($defaultvalues['options'])) {
              $options = explode(',', $defaultvalues['options']);
              foreach ($options as $option) {
                  $opt = explode('=', $option);
                  if (isset($opt[1])) {
                      $defaultvalues[$opt[0]] = $opt[1];
                  }
              }
          }
  
          parent::set_data($defaultvalues);
      }
code: public function set_data($defaultvalues) {
          $defaultvalues = (array)$defaultvalues;
  
          if (isset($defaultvalues['scormtype']) and isset($defaultvalues['reference'])) {
              switch ($defaultvalues['scormtype']) {
                  case SCORM_TYPE_LOCALSYNC :
                  case SCORM_TYPE_EXTERNAL:
                  case SCORM_TYPE_AICCURL:
                      $defaultvalues['packageurl'] = $defaultvalues['reference'];
              }
          }
          unset($defaultvalues['reference']);
  
          if (!empty($defaultvalues['options'])) {
              $options = explode(',', $defaultvalues['options']);
              foreach ($options as $option) {
                  $opt = explode('=', $option);
                  if (isset($opt[1])) {
                      $defaultvalues[$opt[0]] = $opt[1];
                  }
              }
          }
  
          parent::set_data($defaultvalues);
      }
code_tokens: public function set_data ( $ defaultvalues ) { $ defaultvalues = ( array ) $ defaultvalues ; if ( isset ( $ defaultvalues [ 'scormtype' ] ) and isset ( $ defaultvalues [ 'reference' ] ) ) { switch ( $ defaultvalues [ 'scormtype' ] ) { case SCORM_TYPE_LOCALSYNC : case SCORM_TYPE_EXTERNAL : case SCORM_TYPE_AICCURL : $ defaultvalues [ 'packageurl' ] = $ defaultvalues [ 'reference' ] ; } } unset ( $ defaultvalues [ 'reference' ] ) ; if ( ! empty ( $ defaultvalues [ 'options' ] ) ) { $ options = explode ( ',' , $ defaultvalues [ 'options' ] ) ; foreach ( $ options as $ option ) { $ opt = explode ( '=' , $ option ) ; if ( isset ( $ opt [ 1 ] ) ) { $ defaultvalues [ $ opt [ 0 ] ] = $ opt [ 1 ] ; } } } parent :: set_data ( $ defaultvalues ) ; }
docstring: Need to translate the "options" and "reference" field.
docstring_tokens: Need to translate the options and reference field .