mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Remove unused stepic names, add "/" to stepic urls where needed
This commit is contained in:
+4
-5
@@ -102,7 +102,7 @@ public class EduStepicConnector {
|
||||
}
|
||||
|
||||
public static Date getTaskUpdateDate(final int taskId) {
|
||||
final String url = EduStepicNames.STEPS + "/" + String.valueOf(taskId);
|
||||
final String url = EduStepicNames.STEPS + String.valueOf(taskId);
|
||||
try {
|
||||
List<StepicWrappers.StepSource> steps = EduStepicClient.getFromStepic(url, StepicWrappers.StepContainer.class).steps;
|
||||
if (!steps.isEmpty()) {
|
||||
@@ -138,7 +138,7 @@ public class EduStepicConnector {
|
||||
if (!info.isAdaptive() && StringUtil.isEmptyOrSpaces(info.getType())) continue;
|
||||
if (canBeOpened(info)) {
|
||||
for (Integer instructor : info.instructors) {
|
||||
final StepicUser author = EduStepicClient.getFromStepic(EduStepicNames.USERS + "/" + String.valueOf(instructor),
|
||||
final StepicUser author = EduStepicClient.getFromStepic(EduStepicNames.USERS + String.valueOf(instructor),
|
||||
StepicWrappers.AuthorWrapper.class).users.get(0);
|
||||
info.addAuthor(author);
|
||||
}
|
||||
@@ -273,9 +273,8 @@ public class EduStepicConnector {
|
||||
}
|
||||
|
||||
public static StepicWrappers.StepSource getStep(@NotNull Project project, int step) throws IOException {
|
||||
return EduStepicAuthorizedClient.getFromStepic(EduStepicNames.STEPS + "/" + String.valueOf(step),
|
||||
StepicWrappers.StepContainer.class, project).steps
|
||||
.get(0);
|
||||
return EduStepicAuthorizedClient.getFromStepic(EduStepicNames.STEPS + String.valueOf(step),
|
||||
StepicWrappers.StepContainer.class, project).steps.get(0);
|
||||
}
|
||||
|
||||
public static void postAttempt(@NotNull final Task task, boolean passed, @NotNull final Project project) {
|
||||
|
||||
+2
-5
@@ -11,16 +11,13 @@ public class EduStepicNames {
|
||||
public static final String RECOMMENDATION_REACTIONS_URL = "/recommendation-reactions";
|
||||
public static final String ATTEMPTS = "/attempts";
|
||||
public static final String SUBMISSIONS = "/submissions";
|
||||
public static final String ASSIGNMENT = "/assignments";
|
||||
public static final String VIEWS_URL = "/views";
|
||||
public static final String UNITS = "/units";
|
||||
public static final String DEFAULT_TASKFILE_NAME = "code.py";
|
||||
public static final String USERS = "/users";
|
||||
public static final String LOGIN = "/accounts/login/";
|
||||
public static final String USERS = "/users/";
|
||||
public static final String STEP_SOURCES = "/step-sources/";
|
||||
public static final String CURRENT_USER = "/stepics/1";
|
||||
public static final String COURSES = "/courses";
|
||||
public static final String STEPS = "/steps";
|
||||
public static final String STEPS = "/steps/";
|
||||
public static final String SECTIONS = "/sections/";
|
||||
public static final String ENROLLMENTS = "/enrollments";
|
||||
public static final String STEPIC_REGISTRATION_LINK = "https://stepic.org/registration?next=%2Fexplore%2Fcourses";
|
||||
|
||||
Reference in New Issue
Block a user