Logo Search packages:      
Sourcecode: fet version File versions

bool Rules::addSubgroup ( const QString &  yearName,
const QString &  groupName,
StudentsSubgroup *  subgroup 
)

Adds a new subgroup to a certain group in a certain year of study to the academic structure

Definition at line 1203 of file rules.cpp.

References internalStructureComputed, and yearsList.

Referenced by read().

{
      StudentsYear* sty;
      for(sty=this->yearsList.first(); sty; sty=this->yearsList.next())
            if(sty->name==yearName)
                  break;
      assert(sty);

      StudentsGroup* stg;
      for(stg=sty->groupsList.first(); stg; stg=sty->groupsList.next())
            if(stg->name==groupName)
                  break;
      assert(stg);

      for(StudentsSubgroup* sts=stg->subgroupsList.first(); sts; sts=stg->subgroupsList.next())
            if(sts->name==subgroup->name)
                  return false;
      stg->subgroupsList.append(subgroup);

      this->internalStructureComputed=false;
      return true;
}


Generated by  Doxygen 1.6.0   Back to index