Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Tinderbox applications >> Lesson Planning
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1375662574

Message started by Steve Scott on Aug 4th, 2013, 8:29pm

Title: Lesson Planning
Post by Steve Scott on Aug 4th, 2013, 8:29pm

Building on Mark Anderson's work at this thread: http://www.eastgate.com/Tinderbox/forum//YaBB.pl?num=1374975120/0, I am trying to complete a tinderbox file to organize lesson plans.

A clone of the file can be downloaded here:

https://dl.dropboxusercontent.com/u/916107/General/Lesson_Plan.tbx

I want to have a Class Prototype would have the following elements
===========================================
# Due Today (this is an agent which would indicate what is due)
# Sequence
     1. Activity #1
     2. Activity #2
     3. Activity #etc
# Homework Assigned
 1. Homework Task #1
 2. Homework Task #2

I have a few questions:

Due Today Agent
================      
Currently, I have to manually type in the search terms.
How can I have the agent search for the name of of the parent class #?  For example, if the agent is within Class 04-2, the search term would be:

text contains: $ClassDue.contains("Class 04-2")  

Class Due Attribute
====================
Homework Task contains an attribute called "ClassDue"
Is there a way to list all possible classes when you are filling out the attribute?  It is OK to do it manually, but it is more prone to error.

Unfortunately, the classes meet on different days so it would be difficult to have real due dates.  In other words, section 1 might be do on August 15 and section 2 might be due on August 16.  Therefore, I am using Class 04-2.

Students never know when Class 04-2 is so I will probably have a table on the index page which would look something like this:

Class #      Section 1     Section 2
----------------------------------------
#01-1        8/15           8/16
#01-2        8/18           8/19

Ideally, I will be able to link the dates to the relevant pages so students can see what is due, the class sequence, etc.

thanks for any thoughts!

Steve

Title: Re: Lesson Planning
Post by Mark Anderson on Aug 5th, 2013, 7:11am

The overall taks requires a fair amount of tweaking tidying of the TBX, which I'll post when done. Meanwhile.

Seeding the agent query search value. As several types of prototype seem to want to use the class 'name', i.e. 03-2', it makes sense to make the Class note set $ClassName for that. Descendant notes can then reference that. Thus the agent can set its $ClassName to that of its parent. The query can then be: $ClassDue.contains($ClassName(agent)). The reworked TBX will who this in practice.

Seeding $ClassDue value.First see this aTbRef article for the overall premise. So, $ClassDue is a string so for presets you need a note per seed value. A pain but … wait, you already have those in your class notes.  This assumes you're not setting $ClassDue for classes not yet added to the document. Otherwise, we just add to the rule of Class:  $ClassDue=$ClassName. now each Class you add also extends seeded values of $ClassDue. Bear in mind that if searching for items matching $ClassDue you must now filter notes of prototype called** pClass. The above query is now:
$ClassDue.contains($ClassName(agent))& $Prototype!="pClass"

** prototype name change explained in updated TBX.

Dates for homework 'sections'. It depends how free-form your assignments are.  If there are always 2 (or just one) sections to the task, I'd add an attribute for each $Section1Date and $Section2Date. I'm not sure where these are then set (homework assignment itself?) as the process is insufficiently defines to set the 'business rules' in the action code.

Alternatively to the last, you might want to set a 'due' class name for each homework section. In which case you will need to figure out the section ate from the class name. to go this the document would need to seed the class strand/week/Class tree with a date. Let's assume you do this so a Class-type note stores its date in $ClassDate. Now a Homework Assignment note could use rule something like

$Section1Date = $ClassDate(find($Prototype=="pClass" & $ClassName==$Section1ClassDue(that)));

Latter is not tested (needs a test rig buildout), but the logic is this. When you set the assignment, you set the per-section target classes, e.g. "02-3". The rule then finds all notes of the Class type (filtered by prototype) and from those the one whose $ClassName matches the one held in the assignment note's $Section1ClassDue. See aTbRef for an explanation of the 'that' designator.

