Skip to content
Snippets Groups Projects
Commit 30c6f134 authored by wiepke's avatar wiepke
Browse files

fix the merge

parent 504f8cbc
No related branches found
No related tags found
No related merge requests found
......@@ -47,11 +47,11 @@ public class ProjectDAO {
java.sql.Timestamp timestamp = new java.sql.Timestamp(project.getTimecreated());
connect.connect();
String mysqlRequest =
"INSERT INTO projects (`name`, `password`, `active`, `timecreated`, `author`, " + "`phase`) " +
"INSERT INTO projects (`name`, `password`, `active`, `timecreated`, `author`, `phase`, `description`) " +
"values (?,?,?,?,?,?,?)";
connect.issueInsertOrDeleteStatement(mysqlRequest, project.getName(), project.getPassword(),
project.isActive(), project.getTimecreated(), project.getAuthorEmail(),
project.getPhase() == null ? Phase.GroupFormation : project.getPhase());
project.getPhase() == null ? Phase.GroupFormation : project.getPhase(), project.getDescription());
connect.close();
......
......@@ -89,6 +89,13 @@ public class ProjectView {
return iManagement.getProjectsStudent(studentEmail);
}
@GET
@Produces(MediaType.APPLICATION_JSON)
@Path("/all")
public java.util.List<Project> getProjects() {
return iManagement.getAllProjects();
}
@GET
@Consumes(MediaType.TEXT_PLAIN)
......
......@@ -114,7 +114,7 @@ public class TaskDAO {
Task task = new Task();
task.setTaskName(taskName);
task.setEventCreated(System.currentTimeMillis());
task.setDeadline(System.currentTimeMillis()+3000*60*60*24);
task.setDeadline(System.currentTimeMillis()+7000*60*60*24);
task.setProjectName(project.getName());
task.setUserEmail(target.getEmail());
task.setImportance(Importance.MEDIUM);
......
......@@ -4,7 +4,7 @@ $(document).ready(function () {
$('#enrollProject').on('click', function () {
location.href = "join-project.jsp";
});
});
function updateStatus(projectName) {
......
......@@ -91,7 +91,8 @@ CREATE TABLE `projects` (
`timecreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`author` varchar(100) NOT NULL,
`adminPassword` varchar(400),
`phase` varchar(400) NOT NULL DEFAULT 'GroupFormation'
`phase` varchar(400) NOT NULL DEFAULT 'GroupFormation',
`description` varchar(400)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `projectuser` (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment