Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "Learning Resource Type" combos are not 100% dependant #361

Closed
ignaciogros opened this issue Oct 31, 2018 · 6 comments
Closed

The "Learning Resource Type" combos are not 100% dependant #361

ignaciogros opened this issue Oct 31, 2018 · 6 comments
Labels

Comments

@ignaciogros
Copy link
Collaborator

  • New package.
  • File - Publish - Procomún.
  • Write a title, a description and the author's name.
  • Choose "conceptual map" as "Learning Resource Type".
  • Click on "Save and export".

Then go to the Properties tab:

  • "conceptual map" is selected in the Package tab. That's right.
  • It's also selected in the Metadata - LOM-ES tab. That's right too.
  • No type is selected in the Metadata - LOM tab. I believe that "graphic" should be selected (see this document: ANÁLISIS DE MAPEABILIDAD LOM/LOM-ES V1.0), so all the category combos are dependant. Is that right, @JuanCasanovaSdweb? Pleas mark it as accepted if so... Thanks.
@JuanCasanovaSdweb
Copy link
Contributor

Actually, it was "diagram" (graphic doesn't really exist?).

The problem was actually only with "conceptual map" because the mapped LOM value didn't exist.

@ignaciogros ignaciogros reopened this Nov 27, 2018
@ignaciogros
Copy link
Collaborator Author

  • New elp.
  • Properties - Resource Type: Select "conceptual map".
  • Go to Metadata - LOM: Diagram is selected. That's right.
  • Go to Metadata - LOM-ES: "conceptual map" is selected. That's right.

But if you change the values in any of the LOM tabs, the other 2 values won't be updated, so you can have 3 different selected categories.

If you go back to the Package Properties tab and choose another category, you'll see that it's added to the LOM tabs (there will be more than one value there). That might be right...

@ignaciogros
Copy link
Collaborator Author

Is this a FR or an issue to close before 2.3 is released? Thanks.

@JuanCasanovaSdweb
Copy link
Contributor

This was always like this (and for every field, not only resource type). For example, for resource type:

When selecting one from package properties, this function is called, which will make sure those values are also in LOM and LOM-ES:

def set_learningResourceType(self, value):
value_str = value.encode('utf-8')
for metadata, source in [(self.lom, 'LOMv1.0'), (self.lomEs, 'LOM-ESv1.0')]:
educationals = metadata.get_educational()
src = lomsubs.sourceValueSub()
src.set_valueOf_(source)
src.set_uniqueElementName('source')
val = lomsubs.learningResourceTypeValueSub()
val.set_valueOf_(self.learningResourceType_map(source, value_str))
val.set_uniqueElementName('value')
learningResourceType = lomsubs.learningResourceTypeSub(self.learningResourceType_map(source, value_str))
learningResourceType.set_source(src)
learningResourceType.set_value(val)
if educationals:
for educational in educationals:
learningResourceTypes = educational.get_learningResourceType()
found = False
if learningResourceTypes:
for i in learningResourceTypes:
if i.get_value().get_valueOf_() == self.learningResourceType_map(source, self.learningResourceType.encode('utf-8')):
found = True
index = learningResourceTypes.index(i)
if value:
educational.insert_learningResourceType(index, learningResourceType)
else:
learningResourceTypes.pop(index)
if not found:
educational.add_learningResourceType(learningResourceType)
else:
educational = [lomsubs.educationalSub(learningResourceType=[learningResourceType])]
metadata.set_educational(educational)
self._learningResourceType = toUnicode(value)

However, when the value is changed directly in the LOM or LOM-ES tabs, only those exact values are updated:

def setLom(self, fields):
lom = processForm2Lom(fields, 'lom', 'LOMv1.0')
rootLom = lomsubs.lomSub.factory()
rootLom.addChilds(lom)
self.package.lom = rootLom
return True
def setLomes(self, fields):
lom = processForm2Lom(fields, 'lomes', 'LOM-ESv1.0')
rootLom = lomsubs.lomSub.factory()
rootLom.addChilds(lom)
self.package.lomEs = rootLom
return True

I'm marking this as an FR as I think it's to big of a change to do it before releasing 2.3.

@ignaciogros
Copy link
Collaborator Author

I agree. FR then. Thanks.

@ignaciogros
Copy link
Collaborator Author

Not in eXe 2.6+.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants