@Override
    public String removeTutorial(String modCode, String groupNum) {
        if (lookupModuleFromCode(modCode) == null) {
            return "Module not found!\n";
        }
        moduleEntity = em.find(ModuleEntity.class, lookupModuleFromCode(modCode).getId());
        Collection<TutorialEntity> currTuts = moduleEntity.getTutorials();
        if (currTuts.isEmpty()) {
            return "Module has no tutorials!";
        }
        for (TutorialEntity tut : currTuts) {
            if (tut.getGroupNumber().equals(groupNum)) {
                if (!tut.getStudents().isEmpty()) {
                    return "Tutorial is registered by students, cannot be deleted!\n";
                } else {
                    moduleEntity.getTutorials().remove(tut);
                    em.remove(tut);
                    em.flush();
                    em.clear();
                    return "Tutorial is sucessfully deleted!\n";
                }
            }
        }
        return "Tutorial not found!\n";
    }