Creating Your Own Banner Web Pages
(ID/Name Search on the Web)
Robert Nitsos, Assistant Registrar, Loyola Marymount UniversityFr. Jim Keene, SJ, Systems Administrator, Loyola Marymount University
Wednesday, October 9, 2002 2:15 PM
Session Rules of Etiquette
• Please turn off your cell phone/beeper
• If you must leave the session early, please do so as discretely as possible
• Please avoid side conversations during the presentation
Thank you for your cooperation!
Introductions
• Robert Nitsos• Assistant Registrar,
Student Records Systems
• Fr. Jim Keene, SJ• Enterprise Project
Coordinator• [email protected]
Loyola Marymount University
• Private, 4-Year Institution
• >6400 Total FTE• Web For… since
Spring 2000• Currently Banner 4.x• Going to 5.x next
week!
Topics of Discussion
• Need for Capability
• Creation of Package
• Web Tailor
• Live Demo (I Hope)
• Questions/Comments/Praise/Donations
Need for Capability
• Upgrading System
• Moving Faculty Away From Banner to the Web
• No Feature Existed in Baseline
Creation of Package
• Package Header• Define Procedures/Functions to be Called• Passed Parameters
• Package Body• Main Procedure Code• Additional Procedures/Functions
Package Headercreate or replace package lmuhwskiden is
procedure LMU_ID_Search (stuid in spriden.spriden_id%type default null,stulname in spriden.spriden_last_name%type default null,stufname in spriden.spriden_first_name%type default null,stumi in spriden.spriden_mi%type default null,firstsrch in varchar2 default 'Y',term IN STVTERM.STVTERM_CODE%TYPE DEFAULT NULL,error_mess in varchar2 default null);
procedure select_id (spidm in spriden.spriden_pidm%type default null);
END lmuhwskiden;
Package BodyCREATE OR REPLACE PACKAGE BODY lmuhwskiden AS
/* Global type and variable declarations for package */
pidm spriden.spriden_pidm%TYPE;
/****************************** LMU Person Search ***********************/
procedure LMU_ID_Search (stuid in spriden.spriden_id%type default null,
stulname in spriden.spriden_last_name%type default null,
stufname in spriden.spriden_first_name%type default null,
stumi in spriden.spriden_mi%type default null,
firstsrch in varchar2 default 'Y',
term IN STVTERM.STVTERM_CODE%TYPE DEFAULT NULL,
error_mess in varchar2 default null)
is
Package Body (cont.)• Variable Declarations
studob spbpers.spbpers_birth_date%type default null;
hold_term stvterm.stvterm_code%TYPE;
msg varchar2(255);
rcount number;
Package Body (cont.)• Cursor(s) to be Used
cursor personinfo is
select spriden_pidm pidm, spriden_id id, spriden_last_name lname,
spriden_first_name fname, spriden_mi mi, spriden_change_ind chg,
spbpers_birth_date dob
from spriden, spbpers
where spriden_pidm=spbpers_pidm
and spriden_entity_ind='P'
and spriden_id like stuid||'%'
and upper(spriden_last_name) like upper(stulname||'%')
and upper(spriden_first_name) like upper(stufname||'%')
and nvl(upper(spriden_mi), ‘_') like upper(stumi||'%')
and firstsrch<>'Y'
order by lname, fname, mi, id;
Package Body (cont.)
• Check the current user’s PIDM (the user who is logged in)
/* Check if Valid User */
IF NOT twgkwbis.F_ValidUser(pidm) THEN
return;
END IF;
Package Body (cont.)• Select a Term Code if none already selected
IF TERM IS NULL THEN hold_term := twgkwbis.F_GetParam(pidm,'TERM'); /* otherwise, you came from P_FacSelTerm, and need to write */ /* the param to the gorwprm table and set your local, hold_term */ ELSE twgkwbis.P_SetParam(pidm,'TERM',term); hold_term := term; END IF; /* Make sure a term has been selected */ IF hold_term is null THEN hwskostm.P_FacSelTerm(calling_proc_name=> 'lmuhwskiden.LMU_ID_Search'); RETURN; END IF;
Package Body (cont.)• Make sure the user is a valid faculty member
/* If the user is not a valid faculty member for the selected */ /* term, print a message, close the page, and exit. */ IF NOT HWSKILIB.F_ValidFac(hold_term,pidm) THEN twgkwbis.P_OpenDoc('lmuhwskiden.LMU_ID_Search',header_text=> '*** Invalid Faculty ID ***'); msg := 'You must be a valid faculty member for the selected term'|| ' to access this page.'; HTP.hr; twgkfrmt.P_PrintImage(twgklibs.twgbwrul_rec.twgbwrul_error_gif); HTP.bold(msg); HTP.para; TWGKWBIS.P_CloseDoc(curr_release); RETURN; END IF;
Package Body (cont.)
• Open the form and display Information Text (if any)
twgkwbis.P_OpenDoc('lmuhwskiden.LMU_ID_Search', header_text=>'');
/* Put your instructions for the page in the Information Text vairable
HOWTO */
twgkwbis.P_DispInfo('lmuhwskiden.LMU_ID_Search', 'HOWTO');
/* Put any other information in the Information Text variable DEFAULT */
twgkwbis.P_DispInfo('lmuhwskiden.LMU_ID_Search','DEFAULT');
Package Body (cont.)• Display Search Criteria Boxes
htp.formOpen('lmuhwskiden.LMU_ID_Search', 'post');
twgkfrmt.P_TableOpen('DATADISPLAY');
/* Data Labels */
twgkfrmt.P_TableRowOpen('left');
twgkfrmt.P_TableDataLabel('ID',calign=>'left');
twgkfrmt.P_TableDataLabel('Last Name',calign=>'left');
twgkfrmt.P_TableDataLabel('First Name',calign=>'left');
twgkfrmt.P_TableDataLabel('Middle Name',calign=>'left');
twgkfrmt.P_TableDataLabel('',calign=>'left');
twgkfrmt.P_TableRowClose;
Package Body (cont.)• Display Search Criteria Boxes (cont.)
/* Data Containers */twgkfrmt.P_TableRowOpen('left');twgkfrmt.P_TableDataOpen(calign=>'left');htp.formtext('stuid', 9, 9);twgkfrmt.P_TableDataClose;twgkfrmt.P_TableDataOpen(calign=>'left');htp.formtext('stulname', 60, 60);twgkfrmt.P_TableDataClose;twgkfrmt.P_TableDataOpen(calign=>'left');htp.formtext('stufname', 15, 15);twgkfrmt.P_TableDataClose;twgkfrmt.P_TableDataOpen(calign=>'left');htp.formtext('stumi', 15, 15);twgkfrmt.P_TableDataClose;
Package Body (cont.)• Display Search Criteria Boxes (cont.)
twgkfrmt.P_TableDataOpen(calign=>'left');
htp.formhidden('firstsrch', 'N');
htp.formSubmit(null, 'Search');
twgkfrmt.P_TableDataClose;
twgkfrmt.P_TableRowClose;
htp.formClose;
twgkfrmt.P_TableClose;
Package Body (cont.)• Display any error messages
/* Show any error message(s) */
if error_mess is not null then
htp.nl;
htp.p('Error: '||error_mess||'<br>');
end if;
htp.nl;
Package Body (cont.)• Display the search results
/* Show List of Matching Students */
rcount:=0;
FOR mystuff IN personinfo
LOOP
…
END LOOP;
twgkfrmt.P_TableClose;
twgkwbis.P_CloseDoc;
end LMU_ID_Search;
Package Body (Inside the Loop)• Show Row Headers First – Includes Information Text for Selecting ID
if rcount=0 thentwgkwbis.P_DispInfo('lmuhwskiden.LMU_ID_Search','SELSTU');twgkfrmt.P_TableOpen('DATADISPLAY');
twgkfrmt.P_TableRowOpen('left'); twgkfrmt.P_TableDataLabel('Action',calign=>'left'); twgkfrmt.P_TableDataLabel('ID',calign=>'left'); twgkfrmt.P_TableDataLabel('Last Name',calign=>'left'); twgkfrmt.P_TableDataLabel('First Name',calign=>'left'); twgkfrmt.P_TableDataLabel('MI',calign=>'left'); twgkfrmt.P_TableDataLabel('Birth Date',calign=>'left'); twgkfrmt.P_TableDataLabel('Chg',calign=>'center'); twgkfrmt.P_TableRowClose;
rcount:=1;end if;
Package Body (Inside the Loop)• Display Results – Include Button to Select ID
htp.formOpen('lmuhwskiden.select_id', 'post');htp.formHidden('spidm', mystuff.pidm);twgkfrmt.P_TableRowOpen('left');twgkfrmt.P_TableDataOpen(calign=>'center');htp.formSubmit(null, 'Select');twgkfrmt.P_TableDataClose;twgkfrmt.P_TableData(twgkfrmt.F_PrintBold(mystuff.id),calign=>'left');twgkfrmt.P_TableData(twgkfrmt.F_PrintBold(mystuff.lname),calign=>'left');twgkfrmt.P_TableData(twgkfrmt.F_PrintBold(mystuff.fname),calign=>'left');twgkfrmt.P_TableData(twgkfrmt.F_PrintBold(mystuff.mi),calign=>'left');twgkfrmt.P_TableData(twgkfrmt.F_PrintBold(mystuff.dob),calign=>'left');twgkfrmt.P_TableData(twgkfrmt.F_PrintBold(mystuff.chg),calign=>'center');twgkfrmt.P_TableRowClose;htp.formClose;
Package Body (Function)• Function to Select Student
procedure select_id (spidm in spriden.spriden_pidm%type default null)
IS
begin
IF NOT twgkwbis.F_ValidUser(pidm) THEN
return;
END IF;
/* Set current student to that of passed spidm */
twgkwbis.P_SetParam(pidm,'STUPIDM',to_char(spidm,'999999999'));
/* Return to the Menu */
twgkwbis.P_GenMenu('amenu.P_FacStuMnu');
return;
end;
end lmuhwskiden;
Synonyms & Grants• Create a Public synonym and provide Execute grant to Public
whenever sqlerror continue;
drop public synonym lmuhwskiden;
whenever sqlerror exit rollback;
create public synonym lmuhwskiden for lmuhwskiden;
grant execute on lmuhwskiden to public;
Web Tailor
• Create Procedure
• Add to Menu
• Create Information Text
Create a New Procedure
• Click on the Create button to add your procedure
Create Procedure
• Enter Page Name
• Enter Description
• Select Module
• Enable• Enter Page
Title• Enter Header
Text
Create Procedure (cont.)
• Enter Margin Widths
• Enter Help Link (if any)
• Enter Back Link URL & Text (if any)
• Check Back Link Menu Indicator
Create Procedure (cont.)
• Check applicable User Roles
• Save Changes
Add Page to Menu
• Select the menu to which the page is to be added
• Click the Customize Menu Items Button
Add New Menu Item
• Click on the Add a New Menu Item button at the bottom of the page
Create New Menu Item
• Enter the URL
• Enter the Link Text
• If you want additional text displayed, enter a Link Description
• Enter Status Bar Text
• Be sure that the Enabled and Database Procedure boxes are checked!
Create Information Text
• Click on the Add a New Information Text Entry button
Create Information Text (cont.)
• Select the Sequence Number
• Enter (or select) the Label name
• Enter the Information Text
• Select an Image
Demo
Shameless Plug
• SQL*Plus for Quick Banner Information and Reports
• Fr. Jim Keene, System Administrator, Loyola Marymount University
• Wednesday, October 9 @ 3:45pm
Questions, Answers & Resources
[email protected]@lmu.edu
LMU Code Page:http://registrar.lmu.edu/Code/LMUBannerCode.htm
Stephen Rea, Univ. of Arkansashttp://www.uaex.edu/srea/