A side note on auto-setting dates. TB can do accurate date maths, but we humans don't generally use rigid date schedules, throwing in abstracts like National holidays, leap years etc.  So, if automatic date setting (of key reference dates) allow for the need to manual override. IOW, if each class is the previous on + 7 days, that won;t work if 7 days on is a national holiday when your establishment is closed.

A link to modified TBX implementing this follows - but first I've got to write up all the changes!

Later: formatting

Title: Re: Lesson Planning
Post by Mark Anderson on Aug 5th, 2013, 9:32am

Here's the TBX: http://www.acrobatfaq.com/tbdemos/Lesson_Plan.zip.

Read all(!) the notes nested under the read me.

Title: Re: Lesson Planning
Post by Steve Scott on Aug 5th, 2013, 3:19pm

Mark,

I am incredibly grateful and excited to try out the system! Thanks for your amazing work.  Again, this is turning out better than I imagined.  I'm looking forward to reading the notes and trying it out.

Steve

Title: Re: Lesson Planning
Post by Steve Scott on Aug 6th, 2013, 11:47am

Hi Mark,

Your implementation of the Lesson Plan document is brilliant!  I love it.  Thanks again for your efforts and your detailed documentation.  As I am working through the document, I will post some questions.

I like you implementation of the week— using an offset is a great feature.  However, the week somehow appears a bit broken.

problem a: the end date for all of the weeks is 6/15/02  
problem b: names aren't added when you add a new week.

The code is currently:
$WeekNum = $SiblingOrder;
if($SiblingOrder==1){$StartDate=$StartDate(parent);}else{$StartDate=$StartDate(prevSibling)+((7+$DaysOffset)+" days");};
$EndDate = date($StartDate+((4+$DaysOffset)+" days");
$Name = "Week "+$WeekNum + if($StartDate) {" [" + $StartDate.format("MM d") +"-" +$EndDate.format("MM d")+"]";};  


The code I had was:
$EndDate = date($StartDate+"4 days"); $Name = "Week "+$WeekNum + if($StartDate) {" [" + $StartDate.format("MM d") +"-" +$EndDate.format("MM d")+"]";}

I'm confused because the naming convention seems identical.  Any thoughts on how to fix this?

Title: Re: Lesson Planning
Post by Mark Anderson on Aug 6th, 2013, 1:22pm

Apologies, a by-blow of late stage tweaking to add the $DaysOffset. I missed out two closing ')'. Corrected code below, with the missing code added in red:

$WeekNum = $SiblingOrder;
if($SiblingOrder==1){
$StartDate=$StartDate(parent);
}else{
$StartDate=$StartDate(prevSibling)+((7+$DaysOffset)+" days"));
};
$EndDate = date($StartDate+((4+$DaysOffset)+" days"));
$Name = "Week "+$WeekNum + if($StartDate) {" [" + $StartDate.format("MM d") +"-" +$EndDate.format("MM d")+"]";};


The $Name part wasn't run as the rule 'broke' before getting that far due to the incorrectly closed parentheses. Using a 'code note' to set up the rule was supposed to help avoid such errors. Still, it goes to show that once action code moves past small trivial sections, you need careful testing.

I'll upload a corrected TBX as soon as I can. My ISP just bounced me - unwarned- onto a new server breaking all sorts of stuff. May be a day or two till www/ftp are working normally again.

Later: added line breaks to code example as lines too wide for display without line wrapping.

Title: Re: Lesson Planning
Post by Mark Anderson on Aug 6th, 2013, 2:11pm

Well it seems *I* can FTP to new and old servers. Not sure if the rest of the world is connecting to either. I've uploaded a fixed copy of the TBX to both, so if you can connect you should get the fixed one. Otherwise the only change is the code edit posted above.

Title: Re: Lesson Planning
Post by Steve Scott on Aug 6th, 2013, 10:44pm

Mark,

The update works beautifully.  I am continuing to tweak the file.  Thanks again!

Steve

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.