public class DepartmentProjectSubmissionDA extends ProjectSubmissionsManagementDispatchAction {
@EntryPoint
public ActionForward showProjects(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception {
final Department department = AccessControl.getPerson().getTeacher().getDepartment();
Map<ExecutionCourse, Set<Project>> coursesProjects = new HashMap<ExecutionCourse, Set<Project>>();
for (Project project : department.getProjectsSet()) {
for (ExecutionCourse course : project.getAssociatedExecutionCoursesSet()) {
Set<Project> projects = coursesProjects.get(course);
if (projects == null) {
projects = new HashSet<Project>();
coursesProjects.put(course, projects);