Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ public class ProjectMetadataImpl implements ProjectMetadata, Serializable {
@Setter
private String lessonPlan;

@Getter
@Setter
private String locations;

@Getter
@Setter
private String standards;
Expand Down Expand Up @@ -333,6 +337,8 @@ public void populateFromJSON(JSONObject metadataJSON) {
}
setLessonPlan(lessonPlan);

setLocations(metadataJSON.optString("locations", "[]"));

String standards = metadataJSON.optString("standards", this.standardsDefault);
setStandards(standards);

Expand Down Expand Up @@ -469,6 +475,19 @@ public String toJSONString() {
metadata.put("tools", new JSONObject());
}

String locationsString = metadata.getString("locations");
if (locationsString != null && locationsString != "null") {
JSONArray locationsJSON;
try {
locationsJSON = new JSONArray(locationsString);
} catch (JSONException e) {
locationsJSON = new JSONArray();
}
metadata.put("locations", locationsJSON);
} else {
metadata.put("locations", new JSONArray());
}

String standardsString = metadata.getString("standards");
if (standardsString != null && standardsString != "null") {
JSONObject standardsJSON;
Expand Down