Index: code/branches/bindermFS16/src/orxonox/LevelManager.cc
===================================================================
--- code/branches/bindermFS16/src/orxonox/LevelManager.cc	(revision 11193)
+++ code/branches/bindermFS16/src/orxonox/LevelManager.cc	(revision 11194)
@@ -24,4 +24,5 @@
  *   Co-authors:
  *      Damian 'Mozork' Frick
+ *      Matthias Binder
  *
  */
@@ -91,4 +92,8 @@
         for (LevelInfoItem* info : availableLevels_)
             info->destroy();
+        for(unsigned int i = 0; i<allLevelStatus_.size();++i)
+        {
+            allLevelStatus_[i]->destroy();
+        }
     }
 
@@ -106,17 +111,5 @@
         SetConfigValue(campaignMissions_,  std::vector<std::string>())
             .description("The list of missions in the campaign");
-        //std::vector<int> v (allLevelStatus_.size(),0);
-        //SetConfigValue(allLevelWon_, v)
-        //    .description("The list of all won missions");
-    }
-
-    /**
-     * @brief Stores the argument in the corresponding config value.
-     */
-/*    void LevelManager::setLastFinishedCampaignMission(const std::string& lastFinishedCampaignMission)
-    {
-        ModifyConfigValue(lastWonMission_, set, lastFinishedCampaignMission);
-    }
-*/
+    }
 
 
@@ -337,18 +330,33 @@
 
 
-//Mission endmission true
-    //check if index level is activated...
+
+    /**
+    @brief
+        first updates allLevelStatus and then check if the level with index i is activated
+    */
     int LevelManager::missionactivate(int index)
     {
         updateAllLevelStatus();
-        int activated = allLevelStatus_[index].activated;
+        int activated = allLevelStatus_[index]->activated;
         return activated;
     }
+    /**
+    @brief
+        update the last won mission to won=true
+    */
 
     void LevelManager::updatewon(int lastwon)
     {
-        allLevelStatus_[lastwon].won=true;
-
-    }
+        allLevelStatus_[lastwon]->won=true;
+
+    }
+
+    /**
+    @brief
+        checks if a level is won
+        if a level is won, the other levels should be shown as saved in 'nextLevels' of the won level
+        therefore 'activated' of all other levels will be updated to the correct value
+        if more than one level is won, the level with the highes index decides which other levels will be shown, activated or not activated
+    */
 
     void LevelManager::updateAllLevelStatus()
@@ -356,11 +364,11 @@
         for(unsigned int i =0;i<allLevelStatus_.size();i++)
         {
-            if(allLevelStatus_[i].won)
+            if(allLevelStatus_[i]->won)
             {
-                allLevelStatus_[i].activated=1;
-                std::vector<int> nextLevels=allLevelStatus_[i].nextLevels;
+                allLevelStatus_[i]->activated=1;
+                std::vector<int> nextLevels=allLevelStatus_[i]->nextLevels;
                 for(unsigned int j=0;j<allLevelStatus_.size();j++)
                 {
-                    allLevelStatus_[j].activated=nextLevels[j];
+                    allLevelStatus_[j]->activated=nextLevels[j];
                 }
             }
@@ -368,4 +376,8 @@
     }
 
+    /**
+    @brief
+        the name of the last won mission is saved in the config file
+    */
 
     void LevelManager::setLevelStatus(const std::string& LevelWon)
@@ -375,59 +387,58 @@
         ModifyConfigValue(lastWonMission_, set, LevelWon);
 
