TBR e-Learning Wiki

Webct Export via cp_api.pl Script

IMS Export script UNIX flavor used to export RODP courses (your directory structure will vary)
_______

#!/bin/bash
# to be run from /[webct install]/webct/generic/ims
# Exported data is in [webct install]/webct/generic/ims/exported_packages

for courses in  $(ls /global/rodp/webct/webct/courses)
do
./cp_api.pl -action=export -course=$courses -compress=yes
done
________

- Allen Elliott, University of Memphis 


The instructions from the Technical Reference guide are:

  1. cd webct_install_dir/webct/webct/generic/ims
  2. cp_api.pl -action=export -course=courseid

The exported package will be in webct_install_dir/webct/webct/generic/ims/exported_packages

It's in a folder called courseid_COURSE_YYYYMMDDHHMMSS (Year Month Day Hour Min Sec)

The structure is something like

Note: WebCT randomly generates the IDs for the top-level manifest and course manifest.

If you do

cp_api.pl -action=export -course=courseid -compress=yes

you will get a compressed zip.

- From Ian Goh, used with permission



 

The information above is from a Sakai related project (http://issues.sakaiproject.org/confluence/display/MIG/Export+a+course+out+of+WebCT+(CE+4.1.5)+-+Ian+Goh)
but the export part is applicable in our case.  

Comments

From aldsmith - 2/14/07 3:37 PM

Ok on a windows machine the script is the same as what is listed above. If you use the compress option the file will be zipped.

___\___\webct\generic\ims>cp_api.pl -action=export -course=<your course name> -compress=yes

To find the exported course look in the: ___\___\___\ generic\ims\exported_packages folder.

Albert Smith MTSU
aldsmith@mtsu.edu

 

From aldsmith - 2/14/07 1:27 PM

I tried all three export methods and using the api method worked best for me. This method even worked on a very large course without the bulk tool turned on. Our WebCT install is on a Windows 2003 server.

Albert Smith MTSU

From jstclair - 2/13/07 10:21 AM

Awesome, James! Thanks to both you and Allen.

From jkachel - 2/13/07 10:06 AM

It's worth noting that, on Unix systems, using the compress flag will actually create a .tar.gz file. D2L won't accept this - it needs to be in Zip format. I get around this by running this after cp_api.pl is finished in exported_packages:

 IMS=\n
export $IMS
for i in `ls -1`; do echo "==> $i to $i.zip"; zip -r $i.zip $i; done

I don't use the -compress flag with cp_api.pl in this case. This could also be used with the CEMT, since it puts files in the same place.  

Site

Changes
Index
Search

 

User

 

Log In
Register

 
 

Last Modified 2/13/07 10:18 AM