Eval25 Grade Hook Implementation

The Eval25 Course Evaluation System contains the optional CollegeNET's Grade Hook web service. Grade Hook automatically checks the CollegeNET database to verify that a student has completed all evaluations for a term. Once it is determined that all evaluations are complete, then a student is given early access to their grades. 

Accessing Grade Hook

CollegeNET provides a SOAP service method to check if a given student has any incomplete evaluations in any open sessions or evaluation periods. Essentially, you provide the Grade Hook service with a StudentID and a termID/sessionID, and this will return one of the following two Boolean values:

  • True (1) — Is returned if the student has completed all evaluations in the evaluation period.
  • False (0) — Is returned if the student has not completed all evaluations in the evaluation period, or the student has no evaluations in the period.

Grade Hook service access

CollegeNET also provides a SOAP interface for sending student and evaluation period information.

Note: CollegeNET has three different versions of the Grade Hook services. As shown in the following table, the Methods are for:

  • Method 1 — the given term
  • Method 2 — the given session in the given term
  • Method 3 — the open sessions in the given term

As noted above, the interface requires a username and password, and can be accessed via the following:

WSDL

https://pubsoap.applyweb.com/evaluations/Grade Hook?wsdl

URL

https://pubsoap.applyweb.com/evaluations/Grade Hook

Method 1isCompleted(String EMPLID, String TermID)
Method 2isCompleted(String EMPLID, String TermID, String sessionID)
Method 3isCompleted(String EMPLID, String TermID, boolean checkOpenSessions)


If the third parameter is True (1), the service only checks the evaluations in open sessions and does not check evaluations from past or for future sessions. If there are no sessions in the given term, then the service checks all evaluations in the given term.

Sample Scripts

The following samples of Java and Perl scripts can be modified to connect with Grade Hook.

Java

The following is the sample Java script.

import java.net.URL;
import javax.servlet.http.HttpServletRequest;
import javax.xml.namespace.QName;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;

public class Grade Hook {
      /**
      * Invokes the Eval25*                 Grade Hook SOAP Service.
      
      * @param userId, Your user’s unique id
      * @param termId
      * @return whether the student has completed all of their evaluations for the given term
      */
      public boolean hasCompletedEvaluation(String userId, String termId) throws Exception {
           String username = "..."; // To auth your system to Applyweb
           String password = "..."; // To auth your system to Applyweb
           String target = "https://pubsoap.applyweb.com/evaluations/Grade Hook";
           
           String qname = "http://com.collegenet/";
           String method = "isCompleted";

           Call call = (Call) new Service().createCall();
           call.setUsername(username);
           call.setPassword(password);
           call.setTargetEndpointAddress(new URL(target));
           call.setOperationName(new QName(qname, method));

           return (Boolean) call.invoke(new Object[] { userId, termId });

       }

}

Perl

The follow is the sample Perl script.

#!/usr/bin/perl

use strict;
use SOAP::Lite;

my $userId = "..."; # Your user’s unique id
my $termId = "..."; # termId
my $completed = hasCompletedEvaluation($userId, $termId);

sub hasCompletedEvaluation {
     my $id = SOAP::Data->type(string => shift);
     my $termId = SOAP::Data->type(string => shift);
     my $username = "..."; # To auth your system to Applyweb
     my $password = "..."; # To auth your system to Applyweb

     my $proxy = "https://"; 
        $proxy .= $username . ":" . $password; 
        $proxy .= "\@pubsoap.applyweb.com/evaluations/Grade Hook";

     my $response = SOAP::Lite

          -> uri('http://com.collegenet/')
          -> proxy($proxy)
          -> isCompleted( $id, $termId )
          -> result;

    return $response;
}