MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Embedding CDF in a Google Spreadsheet Form

  • To: mathgroup at smc.vnet.net
  • Subject: [mg131562] Embedding CDF in a Google Spreadsheet Form
  • From: John Dell <holomorphicman at gmail.com>
  • Date: Mon, 2 Sep 2013 02:46:50 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net

Hi All,

I am trying to figure out how to combine the awesomeness of Mathematica with the awesomeness of Google Forms. My application is for students to submit solutions to problems through a Google Form.
I have generated a form or three and used URLFetch to capture the form as a string. I want to create some Mathematica code to embed multiple cdfs into the form document and then store the form and the cdfs on my website.

This is obviously a work-around to a more direct method that would collect and manipulate the spreadsheet data more directly out of an Enterprise grade CDF.

So my problem is this. URLFetch works fine and I get the string that is google form in plain text. To manipulate this further I want to import this string as SymbolicXML. But the parser croaks every time.
This is true even when I create a parser using the DTD supplied by google for the document. It appears to me that either the google guys are not following their own DTD ( unlikely) or that somehow the parser generator itself is broken.

Now I can just play with the text string I get from URLFetch, since I just want to insert the embedd code for the CDFs. But this requires that I process the plain text version of the html form file as a string and search for the right places to put the cdf embedding code. This seems like a bit more work than playing with document in SymbolicXML.

Its pretty easy to replicate the problem I have described. If this is a bug somewhere I would sure like to know it.

If someone has already solved this problem in a more elegant way, please clue me in. I am aware that there is some commercial code that wraps the appropriate google api for manipulating google spreadsheets directly, but I have not heard back from them about using it with Enterprise grade mathematica, and besides this appears to require an extra manual step or two for each form in terms of creating the correct authorizations for apps to access the google spreadsheet. My work around is way easier, if it can be made to work that is.

I imagine that this little work around would serve a lot of teachers, at least ones who use mathematica, as well as anyone who has the simple desire to add CDF content to their google forms.

jd





  • Prev by Date: Re: parametric plot and filling
  • Next by Date: problem with mathematica ---> Get::"noopen": "Cannot open ("Graphics`Graphics`'")."
  • Previous by thread: Re: parametric plot and filling
  • Next by thread: problem with mathematica ---> Get::"noopen": "Cannot open ("Graphics`Graphics`'")."