Stuart, Thank you. This really opens up some options for us. I imagine, though, that it will be interesting to test!
Bob Gonzales Binghamton University Chemistry Dept On Tue, Nov 10, 2015 at 6:22 PM, Stuart Raeburn <raeb...@msu.edu> wrote: > Bob, > > I don't see a way to get the current date/time in lon-capa so I'm not sure >> how we could accomplish this. Any suggestions? >> > > Within a script block you can use the LON-CAPA function: > &EXT('system.time') > > to retrieve the current time as an epoch/Unix time, and > > &EXT('resource.'.$partid.'.duedate') > > 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. > > The LON-CAPA function: &due_date($partid) > > 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. > > > Stuart Raeburn > LON-CAPA Academic Consortium > > > > Quoting Bob Gonzales <rgon...@binghamton.edu>: > > Hi, >> >> We have some problems that we use in our lab courses where the students >> enter experimental data in one part of the problem which is then used in >> calculations in another part of the problem. The displaying of the parts >> are controlled by block conditions. >> >> We would like allow them access to the part with the calculations if their >> experimental data is correct OR if they at least tried to enter some >> experimental data AND the lab period is over. If their experimental data >> is not correct and the lab period is over then we would give them >> alternate >> data to use for the calculations. >> >> I don't see a way to get the current date/time in lon-capa so I'm not sure >> how we could accomplish this. Any suggestions? >> >> Thanks, >> Bob Gonzales >> Binghamton University >> Chemistry Dept >> > > _______________________________________________ > LON-CAPA-users mailing list > LON-CAPA-users@mail.lon-capa.org > http://mail.lon-capa.org/mailman/listinfo/lon-capa-users >
_______________________________________________ LON-CAPA-users mailing list LON-CAPA-users@mail.lon-capa.org http://mail.lon-capa.org/mailman/listinfo/lon-capa-users