forked from sakaiproject/sakai
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SAK-43155: Worklog tab in assignments (sakaiproject#8996)
* SAK-43155: Worklog tab in assignments * SAK-43155: Resolved Codacy Issues * SAK-43155: solving timesheet calendar not saving picked date * SAK-43155 fixing core comments * SAK-43155 fixing more core comments * fixing json serializer error messages * SAK-43155: Resolve Issues Hibernate * SAK-43155: Resolved Issue sakai-reference * SAK-43155: Resolved test JUNIT * SAK-43155: Resolved *.vm issues * correctTime -> timeHasCorrectFormat * regTime -> duration. No el nombre de la columna de BBDD, sino la variable relacionada * asnComment -> comment. No el nombre de la columna de BBDD, sino la variable relacionada * Cambio de String a Long * Mover pattern al constructor * if para evitar NPE * Cambios en columnas de BBDD * Quitar findFirst() * AssignmentService. Nomenclatura de metodos y context -> siteId * deleteTimesheet. se obtiene contexto desde timeSheet antes de revisar permisos * Eliminar getSubmissionSubmitter y findSubmissionSubmitter * Cambios de Fish en javascript * ultimos retoques * SAK-43155: Resolved ALL remaining issues * SAK-43155: Resolved TEST problems * Update assignment/impl/src/java/org/sakaiproject/assignment/impl/AssignmentServiceImpl.java * Update assignment/tool/src/webapp/js/assignments.js * Update assignment/tool/src/webapp/js/studentViewSubmission.js * Update assignment/impl/src/java/org/sakaiproject/assignment/impl/AssignmentServiceImpl.java * changes tuesday sept 28 Co-authored-by: Victor <[email protected]> Co-authored-by: victorGomollon <[email protected]> Co-authored-by: victorGomollon <[email protected]> Co-authored-by: Adrian Fish <[email protected]>
- Loading branch information
1 parent
f3c8939
commit 27d0a96
Showing
46 changed files
with
2,037 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
assignment/api/src/java/org/sakaiproject/assignment/api/model/AssignmentTimeSheet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
/** | ||
* Copyright (c) 2003-2017 The Apereo Foundation | ||
* | ||
* Licensed under the Educational Community License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://opensource.org/licenses/ecl2 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.sakaiproject.assignment.api.model; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.FetchType; | ||
import javax.persistence.GeneratedValue; | ||
import javax.persistence.GenerationType; | ||
import javax.persistence.Id; | ||
import javax.persistence.JoinColumn; | ||
import javax.persistence.ManyToOne; | ||
import javax.persistence.SequenceGenerator; | ||
import javax.persistence.Table; | ||
|
||
import org.hibernate.annotations.Type; | ||
|
||
import com.fasterxml.jackson.annotation.JsonBackReference; | ||
import com.fasterxml.jackson.annotation.JsonIdentityInfo; | ||
import com.fasterxml.jackson.annotation.ObjectIdGenerators; | ||
|
||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
|
||
import java.time.Instant; | ||
|
||
/** | ||
* Defines a relation between a submission and the submission's submitters. | ||
* <br/> - A submitter can have its own grade separate from the grade of the submission, | ||
* useful in providing user with different grades in group submissions. | ||
* <br/> - A submitter can have its own feedback separate from the feedback of the submission, | ||
* useful when different feedback is needed in group submissions | ||
* <p> | ||
* <b>Constraints</b> | ||
* <br/>- submission and submitter are unique, | ||
* meaning a user can't be a submitter more than once on a submission. | ||
* Notice that equals and hashcode also reflect this relationship. | ||
*/ | ||
@Entity | ||
@Table(name = "ASN_TIMESHEET") | ||
@Data | ||
@NoArgsConstructor | ||
@ToString(exclude = {"submitter"}) | ||
@EqualsAndHashCode(of = "id") | ||
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id") | ||
public class AssignmentTimeSheet { | ||
|
||
@Id | ||
@Column(name = "ID") | ||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_id_asn_timesheet") | ||
@SequenceGenerator(name = "seq_id_asn_timesheet", sequenceName = "SEQ_ID_ASN_TIMESHEET_S") | ||
private Long id; | ||
|
||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "SUBMITTER_ID", nullable = false) | ||
@JsonBackReference | ||
private AssignmentSubmissionSubmitter submitter; | ||
|
||
@Type(type = "org.hibernate.type.InstantType") | ||
@Column(name = "REG_DATE", nullable = false) | ||
private Instant regDate; | ||
|
||
@Column(name = "DURATION", length = 255) | ||
private String duration; | ||
|
||
@Column(name = "COMMENT", length = 4096) | ||
private String comment; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.