From c89fcad2a46ead316af14b270d26c6ba924646b6 Mon Sep 17 00:00:00 2001 From: Finn Bacall Date: Thu, 10 Oct 2024 10:16:50 +0100 Subject: [PATCH] Allow redundant external resources to be replaced ElixirTeSS/TeSS#1029 --- lib/tess/rdf/course_extractor.rb | 2 +- lib/tess/rdf/material_extractor.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tess/rdf/course_extractor.rb b/lib/tess/rdf/course_extractor.rb index a41a74b..9889a00 100644 --- a/lib/tess/rdf/course_extractor.rb +++ b/lib/tess/rdf/course_extractor.rb @@ -16,7 +16,7 @@ def extract_params end # course_params[:difficulty_level] ||= # extract_names_or_values(RDF::Vocab::SCHEMA.educationalLevel, subject: course).first - course_params[:external_resources_attributes] = extract_mentions + course_params[:external_resources] = extract_mentions # ...and override with more specific metadata from CourseInstance course_instance_params = super course_params.merge(course_instance_params) diff --git a/lib/tess/rdf/material_extractor.rb b/lib/tess/rdf/material_extractor.rb index 119efb9..1f74309 100644 --- a/lib/tess/rdf/material_extractor.rb +++ b/lib/tess/rdf/material_extractor.rb @@ -24,7 +24,7 @@ def extract_params params[:contributors] = extract_names(RDF::Vocab::SCHEMA.contributor) params[:target_audience] = extract_audience params[:resource_type] = extract_values(RDF::Vocab::SCHEMA.learningResourceType) - params[:external_resources_attributes] = extract_mentions + params[:external_resources] = extract_mentions remove_blanks(params) end