Skip to content

Commit

Permalink
Added micro-credentials count query
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Oct 18, 2023
1 parent e27eab8 commit 86728d4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,12 @@ export function fetchInstitutionBadges() {
return validFetchNoErrorDialog(path, {}, "GET");
}

export function fetchInstitutionMicroCredentials() {
const path = `${serverUrl}/insights/institution/micro-credentials`;
return validFetchNoErrorDialog(path, {}, "GET");
}



//BadgeInstanceCollections
export function createBadgeInstanceCollection(badgeInstanceCollection) {
Expand Down
1 change: 1 addition & 0 deletions src/locale/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -1714,6 +1714,7 @@ I18n.translations.en = {
title: "Management queries",
institutionAdmins: "Institution admins",
institutionBadges: "Badge overview",
institutionMicroCredentials: "Micro-credentials count",
clear: "Clear",
download: "Download",
copy: "Copy",
Expand Down
1 change: 1 addition & 0 deletions src/locale/nl.js
Original file line number Diff line number Diff line change
Expand Up @@ -1715,6 +1715,7 @@ I18n.translations.nl = {
title: "Management queries",
institutionAdmins: "Institution admins",
institutionBadges: "Badge overview",
institutionMicroCredentials: "Micro-credentials count",
clear: "Clear",
download: "Download",
copy: "Copy",
Expand Down
7 changes: 6 additions & 1 deletion src/routes/teachers/ManagementQueries.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script>
import I18n from "i18n-js";
import Button from "../../components/Button.svelte";
import {fetchInstitutionAdmins, fetchInstitutionBadges} from "../../api";
import {fetchInstitutionAdmins, fetchInstitutionBadges, fetchInstitutionMicroCredentials} from "../../api";
import {Spinner} from "../../components";
import {JsonView} from '@zerodevx/svelte-json-view'
import {copyText} from 'svelte-copy';
Expand All @@ -15,7 +15,12 @@
{
name: "institutionBadges",
api: fetchInstitutionBadges
},
{
name: "institutionMicroCredentials",
api: fetchInstitutionMicroCredentials
}
]
let queryData = [];
let currentQueryObject;
Expand Down

0 comments on commit 86728d4

Please sign in to comment.