if (((CourseGroup)this.degreeModule).getContextsWithCurricularCourses().size() > 0) {
if (((CourseGroup)this.degreeModule).getSortedContextsWithCurricularCourses().size() > 0) {
    private void encodeSelf() throws IOException {        Integer width = (this.onlyStructure) ? 50 : 70;                int courseGroupIdent = this.depth * 3;                if (!this.onlyStructure) {            if (this.depth == BASE_DEPTH) {                writer.startElement("table", this);                writer.writeAttribute("class", "showinfo3 mvert0", null);                writer.writeAttribute("style", "width: " + width + "em;", null);            } else if (this.depth > BASE_DEPTH) {                writer.startElement("div", this);                writer.writeAttribute("class", "indent" + courseGroupIdent, null);                writer.startElement("table", this);                writer.writeAttribute("class", "showinfo3  mvert0", null);                writer.writeAttribute("style", "width: " + String.valueOf(width - (this.depth * 3)) +"em;", null);            }        }        encodeHeader();                if (!this.onlyStructure) {            if (this.showRules && this.degreeModule.hasAnyCurricularRules()) {                encodeCurricularRules();                }            if (((CourseGroup)this.degreeModule).getContextsWithCurricularCourses().size() > 0) {                writer.endElement("table");                if (this.depth > BASE_DEPTH) {                    writer.endElement("div");                }                                writer.startElement("div", this);                writer.writeAttribute("class", (this.depth == BASE_DEPTH) ? "indent3" : "indent" + (courseGroupIdent + 3), null);                writer.startElement("table", this);                writer.writeAttribute("class", "showinfo3 mvert0", null);                writer.writeAttribute("style", "width: " + (width - (this.depth * 3) - 3)  + "em;", null);                List<Double> sums = encodeChildCurricularCourses();                //encodeSumsFooter(sums);                writer.endElement("table");                writer.endElement("div");            } else {                //encodeEmptyCourseGroupInfo();                writer.endElement("table");                if (this.depth > BASE_DEPTH) {                    writer.endElement("div");                }            }        }    }