Angelika Kluk talked about her doubts about religion the night before she disappeared, a jury has been hearing at the High court in Edinburgh.
The sheriff took Angelika to a driving range
Aberdeen sheriff Kieran McLernan said she told him she was "a bit of a pagan" after going to a golf driving range.
Kieran McLernan, 65, also told the court he did not know that Angelika's boyfriend was a married man.
Peter Tobin, 60, denies murdering and raping Angelika, whose body was found in a Glasgow church.
The student was staying at the chapel house and working as a cleaner to help finance her language studies in Gdansk.
Her body was discovered under the floor of St Patrick's Church in Anderston, Glasgow, where Sheriff McLernan and his family were regular attenders on visits to the city.
Mr Tobin worked at the church as a handyman.
The sheriff said the trip to the golf driving range was the first time he had been in Angelika's company outside the church complex.
He described a wide-ranging discussion in his car as they returned from the trip to Bishopbriggs.
Advocate depute Dorothy Bain, prosecuting, asked: "Did you come to understand she had a boyfriend?"
The sheriff said: "Yes, I learned about that on the way back from the golf range."
Ms Bain asked: "Did you know he was married?" The sheriff told her: "No."
The court has heard that Angelika's diary - translated from the Polish - is peppered with references to golf tournaments, and to Sheriff McLernan as her golf teacher.
The jury has also seen video from CCTV cameras showing a car pulling up at the gates of St Patrick's and a figure getting out with what appears to be the shaft of a golf club catching the light and shining.
The figure is followed by a smaller person wearing dark clothes.
Angelika was last seen alive on 24 September and is thought to have been attacked in the garage attached to St Patrick's chapel house.
The trial has heard that the search for her was started by her married boyfriend, chauffeur Martin Macaskill, when Angelika stopped replying to his phone calls and e-mails
Mr Tobin denies murder, attempting to defeat the ends of justice, attempting to pervert the course of justice and breach of the peace.
He also denies rape, claiming he had sex with Angelika with her consent.
Mr Tobin is accused of attacking Angelika between 24 September and 29 September in St Patrick's Church, or elsewhere, gagging her with cloth and tape, binding her hands with cable ties, raping her, smashing her skull with a piece of wood or something similar, stabbing her 16 times in the chest and inflicting other knife injuries.
It is alleged that he then hid the body under the floor of the church.
A further charge alleges that he told Glasgow police his name was Patrick McLaughlin, gave a false date of birth and address, and that he travelled to London and gave staff at the National Neurology and Neurosurgery Hospital in Queen's Square, London, another false name.
Mr Tobin also denies a breach of the peace between July and September last year by threatening Russian student Rebecca Dordi at St Patrick's Church.
The trial continues.