Changeset 761:fd39e894ffbe for src


Ignore:
Timestamp:
02/14/16 14:30:55 (9 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The entry exam status can be and is queried (re #285).

Location:
src/mlx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/rpc.py

    r760 r761  
    257257        return flights
    258258
     259    def getEntryExamStatus(self):
     260        """Get the status of the exams needed for joining MAVA."""
     261        value = self._performCall(lambda sessionID:
     262                                  self._server.getEntryExamStatus(sessionID))
     263        return (value["entryExamPassed"], value["checkFlightStatus"])
     264
    259265    def getFleet(self):
    260266        """Query and return the fleet."""
  • src/mlx/web.py

    r760 r761  
    736736            result.password = self._password
    737737            result.flights = self._client.getFlights()
     738            if result.rank=="STU":
     739                reply = self._client.getEntryExamStatus()
     740                result.entryExamPassed = reply[0]
     741                result.checkFlightStatus = reply[1]
     742
     743        return result
     744
     745#------------------------------------------------------------------------------
     746
     747class GetEntryExamStatus(RPCRequest):
     748    """A request to get the entry exam status."""
     749    def __init__(self, client, callback):
     750        """Construct the request."""
     751        super(GetEntryExamStatus, self).__init__(client, callback)
     752
     753    def run(self):
     754        """Perform the query."""
     755        result = Result()
     756
     757        reply = self._client.getEntryExamStatus()
     758
     759        result.entryExamPassed = reply[0]
     760        result.checkFlightStatus = reply[1]
    738761
    739762        return result
     
    11611184        self._addRequest(request)
    11621185
     1186    def getEntryExamStatus(self, callback):
     1187        """Get the entry exam status."""
     1188        self._addRequest(GetEntryExamStatus(self._rpcClient, callback))
     1189
    11631190    def getFleet(self, callback):
    11641191        """Enqueue a fleet retrieval request."""
Note: See TracChangeset for help on using the changeset viewer.