Skip to content

Commit

Permalink
Merge pull request #472 from France-ioi/documentation-dynamic-concept…
Browse files Browse the repository at this point in the history
…-list

Concept list could depend on base concept URL
  • Loading branch information
SebastienTainon authored Apr 17, 2024
2 parents 4671647 + ebaba5b commit e932aed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/task/documentation/doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ function getConceptsFromLanguage(hasTaskInstructions: boolean, state: AppStore)
if (DocumentationLanguage.C !== language) {
const baseConcepts = window.getConceptViewerBaseConcepts(baseConceptUrl);
// Take concepts from the library first
allConcepts = context.getConceptList();
allConcepts = context.getConceptList(baseConceptUrl);
// Add base concepts not in the library
allConcepts = allConcepts.concat(baseConcepts.filter((concept) => allConcepts.find((c) => c.id === concept.id) === undefined));
// Fill library concepts with information from base concepts if needed
Expand Down
2 changes: 1 addition & 1 deletion frontend/task/libs/quickalgo_library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export abstract class QuickAlgoLibrary {
// Get the list of concepts
// List can be defined either in context.conceptList, or by redefining this
// function
getConceptList() {
getConceptList(baseConceptUrl?: string) {
return this.conceptList || [];
};

Expand Down

0 comments on commit e932aed

Please sign in to comment.