public int mdl_question_usages_DS_state_finished_()
        {
            string procname         = @"SELECT mdl_question_usages.id, mdl_question_usages.contextid, mdl_question_usages.component, mdl_question_usages.preferredbehaviour FROM mdl_question_usages INNER JOIN mdl_quiz_attempts ON mdl_question_usages.id = mdl_quiz_attempts.uniqueid WHERE mdl_quiz_attempts.state='finished'";
            DbAccessMySqlOffline db = new DbAccessMySqlOffline();

            db.CreateNewSqlCommand_Text();
            return(db.Execute_int(procname));
        }