| Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim
In directory sc8-pr-cvs1:/tmp/cvs-serv9805/WEB-INF/maple/aim
Modified Files:
	Subject.mpl 
Log Message:
changed the method: AuthenticateStudent so that the student is also authenticated if the password is the AdminPassword rather than the student's password. That makes it easier for external programs to log in students.
Index: Subject.mpl
===================================================================
RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Subject.mpl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Subject.mpl	25 Aug 2003 21:47:19 -0000	1.3
--- Subject.mpl	19 Sep 2003 13:04:47 -0000	1.4
***************
*** 372,376 ****
   ['Method','AuthenticateStudent'::`HTML/String`,
    "Returns the empty string if there is a registered student with 
!    ID @id@ and password @password@.  Otherwise, return an HTML page
     with an error message.
    ",
--- 372,378 ----
   ['Method','AuthenticateStudent'::`HTML/String`,
    "Returns the empty string if there is a registered student with 
!    ID @id@ and password @password@ or if there is a registered
!    student with ID @id@ and the @password@ is the AdminPassword.  
!    Otherwise, return an HTML page
     with an error message.
    ",
***************
*** 392,396 ****
        `HTML/Subs`("idnote" = DefaultZone['IDNote'],
          "emaillink" = DefaultZone['AdminEmailLink'],
!                      copy(`aim/Subject/AuthStud/Template/NoID`))));
  
     elif not(register['IsMember',id]) then
--- 394,398 ----
        `HTML/Subs`("idnote" = DefaultZone['IDNote'],
          "emaillink" = DefaultZone['AdminEmailLink'],
! 	 copy(`aim/Subject/AuthStud/Template/NoID`))));
  
     elif not(register['IsMember',id]) then
***************
*** 408,411 ****
--- 410,417 ----
          copy(`aim/Subject/AuthStud/Template/Register`))));
      fi;
+     
+    elif this['AdminPassword'] = password then
+     RETURN("");
+     
     elif not(register['CheckPassword',id,password]) then
      RETURN(
***************
*** 413,417 ****
        `HTML/Subs`("idnote" = DefaultZone['IDNote'],
          "emaillink" = DefaultZone['AdminEmailLink'],
!                      copy(`aim/Subject/AuthStud/Template/BadPassword`))));
  
     else
--- 419,423 ----
        `HTML/Subs`("idnote" = DefaultZone['IDNote'],
          "emaillink" = DefaultZone['AdminEmailLink'],
! 	 copy(`aim/Subject/AuthStud/Template/BadPassword`))));
  
     else
***************
*** 559,565 ****
        `Util/TextFileContents`(cat(this['RootDir'],"/subjhead.html")),
        op(`HTML/Hide`("Command" = "ShowQuizPage",
!                      "SubjectName" = this['Name'],
!                      "QuizName" = "",
!                      extra)),
        this['QuizTable',accesslevel],
        [["br"]],
--- 565,571 ----
        `Util/TextFileContents`(cat(this['RootDir'],"/subjhead.html")),
        op(`HTML/Hide`("Command" = "ShowQuizPage",
! 	 "SubjectName" = this['Name'],
! 	 "QuizName" = "",
! 	 extra)),
        this['QuizTable',accesslevel],
        [["br"]],
***************
*** 610,616 ****
  # KM 
                  sprintf("%3a of %3a = %5.1f%%",
!                          totalmark,totalvalue,
!                          100.*history['TotalMark']/history['TotalValue']
!                        )
                  );
  # end KM
--- 616,622 ----
  # KM 
                  sprintf("%3a of %3a = %5.1f%%",
! 	     totalmark,totalvalue,
! 	     100.*history['TotalMark']/history['TotalValue']
! 	   )
                  );
  # end KM
***************
*** 653,663 ****
        `Util/TextFileContents`(cat(this['RootDir'],"/subjhead.html")),
        op(`HTML/Hide`("Command" = "ShowQuizPage",
!                      "SubjectName" = this['Name'],
!                      "QuizName" = "",
  # KM
!                      "FocusLabel" = "1",
!                      "OldFocusLabel" = "",
  # END KM
!                      extra)),
        this['QuizTableWithMarks',accesslevel,studentid],
        [["br"]],
--- 659,669 ----
        `Util/TextFileContents`(cat(this['RootDir'],"/subjhead.html")),
        op(`HTML/Hide`("Command" = "ShowQuizPage",
! 	 "SubjectName" = this['Name'],
! 	 "QuizName" = "",
  # KM
! 	 "FocusLabel" = "1",
! 	 "OldFocusLabel" = "",
  # END KM
! 	 extra)),
        this['QuizTableWithMarks',accesslevel,studentid],
        [["br"]],
***************
*** 1066,1068 ****
  
  EndPackage():
- 
--- 1072,1073 ----
 |