/*
 * Copyright (c) 2020 ETH Zürich, Educational Development and Technology (LET)
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

package ch.ethz.seb.sebserver.gui.integration;

import ch.ethz.seb.sebserver.gbl.api.API;
import ch.ethz.seb.sebserver.gbl.model.Page;
import ch.ethz.seb.sebserver.gbl.model.exam.QuizData;
import org.springframework.context.annotation.Profile;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@Profile( "test" )
@RestController
@RequestMapping("/openedxtest/api/courses/v1/courses/")
public class OpenEdxTestController {

    @RequestMapping(
            method = RequestMethod.GET,
            consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE,
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public String getCourses() {
        return "{\"pagination\":{\"count\":6,\"previous\":null,\"num_pages\":1,\"next\":null},\"results\":[{\"blocks_url\":\"http://ralph.ethz.ch:18000/api/courses/v1/blocks/?course_id=course-v1%3AedX%2BDemoX%2BDemo_Course\",\"effort\":null,\"end\":null,\"enrollment_start\":null,\"enrollment_end\":null,\"id\":\"course-v1:edX+DemoX+Demo_Course\",\"media\":{\"course_image\":{\"uri\":\"/asset-v1:edX+DemoX+Demo_Course+type@asset+block@images_course_image.jpg\"},\"course_video\":{\"uri\":null},\"image\":{\"raw\":\"http://ralph.ethz.ch:18000/asset-v1:edX+DemoX+Demo_Course+type@asset+block@images_course_image.jpg\",\"small\":\"http://ralph.ethz.ch:18000/asset-v1:edX+DemoX+Demo_Course+type@asset+block@images_course_image.jpg\",\"large\":\"http://ralph.ethz.ch:18000/asset-v1:edX+DemoX+Demo_Course+type@asset+block@images_course_image.jpg\"}},\"name\":\"edX Demonstration Course\",\"number\":\"DemoX\",\"org\":\"edX\",\"short_description\":null,\"start\":\"2013-02-05T05:00:00Z\",\"start_display\":\"Feb. 5, 2013\",\"start_type\":\"timestamp\",\"pacing\":\"instructor\",\"mobile_available\":false,\"hidden\":false,\"invitation_only\":false,\"course_id\":\"course-v1:edX+DemoX+Demo_Course\"},{\"blocks_url\":\"http://ralph.ethz.ch:18000/api/courses/v1/blocks/?course_id=course-v1%3AedX%2BE2E-101%2Bcourse\",\"effort\":null,\"end\":\"2018-12-31T00:00:00Z\",\"enrollment_start\":null,\"enrollment_end\":null,\"id\":\"course-v1:edX+E2E-101+course\",\"media\":{\"course_image\":{\"uri\":\"/static/studio/images/pencils.jpg\"},\"course_video\":{\"uri\":null},\"image\":{\"raw\":\"http://ralph.ethz.ch:18000/static/studio/images/pencils.jpg\",\"small\":\"http://ralph.ethz.ch:18000/static/studio/images/pencils.jpg\",\"large\":\"http://ralph.ethz.ch:18000/static/studio/images/pencils.jpg\"}},\"name\":\"E2E Test Course\",\"number\":\"E2E-101\",\"org\":\"edX\",\"short_description\":\"\",\"start\":\"2016-01-01T00:00:00Z\",\"start_display\":\"Jan. 1, 2016\",\"start_type\":\"timestamp\",\"pacing\":\"instructor\",\"mobile_available\":false,\"hidden\":false,\"invitation_only\":false,\"course_id\":\"course-v1:edX+E2E-101+course\"},{\"blocks_url\":\"http://ralph.ethz.ch:18000/api/courses/v1/blocks/?course_id=course-v1%3Asebserver%2BSEBServer1%2Bseb\",\"effort\":null,\"end\":\"2019-09-30T00:00:00Z\",\"enrollment_start\":null,\"enrollment_end\":null,\"id\":\"course-v1:sebserver+SEBServer1+seb\",\"media\":{\"course_image\":{\"uri\":\"/asset-v1:sebserver+SEBServer1+seb+type@asset+block@images_course_image.jpg\"},\"course_video\":{\"uri\":null},\"image\":{\"raw\":\"http://ralph.ethz.ch:18000/asset-v1:sebserver+SEBServer1+seb+type@asset+block@images_course_image.jpg\",\"small\":\"http://ralph.ethz.ch:18000/asset-v1:sebserver+SEBServer1+seb+type@asset+block@images_course_image.jpg\",\"large\":\"http://ralph.ethz.ch:18000/asset-v1:sebserver+SEBServer1+seb+type@asset+block@images_course_image.jpg\"}},\"name\":\"test course 1\",\"number\":\"SEBServer1\",\"org\":\"sebserver\",\"short_description\":\"test for SEB Server LMS binding\\nmore text here\",\"start\":\"2019-09-04T14:00:00Z\",\"start_display\":\"Sept. 4, 2019\",\"start_type\":\"timestamp\",\"pacing\":\"instructor\",\"mobile_available\":false,\"hidden\":false,\"invitation_only\":false,\"course_id\":\"course-v1:sebserver+SEBServer1+seb\"},{\"blocks_url\":\"http://ralph.ethz.ch:18000/api/courses/v1/blocks/?course_id=course-v1%3Asebserver%2BSEBServer2%2Bseb\",\"effort\":null,\"end\":\"2019-11-30T01:30:00Z\",\"enrollment_start\":null,\"enrollment_end\":null,\"id\":\"course-v1:sebserver+SEBServer2+seb\",\"media\":{\"course_image\":{\"uri\":\"/asset-v1:sebserver+SEBServer2+seb+type@asset+block@images_course_image.jpg\"},\"course_video\":{\"uri\":null},\"image\":{\"raw\":\"http://ralph.ethz.ch:18000/asset-v1:sebserver+SEBServer2+seb+type@asset+block@images_course_image.jpg\",\"small\":\"http://ralph.ethz.ch:18000/asset-v1:sebserver+SEBServer2+seb+type@asset+block@images_course_image.jpg\",\"large\":\"http://ralph.ethz.ch:18000/asset-v1:sebserver+SEBServer2+seb+type@asset+block@images_course_image.jpg\"}},\"name\":\"test course 2\",\"number\":\"SEBServer2\",\"org\":\"sebserver\",\"short_description\":\"\",\"start\":\"2019-08-31T00:00:00Z\",\"start_display\":\"Aug. 31, 2019\",\"start_type\":\"timestamp\",\"pacing\":\"instructor\",\"mobile_available\":false,\"hidden\":false,\"invitation_only\":false,\"course_id\":\"course-v1:sebserver+SEBServer2+seb\"},{\"blocks_url\":\"http://ralph.ethz.ch:18000/api/courses/v1/blocks/?course_id=course-v1%3Asebserver%2BSEBServer3%2Bseb\",\"effort\":null,\"end\":\"2020-03-31T00:00:00Z\",\"enrollment_start\":null,\"enrollment_end\":null,\"id\":\"course-v1:sebserver+SEBServer3+seb\",\"media\":{\"course_image\":{\"uri\":\"/asset-v1:sebserver+SEBServer3+seb+type@asset+block@images_course_image.jpg\"},\"course_video\":{\"uri\":null},\"image\":{\"raw\":\"http://ralph.ethz.ch:18000/asset-v1:sebserver+SEBServer3+seb+type@asset+block@images_course_image.jpg\",\"small\":\"http://ralph.ethz.ch:18000/asset-v1:sebserver+SEBServer3+seb+type@asset+block@images_course_image.jpg\",\"large\":\"http://ralph.ethz.ch:18000/asset-v1:sebserver+SEBServer3+seb+type@asset+block@images_course_image.jpg\"}},\"name\":\"test course 3\",\"number\":\"SEBServer3\",\"org\":\"sebserver\",\"short_description\":\"\",\"start\":\"2019-08-31T00:00:00Z\",\"start_display\":\"Aug. 31, 2019\",\"start_type\":\"timestamp\",\"pacing\":\"instructor\",\"mobile_available\":false,\"hidden\":false,\"invitation_only\":false,\"course_id\":\"course-v1:sebserver+SEBServer3+seb\"},{\"blocks_url\":\"http://ralph.ethz.ch:18000/api/courses/v1/blocks/?course_id=course-v1%3Asebserver%2BSEBServer4%2Bseb\",\"effort\":null,\"end\":\"2020-02-29T00:00:00Z\",\"enrollment_start\":null,\"enrollment_end\":null,\"id\":\"course-v1:sebserver+SEBServer4+seb\",\"media\":{\"course_image\":{\"uri\":\"/asset-v1:sebserver+SEBServer4+seb+type@asset+block@images_course_image.jpg\"},\"course_video\":{\"uri\":null},\"image\":{\"raw\":\"http://ralph.ethz.ch:18000/asset-v1:sebserver+SEBServer4+seb+type@asset+block@images_course_image.jpg\",\"small\":\"http://ralph.ethz.ch:18000/asset-v1:sebserver+SEBServer4+seb+type@asset+block@images_course_image.jpg\",\"large\":\"http://ralph.ethz.ch:18000/asset-v1:sebserver+SEBServer4+seb+type@asset+block@images_course_image.jpg\"}},\"name\":\"test course new\",\"number\":\"SEBServer4\",\"org\":\"sebserver\",\"short_description\":\"\",\"start\":\"2018-12-07T10:23:00Z\",\"start_display\":\"Dec. 7, 2018\",\"start_type\":\"timestamp\",\"pacing\":\"instructor\",\"mobile_available\":false,\"hidden\":false,\"invitation_only\":false,\"course_id\":\"course-v1:sebserver+SEBServer4+seb\"}]}";
    }

}
