Created
June 26, 2013 14:47
-
-
Save mikebuchanon/5867967 to your computer and use it in GitHub Desktop.
Queries to find and to update all assessments that need to have their warning time updated from 2 minutes to 10 minutes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --find all assessments in courseids that are visible by students and need to have their TimeWarning time updated | |
| select lo2.title [folder_name],lo.TITLE [assessment_name], le.course_id, qcs.TimeLimit, qcs.TimeWarning | |
| from QuestionContainerSettings qcs | |
| join qti_question_containers qqc (nolock) on qqc.settings_id=qcs.ID | |
| join LSN_ENTRIES le (nolock) on qqc.entry_ID=le.ENTRY_ID | |
| join LSN_OBJECTS lo (nolock) on lo.OBJECT_ID=le.OBJECT_ID | |
| join LSN_ENTRIES le2 (nolock) on le2.ENTRY_ID=le.PARENT_ID | |
| join LSN_OBJECTS lo2 (nolock) on lo2.OBJECT_ID=le2.OBJECT_ID | |
| where le.COURSE_ID like 'course_ids%' | |
| and lo.OBJECT_TYPE='assessment' | |
| and le2.VIEWABLE_BY=2 and le2.HIDDEN=0 | |
| and qcs.TimeLimit = 60 and qcs.TimeWarning=2 | |
| order by le.course_id, le2.SEQUENCE | |
| --update all assessments in courseids that are visible by students and need to have their TimeWarning time updated | |
| update qcs | |
| set qcs.timewarning=10 | |
| from QuestionContainerSettings qcs | |
| join qti_question_containers qqc (nolock) on qqc.settings_id=qcs.ID | |
| join LSN_ENTRIES le (nolock) on qqc.entry_ID=le.ENTRY_ID | |
| join LSN_OBJECTS lo (nolock) on lo.OBJECT_ID=le.OBJECT_ID | |
| join LSN_ENTRIES le2 (nolock) on le2.ENTRY_ID=le.PARENT_ID | |
| join LSN_OBJECTS lo2 (nolock) on lo2.OBJECT_ID=le2.OBJECT_ID | |
| where le.COURSE_ID like 'course_ids%' | |
| and lo.OBJECT_TYPE='assessment' | |
| and le2.VIEWABLE_BY=2 and le2.HIDDEN=0 | |
| and qcs.TimeLimit = 60 and qcs.TimeWarning=2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment