original_string: static protected function build_course_plan($controller, $id) {
  
          $plan = $controller->get_plan();
  
          // Add the course task, responsible for outputting
          // all the course related information
          $plan->add_task(backup_factory::get_backup_course_task($controller->get_format(), $id));
  
          // For the given course, add as many section tasks as necessary
          $sections = backup_plan_dbops::get_sections_from_courseid($id);
          foreach ($sections as $section) {
              self::build_section_plan($controller, $section);
          }
  
          // For the given course, add as many block tasks as necessary
          $blockids = backup_plan_dbops::get_blockids_from_courseid($id);
          foreach ($blockids as $blockid) {
              $plan->add_task(backup_factory::get_backup_block_task($controller->get_format(), $blockid));
          }
      }
code: static protected function build_course_plan($controller, $id) {
  
          $plan = $controller->get_plan();
  
          // Add the course task, responsible for outputting
          // all the course related information
          $plan->add_task(backup_factory::get_backup_course_task($controller->get_format(), $id));
  
          // For the given course, add as many section tasks as necessary
          $sections = backup_plan_dbops::get_sections_from_courseid($id);
          foreach ($sections as $section) {
              self::build_section_plan($controller, $section);
          }
  
          // For the given course, add as many block tasks as necessary
          $blockids = backup_plan_dbops::get_blockids_from_courseid($id);
          foreach ($blockids as $blockid) {
              $plan->add_task(backup_factory::get_backup_block_task($controller->get_format(), $blockid));
          }
      }
code_tokens: static protected function build_course_plan ( $ controller , $ id ) { $ plan = $ controller -> get_plan ( ) ; // Add the course task, responsible for outputting // all the course related information $ plan -> add_task ( backup_factory :: get_backup_course_task ( $ controller -> get_format ( ) , $ id ) ) ; // For the given course, add as many section tasks as necessary $ sections = backup_plan_dbops :: get_sections_from_courseid ( $ id ) ; foreach ( $ sections as $ section ) { self :: build_section_plan ( $ controller , $ section ) ; } // For the given course, add as many block tasks as necessary $ blockids = backup_plan_dbops :: get_blockids_from_courseid ( $ id ) ; foreach ( $ blockids as $ blockid ) { $ plan -> add_task ( backup_factory :: get_backup_block_task ( $ controller -> get_format ( ) , $ blockid ) ) ; } }
docstring: Build one 1-course backup
docstring_tokens: Build one 1 - course backup