1 |
4235
|
leinfelder
|
<%@ page language="java" %>
|
2 |
|
|
<%
|
3 |
5031
|
daigle
|
/**
|
4 |
4235
|
leinfelder
|
*
|
5 |
|
|
* '$RCSfile$'
|
6 |
|
|
* Copyright: 2008 Regents of the University of California and the
|
7 |
|
|
* National Center for Ecological Analysis and Synthesis
|
8 |
|
|
* '$Author$'
|
9 |
|
|
* '$Date$'
|
10 |
|
|
* '$Revision$'
|
11 |
|
|
*
|
12 |
|
|
* This program is free software; you can redistribute it and/or modify
|
13 |
|
|
* it under the terms of the GNU General Public License as published by
|
14 |
|
|
* the Free Software Foundation; either version 2 of the License, or
|
15 |
|
|
* (at your option) any later version.
|
16 |
|
|
*
|
17 |
|
|
* This program is distributed in the hope that it will be useful,
|
18 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20 |
|
|
* GNU General Public License for more details.
|
21 |
|
|
|
22 |
|
|
* You should have received a copy of the GNU General Public License
|
23 |
|
|
* along with this program; if not, write to the Free Software
|
24 |
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
25 |
5031
|
daigle
|
*/
|
26 |
4235
|
leinfelder
|
%>
|
27 |
|
|
|
28 |
|
|
<%@ include file="../../common/common-settings.jsp"%>
|
29 |
|
|
<%@ include file="../../common/configure-check.jsp"%>
|
30 |
|
|
|
31 |
3510
|
leinfelder
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
32 |
|
|
<html>
|
33 |
|
|
<head>
|
34 |
|
|
<title>FIRST Assessment Metadata Repository</title>
|
35 |
|
|
<link rel="stylesheet" type="text/css"
|
36 |
4235
|
leinfelder
|
href="<%=STYLE_SKINS_URL%>/first/first.css">
|
37 |
3510
|
leinfelder
|
<script language="JavaScript" type="text/JavaScript"
|
38 |
4235
|
leinfelder
|
src="<%=STYLE_SKINS_URL%>/first/first.js"></script>
|
39 |
3510
|
leinfelder
|
<script language="JavaScript" type="text/JavaScript"
|
40 |
4290
|
leinfelder
|
src="<%=STYLE_SKINS_URL%>/first/search.js"></script>
|
41 |
|
|
<script language="JavaScript" type="text/JavaScript"
|
42 |
4235
|
leinfelder
|
src="<%=STYLE_COMMON_URL%>/branding.js"></script>
|
43 |
4290
|
leinfelder
|
<script language="Javascript" type="text/JavaScript"
|
44 |
|
|
src="<%=STYLE_COMMON_URL%>/prototype-1.5.1.1/prototype.js">
|
45 |
4388
|
leinfelder
|
</script>
|
46 |
|
|
<script language="Javascript" type="text/JavaScript"
|
47 |
|
|
src="<%=STYLE_COMMON_URL%>/effects.js">
|
48 |
|
|
</script>
|
49 |
3510
|
leinfelder
|
<script language="Javascript">
|
50 |
|
|
|
51 |
4364
|
leinfelder
|
function browseAll() {
|
52 |
|
|
document.getElementById("searchBox").value = "%";
|
53 |
5061
|
leinfelder
|
document.getElementById("includeItems").checked = false;
|
54 |
5058
|
leinfelder
|
searchAssessments(false);
|
55 |
4364
|
leinfelder
|
}
|
56 |
|
|
|
57 |
5058
|
leinfelder
|
function searchAssessments(includeItems) {
|
58 |
4364
|
leinfelder
|
var searchString = document.getElementById("searchBox").value;
|
59 |
|
|
var institution = document.getElementById("institution").value;
|
60 |
|
|
var instructor = document.getElementById("instructor").value;
|
61 |
|
|
var course = document.getElementById("course").value;
|
62 |
|
|
var year = document.getElementById("year").value;
|
63 |
4562
|
leinfelder
|
var otherField = document.getElementById("otherField").value;
|
64 |
|
|
var otherValue = document.getElementById("otherValue").value;
|
65 |
4932
|
leinfelder
|
//keywords
|
66 |
5059
|
leinfelder
|
//var keywordThesaurus1 = document.getElementById("keywordThesaurus1").value;
|
67 |
4932
|
leinfelder
|
var keyword1 = document.getElementById("keyword1").value;
|
68 |
|
|
|
69 |
|
|
|
70 |
4364
|
leinfelder
|
var searchTerms = new Object();
|
71 |
|
|
searchTerms["anyValue"] = searchString;
|
72 |
|
|
searchTerms["institution/organizationName"] = institution;
|
73 |
|
|
searchTerms["instructor/individualName/surName"] = instructor;
|
74 |
|
|
searchTerms["course/lom/general/title/string"] = course;
|
75 |
|
|
searchTerms["course/year"] = year;
|
76 |
4562
|
leinfelder
|
searchTerms[otherField] = otherValue;
|
77 |
4932
|
leinfelder
|
//TODO: implement thesaurus matching (compound INTERSECTION)
|
78 |
|
|
searchTerms["keyword"] = keyword1;
|
79 |
5059
|
leinfelder
|
searchTerms["fieldentry"] = keyword1;
|
80 |
3550
|
leinfelder
|
|
81 |
4364
|
leinfelder
|
var operator = "UNION";
|
82 |
|
|
if (document.getElementById("all").checked) {
|
83 |
|
|
operator = "INTERSECT";
|
84 |
3510
|
leinfelder
|
}
|
85 |
5058
|
leinfelder
|
if (document.getElementById("includeItems").checked) {
|
86 |
|
|
includeItems = true;
|
87 |
|
|
} else {
|
88 |
|
|
includeItems = false;
|
89 |
|
|
}
|
90 |
3550
|
leinfelder
|
|
91 |
4290
|
leinfelder
|
var metacatURL = "<%=CONTEXT_URL%>/metacat";
|
92 |
|
|
|
93 |
5058
|
leinfelder
|
//generate the query for items
|
94 |
|
|
var itemQueryString =
|
95 |
4290
|
leinfelder
|
generateSearchString(
|
96 |
4364
|
leinfelder
|
searchTerms,
|
97 |
5058
|
leinfelder
|
null,
|
98 |
4364
|
leinfelder
|
operator,
|
99 |
5058
|
leinfelder
|
false,
|
100 |
|
|
true);
|
101 |
4364
|
leinfelder
|
|
102 |
5060
|
leinfelder
|
//alert("itemQueryString=" + itemQueryString);
|
103 |
5058
|
leinfelder
|
|
104 |
|
|
loadAssessments = function(transport) {
|
105 |
|
|
|
106 |
|
|
//harvest the itemIds
|
107 |
|
|
var itemIds = new Object();
|
108 |
|
|
var itemIdForm = document.getElementById("itemIdForm");
|
109 |
|
|
if (itemIdForm) {
|
110 |
|
|
var itemIdObj = itemIdForm.itemIds;
|
111 |
|
|
//alert("itemIdObj=" + itemIdObj);
|
112 |
|
|
|
113 |
|
|
if (itemIdObj.length > 1) {
|
114 |
|
|
for (var i=0; i < itemIdObj.length; i++) {
|
115 |
|
|
itemIds[i] = itemIdObj[i].value;
|
116 |
|
|
}
|
117 |
|
|
} else {
|
118 |
|
|
itemIds[0] = itemIdObj.value;
|
119 |
|
|
}
|
120 |
|
|
}
|
121 |
|
|
|
122 |
|
|
//generate the assessment query with item ids included
|
123 |
|
|
var queryString =
|
124 |
|
|
generateSearchString(
|
125 |
|
|
searchTerms,
|
126 |
|
|
itemIds,
|
127 |
|
|
operator,
|
128 |
|
|
true,
|
129 |
|
|
false);
|
130 |
|
|
|
131 |
|
|
//alert("queryString=" + queryString);
|
132 |
|
|
|
133 |
|
|
//load the assessments
|
134 |
|
|
callAjax(metacatURL, queryString, "first-assessment", "ajaxSearchResults", null);
|
135 |
|
|
Effect.Appear('ajaxSearchResults', {duration: 1.5});
|
136 |
|
|
};
|
137 |
|
|
|
138 |
|
|
//do we search using the items or not?
|
139 |
|
|
if (includeItems) {
|
140 |
|
|
//load the items (which calls the function above)
|
141 |
|
|
callAjax(metacatURL, itemQueryString, "first-item", "itemSearchResults", loadAssessments);
|
142 |
|
|
} else {
|
143 |
|
|
//generate the assessment query with item ids included
|
144 |
|
|
var queryString =
|
145 |
|
|
generateSearchString(
|
146 |
|
|
searchTerms,
|
147 |
|
|
null,
|
148 |
|
|
operator,
|
149 |
|
|
true,
|
150 |
|
|
false);
|
151 |
|
|
// just load the assessments
|
152 |
|
|
callAjax(metacatURL, queryString, "first-assessment", "ajaxSearchResults", null);
|
153 |
|
|
Effect.Appear('ajaxSearchResults', {duration: 1.5});
|
154 |
|
|
}
|
155 |
4290
|
leinfelder
|
}
|
156 |
3510
|
leinfelder
|
</script>
|
157 |
|
|
</head>
|
158 |
|
|
<body>
|
159 |
|
|
<script language="JavaScript">
|
160 |
4235
|
leinfelder
|
insertTemplateOpening("<%=CONTEXT_URL%>");
|
161 |
|
|
insertSearchBox("<%=CONTEXT_URL%>");
|
162 |
3510
|
leinfelder
|
</script>
|
163 |
|
|
|
164 |
4386
|
leinfelder
|
<table width="100%" border="0" cellspacing="20" cellpadding="0">
|
165 |
3510
|
leinfelder
|
<tr>
|
166 |
4388
|
leinfelder
|
<th colspan="2">
|
167 |
|
|
Search
|
168 |
|
|
</th>
|
169 |
|
|
</tr>
|
170 |
|
|
<tr>
|
171 |
3510
|
leinfelder
|
<td>
|
172 |
4364
|
leinfelder
|
<form method="POST" action="<%=SERVLET_URL%>" target="_top" id="searchForm">
|
173 |
3510
|
leinfelder
|
|
174 |
|
|
<table class="tables" cellpadding="8" cellspacing="0">
|
175 |
|
|
<tr class="sectheader">
|
176 |
4388
|
leinfelder
|
|
177 |
4364
|
leinfelder
|
<td class="borderbottom" align="left" colspan="2">
|
178 |
4388
|
leinfelder
|
Any field:
|
179 |
|
|
<input size="30" name="searchstring" type="text" value="" id="searchBox">
|
180 |
3510
|
leinfelder
|
</td>
|
181 |
4388
|
leinfelder
|
|
182 |
4364
|
leinfelder
|
</tr>
|
183 |
3510
|
leinfelder
|
<tr>
|
184 |
4932
|
leinfelder
|
<td valign="top" align="left" class="borderbottom">
|
185 |
4362
|
leinfelder
|
|
186 |
4364
|
leinfelder
|
<input name="query" type="hidden">
|
187 |
|
|
<input name="qformat" value="first" type="hidden">
|
188 |
|
|
<input type="hidden" name="action" value="squery">
|
189 |
4305
|
leinfelder
|
|
190 |
4364
|
leinfelder
|
<table>
|
191 |
|
|
<tr>
|
192 |
|
|
<td>Institution: </td>
|
193 |
|
|
<td><input name="institution" id="institution" type="text" size="14"/></td>
|
194 |
|
|
</tr>
|
195 |
|
|
<tr>
|
196 |
|
|
<td>Course: </td>
|
197 |
|
|
<td><input name="course" id="course" type="text" size="14"/></td>
|
198 |
|
|
</tr>
|
199 |
|
|
<tr>
|
200 |
|
|
<td>Instructor: </td>
|
201 |
|
|
<td><input name="instructor" id="instructor" type="text" size="14"/></td>
|
202 |
|
|
</tr>
|
203 |
|
|
<tr>
|
204 |
|
|
<td>Year: </td>
|
205 |
|
|
<td><input name="year" id="year" type="text" size="4"/></td>
|
206 |
|
|
</tr>
|
207 |
4932
|
leinfelder
|
|
208 |
|
|
</table>
|
209 |
|
|
</td>
|
210 |
|
|
<td valign="top" class="borderbottom">
|
211 |
|
|
<table>
|
212 |
4562
|
leinfelder
|
<tr>
|
213 |
|
|
<td>
|
214 |
4997
|
leinfelder
|
<select id="otherField" name="otherField">
|
215 |
4636
|
leinfelder
|
<option value="assessment/title">Assessment Title</option>
|
216 |
|
|
<option value="assessment/type">Assessment Type</option>
|
217 |
4562
|
leinfelder
|
<option value="assessment/duration">Assessment Duration</option>
|
218 |
4932
|
leinfelder
|
<option value="assessment/grading/@group">Group Grading</option>
|
219 |
|
|
<option value="assessment/grading/@size">Group Size</option>
|
220 |
|
|
<option value="assessment/grading">Group Grading Approach</option>
|
221 |
|
|
|
222 |
|
|
<option value="course/lom/general/identifier/entry">Course Id</option>
|
223 |
|
|
<option value="course/lom/general/title/string">Course Title</option>
|
224 |
|
|
<option value="course/lom/general/description/string">Course Description</option>
|
225 |
4562
|
leinfelder
|
<option value="course/term">Course Term</option>
|
226 |
4932
|
leinfelder
|
<option value="course/year">Course Year</option>
|
227 |
|
|
<option value="course/coverage/rangeOfDates/beginDate/calendarDate">Course Start Date</option>
|
228 |
|
|
<option value="course/coverage/rangeOfDates/endDate/calendarDate">Course End Date</option>
|
229 |
|
|
|
230 |
|
|
<option value="institution/organizationName">Institution Name</option>
|
231 |
|
|
<option value="instructor/individualName/surName">Instructor Surname</option>
|
232 |
|
|
<option value="instructor/organizationName">Instructor Organization</option>
|
233 |
|
|
|
234 |
4562
|
leinfelder
|
</select>
|
235 |
|
|
</td>
|
236 |
|
|
<td><input name="otherValue" id="otherValue" type="text" size="14"/></td>
|
237 |
|
|
</tr>
|
238 |
4932
|
leinfelder
|
<tr>
|
239 |
|
|
<td>
|
240 |
5059
|
leinfelder
|
Keyword:
|
241 |
4932
|
leinfelder
|
</td>
|
242 |
|
|
<td><input name="keyword1" id="keyword1" type="text" size="14"/></td>
|
243 |
|
|
</tr>
|
244 |
|
|
|
245 |
4364
|
leinfelder
|
</table>
|
246 |
3510
|
leinfelder
|
</td>
|
247 |
4932
|
leinfelder
|
</tr>
|
248 |
|
|
<tr>
|
249 |
|
|
<td valign="top" class="borderbottom">
|
250 |
|
|
<table>
|
251 |
4364
|
leinfelder
|
<tr>
|
252 |
|
|
<td nowrap="nowrap">
|
253 |
|
|
<input name="anyAll" id="any" value="UNION" type="radio" checked="checked"/>
|
254 |
|
|
</td>
|
255 |
|
|
<td nowrap="nowrap">Match any</td>
|
256 |
|
|
</tr>
|
257 |
|
|
<tr>
|
258 |
|
|
<td nowrap="nowrap">
|
259 |
|
|
<input name="anyAll" id="all" value="INTERSECT" type="radio"/>
|
260 |
|
|
</td>
|
261 |
|
|
<td nowrap="nowrap">Match all</td>
|
262 |
|
|
</tr>
|
263 |
5058
|
leinfelder
|
<tr>
|
264 |
|
|
<td nowrap="nowrap">
|
265 |
|
|
<input name="includeItems" id="includeItems" checked="checked" type="checkbox"/>
|
266 |
|
|
</td>
|
267 |
|
|
<td nowrap="nowrap">Search across Items</td>
|
268 |
|
|
</tr>
|
269 |
4932
|
leinfelder
|
</table>
|
270 |
|
|
</td>
|
271 |
|
|
<td valign="bottom" class="borderbottom">
|
272 |
|
|
<table>
|
273 |
4364
|
leinfelder
|
<tr>
|
274 |
4388
|
leinfelder
|
<td colspan="2">
|
275 |
5058
|
leinfelder
|
<input type="button" onclick="javascript:searchAssessments(true)" value="Search"/>
|
276 |
4388
|
leinfelder
|
</td>
|
277 |
|
|
</tr>
|
278 |
4364
|
leinfelder
|
</table>
|
279 |
|
|
</td>
|
280 |
3510
|
leinfelder
|
</tr>
|
281 |
|
|
</table>
|
282 |
4364
|
leinfelder
|
</form>
|
283 |
|
|
|
284 |
3510
|
leinfelder
|
</td>
|
285 |
4364
|
leinfelder
|
<td colspan="1" valign="top">
|
286 |
4388
|
leinfelder
|
<div align="left">
|
287 |
4364
|
leinfelder
|
<p align="left">This tool allows you to search for Assessments either by keyword,
|
288 |
|
|
or with a structured search that targets particular facets of an assessment.
|
289 |
|
|
<br />
|
290 |
|
|
<br />
|
291 |
|
|
You can use the '%' character as a wildcard in your searches (e.g.,
|
292 |
|
|
'%biology%' would locate any phrase with the word biology embedded within it).
|
293 |
|
|
</p>
|
294 |
4388
|
leinfelder
|
<a href="javascript:browseAll()">Browse All Assessments...</a>
|
295 |
4364
|
leinfelder
|
</div>
|
296 |
|
|
</td>
|
297 |
3510
|
leinfelder
|
</tr>
|
298 |
4364
|
leinfelder
|
<tr>
|
299 |
|
|
<td valign="top" colspan="2">
|
300 |
4393
|
leinfelder
|
<div id="ajaxSearchResults" style="display:none;">
|
301 |
|
|
Loading search results
|
302 |
|
|
<img src="<%=CONTEXT_URL%>/style/images/spinner.gif" border="none"/>
|
303 |
|
|
</div>
|
304 |
4364
|
leinfelder
|
</td>
|
305 |
|
|
</tr>
|
306 |
5058
|
leinfelder
|
<tr>
|
307 |
|
|
<td valign="top" colspan="2">
|
308 |
|
|
<div id="itemSearchResults" style="display:none;">
|
309 |
|
|
Loading Assessment Item results
|
310 |
|
|
<img src="<%=CONTEXT_URL%>/style/images/spinner.gif" border="none"/>
|
311 |
|
|
</div>
|
312 |
|
|
</td>
|
313 |
|
|
</tr>
|
314 |
3510
|
leinfelder
|
</table>
|
315 |
|
|
|
316 |
|
|
<script language="JavaScript">
|
317 |
4235
|
leinfelder
|
insertTemplateClosing("<%=CONTEXT_URL%>");
|
318 |
3510
|
leinfelder
|
</script>
|
319 |
|
|
</body>
|
320 |
|
|
</html>
|