Postgresql bigint to date
'1970-01-01 00:00:00 GMT'::timestamp + ((ColumnName::bigint)::text)::interval
Ugly, but works.
'1970-01-01 00:00:00 GMT'::timestamp + ((ColumnName::bigint)::text)::interval
Ugly, but works.
Handy queries for Moodle.
Count number of users who are are in courses:
select count(distinct ra.userid) from mdl_role_assignments ra,mdl_context c
where ra.contextid=c.id and c.contextlevel=50
Show users who are users in Moodle, but not in a class:
select * from mdl_user where not exists (select * from mdl_user_lastaccess where mdl_user.id = mdl_user_lastaccess.id);
Number of users who have classes:
Simple query that works with postgres to find users who have not logged in.
select * from mdl_user where not exists (select * from mdl_user_lastaccess where mdl_user.id = mdl_user_lastaccess.id);
Some vids I took from SBCC. The fire is close by. In the morning, I hope my friends still have their homes.
When an old lady died in the geriatric ward of a small hospital near
Dundee Scotland , it was believed that she had nothing left of any
value. Later, when the nurses were going through her meager possessions,
they found this poem. Its quality and content so impressed the staff that
copies were made and distributed to every nurse in the hospital. One
nurse took her copy to Ireland . The old lady's sole bequest to posterity
has since appeared in the Christmas edition of the News Magazine of the
North Ireland Association for Mental Health. A slide presentation has
also been made based on her simple, but eloquent, poem. And this little
old Scottish lady, with nothing left to give to the world, is now the
author of this 'anonymous' poem winging across the Internet:
Crabby Old Woman
What do you see, nurses................What do you see?
What are you thinking......When you're looking at me?
A crabby old woman..........................Not very wise,
Uncertain of habit,......................With faraway eyes?
Who dribbles her food ................ And makes no reply.
When you say in a loud voice.......'I do wish you'd try!'
Who seems not to notice ..........The things that you do,
And forever is losing ......................A stocking or shoe?
Who, resisting or not, .............. Lets you do as you will,
With bathing and feeding, .............. The long day to fill?
Is that what you're thinking?......... Is that what you see?
Then open your eyes, nurse,.....You're not looking at me.
I'll tell you who I am ........................As I sit here so still,
As I do at your bidding, ................... As I eat at your will.
I'm a small child of ten..............With a father and mother,
Brothers and sisters........................Who love one another.
A young girl of sixteen ....................With wings on her feet
Dreaming that soon now ...................... A lover she'll meet.
A bride soon at twenty, .................... My heart gives a leap,
Remembering the vows ............... That I promised to keep.
At twenty-five now,..................... I have young of my own,
Who need me to guide ............... And a secure happy home..
A woman of thirty,..................... My young now grown fast,
Bound to each other...................... With ties that should last.
At forty, my young sons...............Have grown and are gone,
But my man's beside me.....................To see I don't mourn
At fifty once more,....................Babies play round my knee,
Again we know children,................... My loved one and me.
Dark days are upon me,.......................My husband is dead,
I look at the future,..............................I shudder with dread.
For my young are all rearing .................Young of their own,
And I think of the years........... And the love that I've known.
I'm now an old woman.......................... And nature is cruel;
Tis jest to make old age .............................. Look like a fool.
The body, it crumbles,...................... Grace and vigor depart,
There is now a stone..................... Where I once had a heart.
But inside this old carcass................. A young girl still dwells,
And now and again,....................... My battered heart swells.
I remember the joys,........................... I remember the pain,
And I'm loving and living................................ Life over again.
I think of the years..................... All too few, gone too fast,
And accept the stark fact......................That nothing can last.
So open your eyes, people,.............................Open and see,
Not a crabby old woman;...........Look closer......see,.....ME!!
I am using CAS authentication in one of my Moodle set ups. Sungard Luminis is being used as the CAS server. We have a 3 hour cookie time out for inactivity because of some long quizes and DSPS students. What was happening was that one student could log in, quit and another student could pick up there session and start work as the original student.
Two settings in Moodle had to be set in order to prevent this from happening:
Under Site Administration, Authentication, CAS
Set Logout CAS</em> to yes</strong>
Under Site Administration, Security, HTTP security,
Click Only http cookies</em>