-        std::vector<int> v (allLevelStatus_.size(),0);
-        for(unsigned int i = 0;i<allLevelStatus_.size();i++)
-        {
-            if(allLevelStatus_[i].won)
-                v[i] =1;
-        }
-
-        SetConfigValue(allLevelWon_, v)
-            .description("The list of all won missions");
-
-            for (unsigned int i = 0; i < allLevelWon_.size(); ++i)
-            {
-                ModifyConfigValue(allLevelWon_[i], set, v[i]);
-            }
-
-    }
-
-
-    //build up allLevelStatus_
-    //has to be done once per game (not per level)
-    //all connections between the levels are saved in the allLevelStatus_
-    //also the won variable of the LevelStatus is set to the corresponding allLevelWon_ value
+        /**
+        TODO: save allLevelWon_ into the config file
+        */
+    }
+
+
+    /**
+    @brief
+        build up allLevelStatus_
+        has to be done once per game (not per level)
+        all connections between the levels are saved in the allLevelStatus_
+        also the won variable of the LevelStatus have to be set to the corresponding allLevelWon_ values
+    */
     void LevelManager::buildallLevelStatus()
     {
-        LevelStatus* level=new LevelStatus(this->getContext());
-        allLevelStatus_.assign (campaignMissions_.size(),*level);
-        allLevelStatus_[0].activated=1;
+        for(unsigned int i =0;i<campaignMissions_.size();++i)
+        {
+            LevelStatus* level= new LevelStatus(this->getContext());
+            allLevelStatus_.push_back(level);
+        }
+
+        /**
+        TODO: allLevelWon_ should be loaded into the allLevelSatus_ such that the progress of the campaign can be saved
+        */
+
+        allLevelStatus_[0]->activated=1;
 
 
         std::vector<int> v={1,1,1,0,0,0,0,0,0};
-        allLevelStatus_[0].nextLevels=v;
+        allLevelStatus_[0]->nextLevels=v;
 
         v={1,1,2,1,0,0,0,0,0};
-        allLevelStatus_[1].nextLevels=v;
+        allLevelStatus_[1]->nextLevels=v;
 
         v={1,2,1,0,1,0,0,0,0};
-        allLevelStatus_[2].nextLevels=v;
+        allLevelStatus_[2]->nextLevels=v;
 
         v={1,1,2,1,0,1,1,0,0};
-        allLevelStatus_[3].nextLevels=v;
+        allLevelStatus_[3]->nextLevels=v;
 
         v={1,2,1,0,1,0,0,1,1};
-        allLevelStatus_[4].nextLevels=v;
+        allLevelStatus_[4]->nextLevels=v;
 
         v={1,1,2,1,0,1,2,0,0};
-        allLevelStatus_[5].nextLevels=v;
+        allLevelStatus_[5]->nextLevels=v;
 
         v={1,1,2,1,0,2,1,0,0};
-        allLevelStatus_[6].nextLevels=v;
+        allLevelStatus_[6]->nextLevels=v;
 
         v={1,2,1,0,1,0,0,1,2};
-        allLevelStatus_[7].nextLevels=v;
+        allLevelStatus_[7]->nextLevels=v;
 
         v={1,2,1,0,1,0,0,2,1};
-        allLevelStatus_[8].nextLevels=v;
+        allLevelStatus_[8]->nextLevels=v;
 
     }
Index: code/branches/bindermFS16/src/orxonox/LevelManager.h
===================================================================
--- code/branches/bindermFS16/src/orxonox/LevelManager.h	(revision 11193)
+++ code/branches/bindermFS16/src/orxonox/LevelManager.h	(revision 11194)
@@ -82,5 +82,4 @@
             virtual ~LevelManager();
 
-            //void setLevelStatus(const int integer);
             void buildallLevelStatus();
             void updateAllLevelStatus();
@@ -108,5 +107,4 @@
             LevelInfoItem* getAvailableLevelListItem(unsigned int index); //!< Get the LevelInfoItem at the given index in the list of available Levels.
 
-            //void setLastFinishedCampaignMission(const std::string& lastFinishedCampaignMission);
             inline const std::string& getLastWonMission() const
                 { return this->lastWonMission_; }
@@ -148,6 +146,6 @@
             std::string lastWonMission_;
             std::vector<std::string> campaignMissions_;
-            std::vector<int> allLevelWon_;
-            std::vector<LevelStatus> allLevelStatus_;
+            std::vector<int> allLevelWon_;                  //level i is won if allLevelWon_[i]=1
+            std::vector<LevelStatus*> allLevelStatus_;
 
 
Index: code/branches/bindermFS16/src/orxonox/LevelStatus.cc
===================================================================
--- code/branches/bindermFS16/src/orxonox/LevelStatus.cc	(revision 11193)
+++ code/branches/bindermFS16/src/orxonox/LevelStatus.cc	(revision 11194)
@@ -1,2 +1,29 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Matthias Binder
+ *
+ */
+
+
 
 
@@ -20,4 +47,9 @@
     RegisterClass(LevelStatus);
 
+
+    /**
+    @brief
+        Constructor. sets config values and initializes variables.
+    */
     LevelStatus::LevelStatus(Context* context) : BaseObject(context)
     {
@@ -30,5 +62,3 @@
     LevelStatus::~LevelStatus()
     {}
-
-
 }
Index: code/branches/bindermFS16/src/orxonox/LevelStatus.h
===================================================================
--- code/branches/bindermFS16/src/orxonox/LevelStatus.h	(revision 11193)
+++ code/branches/bindermFS16/src/orxonox/LevelStatus.h	(revision 11194)
@@ -49,6 +49,6 @@
     @brief
         LevelStatus:
-        In the LevelStatus class all necessary information off a mission in the campaign can be saved.
-        It is only used in the LevelManager to steer the campaign menu. It is now possible to have a treelike campaign menu structure.
+        In the LevelStatus class all necessary information of a mission in the campaign is saved.
+        It is only used in the LevelManager to save the progress of the campaign. It is now possible to have a treelike campaign menu structure.
         
     */
