PSYC406 quiz 3

/library/js/headscripts.js// // /library/editor/ckeditor/ckeditor.js/library/editor/ckeditor.launch.js/samigo-app/js/saveForm.jsQuiz #3/samigo-app/js/jquery-1.3.2.min.js/samigo-app/js/jquery-ui-1.7.2.custom.min.js/samigo-app/js/jquery.blockUI-2.31.js// // <![CDATA[

function whichradio(obj){

var myId = String(obj.id);
//such as : takeAssessmentForm:_id48:0:_id105:1:deliverMatrixChoicesSurvey:matrixSurveyRadioTable:0:_id1198_0:myRadioId1
//find the table id for mutiple matrix questions tables on the same display page
//take care of two different question, one set as forceRanking, another is not
var myIdParts = myId.split(":");

var node_list = document.getElementsByTagName('input');
for (var i=0; i<node_list.length; i++) {
var node = node_list[i];
if (node.getAttribute('type') == 'hidden' && node.id.endsWith('forceRanking')){
var nodeIdParts = node.id.split(":");
if(nodeIdParts[4]==myIdParts[4] && node.value == 'true'){
//find the radio button table(s)
var tables = document.getElementsByTagName('table');

for(var i=0; i<tables.length; i++){
var mytable = tables[i];
var mytableParts = mytable.id.split(":");
if(mytable.id.endsWith('matrixSurveyRadioTable') && mytableParts[4] == myIdParts[4]){
//found the right table
break;
}
}

//index will be the begining of 'matrixSurveyRadioTable'
var index = myId.indexOf("matrixSurveyRadioTable");
var strBefore = myId.substring(0,index+'matrixSurveyRadioTable'.length);
//remove table no
var strAfter = myId.substring(index+'matrixSurveyRadioTable'.length+2);
//find rows of mytable
var iRow = mytable.getElementsByTagName('tr');
//one header row before the row containing the radio button
for (var i=0; i

// <![CDATA[
function printForm(){
alert("print 0");
for(i=0; i<document.forms[0].elements.length; i++)
{
alert("The field name is: " + document.forms[0].elements[i].name);
}
}

function printLink(){
for (var i=0; i < document.links.length; i++){
alert(document.links[i].id);
}
}

var beginAssessment1Disabled = 'false';
function disableBeginAssessment1(){
if (beginAssessment1Disabled === 'false'){
beginAssessment1Disabled = 'true';
if (document.forms[0].elements['takeAssessmentForm:beginAssessment2'])
document.forms[0].elements['takeAssessmentForm:beginAssessment2'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:beginAssessment3'])
document.forms[0].elements['takeAssessmentForm:beginAssessment3'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:cancel1'])
document.forms[0].elements['takeAssessmentForm:cancel1'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:cancel2'])
document.forms[0].elements['takeAssessmentForm:cancel2'].disabled=true;
}
else{ // any subsequent click disable feeback link & action
if (document.forms[0].elements['takeAssessmentForm:beginAssessment1'])
document.forms[0].elements['takeAssessmentForm:beginAssessment1'].disabled=true;
}
}

var beginAssessment2Disabled = 'false';
function disableBeginAssessment2(){
if (beginAssessment2Disabled === 'false'){
beginAssessment2Disabled = 'true';
if (document.forms[0].elements['takeAssessmentForm:beginAssessment1'])
document.forms[0].elements['takeAssessmentForm:beginAssessment1'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:beginAssessment3'])
document.forms[0].elements['takeAssessmentForm:beginAssessment3'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:cancel1'])
document.forms[0].elements['takeAssessmentForm:cancel1'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:cancel2'])
document.forms[0].elements['takeAssessmentForm:cancel2'].disabled=true;
}
else{ // any subsequent click disable feeback link & action
if (document.forms[0].elements['takeAssessmentForm:beginAssessment2'])
document.forms[0].elements['takeAssessmentForm:beginAssessment2'].disabled=true;
}
}

var beginAssessment3Disabled = 'false';
function disableBeginAssessment3(){
if (beginAssessment3Disabled === 'false'){
beginAssessment3Disabled = 'true';
if (document.forms[0].elements['takeAssessmentForm:beginAssessment1'])
document.forms[0].elements['takeAssessmentForm:beginAssessment1'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:beginAssessment2'])
document.forms[0].elements['takeAssessmentForm:beginAssessment2'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:cancel1'])
document.forms[0].elements['takeAssessmentForm:cancel1'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:cancel2'])
document.forms[0].elements['takeAssessmentForm:cancel2'].disabled=true;
}
else{ // any subsequent click disable feeback link & action
if (document.forms[0].elements['takeAssessmentForm:beginAssessment3'])
document.forms[0].elements['takeAssessmentForm:beginAssessment3'].disabled=true;
}
}

var cancel1Disabled = 'false';
function disableCancel1(){
if (cancel1Disabled === 'false'){
cancel1Disabled = 'true';
if (document.forms[0].elements['takeAssessmentForm:beginAssessment1'])
document.forms[0].elements['takeAssessmentForm:beginAssessment1'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:beginAssessment2'])
document.forms[0].elements['takeAssessmentForm:beginAssessment2'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:beginAssessment3'])
document.forms[0].elements['takeAssessmentForm:beginAssessment3'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:cancel2'])
document.forms[0].elements['takeAssessmentForm:cancel2'].disabled=true;
}
else{ // any subsequent click disable feeback link & action
if (document.forms[0].elements['takeAssessmentForm:cancel1'])
document.forms[0].elements['takeAssessmentForm:cancel1'].disabled=true;
}
}

var cancel2Disabled = 'false';
function disableCancel2(){
if (cancel2Disabled === 'false'){
cancel2Disabled = 'true';
if (document.forms[0].elements['takeAssessmentForm:beginAssessment1'])
document.forms[0].elements['takeAssessmentForm:beginAssessment1'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:beginAssessment2'])
document.forms[0].elements['takeAssessmentForm:beginAssessment2'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:beginAssessment3'])
document.forms[0].elements['takeAssessmentForm:beginAssessment3'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:cancel1'])
document.forms[0].elements['takeAssessmentForm:cancel1'].disabled=true;
}
else{ // any subsequent click disable feeback link & action
if (document.forms[0].elements['takeAssessmentForm:cancel2'])
document.forms[0].elements['takeAssessmentForm:cancel2'].disabled=true;
}
}

var submitForGradeTOC1Disabled = 'false';
function disableSubmitForGradeTOC1(){
if (submitForGradeTOC1Disabled === 'false'){
submitForGradeTOC1Disabled = 'true';
if (document.forms[0].elements['tableOfContentsForm:submitForGradeTOC2'])
document.forms[0].elements['tableOfContentsForm:submitForGradeTOC2'].disabled=true;
if (document.forms[0].elements['tableOfContentsForm:exitTOC1'])
document.forms[0].elements['tableOfContentsForm:exitTOC1'].disabled=true;
if (document.forms[0].elements['tableOfContentsForm:exitTOC2'])
document.forms[0].elements['tableOfContentsForm:exitTOC2'].disabled=true;
}
else{ // any subsequent click disable feeback link & action
if (document.forms[0].elements['tableOfContentsForm:submitForGradeTOC1'])
document.forms[0].elements['tableOfContentsForm:submitForGradeTOC1'].disabled=true;
}
}

var submitForGradeTOC2Disabled = 'false';
function disableSubmitForGradeTOC2(){
if (submitForGradeTOC2Disabled === 'false'){
submitForGradeTOC2Disabled = 'true';
if (document.forms[0].elements['tableOfContentsForm:submitForGradeTOC1'])
document.forms[0].elements['tableOfContentsForm:submitForGradeTOC1'].disabled=true;
if (document.forms[0].elements['tableOfContentsForm:exitTOC1'])
document.forms[0].elements['tableOfContentsForm:exitTOC1'].disabled=true;
if (document.forms[0].elements['tableOfContentsForm:exitTOC2'])
document.forms[0].elements['tableOfContentsForm:exitTOC2'].disabled=true;
}
else{ // any subsequent click disable feeback link & action
if (document.forms[0].elements['tableOfContentsForm:submitForGradeTOC2'])
document.forms[0].elements['tableOfContentsForm:submitForGradeTOC2'].disabled=true;
}
}

var exitTOC1Disabled = 'false';
function disableExitTOC1(){
if (exitTOC1Disabled === 'false'){
exitTOC1Disabled = 'true';
if (document.forms[0].elements['tableOfContentsForm:submitForGradeTOC1'])
document.forms[0].elements['tableOfContentsForm:submitForGradeTOC1'].disabled=true;
if (document.forms[0].elements['tableOfContentsForm:submitForGradeTOC2'])
document.forms[0].elements['tableOfContentsForm:submitForGradeTOC2'].disabled=true;
if (document.forms[0].elements['tableOfContentsForm:exitTOC2'])
document.forms[0].elements['tableOfContentsForm:exitTOC2'].disabled=true;
}
else{ // any subsequent click disable feeback link & action
if (document.forms[0].elements['tableOfContentsForm:exitTOC1'])
document.forms[0].elements['tableOfContentsForm:exitTOC1'].disabled=true;
}
}

var exitTOC2Disabled = 'false';
function disableExitTOC2(){
if (exitTOC2Disabled === 'false'){
exitTOC2Disabled = 'true';
if (document.forms[0].elements['tableOfContentsForm:submitForGradeTOC1'])
document.forms[0].elements['tableOfContentsForm:submitForGradeTOC1'].disabled=true;
if (document.forms[0].elements['tableOfContentsForm:submitForGradeTOC2'])
document.forms[0].elements['tableOfContentsForm:submitForGradeTOC2'].disabled=true;
if (document.forms[0].elements['tableOfContentsForm:exitTOC1'])
document.forms[0].elements['tableOfContentsForm:exitTOC1'].disabled=true;
}
else{ // any subsequent click disable feeback link & action
if (document.forms[0].elements['tableOfContentsForm:exitTOC2'])
document.forms[0].elements['tableOfContentsForm:exitTOC2'].disabled=true;
}
}

var disabledFeedback = 'false';
function disableFeedback(){
if (disabledFeedback === 'false'){
disabledFeedback = 'true';
for (var i=0; i < document.links.length; i++){
if (document.links[i].id === 'takeAssessmentForm:assessmentDeliveryHeading:showTOC')
document.links[i].disabled = true;
}
if (document.forms[0].elements['takeAssessmentForm:next'])
document.forms[0].elements['takeAssessmentForm:next'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:previous'])
document.forms[0].elements['takeAssessmentForm:previous'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:save'])
document.forms[0].elements['takeAssessmentForm:save'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit'])
document.forms[0].elements['takeAssessmentForm:saveAndExit'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit2'])
document.forms[0].elements['takeAssessmentForm:saveAndExit2'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm'])
document.forms[0].elements['takeAssessmentForm:submitForm'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm1'])
document.forms[0].elements['takeAssessmentForm:submitForm1'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:quit'])
document.forms[0].elements['takeAssessmentForm:quit'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForGrade'])
document.forms[0].elements['takeAssessmentForm:submitForGrade'].disabled=true;
}
else{ // any subsequent click disable feeback link & action
for (var i=0; i < document.links.length; i++){
if (document.links[i].id == 'takeAssessmentForm:assessmentDeliveryHeading:showFeedback')
document.links[i].disabled = true;
}
}
}

var disabledTOC = 'false';
function disableTOC(){
if (disabledTOC === 'false'){
disabledTOC = 'true';
for (var i=0; i < document.links.length; i++){
if (document.links[i].id == 'takeAssessmentForm:assessmentDeliveryHeading:showFeedback')
document.links[i].disabled = true;
}
if (document.forms[0].elements['takeAssessmentForm:next'])
document.forms[0].elements['takeAssessmentForm:next'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:previous'])
document.forms[0].elements['takeAssessmentForm:previous'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:save'])
document.forms[0].elements['takeAssessmentForm:save'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit'])
document.forms[0].elements['takeAssessmentForm:saveAndExit'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit2'])
document.forms[0].elements['takeAssessmentForm:saveAndExit2'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm'])
document.forms[0].elements['takeAssessmentForm:submitForm'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm1'])
document.forms[0].elements['takeAssessmentForm:submitForm1'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:quit'])
document.forms[0].elements['takeAssessmentForm:quit'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForGrade'])
document.forms[0].elements['takeAssessmentForm:submitForGrade'].disabled=true;
}
else{ // any subsequent click disable feeback link & action
for (var i=0; i < document.links.length; i++){
if (document.links[i].id == 'takeAssessmentForm:assessmentDeliveryHeading:showTOC')
document.links[i].disabled = true;
}
}
}

function disableTOCFeedback(){
for (var i=0; i < document.links.length; i++){
if (document.links[i].id == 'takeAssessmentForm:assessmentDeliveryHeading:showTOC')
document.links[i].disabled = true;
if (document.links[i].id == 'takeAssessmentForm:assessmentDeliveryHeading:showFeedback')
document.links[i].disabled = true;
}
}

var nextDisabled = 'false';
function disableNext(){
if (nextDisabled === 'false'){
nextDisabled = 'true';
disableTOCFeedback();
if (document.forms[0].elements['takeAssessmentForm:previous'])
document.forms[0].elements['takeAssessmentForm:previous'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:quit'])
document.forms[0].elements['takeAssessmentForm:quit'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:save'])
document.forms[0].elements['takeAssessmentForm:save'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit'])
document.forms[0].elements['takeAssessmentForm:saveAndExit'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit2'])
document.forms[0].elements['takeAssessmentForm:saveAndExit2'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm'])
document.forms[0].elements['takeAssessmentForm:submitForm'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm1'])
document.forms[0].elements['takeAssessmentForm:submitForm1'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForGrade'])
document.forms[0].elements['takeAssessmentForm:submitForGrade'].disabled=true;
}
else{ // any subsequent click disable button & action
if (document.forms[0].elements['takeAssessmentForm:next'])
document.forms[0].elements['takeAssessmentForm:next'].disabled=true;
}
}

var previousDisabled = 'false';
function disablePrevious(){
if (previousDisabled === 'false'){
previousDisabled = 'true';
disableTOCFeedback();
if (document.forms[0].elements['takeAssessmentForm:next'])
document.forms[0].elements['takeAssessmentForm:next'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:quit'])
document.forms[0].elements['takeAssessmentForm:quit'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:save'])
document.forms[0].elements['takeAssessmentForm:save'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit'])
document.forms[0].elements['takeAssessmentForm:saveAndExit'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit2'])
document.forms[0].elements['takeAssessmentForm:saveAndExit2'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm'])
document.forms[0].elements['takeAssessmentForm:submitForm'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm1'])
document.forms[0].elements['takeAssessmentForm:submitForm1'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForGrade'])
document.forms[0].elements['takeAssessmentForm:submitForGrade'].disabled=true;
}
else{ // any subsequent click disable button & action
if (document.forms[0].elements['takeAssessmentForm:previous'])
document.forms[0].elements['takeAssessmentForm:previous'].disabled=true;
}
}

var submitDisabled = 'false';
function disableSubmit(){
if (submitDisabled === 'false'){
submitDisabled = 'true';
disableTOCFeedback();
if (document.forms[0].elements['takeAssessmentForm:next'])
document.forms[0].elements['takeAssessmentForm:next'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:previous'])
document.forms[0].elements['takeAssessmentForm:previous'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:quit'])
document.forms[0].elements['takeAssessmentForm:quit'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:save'])
document.forms[0].elements['takeAssessmentForm:save'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit'])
document.forms[0].elements['takeAssessmentForm:saveAndExit'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit2'])
document.forms[0].elements['takeAssessmentForm:saveAndExit2'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm1'])
document.forms[0].elements['takeAssessmentForm:submitForm1'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForGrade'])
document.forms[0].elements['takeAssessmentForm:submitForGrade'].disabled=true;
}
else{ // any subsequent click disable button & action
if (document.forms[0].elements['takeAssessmentForm:submitForm'])
document.forms[0].elements['takeAssessmentForm:submitForm'].disabled=true;
}
}

var submit1Disabled = 'false';
function disableSubmit1(){
if (submit1Disabled === 'false'){
submit1Disabled = 'true';
disableTOCFeedback();
if (document.forms[0].elements['takeAssessmentForm:next'])
document.forms[0].elements['takeAssessmentForm:next'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:previous'])
document.forms[0].elements['takeAssessmentForm:previous'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:quit'])
document.forms[0].elements['takeAssessmentForm:quit'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:save'])
document.forms[0].elements['takeAssessmentForm:save'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit'])
document.forms[0].elements['takeAssessmentForm:saveAndExit'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit2'])
document.forms[0].elements['takeAssessmentForm:saveAndExit2'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm'])
document.forms[0].elements['takeAssessmentForm:submitForm'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForGrade'])
document.forms[0].elements['takeAssessmentForm:submitForGrade'].disabled=true;
}
else{ // any subsequent click disable button & action
if (document.forms[0].elements['takeAssessmentForm:submitForm1'])
document.forms[0].elements['takeAssessmentForm:submitForm1'].disabled=true;
}
}

var saveDisabled = 'false';
function disableSave(){
if (saveDisabled === 'false'){
saveDisabled = 'true';
disableTOCFeedback();
if (document.forms[0].elements['takeAssessmentForm:next'])
document.forms[0].elements['takeAssessmentForm:next'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:previous'])
document.forms[0].elements['takeAssessmentForm:previous'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:quit'])
document.forms[0].elements['takeAssessmentForm:quit'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit'])
document.forms[0].elements['takeAssessmentForm:saveAndExit'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit2'])
document.forms[0].elements['takeAssessmentForm:saveAndExit2'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm'])
document.forms[0].elements['takeAssessmentForm:submitForm'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm1'])
document.forms[0].elements['takeAssessmentForm:submitForm1'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForGrade'])
document.forms[0].elements['takeAssessmentForm:submitForGrade'].disabled=true;
}
else{ // any subsequent click disable button & action
if (document.forms[0].elements['takeAssessmentForm:save'])
document.forms[0].elements['takeAssessmentForm:save'].disabled=true;
}
}

var saveDisabled = 'false';
function disableSaveAndExit(){
if (saveDisabled === 'false'){
saveDisabled = 'true';
disableTOCFeedback();
if (document.forms[0].elements['takeAssessmentForm:next'])
document.forms[0].elements['takeAssessmentForm:next'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:previous'])
document.forms[0].elements['takeAssessmentForm:previous'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:quit'])
document.forms[0].elements['takeAssessmentForm:quit'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:save'])
document.forms[0].elements['takeAssessmentForm:save'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit2'])
document.forms[0].elements['takeAssessmentForm:saveAndExit2'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm'])
document.forms[0].elements['takeAssessmentForm:submitForm'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm1'])
document.forms[0].elements['takeAssessmentForm:submitForm1'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForGrade'])
document.forms[0].elements['takeAssessmentForm:submitForGrade'].disabled=true;
}
else{ // any subsequent click disable button & action
if (document.forms[0].elements['takeAssessmentForm:saveAndExit'])
document.forms[0].elements['takeAssessmentForm:saveAndExit'].disabled=true;
}
}

var saveDisabled2 = 'false';
function disableSaveAndExit2(){
if (saveDisabled2 === 'false'){
saveDisabled2 = 'true';
disableTOCFeedback();
if (document.forms[0].elements['takeAssessmentForm:next'])
document.forms[0].elements['takeAssessmentForm:next'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:previous'])
document.forms[0].elements['takeAssessmentForm:previous'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:quit'])
document.forms[0].elements['takeAssessmentForm:quit'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:save'])
document.forms[0].elements['takeAssessmentForm:save'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit'])
document.forms[0].elements['takeAssessmentForm:saveAndExit'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm'])
document.forms[0].elements['takeAssessmentForm:submitForm'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm1'])
document.forms[0].elements['takeAssessmentForm:submitForm1'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForGrade'])
document.forms[0].elements['takeAssessmentForm:submitForGrade'].disabled=true;
}
else{ // any subsequent click disable button & action
if (document.forms[0].elements['takeAssessmentForm:saveAndExit2'])
document.forms[0].elements['takeAssessmentForm:saveAndExit2'].disabled=true;
}
}

var cancelDisabled = 'false';
function disableCancel(){
if (cancelDisabled === 'false'){
cancelDisabled = 'true';
if (document.forms[0].elements['takeAssessmentForm:previous'])
document.forms[0].elements['takeAssessmentForm:previous'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm'])
document.forms[0].elements['takeAssessmentForm:submitForm'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm1'])
document.forms[0].elements['takeAssessmentForm:submitForm1'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForGrade'])
document.forms[0].elements['takeAssessmentForm:submitForGrade'].disabled=true;
}
else{ // any subsequent click disable button & action
if (document.forms[0].elements['takeAssessmentForm:cancel'])
document.forms[0].elements['takeAssessmentForm:cancel'].disabled=true;
}
}

var quitDisabled = 'false';
function disableQuit(){
if (quitDisabled === 'false'){
quitDisabled = 'true';
disableTOCFeedback();
if (document.forms[0].elements['takeAssessmentForm:next'])
document.forms[0].elements['takeAssessmentForm:next'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:previous'])
document.forms[0].elements['takeAssessmentForm:previous'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit'])
document.forms[0].elements['takeAssessmentForm:saveAndExit'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit2'])
document.forms[0].elements['takeAssessmentForm:saveAndExit2'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm'])
document.forms[0].elements['takeAssessmentForm:submitForm'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm1'])
document.forms[0].elements['takeAssessmentForm:submitForm1'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForGrade'])
document.forms[0].elements['takeAssessmentForm:submitForGrade'].disabled=true;
}
else{ // any subsequent click disable button & action
if (document.forms[0].elements['takeAssessmentForm:quit'])
document.forms[0].elements['takeAssessmentForm:quit'].disabled=true;
}
}

var submitForGradeDisabled = 'false';
function disableSubmitForGrade(){
if (submitForGradeDisabled === 'false'){
submitForGradeDisabled = 'true';
disableTOCFeedback();
if (document.forms[0].elements['takeAssessmentForm:next'])
document.forms[0].elements['takeAssessmentForm:next'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:previous'])
document.forms[0].elements['takeAssessmentForm:previous'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:save'])
document.forms[0].elements['takeAssessmentForm:save'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit'])
document.forms[0].elements['takeAssessmentForm:saveAndExit'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit2'])
document.forms[0].elements['takeAssessmentForm:saveAndExit2'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm'])
document.forms[0].elements['takeAssessmentForm:submitForm'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:submitForm1'])
document.forms[0].elements['takeAssessmentForm:submitForm1'].disabled=true;
if (document.forms[0].elements['takeAssessmentForm:quit'])
document.forms[0].elements['takeAssessmentForm:quit'].disabled=true;
}
else{ // any subsequent click disable button & action
if (document.forms[0].elements['takeAssessmentForm:submitForGrade']) {
document.forms[0].elements['takeAssessmentForm:submitForGrade'].disabled=true;
}
}
}

function enableSubmitForGrade(){
if (submitForGradeDisabled === 'true'){
submitForGradeDisabled = 'false';
if (document.forms[0].elements['takeAssessmentForm:next'])
document.forms[0].elements['takeAssessmentForm:next'].disabled=false;
if (document.forms[0].elements['takeAssessmentForm:previous'])
document.forms[0].elements['takeAssessmentForm:previous'].disabled=false;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit'])
document.forms[0].elements['takeAssessmentForm:saveAndExit'].disabled=false;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit2'])
document.forms[0].elements['takeAssessmentForm:saveAndExit2'].disabled=false;
if (document.forms[0].elements['takeAssessmentForm:submitForm'])
document.forms[0].elements['takeAssessmentForm:submitForm'].disabled=false;
if (document.forms[0].elements['takeAssessmentForm:submitForm1'])
document.forms[0].elements['takeAssessmentForm:submitForm1'].disabled=false;
if (document.forms[0].elements['takeAssessmentForm:quit'])
document.forms[0].elements['takeAssessmentForm:quit'].disabled=false;
if (document.forms[0].elements['takeAssessmentForm:submitForGrade'])
document.forms[0].elements['takeAssessmentForm:submitForGrade'].disabled=false;
}
}

function enableSave(){
if (saveDisabled === 'true'){
saveDisabled = 'false';
disableTOCFeedback();
if (document.forms[0].elements['takeAssessmentForm:next'])
document.forms[0].elements['takeAssessmentForm:next'].disabled=false;
if (document.forms[0].elements['takeAssessmentForm:previous'])
document.forms[0].elements['takeAssessmentForm:previous'].disabled=false;
if (document.forms[0].elements['takeAssessmentForm:quit'])
document.forms[0].elements['takeAssessmentForm:quit'].disabled=false;
if (document.forms[0].elements['takeAssessmentForm:saveAndExit2'])
document.forms[0].elements['takeAssessmentForm:saveAndExit2'].disabled=false;
if (document.forms[0].elements['takeAssessmentForm:submitForm'])
document.forms[0].elements['takeAssessmentForm:submitForm'].disabled=false;
if (document.forms[0].elements['takeAssessmentForm:submitForm1'])
document.forms[0].elements['takeAssessmentForm:submitForm1'].disabled=false;
if (document.forms[0].elements['takeAssessmentForm:submitForGrade'])
document.forms[0].elements['takeAssessmentForm:submitForGrade'].disabled=false;
}
else{ // any subsequent click disable button & action
if (document.forms[0].elements['takeAssessmentForm:saveAndExit'])
document.forms[0].elements['takeAssessmentForm:saveAndExit'].disabled=false;
}
}

var continueDisabled = 'false';
function disableContinue(){
if (continueDisabled === 'false'){
continueDisabled = 'true';
if (document.forms[0].elements['saveForLater:returnToAssessment'])
document.forms[0].elements['saveForLater:returnToAssessment'].disabled=true; }
else{ // any subsequent click disable button & action
if (document.forms[0].elements['saveForLater:continue'])
document.forms[0].elements['saveForLater:continue'].disabled=true;
}
}

var returnToAssessmentDisabled = 'false';
function disableReturnToAssessment(){
if (returnToAssessmentDisabled === 'false'){
returnToAssessmentDisabled = 'true';
if (document.forms[0].elements['saveForLater:continue'])
document.forms[0].elements['saveForLater:continue'].disabled=true;
}
else{ // any subsequent click disable button & action
if (document.forms[0].elements['saveForLater:returnToAssessment'])
document.forms[0].elements['saveForLater:returnToAssessment'].disabled=true;
}
}

// show Processing for file upload questions
// taking out of deliveryAssessment.jsp, so authoring can use it too.

function showNotif(item, button,formName)
{

/*
if (button !="noBlock")
{
eval("document." + formName + "." + button + ".disabled=true");
}
*/
if (item !== "noNotif") {
var browserType;
if (document.all) {browserType = "ie";}
if (window.navigator.userAgent.toLowerCase().match("gecko")) {browserType= "gecko";}
if (browserType === "gecko" )
document.showItem = eval('document.getElementById(item)');
else if (browserType === "ie")
document.showItem = eval('document.all[item]');
else
document.showItem = eval('document.layers[item]');

document.showItem.style.visibility = "visible";
}

for (var i=0;i<document.getElementsByTagName("input").length; i++)
{
if (document.getElementsByTagName("input").item(i).className == "disableme")
{
document.getElementsByTagName("input").item(i).disabled = "disabled";
}
}

}

function showNotif2(item, button,formName)
{
alert('item: '+item);
alert('button: '+button);
alert('formname: '+formName);
if (button !="noBlock")
{
eval("document." + formName + "." + button + ".disabled=true");
}
if (item !="noNotif")
{
var browserType;
if (document.all) {browserType = "ie";}
if (window.navigator.userAgent.toLowerCase().match("gecko")) {browserType= "gecko";}
if (browserType == "gecko" )
document.showItem = eval('document.getElementById(item)');
else if (browserType == "ie")
document.showItem = eval('document.all[item]');
else
document.showItem = eval('document.layers[item]');

document.showItem.style.visibility = "visible";
}

for (var i=0;i<document.getElementsByTagName("input").length; i++)
{
if (document.getElementsByTagName("input").item(i).className == "disableme")
{
document.getElementsByTagName("input").item(i).disabled = "disabled";
}
}
}

function clearIfDefaultString(formField, defaultString) {
if(formField.value == defaultString) {
formField.value = "";
}
}

function submitOnEnter(event, defaultButtonId) {
var characterCode;
if (event.which) {
characterCode = event.which;
} else if (event.keyCode) {
characterCode = event.keyCode;
}

if (characterCode == 13) {
event.returnValue = false;
event.cancel = true;
document.getElementById(defaultButtonId).click();
return false;
} else {
return true;
}
}

function show(obj) {
document.getElementById(obj).style.display = '';
}

function hide(obj) {
document.getElementById(obj).style.display = 'none';
}

function clickReloadLink(windowToGetFocus){

var newindex = 0;
for (i=0; i=0){
newindex = i;
break;
}
}

document.links[newindex].onclick();
windowToGetFocus.focus();

return false;
}

/* Converts implicit form control labeling to explicit by
* adding an unique id to form controls if they don’t already
* have one and then setting the corresponding label element’s
* for attribute to form control’s id value. This explicit
* linkage is better supported by adaptive technologies.
* See SAK-18851 for original.
*/
fixImplicitLabeling = function(){
var idCounter = 0;
$(‘label select,label input’).each(function (idx, oInput) {
if (!oInput.id) {
idCounter++;
$(oInput).attr(‘id’, ‘a11yAutoGenInputId’ + idCounter.toString());
}
if (!$(oInput).parents(‘label’).eq(0).attr(‘for’)) {
$(oInput).parents(‘label’).eq(0).attr(‘for’, $(oInput).attr(‘id’));
}
});
};
// ]]>// <![CDATA[
function checkRadio()
{
for (i=0; i<document.forms[0].elements.length; i++)
{
if (document.forms[0].elements[i].type == "radio")
{
if (document.forms[0].elements[i].defaultChecked == true)
{
document.forms[0].elements[i].click();
}
}
}
}

var formatByQuestion = 'false';
function setLocation()
{
// reset questionindex to avoid a Safari bug
partIndex = document.forms[0].elements['takeAssessmentForm:partIndex'].value;
questionIndex = document.forms[0].elements['takeAssessmentForm:questionIndex'].value;
if (!formatByQuestion)
document.forms[0].elements['takeAssessmentForm:questionIndex'].value = "0";

formatByPart = document.forms[0].elements['takeAssessmentForm:formatByPart'].value;
formatByAssessment = document.forms[0].elements['takeAssessmentForm:formatByAssessment'].value;

//alert("partIndex = " + partIndex);
//alert("questionIndex = " + questionIndex);
//alert("formatByPart = " + formatByPart);
//alert("formatByAssessment = " + formatByAssessment);
// We don't want to set the location when the index points to fist question on the page
// We only set the location in following cases:
// 1. If it is formatByPart, we set the location when it is not the first question of each part
// 2. If it is formatByAssessment, we set the location when:
// a. it is not the first question of the first part
// b. it is a question in any parts other than the first one
if ((formatByPart == 'true' && questionIndex != 0) || (formatByAssessment == 'true' && ((partIndex == 0 && questionIndex !=0) || partIndex != 0))) {
window.location = '#p' + ++partIndex + 'q' + ++questionIndex;
//alert("from TOC:" + window.location);
}
}

var redrawAnchorName = '';
function setLocation2()
{
//alert("redrawAnchorName=" + redrawAnchorName);
if (redrawAnchorName != null && redrawAnchorName != "") {
window.location = '#' + redrawAnchorName;
//alert("from redraw: window.location…" + window.location);
}
}

function noenter(){
return!(window.event && window.event.keyCode == 13);
}

function saveTime()
{
if((typeof (document.forms[0].elements['takeAssessmentForm:assessmentDeliveryHeading:elapsed'])!=undefined) && ((document.forms[0].elements['takeAssessmentForm:assessmentDeliveryHeading:elapsed'])!=null) ){
pauseTiming = 'false';
document.forms[0].elements['takeAssessmentForm:assessmentDeliveryHeading:elapsed'].value=loaded/10;
}
}

function disableRationale(){
var textAreas = document.getElementsByTagName("textarea");
//alert(textAreas[0].id);
//alert(textAreas[0].id.endsWith('rationale'));
if (textAreas.length == 1 && textAreas[0].id.endsWith('rationale')) {
textAreas[0].disabled = true;
}
}

function enableRationale(){
var textAreas = document.getElementsByTagName("textarea");
//alert(textAreas[0].id);
//alert(textAreas[0].id.endsWith('rationale'));
if (textAreas.length == 1 && textAreas[0].id.endsWith('rationale')) {
textAreas[0].disabled = false;
}

/* Somehow the following for-loop becomes an infinite look of enableRationale(). No time to look into this now. Use above work around.
Should come back later to figure out the reason.
for(i=0; i < textAreas.length; i++){
alert(i);
if (textAreas[i].id.endsWith('rationale')) {
textAreas[i].disabled = false;
return;
}
}
*/
}

// modified from tompuleo.com
String.prototype.endsWith = function(txt)
{
var rgx;
rgx = new RegExp(txt+"$");

return this.match(rgx) != null;
}

function clickSaCharCountLink(field){
var insertlinkid= field.id.replace("getAaCharCount", "hiddenlink");

var newindex = 0;
for (i=0; i

Quiz #3


// <![CDATA[
function clickSubmitForGrade(){
var newindex = 0;
for (i=0; i

// According to the authors of the journal article for Forum 3, recipients of social support are often:

A.very pleased
Correct B.sometimes worse off
C.resentful
D.well-adjusted

//

Answer Key: B
// According to the journal article for Forum 3, recipients of social support may experience:

A.lowered self-esteem
B.feelings of indebtedness
C.receiving the wrong kind of support
Correct D.All of the above

//

Answer Key: D
// The authors of the journal article for Forum 3 hypothesize:

A.having insecure attachment history with parents causes one to benefit from emotional support in adulthood
Correct B.having secure attachment history with parents causes one to benefit from emotional support in adulthood
C.having secure attachment history with parents causes one to benefit from instrumental support in adulthood
D.having an insecure attachment history with parents causes no notable differences in response to emoational support in adulthood

//

Answer Key: B
// According to Bowlby, as cited in the journal article for Forum 3, the earliest working models:

Correct A.are in response to interactions with signficant caregivers
B.are formed while a fetus
C.are formed during adolescence
D.are in response to cultural prompts

//

Answer Key: A
// Central to the study of psychopathology is a definition of _____________________.

A.society
B.values
C.norms
Correct D.culture

//

Answer Key: D
// When attempting a diagnosis, cultural analysis may describe a variability in the ____________________ of a mental illness.

A.disability degree
B.prevalence
C.manifestation
Correct D.all of the above

//

Answer Key: D
// A primary message in the Surgeon General’s 2001 USDHHS report was:

A.culture is variable
Correct B.culture counts
C.culture is changing
D.culture is missing

//

Answer Key: B
// The ultimate goal of psychopathological research is to:

A.support the DSM-IV-TR
B.validate Western treatment protocols
C.alleviate differences
Correct D.improve lives

//

Answer Key: D
// A goal of the “Healthy People 2010” U.S. health agenda is:

A.elimination of the DSM
B.elimination of culture
Correct C.elimination of health disparities
D.elimination of biased researchers

//

Answer Key: C
According to some research, drug therapy is both more likely and less likely to be provided to African Americans compared to Caucasian Americans.

Correct
A. True
B. False
Answer Key: True
There is finally an abundance of research data considering gender, race and class in the development of psychopathology.

Correct
A. True
B. False
Answer Key: False
// The DSM-IV diagnostic criteria for anorexia nervosa include:

A.refusal to eat regular meals
Correct B.amenorrhea for 3 consective cycles
C.loss of 85% of body weight
D.intense fear of purging

//

Answer Key: B
// Noted triggers for binge eating include:

Correct A.stress
B.the presence of healthy foods
C.abstinence
D.the presence of other BEDs

//

Answer Key: A
// Prevalence rates of Binge Eating Disorder range from ________ to __________.

A.12.5%; 16%
Correct B.2-4%
C.6.2%; 14%
D.1%; 4.6%

//

Answer Key: B
// The following may contribute to the susceptibility to eating disorders:

A.belief systems/sociocultural factors
B.personality traits
C.weight-related problems
Correct D.all of the above

//

Answer Key: D
// The treatment of choice for BN is:

A.psychoanalysis
B.family therapy
C.DBT
Correct D.CBT

//

Answer Key: D
// According to a patient of Hilde Bruch, the illness of eating disorder has to do with:

A.worry about looks
B.worry about dieting
Correct C.how you feel about yourself
D.how others feel about you

//

Answer Key: C
// Dysfunctional and deviant sexual behaviors are:

A.determined by secular leaders
B.determined by individual preference
Correct C.determined arbitarily through social norms
D.determined medically

//

Answer Key: C
// Contempoary views identify 2 primary categories of sexual disorder:

A.domination and sadism
B.zoophilia and premature ejaculation
C.masochism and sadism
Correct D.sexual dysfunction and paraphilias

//

Answer Key: D
// DSM-IV-TR describes sexual dysfunction as:

A.desire and arousal disorders
B.orgasmic disorder
C.dyspareunia and vaginismus
Correct D.all of the above

//

Answer Key: D
A history of sexual abuse may be a contributing factor in the development of paraphilias.

Correct
A. True
B. False
Answer Key: True
// Gender refers to:

A.anatomical indicators
B.sexual preferences
Correct C.a sense of identify
D.transexualism

//

Answer Key: C
// Researchers are discovering that gender identity disorder is:

A.the same as sexual orientation
Correct B.more heterogeneous than previously believed
C.relatively common
D.now fully understood

//

Answer Key: B
// Treatments for gender identity disorder most often involve:

A.changing thoughts and feelings
B.administration of drugs
C.psychoanalysis for 3 years
Correct D.changing the person’s gender.

//

Answer Key: D
// Internet sexual compulsivity is:

A.an issue for corporations
B.damaging to relationships
C.contributing to job loss
Correct D.all of the above

//

Answer Key: D

//

//

You have 5 minutes left. Press ‘Esc’ or click ‘X’ to return to your assessment. The timer will continue to count down whether or not you close this window.close
You have 5 minutes left.
Press ‘Esc’ or click ‘X’ to return to your assessment.
The timer will continue to count down whether or not you close this window.

Time Expired!

All of your answers are being submitted

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s