Check out getFinishedProjects() of Projects class. Note that its not the function that makes a project completed, but a value of completed_on field in projects table.
Only two states is a result of current implementation. Project is completed if completed_on field is set to a specific date. If it is NULL than project is active. With this implementation project can have only two states.