コード例 #1
0
    def __init__(self):
        self.set_name("new pathway")

        # start and finish nodes hooked directly to each other to start
        self.start = StartNode()
        self.finish = EndNode(self.start)
        self.start.after = self.finish
コード例 #2
0
class LearningPathway():
    """An entire learning pathway as a collection of nodes.
    
    This represents a special type of SerialNode, that provides a
    name and other metadata for the pathway, as well as the usual
    start_node and end_node from which all other nodes in the pathway
    can be accessed using start_node.after() and end_node.before().
    
    """

    def __init__(self):
        self.set_name("new pathway")
        
        # start and finish nodes hooked directly to each other to start
        self.start = StartNode()
        self.finish = EndNode(self.start)
        self.start.after = self.finish
    
    def set_name(self, name):
        self._name = name
    
    def get_name(self):
        return self._name
    
    def complete(self):
        return self.finish.complete()
コード例 #3
0
 def __init__(self):
     self.set_name("new pathway")
     
     # start and finish nodes hooked directly to each other to start
     self.start = StartNode()
     self.finish = EndNode(self.start)
     self.start.after = self.finish
コード例 #4
0
class LearningPathway():
    """An entire learning pathway as a collection of nodes.
    
    This represents a special type of SerialNode, that provides a
    name and other metadata for the pathway, as well as the usual
    start_node and end_node from which all other nodes in the pathway
    can be accessed using start_node.after() and end_node.before().
    
    """
    def __init__(self):
        self.set_name("new pathway")

        # start and finish nodes hooked directly to each other to start
        self.start = StartNode()
        self.finish = EndNode(self.start)
        self.start.after = self.finish

    def set_name(self, name):
        self._name = name

    def get_name(self):
        return self._name

    def complete(self):
        return self.finish.complete()