[SAK-37732] Lessons Common Cartridge doesn't import (it's own content) correctly Created: 25-Apr-2017  Updated: 23-Apr-2018  Resolved: 20-Feb-2018

Status: Verified
Project: Sakai
Component/s: Lessons
Affects Version/s: 11.0, 12.0
Fix Version/s: 11.5 [Tentative], 12.0, 19.0

Type: Bug Priority: Blocker
Reporter: Matthew Jones Assignee: Matthew Jones
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Lessons-After.PNG     PNG File Lessons-Before.PNG    
Issue Links:
Depend
depends on SAK-39270 Add method for FormattedText to just ... RESOLVED
depends on SAK-37730 Problem importing more than 1 item on... Verified
Duplicate
is duplicated by SAK-37755 System breaks down while importing th... Awaiting Review
Relate
relates to SAK-37499 Clarify language on Lessons Common Ca... OPEN
relates to SAK-37412 When importing from cartridge HTML sh... RESOLVED
12 status: Resolved
11 status: Resolved
Previous Issue Keys: LSNBLDR-807
Test Plan:
  • Add Lessons and Resources to a site (minimally)
  • Create two text items on a Lessons page
  • Export the lessons page (no checkboxes matter)
    • Use newest version of file (version 1.3) to export

The file exported should be called sakai-export.imscc (This is just a special zip file)

Now try to re-import the file in the same site or a new site.

Expected: A new Lesson is created, both items appear
Actual, first item appears, toolbar isn't visible and nothing works.

After this is tested mark KNL-1580 as verified.


 Description   

I believe this is a problem with both LSNBLDR-455 and removal of iframes but any content exported directly from lessons will no longer import correctly anymore.

For example just create a simple page with two text items with any content and export. Then try to import.

Because lessons is creating full documents in CCExport.java rather than just document fragments it really makes the resulting page unusable. This isn't a problem isolated to import. If you create a full html document in CKEditor with <html> tags it also breaks lessons but this seems less likely.

I feel like the document should be stripped back to a fragment again if it's inserting/displaying it inline.

See the attacments is what it looks like before exporting, the is the result.



 Comments   
Comment by Matthew Jones [ 25-Apr-2017 ]

This really is only about lessons->lessons since any content from other systems wouldn't import inline. This is not a problem with the content before LSNBLDR-455.

Comment by Matthew Jones [ 25-Apr-2017 ]

I think using the solution on LSNBLDR-805 to use jsoup to return just the html of the body would work out here too.

Comment by Gnapika Reddy Kudumula [ 01-Jun-2017 ]

Tested the issue on Sakai 11.4-RC02 on MySql and Trunk (master) on MySql, the issue is fixed.

Comment by Matthew Jones [ 01-Jun-2017 ]

This is fixed? I didn't submit any new fixes for this. Does the Lessons content all import and work when you try to import/export multiple items?

Comment by Gnapika Reddy Kudumula [ 01-Jun-2017 ]

Yes, I tried to reproduce the issue using steps in testing. I could import the content with two items.

Comment by Sanghyun Jeon [ 13-Jul-2017 ]

I did test import feature in https://qa1-us.nightly.sakaiproject.org/portal/ (11.4) as follows:

1) go to Site A's Lessons > click import/export buttons > click Export CC > click Download

2) go to Site B's Lessons > click import/export buttons > Click Import CC > Choose File and select the file I just downloaded > click Import

Nothing happened. I saw other people did test it successfully. what did I miss?

Should I make a zip for my downloaded file? Exported lesson has only one file.

I am using Windows10/Chrome 59 and Mac OS X.10.12.5 /FF53. Both failed.

Comment by Matthew Jones [ 19-Dec-2017 ]

This either needs to export just the document fragments or the import is going to have to ensure that only document fragments (without html/body/head tags) are imported.

Comment by Neal Caidin [ 06-Feb-2018 ]

I assume that the export should be in CC 1.3 format and I added that to the Test Plan. Is that correct?

 

Comment by Matthew Jones [ 06-Feb-2018 ]

Yeah, that sounds right to me

Comment by Jolie Tingen [ 09-Feb-2018 ]

I tested this on Master by creating two text items on a Lessons page, choosing More Tools -> Export CC and exporting a file. When I tried to import the exported file into a new site with Lessons, nothing happened.  No new content showed up on the Lessons page.

The resulting file for the export doesn't have a .zip extension, it's .imcc. I don't know if that matters, but since ZIP was mentioned above, I thought I would include that observation.

Comment by Neal Caidin [ 14-Feb-2018 ]

Should this JIRA be reopened? Sounds like it did not pass testing.

Comment by Derek Ramsey [ 19-Feb-2018 ]

Neal,

 

I would say reopen.  I tested this and saw the same results as Jolie.

Comment by Matthew Jones [ 19-Feb-2018 ]

i can check this out more today, thanks for the review.

Yeah, the extension exporting is .imscc, but it "really" is a zip file just with a different extension. I can update the plan.

Comment by Matthew Jones [ 19-Feb-2018 ]

I updated the test plan, it looks like it's working for me. A new lesson page is created with the previous content. Can you attach the .imscc export it's creating? Maybe I'll talk to Derek Ramsey about this.

Comment by Derek Ramsey [ 19-Feb-2018 ]

Reviewing Matts updated test plan, this does pass.  A new Lessons page is added to the site that contains the imported data.

Comment by Matthew Jones [ 19-Feb-2018 ]

Thanks! I'll let Jolie check but maybe this is just what was missing. There's no option to import into the current active lesson, it imports into a new lesson. It's basically the similar to going into Site Info -> Import from Archive File. It would probably be a nice new feature if it could be imported into the current lesson. 

Comment by Neal Caidin [ 20-Feb-2018 ]

Set to verified based on Derek Ramsey comment above.

 

Generated at Wed Sep 18 16:14:39 CDT 2019 using Jira 8.0.3#800011-sha1:073e8b433c2c0e389c609c14a045ffa7abaca10d.