Download Files from Crocodoc

Introduction

This information is provided to allow Blackboard Learn clients to download data directly from Crocodoc before the end of life of the service on 1/15/2018. After this date, these queries will no longer function. Additionally, these queries can only provide access to data that has been generated to date. Any new data—new documents submitted OR new annotations added to existing documents—created after download will need to be redownloaded.

Keep in mind that the Learn database contains a copy of all documents originally submitted, so most clients will only be concerned with downloading files containing annotations—as files without annotations are available in the Learn DB.

Download only files with annotations from Crocodoc

Use these steps to download only files containing annotations from Crocodoc servers.

  1. Use this query to get a list of papers from the database and save the output to a new file: crocodoc-uuid.txt.
    • If you want everything, leave the query as is.
    • If you want only selected files, just fill in parameters to the where clause.

    select fcd.uuid||';'||cm.course_id||'/'||u.lastname||' '||u.firstname||' - '||u.user_id||'/;'||f.pk1||' - '||f.file_name

    from files_crocodoc_data fcd

    left join files f on f.pk1 = fcd.files_pk1

    left join attempt_files af on af.files_pk1 = f.pk1

    left join attempt a on a.pk1 = af.attempt_pk1

    left join gradebook_grade gg on gg.pk1 = a.gradebook_grade_pk1

    left join course_users cu on cu.pk1 = gg.course_users_pk1

    left join course_main cm on cm.pk1 = cu.crsmain_pk1

    left join users u on u.pk1 = cu.users_pk1

    where fcd.uuid is not null

    --and u.pk1 in () -- user pk1

    --and u.user_id in () -- username

    --and cu.crsmain_pk1 in () -- course pk1

    --and cm.course_id in () -- course id

    ;

  2. Get the Crocodoc license key from the database:

    select registry_value as crocodoc_license

    from system_registry

    where registry_key = 'crocodoc.license.key';

  3. Download the attached script: and make sure that it's saved in the same folder as crocodoc-uuid.txt.
  4. Edit the script and put the Crocodoc license there instead of <Crocodoc_license_here>.

    license=<Crocodoc_license_here>

  5. Run the script:

    ./crocodoc-download-only-annotated.sh

    On Windows, you can use cmder (http://cmder.net/ - Download Full) to run the script. Download it, start it, and open a new bash tab.  Place the script file and crocodoc-uuid.txt in the same location as cmder.exe.

  6. Files are downloaded from Crocodoc and stored within the folder where the script is located.

    Annotated documents are always in PDF format. For example, file.docx is saved as file.docx.pdf


Download all files from Crocodoc

Use these steps to download all files from Crocodoc servers, including files with and without annotations.

  1. Use this query to get a list of papers from the database and save the output to a new file: crocodoc-uuid.txt.
    • If you want everything, leave the query as is.
    • If you want only selected files, just fill in parameters to the where clause.

    select fcd.uuid||';'||cm.course_id||'/'||u.lastname||' '||u.firstname||' - '||u.user_id||'/;'||f.pk1||' - '||f.file_name

    from files_crocodoc_data fcd

    left join files f on f.pk1 = fcd.files_pk1

    left join attempt_files af on af.files_pk1 = f.pk1

    left join attempt a on a.pk1 = af.attempt_pk1

    left join gradebook_grade gg on gg.pk1 = a.gradebook_grade_pk1

    left join course_users cu on cu.pk1 = gg.course_users_pk1

    left join course_main cm on cm.pk1 = cu.crsmain_pk1

    left join users u on u.pk1 = cu.users_pk1

    where fcd.uuid is not null

    --and u.pk1 in () -- user pk1

    --and u.user_id in () -- username

    --and cu.crsmain_pk1 in () -- course pk1

    --and cm.course_id in () -- course id

    ;

  2. Get the Crocodoc license key from the database:

    select registry_value as crocodoc_license

    from system_registry

    where registry_key = 'crocodoc.license.key';

  3. Download the attached script: and make sure that it's saved in the same folder as crocodoc-uuid.txt.
  4. Edit the script and put the Crocodoc license there instead of <Crocodoc_license_here>.

    license=<Crocodoc_license_here>

  5. Run the script:

    ./crocodoc-download-annotated.sh

    On Windows, you can use cmder (http://cmder.net/ - Download Full) to run the script. Download it, start it, and open a new bash tab.  Place the script file and crocodoc-uuid.txt in the same location as cmder.exe.

  6. Files are downloaded from Crocodoc and stored within the folder where the script is located.

    Annotated documents are always in PDF format. For example, file.docx is saved as file.docx.pdf.