IframeEmbedding1: Difference between revisions
Jump to navigation
Jump to search
Paultpearson (talk | contribs) mNo edit summary |
Paultpearson (talk | contribs) mNo edit summary |
||
Line 5: | Line 5: | ||
This PG code shows how to embed content using an <code>iframe</code> in html. | This PG code shows how to embed content using an <code>iframe</code> in html. | ||
</p> | </p> | ||
* | * File location in OPL: [https://github.com/openwebwork/webwork-open-problem-library/blob/master/OpenProblemLibrary/FortLewis/Authoring/Templates/Misc/IframeEmbedding1.pg FortLewis/Authoring/Templates/Misc/IframeEmbedding1.pg] | ||
<br clear="all" /> | <br clear="all" /> |
Revision as of 20:56, 28 June 2014
HTML iframe Embedded Content

This PG code shows how to embed content using an iframe
in html.
- File location in OPL: FortLewis/Authoring/Templates/Misc/IframeEmbedding1.pg
PG problem file | Explanation |
---|---|
Problem tagging: |
|
DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", "AnswerFormatHelp.pl", "PGcourse.pl", ); TEXT(beginproblem()); |
Initialization: |
Context("Numeric"); $slideshow = MODES( HTML=> "<iframe src='https://docs.google.com/presentation/d/1pk0FxsamBuZsVh1WGGmHGEb5AlfC68KUlz7zRRIYAUg/embed#slide=id.i0' frameborder='0' width='555' height='451'></iframe>", TeX => "An embedded Google slide show." ); |
Setup:
We create a mode dependent variable |
Context()->texStrings; BEGIN_TEXT ${BCENTER} $slideshow ${ECENTER} END_TEXT Context()->normalStrings; |
Main Text:
Include the |
$showPartialCorrectAnswers = 1; |
Answer Evaluation: |
Context()->texStrings; BEGIN_SOLUTION ${PAR}SOLUTION:${PAR} Solution explanation goes here. END_SOLUTION Context()->normalStrings; COMMENT('MathObject version.'); ENDDOCUMENT(); |
Solution: |