Skip to content
Snippets Groups Projects
Commit b2e611b1 authored by Matheus Agio Nerone's avatar Matheus Agio Nerone
Browse files

remove unused metadata

parent bcd7951c
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,9 @@ class LearningObjectsController < ApplicationController
args['last_modified'] = Time.now.to_s
args['metadata'] = []
# trata o form do learning object
params[:learning_object][:date_created] = Time.now
params[:learning_object][:date_available] = Time.now
params[:learning_object][:type] = get_file_type params[:learning_object][:file]
lo = DSpaceRest::Item.new(args)
dspace_keys = get_dspace_metadata_names("invert")
params[:learning_object].each do |k,v|
......@@ -160,19 +163,26 @@ class LearningObjectsController < ApplicationController
def get_dspace_metadata_names(invert=nil)
h = {
"dc.title" => "name",
"dc.contributor.author" => "author",
"dc.description" => "description",
"dc.language" => "language",
"dc.source" => "source",
"dc.type" => "type",
"dc.date.issued" => "date",
"dc.rights.license" => "license",
"dc.rights.holder" => "copyright",
"dc.location.country" => "country",
"dc.date.accessioned" => "date_created",
"dc.date.available" => "date_available",
#dc.identifier.uri
"dc.language" => "language",
"dc.title" => "name",
"dc.type" => "type",
"dc.subject.category" => "subjects"
# "dc.description" => "description",
# "dc.source" => "source",
# "dc.date.issued" => "date",
# "dc.rights.license" => "license",
# "dc.rights.holder" => "copyright",
# "dc.location.country" => "country",
# "dc.date.accessioned" => "date_created",
# "dc.date.available" => "date_available",
# "dc.subject.keyword" => "keywords",
# "dc.date.issued" => "date_issued",
# "dc.date.submitted" => "date_submitted",
......
......@@ -26,23 +26,23 @@
<%= f.text_field :description %><br>
<%= f.label :language, "Linguagem" %>
<%= f.text_field :language %><br>
<%= f.label :source, "Fonte" %>
<!-- <%= f.label :source, "Fonte" %>
<%= f.text_field :source %><br>
<!-- <%= f.label :type, "Tipo de objeto" %>
<%= f.text_field :type %><br> -->
<%= f.label :type, "Tipo de objeto" %>
<%= f.text_field :type %><br>
<%= f.label :license, "Licença"%>
<%= f.text_field :license %><br>
<%= f.label :copyright, "Detentor dos direitos autorais" %>
<%= f.text_field :copyright %><br>
<%= f.label :country, "Pais" %>
<%= f.text_field :country %> <br>
<%= f.text_field :country %> <br> -->
<select id='subjectSelect' name="learning_object[subjects][]" multiple>
<%= @subjects.each do |subject| %>
<option value='<%= subject %>'><%= subject %></option>
<% end %>
</select>
<%= f.label :keywords, "Palavras-chave" %>
<%= f.text_field :keywords %> <br>
<!-- <%= f.label :keywords, "Palavras-chave" %>
<%= f.text_field :keywords %> <br> -->
<select name="learning_object[school_level]">
<%= @school_levels.each do |school_level|%>
<option value="<%= school_level %>"><%= school_level %></option>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment