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

Adam Marshall adam.marshall at it.ox.ac.uk
Tue Feb 3 14:01:54 PST 2015


Are you talking about copying items from one site to another?

If so, are you also including the 'duplicate site' option?

Adam

sent from my phone

On 3 Feb 2015 19:02, Charles Hedrick <hedrick at rutgers.edu> wrote:
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.


_______________________________________________
sakai-core-team mailing list
sakai-core-team at collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/sakai-core-team
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-core-team/attachments/20150203/1bda9aaf/attachment.html 


More information about the sakai-core-team mailing list