IframeEmbedding1: Difference between revisions
Jump to navigation
Jump to search
Paultpearson (talk | contribs) (New iframe embedding example) |
Paultpearson (talk | contribs) No edit summary |
||
| Line 68: | Line 68: | ||
$slideshow = MODES( | $slideshow = MODES( | ||
HTML=> | HTML=> | ||
"<iframe src='https://docs.google.com/presentation/d/1pk0FxsamBuZsVh1WGGmHGEb5AlfC68KUlz7zRRIYAUg/embed#slide=id.i0' frameborder='0' width='555' height='451'></iframe>", | "<iframe src='https://docs.google.com/presentation/d/1pk0FxsamBuZsVh1WGGmHGEb5AlfC68KUlz7zRRIYAUg/embed#slide=id.i0' | ||
frameborder='0' width='555' height='451'></iframe>", | |||
TeX => | TeX => | ||
"An embedded Google slide show." | "An embedded Google slide show." | ||
Revision as of 20:41, 28 June 2014
HTML iframe Embedded Content

This PG code shows how to embed content using an iframe in html.
- Download file: File:IframeEmbedding1.txt (change the file extension from txt to pg when you save it)
- File location in NPL:
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: |
$showPartialCorrectAnswers = 1; |
Answer Evaluation: |
Context()->texStrings;
BEGIN_SOLUTION
${PAR}SOLUTION:${PAR}
Solution explanation goes here.
END_SOLUTION
Context()->normalStrings;
COMMENT('MathObject version.');
ENDDOCUMENT();
|
Solution: |