original_string: static public function enable($license) {
          global $DB;
          if ($license = self::get_license_by_shortname($license)) {
              $license->enabled = 1;
              $DB->update_record('license', $license);
          }
          self::set_active_licenses();
          return true;
      }
code: static public function enable($license) {
          global $DB;
          if ($license = self::get_license_by_shortname($license)) {
              $license->enabled = 1;
              $DB->update_record('license', $license);
          }
          self::set_active_licenses();
          return true;
      }
code_tokens: static public function enable ( $ license ) { global $ DB ; if ( $ license = self :: get_license_by_shortname ( $ license ) ) { $ license -> enabled = 1 ; $ DB -> update_record ( 'license' , $ license ) ; } self :: set_active_licenses ( ) ; return true ; }
docstring: Enable a license
  @param string $license the shortname of license
  @return boolean
docstring_tokens: Enable a license