From a0b9e7cf65844805a35a81dbc3f7569b17b15e1d Mon Sep 17 00:00:00 2001 From: Philipp Bammes Date: Wed, 19 Jun 2024 09:47:13 +0200 Subject: [PATCH 1/5] feat: increase timeout threshold Jira: FAU-404 --- src/Infrastructure/ApiClient/ApiClient.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Infrastructure/ApiClient/ApiClient.php b/src/Infrastructure/ApiClient/ApiClient.php index ff79323..97b9117 100644 --- a/src/Infrastructure/ApiClient/ApiClient.php +++ b/src/Infrastructure/ApiClient/ApiClient.php @@ -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, ]; } @@ -39,9 +42,7 @@ public function get(string $path, array $queryArgs = [], array $args = []): ?Rem $requestUrl, wp_parse_args( $args, - [ - 'headers' => $this->headers, - ] + $this->defaultArgs ) ); From 664f500656590ea9759e9c0be51041b0f05f7dd8 Mon Sep 17 00:00:00 2001 From: Philipp Bammes Date: Wed, 19 Jun 2024 09:54:28 +0200 Subject: [PATCH 2/5] chore: complete changelog --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24a5a3a..63d9d94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,10 +12,13 @@ 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. ### Fixed From 5806f07d9d060d8c9a1ff01b80287dfb25164fa7 Mon Sep 17 00:00:00 2001 From: Philipp Bammes Date: Wed, 19 Jun 2024 09:54:45 +0200 Subject: [PATCH 3/5] chore: fix Markdown table --- docs/degree_programs_search_shortcode.md | 26 ++++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/degree_programs_search_shortcode.md b/docs/degree_programs_search_shortcode.md index bdaf0f8..7578201 100644 --- a/docs/degree_programs_search_shortcode.md +++ b/docs/degree_programs_search_shortcode.md @@ -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 From 6fc7c8af8dd27d74eb0830bbfdf3716f21cda775 Mon Sep 17 00:00:00 2001 From: Philipp Bammes Date: Wed, 19 Jun 2024 10:09:57 +0200 Subject: [PATCH 4/5] chore: add missing changelog item --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63d9d94..660849a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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 timout limit when synchronizing data from the providing website. ### Fixed From 790fa0a9b168e5bd89b79b786b004fa26a634605 Mon Sep 17 00:00:00 2001 From: Philipp Bammes <8144115+tyrann0us@users.noreply.github.com> Date: Wed, 19 Jun 2024 10:18:36 +0200 Subject: [PATCH 5/5] fix: typo in `CHANGELOG.md` Co-authored-by: Orestis Samaras <66624212+o-samaras@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 660849a..41a1000 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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 timout limit when synchronizing data from the providing website. +- Increase timeout limit when synchronizing data from the providing website. ### Fixed