function ws_assignQuotaToCourse($assignments)
{
    try {
        $params = array('assignment' => $assignments);
        $client = new SoapClient(WSDL_QS, array('location' => LOCATION_QS));
        $response = $client->assignQuotaToCourse($params);
        $result = $response->assignment;
    } catch (Exception $e) {
        $result = $assignments;
    } catch (SoapFault $soapfault) {
        $result = $assignments;
    }
    return $result;
}