/// <summary> /// Creates a new gradebook instance using dependency injection. /// </summary> /// <param name="ltiApi">LTI API communication object.</param> /// <param name="options">Configuration parameters.</param> public MoodleGradebook(IMoodleLtiApi ltiApi, IOptions <MoodleLtiOptions> options) : this(options.Value.ResourceLinkId) { _ltiApi = ltiApi; }
/// <summary> /// Creates a new gradebook instance using the given configuration paramaters. /// </summary> /// <param name="httpClient">The HTTP client object to use for the requests.</param> /// <param name="baseUrl">The URL of the Moodle instance.</param> /// <param name="courseId">The ID of the affected Moodle course.</param> /// <param name="toolTypeId">The ID of the external tool definition.</param> /// <param name="resourceLinkId">The ID of the external tool instance.</param> /// <param name="consumerKey">The OAuth consumer key to use for signing the requests.</param> /// <param name="sharedSecret">The OAuth shared secret to use for signing the requests.</param> public MoodleGradebook(HttpClient httpClient, string baseUrl, int courseId, int toolTypeId, string resourceLinkId, string consumerKey, string sharedSecret) : this(resourceLinkId) { // Create API connection object _ltiApi = new MoodleLtiApi(httpClient, baseUrl, courseId, toolTypeId, consumerKey, sharedSecret); }
/// <summary> /// Creates a new gradebook instance using dependency injection. /// </summary> /// <param name="ltiApi">LTI API communication object.</param> /// <param name="options">Configuration parameters.</param> public CachedMoodleGradebook(IMoodleLtiApi ltiApi, IOptions <MoodleLtiOptions> options) : base(ltiApi, options) { }