Simple upload by parameter

32 views
Skip to first unread message

Paul Libbrecht

unread,
May 14, 2015, 4:57:43 PM5/14/15
to sketch...@googlegroups.com

Hello Sjetchometry commuinity.
How hard would.it be to embed sketchometry somewhere so that its.docent can be uploaded ? I am happy to write a simplistic server for that (no login, allows anyone passing by to upload) but I really do not know how to write the web-page that would do tbat.

Thanks on advance.
Paul

-- fat fingered on my z10 --

Alfred Wassermann

unread,
May 15, 2015, 3:55:41 AM5/15/15
to sketch...@googlegroups.com, pa...@hoplahup.net
Hi Paul,
what do mean with "upload by parameter"?
Do you mean something like
http://sketchometry.org/index.html?content="base64 construction code..."
or do you mean upload by the user via drag 'n drop?

Anyway, it's sounds like a good idea.

Best wishes,
Alfred

Paul Libbrecht

unread,
May 15, 2015, 4:19:08 AM5/15/15
to sketch...@googlegroups.com, pa...@hoplahup.net
I meant:

http://myserver.net/sketchometry2.html?urlToSave=/x/y/z
(having an initial content would be a good idea too!)

that sketchometry2.html can be even an iframe.
Using postMessage is probably a good idea then.

paul
--
You received this message because you are subscribed to the Google Groups "sketchometry" group.
To post to this group, send email to sketch...@googlegroups.com.
To unsubscribe from this group, send email to sketchometry...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sketchometry?hl=en.
---
You received this message because you are subscribed to the Google Groups "sketchometry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sketchometry...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alfred Wassermann

unread,
May 15, 2015, 4:45:38 AM5/15/15
to sketch...@googlegroups.com, plibb...@curriki.org, pa...@hoplahup.net
So, it would be similar to sketchbin: http://bin.sketchometry.org/ or jsfiddle?
* User uploads a sketchometry construction on to the server by drag'n drop or other method, or constructs directly on the server
* Then the user gets an URL  "http://myserver.net/sketchometry2.html?urlToSave=/x/y/z" under which the construction can be downloaded.

Should there be some facilities to find, sort, or browse constructions?

I guess it could be realized with a modest amount of work:
You are right, sketchometry would be included in an iframe. The development version already contains code to control sketchometry from outside (load/save, set language...). The hosting site needs to provide a save button and
needs to take the parameter from the URL, get the construction and pass it to the JavaScript/sketchometry load() call.

Best wishes,
Alfred


Paul Libbrecht

unread,
Jun 6, 2015, 10:18:28 AM6/6/15
to Alfred Wassermann, sketch...@googlegroups.com, plibb...@curriki.org
Hello list,

So, I've made a first step in this direction and would love comments.

I've uploaded a jessie file on i2geo.net:
    http://i2geo.net/xwiki/bin/view/Coll_adminPolx/testjessie
(note: no player linked yet)

The player, for pure exploration, can be seen here:
    http://i2geo.net/xwiki/bin/view/Systems/DisplayJessie?xpage=popup&asset=Coll_adminPolx.testjessie
