BUG:153826
Thanks, Falk
:)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=747308
void KEduVocDocument::resetEntry( int index, int lesson )
{
- for ( int i = 0; i < d->m_vocabulary.count(); i++ )
- if ( /*lesson == 0 ||*/ lesson == d->m_vocabulary[i].lesson() ) {
- // index is the translation number whose grades are reset
- d->m_vocabulary[i].resetGrades( index );
- }
+ foreach(int entry, this->lesson(lesson).entries()) {
+ d->m_vocabulary[entry].resetGrades( index );
+ }
}
void KEduVocExpression::resetGrades( int index )
{
if ( index == -1 ) { // clear grades for all languages
- foreach( KEduVocTranslation trans, d->m_translations ) {
- trans.resetGrades();
+ foreach( int trans, d->m_translations.keys() ) {
+ d->m_translations[trans].resetGrades();
}
return;
}