original_string: public static function get_updates_since($courseid, $since, $filter = array()) {
          global $CFG, $DB;
  
          $params = self::validate_parameters(
              self::get_updates_since_parameters(),
              array(
                  'courseid' => $courseid,
                  'since' => $since,
                  'filter' => $filter,
              )
          );
  
          $course = get_course($params['courseid']);
          $modinfo = get_fast_modinfo($course);
          $tocheck = array();
  
          // Retrieve all the visible course modules for the current user.
          $cms = $modinfo->get_cms();
          foreach ($cms as $cm) {
              if (!$cm->uservisible) {
                  continue;
              }
              $tocheck[] = array(
                  'id' => $cm->id,
                  'contextlevel' => 'module',
                  'since' => $params['since'],
              );
          }
  
          return self::check_updates($course->id, $tocheck, $params['filter']);
      }
code: public static function get_updates_since($courseid, $since, $filter = array()) {
          global $CFG, $DB;
  
          $params = self::validate_parameters(
              self::get_updates_since_parameters(),
              array(
                  'courseid' => $courseid,
                  'since' => $since,
                  'filter' => $filter,
              )
          );
  
          $course = get_course($params['courseid']);
          $modinfo = get_fast_modinfo($course);
          $tocheck = array();
  
          // Retrieve all the visible course modules for the current user.
          $cms = $modinfo->get_cms();
          foreach ($cms as $cm) {
              if (!$cm->uservisible) {
                  continue;
              }
              $tocheck[] = array(
                  'id' => $cm->id,
                  'contextlevel' => 'module',
                  'since' => $params['since'],
              );
          }
  
          return self::check_updates($course->id, $tocheck, $params['filter']);
      }
code_tokens: public static function get_updates_since ( $ courseid , $ since , $ filter = array ( ) ) { global $ CFG , $ DB ; $ params = self :: validate_parameters ( self :: get_updates_since_parameters ( ) , array ( 'courseid' => $ courseid , 'since' => $ since , 'filter' => $ filter , ) ) ; $ course = get_course ( $ params [ 'courseid' ] ) ; $ modinfo = get_fast_modinfo ( $ course ) ; $ tocheck = array ( ) ; // Retrieve all the visible course modules for the current user. $ cms = $ modinfo -> get_cms ( ) ; foreach ( $ cms as $ cm ) { if ( ! $ cm -> uservisible ) { continue ; } $ tocheck [ ] = array ( 'id' => $ cm -> id , 'contextlevel' => 'module' , 'since' => $ params [ 'since' ] , ) ; } return self :: check_updates ( $ course -> id , $ tocheck , $ params [ 'filter' ] ) ; }
docstring: Check if there are updates affecting the user for the given course since the given time stamp.
  
  This function is a wrapper of self::check_updates for retrieving all the updates since a given time for all the activities.
  
  @param int $courseid the list of modules to check
  @param int $since check updates since this time stamp
  @param array $filter check only for updates in these areas
  @return array list of updates and warnings
  @throws moodle_exception
  @since Moodle 3.3
docstring_tokens: Check if there are updates affecting the user for the given course since the given time stamp .