// Getting course's Gradebook
 public Gradebook getGradebok(int cid) {
   String selectQuery = "SELECT * FROM Gradebook" + " WHERE cid = " + cid;
   SQLiteDatabase db = this.getWritableDatabase();
   Cursor cursor = db.rawQuery(selectQuery, null);
   cursor.moveToFirst();
   Gradebook gradebook = new Gradebook();
   gradebook.setgrid(cursor.getInt(0));
   gradebook.setcid(cursor.getInt(1));
   gradebook.setgrade_type(cursor.getString(2));
   gradebook.setparameter(getParameters(gradebook.getcid()));
   gradebook.setgrade(getGrades(gradebook.getcid()));
   return gradebook;
 }