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 |
5058
|
leinfelder
|
searchAssessments(false);
|
54 |
4364
|
leinfelder
|
}
|
55 |
|
|
|
56 |
5058
|
leinfelder
|
function searchAssessments(includeItems) {
|
57 |
4364
|
leinfelder
|
var searchString = document.getElementById("searchBox").value;
|
58 |
|
|
var institution = document.getElementById("institution").value;
|
59 |
|
|
var instructor = document.getElementById("instructor").value;
|
60 |
|
|
var course = document.getElementById("course").value;
|
61 |
|
|
var year = document.getElementById("year").value;
|
62 |
4562
|
leinfelder
|
var otherField = document.getElementById("otherField").value;
|
63 |
|
|
var otherValue = document.getElementById("otherValue").value;
|
64 |
4932
|
leinfelder
|
//keywords
|
65 |
5059
|
leinfelder
|
//var keywordThesaurus1 = document.getElementById("keywordThesaurus1").value;
|
66 |
4932
|
leinfelder
|
var keyword1 = document.getElementById("keyword1").value;
|
67 |
|
|
|
68 |
|
|
|
69 |
4364
|
leinfelder
|
var searchTerms = new Object();
|
70 |
|
|
searchTerms["anyValue"] = searchString;
|
71 |
|
|
searchTerms["institution/organizationName"] = institution;
|
72 |
|
|
searchTerms["instructor/individualName/surName"] = instructor;
|
73 |
|
|
searchTerms["course/lom/general/title/string"] = course;
|
74 |
|
|
searchTerms["course/year"] = year;
|
75 |
4562
|
leinfelder
|
searchTerms[otherField] = otherValue;
|
76 |
4932
|
leinfelder
|
//TODO: implement thesaurus matching (compound INTERSECTION)
|
77 |
|
|
searchTerms["keyword"] = keyword1;
|
78 |
5059
|
leinfelder
|
searchTerms["fieldentry"] = keyword1;
|
79 |
3550
|
leinfelder
|
|
80 |
4364
|
leinfelder
|
var operator = "UNION";
|
81 |
|
|
if (document.getElementById("all").checked) {
|
82 |
|
|
operator = "INTERSECT";
|
83 |
3510
|
leinfelder
|
}
|
84 |
5058
|
leinfelder
|
if (document.getElementById("includeItems").checked) {
|
85 |
|
|
includeItems = true;
|
86 |
|
|
} else {
|
87 |
|
|
includeItems = false;
|
88 |
|
|
}
|
89 |
3550
|
leinfelder
|
|
90 |
4290
|
leinfelder
|
var metacatURL = "<%=CONTEXT_URL%>/metacat";
|
91 |
|
|
|
92 |
5058
|
leinfelder
|
//generate the query for items
|
93 |
|
|
var itemQueryString =
|
94 |
4290
|
leinfelder
|
generateSearchString(
|
95 |
4364
|
leinfelder
|
searchTerms,
|
96 |
5058
|
leinfelder
|
null,
|
97 |
4364
|
leinfelder
|
operator,
|
98 |
5058
|
leinfelder
|
false,
|
99 |
|
|
true);
|
100 |
4364
|
leinfelder
|
|
101 |
5060
|
leinfelder
|
//alert("itemQueryString=" + itemQueryString);
|
102 |
5058
|
leinfelder
|
|
103 |
|
|
loadAssessments = function(transport) {
|
104 |
|
|
|
105 |
|
|
//harvest the itemIds
|
106 |
|
|
var itemIds = new Object();
|
107 |
|
|
var itemIdForm = document.getElementById("itemIdForm");
|
108 |
|
|
if (itemIdForm) {
|
109 |
|
|
var itemIdObj = itemIdForm.itemIds;
|
110 |
|
|
//alert("itemIdObj=" + itemIdObj);
|
111 |
|
|
|
112 |
|
|
if (itemIdObj.length > 1) {
|
113 |
|
|
for (var i=0; i < itemIdObj.length; i++) {
|
114 |
|
|
itemIds[i] = itemIdObj[i].value;
|
115 |
|
|
}
|
116 |
|
|
} else {
|
117 |
|
|
itemIds[0] = itemIdObj.value;
|
118 |
|
|
}
|
119 |
|
|
}
|
120 |
|
|
|
121 |
|
|
//generate the assessment query with item ids included
|
122 |
|
|
var queryString =
|
123 |
|
|
generateSearchString(
|
124 |
|
|
searchTerms,
|
125 |
|
|
itemIds,
|
126 |
|
|
operator,
|
127 |
|
|
true,
|
128 |
|
|
false);
|
129 |
|
|
|
130 |
|
|
//alert("queryString=" + queryString);
|
131 |
|
|
|
132 |
|
|
//load the assessments
|
133 |
|
|
callAjax(metacatURL, queryString, "first-assessment", "ajaxSearchResults", null);
|
134 |
|
|
Effect.Appear('ajaxSearchResults', {duration: 1.5});
|
135 |
|
|
};
|
136 |
|
|
|
137 |
|
|
//do we search using the items or not?
|
138 |
|
|
if (includeItems) {
|
139 |
|
|
//load the items (which calls the function above)
|
140 |
|
|
callAjax(metacatURL, itemQueryString, "first-item", "itemSearchResults", loadAssessments);
|
141 |
|
|
} else {
|
142 |
|
|
//generate the assessment query with item ids included
|
143 |
|
|
var queryString =
|
144 |
|
|
generateSearchString(
|
145 |
|
|
searchTerms,
|
146 |
|
|
null,
|
147 |
|
|
operator,
|
148 |
|
|
true,
|
149 |
|
|
false);
|
150 |
|
|
// just load the assessments
|
151 |
|
|
callAjax(metacatURL, queryString, "first-assessment", "ajaxSearchResults", null);
|
152 |
|
|
Effect.Appear('ajaxSearchResults', {duration: 1.5});
|
153 |
|
|
}
|
154 |
4290
|
leinfelder
|
}
|
155 |
3510
|
leinfelder
|
</script>
|
156 |
|
|
</head>
|
157 |
|
|
<body>
|
158 |
|
|
<script language="JavaScript">
|
159 |
4235
|
leinfelder
|
insertTemplateOpening("<%=CONTEXT_URL%>");
|
160 |
|
|
insertSearchBox("<%=CONTEXT_URL%>");
|
161 |
3510
|
leinfelder
|
</script>
|
162 |
|
|
|
163 |
4386
|
leinfelder
|
<table width="100%" border="0" cellspacing="20" cellpadding="0">
|
164 |
3510
|
leinfelder
|
<tr>
|
165 |
4388
|
leinfelder
|
<th colspan="2">
|
166 |
|
|
Search
|
167 |
|
|
</th>
|
168 |
|
|
</tr>
|
169 |
|
|
<tr>
|
170 |
3510
|
leinfelder
|
<td>
|
171 |
4364
|
leinfelder
|
<form method="POST" action="<%=SERVLET_URL%>" target="_top" id="searchForm">
|
172 |
3510
|
leinfelder
|
|
173 |
|
|
<table class="tables" cellpadding="8" cellspacing="0">
|
174 |
|
|
<tr class="sectheader">
|
175 |
4388
|
leinfelder
|
|
176 |
4364
|
leinfelder
|
<td class="borderbottom" align="left" colspan="2">
|
177 |
4388
|
leinfelder
|
Any field:
|
178 |
|
|
<input size="30" name="searchstring" type="text" value="" id="searchBox">
|
179 |
3510
|
leinfelder
|
</td>
|
180 |
4388
|
leinfelder
|
|
181 |
4364
|
leinfelder
|
</tr>
|
182 |
3510
|
leinfelder
|
<tr>
|
183 |
4932
|
leinfelder
|
<td valign="top" align="left" class="borderbottom">
|
184 |
4362
|
leinfelder
|
|
185 |
4364
|
leinfelder
|
<input name="query" type="hidden">
|
186 |
|
|
<input name="qformat" value="first" type="hidden">
|
187 |
|
|
<input type="hidden" name="action" value="squery">
|
188 |
4305
|
leinfelder
|
|
189 |
4364
|
leinfelder
|
<table>
|
190 |
|
|
<tr>
|
191 |
|
|
<td>Institution: </td>
|
192 |
|
|
<td><input name="institution" id="institution" type="text" size="14"/></td>
|
193 |
|
|
</tr>
|
194 |
|
|
<tr>
|
195 |
|
|
<td>Course: </td>
|
196 |
|
|
<td><input name="course" id="course" type="text" size="14"/></td>
|
197 |
|
|
</tr>
|
198 |
|
|
<tr>
|
199 |
|
|
<td>Instructor: </td>
|
200 |
|
|
<td><input name="instructor" id="instructor" type="text" size="14"/></td>
|
201 |
|
|
</tr>
|
202 |
|
|
<tr>
|
203 |
|
|
<td>Year: </td>
|
204 |
|
|
<td><input name="year" id="year" type="text" size="4"/></td>
|
205 |
|
|
</tr>
|
206 |
4932
|
leinfelder
|
|
207 |
|
|
</table>
|
208 |
|
|
</td>
|
209 |
|
|
<td valign="top" class="borderbottom">
|
210 |
|
|
<table>
|
211 |
4562
|
leinfelder
|
<tr>
|
212 |
|
|
<td>
|
213 |
4997
|
leinfelder
|
<select id="otherField" name="otherField">
|
214 |
4636
|
leinfelder
|
<option value="assessment/title">Assessment Title</option>
|
215 |
|
|
<option value="assessment/type">Assessment Type</option>
|
216 |
4562
|
leinfelder
|
<option value="assessment/duration">Assessment Duration</option>
|
217 |
4932
|
leinfelder
|
<option value="assessment/grading/@group">Group Grading</option>
|
218 |
|
|
<option value="assessment/grading/@size">Group Size</option>
|
219 |
|
|
<option value="assessment/grading">Group Grading Approach</option>
|
220 |
|
|
|
221 |
|
|
<option value="course/lom/general/identifier/entry">Course Id</option>
|
222 |
|
|
<option value="course/lom/general/title/string">Course Title</option>
|
223 |
|
|
<option value="course/lom/general/description/string">Course Description</option>
|
224 |
4562
|
leinfelder
|
<option value="course/term">Course Term</option>
|
225 |
4932
|
leinfelder
|
<option value="course/year">Course Year</option>
|
226 |
|
|
<option value="course/coverage/rangeOfDates/beginDate/calendarDate">Course Start Date</option>
|
227 |
|
|
<option value="course/coverage/rangeOfDates/endDate/calendarDate">Course End Date</option>
|
228 |
|
|
|
229 |
|
|
<option value="institution/organizationName">Institution Name</option>
|
230 |
|
|
<option value="instructor/individualName/surName">Instructor Surname</option>
|
231 |
|
|
<option value="instructor/organizationName">Instructor Organization</option>
|
232 |
|
|
|
233 |
4562
|
leinfelder
|
</select>
|
234 |
|
|
</td>
|
235 |
|
|
<td><input name="otherValue" id="otherValue" type="text" size="14"/></td>
|
236 |
|
|
</tr>
|
237 |
4932
|
leinfelder
|
<tr>
|
238 |
|
|
<td>
|
239 |
5059
|
leinfelder
|
Keyword:
|
240 |
4932
|
leinfelder
|
</td>
|
241 |
|
|
<td><input name="keyword1" id="keyword1" type="text" size="14"/></td>
|
242 |
|
|
</tr>
|
243 |
|
|
|
244 |
4364
|
leinfelder
|
</table>
|
245 |
3510
|
leinfelder
|
</td>
|
246 |
4932
|
leinfelder
|
</tr>
|
247 |
|
|
<tr>
|
248 |
|
|
<td valign="top" class="borderbottom">
|
249 |
|
|
<table>
|
250 |
4364
|
leinfelder
|
<tr>
|
251 |
|
|
<td nowrap="nowrap">
|
252 |
|
|
<input name="anyAll" id="any" value="UNION" type="radio" checked="checked"/>
|
253 |
|
|
</td>
|
254 |
|
|
<td nowrap="nowrap">Match any</td>
|
255 |
|
|
</tr>
|
256 |
|
|
<tr>
|
257 |
|
|
<td nowrap="nowrap">
|
258 |
|
|
<input name="anyAll" id="all" value="INTERSECT" type="radio"/>
|
259 |
|
|
</td>
|
260 |
|
|
<td nowrap="nowrap">Match all</td>
|
261 |
|
|
</tr>
|
262 |
5058
|
leinfelder
|
<tr>
|
263 |
|
|
<td nowrap="nowrap">
|
264 |
|
|
<input name="includeItems" id="includeItems" checked="checked" type="checkbox"/>
|
265 |
|
|
</td>
|
266 |
|
|
<td nowrap="nowrap">Search across Items</td>
|
267 |
|
|
</tr>
|
268 |
4932
|
leinfelder
|
</table>
|
269 |
|
|
</td>
|
270 |
|
|
<td valign="bottom" class="borderbottom">
|
271 |
|
|
<table>
|
272 |
4364
|
leinfelder
|
<tr>
|
273 |
4388
|
leinfelder
|
<td colspan="2">
|
274 |
5058
|
leinfelder
|
<input type="button" onclick="javascript:searchAssessments(true)" value="Search"/>
|
275 |
4388
|
leinfelder
|
</td>
|
276 |
|
|
</tr>
|
277 |
4364
|
leinfelder
|
</table>
|
278 |
|
|
</td>
|
279 |
3510
|
leinfelder
|
</tr>
|
280 |
|
|
</table>
|
281 |
4364
|
leinfelder
|
</form>
|
282 |
|
|
|
283 |
3510
|
leinfelder
|
</td>
|
284 |
4364
|
leinfelder
|
<td colspan="1" valign="top">
|
285 |
4388
|
leinfelder
|
<div align="left">
|
286 |
4364
|
leinfelder
|
<p align="left">This tool allows you to search for Assessments either by keyword,
|
287 |
|
|
or with a structured search that targets particular facets of an assessment.
|
288 |
|
|
<br />
|
289 |
|
|
<br />
|
290 |
|
|
You can use the '%' character as a wildcard in your searches (e.g.,
|
291 |
|
|
'%biology%' would locate any phrase with the word biology embedded within it).
|
292 |
|
|
</p>
|
293 |
4388
|
leinfelder
|
<a href="javascript:browseAll()">Browse All Assessments...</a>
|
294 |
4364
|
leinfelder
|
</div>
|
295 |
|
|
</td>
|
296 |
3510
|
leinfelder
|
</tr>
|
297 |
4364
|
leinfelder
|
<tr>
|
298 |
|
|
<td valign="top" colspan="2">
|
299 |
4393
|
leinfelder
|
<div id="ajaxSearchResults" style="display:none;">
|
300 |
|
|
Loading search results
|
301 |
|
|
<img src="<%=CONTEXT_URL%>/style/images/spinner.gif" border="none"/>
|
302 |
|
|
</div>
|
303 |
4364
|
leinfelder
|
</td>
|
304 |
|
|
</tr>
|
305 |
5058
|
leinfelder
|
<tr>
|
306 |
|
|
<td valign="top" colspan="2">
|
307 |
|
|
<div id="itemSearchResults" style="display:none;">
|
308 |
|
|
Loading Assessment Item results
|
309 |
|
|
<img src="<%=CONTEXT_URL%>/style/images/spinner.gif" border="none"/>
|
310 |
|
|
</div>
|
311 |
|
|
</td>
|
312 |
|
|
</tr>
|
313 |
3510
|
leinfelder
|
</table>
|
314 |
|
|
|
315 |
|
|
<script language="JavaScript">
|
316 |
4235
|
leinfelder
|
insertTemplateClosing("<%=CONTEXT_URL%>");
|
317 |
3510
|
leinfelder
|
</script>
|
318 |
|
|
</body>
|
319 |
|
|
</html>
|