@@ -158,6 +158,39 @@ def get_course(id, fields: nil, quota_user: nil, options: nil, &block)
158158 execute_or_queue_command ( command , &block )
159159 end
160160
161+ # Returns the grading period settings in a course. This method returns the
162+ # following error codes: * `PERMISSION_DENIED` if the requesting user isn't
163+ # permitted to access the grading period settings in the requested course or for
164+ # access errors. * `NOT_FOUND` if the requested course does not exist.
165+ # @param [String] course_id
166+ # Required. The identifier of the course.
167+ # @param [String] fields
168+ # Selector specifying which fields to include in a partial response.
169+ # @param [String] quota_user
170+ # Available to use for quota purposes for server-side applications. Can be any
171+ # arbitrary string assigned to a user, but should not exceed 40 characters.
172+ # @param [Google::Apis::RequestOptions] options
173+ # Request-specific options
174+ #
175+ # @yield [result, err] Result & error if block supplied
176+ # @yieldparam result [Google::Apis::ClassroomV1::GradingPeriodSettings] parsed result object
177+ # @yieldparam err [StandardError] error object if request failed
178+ #
179+ # @return [Google::Apis::ClassroomV1::GradingPeriodSettings]
180+ #
181+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
182+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
183+ # @raise [Google::Apis::AuthorizationError] Authorization is required
184+ def get_course_grading_period_settings ( course_id , fields : nil , quota_user : nil , options : nil , &block )
185+ command = make_simple_command ( :get , 'v1/courses/{courseId}/gradingPeriodSettings' , options )
186+ command . response_representation = Google ::Apis ::ClassroomV1 ::GradingPeriodSettings ::Representation
187+ command . response_class = Google ::Apis ::ClassroomV1 ::GradingPeriodSettings
188+ command . params [ 'courseId' ] = course_id unless course_id . nil?
189+ command . query [ 'fields' ] = fields unless fields . nil?
190+ command . query [ 'quotaUser' ] = quota_user unless quota_user . nil?
191+ execute_or_queue_command ( command , &block )
192+ end
193+
161194 # Returns a list of courses that the requesting user is permitted to view,
162195 # restricted to those that match the request. Returned courses are ordered by
163196 # creation time, with the most recently created coming first. This method
@@ -303,6 +336,59 @@ def update_course(id, course_object = nil, fields: nil, quota_user: nil, options
303336 execute_or_queue_command ( command , &block )
304337 end
305338
339+ # Updates grading period settings of a course. Individual grading periods can be
340+ # added, removed, or modified using this method. The requesting user and course
341+ # owner must be eligible to modify Grading Periods. For details, see [licensing
342+ # requirements](https://developers.google.com/classroom/grading-periods/manage-
343+ # grading-periods#licensing_requirements). This method returns the following
344+ # error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to
345+ # modify the grading period settings in a course or for access errors: *
346+ # UserIneligibleToUpdateGradingPeriodSettings * `INVALID_ARGUMENT` if the
347+ # request is malformed. * `NOT_FOUND` if the requested course does not exist.
348+ # @param [String] course_id
349+ # Required. The identifier of the course.
350+ # @param [Google::Apis::ClassroomV1::GradingPeriodSettings] grading_period_settings_object
351+ # @param [String] update_mask
352+ # Mask that identifies which fields in the GradingPeriodSettings to update. The
353+ # GradingPeriodSettings `grading_periods` list will be fully replaced by the
354+ # grading periods specified in the update request. For example: * Grading
355+ # periods included in the list without an ID are considered additions, and a new
356+ # ID will be assigned when the request is made. * Grading periods that currently
357+ # exist, but are missing from the request will be considered deletions. *
358+ # Grading periods with an existing ID and modified data are considered edits.
359+ # Unmodified data will be left as is. * Grading periods included with an unknown
360+ # ID will result in an error. The following fields may be specified: * `
361+ # grading_periods` * `apply_to_existing_coursework`
362+ # @param [String] fields
363+ # Selector specifying which fields to include in a partial response.
364+ # @param [String] quota_user
365+ # Available to use for quota purposes for server-side applications. Can be any
366+ # arbitrary string assigned to a user, but should not exceed 40 characters.
367+ # @param [Google::Apis::RequestOptions] options
368+ # Request-specific options
369+ #
370+ # @yield [result, err] Result & error if block supplied
371+ # @yieldparam result [Google::Apis::ClassroomV1::GradingPeriodSettings] parsed result object
372+ # @yieldparam err [StandardError] error object if request failed
373+ #
374+ # @return [Google::Apis::ClassroomV1::GradingPeriodSettings]
375+ #
376+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
377+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
378+ # @raise [Google::Apis::AuthorizationError] Authorization is required
379+ def update_course_grading_period_settings ( course_id , grading_period_settings_object = nil , update_mask : nil , fields : nil , quota_user : nil , options : nil , &block )
380+ command = make_simple_command ( :patch , 'v1/courses/{courseId}/gradingPeriodSettings' , options )
381+ command . request_representation = Google ::Apis ::ClassroomV1 ::GradingPeriodSettings ::Representation
382+ command . request_object = grading_period_settings_object
383+ command . response_representation = Google ::Apis ::ClassroomV1 ::GradingPeriodSettings ::Representation
384+ command . response_class = Google ::Apis ::ClassroomV1 ::GradingPeriodSettings
385+ command . params [ 'courseId' ] = course_id unless course_id . nil?
386+ command . query [ 'updateMask' ] = update_mask unless update_mask . nil?
387+ command . query [ 'fields' ] = fields unless fields . nil?
388+ command . query [ 'quotaUser' ] = quota_user unless quota_user . nil?
389+ execute_or_queue_command ( command , &block )
390+ end
391+
306392 # Creates an alias for a course. This method returns the following error codes: *
307393 # `PERMISSION_DENIED` if the requesting user is not permitted to create the
308394 # alias or for access errors. * `NOT_FOUND` if the course does not exist. * `
@@ -1310,9 +1396,7 @@ def modify_course_course_work_assignees(course_id, id, modify_course_work_assign
13101396 # CourseWork` object, an `INVALID_ARGUMENT` error is returned. The following
13111397 # fields may be specified by teachers: * `title` * `description` * `state` * `
13121398 # due_date` * `due_time` * `max_points` * `scheduled_time` * `
1313- # submission_modification_mode` * `topic_id` * `grading_period_id` Available in [
1314- # V1_20240401_PREVIEW](https://developers.google.com/classroom/reference/preview)
1315- # and later.
1399+ # submission_modification_mode` * `topic_id` * `grading_period_id`
13161400 # @param [String] fields
13171401 # Selector specifying which fields to include in a partial response.
13181402 # @param [String] quota_user
0 commit comments