This recipe is destructive and deals with modifying access control so proceed carefully.

Using different LTI fields for course context_id, name, and label in Avalon causes odd behavior when granting the course access to an item.  See  for more description of that behavior.  A workaround for this is to use the same LTI field for all three values.


  1. Add/Update lti.yml using the instructions on the Avalon LTI Tool page but set the context_id to context_label to match the configuration of context_name
  2. You may want to test to make sure the new setting is working by granting a new course to access to an item and checking the record
  3. Update existing courses and items they have access to using the rails console:

    Course.all.each do |c|
     course_reserves = MediaObject.where("read_access_virtual_group_ssim" => c.context_id)
      course_reserves.each do |mo|
        mo.read_groups -= [c.context_id]
        mo.read_groups += [c.title] false)
      c.context_id = c.title