mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Store language as a String in the course
Language can't be serialized because of there is no default constructor
This commit is contained in:
+3
-3
@@ -24,7 +24,7 @@ public class Course {
|
||||
private String myCourseDirectory = "";
|
||||
private String author="";
|
||||
private boolean myUpToDate;
|
||||
private Language myLanguage;
|
||||
private String myLanguage;
|
||||
|
||||
|
||||
public List<Lesson> getLessons() {
|
||||
@@ -114,10 +114,10 @@ public class Course {
|
||||
}
|
||||
|
||||
public Language getLanguage() {
|
||||
return myLanguage;
|
||||
return Language.findLanguageByID(myLanguage);
|
||||
}
|
||||
|
||||
public void setLanguage(Language language) {
|
||||
public void setLanguage(@NotNull final String language) {
|
||||
myLanguage = language;
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -3,7 +3,6 @@ package com.jetbrains.edu.learning.stepic;
|
||||
import com.google.gson.FieldNamingPolicy;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.intellij.lang.Language;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.util.io.HttpRequests;
|
||||
import com.jetbrains.edu.learning.course.*;
|
||||
@@ -49,7 +48,7 @@ public class StudyStepicConnector {
|
||||
course.setDescription(info.getDescription());
|
||||
course.setName(info.getName());
|
||||
course.lessons = new ArrayList<Lesson>();
|
||||
course.setLanguage(Language.findLanguageByID("Python")); // TODO: get from stepic
|
||||
course.setLanguage("Python"); // TODO: get from stepic
|
||||
|
||||
if (info.equals(ourTestCourseInfo)) { // TODO: to be removed
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user