Picture of Sebastian Hanlon
Translated course reimported to Authoring Tool fails to preview/build
by Sebastian Hanlon - Thursday, 3 June 2021, 6:44 PM
 

Hello Adapt community folks;

Here's the situation:

  • We've built a course in English in the Authoring Tool
  • Exported the Framework project from the AT, then exported the english language .csv files to translate into French (grunt translate:export)
  • Reimported the French translations (grunt translate:import --target-lang=fr) and set "_defaultLanguage": "fr" in src/course/config.json.
  • Copied src/course/en/assets.json and .../assets/* into src/course/fr/ and then search-replaced "course/en/assets" with "course/fr/assets" in the fr/ course json data.
  • Tested the course build locally with grunt server ; both grunt build:prod and grunt dev look good.
  • Recompress the Framework project and Import Source to the Authoring Tool (my local AT for testing, rather than the shared production AT the course was developed on).
    • It warns about some differences in plugin versions (e.g. Accordion, import version 5.3.0-alpha.4 vs. installed version 5.3.0-alpha.5, will use installed version) but the import completes successfully.
    • On the AT console, these log messages:
      info [03 Jun 21 11:21:46 -06:00] unzipping
      info [03 Jun 21 11:21:46 -06:00] /Users/sebastian/Documents/github/adapt_authoring/temp/606dd3f33acddef7f088e6e7/adapt_framework/courses/606dd3f33acddef7f088e6e7/606dd3f33acddef7f088e6e7_606dd4f93acddef7f088e702_unzipped
      info [03 Jun 21 11:21:46 -06:00] /var/folders/3y/6tjb1sld18qb66tfvnsvf5fm0000gp/T/upload_8851c804df4583b00853d2c4c43f5402
      error [03 Jun 21 11:24:33 -06:00] Framework import error. Cannot find folder: /Users/sebastian/Documents/github/adapt_authoring/temp/606dd3f33acddef7f088e6e7/adapt_framework/courses/606dd3f33acddef7f088e6e7/606dd3f33acddef7f088e6e7_606dd4f93acddef7f088e702_unzipped/src/course/en/images
      error [03 Jun 21 11:24:33 -06:00] Framework import error. Cannot find folder: /Users/sebastian/Documents/github/adapt_authoring/temp/606dd3f33acddef7f088e6e7/adapt_framework/courses/606dd3f33acddef7f088e6e7/606dd3f33acddef7f088e6e7_606dd4f93acddef7f088e702_unzipped/src/course/en/video
      error [03 Jun 21 11:24:33 -06:00] Framework import error. Cannot find folder: /Users/sebastian/Documents/github/adapt_authoring/temp/606dd3f33acddef7f088e6e7/adapt_framework/courses/606dd3f33acddef7f088e6e7/606dd3f33acddef7f088e6e7_606dd4f93acddef7f088e702_unzipped/src/course/en/audio
      info [03 Jun 21 11:24:41 -06:00] Course imported successfully

 All basically as expected up to this point, right?

  • Check the course "Configuration settings" in the AT: General/Default language is "en" instead of "fr".
  • Inspecting the course pages in the AT shows all English content.
  • Trying to Preview from the AT results in a grey ellipsis loading screen in the browser:
    • AT server console output attached as "authoring-tool-preview-build.txt"
      • Browser javascript console output attached as "authoring-tool-preview-browser.txt".
      • notably:
        Adapt.findById() unable to find id: 60623556d36c4635ff3cade6 adapt.min.js:1:100045
        startController: cannot find id 60623556d36c4635ff3cade6 adapt.min.js:1:92252

        which is the id of the first page of the course in the local project.
      • Inspecting the published export (next step), that asset in course/contentObjects.json seems to have been re-labeled as 60b91d8ffd0d46340a9aef77.
  • Publishing the course from the authoring tool is successful, but the package it produces has only course/en/... (no course/fr/...) and spins on a grey ellipsis just like the preview.
    • Browser output identical to authoring-tool-preview-browser.txt as well.
    • AT server console output identical to authoring-tool-preview-build.txt, with the addition of
      copy:libraries       98ms  ▇ 1%
      copy:required       106ms  ▇ 1%
      
      in the "Execution Time" steps at the end.
  • As you might expect, re-exporting the course from the Authoring Tool yields a Framework project with only src/course/en/... and no French translations in sight.

 

As an additional experiment I've tried deleting src/course/en/* wholesale before compressing and uploading.

  • The French content now appears in the Authoring Tool, and the _defaultLanguage is "fr".
  • It still doesn't run properly on preview or publish.

Is there a step I'm missing? This thread on localization seems to imply that what I'm doing ("upload a translated course in a non-english language to the Authoring Tool") is possible, but the AT is fighting back and not producing any meaningful warnings or errors to suggest how I've messed it up.

Any suggestions cheerfully accepted, either to fix or for further debugging. Thanks!

Versions:
Authoring tool version 0.10.5
Framework version 5.12.1
Node v14.16.1

 

Picture of Sebastian Hanlon
Re: Translated course reimported to Authoring Tool fails to preview/build
by Sebastian Hanlon - Thursday, 3 June 2021, 9:51 PM
 

Okay, after doing a little more digging, I think I've figured out why the course won't build and run properly from the AT, even after copying the assets over to the french content and fixing up the references, and then deleting the english content. It looks like the Start settings for the course stores the start page ID GUID as plain text, but the course content GUIDs are being regenerated on import (and nothing fixes up the start-page reference).

Is this expected behaviour for the authoring tool?

Picture of Chuck Lorenz
Re: Translated course reimported to Authoring Tool fails to preview/build
by Chuck Lorenz - Thursday, 3 June 2021, 10:09 PM
 

"Is this expected behaviour for the authoring tool?"
Yes. You can expect that IDs/GUIDs that are assigned and managed by the AT, such as IDs for assets, will be regenerated during import. However, IDs that you've had to copy and paste into the AT config editor, such as a page ID for use in the Start Settings, will not be updated by the AT to match the newly regenerated page ID.

Picture of Sebastian Hanlon
Re: Translated course reimported to Authoring Tool fails to preview/build
by Sebastian Hanlon - Friday, 4 June 2021, 3:01 PM
 

Thanks for confirming! That's really helpful to know.

Picture of Paul Hilton
Re: Translated course reimported to Authoring Tool fails to preview/build
by Paul Hilton - Wednesday, 9 June 2021, 7:46 AM
 

Hi Sebastian,

Yes, at the moment it is expected that all GUIDS in the course change when a course is duplicated in the authoring tool, whether by import or copy paste at any level (course, page, article, block, component).

This mean you need to check anything that relies on these after duplicating.

There are obviously technical reasons for this, but it has been recognised as a problem for some time and there are plans to address it.  At the moment its is blocked by the major refactor of the authoring tool which is currently in progress (and hopefully nearing release).

Paul

 

Picture of Sebastian Hanlon
Re: Translated course reimported to Authoring Tool fails to preview/build
by Sebastian Hanlon - Wednesday, 9 June 2021, 4:04 PM
 

Thanks Paul - it's good to know that this work is in progress. Fingers crossed it resolves some of the outstanding workflow issues without invalidating a lot of the existing plugins and extension functionality...

Picture of Misha G
Re: Translated course reimported to Authoring Tool fails to preview/build
by Misha G - Tuesday, 8 June 2021, 8:26 PM
 

That's interesting you've tried to use the csv file to translate the content.

My team also makes courses both in English and French but we just duplicate the course once one language is done then replace all content manually. It's not optimal, but it works. It would indeed be neat if you could have multiple languages in 1 course.

Picture of Sebastian Hanlon
Re: Translated course reimported to Authoring Tool fails to preview/build
by Sebastian Hanlon - Wednesday, 9 June 2021, 4:10 PM
 

Misha - You _can_ have multiple languages in one course (and the user can choose between them using the Language Selector plugin), but only in standalone Framework projects it seems.

Trying to re-import a course with multiple language content to the Authoring Tool seems to discard all but the first language (in alphabetical order?), ignoring even the _defaultLanguage set in the course.json configuration. If there's a way to get the Authoring Tool to keep the extra language data on import that'd make it a lot easier to maintain an "authoritative" version of a multi-language course, so updates can start in one place (even if content updates have to round-trip through an export-translate-reimport workflow)