Skip to content

Commit

Permalink
Merge pull request #35 from RRZE-Webteam/FAU-404
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrann0us authored Jun 19, 2024
2 parents 4fd1a6c + 790fa0a commit 63e1ec0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 20 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Expand the admission requirements filter to include the "Admission free with restriction" option.
- Support filter reordering based on the `filters` attribute in the search shortcode.
- Support `ids` attribute in the search shortcode.
- Support `ids` attribute in the search shortcode to restrict search results by Campo Keys.
- Support `german-language-skills-for-international-students` attribute in the search shortcode to restrict search results by language skills.
- Support `hide` attribute in the search shortcode to hide the heading (`heading`) or search form (`search`).

### Changed

- Dynamically load degree program search results when selecting checkboxes or typing a search term.
- Only the title, subtitle, and field "What is the degree program about?" are indexed for searching.
- Increase timeout limit when synchronizing data from the providing website.

### Fixed

Expand Down
26 changes: 13 additions & 13 deletions docs/degree_programs_search_shortcode.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ See below for a list of supported attributes.

## List of supported filters

| Filter | Description | Accepted values (if used as a pre-applied filter) |
|-------------------------|-------------------------------------------------------------------------|---------------------------------------------------|
| `admission-requirement` | Admission requirements filter | Not available |
| `area-of-study` | Area of study filter | Comma-separated term names |
| `attribute` | Attribute filter | Comma-separated term names |
| `degree` | Degree filter | Comma-separated term names |
| `faculty` | Faculty filter | Comma-separated term names |
| `german-language-skills-for-international-students` | German language skills for international students filter | Comma-separated term names |
| `search` | Search keyword filter (explicitly added by default, no need to include) | Not available |
| `semester` | Semester filter | Comma-separated term names |
| `study-location` | Study location filter | Comma-separated term names |
| `subject-group` | Subject group filter | Comma-separated term names |
| `teaching-language` | Teaching language filter | Comma-separated term names |
| Filter | Description | Accepted values (if used as a pre-applied filter) |
|-----------------------------------------------------|-------------------------------------------------------------------------|---------------------------------------------------|
| `admission-requirement` | Admission requirements filter | Not available |
| `area-of-study` | Area of study filter | Comma-separated term names |
| `attribute` | Attribute filter | Comma-separated term names |
| `degree` | Degree filter | Comma-separated term names |
| `faculty` | Faculty filter | Comma-separated term names |
| `german-language-skills-for-international-students` | German language skills for international students filter | Comma-separated term names |
| `search` | Search keyword filter (explicitly added by default, no need to include) | Not available |
| `semester` | Semester filter | Comma-separated term names |
| `study-location` | Study location filter | Comma-separated term names |
| `subject-group` | Subject group filter | Comma-separated term names |
| `teaching-language` | Teaching language filter | Comma-separated term names |

## List of elements that can be hidden

Expand Down
13 changes: 7 additions & 6 deletions src/Infrastructure/ApiClient/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ final class ApiClient
{
private const API_HOST = 'https://meinstudium.fau.de';

private array $headers;
private array $defaultArgs;

public function __construct(
private LoggerInterface $logger
) {

$this->headers = [
'Accept' => 'application/json',
$this->defaultArgs = [
'headers' => [
'Accept' => 'application/json',
],
'timeout' => 15,
];
}

Expand All @@ -39,9 +42,7 @@ public function get(string $path, array $queryArgs = [], array $args = []): ?Rem
$requestUrl,
wp_parse_args(
$args,
[
'headers' => $this->headers,
]
$this->defaultArgs
)
);

Expand Down

0 comments on commit 63e1ec0

Please sign in to comment.