<div dir="ltr"><div><div><div><div>Stuart,<br><br></div>Thank you.  This really opens up some options for us.  I imagine, though, that it will be interesting to test!<br><br></div>Bob Gonzales<br></div>Binghamton University<br></div>Chemistry Dept<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 10, 2015 at 6:22 PM, Stuart Raeburn <span dir="ltr"><<a href="mailto:raeburn@msu.edu" target="_blank">raeburn@msu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Bob,<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I don't see a way to get the current date/time in lon-capa so I'm not sure<br>
how we could accomplish this.  Any suggestions?<br>
</blockquote>
<br></span>
Within a script block you can use the LON-CAPA function:<br>
&EXT('system.time')<br>
<br>
to retrieve the current time as an epoch/Unix time, and<br>
<br>
&EXT('resource.'.$partid.'.duedate')<br>
<br>
to retrieve the due date for part: $partid as an epoch/Unix time for the current user. For a problem without parts use a $partid of 0.<br>
<br>
The LON-CAPA function: &due_date($partid)<br>
<br>
will retrieve the due date for the current user for part: $partid displayed in the format: day month date HH:MM:SS am/pm YYYY (Time Zone).  For a problem without parts omit $partid.<br>
<br>
<br>
Stuart Raeburn<br>
LON-CAPA Academic Consortium<div><div class="h5"><br>
<br>
<br>
Quoting Bob Gonzales <<a href="mailto:rgonzal@binghamton.edu" target="_blank">rgonzal@binghamton.edu</a>>:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
We have some problems that we use in our lab courses where the students<br>
enter experimental data in one part of the problem which is then used in<br>
calculations in another part of the problem.  The displaying of the parts<br>
are controlled by block conditions.<br>
<br>
We would like allow them access to the part with the calculations if their<br>
experimental data is correct OR if they at least tried to enter some<br>
experimental data AND the lab period is over.  If their experimental data<br>
is not correct and the lab period is over then we would give them alternate<br>
data to use for the calculations.<br>
<br>
I don't see a way to get the current date/time in lon-capa so I'm not sure<br>
how we could accomplish this.  Any suggestions?<br>
<br>
Thanks,<br>
Bob Gonzales<br>
Binghamton University<br>
Chemistry Dept<br>
</blockquote>
<br></div></div>
_______________________________________________<br>
LON-CAPA-users mailing list<br>
<a href="mailto:LON-CAPA-users@mail.lon-capa.org" target="_blank">LON-CAPA-users@mail.lon-capa.org</a><br>
<a href="http://mail.lon-capa.org/mailman/listinfo/lon-capa-users" rel="noreferrer" target="_blank">http://mail.lon-capa.org/mailman/listinfo/lon-capa-users</a><br>
</blockquote></div><br></div>