MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / doRender

Function doRender

question-servers/freeform.js:819–832  ·  view source on GitHub ↗
(cacheKey)

Source from the content-addressed store, hash-verified

817 // This function will render the panel and then cache the results
818 // if cacheKey is not null
819 const doRender = (cacheKey) => {
820 module.exports.processQuestion('render', pc, data, context, (err, courseIssues, _data, html, _fileData, renderedElementNames) => {
821 if (ERR(err, callback)) return;
822 if (cacheKey) {
823 cache.set(cacheKey, {
824 courseIssues,
825 html,
826 renderedElementNames,
827 });
828 }
829 const cacheHit = false; // Cache miss
830 callback(null, courseIssues, html, renderedElementNames, cacheHit);
831 });
832 };
833
834 // This function will check the cache for the specified cache key
835 // and either return the cached render for a cache hit, or render

Callers 2

getFromCacheOrRenderFunction · 0.85
freeform.jsFile · 0.85

Calls 1

callbackFunction · 0.85

Tested by

no test coverage detected