Picture of jim nielsen
where are vagrant files? how can I combine grunt and vagrant
by jim nielsen - Monday, 28 March 2016, 5:19 PM
 

I had a vagrant version running and had made some changes.  I took a few days off and now I can't get the preview to work (contact system administrator).  Now I can't get vagrant to start properly.

I had this before and ininstalled everything and re-installed in new directories.  I had an  authoring directory from which I had been able to run vagrant and edit files at localhost:5000

I also had a grunt version running in a different directory from which I can edit a different set of files.

Question 1: When I run vagrant in the authoring directory - I don't see and course files in there.  Where are the files one is editing from localhost:5000?

Question 2: How can I get the grunt localhost:9000 running on the same course files I am editing in localhost:5000?

Picture of jim nielsen
Re: where are vagrant files? how can I combine grunt and vagrant
by jim nielsen - Tuesday, 29 March 2016, 1:49 PM
 

How can I get the grunt type of server installation and the vagrant installation running on the same data source files?  Is that possible?

Picture of Thomas Berger
Re: where are vagrant files? how can I combine grunt and vagrant
by Thomas Berger - Wednesday, 30 March 2016, 9:32 AM
 

Hello Jim,

vagrant sets up a virtual machine. On Windows all AuthoringTool files are copied into this machine. This is due to some Windows limitations related to symbolic-links and path name lengths. Working entirely in the VM on windows, helps us maintain vagrant for different Platforms.

With this setup it is not directly possible to access your vagrant directory from windows.

What I recommend you, is to copy the build folder(s) form the VM back to Windows. Unfortunately this can only be achieved from the command line and will require a ssh client like git.

Open a cmd and navigate to your vagrant directory. Run "vagrant up" and "vagrant ssh".

You are now inside the VirtualMachine (Ubuntu)

Navigate to the build folder. This is located here: "/home/vagrant/temp/{tenantid}/adapt_framework/courses/{tenantid}/{courseid}"

tenantid and courseid is different on each machine, so you must update the following folder names. The easiest way to navigate to this location is with a combination of "ls" and "cd" commands, like this

"cd temp/"

"ls" -> returns tenanid: 56fb8538a4327dcb387895a6

"cd 56fb8538a4327dcb387895a6/"

"cd adapt_framework/courses/56fb8538a4327dcb387895a6/"

"ls" -> displays all your courses

"cd 56fb8699d102027439a57870/"

"ls" -> you should now see build

copy the build folder into Windows:

"cp -r build/ /vagrant/"

The build folder is now in the root of the vagrant directory. You can use the "course" folder inside the build to populate a new course created with the Framework:

Create a course in a different location on you machine e.g. "adapt create course"

Replace course folder with the one created with the AT

"grunt build"
"grunt server"

This should open the course on localhost:9001

Best regards

Thomas

Picture of Barry Stoner
Re: where are vagrant files? how can I combine grunt and vagrant
by Barry Stoner - Thursday, 19 May 2016, 8:01 AM
 

Hi Thomas,

I've recently started using the AT and was going to try custom theming, until I realised I couldn't find a way of backing up my course files as I cannot find them. Are the instructions above to Jim the same way that I would access the course files so that I can make a copy.

I can see in the AT that I can download the course or export the source code, and I understand that the Open Source nature of Adapt means the road map for importing a course has not been set, but it feels a little dangerous for me to create courses that I cannot back up or keep in a version control system.

In the meantime I've installed git and will try navigating to the build folder. I'm a little stuck trying to access the tenantid and courseid, but I'll get there I hope.

If this is off topic, please let me know and I will start a new thread about the location of course files. Please let me know if I've missed a video about it.

Thanks in advance.

Cheers,

Barry

 

 

Picture of Sam Tsiu
Re: where are vagrant files? how can I combine grunt and vagrant
by Sam Tsiu - Thursday, 19 May 2016, 9:15 AM
 

Hi Barry

Have you tried to develop a course in the adapt learning framework? In my opinion, It is a lot easier to develop and test custom theme in the framework, and of course you can do version control for your course file and custom theme. 

Take a look of this official wiki page to get you start to develop in the framework.

Picture of Barry Stoner
Re: where are vagrant files? how can I combine grunt and vagrant
by Barry Stoner - Thursday, 19 May 2016, 9:35 AM
 

Thanks Sam.

I will give the framework another go, but I had been put off by how technical the installation is. Installing the AT with Vagrant was a breeze in comparison.  I'll give it a go later today.

Thanks,Barry

Picture of Thomas Berger
Re: where are vagrant files? how can I combine grunt and vagrant
by Thomas Berger - Friday, 20 May 2016, 7:19 AM
 

Hi Barry,

if you have the "export source code" option available in the Authoring Tool, make sure to use this option then the approach described above.

As Sam mentioned, if you wan't to do custom theming in Adapt you will need to work with the Framework. If you have created a custom theme, it can be easily uploaded into the Authoring Tool and applied to other courses.

Best regards

Thomas