"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/engine/timeconstraint.cpp" between
fet-5.47.0.tar.bz2 and fet-5.47.1.tar.bz2

About: FET allows to automatically schedule a timetable for e.g. of a school, high-school or university.

timeconstraint.cpp  (fet-5.47.0.tar.bz2):timeconstraint.cpp  (fet-5.47.1.tar.bz2)
skipping to change at line 84 skipping to change at line 84
extern bool subgroupNotAvailableDayHour[MAX_TOTAL_SUBGROUPS][MAX_DAYS_PER_WEEK][ MAX_HOURS_PER_DAY];*/ extern bool subgroupNotAvailableDayHour[MAX_TOTAL_SUBGROUPS][MAX_DAYS_PER_WEEK][ MAX_HOURS_PER_DAY];*/
extern Matrix3D<bool> teacherNotAvailableDayHour; extern Matrix3D<bool> teacherNotAvailableDayHour;
extern Matrix3D<bool> subgroupNotAvailableDayHour; extern Matrix3D<bool> subgroupNotAvailableDayHour;
//////////////////////////////////////////////////////////////////////////////// ///////////// //////////////////////////////////////////////////////////////////////////////// /////////////
//////////////////////////////////////////////////////////////////////////////// ///////////// //////////////////////////////////////////////////////////////////////////////// /////////////
QString getActivityDetailedDescription(Rules& r, int id) QString getActivityDetailedDescription(Rules& r, int id)
{ {
QString s; QString s="";
/*int ai;
for(ai=0; ai<r.activitiesList.size(); ai++)
if(r.activitiesList[ai]->id==id)
break;
if(ai==r.activitiesList.size()){
s+=QCoreApplication::translate("Activity", "Invalid (inexistent)
id for activity");
return s;
}
assert(ai<r.activitiesList.size());
Activity* act=r.activitiesList.at(ai);*/
Activity* act=r.activitiesPointerHash.value(id, NULL); Activity* act=r.activitiesPointerHash.value(id, NULL);
if(act==NULL){ if(act==NULL){
s+=QCoreApplication::translate("Activity", "Invalid (inexistent) id for activity"); s+=QCoreApplication::translate("Activity", "Invalid (inexistent) id for activity");
return s; return s;
} }
if(act->activityTagsNames.count()>0){ /*if(act->activityTagsNames.count()>0){
s+=QCoreApplication::translate("Activity", "T:%1, S:%2, AT:%3, St :%4", "This is an important translation for an activity's detailed description, please take care (it appears in many places in constraints)." s+=QCoreApplication::translate("Activity", "T:%1, S:%2, AT:%3, St :%4", "This is an important translation for an activity's detailed description, please take care (it appears in many places in constraints)."
"The abbreviations are: Teachers, Subject, Activity tags, Studen ts. This variant includes activity tags").arg(act->teachersNames.join(",")).arg( act->subjectName).arg(act->activityTagsNames.join(",")).arg(act->studentsNames.j oin(",")); "The abbreviations are: Teachers, Subject, Activity tags, Studen ts. This variant includes activity tags").arg(act->teachersNames.join(",")).arg( act->subjectName).arg(act->activityTagsNames.join(",")).arg(act->studentsNames.j oin(","));
} }
else{ else{
s+=QCoreApplication::translate("Activity", "T:%1, S:%2, St:%3", " This is an important translation for an activity's detailed description, please take care (it appears in many places in constraints)." s+=QCoreApplication::translate("Activity", "T:%1, S:%2, St:%3", " This is an important translation for an activity's detailed description, please take care (it appears in many places in constraints)."
"The abbreviations are: Teachers, Subject, Students. There are n o activity tags here").arg(act->teachersNames.join(",")).arg(act->subjectName).a rg(act->studentsNames.join(",")); "The abbreviations are: Teachers, Subject, Students. There are n o activity tags here").arg(act->teachersNames.join(",")).arg(act->subjectName).a rg(act->studentsNames.join(","));
} }
return s;*/
const int INDENT=4;
bool _indent;
if(act->isSplit() && act->id!=act->activityGroupId)
_indent=true;
else
_indent=false;
bool indentRepr;
if(act->isSplit() && act->id==act->activityGroupId)
indentRepr=true;
else
indentRepr=false;
QString _teachers="";
if(act->teachersNames.count()==0)
_teachers=QCoreApplication::translate("Activity", "no teachers");
else
_teachers=act->teachersNames.join(",");
QString _subject=act->subjectName;
QString _activityTags=act->activityTagsNames.join(",");
QString _students="";
if(act->studentsNames.count()==0)
_students=QCoreApplication::translate("Activity", "no students");
else
_students=act->studentsNames.join(",");
QString _id;
_id = CustomFETString::number(id);
QString _agid="";
if(act->isSplit())
_agid = CustomFETString::number(act->activityGroupId);
QString _duration=CustomFETString::number(act->duration);
QString _totalDuration="";
if(act->isSplit())
_totalDuration = CustomFETString::number(act->totalDuration);
QString _active;
if(act->active==true)
_active="";
else
_active="X";
QString _nstudents="";
if(act->computeNTotalStudents==false)
_nstudents=CustomFETString::number(act->nTotalStudents);
/////////
//QString s="";
if(_indent)
s+=QString(INDENT, ' ');
/*s+=_id;
s+=" - ";*/
if(_active!=""){
s+=_active;
s+=" - ";
}
s+=_duration;
if(act->isSplit()){
s+="/";
s+=_totalDuration;
}
s+=" - ";
if(indentRepr)
s+=QString(INDENT, ' ');
s+=_teachers;
s+=" - ";
s+=_subject;
s+=" - ";
if(_activityTags!=""){
s+=_activityTags;
s+=" - ";
}
s+=_students;
if(_nstudents!=""){
s+=" - ";
s+=_nstudents;
}
if(!act->comments.isEmpty()){
s+=" - ";
s+=act->comments;
}
return s; return s;
} }
void populateInternalSubgroupsList(const Rules& r, const StudentsSet* ss, QList< int>& iSubgroupsList){ void populateInternalSubgroupsList(const Rules& r, const StudentsSet* ss, QList< int>& iSubgroupsList){
iSubgroupsList.clear(); iSubgroupsList.clear();
QSet<int> tmpSet; QSet<int> tmpSet;
if(ss->type==STUDENTS_SUBGROUP){ if(ss->type==STUDENTS_SUBGROUP){
int tmp; int tmp;
tmp=((StudentsSubgroup*)ss)->indexInInternalSubgroupsList; tmp=((StudentsSubgroup*)ss)->indexInInternalSubgroupsList;
 End of changes. 4 change blocks. 
16 lines changed or deleted 101 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)