[7706] in Athena Bugs
vax 7.2R: pickup when run by a grader picks up all graded files
daemon@ATHENA.MIT.EDU (Bruce R Lewis)
Sat Jun 29 19:50:12 1991
To: bugs@ATHENA.MIT.EDU
Date: Sat, 29 Jun 91 19:50:07 EDT
From: Bruce R Lewis <brlewis@ATHENA.MIT.EDU>
System name: euphrosyne
Type and version: CVAXSTAR 7.2R (1 update(s) to same version)
Display type: SM
This bug only shows itself when someone who wants to pickup graded files
happens to be on the grader list for a course. This situation won't
come up very often. As far as I know this hasn't happened yet. :-)
Here's an example showing that pickup would get other people's files
(the -l option means only list what you would take)
% /usr/athena/pickup -l -c demo
5 dot 8108 Wed Jun 26 15:36 neos.c
5 dot 741 Wed Jun 26 15:36 passwd
9 kbytes total
The fixed version:
% ./pickup -l -c demo
No papers to pick up
Both the current and fixed versions do the right thing when picking up
handouts or other papers for which you would pick up files authored by
others, and wouldn't then mark the file picked-up.
Please apply the following patches in the directory
/source/athena/usr.athena/turnin/clients
*** fxmain.h~ Sat Jun 29 16:52:53 1991
--- fxmain.h Sat Jun 29 19:29:15 1991
***************
*** 20,25 ****
--- 20,26 ----
#define VERBOSE 1
#define LISTONLY 2
#define PRESERVE 4
+ #define ONE_AUTHOR 8
#define ERR_USAGE -1L
*** pickup.c~ Sat Jun 29 16:37:02 1991
--- pickup.c Sat Jun 29 19:30:03 1991
***************
*** 32,38 ****
/*
* pickup_arg checks to see if the current argument indicates
! * a type for which PRESERVE should be set.
*/
/*ARGSUSED*/
--- 32,39 ----
/*
* pickup_arg checks to see if the current argument indicates
! * a type for which PRESERVE should be set or a type for which
! * we pickup papers authored by others, e.g. handouts.
*/
/*ARGSUSED*/
***************
*** 44,51 ****
Paper *p;
int *flagp;
{
! if (argv[*ip][0] == '-' && index("*TtPheAH", argv[*ip][1]))
*flagp |= PRESERVE;
return(0);
}
--- 45,60 ----
Paper *p;
int *flagp;
{
! static int initialized = 0;
!
! if (!initialized) {
! *flagp |= ONE_AUTHOR;
! initialized = 1;
! }
! if (argv[*ip][0] == '-' && index("*TtPheAH", argv[*ip][1])) {
*flagp |= PRESERVE;
+ *flagp &= ~ONE_AUTHOR;
+ }
return(0);
}
*** dump.c~ Sat Jun 29 16:52:54 1991
--- dump.c Sat Jun 29 19:25:04 1991
***************
*** 58,63 ****
--- 58,66 ----
verbose = flags & VERBOSE;
adjust_criterion(criterion, string);
+ if ((flags & ONE_AUTHOR) && !(criterion->author))
+ criterion->author = fxp->owner;
+
/******** get list of papers from server ********/
code = fx_list(fxp, criterion, &plist);
if (code) {