Skip to main content

Module copying

Module copying 

Source

StructsΒ§

ContentRewrite πŸ”’
Points references inside copied block content at the copy.

FunctionsΒ§

changed_rows πŸ”’
The ids and rewritten values of the rows whose value rewrite changes.
copy_certificate_configurations_and_requirements πŸ”’
copy_chatbot_configurations πŸ”’
Returns the ids of the copied configurations.
copy_cheater_thresholds πŸ”’
copy_code_giveaways πŸ”’
Copies the giveaways without their codes and returns the copies’ ids. Must run after the modules and the research consent questions are copied.
copy_course
copy_course_chapters πŸ”’
After this one set_chapter_front_pages needs to be called to get these to point to the correct front pages.
copy_course_custom_privacy_policy_checkbox_texts πŸ”’
copy_course_exercises πŸ”’
Copies the exercises of the copied pages and returns the copies’ ids.
copy_course_modules πŸ”’
Returns the ids of the copied modules.
copy_course_pages_and_return_contents πŸ”’
Skips pages of deleted chapters: chapter deletion once left the pages in place.
copy_course_with_language_group
copy_email_templates πŸ”’
copy_exam
copy_exam_content πŸ”’
copy_exam_exercises πŸ”’
Copies the exercises of the copied exam pages and returns the copies’ ids.
copy_exam_pages_and_return_contents πŸ”’
copy_exercise_repositories πŸ”’
copy_exercise_slides πŸ”’
copy_exercise_tasks πŸ”’
copy_glossary_entries πŸ”’
copy_material_references πŸ”’
copy_page_audio_files πŸ”’
The copies share the stored audio files with the source pages.
copy_partners_blocks πŸ”’
copy_peer_or_self_review_configs πŸ”’
copy_peer_or_self_review_questions πŸ”’
copy_privacy_links πŸ”’
copy_research_consent_forms_and_questions πŸ”’
Returns the ids of the copied questions. The form content still names the source questions until it goes through ContentRewrite.
copy_user_permissions
insert_page_history_for_copies πŸ”’
Records each copied page’s final state as its first history entry, as saving it in the CMS would. The chatbot syncer only indexes pages that have one.
rewrite_course_links πŸ”’
Rewrites /courses/<source_slug> link targets in value: whole url/href attributes, and href values inside HTML strings. Visible text is left alone.
rewrite_course_path πŸ”’
rewrite_course_texts πŸ”’
Applies content_rewrite to the copied course’s block content and links outside pages.
rewrite_html_hrefs πŸ”’
rewrite_page_contents πŸ”’
set_chapter_front_pages πŸ”’
A chapter whose front page was not copied is left without one.