[sakai-core-team] fix for copying /direct links

Charles Hedrick hedrick at rutgers.edu
Tue Feb 3 11:02:41 PST 2015


Several of our instructors would like to be able to copy items that use links to tools. Other LMS’s that they use can do this, apparently.

Recently, code was added to the kernel to help add links. However it has issues:

* For assignments and forums, it maps the URLs correctly, but puts [ ] around the item. I propose to remove the [ ].

* For tests, it turns the link into text, and puts [ ] around it. This one is harder, because the /direct link is to a published assessment, and when you copy a site, assessments don’t get published. I see two reasonable approaches:

** Publish the assessment
** Arrange for the link to be fixed up once the assessment is published.

Lessons does the second. I think that’s the right approach. However Lessons uses a method that won’t work for general HTML. Here’s what I propose.

Add a table, SAM_FIXUP
* id
* title
* assessmentID

Add a /direct link, /direct/sam_fixup/ID

When the site is copied, if a link is found to a published assessment create an entry in SAM_FIXUP, and replace the link with /direct/sam_fixup/ID. 

When that URL is actually used, /direct/sam_fixup will look it up using the ID number. If there is an assessment ID, simply redirect to /direct/sam_pub/ID. If not, check to see if there is a published assessment with the same title. If so add the assessment ID to the entry and redirect to it. 

Of course this assumes that the instructor publishes the assignment with the same title. The other option would be to save the core assessment ID, and look for a published assessment based on the same core assessment. I’m not sure which is most likely to work.

I’m willing to do the implementation, but only if you agree to accept it.




More information about the sakai-core-team mailing list