original_string: protected function get_grouping_id(\core_availability\info $info) {
          if ($this->activitygrouping) {
              $groupingid = $info->get_course_module()->groupingid;
              if (!$groupingid) {
                  throw new \coding_exception(
                          'Not supposed to be able to turn on activitygrouping when no grouping');
              }
              return $groupingid;
          } else {
              return $this->groupingid;
          }
      }
code: protected function get_grouping_id(\core_availability\info $info) {
          if ($this->activitygrouping) {
              $groupingid = $info->get_course_module()->groupingid;
              if (!$groupingid) {
                  throw new \coding_exception(
                          'Not supposed to be able to turn on activitygrouping when no grouping');
              }
              return $groupingid;
          } else {
              return $this->groupingid;
          }
      }
code_tokens: protected function get_grouping_id ( \ core_availability \ info $ info ) { if ( $ this -> activitygrouping ) { $ groupingid = $ info -> get_course_module ( ) -> groupingid ; if ( ! $ groupingid ) { throw new \ coding_exception ( 'Not supposed to be able to turn on activitygrouping when no grouping' ) ; } return $ groupingid ; } else { return $ this -> groupingid ; } }
docstring: Gets the actual grouping id for the condition. This is either a specified
  id, or a special flag indicating that we use the one for the current cm.
  
  @param \core_availability\info $info Info about context cm
  @return int Grouping id
  @throws \coding_exception If it's set to use a cm but there isn't grouping
docstring_tokens: Gets the actual grouping id for the condition . This is either a specified id or a special flag indicating that we use the one for the current cm .