Widgets - Overview

Sphere Engine Problems Widget allows you to integrate the Problems module of the Sphere Engine service with your website via a web component known as the widget.

Sphere Engine Problems module is a service that allows you to manage programming problems and automatically verify their solutions.

Detailed information about the Sphere Engine Problems module can be found in the overview article.

See how it works

Below is an embedded, fully functional and ready-to-use Sphere Engine Problems widget.


Embed the widget on your website

Embed the widget on your website by following these two steps.

First, place the following JavaScript code directly after the <body> tag on the website you want to integrate Sphere Engine Problems Widget with:

<script>(function(d, s, id){
  SE_BASE = "<customer_id>";
  SE_HTTPS = true;
  SE = window.SE || (window.SE = []);
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); = id;
  js.src = (SE_HTTPS ? "https" : "http") + "://" + SE_BASE + "/static/sdk/sdk.min.js";
  fjs.parentNode.insertBefore(js, fjs);
}(document, "script", "sphere-engine-jssdk"));

SE.ready = function(f) {
    if (document.readyState != "loading" && document.readyState != "interactive") f();
    else window.addEventListener("load", f);

Next, place the following HTML code in the exact place in which you want to display the widget:

<div class="se-widget" data-id="example-widget" data-widget="yScz5I7ynO"></div>