Skip to content
This repository has been archived by the owner on Jun 30, 2024. It is now read-only.

RSE 0002

Brad Miller edited this page May 7, 2015 · 3 revisions

Common API functions for Runestone Components

bookfuncs.js

The following should all be part of the activecode implementation

  • function showChange(ed,b) -- called when activecode edited --- to activecode.js
  • function pyStr(x) --- to activecode.js
  • function outf(text) --- to activecode.js
  • JSoutput = function(a) --- to activecode.js
  • write = function(str) --- to activecode.js
  • writeln = function(str) --- to activecode.js
  • function createEditors() --- to activecode.js
  • function builtinRead(x) --- to activecode.js
  • function createActiveCode(divid,suppliedSource,sid,language) --- to activecode.js
  • function runit(myDiv, theButton, includes, suffix) --- to activecode.js
  • function addErrorMessage(err, myDiv) --- to activecode.js
  • function saveSuccess(data, status, whatever)
  • function saveEditor(divName)
  • function requestCode(divName, sid)
  • function loadEditor(data, status, whatever)
  • function styleUnittestResults()
  • function createScratchActivecode()
  • function toggleScratchActivecode()
  • function hideCodelens(button, div_id)
  • function injectCodelens(button, div_id)
  • function injectCodeCoach(div_id)

Logging stuff

  • function logBookEvent(eventInfo) --- LOGGING MODULE
  • function logRunEvent(eventInfo) --- LOGGING MODULE

Grading stuff

  • function comment(blockid)
  • function sendGrade(grade, sid, acid, id)
  • function sendComment(comment, sid, acid, id)

Page Load and Login Stuff

  • function gotUser(data, status, whatever)
  • function timedRefresh()
  • function shouldLogin()
  • function isLoggedIn()
  • function addUserToFooter()
  • function addNavbarLoginLink()
  • function disableAcOpt()
  • function attachLoggers(codelens, divid) -- codelens
  • function getNumUsers()
  • function getOnlineUsers()
  • function setOnlineUsers(data)
  • function setNumUsers(data)

CodeLens Stuff

  • function redrawAllVisualizerArrows()

Assessment Stuff

  • function instructorMchoiceModal(data)
  • function compareModal(data, status, whatever)
  • function compareAnswers(div_id)
  • function compareFITB(data, status, whatever)
  • function compareFITBAnswers(div_id)
  • function showGradeSummary(data, status, whatever)
  • function createGradeSummary(div_id)

user-highlights.js

  • function enableUserHighlights() -- This function is a mess, and does much more than user highlights. It also does things related to adding progress buttons and messes with the TOC. It should be refactored and simplified.

  • function findHighlightClass(classList)

  • function toggleHighlightOptionBox(event, highlightOptionName)

  • function saveSelection(sel)

  • function saveHighlight(parentSelectorClass,serializedRange,saveMethod)

  • function deleteHighlight(uniqueId)

  • function updateHighlightBox()

  • function restoreSelection()

  • function processPageState(completionFlag)

Clone this wiki locally