001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/sam/tags/sakai_2-4-1/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/author/MetaDataBean.java $
003: * $Id: MetaDataBean.java 15083 2006-09-20 20:03:55Z lydial@stanford.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2004, 2005, 2006 The Sakai Foundation.
007: *
008: * Licensed under the Educational Community License, Version 1.0 (the"License");
009: * you may not use this file except in compliance with the License.
010: * You may obtain a copy of the License at
011: *
012: * http://www.opensource.org/licenses/ecl1.php
013: *
014: * Unless required by applicable law or agreed to in writing, software
015: * distributed under the License is distributed on an "AS IS" BASIS,
016: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: * See the License for the specific language governing permissions and
018: * limitations under the License.
019: *
020: **********************************************************************************/package org.sakaiproject.tool.assessment.ui.bean.author;
021:
022: import java.io.Serializable;
023: import java.util.StringTokenizer;
024: import java.util.ArrayList;
025:
026: /**
027: * <p>Copyright: Copyright (c) 2004 Sakai</p>
028: * @author Ed Smiley
029: * @version $Id: MetaDataBean.java 15083 2006-09-20 20:03:55Z lydial@stanford.edu $
030: */
031:
032: public class MetaDataBean implements Serializable {
033: /**
034: *
035: */
036: private static final long serialVersionUID = 1329360369551821799L;
037: private boolean considerUserId;
038: private boolean collectItemMetadata;
039: private boolean considerAllowIP;
040: private boolean autoSubmit;
041: private boolean feedbackShowCorrectResponse;
042: private boolean feedbackShowStudentScore;
043: private boolean feedbackShowStudentQuestionScore;
044: private boolean feedbackShowItemLevel;
045: private boolean feedbackShowSelectionLevel;
046: private boolean feedbackShowGraderComment;
047: private boolean feedbackShowStats;
048: private boolean feedbackShowQuestion;
049: private boolean feedbackShowResponse;
050: private boolean anonymousGrading;
051: private boolean collectSectionMetadata;
052: private String allowedIP;
053: private String userName;
054: private String password;
055: private String enableDisableAssessmentOrganization;
056: private boolean displayNumberingContinuous;
057: private boolean navigationRandom;
058: private boolean unlimitedAttempts;
059: private int maxAttempts;
060: private boolean feedbackImmediate;
061: private boolean recordHighestScore;
062: private String keywords;
063: private String objectives;
064: private String rubrics;
065:
066: /**
067: * consider user id
068: * @return true or false
069: */
070: public boolean isConsiderUserId() {
071: return considerUserId;
072: }
073:
074: /**
075: * consider user id
076: * @param considerUserId true or false
077: */
078: public void setConsiderUserId(boolean considerUserId) {
079: this .considerUserId = considerUserId;
080: }
081:
082: /**
083: * consider ip address
084: * @return true or false
085: */
086: public boolean isConsiderAllowIP() {
087: return considerAllowIP;
088: }
089:
090: /**
091: * consider ip address
092: * @param considerAllowIP consider ip address
093: */
094: public void setConsiderAllowIP(boolean considerAllowIP) {
095: this .considerAllowIP = considerAllowIP;
096: }
097:
098: /**
099: * autosubmit?
100: * @return true or false
101: */
102: public boolean isAutoSubmit() {
103: return autoSubmit;
104: }
105:
106: /**
107: * autosubmit?
108: * @param autoSubmit
109: */
110: public void setAutoSubmit(boolean autoSubmit) {
111: this .autoSubmit = autoSubmit;
112: }
113:
114: /**
115: * show correct response?
116: * @return true or false
117: */
118: public boolean isFeedbackShowCorrectResponse() {
119: return feedbackShowCorrectResponse;
120: }
121:
122: /**
123: * show correct response?
124: * @param feedbackShowCorrectResponse show correct response
125: */
126: public void setFeedbackShowCorrectResponse(
127: boolean feedbackShowCorrectResponse) {
128: this .feedbackShowCorrectResponse = feedbackShowCorrectResponse;
129: }
130:
131: /**
132: * show student score?
133: * @return true or false
134: */
135: public boolean isFeedbackShowStudentScore() {
136: return feedbackShowStudentScore;
137: }
138:
139: /**
140: * show student score?
141: * @param feedbackShowStudentScore
142: */
143: public void setFeedbackShowStudentScore(
144: boolean feedbackShowStudentScore) {
145: this .feedbackShowStudentScore = feedbackShowStudentScore;
146: }
147:
148: /**
149: * show student Question score?
150: * @return true or false
151: */
152: public boolean isFeedbackShowStudentQuestionScore() {
153: return feedbackShowStudentQuestionScore;
154: }
155:
156: /**
157: * show student Question score?
158: * @param feedbackShowStudentQuestionScore
159: */
160: public void setFeedbackShowStudentQuestionScore(
161: boolean feedbackShowStudentQuestionScore) {
162: this .feedbackShowStudentQuestionScore = feedbackShowStudentQuestionScore;
163: }
164:
165: /**
166: * item level feedback?
167: * @return true or false
168: */
169: public boolean isFeedbackShowItemLevel() {
170: return feedbackShowItemLevel;
171: }
172:
173: /**
174: * item level feedback?
175: * @param feedbackShowItemLevel
176: */
177: public void setFeedbackShowItemLevel(boolean feedbackShowItemLevel) {
178: this .feedbackShowItemLevel = feedbackShowItemLevel;
179: }
180:
181: /**
182: * selection level feedback?
183: * @return true or false
184: */
185: public boolean isFeedbackShowSelectionLevel() {
186: return feedbackShowSelectionLevel;
187: }
188:
189: /**
190: * selection level feedback?
191: * @param feedbackShowSelectionLevel
192: */
193: public void setFeedbackShowSelectionLevel(
194: boolean feedbackShowSelectionLevel) {
195: this .feedbackShowSelectionLevel = feedbackShowSelectionLevel;
196: }
197:
198: /**
199: * grader comments?
200: * @return true or false
201: */
202: public boolean isFeedbackShowGraderComment() {
203: return feedbackShowGraderComment;
204: }
205:
206: /**
207: * grader comments?
208: * @param feedbackShowGraderComment
209: */
210: public void setFeedbackShowGraderComment(
211: boolean feedbackShowGraderComment) {
212: this .feedbackShowGraderComment = feedbackShowGraderComment;
213: }
214:
215: /**
216: * show statistics and histograms?
217: * @return true or false
218: */
219: public boolean isFeedbackShowStats() {
220: return feedbackShowStats;
221: }
222:
223: /**
224: * show statistics and histograms?
225: * @param feedbackShowStats
226: */
227: public void setFeedbackShowStats(boolean feedbackShowStats) {
228: this .feedbackShowStats = feedbackShowStats;
229: }
230:
231: /**
232: * show question feedback?
233: * @return true or false
234: */
235: public boolean isFeedbackShowQuestion() {
236: return feedbackShowQuestion;
237: }
238:
239: /**
240: * show question feedback?
241: * @param feedbackShowQuestion
242: */
243: public void setFeedbackShowQuestion(boolean feedbackShowQuestion) {
244: this .feedbackShowQuestion = feedbackShowQuestion;
245: }
246:
247: /**
248: * feedback response?
249: * @return true or false
250: */
251: public boolean isFeedbackShowResponse() {
252: return feedbackShowResponse;
253: }
254:
255: /**
256: * feedback response?
257: * @param feedbackShowResponse
258: */
259: public void setFeedbackShowResponse(boolean feedbackShowResponse) {
260: this .feedbackShowResponse = feedbackShowResponse;
261: }
262:
263: /**
264: * anonymous grading?
265: * @return true or false
266: */
267: public boolean isAnonymousGrading() {
268: return anonymousGrading;
269: }
270:
271: /**
272: * anonymous grading?
273: * @param anonymousGrading
274: */
275: public void setAnonymousGrading(boolean anonymousGrading) {
276: this .anonymousGrading = anonymousGrading;
277: }
278:
279: /**
280: * collect section metadata?
281: * @return true or false
282: */
283: public boolean isCollectSectionMetadata() {
284: return collectSectionMetadata;
285: }
286:
287: /**
288: * collect section metadata?
289: * @param collectSectionMetadata
290: */
291: public void setCollectSectionMetadata(boolean collectSectionMetadata) {
292: this .collectSectionMetadata = collectSectionMetadata;
293: }
294:
295: /**
296: * collect item metadata?
297: * @return true or false
298: */
299: public boolean getCollectItemMetadata() {
300: return collectItemMetadata;
301: }
302:
303: /**
304: * collect item metadata?
305: * @param collectItemMetadata
306: */
307: public void setCollectItemMetadata(boolean collectItemMetadata) {
308: this .collectItemMetadata = collectItemMetadata;
309: }
310:
311: /**
312: * allowed IP addresses, '\n' delimited
313: * @return allowed IP addresses, '\n' delimited
314: */
315: public String getAllowedIP() {
316: return allowedIP;
317: }
318:
319: /**
320: * allowed IP addresses, '\n' delimited
321: * @param allowedIP allowed IP addresses, '\n' delimited
322: */
323: public void setAllowedIP(String allowedIP) {
324: this .allowedIP = allowedIP;
325: }
326:
327: /**
328: * derived property
329: * list of IP address strings
330: * @return list of IP address strings
331: */
332: public ArrayList getAllowedIPList() {
333: ArrayList list = new ArrayList();
334: StringTokenizer st = new StringTokenizer(allowedIP, "\n", false);
335: while (st.hasMoreTokens()) {
336: list.add(st.nextToken());
337: }
338: return list;
339: }
340:
341: /**
342: * user name to restrict to
343: * @return name
344: */
345: public String getUserName() {
346: return userName;
347: }
348:
349: /**
350: * user name to restrict to
351: * @param userName user name to restrict to
352: */
353: public void setUserName(String userName) {
354: this .userName = userName;
355: }
356:
357: /**
358: * password to restrict to
359: * @return password to restrict to
360: */
361: public String getPassword() {
362: return password;
363: }
364:
365: /**
366: * password to restrict to
367: * @param password password to restrict to
368: */
369: public void setPassword(String password) {
370: this .password = password;
371: }
372:
373: /**
374: * assessment organization flag
375: * <ul>
376: * <li>I=each item (question) is on a separate page</li>
377: * <li>S=each section (part) is on a separate page</li>
378: * <li>A=assessment on a single page</li>
379: * </ul>
380: * @return "I", "S" or "A"
381: */
382: public String getEnableDisableAssessmentOrganization() {
383: return enableDisableAssessmentOrganization;
384: }
385:
386: /**
387: * set assessment organization flag
388: * <ul>
389: * <li>I=each item (question) is on a separate page</li>
390: * <li>S=each section (part) is on a separate page</li>
391: * <li>A=assessment on a single page</li>
392: * </ul>
393: * @param enableDisableAssessmentOrganization should be "I", "S" or "A"
394: */
395: public void setEnableDisableAssessmentOrganization(
396: String enableDisableAssessmentOrganization) {
397: this .enableDisableAssessmentOrganization = enableDisableAssessmentOrganization;
398: }
399:
400: /**
401: * continuous numbering?
402: * @return true or false
403: */
404: public boolean isDisplayNumberingContinuous() {
405: return displayNumberingContinuous;
406: }
407:
408: /**
409: * continuous numbering?
410: * @param displayNumberingContinuous
411: */
412: public void setDisplayNumberingContinuous(
413: boolean displayNumberingContinuous) {
414: this .displayNumberingContinuous = displayNumberingContinuous;
415: }
416:
417: /**
418: * random navigation?
419: * @return true or false
420: */
421: public boolean isNavigationRandom() {
422: return navigationRandom;
423: }
424:
425: /**
426: * random navigation?
427: * @param navigationRandom
428: */
429: public void setNavigationRandom(boolean navigationRandom) {
430: this .navigationRandom = navigationRandom;
431: }
432:
433: /**
434: * unlimited tries?
435: * @return true or false
436: */
437: public boolean isUnlimitedAttempts() {
438: return unlimitedAttempts;
439: }
440:
441: /**
442: * unlimited tries?
443: * @param unlimitedAttempts
444: */
445: public void setUnlimitedAttempts(boolean unlimitedAttempts) {
446: this .unlimitedAttempts = unlimitedAttempts;
447: }
448:
449: /**
450: * maximum tries
451: * @return true or false
452: */
453: public int getMaxAttempts() {
454: return maxAttempts;
455: }
456:
457: /**
458: * maximum tries
459: * @param maxAttempts
460: */
461: public void setMaxAttempts(int maxAttempts) {
462: this .maxAttempts = maxAttempts;
463: }
464:
465: /**
466: * immediate feedback?
467: * @return true or false
468: */
469: public boolean isFeedbackImmediate() {
470: return feedbackImmediate;
471: }
472:
473: /**
474: * set immediate feedback
475: * @param feedbackImmediate
476: */
477: public void setFeedbackImmediate(boolean feedbackImmediate) {
478: this .feedbackImmediate = feedbackImmediate;
479: }
480:
481: /**
482: * record highest score
483: * @return true or -- false in which record average
484: */
485: public boolean isRecordHighestScore() {
486: return recordHighestScore;
487: }
488:
489: /**
490: * record highest score
491: * @param recordHighestScore if true, false if use average
492: */
493: public void setRecordHighestScore(boolean recordHighestScore) {
494: this .recordHighestScore = recordHighestScore;
495: }
496:
497: /**
498: * keywords
499: * @return
500: */
501: public String getKeywords() {
502: return keywords;
503: }
504:
505: /**
506: * keywords
507: * @param keywords
508: */
509: public void setKeywords(String keywords) {
510: this .keywords = keywords;
511: }
512:
513: /**
514: * objectives
515: * @return
516: */
517: public String getObjectives() {
518: return objectives;
519: }
520:
521: /**
522: * objectives
523: * @param objectives
524: */
525: public void setObjectives(String objectives) {
526: this .objectives = objectives;
527: }
528:
529: /**
530: * rubrics
531: * @return
532: */
533: public String getRubrics() {
534: return rubrics;
535: }
536:
537: /**
538: * rubrics
539: * @param rubrics
540: */
541: public void setRubrics(String rubrics) {
542: this.rubrics = rubrics;
543: }
544: }
|