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-40185 Add details to closed view of rubric (sakaiproject#6156)
- Loading branch information
1 parent
188304b
commit 748daea
Showing
16 changed files
with
190 additions
and
39 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
rubrics/api/src/main/java/org/sakaiproject/rubrics/logic/RubricsLocalDateTimeSerializer.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,36 @@ | ||
package org.sakaiproject.rubrics.logic; | ||
|
||
import com.fasterxml.jackson.core.JsonGenerator; | ||
import com.fasterxml.jackson.databind.SerializerProvider; | ||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; | ||
|
||
import java.io.IOException; | ||
import java.time.LocalDateTime; | ||
import java.time.format.DateTimeFormatter; | ||
import java.time.format.DateTimeFormatterBuilder; | ||
import java.time.temporal.ChronoField; | ||
|
||
public class RubricsLocalDateTimeSerializer extends LocalDateTimeSerializer { | ||
|
||
@Override | ||
public void serialize(LocalDateTime value, JsonGenerator g, SerializerProvider provider) | ||
throws IOException { | ||
|
||
DateTimeFormatterBuilder builder | ||
= new DateTimeFormatterBuilder() | ||
.appendText(ChronoField.MONTH_OF_YEAR) | ||
.appendLiteral(" ") | ||
.appendText(ChronoField.DAY_OF_MONTH) | ||
.appendLiteral(", ") | ||
.appendText(ChronoField.YEAR) | ||
.appendLiteral(" ") | ||
.appendText(ChronoField.CLOCK_HOUR_OF_AMPM) | ||
.appendLiteral(":") | ||
.appendValue(ChronoField.MINUTE_OF_HOUR, 2) | ||
.appendLiteral(" ") | ||
.appendText(ChronoField.AMPM_OF_DAY); | ||
|
||
DateTimeFormatter dtf = builder.toFormatter(); | ||
g.writeString(value.format(dtf)); | ||
} | ||
} |
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
20 changes: 20 additions & 0 deletions
20
rubrics/tool/src/main/frontend/imports/sakai-rubric-creator-name.html
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,20 @@ | ||
<dom-module id="creator-name"> | ||
<script> | ||
Polymer({ | ||
is: "creator-name", | ||
properties: { | ||
creatorId: String | ||
}, | ||
ready: function () { | ||
var self = this; | ||
jQuery.ajax({ | ||
url: '/sakai-ws/rest/sakai/getUserDisplayName?sessionid=' + sakaiSessionId + '&userid=' + this.creatorId | ||
}).done(function (response) { | ||
self.innerText = response; | ||
}).fail(function () { | ||
self.innerText = self.creatorId; | ||
}); | ||
} | ||
}); | ||
</script> | ||
</dom-module> |
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
20 changes: 20 additions & 0 deletions
20
rubrics/tool/src/main/frontend/imports/sakai-rubric-site-title.html
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,20 @@ | ||
<dom-module id="site-title"> | ||
<script> | ||
Polymer({ | ||
is: "site-title", | ||
properties: { | ||
siteId: String | ||
}, | ||
ready: function () { | ||
var self = this; | ||
jQuery.ajax({ | ||
url: '/sakai-ws/rest/sakai/getSiteTitle?sessionid=' + sakaiSessionId + '&siteid=' + this.siteId | ||
}).done(function (response) { | ||
self.innerText = response; | ||
}).fail(function () { | ||
self.innerText = self.siteId; | ||
}); | ||
} | ||
}); | ||
</script> | ||
</dom-module> |
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
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