Hi Mark,
Just facing a similar operation. Here's what I'd do in Oracle sqlplus:
SQL> SELECT user_id
FROM bb50.users
WHERE inst_role_pk = 1
AND user_id NOT IN (
'administrator',
'Bb_BB50_Portal_User_Type_#2',
'Bb_BB50_Portal_User_Type_#3',
'Bb_BB50_Portal_User_Type_#4',
'Bb_BB50_Portal_User_Type_#5',
'guest' )
AND pk1 NOT IN (
SELECT DISTINCT users_pk1
FROM bb50.course_users)
/
Some caveats:
- a user enrolled in an organisation, but not in a course, would not be
listed.
- I assumed that by 'student', you meant anyone having 'Student' as
'Primary Institution Role'.
- you may wish to browse the result to check whether SQL uses any
additional default Blackboard accounts, before using the list to
batch-delete your users. (I wouldn't expect them to be marked as
'Student', but better safe than sorry.)
Kind regards,
Herta
Mark Gamble wrote:
> Don't you hate it when you know you've seen an e-mail months ago and
> can't find it? I'm sure someone (probably Herta) kindly gave me some
> code to run to find which of our students are not enrolled on any
> course. I need to remove all the students not enrolled so we can
> introduce a new, more streamlined password protocol for the next
> semester. Still using Bb 5.5 Basic on Unix (Solaris 8) with SQL.
> --
> Regards
> Mark
>
> Mark Gamble - Head, AV-Media Services, Learning Resources
> Tel ext 2260 Fax 2259 Mobile 077 200 686 05
>
> *http://lrweb.luton.ac.uk/av-media/*
--
******************************************************
Herta Van den Eynde
Toledo system management
K.U.Leuven - Ludit
W.de Croylaan 52A
B-3001 Heverlee
Belgium
tel: +32 (0)16 322 166
fax: +32 (0)16 322 999
******************************************************
"For something fulfilled this hour, loved or endured."
(W.H. Auden)
******************************************************
|