(this is for others to see the exercise, the only side effect of loading this is that it gets into your browser's local storage)

The assignment upload works as follows:
(that means: a resource is for one teacher, if you want it for your own class, please copy the resource using i2geo's copy function)

My next steps are:
- experiment with that in a classroom (on Monday)
- implement a better jessie play link in the learning resource, probably offering the teacher mode and student modes from within the resources' display
- enable notifications for uploads (probably very verbose then)
- include a protected mode:
  - add a field somewhere with an assignment code
  - only let the pupils' mode and the teacher mode be run with that code
  - do not ask for that code if the code is empty (making it a public write thing, good for a temporary in class situation)

A few questions, none urgent:
- is .jessie the right filename-extension?
- is there a media-type registered to it? (I can help doing that if useful)
- I see that the current sketchometry first loads the sketchometry app, then the javscript invokes the construction. It would be more effective to not load all the local constructions, or?
- the default name sounds to be "moodle unknown" or something like that. Would there be a parameter to name the thing? That would make a lot of sense.
- I understand the storage of jsxgraph.uni-bayreuth.de/~alfred/GUI and start.sketchometry.com is not communicating. Would it be possible that this upload mechanism becomes part of start.sketchometry.com? (thus it would also be in the app). That would allows the pupils to work at home even without i2geo. Also, is there a risk of overcrowding the local storage? E.g. for a teacher when he browses all students' productions?

thanks in advance.

Paul
signature.asc

Alfred Wassermann

unread,
Jun 10, 2015, 11:24:40 AM6/10/15
to sketch...@googlegroups.com, pa...@hoplahup.net, alfred.w...@uni-bayreuth.de, plibb...@curriki.org
Hi Paul,
with version 1.2.0 - which has just been released - we picked up some of your issues which where quit helpful.
The embedding of sketchometry is still not mature, feedback is very welcome.
See http://en.sketchometry.org/news/2015/06/10/embed/index.html for more information.


Am Samstag, 6. Juni 2015 16:18:28 UTC+2 schrieb Paul Libbrecht:

A few questions, none urgent:
- is .jessie the right filename-extension?

we choose .sketch as the filename because, the content is a little bit more than just jessieCode code.

- is there a media-type registered to it? (I can help doing that if useful)

Not yet, this would be cool and help is very welcome.

 
- I see that the current sketchometry first loads the sketchometry app, then the javscript invokes the construction. It would be more effective to not load all the local constructions, or?

We will address this soon, up to now you can send a "clear" message to remove all local constructions.

- the default name sounds to be "moodle unknown" or something like that. Would there be a parameter to name the thing? That would make a lot of sense.

One can set  supply now the name of a new construction, when sending the message.

- I understand the storage of jsxgraph.uni-bayreuth.de/~alfred/GUI and start.sketchometry.com is not communicating. Would it be possible that this upload mechanism becomes part of start.sketchometry.com? (thus it would also be in the app). That would allows the pupils to work at home even without i2geo. Also, is there a risk of overcrowding the local storage? E.g. for a teacher when he browses all students' productions?

Don't use jsxgraph.uni-bayreuth.de/~alfred/GUI, this is just for testing.
We offer now two domains  http://start.sketchometry.org and http://embed.sketchometry.org and the storage between them is not communicating,
since localStorage in JavaScript is domain-based.
If an embedding service deletes all constructions in localStorage from embed.sketchometry.org this does not affect the constructions a student has done on start.sketchometry.org. But the student has full access to the constructions by opening embed.sketchometry.org in the browser.

But beware, this does not allow the student to access the constructions at home, because the constructions are stored in the localStorage of the browser the student used in class room. To have access to a construction from different computers one has to use
  • the cloud support of sketchometry or
  • the sync solutions provided by several browsers or
  • the service of the embedding platform like i2geo

Best wishes,

Alfred



Paul Libbrecht

unread,
Jun 10, 2015, 2:55:57 PM6/10/15
to Alfred Wassermann, sketch...@googlegroups.com
Hello Alfred and team,


On 10/06/15 17:24, Alfred Wassermann wrote:
Hi Paul,
with version 1.2.0 - which has just been released - we picked up some of your issues which where quit helpful.
The embedding of sketchometry is still not mature, feedback is very welcome.
See http://en.sketchometry.org/news/2015/06/10/embed/index.html for more information.
Thanks for the hints. I had already enough of that as you provided but the embedding is where my attempt failed on Monday: my iFrames are made with percent sizes so that it adapts to the browser's size.
For the small devices this has failed miserably, the name of the points were way too small.
For larger devices (from S3 onwards), this has been somewhat successful but still not all functions worked properly. Only when I sent them to start.sketchometry.org could they start to solve the exercises i gave them (http://i2geo.net/xwiki/bin/view/Coll_polx/SketchometryUbungen).
I believe the problem is that, because of the embedding, some gestures were not properly recognized.
E.g. drawing a segment took at least seven attempts.

The submission also failed, but, there, I must have been responsible.
At the end, the ones that had the app were the most successful.

Note: this classroom is a BYOD classroom.

Am Samstag, 6. Juni 2015 16:18:28 UTC+2 schrieb Paul Libbrecht:

A few questions, none urgent:
- is .jessie the right filename-extension?

we choose .sketch as the filename because, the content is a little bit more than just jessieCode code.
or .jc ? I found this quite nice.
This needs to be decided indeed.
.sketch is for AutoCad's or?

- is there a media-type registered to it? (I can help doing that if useful)

Not yet, this would be cool and help is very welcome.
The first step is to have a kind of spec-like document placed down on the origin's website.
The next step, which I am happy to do, is to write a mail to the mailing-list media...@iana.org filling the questions of the template. 
- I see that the current sketchometry first loads the sketchometry app, then the javscript invokes the construction. It would be more effective to not load all the local constructions, or?

We will address this soon, up to now you can send a "clear" message to remove all local constructions.
Defintely useful to solve as the poor phones are not the fastest to start.

- the default name sounds to be "moodle unknown" or something like that. Would there be a parameter to name the thing? That would make a lot of sense.

One can set  supply now the name of a new construction, when sending the message.
Great!
I'm wondering if starting with the same content than was stored would not be the right thing.
But then, we need a reset button too.

- I understand the storage of jsxgraph.uni-bayreuth.de/~alfred/GUI and start.sketchometry.com is not communicating. Would it be possible that this upload mechanism becomes part of start.sketchometry.com? (thus it would also be in the app). That would allows the pupils to work at home even without i2geo. Also, is there a risk of overcrowding the local storage? E.g. for a teacher when he browses all students' productions?

Don't use jsxgraph.uni-bayreuth.de/~alfred/GUI, this is just for testing.
We offer now two domains  http://start.sketchometry.org and http://embed.sketchometry.org and the
Perfect. Could I also host a copy of the files on i2geo.net ?

storage between them is not communicating, since localStorage in JavaScript is domain-based.
If an embedding service deletes all constructions in localStorage from embed.sketchometry.org this does not affect the constructions a student has done on start.sketchometry.org. But the student has full access to the constructions by opening embed.sketchometry.org in the browser.
Right.

But beware, this does not allow the student to access the constructions at home, because the constructions are stored in the localStorage of the browser the student used in class room. To have access to a construction from different computers one has to use
  • the cloud support of sketchometry or
  • the sync solutions provided by several browsers or
  • the service of the embedding platform like i2geo
It does allow it because of BYOD.
It's time for me to reap these fruits!!

Paul

Alfred Wassermann

unread,
Jun 11, 2015, 7:02:15 AM6/11/15
to sketch...@googlegroups.com, plibb...@curriki.org, alfred.w...@uni-bayreuth.de
Yes, hosting sketchometry on i2geo is possible (and welcome)
Alfred


Reply all
Reply to author
Forward
0 new messages