WiseNET.API - Student's Course Enrolments Endpoint

From Wisenet Resource Centre
Jump to: navigation, search


The Wise.NET Student's CourseIn Wise.NET a course is usually a qualification or short course Enrolments endpoint allows your applications to get information about course enrolments for a student.

This page is a part of WiseNET API: Developer Resources.

Contents

Related Endpoints

CourseIn Wise.NET a course is usually a qualification or short course Enrolment Properties

See Course Enrolments.

List All CourseIn Wise.NET a course is usually a qualification or short course Enrolments for Student

GET /students/student/{id}/courseenrolments

Returns the list of course enrolments for the student with the given {id}

Sample request:

 curl _X GET \
   -H 'Accept: application/vnd.mywisenet.api.v1+xml' \
   https://tst-api.wisenet.co/students/student/3/courseenrolments

Sample response:

  <CourseEnrolmentSet xmlns="http://api.mywisenet.com.au/v1/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <SetCount>1</SetCount>
    <CourseEnrolments>
      <CourseEnrolment>
        <CourseCode>CO1</CourseCode>
        <CourseEnrolmentId>1</CourseEnrolmentId>
        <CourseOffer>
          <CourseEnrolmentsLink>
            <Href>courseoffers/enrolments</Href>
            <Rel>self</Rel>
            <Title>All CourseEnrolments</Title>
          </CourseEnrolmentsLink>
          <CourseId>0</CourseId>
          <CourseOfferId>1</CourseOfferId>
          <Link>
            <Href>courseoffers/courseoffer/1</Href>
            <Rel>self</Rel>
            <Title>08VUCHO3 - CERTIFICATE II IN HOSPITALITY (OPERATIONS)</Title>
          </Link>
          <OfferCode>08VUCHO3</OfferCode>
          <OfferDescription>CERTIFICATE II IN HOSPITALITY (OPERATIONS)</OfferDescription>
          <UrlEnrol i:nil="true"/>
        </CourseOffer>
        <EnrolmentStatus>
          <Code>1</Code>
          <Description>Cancelled - No Penalty</Description>
        </EnrolmentStatus>
        <LastUpdated>2011-12-13T09:18:39.123</LastUpdated>
        <Link>
          <Href>courseoffers/enrolments/enrolment/1</Href>
          <Rel>self</Rel>
          <Title>STD0000001: 08VUCHO3 - CERTIFICATE II IN HOSPITALITY (OPERATIONS)</Title>
        </Link>
        <MoodleAccessEnabled>true</MoodleAccessEnabled>
        <PeriodEnrolled>
          <EndDate>2011-10-04T00:00:00</EndDate>
          <StartDate>2011-09-04T00:00:00</StartDate>
        </PeriodEnrolled>
        <Student>
          <EmailAddress>fitzwilliam@darcy.com.au</EmailAddress>
          <FirstName>Fitzwilliam</FirstName>
          <LastName>Darcy</LastName>
          <LastUpdated>2011-12-13T09:18:39.123</LastUpdated>
          <Link>
            <Href>students/student/1</Href>
            <Rel>self</Rel>
            <Title>STD0000001: Fitzwilliam Darcy</Title>
          </Link>
          <RefInternalUnique student identifier automatically produced by Wise.NET. Compare RefExternal>STD0000001</RefInternalUnique student identifier automatically produced by Wise.NET. Compare RefExternal>
          <StudentId>1</StudentId>
          <Username>fitzwilliam@darcy.com.au</Username>
        </Student>
        <StudyMode>
          <Code>FT</Code>
          <Description>Full Time (FT)</Description>
        </StudyMode>
      </CourseEnrolment>
    </CourseEnrolments>
    <Link>
      <Href>/courseoffers/enrolments</Href>
      <Rel>self</Rel>
      <Title>Enrolments</Title>
    </Link>
  </CourseEnrolmentSet>

C# Code Sample

public static void GetCourseEnrolmentsSample()
{
    const string url = "https://tst-api.wisenet.co/students/student/{id}/courseenrolments";
 
    var request = HttpWebRequest.Create(url) as HttpWebRequest;
    request.Accept = "application/vnd.mywisenet.api.v1+xml";
    request.Method = "GET";
    request.UserAgent = "C# Sample ClientIn Wise.NET a client is a student, trainee or apprentice";
 
    try
    {
        // Get response  
        using (var response = request.GetResponse() as HttpWebResponse)
        {
            // Get the response stream  
            using (var responseReader = new StreamReader(response.GetResponseStream()))
            {
                string responseBody = responseReader.ReadToEnd();
 
                // Console application output  
                Console.WriteLine(responseBody);
            }
        }
    }
    catch (WebException ex)
    {
        Console.WriteLine("Error: {0}", ex.Message);
    }
}

List modified CourseIn Wise.NET a course is usually a qualification or short course Enrolments for Student

GET /students/student/{id}/courseenrolments

Set the If-Modified-Since header in the HTTP request. The date must be in UTC format.

Returns the list of course enrolments for the specified student {id} created or modified since the specified date.

The CourseIn Wise.NET a course is usually a qualification or short course Enrolments endpoint will filter on the <LastAuditTimestamp> field and enrolled <StudentId> of each enrolment. The <LastAuditTimestamp> field is set to the current UTC date whenever an enrolment is created or edited.

Sample request:

 curl _X GET \
   -H 'Accept: application/vnd.mywisenet.api.v1+xml' \
   -H 'If-Modified-Since: Fri, 8 Jul 2011 1:43:31 GMT' \
   https://tst-api.wisenet.co/students/student/3/courseenrolments

Response format would be the same as for the List All CourseIn Wise.NET a course is usually a qualification or short course Enrolments for Student command.

Note: We would recommend that all calls to list CourseIn Wise.NET a course is usually a qualification or short course Enrolments from the API use this If-Modified-Since parameter.

C# Code Sample

private static void GetIfModifiedSinceSample()
{
    const string url = "https://tst-api.wisenet.co/students/student/3/courseenrolments";
 
    var request = HttpWebRequest.Create(url) as HttpWebRequest;
    request.Accept = "application/vnd.mywisenet.api.v1+xml";
    request.IfModifiedSince = DateTime.Now.AddDays(-1);
    request.Method = "GET";
    request.UserAgent = "C# Sample ClientIn Wise.NET a client is a student, trainee or apprentice";
 
    try
    {
        // Get response  
        using (var response = request.GetResponse() as HttpWebResponse)
        {
            // Get the response stream  
            using (var responseReader = new StreamReader(response.GetResponseStream()))
            {
                string responseBody = responseReader.ReadToEnd();
 
                // Console application output  
                Console.WriteLine(responseBody);
            }
        }
    }
    catch (WebException ex)
    {
        Console.WriteLine("Error: {0}", ex.Message);
    }
}
Personal tools
Namespaces
Variants
Actions
Navigation
Translate
Wisenet Getting Started
Learning Relationship Management
Learner App
Trainer Portal
Wise.NET Portal
CRM
eLearning
Surveys
Finance
Application Integration
Compliance: Australia
Compliance: New Zealand
Developer Resources
Toolbox