Administrators can use the Course Files command line tools to:
- Back up Course Files content for one or more courses using the backup_course_files command.
- Change the default directories for one or more courses using the update-course-directory command.
- Change permissions for individual course directories using the update-course-permission command.
- Change permissions for the /courses directory using the update-all-course-hd-permission command.
- Move content for one or more courses to Course Files using the MoveCourseContent command.
Back up Course Files content for one course
The backup_course_files command enables administrators to extract the Course Files from a single course to a selected directory for backup.
If your institution licenses content management, administrators can use this command only if the default directory for the course has not been changed. Administrators can use the existing orphaned search to locate files associated with deleted courses. To learn more, see Managing Orphaned Content.
- From a command line, change to the following directory, where BLACKBOARD is the Blackboard Learn installation location:
UNIX Syntax: cd $BLACKBOARD_HOME/apps/bbcms/bin
Windows Syntax: cd C:\%BLACKBOARD_HOME%\apps\bbcms\bin
- From this directory, type the following command and operations:
backup_course_files.[sh|bat] COURSE_ID BACKUP_DIRECTORY
UNIX Example:
backup_course_files.sh Course001 /backups
Windows Example:
backup_course_files.bat Course001 c:\backups
Change default directories
The update-course-directory command enables administrators to change the default directories for one or more courses.
- From a command line, change to the following directory, where BLACKBOARD is the Blackboard Learn installation location:
UNIX Syntax: cd $BLACKBOARD_HOME/apps/bbcms/binWindows Syntax: cd C:\%BLACKBOARD_HOME%\apps\bbcms\bin
- From this directory, type the command using the appropriate operation:
- Reset the directory for a single course:
update-course-directory.[sh|bat] --c COURSE_ID --p COURSE_DIRECTORY - Reset the directory for a group of courses using a data source:
update-course-directory.[sh|bat] --d DATA_SOURCE_BUID --p COURSE_DIRECTORY - Reset the directories for a group of courses using a feed file:
update-course-directory.[sh|bat] --f FEED_FILE_NAME
- Reset the directory for a single course:
Operation | Description |
---|---|
--c | Provide the Course ID of a course. |
--d | Provide the Data Source Batch UID to obtain the list of courses. |
--f | Provide the name of the feed file containing a list of each Course ID and its target course directory. For example: courseId1|/courses/Files courseId2|/institution/Files This option allows administrators to run the operation against a group of courses they specify in a feed file. This is essentially a two step process:
|
--p | To move the content to a location other than the default course directory, provide the target course directory. |
Example:
update-course-directory.sh --c Course001 --p /courses/Files
update-course-directory.sh --d DATA_SOURCE_BUID --p /institution/Files
update-course-directory.bat --f c:\feedfile.txt
Change permissions for individual course directories
The update-course-permission command enables administrators to change permissions for individual course directories.
- From a command line, change to the following directory, where BLACKBOARD is the Blackboard Learn installation location:
UNIX Syntax: cd $BLACKBOARD_HOME/apps/bbcms/bin
Windows Syntax: cd C:\%BLACKBOARD_HOME%\apps\bbcms\bin
- From this directory, type the command using the appropriate operation:
- Change the permissions for a single course:
update-course-permission.[sh|bat] --c COURSEID --r ROLE --p PERMISSIONS --o OPERATION --e RECURSIVEFLAG - Change the permissions for a group of courses using a data source:
update-course-permission.[sh|bat] --d DATA_SOURCE_BUID --r ROLE --p PERMISSIONS --o OPERATION - Change the permissions for a group of courses using a feed file:
update-course-permission.[sh|bat] --f FEED_FILE_NAME
Change Permissions Commands Operation Description --c Provide the Course ID of a course. --d Provide the Data Source Batch UID to obtain the list of courses. --r Provide the name of the role to have its permission changed as defined in the --o and --p operations. --p Provide the permissions to be added, removed, or reset as defined in the --o operation. Valid values: - R: read
- W: write
- D: delete
- M: manage
Multiple permissions can be defined by combining the values. For example, to change the Read and Write permissions for a role, use RW.
--o Provide the operation to be performed: - add: Adds the permissions defined in the --p operation.
- remove: Removes the permissions defined in the --p operation.
- reset: Resets the permissions defined in the --p operation.
--f Provide the name of the feed file containing a list of each Course ID, role, permission, operation, and recursive flag. For example:
courseId1|Instructor|RDM|add|y
courseId2|Course Builder|RD|reset|n
The Feed file option allows administrators to specify any group of courses they want to run the operation against inside a file they generate. This is essentially a two step process:- Create the feed file using the database.
- Run the command line against the feed file.
The benefit of using a feed file is that administrators will have a record of the courses that the operation was attempted against.
--e Recursive flag "y" or "n" y = the permission changes are made recursively on the course home folder and their sub-folders and files.
n= the permission changes are only made on the course home folder.
Example:
update-course-permission.bat --c Test001 --r Instructor --p RWD --o add
update-course-permission.sh --c Test002 --r 'Course Builder' --p RWDM --o reset
update-course-permission.bat --c Test003 --r Student --p RW --o remove
update-course-permission.sh --d DATA_SOURCE_BUID --r Instructor --p RDM --o reset
update-course-permission.bat --f c:\feedfile.txt - Change the permissions for a single course:
Change permissions for the /courses directory
The update-all-course-hd-permission command enables administrators to change permissions for the /courses directory.
- From a command line, change to the following directory, where BLACKBOARD is the Blackboard Learn installation location:
UNIX Syntax: cd $BLACKBOARD_HOME/apps/bbcms/binWindows Syntax: cd C:\%BLACKBOARD_HOME%\apps\bbcms\bin
- From this directory, type the command using the appropriate operation:
update-all-course-hd-permission.[sh|bat] --r ROLE --p PERMISSIONS --o OPERATION
Change Permissions in /courses Directory Commands Operation Description --r Provide the name of the role to have its permission changed as defined in the --o and --p operations. --p Provide the permissions to be added, removed, or reset as defined in the --o operation. Valid values: - R: read
- W: write
- D: delete
- M: manage
Multiple permissions can be defined by combining the values. For example, to change the Read and Write permissions for a role, use RW.
--o Provide the operation to be performed: - add: Adds the permissions defined in the --p operation.
- remove: Removes the permissions defined in the --p operation.
- reset: Resets the permissions defined in the --p operation.
--e Recursive flag "y" or "n"
y = the permission changes are made recursively on the course home folder and their sub-folders and files.
n= the permission changes are only made on the course home folder.Example:
update-all-course-hd-permission.bat --r Instructor --p RWD --e n --o add
update-all-course-hd-permission.sh --r 'Course Builder' --p RWDM --e y --o reset
update-all-course-hd-permission.bat --r Student --p RW --e y --o remove
Move content from one or more courses
When upgrading from a release of Blackboard Learn prior to 9.1, administrators can move existing course content to the Course Files directory to take advantage of its capabilities. The MoveCourseContent command enables administrators to perform a batch move of course content to Course Files. All content moved to Course Files is stored in a subfolder of the /courses/CourseID directory. The subfolder is named using the following format: Course_ ID_ImportedContent_DATETIMESTAMP.
If your institution licenses content management, administrators can define a single destination folder in the Content Collection to which all of the content will be moved. The subfolder is named using the following format: Course_ID_ImportedContent_DATETIMESTAMP.
- From a command line, change to the following directory, where BLACKBOARD is the Blackboard Learn installation location:
UNIX Syntax: cd $BLACKBOARD_HOME/apps/bbcms/bin
Windows Syntax: cd C:\%BLACKBOARD_HOME%\apps\bbcms\bin
- From this directory, type the command using the appropriate operation:
- Move the files for a single course:
MoveCourseContent.[sh|bat] --c COURSE_ID [--p COURSE_DIRECTORY] - Move the files for a group of courses using a batch:
MoveCourseContent.[sh|bat] --b BATCH_UID [--p Course Builder] - Move the files for a group of courses using a data source:
MoveCourseContent.[sh|bat] --d DATA_SOURCE_BUID [--p Course Builder] - Move the files for a group of courses using a feed file:
MoveCourseContent.[sh|bat] --f FEED_FILE_NAME [--p Course Builder]
- Move the files for a single course:
Operation | Description |
---|---|
--c | Provide the Course ID of a course. |
--b | Provide the Batch UID to obtain the list of courses. |
--d | Provide the Data Source Batch UID to obtain the list of courses. |
--f |
Provide the name of the feed file containing a list of each Course ID or Batch UID and its target course directory. The feed file does not use a delimiter, and instead the header must be specified, which in turn details what column is being provided for the course_id or batch_uid. For example: batch_uid or course_id or ***FileHeader
The benefit of using a feed file is that administrators will have a record of the courses that the operation was attempted against. |
--p | To move the content to a location other than the default course directory, provide the target directory. |
Example:
MoveCourseContent.sh --c Course001
MoveCourseContent.sh --c Course002 --p /institution/Course002<
MoveCourseContent.bat --b BATCH_UID
MoveCourseContent.bat --d DATA_SOURCE_BUID
MoveCourseContent.bat --f c:\feedfile.txt --p c:\institution\All