2323from  canvasapi .grading_period  import  GradingPeriod 
2424from  canvasapi .grading_standard  import  GradingStandard 
2525from  canvasapi .license  import  License 
26+ from  canvasapi .lti_resource_link  import  LTIResourceLink 
2627from  canvasapi .module  import  Module 
27- from  canvasapi .new_quiz  import  NewQuiz 
28+ from  canvasapi .new_quiz  import  AccommodationResponse ,  NewQuiz 
2829from  canvasapi .outcome_import  import  OutcomeImport 
2930from  canvasapi .page  import  Page 
3031from  canvasapi .paginated_list  import  PaginatedList 
3132from  canvasapi .progress  import  Progress 
3233from  canvasapi .quiz  import  QuizExtension 
3334from  canvasapi .rubric  import  Rubric , RubricAssociation 
35+ from  canvasapi .searchresult  import  SearchResult 
3436from  canvasapi .submission  import  GroupedSubmission , Submission 
3537from  canvasapi .tab  import  Tab 
3638from  canvasapi .todo  import  Todo 
@@ -439,6 +441,39 @@ def create_late_policy(self, **kwargs):
439441
440442        return  LatePolicy (self ._requester , late_policy_json ["late_policy" ])
441443
444+     def  create_lti_resource_link (self , url , title = None , custom = None , ** kwargs ):
445+         """ 
446+         Create a new LTI resource link. 
447+ 
448+         :calls: `POST /api/v1/courses/:course_id/lti_resource_links \  
449+ 
450+ 
451+         :param url: The launch URL for the resource link. 
452+         :type url: `str` 
453+         :param title: The title of the resource link. 
454+         :type title: `str`, optional 
455+         :param custom: Custom parameters to send to the tool. 
456+         :type custom: `dict`, optional 
457+ 
458+         :rtype: :class:`canvasapi.lti_resource_link.LTIResourceLink` 
459+         """ 
460+ 
461+         if  not  url :
462+             raise  RequiredFieldMissing ("url is required as a str." )
463+ 
464+         kwargs ["url" ] =  url 
465+         if  title :
466+             kwargs ["title" ] =  title 
467+         if  custom :
468+             kwargs ["custom" ] =  custom 
469+ 
470+         response  =  self ._requester .request (
471+             "POST" ,
472+             f"courses/{ self .id }  ,
473+             _kwargs = combine_kwargs (** kwargs ),
474+         )
475+         return  LTIResourceLink (self ._requester , response .json ())
476+ 
442477    def  create_module (self , module , ** kwargs ):
443478        """ 
444479        Create a new module. 
@@ -1646,6 +1681,49 @@ def get_licenses(self, **kwargs):
16461681            _kwargs = combine_kwargs (** kwargs ),
16471682        )
16481683
1684+     def  get_lti_resource_link (self , lti_resource_link , ** kwargs ):
1685+         """ 
1686+         Return details about the specified resource link. 
1687+ 
1688+         :calls: `GET /api/v1/courses/:course_id/lti_resource_links/:id \  
1689+ 
1690+ 
1691+         :param lti_resource_link: The object or ID of the LTI resource link. 
1692+         :type lti_resource_link: :class:`canvasapi.lti_resource_link.LTIResourceLink` or int 
1693+ 
1694+         :rtype: :class:`canvasapi.lti_resource_link.LTIResourceLink` 
1695+         """ 
1696+ 
1697+         lti_resource_link_id  =  obj_or_id (
1698+             lti_resource_link , "lti_resource_link" , (LTIResourceLink ,)
1699+         )
1700+ 
1701+         response  =  self ._requester .request (
1702+             "GET" ,
1703+             f"courses/{ self .id } { lti_resource_link_id }  ,
1704+             _kwargs = combine_kwargs (** kwargs ),
1705+         )
1706+         return  LTIResourceLink (self ._requester , response .json ())
1707+ 
1708+     def  get_lti_resource_links (self , ** kwargs ):
1709+         """ 
1710+         Returns all LTI resource links for this course as a PaginatedList. 
1711+ 
1712+         :calls: `GET /api/v1/courses/:course_id/lti_resource_links \  
1713+ 
1714+ 
1715+         :rtype: :class:`canvasapi.paginated_list.PaginatedList` of 
1716+             :class:`canvasapi.lti_resource_link.LTIResourceLink` 
1717+         """ 
1718+ 
1719+         return  PaginatedList (
1720+             LTIResourceLink ,
1721+             self ._requester ,
1722+             "GET" ,
1723+             f"courses/{ self .id }  ,
1724+             kwargs = combine_kwargs (** kwargs ),
1725+         )
1726+ 
16491727    def  get_migration_systems (self , ** kwargs ):
16501728        """ 
16511729        Return a list of migration systems. 
@@ -1769,7 +1847,7 @@ def get_new_quiz(self, assignment, **kwargs):
17691847
17701848    def  get_new_quizzes (self , ** kwargs ):
17711849        """ 
1772-         Get a list of new quizzes. 
1850+         Get a list of new quizzes in this course . 
17731851
17741852        :calls: `GET /api/quiz/v1/courses/:course_id/quizzes \  
17751853
@@ -1784,6 +1862,7 @@ def get_new_quizzes(self, **kwargs):
17841862            self ._requester ,
17851863            "GET" ,
17861864            endpoint ,
1865+             {"course_id" : self .id },
17871866            _url_override = "new_quizzes" ,
17881867            _kwargs = combine_kwargs (** kwargs ),
17891868        )
@@ -2577,6 +2656,33 @@ def resolve_path(self, full_path=None, **kwargs):
25772656                _kwargs = combine_kwargs (** kwargs ),
25782657            )
25792658
2659+     def  set_new_quizzes_accommodations (self , accommodations , ** kwargs ):
2660+         """ 
2661+         Apply accommodations to New Quizzes at the **course level** for 
2662+         students enrolled in this course. 
2663+ 
2664+         :calls: `POST /api/quiz/v1/courses/:course_id/accommodations \  
2665+ 
2666+ 
2667+         :param accommodations: A list of dictionaries containing accommodation details 
2668+             for each user. Each dictionary must contain `user_id` and can optionally include 
2669+             `extra_time`, `apply_to_in_progress_quiz_sessions`, and/or `reduce_choices_enabled`. 
2670+         :type accommodations: list of dict 
2671+ 
2672+         :returns: AccommodationResponse object containing the status of the accommodation request. 
2673+         :rtype: :class:`canvasapi.new_quiz.AccommodationResponse` 
2674+         """ 
2675+         endpoint  =  "courses/{}/accommodations" .format (self .id )
2676+ 
2677+         response  =  self ._requester .request (
2678+             "POST" ,
2679+             endpoint ,
2680+             _url = "new_quizzes" ,
2681+             _kwargs = combine_kwargs (** kwargs ),
2682+             json = accommodations ,
2683+         )
2684+         return  AccommodationResponse (self ._requester , response .json ())
2685+ 
25802686    def  set_quiz_extensions (self , quiz_extensions , ** kwargs ):
25812687        """ 
25822688        Set extensions for student all quiz submissions in a course. 
@@ -2668,6 +2774,32 @@ def show_front_page(self, **kwargs):
26682774
26692775        return  Page (self ._requester , page_json )
26702776
2777+     def  smartsearch (self , q , ** kwargs ):
2778+         """ 
2779+         AI-powered course content search. 
2780+ 
2781+         :calls: `GET /api/v1/courses/:course_id/smartsearch \  
2782+ 
2783+ 
2784+         :param q: The search query string. 
2785+         :type q: str 
2786+         :param kwargs: Optional query parameters (e.g., filter, per_page). 
2787+         :type kwargs: dict 
2788+         :rtype: :class:`canvasapi.paginated_list.PaginatedList` of 
2789+             :class:`canvasapi.searchresult.SearchResult` 
2790+         """ 
2791+         kwargs ["q" ] =  q 
2792+ 
2793+         return  PaginatedList (
2794+             SearchResult ,
2795+             self ._requester ,
2796+             "GET" ,
2797+             f"courses/{ self .id }  ,
2798+             {"course_id" : self .id },
2799+             _root = "results" ,
2800+             _kwargs = combine_kwargs (** kwargs ),
2801+         )
2802+ 
26712803    def  submissions_bulk_update (self , ** kwargs ):
26722804        """ 
26732805        Update the grading and comments on multiple student's assignment 
0 commit comments