original_string: public static function build_course_cache($course) {
          if (empty($course->id)) {
              throw new coding_exception('Object $course is missing required property \id\'');
          }
  
          $lock = self::get_course_cache_lock($course->id);
          try {
              return self::inner_build_course_cache($course, $lock);
          } finally {
              $lock->release();
          }
      }
code: public static function build_course_cache($course) {
          if (empty($course->id)) {
              throw new coding_exception('Object $course is missing required property \id\'');
          }
  
          $lock = self::get_course_cache_lock($course->id);
          try {
              return self::inner_build_course_cache($course, $lock);
          } finally {
              $lock->release();
          }
      }
code_tokens: public static function build_course_cache ( $ course ) { if ( empty ( $ course -> id ) ) { throw new coding_exception ( 'Object $course is missing required property \id\'' ) ; } $ lock = self :: get_course_cache_lock ( $ course -> id ) ; try { return self :: inner_build_course_cache ( $ course , $ lock ) ; } finally { $ lock -> release ( ) ; } }
docstring: Builds and stores in MUC object containing information about course
  modules and sections together with cached fields from table course.
  
  @param stdClass $course object from DB table course. Must have property 'id'
  but preferably should have all cached fields.
  @return stdClass object with all cached keys of the course plus fields modinfo and sectioncache.
  The same object is stored in MUC
  @throws moodle_exception if course is not found (if $course object misses some of the
  necessary fields it is re-requested from database)
docstring_tokens: Builds and stores in MUC object containing information about course modules and sections together with cached fields from table course .