1EdTech / casa-protocol

The repository for the CASA Technical Specification.
http://imsglobal.github.io/casa-protocol
Other
2 stars 4 forks source link

AdjInSquash Operation Pseudocode is Wrong #1

Closed ebollens closed 9 years ago

ebollens commented 10 years ago

Right now, it includes the following to write into attributes:

payload['attributes'][key] = value

It should be:

payload['attributes'][type][key] = value
ebollens commented 10 years ago

Probably in full something like:

payload['attributes'] = payload['original']

if payload.include? 'journal'
  ['use','require'].each do |type|
    payload['journal'].each do |entry|
      entry[type].each do |key, value|

        if custom_attribute_squash? key
          attribute_squash(key, type, payload, value) 
        else
          payload['attributes'][type][key] = value
        end

      end
    end
  end
end