#WIDGETSTEMPLATE#
',NULL,NULL) WHERE [static_html_id]=2
-- Operation applied to 2 rows out of 2
-- Add rows to [dbo].[tip_of_week]
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (1, 'When you press the F1 key (on the top left of your keyboard) the SOS Help file opens, usually to help for the form or page you are on when you press the key.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (2, 'You can have your student work on different subjects on specific days of the week using the assign by day feature. Anywhere you assign a subject or regenerate due dates, you can choose which days of the week you want a student to work on each assigned subject. SOS defaults to Monday through Friday, but you can change it to match your schedule.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (3, 'On the Student Setup page, select "Enable Advanced Lesson Planning allowing you to assign due dates" if you want to use a calendar to monitor student assignments.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (4, 'There are a series of tutorials that walk you through a number of functions and features of SOS. Click the Tutorials link in the Help Center widget or click the Help button and select "Tutorials" to see how to install a subject, how to regenerate due dates, how to assign a subject, or any of about 15 other topics.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (5, 'SOS offers a series of animated presentation to give you an overview of the applications. See a bit about how the Administration Setup functions, the Lesson Book functions and some SOS Student functions work. Click the "SOS Overview" link in the "Help Center" widget or click the "Help" button and select "SOS Overview" if you are using the "Classic" theme.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (6, 'Curriculum Revisions are automatically downloaded and installed. SOS Teacher runs a weekly search to see if there are updates for any of the curriculum you have installed. If so, all you have to do is click Ok when the Curriculum Update message box appears and your curriculum is updated. Click Cancel if you do not want to install the update. You can also opt to check for Curriculum Revisions by selecting that link in the Application widget on your Teacher Homepage.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (7, 'MS Word is used by MS Outlook, so if you see a message telling you WINWORD is open, close your MS Outlook and that should enable you to open a project created in MS Word.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (8, 'You can view and grade student work from your computer if the computers are networked. Load the full version of SOS on your computer and the client install on student computers. (See the Quick Start Guide that came with your SOS installation disc for step by step instructions on client installs.)')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (9, 'Want to delete an assignment from a student''s workload? Click "Lesson Book - Assignments" in the "Administration" widget, select the student, select the subject with the assignment, click the "Edit Subject" button, click the unit containing the assignment, click the "Remove" button, click Yes, click the "Save" button. If you are using due dates, you can click "OK" to change them or "Cancel" to leave them alone.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (10, 'Want to add an assignment to your student''s work? You can drag a student assignment onto a specific day from the "Lesson Plan". Select the student, double-click the day you want the assignment done, click the "Add" button, click the plus sign beside the subject under "Student''s Subjects" on the left-hand side, click the plus signs to expand the folders in the "Available Curriculum" column on the right-hand side of the window. Locate the assignment, click and drag it until it is over the unit folder where you want the assignment placed, release the mouse button. Click "Ok". Close the "Day Detail" window. The assignment now appears on the day you selected.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (11, 'To assign an alternate assignment or test: click "Lesson Book - Assignments", select the student, click the subject in the "Student Schoolwork" section on the bottom of the screen and click the "Edit" button. Expand the curriculum folder in the "Available Curriculum" column on the right-hand side of the screen. Select the subject, then select the unit, click the "Alternate Test" (or other alternate assignment) and drag it to the unit folder. Use the "Move Up" or "Move Down" button if necessary. To delete the existing test, click it and then click the "Remove" button. Click the "Save" button when you are finished.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (12, 'Do you know you can enter the name of the person "born on this day" into the Google Search box to learn more about that person?')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (13, 'To backup to a flash drive, click "Backup". Insert a flash drive (sometimes called a thumb drive) into a USB port on your computer. On the "Save backup file as" window, click the drop-down menu, "Save in:" at the top and select the flash drive. Click the "Save" button on the bottom of the window.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (14, 'There are a number of free and inexpensive software packages available with voices other than Microsoft Sam, Mary and Mike. Install as you would any other software package. Once you have installed the software, the voice options automatically appear as a choice in the "Set Voice" menu.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (15, 'To change a day, any day from a school day into a non-school day or the reverse: click "Administrative" functions and select "School Setup". Click the circle beside "Term". Select the "Term" and click the picture of the calendar. Days in yellow are school days. To make a school day a non-school day, click your right-hand mouse button over the day you want to change, and select Schoolday. The day is now gray, indicating it is no longer a school day. Click "Save Calendar" to save your changes.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (16, 'You can use any .jpeg format picture you want as an avatar. When you click the Avatar button and see the window to "Select an image for your avatar", simply click the "Look in:" drop-down menu to browse to the location where the .jpeg picture file is located. Select the picture you want and click the "Open" button. Your picture displays on the "Change Avatar" window, click the "OK" button to save the change. ')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (17, 'To customize the calendar for one student and not all students: Click "Administrative" functions and select "Student Setup". Choose the student and click the "Edit Calendar" button. Select the "Term" and click the "Open" button. Edit the student''s calendar just as you do the school calendar. Click the "Save Calendar" button when you are done. You can regenerate the due dates by clicking the "Regenerate" button or skip this by clicking the "Cancel" button. ')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (18, '"Open Book" is an option for quizzes and tests to allow students to start and stop a quiz or test and then return to it, until they choose to submit it for grading. Set it on the Quiz/Test Setup Page (Find this option under School Setup or Student Setup/Edit Settings or for just one subject, go to Lesson Book-Assignments, select the subject, click Edit Subject and select Quiz/Test). ')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (19, 'The Custom theme allows you and your students to create the background for your Homepage in SOS. After you select the Custom theme, click "Settings", then either pick your color and intensity on the color wheels to simply change the background and widget box colors or use the "Wallpaper" option to choose any picture (.jpeg format) file you want to use. You can even opt to use a small picture and have it repeat enough times to fill your screen by choosing the "Tile" option. Don''t forget to click the "Save Settings" button when you are done!')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (20, 'To use your own pictures (or photos) as Wallpaper, make sure you have chosen the Custom theme, then click Settings, click Wall paper, click Pick Wallpaper, browse to the folder with the picture or photo you want to use, select it, click OK, click Save Settings. The picture or photo file you choose must be in the .jpeg format.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (21, 'When grading, you can press the F2 key on your keyboard to save the grade and go to the next problem or press F4 to save the grade and exit the assignment in one step.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (22, 'Are there times when your student needs to do their schoolwork on a different computer? As long as SOS is installed on the computers, it is possible to access schoolwork from another computer. Use the "Import/Export feature (Application widget) to do this. This only makes schoolwork available. It does not apply to your messages or your homepage settings. Step-by-step instructions are available in the electronic Help file. (Press F1 to access.)')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (23, 'You can easily print a lesson plan for your student, simply click "Lesson Plan", select the student whose lesson plan you want to print, click the "Print" button on the bottom of the screen, select the start and end dates of the date range you want. Click the "Preview" button to verify that is what you want, click the "Print" button to select your printer, and click the "Print" button.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (24, 'Want to disable access to the Google Search feature? To disable it for all of your students, click "School Setup" in the "Administration" widget, then select "Homepage", and click "Google Search Box" to remove the checkmark. You can also choose to disable it for only a single student. Do this by clicking "Student Setup" in the "Administration" widget instead, then select the student, click the "Edit Settings" button, choose "Homepage" and click to remove the checkmark in the box next to "Google Search Box".')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (25, 'Using a template for a custom assignment? You must have the template in the same location (so it uses the same file path) on both computers (Teacher and Student).')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (26, 'When you perform a backup, it automatically creates a backup file (SOSbackup2010T). This file is saved in the backup folder in folder used to install SOS. If you change the location of the default folder, you need to make note of it, so you can find it in the event you need to restore that file. The Restore function looks in the default location for the backup file.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (27, 'The backup function creates the backup file based on the application that created it, so the filenames are slightly different for teacher and student. For example, the backup filename created in SOS Teacher is "SOSbackup2010T" and the one created in SOS Student is "SOSbackup2010S".')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (28, 'Curriculum can easily be copied from the discs to your computer. From SOS Student, insert the subject disc into the drive (or the subject flash drive into your USB port), click "Copy Curriculum" in the "Application" widget, click "OK" to install to the default location (highly recommended) or click "Browse" to specify a different location. ')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (29, 'The "Import/Export" and "Backup/Restore" functions are different in that a backup includes the entire SOS database (all student and school setup data), while an export includes only student schoolwork data for the selected student. "Import/Export" allows you to export (move) and import (add) the individual student''s data between computers that already have SOS installed on them. When you restore a backup, the entire database is replaced. When you import data, it is merged into the existing database.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (30, 'The "Zero Unit" button on the left-hand side of the "Lesson Book - Assignment" window allows you grade all of the assignments in a unit as zero, clear all of the student work, and marking an entire unit complete, but with just one click.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (31, 'If you are looking for the version number of SOS that you have installed on your computer, click the About link on the top bar of your MiSOS Homepage. The DB Version number tells you what SOS version you are using.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (32, 'When you regenerate due dates for your student(s), any due dates for already completed work do not change. Only assignments as yet unfinished get new due dates.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (33, 'Want to change the due date of a single assignment? Go to your "Lesson Plan", select the student, and the term. Next, double-click the day that currently contains the assignment. On the "Day Detail" window, select the assignment to be changed and click the "Change Due Dates" button. Enter the date(s) you want on the "Change Dates" box and click "Ok". Close the "Day Detail" window and return to your "Lesson Plan" to see the due date changed.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (34, 'Do you know you can right-click over a student assignment on your Lesson Book - Assignments page (select the student, select the subject and unit under Student Schoolwork to see the assignments list). When you right-click an assignment here, you can open the assignment, block or unblock the assignment; clear the work and reassign it; view the details of the assignment; set the assignment grade as zero; and clear any highlighting done in the assignment.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (35, 'Do you want to set up an event that spans multiple days? Click "administrative functions" in the "Administration" widget, select "Term", and click the calendar icon. Double-click the first day of the event. Click the "Add" button on the "Edit Day" window. Enter a brief "Description" of the event and select the "End Date" for the event. Click the "Save" button and close the "Edit Day" window. Click "Save Calendar" on the Edit School Calendar" window.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (36, 'Need to remove an event (items in those darker yellow boxes on your calendar)? Click "administrative functions" in the "Administration" widget, select "Term", and click the calendar icon. Double-click the day with the event to remove, click the event to select it, and click the "Remove" button. Close the "Edit Day" window, and click "Save Calendar" on the "Edit School Calendar" window.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (37, 'Printing from SOS Student is only possible if it has been enabled by the teacher. To do this, click "administrative functions" in the "Administration" widget. Click the checkbox next to "Student Printing" at the bottom of the "Lesson Options" section and click the "Save" button.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (38, 'A student''s lesson can be printed from SOS Teacher. Click "Lesson Book - Assignments" and select the student, then in the Student Schoolwork" section, select the subject and unit containing the lesson you want to print. Double-click the "Assignment Title" in the lower right-hand part of the window and click the "Print" button on the bottom of the window.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (39, 'To print a lesson from SOS Student, click "schoolwork". Click the subject and unit containing the lesson in the "Review Completed Assignments" section on the bottom of the window, and then double-click the "Assignment Title". Click the "Print" button on the bottom of the "Review Assignment" window. Remember, students can only print assignments that are already completed.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (40, 'To create a new term and the calendar associated with it, click "administrative functions" in the "Administration" widget, click "School Setup" and select "Term". Click the "Add" button, enter the new "Term Name" and click the "Save" button. Now the calendar, select the term you just created using the drop-down menu, and click the calendar icon. Select Traditional or Custom (Traditional is similar to the public schools, custom allows you to select your preferred dates.). Customize your calendar to meet your needs and click the "Save" button when you are finished.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (41, 'Do you need to modify your traditional calendar school year to end on a different date? Click "administrative functions" in the "Administration" widget, click "School Setup" and select "Term". Click the calendar icon and click the "Reset" button. Select "Custom" and choose the new "End Date" using the drop-down menu. Customize your calendar if you wish. Be sure to click the "Save" button when you are done.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (42, 'Spelling in answers to student problems is a complex issue. Much like most word processing programs, only words in the application dictionary can be spell-checked. From there, SOS takes a two-fold approach to spelling. One is automatic the other, you control. We''ll address automatic features this week. Words more than 7 characters long are automatically spell-checked. If there is a spelling error in the answer, SOS automatically deducts 5% for each textbox with a spelling error.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (43, 'Continuing from last week''s tip ... "Easy spelling" is a setting you control. If you choose to use this setting, all words less than 8 characters long are spell-checked. If the only thing wrong with an answer is a spelling error in a word less than 8 characters long, the percentage you set in the "Spelling penalty box" is deducted instead of SOS marking the entire answer wrong.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (44, 'Many of the SOS Settings are multi-level, meaning that you can set them at the School level, the Student level, and/or the Student Subject level. If you change any setting for assignments, quizzes/tests, or grades at any level, the message, "Settings have been customized", appears at the bottom of all settings screens (assignment, quiz/test, grade) for that level. If you have forgotten what change you made or just want to revert back to the SOS default settings, click the "Default" button at the bottom of any of the settings windows (school, student, or student subject) and all setting changes are erased.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (45, 'You can exclude a day, or a series of day from being considered as schooldays. As an example, if my student always does non-SOS activities on Wednesday, I would not want SOS to schedule schoolwork for him/her on that day of the week. To do this, I click "administrative functions" in the "Administration" widget, select the student, and click "Edit Calendar". I click the "Exclude" button and on the "Exclude Days" window, I put the date of the last day I want excluded in the "End Date" field and if the date I want to begin is different than today, I use the drop-down menu in "Start Date" to choose that day. Now, I am going to click the checkbox next to "Wednesday" and enter a brief "Description" and click "Ok" to apply this change. Every Wednesday, in my selected date range shows the description I entered. I click "Ok" to save the changes. I can click the "Regenerate" button to change any existing due dates, or the "Cancel" button to leave them as they are.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (46, 'Do you want your students to use a password to login to SOS Student? You must go to "Security Settings" in the "Application" widget and check the box next to "Enable Student Passwords" in addition to entering the password on the "Student Setup" window.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (47, 'You can create your own test, quiz, or lesson, as well as a project using the custom assignment feature. Access it from either the "Curriculum Setup" screen or the "Edit Student Subject" screen.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (48, 'Do you want to create a custom assignment for only one student? Go to "Lesson Book - Assignments" and select the student. Select the subject and click the "Edit Subject" button. Click the unit where you want to place the assignment and click the "Create Assignment" button. When you finish entering the custom assignment, you can use the "Move Up" and "Move Down" buttons to place the assignment exactly where you want it to appear. Be sure to click the "Save" button when you are finished. It is automatically assigned to this student only.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (49, 'There is a "Zero Assignment" button on the right-hand side "Lesson Book - Assignment" window. With one click, it allows you clear all of the student work, and mark an assignment complete with a grade of zero, so the student does not have to redo the assignment to continue in the subject.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (50, 'You can add any non-SOS subjects to a student report card. Click "Report Card", "Select a Term" and click the checkbox beside the student name. Click the "Customize" button and select the "Student" again. Add the subject(s) and grade(s). Enter any "Comments" you wish to appear on the Report Card. Don''t forget to click the "Save" button when you are done.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (51, 'Do you know there is a link from your SOS Teacher Homepage to send AOP suggestions or to report an error? Click "Content Feedback" in the "Help Center" widget or click the Help button and select "Content Feedback" if you are using the "Classic" theme.')
INSERT INTO [dbo].[tip_of_week] ([week_num], [data]) VALUES (52, 'You can decide what date a term starts and what date a term ends. When you create a term, select "Custom" and then use the drop-down arrows by Start Date and End Date to select the dates you want. If you are adding an additional term, click the calendar icon once you have added the term to select "Custom".')
-- Operation applied to 52 rows out of 52
-- Add rows to [dbo].[widget_app]
INSERT INTO [dbo].[widget_app] ([id], [name], [title], [template], [content_key], [post_load_javascript], [requires_web], [optional], [student], [teacher], [default_column], [default_order], [default_widget], [installation_date]) VALUES (27, 'TipoftheWeek', 'Tip of the Week', '
', '#NONE', 'readyTodo();', 0, 1, 1, 1, 3, 99, 1, '2009-12-30 14:45:53.000')
-- Operation applied to 4 rows out of 4
-- Add rows to [dbo].[widget_content]
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1465, 28, 'There is only one place in the United States where four states meet. It is called Four Corners and the four states whose borders touch here include Colorado, Arizona, New Mexico and Utah. ', '2004-01-01 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1466, 28, 'New York City is home to more people than any other place in the United States.', '2004-01-02 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1467, 28, 'Crater Lake is the deepest lake in the United States. It is about 1,950 feet deep. Do you know what state it is in?', '2004-01-03 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1468, 28, 'Honolulu, Hawaii is the southernmost capital city in the United States.', '2004-01-04 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1469, 28, 'Hawaii is made up entirely of islands. There are eight main islands, Niihau, Kauai, Oahu, Molokai, Lanai, Kahoolawe, Maui, and Hawaii. ', '2004-01-05 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1470, 28, 'Hawaii is the only state that has a royal palace, the Iolani Palace in Honolulu. It was the official residence of King Kalakaua and Queen Liliuokalani.', '2004-01-06 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1471, 28, 'Alaska is also known as "The Last Frontier", the "Land of the Midnight Sun" and "Seward''s Icebox".', '2004-01-07 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1472, 28, 'Alaska has a longer coastline than all of the other states combined.', '2004-01-08 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1473, 28, 'The northernmost town in the United States is Barrow, Alaska. There is no sunlight in Barrow for about 65 days each year.', '2004-01-09 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1474, 28, 'Juneau, the capital of Alaska can only be reached by boat or by air. It is located in the panhandle of the state, surrounded by steep mountains and glaciers. Juneau''s eastern border is with Canada. It is the only state capital to border another country.', '2004-01-10 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1475, 28, 'The Iditarod Trail Sled Dog Race is 1150 miles, from Anchorage, Alaska to Nome, on Alaska''s central western coastline.', '2004-01-11 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1476, 28, 'The northernmost point in the United States is Point Barrow, Alaska. It sits on a headland on the Arctic Ocean', '2004-01-12 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1477, 28, 'The "Land of Enchantment" is another name for New Mexico.', '2004-01-13 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1478, 28, 'The town of Truth or Consequences, in southern New Mexico was renamed for a television game show. It used to be Hot Springs, New Mexico.', '2004-01-14 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1479, 28, 'Carlsbad Caverns National Park is located in the Guadalupe Mountains in southeastern New Mexico. The second largest cave chamber in the world can be found there.', '2004-01-15 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1480, 28, 'The city of Albuquerque, New Mexico, like Denver, Colorado is a mile high. They are both 5,280 feet above sea level.', '2004-01-16 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1481, 28, 'Florida is often called by it''s nickname, "The Sunshine State".', '2004-01-17 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1482, 28, 'Lake Okeechobee is about half the size of the state of Rhode island, but is only about 9 feet deep.', '2004-01-18 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1483, 28, 'The Okefenokee Swamp is the largest peat-based "blackwater" swamp in North America. It''s name means "Land of the Trembling Earth". It straddles the border of southern Georgia and northern Florida.', '2004-01-19 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1484, 28, 'Rogers Pass, Montana recorded the lowest temperature in the continental United States on Jan. 20, 1954. It was -70 Fahrenheit. ', '2004-01-20 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1485, 28, 'The oldest city in the United States is St. Augustine, Florida. People have lived there since 1565.', '2004-01-21 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1486, 28, 'Montana is known as both the "Treasure State" and "Big Sky Country".', '2004-01-22 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1487, 28, 'The Battle of Little Big Horn, between the US Troops, led by General George Custer; and the Sioux Indians, led by Sitting Bull, was fought near what is now Crow Agency, Montana.', '2004-01-23 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1488, 28, 'Glacier National Park is located in north western Montana. It borders Waterton Lakes National Park in Canada.', '2004-01-24 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1489, 28, 'Going-to-the-Sun Road is the only road through the heart of Glacier National Park. It crosses the Continental Divide at Logan''s Pass.', '2004-01-25 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1490, 28, 'Butte, Montana its in a natural bowl that straddles the Continental Divide. It became known as the "Richest Hill on Earth" because the copper veins found there.', '2004-01-26 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1491, 28, 'Texas is the "Lone Star State".', '2004-01-27 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1492, 28, 'The Alamo is in San Antonio, Texas.', '2004-01-28 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1493, 28, 'Texas is the largest state in the "lower 48" states. It is 268, 820 square miles. Germany would fit into Texas almost twice!', '2004-01-29 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1494, 28, 'The Rio Grande River creates part of the boundary between the United States and Mexico. It runs along the entire western border of Texas to the Gulf of Mexico.', '2004-01-30 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1495, 28, 'The largest ranch in the United States is King Ranch in Kingsville, Texas, between Corpus Christi and Brownsville.', '2004-01-31 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1496, 28, 'The Johnson Space Center, in Houston, Texas is the center for all NASA manned space flights.', '2004-02-01 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1497, 28, 'South Dakota''s nicknames are the "Coyote State" and "Mount Rushmore State".', '2004-02-02 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1498, 28, 'The faces of George Washington, Thomas Jefferson, Theodore Roosevelt, and Abraham Lincoln are sculpted in Mt. Rushmore, in the Black Hills of western South Dakota.', '2004-02-03 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1499, 28, 'Mitchell, South Dakota is the home of the Corn Palace, a multi-purpose arena built to showcase the rich soil of the state.', '2004-02-04 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1500, 28, 'The Crazy Horse Memorial is under construction at Thunderhead Mountain between Custer and Hill City in South Dakota''s Black Hills.', '2004-02-05 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1501, 28, 'The Lewis and Clark National Historical Trail follows the Missouri River as it bisects the State of South Dakota. ', '2004-02-06 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1502, 28, 'The Ogallala Sioux Pine Ridge Indian Reservation in southwestern South Dakota is larger in area than the states of Delaware and Rhode Island combined.', '2004-02-07 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1503, 28, 'The "Hawkeye State" is another name for Iowa.', '2004-02-08 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1504, 28, 'Silos & Smokestacks National Heritage Area can be found in northeastern Iowa.', '2004-02-09 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1505, 28, 'The "Field of Dreams" baseball diamond is located in Dyersville, Iowa.', '2004-02-10 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1506, 28, 'Iowa is bordered on both it''s eastern and western boundaries by rivers. The Mississippi River makes up the eastern border and the Missouri and Big Sioux bound it on the west.', '2004-02-11 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1507, 28, 'The Amana Colonies are on the Iowa River about 20 miles from Iowa City, Iowa.', '2004-02-12 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1508, 28, 'Vermont is called the "Green Mountain State".', '2004-02-13 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1509, 28, 'Vermont is the only New England state without an ocean border.', '2004-02-14 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1510, 28, 'Montpelier is the smallest of all of the 50 state capitals in the United States. ', '2004-02-15 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1511, 28, 'The first major defeat of the British army during the American Revolution took place at the Battles of Bennington and Saratoga, in Vermont.', '2004-02-16 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1512, 28, 'New Jersey is the "Garden State".', '2004-02-17 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1513, 28, 'The Holland Tunnel was the first underwater tunnel. It was built to connect Jersey City, New Jersey and New York City.', '2004-02-18 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1514, 28, 'The largest seaport in the United States is in Elizabeth, New Jersey.', '2004-02-19 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1515, 28, 'Cape May, New Jersey is the oldest seashore resort in the United States.', '2004-02-20 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1516, 28, 'The longest boardwalk in the world is located in Atlantic City, New Jersey.', '2004-02-21 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1517, 28, 'The first Indian reservation, the Brotherton Reservation was in Burlington County, New Jersey.', '2004-02-22 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1518, 28, 'Ten states have two word names, New Hampshire, New Jersey, New Mexico, New York, North Carolina, North Dakota, Rhode Island, South Carolina, South Dakota, and West Virginia.', '2004-02-23 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1519, 28, 'West Virginia''s nickname is the "Mountain State".', '2004-02-24 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1520, 28, 'The first 4-H camp in the United States is at Jackson''s Mill, West Virginia.', '2004-02-25 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1521, 28, 'Moundsville, West Virginia is the home of one of the oldest and largest Indian burial grounds.', '2004-02-26 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1522, 28, 'Memorial Tunnel in West Virginia was the first to be monitored by television.', '2004-02-27 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1523, 28, 'White Sulpher Springs, West Virginia is where you will find the only residence in the world built entirely of coal.', '2004-02-28 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1524, 28, 'The stone for the Washington Monument came from Hinton, West Virginia.', '2004-02-29 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1525, 28, 'Minnesota has many nicknames, including the "North Star State", the "Gopher State", "Land of 10,000 Lakes" and the "Bread and Butter State".', '2004-03-01 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1526, 28, 'The Mississippi River begins in Minnesota. It starts as a small stream in Itasca State Park and flows more than 2,300 miles to it''s end.', '2004-03-02 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1527, 28, 'Minneapolis, Minnesota is the coldest major city in the United States. It''s annual average temperature is 45 Fahrenheit. ', '2004-03-03 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1528, 28, 'The largest open pit mine in the world is in Hibbing, Minnesota.', '2004-03-04 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1529, 28, 'Elm Point and the Northwest Angle, Minnesota are two of 4 places in the continental United States that are north of the 49th parallel. The others are Point Roberts, Washington and Alburg, Vermont.', '2004-03-05 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1530, 28, 'The only water-based National Park is Voyageurs National Park (also called Boundary Waters Area), in northern Minnesota.', '2004-03-06 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1531, 28, 'There are five Great Lakes in the northern United States; Huron, Ontario, Michigan, Erie, and Superior (HOMES).', '2004-03-07 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1532, 28, 'Wisconsin is bordered by two of the Great Lakes, Lake Superior on the north and Lake Michigan on the east. ', '2004-03-08 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1533, 28, 'Michigan is bordered by three of the five Great Lakes. Lake Michigan forms the western border, while Lake Huron curves around the northern and eastern side of the state. Lake Erie is on the southeastern border. ', '2004-03-09 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1534, 28, 'South Carolina is sometimes called the "Palmetto State".', '2004-03-10 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1535, 28, 'The largest earthquake ever to hit the Southeastern United States was a 7.2 quake that hit Charleston, South Carolina.', '2004-03-11 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1536, 28, 'Fort Sumter, site of the first battle of the War Between the States (U. S. Civil War), is located in South Carolina''s Charleston Harbor.', '2004-03-12 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1537, 28, 'The states of Missouri and Tennessee are both bordered by eight other states. Missouri is bordered by Illinois, Kentucky, Tennessee, Arkansas, Oklahoma, Kansas, Nebraska, and Iowa. Tennessee is bordered by Kentucky, Virginia, North Carolina, Georgia, Alabama, Mississippi Arkansas, and Missouri.', '2004-03-13 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1538, 28, 'The nicknames for Arkansas include, "The Natural State, Land of Opportunity, and The Razorback State".', '2004-03-14 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1539, 28, 'The quartz crystal capital of the world is Mt. Ida, Arkansas.', '2004-03-15 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1540, 28, 'Ouachita National Forest, in west central Arkansas, reigns as the oldest national forest in the South. ', '2004-03-16 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1541, 28, 'The only known diamond mine in the United States, Crater of Diamonds State Park, is in Murfreesboro, Arkansas.', '2004-03-17 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1542, 28, 'Washington, D.C. sits on land donated by the state of Maryland. It is bounded by the Potomac River, the states of Virginia, and Maryland.', '2004-03-18 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1543, 28, 'The White House, FBI Building, Ford''s Theater, Lincoln Museum, and National Archives are all in the Federal Triangle area of Washington, D.C.', '2004-03-19 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1544, 28, 'The US Bureau of Engraving and Printing is where all US currency is produced. It is located on 14th Street in Washington, D.C.', '2004-03-20 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1545, 28, 'The headquarters of the Smithsonian and many of it''s museums, including the National Air and Space Museum are located on the National Mall in Washington, D.C.', '2004-03-21 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1546, 28, 'The U.S. Capitol Building sits at the north end of the National Mall. The Washington Monument is in the middle of the Mall and the Lincoln Memorial is at the south end of the Mall. What else is located on or near the National Mall?', '2004-03-22 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1547, 28, 'The "Granite State" is New Hampshire''s nickname.', '2004-03-23 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1548, 28, 'A wind speed of 231 miles per hour was recorded at the summit of Mt. Washington, New Hampshire.', '2004-03-24 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1549, 28, 'The first free public library in the United States was established in Peterborough, New Hampshire.', '2004-03-25 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1550, 28, 'The oldest state capitol building, where the legislature still meets in the original chamber is in Concord, New Hampshire.', NULL, 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1551, 28, 'The Cannon Aerial Tramway, in Franconia Notch State Park (near Laconia, New Hampshire) is the first aerial passenger tramway in North America. ', '2004-03-27 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1552, 28, 'Hampton River Bridge, at a mile long is the world''s longest wooden bridge. You can find it between Hampton and Seabrook, New Hampshire.', '2004-03-28 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1553, 28, 'The Christa McAuliffe Planetarium is located in Concord, New Hampshire. Why was a planetarium named for her?', '2004-03-29 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1554, 28, 'The "Salt of the Earth" and the "Sunflower State" are nicknames for Kansas.', '2004-03-30 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1555, 28, 'Liberal, Kansas is the home of Dorothy''s House from the Wizard of Oz.', '2004-03-31 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1556, 28, 'The Eisenhower Presidential Museum is located in Abilene, Kansas.', '2004-04-01 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1557, 28, 'Smith County, Kansas is the geographic center of the 48 contiguous states.', '2004-04-02 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1558, 28, 'A monument to the first Christian martyr on United States Territory stands along Highway 56 near Lyons. Father Juan de Padilla came to the region with the explorer Coronado in 1541.', '2004-04-03 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1559, 28, 'Fire Station No. 4 in Lawrence, Kansas was once a station on the Underground Railroad.', '2004-04-04 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1560, 28, 'The highest point in the United States is Mt. Denali, also known as Mt. McKinley, in Alaska.', '2004-04-05 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1561, 28, 'Nevada is called either the "Silver State" or the "Sagebrush State".', '2004-04-06 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1562, 28, 'Nevada is the driest state. It averages less than 10 inches of precipitation a year. (rain, hail, snow)', '2004-04-07 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1563, 28, 'The largest river in the United States that begins and ends within the same state and has no outlet to the ocean or other body of water is the Humboldt River. It begins in northeastern Nevada and ends at the Humboldt Sink near Lovelock, Nevada.', '2004-04-08 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1564, 28, 'Lake Tahoe, the largest alpine lake in the United States is on the border of California and Nevada.', '2004-04-09 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1565, 28, 'Nevada is the largest gold-producing state in the United States.', '2004-04-10 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1566, 28, 'Lake Mead, bordering the states of Arizona and Nevada is the biggest reservoir in the United States. The shoreline is 550 miles. ', '2004-04-11 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1567, 28, 'The "Pelican State", the "Bayou State", and "The Sugar State" are nicknames for Louisiana.', '2004-04-12 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1568, 28, 'Louisiana has the tallest state capitol building in the United States; the building is 450 feet tall with 34 floors. ', '2004-04-13 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1569, 28, 'Metairie, Louisiana is home to the longest bridge over water in the world, the Lake Pontchartrain causeway. The causeway connects Metairie with St. Tammany Parish on the North Shore. The causeway is 24 miles long. ', '2004-04-14 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1570, 28, 'Saint Martin Parish, Louisiana is home to the world''s largest freshwater river basin, the Atchafalaya Basin.', '2004-04-15 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1571, 28, 'Cemeteries in New Orleans, Louisiana are built above ground because the water table is too high to bury below ground.', '2004-04-16 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1572, 28, 'The Saint Charles streetcar line in New Orleans and the San Francisco, California cable cars are the nation''s only mobile national monuments. ', '2004-04-17 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1573, 28, 'The "Badger State" is Wisconsin''s nickname. It is also known as America''s Dairyland".', '2004-04-18 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1574, 28, 'The first hydroelectric plant in the United States was built at Fox River, Wisconsin.', '2004-04-19 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1575, 28, 'Noah''s Ark, the world''s largest water-themed park is found in the Wisconsin Dells.', '2004-04-20 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1576, 28, 'Wisconsin is the northernmost state that does not share a border with Canada. It is bounded on the north by Michigan''s Upper Peninsula, Lake Superior and the Montreal River.', '2004-04-21 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1577, 28, 'Apostle Islands National Lakeshore is located off a peninsula in Lake Superior at the northern border of Wisconsin. The Apostle Islands are a group of 21 islands that formed when glaciers melted.', '2004-04-22 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1578, 28, 'Georgia is known as the "Peach State". It is sometimes called "The Empire of the South" or the "Goober State". Do you know what at goober is?', '2004-04-23 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1579, 28, 'Popcorn Overlook is the name of a series of small peaks that "pop" up near Rabun County, Georgia.', '2004-04-24 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1580, 28, 'The Appalachian Trail runs from Mt. Katahdin, Maine on the north to Springer Mountain, Georgia in the south. It is 2,160 miles long.', '2004-04-25 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1581, 28, 'Marshall Forest in Rome, Georgia is the only natural forest with a city limits in the United States.', '2004-04-26 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1582, 28, 'The world''s largest sculpture is located on the face of Stone Mountain outside of Atlanta, Georgia. The sculpture is of Stonewall Jackson, Jefferson Davis, Robert E. Lee and his horse, Traveler.', '2004-04-27 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1583, 28, 'The first American university chartered and supported by state funds, the University of Georgia, is located in Athens, Georgia.', '2004-04-28 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1584, 28, 'The lowest point in the United States is Badwater, in Death Valley, California.', '2004-04-29 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1585, 28, 'On July 10, 1913, Death Valley, California recorded the highest temperature ever in the United States, 134 Fahrenheit', '2004-04-30 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1586, 28, 'Less than 2 inches of rain fall in Death Valley during an average year.', '2004-05-01 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1587, 28, 'California is called "The Golden State". Why do you think they call it that?', '2004-05-02 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1588, 28, 'The highest point in the continental United States is Mt. Whitney, in California.', '2004-05-03 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1589, 28, 'Sequoia National Park near Visalia, California is the home of the giant sequoia trees, the largest living organisms on Earth.', '2004-05-04 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1590, 28, 'San Bernardino County, California is the largest county in the United States. It is almost 3 million acres!', '2004-05-05 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1591, 28, 'The largest population of bald eagles is found spending the winter in the Klamath Basin National Wildlife Refuge on the California Oregon border.', '2004-05-06 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1592, 28, 'The Hollywood Bowl is the largest outdoor amphitheater in the world.', '2004-05-07 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1593, 28, 'The San Francisco Bay in northern California is the world''s largest landlocked harbor.', '2004-05-08 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1594, 28, 'Virginia is known as the "Old Dominion".', '2004-05-09 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1595, 28, 'The first English settlement in the United States was Jamestown, Virginia. Jamestown was also the first capital of Virginia.', '2004-05-10 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1596, 28, 'Richmond, Virginia is the current capital of the state. It was also the capital of the Confederacy during the Civil War (War between the States).', '2004-05-11 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1597, 28, 'The largest office building in the world is the Pentagon. It is located in Arlington, Virginia.', '2004-05-12 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1598, 28, 'The oldest legislature in the Americas is Virginia General Assembly, Virginia''s legislative governing body.', '2004-05-13 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1599, 28, 'The Historic Triangle of Virginia is home to Colonial Williamsburg, Yorktown, and Jamestown. They are linked by the Colonial Parkway, a National Scenic Byway.', '2004-05-14 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1600, 28, 'The first peanut crop in the United States was grown in Sussex County, Virginia.', '2004-05-15 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1601, 28, 'The "Wolverine State" and "Great Lake State" are nicknames for Michigan.', '2004-05-16 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1602, 28, 'Even though Michigan is known as the Wolverine State, there are no longer any wolverines in the state.', '2004-05-17 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1603, 28, 'Michigan is made up of two areas, the Upper Peninsula (the "UP) and the Lower Peninsula. They are separated by the Straits of Mackinac. Lake Michigan is on the west of the Straits and Lake Huron is to the east. ', '2004-05-18 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1604, 28, 'The Mackinac Bridge connects the Upper and Lower Michigan peninsulas. The main span of this bridge is 3, 800 feet long.', '2004-05-19 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1605, 28, 'The Porcupine Mountains in the Michigan Upper Peninsula is one of the oldest mountain chains in the world. ', '2004-05-20 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1606, 28, 'The largest state park and state forest system in the United States is in Michigan. It includes Holland State Park, Mackinac Island State Park, Au Sable State Forest and Mackinaw State Forest.', '2004-05-21 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1607, 28, 'The world''s largest limestone quarry is found in Rogers City, Michigan.', '2004-05-22 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1608, 28, 'Sleeping Bear Dunes rise 460 feet above the western shore of Lake Michigan near Empire, Michigan.', '2004-05-23 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1609, 28, 'Isle Royal Park, Michigan''s only National Park is the home of the largest moose herds remaining in the United States. ', '2004-05-24 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1610, 28, 'Pennsylvania is called the "Keystone State. Another nickname is the "Quaker State".', '2004-05-25 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1611, 28, 'The first baseball stadium in the world was built in Pittsburg, Pennsylvania. ', '2004-05-26 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1612, 28, 'The longest stone arch bridge in the world is the Rockville Bridge in Harrisburg, Pennsylvania.', '2004-05-27 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1613, 28, 'Washington Crossing, Pennsylvania is where George Washington and the colonial troops began their crossing of the Delaware River.', '2004-05-28 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1614, 28, 'Indiana County in west central Pennsylvania is the Christmas Tree Capital of the world.', '2004-05-29 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1615, 28, 'Fairmount Park in Philadelphia, Pennsylvania is the largest city park in the United States, It is over 8,000 acres.', '2004-05-30 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1616, 28, 'Philadelphia, Pennsylvania is also called the "City of Brotherly Love". It was the first capital city of the United States.', '2004-05-31 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1617, 28, 'Coral Caverns, located near Shawnee State Park in southern Pennsylvania, is the only known coral reef cavern in the world.', '2004-06-01 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1618, 28, 'Lancaster County, in south-central Pennsylvania is known as the "Garden Spot of America". Lancaster County is home to many "Plain Sect" residents. Other names for "Plain Sect" include Amish, Mennonite, and Pennsylvania Dutch.', '2004-06-02 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1619, 28, 'Idaho is called either the "Gem State" or the "Spud State".', '2004-06-03 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1620, 28, 'Hell''s Canyon in western Idaho is the deepest gorge in the United States.', '2004-06-04 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1621, 28, 'Birds of Prey Wildlife Area, in southwestern Idaho, is home to the world''s most dense population of nesting eagles, hawks, and flacons.', '2004-06-05 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1622, 28, 'Soda Springs, in southeastern Idaho is the home to the largest man-made geyser in the world.', '2004-06-06 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1623, 28, 'Lewiston, Idaho is the farthest inland seaport on the west coast of the continental United States because of a series of dams and locks on the Columbia and Snake rivers.', '2004-06-07 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1624, 28, 'Oregon''s nickname is the "Beaver State.', '2004-06-08 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1625, 28, 'Sea Lion Caves just north of Florence, Oregon is the largest sea cave in the world. ', '2004-06-09 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1626, 28, 'The Oregon Trail, which begins in Missouri and travels through parts of the states of Kansas, Nebraska, Wyoming, and Idaho ends in Oregon City, Oregon. ', '2004-06-10 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1627, 28, 'Mt. Mazama exploded about 7,000 years ago. The explosion left a large crater that gradually filled to form Crater Lake.', '2004-06-11 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1628, 28, 'Multnomah Falls, near Troutdale, Oregon, is the second tallest waterfall in the United States. It is in the Columbia Gorge along the Columbia River. ', '2004-06-12 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1629, 28, 'Eastern Oregon is the home of the John Day Fossil Beds. It is made up of three units, Painted Hills, Sheep Rock, and the Clarno Formation.', '2004-06-13 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1630, 28, 'Fort Clatsop, near Astoria, Oregon, was the last encampment of the Lewis and Clark Expedition before their return trip to St. Louis, Missouri.', '2004-06-14 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1631, 28, 'Delaware has several nicknames, "The Diamond State, the Blue Hen State, Small Wonder and The First State." Delaware was the first colony to ratify the Constitution of the new United States, so became the first state.', '2004-06-15 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1632, 28, 'The state of Delaware has only three counties, New Castle, Kent, and Sussex. No other state has fewer counties.', '2004-06-16 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1633, 28, 'Delaware has the lowest average elevation of any state in the United States.', '2004-06-17 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1634, 28, 'Dover Air Force Base, near Dover, Delaware is one of the largest Air Force bases in the country, but Delaware has no commercial air service.', '2004-06-18 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1635, 28, 'From the Delaware Memorial Bridge, you can see the Philadelphia skyline, Wilmington, Delaware, Salem, New Jersey.', '2004-06-19 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1636, 28, 'Delaware is the only state without a National Park, National Forest, or National Monument.', '2004-06-20 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1637, 28, 'The southernmost point in the continental United States is Ballast Key, Florida.', '2004-06-21 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1638, 28, 'The "Chinook State" and the "Evergreen State" are nicknames for Washington.', '2004-06-22 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1639, 28, 'The world''s largest building, Boeing''s final assembly plant, is located in Everett, Washington.', '2004-06-23 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1640, 28, 'Washington is home to four of the five longest floating bridges in the world: the Evergreen Point Floating Bridge, Lacey V. Murrow Memorial Bridge and Homer M. Hadley Bridge all spanning Lake Washington, and the Hood Canal Bridge which connects the Olympic Peninsula and Kitsap Peninsula.', '2004-06-24 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1641, 28, 'The only rainforest in the United States is the Hoh Rain Forest on the Olympic Peninsula in western Washington.', '2004-06-25 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1642, 28, 'Mt. Rainer, the highest mountain in Washington state is covered with more glacial ice than any other peak in the lower 48 states.', '2004-06-26 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1643, 28, 'The Puget Sound area in western Washington has the largest ferry system in the United States.', '2004-06-27 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1644, 28, 'The Northwestern most point in the contiguous United States is Cape Flattery on Washington''s Olympic Peninsula. ', '2004-06-28 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1645, 28, 'On Sunday May 18, 1980 Mt. St. Helens in west central Washington state erupted causing the largest landslide in the history of the United States. It swept away 1300 feet at the summit of the mountain.', '2004-06-29 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1646, 28, 'The Grand Coulee Dam on the Columbia River in Washington state is the largest dam in the United States.', '2004-06-30 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1647, 28, 'Kentucky is also called the "Bluegrass State".', '2004-07-01 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1648, 28, 'Hodgenville, in Hardin County (now Larue County), Kentucky is the birthplace of Abraham Lincoln. ', '2004-07-02 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1649, 28, 'The longest cave system in the world is Mammoth Cave, located in south central Kentucky.', '2004-07-03 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1650, 28, 'The original name of Liberty Island was Bedloe''s Island. It was renamed when the Statue of Liberty was erected there.', '2004-07-04 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1651, 28, 'There are several cities in Kentucky that share their name with famous world cities, London, Paris, and Cairo. Do you know where the more famous cities with these names are located?', '2004-07-05 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1652, 28, 'Many states have towns with unusual names. Some towns you will find in Kentucky include; Monkeys Eyebrow, Dwarf, Eighty-Eight, Mousie, Paint Lick, Bug, Rabbit Hash, Stay, and Science Hill.', '2004-07-06 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1653, 28, 'The largest man-made lake, in water volume, east of the Mississippi River is Lake Cumberland, located in southeastern Kentucky. The largest lake in surface area is Kentucky Lake in the southwestern part of the state.', '2004-07-07 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1654, 28, 'The Cumberland Gap, located just north of the spot where Kentucky, Tennessee, and Virginia meet is a pass through the Cumberland Mountains that was one of the key passages through the lower Appalachian Mountains. It was widened by a team led by Daniel Boone.', '2004-07-08 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1655, 28, 'Cumberland Falls is sometimes called the Little Niagara. It is a large waterfall on the Cumberland River in southeastern Kentucky. It is one of a very few places where you can see a "moonbow", a lunar rainbow that can only occasionally be seen on a clear night.', '2004-07-09 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1656, 28, 'Natural Bridge State Park in Powell County, Kentucky, is home to a natural sandstone arch that is 65 feet height and 78 feet across. This bridge was formed by the forces of nature over the years.', '2004-07-10 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1657, 28, 'Hillerich & Bradsby Company is located in Louisville, Kentucky. They are the home of the Louisville Slugger baseball bat.', '2004-07-11 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1658, 28, 'The "Aloha State" and the "Pineapple State" are the nicknames of our 50th state, Hawaii.', '2004-07-12 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1659, 28, 'Hawaii is the wettest state. It averages over 63 inches of precipitation a year. That''s over 5 feet!', '2004-07-13 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1660, 28, 'From east to west, Hawaii is the widest state in the United States. It is 1,500 miles from the east side of the easternmost island, Niihau to the west side of the westernmost island, Hawaii.', '2004-07-14 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1661, 28, 'The wettest spot on earth is Waialeale Mountain on the island of Kauai, Hawaii. It averages 488 inches of rain per year.', '2004-07-15 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1662, 28, 'Iolani Palace, the only royal palace in the United States is in Honolulu on the island of Oahu, Hawaii.', '2004-07-16 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1663, 28, 'The Parker Ranch, near Kamuela, Hawaii is the largest contiguous ranch in the United States.', '2004-07-17 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1664, 28, 'Haleakala Crater (Ha-lay-ah-ja-lah) on the island of Maui, Hawaii, is the world''s largest dormant volcano.', '2004-07-18 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1665, 28, 'Molokai, Hawaii is home to the world''s highest sea cliffs. ', '2004-07-19 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1666, 28, 'Hulopoe Bay on the island of Lanai, Hawaii is a marine preserve and considered one of the best diving spots in the world.', '2004-07-20 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1667, 28, 'Kilauea volcano on the island of Hawaii is the world''s largest and most active volcano.', '2004-07-21 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1668, 28, 'Mauna Kea, on the island of Hawaii, is the tallest mountain in the world if measured from its base at the ocean floor.', '2004-07-22 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1669, 28, 'Hawaii is the only state in the United States that does not have a straight line in any of its state boundaries.', '2004-07-23 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1670, 28, 'Utah is known as the "Beehive State".', '2004-07-24 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1671, 28, 'Zion, Bryce, Arches, Canyonlands, and Capitol Reef National Parks are all located in Utah.', NULL, 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1672, 28, 'Rainbow Bridge, nature''s abstract sculpture carved of solid sandstone, is the world''s largest natural-rock span. It stands 278 feet wide and 309 feet high. It is located in Glen Canyon National Recreation Area in southern Utah.', '2004-07-26 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1673, 28, 'There are seven national monuments in Utah, Cedar Breaks, Natural Bridges, Dinosaur, Rainbow Bridge, Grand Staircase-Escalante, Timpanogos Cave and Hovenweep.', '2004-07-27 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1674, 28, 'Northwestern Utah is the home of the Bonneville Salt Flats. This is a 159 square mile remnant of the ancient Lake Bonneville. Salt is 6 feet deep in many areas.', '2004-07-28 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1675, 28, 'The Bingham Canyon Mine in southwest Salt Lake City, Utah is among the world''s largest open pit mines.', '2004-07-29 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1676, 28, 'On average, Utah''s mountain peaks are the tallest in the country. The average elevation of the tallest peaks in each of Utah''s counties is over 11,000 feet higher than the same average in any other state.', '2004-07-30 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1677, 28, 'The Great Salt Lake covers 2,100 square miles, with an average depth of 13 feet. The deepest point is 34 feet.', '2004-07-31 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1678, 28, 'Colorado became a state the same year the United States celebrated it''s 100th birthday. This is why it''s nickname is "The Centennial State". Centennial means 100th anniversary.', '2004-08-01 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1679, 28, 'The world''s largest flat-top mountain is Grand Mesa, near Grand Junction in western Colorado.', '2004-08-02 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1680, 28, 'The highest paved road in North America is the "Road to Mt. Evans" off of I-70 from Idaho Springs, Colorado. The road climbs up to 14,258 feet above sea level. ', '2004-08-03 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1681, 28, 'Colfax Avenue in Denver, Colorado is the longest continuous street in America. ', '2004-08-04 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1682, 28, 'The highest suspension bridge in the world is over the Royal Gorge near Canon City, Colorado. The Royal Gorge Bridge spans the Arkansas River at a height of 1,053 feet. ', '2004-08-05 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1683, 28, 'The Dwight Eisenhower Memorial Tunnel between Clear Creek & Summit counties is the highest auto tunnel in the world. Bored at an elevation of 11,000 feet under the Continental Divide it is 8,960 feet long.', '2004-08-06 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1684, 28, 'The highest peak in the Rocky Mountains is Mt. Elbert (14,440 feet). Mt. Elbert is located in west central Colorado, just south of Aspen.', '2004-08-07 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1685, 28, 'Colorado Springs, Colorado is the home of the United States Air Force Academy.', '2004-08-08 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1686, 28, 'Colorado, Wyoming, and Utah are the only three states in the United States that have only lines of latitude and longitude for boundaries and that have no natural borders.', '2004-08-09 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1687, 28, 'Massachusetts has two nicknames, the "Bay State" and the "Old Colony State".', '2004-08-10 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1688, 28, 'The Boston Common in Boston, Massachusetts was the first public park in the United States.', '2004-08-11 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1689, 28, 'Harvard University, in Cambridge, Massachusetts, was the first college established in the United States (1636).', '2004-08-12 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1690, 28, 'The Mather School, the first public elementary school in America was founded in Dorchester, Massachusetts. The first public school in the United States was Boston Latin School, in Boston, Massachusetts. ', '2004-08-13 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1691, 28, 'The oldest, continually used church in the United States is the Old Ship Church in Hingham, Massachusetts.', '2004-08-14 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1692, 28, 'The Boston University Bridge on Commonwealth Avenue in Boston, Massachusetts is the only place in the world where a boat can sail under a train driving under a car driving under an airplane. ', '2004-08-15 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1693, 28, 'Boston, Massachusetts is home to the first public transportation system in the Unites States. The Massachusetts Bay Transportation Authority (MBTA) was built in 1897 and still runs today.', '2004-08-16 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1694, 28, 'The first public beach in the United States is Revere Beach in Revere, Massachusetts.', '2004-08-17 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1695, 28, 'Nathaniel Hawthorne''s "House of Seven Gables" is located in Salem, Massachusetts.', '2004-08-18 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1696, 28, 'The "Peace Garden State", the "Flickertail State", and the "Roughrider State" are all nicknames for North Dakota.', '2004-08-19 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1697, 28, 'More sunflowers are grown in North Dakota than in any other state.', '2004-08-20 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1698, 28, 'The International Peace Garden straddles the International Boundary between North Dakota and the Canadian province of Manitoba. It is in north central North Dakota, near Bottineau.', '2004-08-21 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1699, 28, 'The World''s Largest Buffalo monument is located at Frontier Village in Jamestown, North Dakota. The structure is 26 feet high, 46 feet long, and weighs 60 ton.', '2004-08-22 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1700, 28, 'The Enchanted Highway is a 32 mile stretch of I-94 through the southwestern part of North Dakota. The world''s largest collection of scrap metal sculptures are displayed long the road between Regent and Gladstone, North Dakota.', '2004-08-23 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1701, 28, 'Rugby in Pierce County, North Dakota is the geographic center of North America. A rock obelisk about 15 feet tall, flanked by poles flying the United States and Canadian flags marks the location. What is an obelisk?', '2004-08-24 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1702, 28, 'The "Cornhusker State" is Nebraska''s nickname.', '2004-08-25 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1703, 28, 'The Lied Jungle located in Omaha, Nebraska is the world''s largest indoor rain forest. ', '2004-08-26 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1704, 28, 'Chimney Rock, in western Nebraska''s Morrill County is a prominent rock formation that served as a landmark for travelers on the Oregon Trail, the California Trail and the Mormon Trail. It is considered to be the place "where the West begins." ', '2004-08-27 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1705, 28, 'Nebraska has the U.S.''s largest aquifer (underground lake/water supply), the Ogallala aquifer. ', '2004-08-28 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1706, 28, 'The world''s largest hand-planted forest is Halsey National Forrest near Thedford, Nebraska. ', '2004-08-29 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1707, 28, 'The world''s largest train yard, Union Pacific''s Bailey Yard, is located in North Platte, Nebraska.', '2004-08-30 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1708, 28, 'Tornado Alley is a term used to describe the area between the Rocky Mountains and the Appalachian Mountains where tornadoes occur most often.', '2004-08-31 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1709, 28, 'All 50 states have a nickname. Do you know the nickname of your state? Arizona has 2, the "Grand Canyon State" and the "Copper State".', '2004-09-01 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1710, 28, 'You can find the original London Bridge in Lake Havasu City, Arizona, along the Colorado River bordering California.', '2004-09-02 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1711, 28, 'The largest solar telescope in the world is located at Kitts Peak National Observatory in the city of Sells, Arizona. ', '2004-09-03 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1712, 28, 'The capital of the Navajo Indian Nation is in Window Rock, Arizona. The Navajo Reservation covers the northeastern corner of Arizona. It overlaps into Utah, Colorado, and New Mexico. The Hopi Reservation is an island in the middle of the Navajo Reservation.', '2004-09-04 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1713, 28, 'The Grand Canyon is a colorful, steep-sided gorge, carved by the Colorado River, in northern Arizona. The canyon is one of the seven natural wonders of the world and is largely contained in the Grand Canyon National Parkone of the first national parks in the United States.', '2004-09-05 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1714, 28, 'Arizona is home to one of the most well-preserved meteorite impact sites in the world. The Barringer Meteorite Crater (better known simply as "Meteor Crater") is a gigantic hole in the middle of the high plains of the Colorado Plateau, about 25miles west of Winslow. A rim of smashed and jumbled boulders stands 150feet above the level of the surrounding plain. The crater itself is nearly a mile wide, and 570feet deep', '2004-09-06 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1715, 28, 'The community in North America where people have lived continuously is Oraibi, on the Hopi Indian Reservation in northern Arizona. People have been living these since around 1100 AD.', '2004-09-07 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1716, 28, 'Canyon De Chelly National Monument in northeastern Arizona is the only National Park, Forest or Monument that is within the boundaries of the Navajo Nation. There are three major canyons at the monument, Canyon de Chelly, Canyon del Muerto, and Monument Canyon.', '2004-09-08 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1717, 28, 'Tubac, in southern Arizona was the original Spanish colonial garrison. It was established as a Spanish presidio or fort. ', '2004-09-09 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1718, 28, 'Cyclones, hurricanes, and typhoons are the same kind of tropical storm. They are just called by different names in different parts of the world. They are violent circular storms with lots of rain that start in the tropical waters. In the Atlantic Ocean, they are called hurricanes. They are called cyclones in the Indian Ocean and typhoons in the Pacific Ocean.', '2004-09-10 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1719, 28, 'Hawaii is the state at greatest risk for a tsunami (pronounced soo-nahm-ee), which is a series of huge waves that happen after an undersea disturbance, such as an earthquake or volcano eruption. Alaska, California, Oregon, and Washington can also experience these storms.', '2004-09-11 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1720, 28, '"Little Rhody" and the "Ocean State" are nicknames for Rhode Island.', '2004-09-12 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1721, 28, 'The oldest carousel in the United States is the Flying Horse Carousel in the resort town of Watch Hill, Rhode Island.', '2004-09-13 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1722, 28, 'Pawtuxet Village in Warwick, Rhode Island is New Englands oldest village. ', '2004-09-14 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1723, 28, 'Portsmouth, Rhode Island is home to the oldest schoolhouse in the United States. It was built in 1716. ', '2004-09-15 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1724, 28, 'Nine Men''s Misery monument in Cumberland, Rhode Island is the oldest known monument to veterans in the United States. It was erected in memory of the colonists killed in Pierce''s Fight during King Phillips War in 1676. ', '2004-09-16 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1725, 28, 'During the Civil War, Newport, Rhode Island was the home of the U.S. Naval Academy. Newport was also the summer home for Presidents Dwight Eisenhower and John F. Kennedy. ', '2004-09-17 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1726, 28, 'Rhode Island is the only place in the world where the rock, Cumberlandite is found.', '2004-09-18 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1727, 28, 'A Narragansett Indian village in the Great Swamp of southern Rhode Island was the scene of the largest battle during King Philip''s War.', '2004-09-19 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1728, 28, 'Alabama is known as the Yellowhammer State, the Heart of Dixie, and the Camellia State.', '2004-09-20 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1729, 28, 'Huntsville, Alabama is the rocket capital of the world. NASA''s George C. Marshall Space Flight Center, and the U.S. Space & Rocket Center/U.S. Space Camp are located in Huntsville, Alabama.', '2004-09-21 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1730, 28, 'The Tuskegee Institute National Historic Site, located in Tuskegee, Alabama includes a number of points of interest, The Oak''s (home of Booker T. Washington) the George Washington Carver Museum, the Tuskegee Institute itself. Nearby is the Tuskegee Airmen National Historic Site.', '2004-09-22 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1731, 28, '"Natural Bridge" rock, the longest natural bridge east of the Rockies is located just south of Haleyville, (Winston County) Alabama.', '2004-09-23 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1732, 28, 'Selma, Alabama is the focal point for desegregation and voting rights campaigns for the Civil Rights Movement in the 1960''s.', '2004-09-24 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1733, 28, 'Ivy Green, the birthplace of Helen Keller is located in Tuscumbia, in the northwestern corner of Alabama.', '2004-09-25 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1734, 28, 'The first capital of the Confederacy (Civil War) was Montgomery, Alabama.', '2004-09-26 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1735, 28, 'The first wave pool in America is at Point Mallard Park in Decatur, Alabama.', '2004-09-27 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1736, 28, 'Connecticut is sometimes called the "Constitution" State, the "Nutmeg" State or the "Provision" State.', '2004-09-28 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1737, 28, 'The Long Island Sound forms the southern border of Connecticut.', '2004-09-29 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1738, 28, 'The Southwick Jog or Granby Notch is an area of Massachusetts that extends into the northern boundary of Connecticut. It is about 2.5 miles wide and 2.5 miles long. ', '2004-09-30 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1739, 28, 'The Scoville Memorial Library, located in Salisbury, Connecticut, is the oldest publicly funded library in the United States. ', '2004-10-01 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1740, 28, 'Orange, Connecticut is the U. S. home of Pez candy.', '2004-10-02 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1741, 28, 'The "Hartford Courant" of Hartford, Connecticut is the oldest newspaper in the United States that is still being published. ', '2004-10-03 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1742, 28, 'The Submarine Force Museum, the official submarine museum of the United States Navy is located in Groton, Connecticut.', '2004-10-04 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1743, 28, 'A nickname for North Carolina is The "Tar Heel State".', '2004-10-05 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1744, 28, 'Kill Devil Hill near Kitty Hawk, North Carolina was the site of the first successful powered flight by Orville and Wilbur Wright.', '2004-10-06 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1745, 28, 'The highest waterfall in the eastern half of the United States is Whitewater Falls in Transylvania County, North Carolina.', '2004-10-07 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1746, 28, 'The first English colony in America was located on Roanoke Island, in Dare County near the coast of North Carolina.', '2004-10-08 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1747, 28, 'North Carolina has more miles of state highway than any other state. It currently has over 77,000 miles.', '2004-10-09 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1748, 28, 'The Outer Banks of North Carolina is a 200 mile long string of narrow barrier islands in the Atlantic Ocean. They cover about half of the northern North Carolina coastline.', '2004-10-10 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1749, 28, 'Oklahoma is the "Sooner State". What are "Sooners"?', '2004-10-11 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1750, 28, 'Talequah, Oklahoma is the Tribal capital of the Cherokee Nation.', '2004-10-12 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1751, 28, 'The Pensacola Dam was built in 1940 and is still the World''s Longest Multiple Arch Dam. It is located on the south shore of Grand Lake of the Cherokees between Langley and Disney, Oklahoma.', '2004-10-13 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1752, 28, 'WKY Radio in Oklahoma City, Oklahoma was the first radio station transmitting from west of the Mississippi River.', '2004-10-14 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1753, 28, 'There are more man-made lakes in Oklahoma than in any other state in the union, over one million acres.', '2004-10-15 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1754, 28, 'The "Cherokee Trail of Tears" ends in what is Tahlequah, Oklahoma today.', '2004-10-16 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1755, 28, 'Oklahoma City is the home of the National Cowboy Hall of Fame, a part of the National Cowboy and Western Heritage Museum.', '2004-10-17 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1756, 28, 'The "Land of Lincoln" and the "Prairie State" are the two nicknames for Illinois.', '2004-10-18 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1757, 28, 'The world''s first skyscraper, the ten story Home Insurance Building, was built in Chicago, Illinois. ', '2004-10-19 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1758, 28, 'The world''s largest public library is the Chicago Public Library in Chicago, Illinois.', '2004-10-20 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1759, 28, 'The Abraham Lincoln Presidential Library and Museum in Springfield, Illinois is the largest presidential library in the United States.', '2004-10-21 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1760, 28, 'Des Plaines, Illinois is the home of the first McDonald''s fast food restaurant.', '2004-10-22 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1761, 28, 'The Post Office on West Van Buren Street in Chicago, Illinois is the only postal facility in the world you can drive a car through.', '2004-10-23 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1762, 28, 'Evanston, Illinois gave the ice cream sundae it''s name.', '2004-10-24 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1763, 28, 'The first indoor inland aquarium with a permanent saltwater fish collection was built in Chicago, Illinois.', '2004-10-25 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1764, 28, 'The "Pine Tree State" is the official nickname of Maine.', '2004-10-26 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1765, 28, 'The easternmost point in the United States is West Quoddy Head, Maine.', '2004-10-27 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1766, 28, 'The state of Maine produces 99% of all of the blueberries in the United States.', '2004-10-28 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1767, 28, 'The first city in the United States to be incorporated was York, Maine. It is in the far southern tip of the state. ', '2004-10-29 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1768, 28, 'The easternmost city in the United States is Eastport, Maine. It is the first place in the U.S. to see the rays of the morning sun.', '2004-10-30 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1769, 28, 'Maine is the only state to border only one other state, New Hampshire. The rest of Maine''s borders include the Atlantic Ocean and two provinces of Canada.', '2004-10-31 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1770, 28, 'Mount Katahdin in central Maine (in Baxter State Park) is the northern end of the Appalachian Trail. (Springer Mountain, Georgia is the southern end.)', '2004-11-01 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1771, 28, 'Between Deer Island, New Brunswick, Canada and Moose Island off the coast of Eastport, Maine is the largest tidal whirlpool in the Western Hemisphere. It is called "Old Sow" because of the pig-like noises it makes while churning..', '2004-11-02 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1772, 28, 'The only fjord on the eastern seaboard is Somes Sound, a body of water running deep into Mount Desert Island off the coast of Maine.', '2004-11-03 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1773, 28, 'Missouri is known as the "Show-Me State". Sometimes it is also called the "Ozark State" or the "Mother of the West".', '2004-11-04 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1774, 28, 'Annapolis, Missouri survived the most destructive tornado on record.', '2004-11-05 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1775, 28, 'There are more fountains in Kansas City, Missouri than any city in the world, except Rome, Italy.', '2004-11-06 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1776, 28, 'St. Louis University is the oldest university west of the Mississippi River.', '2004-11-07 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1777, 28, 'New Madrid, Missouri was the epicenter of the most powerful earthquake to ever strike the United States. It shook more than one million square miles and was felt 1,000 miles away.', '2004-11-08 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1778, 28, 'St. Louis, Missouri earned it''s nickname, "Gateway to the West" partly because it served as the starting point and the return destination for the Lewis and Clark Expedition.', '2004-11-09 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1779, 28, 'The tallest monument in the United States is the St. Louis Gateway Arch. It is 630 feet tall.', '2004-11-10 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1780, 28, 'Wyoming is called the "Equality State" or the "Cowboy State".', '2004-11-11 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1781, 28, 'Yellowstone National Park which lies primarily in northwestern Wyoming was the first National Park. It was established in 1872.', '2004-11-12 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1782, 28, 'Wyoming produces more coal than any other state in the U.S.', '2004-11-13 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1783, 28, 'Devil''s Tower, near Sundance in northwestern Wyoming was the first declared National Monument.', '2004-11-14 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1784, 28, 'The Wind River in west central Wyoming is unusual because it becomes the Bighorn River midstream, at the Wedding of the Waters, on the north side of the Wind River Canyon.', '2004-11-15 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1785, 28, 'The Teton Mountain Range in western Wyoming is a unlike most other mountain ranges because there are not foothills or lower peaks to block the view. The Tetons rise sharply from 5,000 to almost 7,000 feet above the surrounding land.', '2004-11-16 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1786, 28, 'The most famous geyser in the world is "Old Faithful Geyser". It is located in the Upper Geyser Basin of Yellowstone National Park in northwestern Wyoming.', '2004-11-17 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1787, 28, 'Mississippi''s nickname is the "Magnolia State".', '2004-11-18 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1788, 28, 'The first Confederate monument is in Liberty, Mississippi.', '2004-11-19 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1789, 28, 'The world''s largest cottonwood tree plantation is in Issaquena County, Mississippi.', '2004-11-20 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1790, 28, 'The oldest permanent settlement on the Mississippi River, Natchez, Mississippi was settled in 1716.', '2004-11-21 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1791, 28, 'A hunting trip to Sharkey County, Mississippi produced the "Teddy Bear", when President Theodore Roosevelt refused to shoot a captured bear.', '2004-11-22 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1792, 28, 'Natchez Trace Parkway runs from Natchez, Mississippi to just south of Nashville, Tennessee that began as an Indian trail over 8,000 years ago. It was later used by European explorers.', '2004-11-23 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1793, 28, 'The Vicksburg National Cemetery, in Vicksburg, Mississippi, is the second largest national cemetery in the country. Arlington National Cemetery in Arlington, Virginia is the largest. ', '2004-11-24 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1794, 28, 'Tennessee is proudly known as the "Volunteer State".', '2004-11-25 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1795, 28, 'The Knobs is the name of a ridge of mountains in the southwest Smoky mountains. They are located in Tennessee.', '2004-11-26 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1796, 28, 'The Green County Courthouse in Greenville, Tennessee is home to the only monument honoring both the Union and Confederate armies.', '2004-11-27 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1797, 28, 'The Tennessee Aquarium in Chattanooga, Tennessee is the largest aquarium to focus on fresh water habitat.', '2004-11-28 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1798, 28, 'The Lost Sea in Sweetwater, Tennessee is the largest underground lake in the United States.', '2004-11-29 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1799, 28, 'Centennial Park in Nashville, Tennessee is home to a full-scale replica of the Greek Parthenon.', '2004-11-30 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1800, 28, 'Maryland''s nicknames are "The Old Line State" and the "Free State".', '2004-12-01 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1801, 28, 'The Bollman Truss Railroad Bridge in Savage is the only open railroad bridge of its type anywhere in the world, made of both cast iron and wrought iron. ', '2004-12-02 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1802, 28, 'Riverside Park in Cumberland, Maryland was the location of George Washington''s headquarters during the Revolutionary War.', '2004-12-03 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1803, 28, 'Every year wild horses are rounded up on Assateague Island off the coast of southeastern Maryland and waded across a shallow bay to Chincoteague Island, Virginia.', '2004-12-04 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1804, 28, 'Fort McHenry, in the harbor of Baltimore, Maryland was the inspiration for Francis Scott Key to compose the national anthem of the United States, the "Star Spangled Banner".', '2004-12-05 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1805, 28, 'The United States Naval Academy is in Annapolis, Maryland, which is located on the far eastern shore of Western Maryland, on the Chesapeake Bay.', '2004-12-06 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1806, 28, 'Ft. Frederick State Park in Washington County, Maryland is home to Fort Frederick, the last remaining British stone fort in North America.', '2004-12-07 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1807, 28, 'Antietam and Sharpsburg, Maryland were the location for the bloodiest battle of the War Between the States (Civil War).', '2004-12-08 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1808, 28, 'The "Empire State" refers to New York.', '2004-12-09 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1809, 28, 'The longest toll road in the United States is the 642 mile Governor Thomas E. Dewey Thruway in New York State. It extends from the Pennsylvania / New York border east to Albany, New York and south to New York City.', '2004-12-10 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1810, 28, 'The world''s smallest church, at 3.5 feet by 6 feet, is in Oneida, New York.', '2004-12-11 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1811, 28, 'The Genesee River in western New York State is unusual because it flows south to north instead of north to south like most rivers. Its source is in Ulysses, Pennsylvania and it flows north and empties into Lake Ontario in Rochester, New York.', '2004-12-12 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1812, 28, 'Adirondack Park, covering much of northeastern New York State, is larger than Yellowstone, Yosemite, Grand Canyon, Glacier, and Olympic Parks combined. ', '2004-12-13 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1813, 28, 'New York Harbor which sits between New York City, New York and New Jersey is home to both Ellis Island and Liberty Island, home of the Statue of Liberty.', '2004-12-14 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1814, 28, 'The United States Military Academy at West Point, New York is the oldest of the five military academies. They are often called service academies. Two that are often overlooked include the United States Coast Guard Academy in New London, Connecticut and the United States Merchant Marine Academy, located in Kings Point, New York. ', '2004-12-15 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1815, 28, 'The largest train station in the world is called Grand Central Station. It is located in New York City, New York.', '2004-12-16 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1816, 28, 'The grounds of the United Nations are surrounded by New York City, New York, but the grounds themselves are international territory, belonging to no one country.', '2004-12-17 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1817, 28, 'Goat Island is a small uninhabited island in the Niagara River. It separates Bridal Veil Falls and Horseshoe Falls. Bridal Veil Falls is the smaller of the two major waterfalls that we call Niagara Falls. Horseshoe Falls is on the Canadian side of the border. ', '2004-12-18 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1818, 28, 'Indiana is called the "Hoosier State". ', '2004-12-19 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1819, 28, 'Fountain City in Wayne County, Indiana was known as the "Grand Central Station of the Underground Railroad." More than 2,000 runaway slaves were provided lodging while making their way north to freedom.', '2004-12-20 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1820, 28, 'The Wabash River, which splits Indiana in two runs from northeast to southwest. It is the longest free-flowing river east of the Mississippi River. This means there are no dams blocking over 400 miles of the 475 mile long river.', '2004-12-21 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1821, 28, 'The "Brickyard" is the nickname of the Indianapolis Motor Speedway, home of the Indianapolis 550.', '2004-12-22 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1822, 28, 'Wabash, Indiana was the home to the first electric street lights.', '2004-12-23 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1823, 28, 'In addition to Bethlehem in Palestine, there is also Bethlehem, Pennsylvania (eastern PA) and Bethlehem, New York in Albany County.', '2004-12-24 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1824, 28, 'Santa Claus, Indiana receives over one half million letters and requests at Christmas time. ', '2004-12-25 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1825, 28, 'The "Mother of Modern Presidents" and the "Buckeye State" are both names for Ohio. Do you know how many presidents were born in Ohio?', '2004-12-26 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1826, 28, 'The Y Bridge in Zanesville, Ohio spans the confluence of the Licking and Muskingum Rivers. It is the only bridge in the world you can cross and still be on the same side of the river. ', '2004-12-27 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1827, 28, 'Cincinnati, Ohio is home to the first professional baseball team, the Cincinnati Red Stockings (Red Sox).', '2004-12-28 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1828, 28, 'The Pro Football Hall of Fame is found in Canton, Ohio.', '2004-12-29 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1829, 28, 'Most of the Ohio River, which forms the southern boundary of Ohio belongs to Kentucky and West Virginia.', '2004-12-30 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1830, 28, 'The oldest continually operating lighthouse on the Great Lakes is found in Marblehead Lighthouse State Park in northwestern Ohio.', '2004-12-31 00:00:00.000', 1, '2010-01-07 14:46:34.737')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1831, 29, 'America''s day begins on Wake Island. It is the U.S. territory closest to the International Date Line.', '2004-01-01 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1832, 29, 'Which world city has the most people? Tokyo, Japan', '2004-01-02 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1833, 29, 'Canada is the world''s second largest country by total area. It''s border with the United States to its south and northwest is the world''s longest.', '2004-01-03 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1834, 29, 'All of the Hawaiian islands were formed by volcanoes erupting from the sea floor.', '2004-01-04 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1835, 29, 'The only natural habitat for polar bears is the Arctic Region. It is the only place you can find them in the wild.', '2004-01-05 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1836, 29, 'Russia, the world''s largest country by landmass, is the only country that sits on two continents, Europe and Asia. Sometimes you hear it called "Eurasian". Over 70% of the country is in Asia.', '2004-01-06 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1837, 29, 'If California were a country, it would rank among the ten largest economies in the world, with a GDP similar to that of Italy. It would be the 35th most populous country.', '2004-01-07 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1838, 29, 'Over 25% of all the independent countries in the world are on one continent, Africa.', '2004-01-08 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1839, 29, 'Denmark''s largest colony is Greenland. Contrary to its name, 80% of the landmass is ice.', '2004-01-09 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1840, 29, 'The Falkland Islands off the coast of Argentina were the site of an invasion and war between that country and Great Britain.', '2004-01-10 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1841, 29, 'Button Bay, on the east shore of Lake Champlain, outside of Vergennes, Vermont features small stone-like clay formations that look remarkably like buttons.', '2004-01-11 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1842, 29, 'The famous statue of "The Little Mermaid" sits on top of a rock in Langelineje Bay in Copenhagen, Denmark.', '2004-01-12 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1843, 29, 'The most well-known of the mountains in the Alps is the Matterhorn. You would find it in Valais canton, Switzerland.', '2004-01-13 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1844, 29, 'Versailles Palace in a suburb of Paris, France is the home of lavish gardens, statuary, watercourses, and fountains. ', '2004-01-14 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1845, 29, 'The largest cave chamber in the world is located in the Sarawak Chamber in Malaysia.', '2004-01-15 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1846, 29, 'The Channel Islands of Guernsey and Jersey and the Isle of Man in the Irish Sea are part of the Greater United Kingdom and considered part of the British Isles.', '2004-01-16 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1847, 29, 'The Yangtze River is the longest river in the world whose drainage basin is located entirely within only one country. In other words, it is located only in one country, China.', '2004-01-17 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1848, 29, 'The two smallest countries in the world are Monaco at .75 square miles and Vatican City at .15 square miles. Monaco is bordered by France on three sides and the Mediterranean Sea of the other. Vatican City is sovereign city-state whose territory consists of a walled enclave within the city of Rome, Italy.', '2004-01-18 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1849, 29, 'The Java Trench, also called the Sunda Trench, located in the northeastern Indian Ocean is the deepest point in the Indian Ocean. It is part of the Pacific Ring of Fire.', '2004-01-19 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1850, 29, 'The highest mountain on Earth is Mt. Everest. It is part of the Himalaya range in Asia. It sits on the border of Nepal and Tibet.', '2004-01-20 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1851, 29, 'K2, the second highest mountain on Earth is also called the Savage Mountain because it is so difficult to ascent. No one has ever reached the summit of K2 in the winter. It is located in the Karakoram mountain range, on the border between China and Pakistan.', '2004-01-21 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1852, 29, 'Ireland Island is the northwestern-most island in the Bermuda island chain. It is located in the North Atlantic ocean off the east coast of the south central United States. Ireland island was used by the British Royal Navy from 1812 until 1995.', '2004-01-22 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1853, 29, 'The largest country in Africa is Sudan. It is located in northeastern Africa, just south of Egypt.', '2004-01-23 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1854, 29, 'Uluru, also known as Ayers Rock is one of the most recognizable natural features in the world. It is a sandstone formation that appears to change color as light strikes it at different times of the day and year. You find it in central Australia. ', '2004-01-24 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1855, 29, 'Looking at all of the countries in the world with a coastline, Monaco has the least amount of coastline, only 2.5 miles.', '2004-01-25 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1856, 29, 'Half of all the lakes in the world are located either in or on the border of Canada. Great Bear Lake is the largest that is located entirely in Canada. Lake Superior is the largest but it is on the border with the United States.', '2004-01-26 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1857, 29, 'The Galapagos Islands are a an archipelago of volcanic islands that are a territory of Ecuador. You can find them on a map by looking west of Ecuador just south of the equator.', '2004-01-27 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1858, 29, 'The largest lake in South America, by volume is also one of the highest commercially navigable lakes in the world. Lake Titicaca is located on the border of Peru and Bolivia.', '2004-01-28 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1859, 29, 'Suriname, is the smallest sovereign country in South America. This lone Dutch-speaking country on the continent, shares it southern border with Brazil and it''s northern border with the Atlantic Ocean.', '2004-01-29 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1860, 29, 'The largest landlocked country in the world is Kazakhstan. It has no borders with an ocean. It does border an especially large saltwater lake, though. One with a somewhat misleading name, the Caspian Sea.', '2004-01-30 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1861, 29, 'The largest enclosed urban park in Europe is Phoenix Park. You can visit it when you are in Dublin, Ireland. Dublin Zoo is one it it''s main attractions, along with a herd of wild Fallow deer.', '2004-01-31 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1862, 29, 'There is only one country that begins with the letter Q. Qatar is a small oval-shaped country located on a peninsula in the Persian Gulf. ', '2004-02-01 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1863, 29, 'Liechtenstein and Uzbekistan are the only two countries in the world that are double-landlocked, meaning they are landlocked and the countries that border them are all landlocked.', '2004-02-02 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1864, 29, 'The Nile is the world''s longest river. It has two great tributaries, the White Nile and the Blue Nile that join at Khartoum, Sudan. It continues flowing north through Sudan into Egypt and empties into the Mediterranean Sea. ', '2004-02-03 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1865, 29, 'The landlocked country of Lesotho is completely surrounded by South Africa.', '2004-02-04 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1866, 29, 'Catalan is the official language of Andorra, a small mountainous country in the Pyrenees Mountains. It is bordered by France on the north and by Spain on the south, so French and Spanish are also commonly spoken.', '2004-02-05 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1867, 29, 'Wounded Knee, on the Pine Ridge Indian Reservation in South Dakota is the site of the Wounded Knee Massacre.', '2004-02-06 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1868, 29, 'On the southern tip of the Malay peninsula you find the city state of Singapore. It is one of the most densely populated countries on earth, with over 4 million people living in 267 square miles.', '2004-02-07 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1869, 29, 'Liechtenstein is located on the Rhine River between Austria and Switzerland. Even though it is only 62 square miles in size, it is home to many international corporations and multiple winter Olympic medalists.', '2004-02-08 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1870, 29, 'Machu Picchu is an Incan city, high in the Andes Mountains of Peru. The elevation of Machu Picchu is over 9,000 feet!', '2004-02-09 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1871, 29, 'The cathedral in Aachen, Germany is the burial place of Charlemagne. Aachen is the westernmost city in Germany. It borders Belgium and the Netherlands.', '2004-02-10 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1872, 29, 'Pitcairn Island, located in the South Pacific, northeast of New Zealand and southeast of Tahiti, is a group of four volcanic islands best known as the home of the descendants of the HMS Bounty mutineers. It is the last remaining British overseas territory in the Pacific.', '2004-02-11 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1873, 29, 'The oldest, and biggest man-made structure on Earth is the Great Wall of China. It runs for 6, 352 miles from Shanhaiguan in the east to Lop Nur in the west, roughly along the southern boundary of Inner Mongolia. ', '2004-02-12 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1874, 29, 'The state of New Jersey has the highest urban population density in the United States. About 90% of the people live in an urban area.', '2004-02-13 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1875, 29, 'England''s Salisbury Plain is home to an ancient monument, a circle of standing stones, called Stonehenge.', '2004-02-14 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1876, 29, 'The highest uninterrupted waterfall in the world is Angel Falls in Venezuela. It falls 3,212 feet and is twenty times higher than Niagara Falls.', '2004-02-15 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1877, 29, 'The largest city in the north African country of Morocco, Casablanca, is a very important seaport on the Atlantic coast.', '2004-02-16 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1878, 29, 'New Jersey''s Passaic River is the site of the first submarine ride by inventor John P. Holland. ', '2004-02-17 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1879, 29, 'Green Island, off the coast of Cairns, Queensland Australia is home to the largest coral reef in the world, the Great Barrier Reef. It runs from Mackay, Queensland to the Torres Strait.', '2004-02-18 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1880, 29, 'If you look down while you are flying over the Nazca Desert, between Nazca and Palpa, Peru, you should see the Nazca Lines. They are a series of geoglyphs (line pictures) in the shape of people, birds, spiders, fish, and several different animals.', '2004-02-19 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1881, 29, 'Easter Island, in the South Pacific, northwest of Santiago, Chile is one of the world''s most isolated inhabited islands. It is home to over 850 monumental statues, called Moai.', '2004-02-20 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1882, 29, 'The Great Salt Lake is the largest lake to be contained within one state. It covers 2,117 square miles. ', '2004-02-21 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1883, 29, 'Water erosion due to massive floods over 13,000 years ago created the unusual sandstone formations in the area around the Wisconsin Dells.', '2004-02-22 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1884, 29, 'The natural habitat for Emperor Penguins is Antarctica.', '2004-02-23 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1885, 29, 'Northeastern Tanzania is home to both the Serengeti National Part and Mt. Kilimanjaro, Africa''s tallest peak.', '2004-02-24 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1886, 29, 'The most populated city north of the Arctic Circle is Murmansk, in northwest Russia, It is a seaport on Kola Bay, off the Barents Sea.', '2004-02-25 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1887, 29, 'The city of Brasilia, Brazil was specifically built to be the capital of Brazil. It was built in 41 months from 1956 to April of 1960 when it was officially inaugurated.', '2004-02-26 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1888, 29, 'The Amazon River, which runs through six countries in South America including, Venezuela, Colombia, Ecuador, Peru, Bolivia, and Brazil, has more tributaries than any other river in the world.', '2004-02-27 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1889, 29, 'The lowest land point on Earth is the shore of the Dead Sea. It is over 1,270 feet below the mean sea level of the eastern Mediterranean Sea.', '2004-02-28 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1890, 29, 'Cape Three Points, on the Gulf of Guinea near Tokoradi in Ghana, West Africa is known as the Land Nearest Nowhere because it the nearest to the point where zero latitude meets zero longitude at zero altitude.', '2004-02-29 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1891, 29, 'The world''s longest glacier is Lambert Glacier in Antarctica. It is at least 250 miles long.', '2004-03-01 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1892, 29, 'Mexico City, Mexico sits on top of an underground water reservoir that is causing the city to sink into the earth at a rate of 6 to 8 inches per year.', '2004-03-02 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1893, 29, 'The driest warm spot on earth is the Atacama Desert in Chile. Parts of it went without rain for over 400 years from 1570 to 1971. (The driest spot overall may be the McMurdo Dry Valleys in Antarctica, but the studies are not definite.)', '2004-03-03 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1894, 29, 'Milford Sound in runs a bit over eight miles inland from the Tasman sea and is surrounded by sheer rock faces that rise 3, 900 feet or more on either side. You find it on the western coast of New Zealand''s South Island, within Fiordland National Park.', '2004-03-04 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1895, 29, 'The El Camino De Santiago is a pilgrimage that usually begins in Roncesvalles, France and ends in the city of Santiago de Compostela, in Spain. This walking journey is about 500 miles long.', '2004-03-05 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1896, 29, 'The Khyber Pass links Pakistan and Afghanistan. It is about 3 miles into Pakistan where it cuts through the northeastern part of the Safed Koh mountains, a part of the Hindu Kush range.', '2004-03-06 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1897, 29, 'Cabo da Roca in Portugal is the westernmost point of mainland Europe.', '2004-03-07 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1898, 29, 'Lake Michigan is the largest lake entirely within the United States. It is 57,800 square miles and borders 4 states, Michigan, Illinois, Wisconsin, Indiana.', '2004-03-08 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1899, 29, 'Looking for Babylon? It is in the country we now call Iraq.', '2004-03-09 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1900, 29, 'California has the distinction of being long enough to be both north of the southernmost point in Canada, and south of the northernmost point in Mexico.', '2004-03-10 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1901, 29, 'Madagascar, an island nation in the Indian Ocean off the southeastern coast of Africa, has over 10,000 native plants. 90% of them are found nowhere else in the world.', '2004-03-11 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1902, 29, 'The world''s southernmost capital city is Wellington, New Zealand.', '2004-03-12 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1903, 29, 'There are two places that have the name "Christmas Island". One is a territory of Australia in the Indian Ocean, about 1,600 miles northwest of Perth. The other is an atoll in the Pacific Ocean. It is also called Kiritimati and is part of the Republic of Kiribati. It is about 144 miles north of the equator and 3,330 miles southwest of San Francisco, California. Kiritimati is the first inhabited place on Earth to experience the New Year each year.', '2004-03-13 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1904, 29, 'The ABC Islands is another name for the Alaskan islands of Admiralty, Baranof, and Chichagof islands. They are located in the northern part of the Alexander Archipelago off the coast of Sitka, Alaska.', '2004-03-14 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1905, 29, 'Mt. Vinson Massif is the highest mountain in Antarctica. It is located 1500 miles from the nearest civilization and is isolated in a frozen landscape. All you can see from the summit are ice caps and glaciers fading into the distinctly curved horizon.', '2004-03-15 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1906, 29, 'Pompeii is a partially buried Roman city near Naples, Italy. Pompeii was destroyed and completely buried when the volcano Mount Vesuvius erupted in AD 79. It was rediscovered in 1748.', '2004-03-16 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1907, 29, 'Alabama shares the dubious distinction, with Kansas, of having reported more F5 tornadoes than any other state according to statistics from the National Climatic Data Center for the period January 1, 1950 to October 31, 2006.', '2004-03-17 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1908, 29, 'The Yellow Sea, the northern part of the East China Sea separates mainland China and the Korean peninsula.', '2004-03-18 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1909, 29, 'The island of New Guinea, located north of Australia, is the largest island in the Pacific Ocean and the second largest in the world. ', '2004-03-19 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1910, 29, 'The Bridge of Sighs connects the Doge''s Palace to the Piombi prison in Venice, Italy.', '2004-03-20 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1911, 29, 'The Bridge of the Americas, Miraflores Locks, Pedro Miguel lock, Culebra Cut Centennial Bridge, Chagres River, Gatun Locks and Limon Bay are all part of the Panama Canal, which joins the Caribbean Sea to the Pacific Ocean across the isthmus of Panama.', '2004-03-21 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1912, 29, 'Japan is an Asian country that includes over 3,000 islands, many uninhabited. Honshu, Shikoku,, Hokkaido, and Kyushu are the four largest islands that make up Japan. It is located on the Pacific Ring of Fire where three tectonic plates meet. This causes many minor tremors (earthquakes) and some volcanic activity.', '2004-03-22 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1913, 29, 'San Marino, located in eastern Italy, near the Adriatic coast is less than 37 square miles in size. It is surrounded on all sides by Italy.', '2004-03-23 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1914, 29, 'The Inner Hebrides are a widespread and diverse archipelago off the west coast of Scotland. They include Islay, Jura, Skye, Mull, Raasay, Staffa and the Small Isles.', '2004-03-24 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1915, 29, 'The Outer Hebrides lie to the west of the Inner Hebrides off the west coast of Scotland. These islands include, Barra, Benbecula, Berneray, Harris, Lewis, North Uist, South Uist, and St. Kilda. Together they are sometimes referred to as the "Western Isles".', '2004-03-25 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1916, 29, 'Borneo is the third largest island in the world. It is located in the South China Sea and is divided among three nations, the independent nation of Brunei, East Malaysia, and the majority of the island being part of Indonesia.', NULL, 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1917, 29, 'Fundy Bay is the natural barrier between Maine and Nova Scotia, Canada.', '2004-03-27 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1918, 29, 'Bristol, Virginia and Bristol, Tennessee are legally two different cities, each with its own government and city services, but they share the same main street.', '2004-03-28 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1919, 29, 'Baja California is both the northernmost and westernmost state in Mexico. It has two seacoasts, the Pacific Ocean on the west and the Gulf of California (also known as the Sea of Cortez) on the east.', '2004-03-29 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1920, 29, 'The city of Istanbul, formerly Constantinople sits on two continents, Europe and Asia. The two parts are divided by the Bosporus, a small strait that forms part of the boundary between the European part of Turkey, Thrace, and the Asian part of Turkey, Anatolia.', '2004-03-30 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1921, 29, 'Other than Alaska, Kentucky has more navigable miles of water than any other state. ', '2004-03-31 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1922, 29, 'The last stronghold of the Moors in Spain was the city we call Granada. It is found in southern Spain at the foot of the Sierra Nevada mountains in the autonomous community of Andalusia.', '2004-04-01 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1923, 29, 'The highest point of Brenner Pass marks the border between Austria and Italy. The major cities connected are Innsbruck, Austria and Verona, Italy.', '2004-04-02 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1924, 29, 'America''s legendary Route 66 begins in Chicago, Illinois on the east and runs through Missouri, a corner of Kansas, Oklahoma, northern Texas, across New Mexico, Arizona and ends in Los Angeles, California on the west coast.', '2004-04-03 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1925, 29, 'Corfu City is the capital of the Greek prefecture of Corfu. It is a Castle city because two castles enclose the capital.', '2004-04-04 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1926, 29, 'Khone Falls on the Mekong River in Laos near the border of Cambodia, is the widest waterfall in the world. It is 6.7 miles across.', '2004-04-05 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1927, 29, 'The Atacama desert covers about 40,600 square miles of northern Chile. It is the driest desert in the world, more than 50 times drier than Death Valley in southern California.', '2004-04-06 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1928, 29, 'The legislative chambers in Hawaii''s state capital building is shaped like a cone, so it looks like volcanoes rising out of the sea.', '2004-04-07 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1929, 29, 'Iceland, a European island country located in the North Atlantic Ocean is often called the "Land of Fire and Ice" because it has a number of active volcanoes and geysers, as well as many glaciers and glacial rivers. ', '2004-04-08 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1930, 29, 'Bahrain is a small island country in the Persian Gulf. It is east of Saudi Arabia and northwest of Qatar, across the Gulf of Bahrain. Bahrain is the smallest oil rich nation.', '2004-04-09 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1931, 29, 'The largest rainforest in Asia, the Harapan Rainforest, straddles the Jambi and South Sumatra provinces of Indonesia.', '2004-04-10 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1932, 29, 'Honshu is the largest of the islands that make up Japan. It is where you find the capital city of Tokyo, Kyoto, Osaka, Yokohama, and Hiroshima.', '2004-04-11 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1933, 29, 'The world''s largest travertine bridge is located in Tonto State Park in Arizona. ', '2004-04-12 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1934, 29, 'The Taj Mahal, in Agra India is regarded by many to be the most beautiful building in the world. It was built in memory of the wife of the Emperor Shah Jahan.', '2004-04-13 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1935, 29, 'Petronas Towers in Kuala Lumpur, Malaysia is the tallest building in the world. The CN Tower in Toronto, Ontario Canada is the tallest freestanding structure.', '2004-04-14 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1936, 29, 'Louisiana is losing about 25-35 square miles of wetland every year due to erosion of the coastal basins.', '2004-04-15 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1937, 29, 'New South Wales, Queensland, South Australia, Tasmania, Victoria, and Western Australia are the six states in the country/continent of Australia. There are also two territories in Australia, the Northern Territory, and the Capital Territory.', '2004-04-16 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1938, 29, 'Montenegro is a country located in Southeastern Europe, with a coast on the Adriatic Sea. It shares borders with Croatia to the west, Bosnia and Herzegovina to the northwest, Serbia to the northeast, Kosovo to the east and Albania to the south. Most recently it was part of Yugoslavia and gained it''s independence in 2006.', '2004-04-17 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1939, 29, 'Luzon, Philippines is home to the largest rice terraces in the world. They are contoured on the mountainous slopes on northern interior Luzon. The natives call then the "stairway to heaven".', '2004-04-18 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1940, 29, 'Sicily, home to the active volcano Mt. Etna, is the largest island in the Mediterranean Sea. It is an autonomous region of Italy. It is located off the toe of Italy''s boot.', '2004-04-19 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1941, 29, 'Taliesin, the summer home of architect Frank Lloyd Wright is in his hometown, Spring Green, Wisconsin.', '2004-04-20 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1942, 29, 'The United Arab Emirates is seven emirates, Abu Dhabi, Ajman, Dubai, Fujairah, Ras al-Khaimah, Sharjah, and Umm al-Quwain on the Persian Gulf. Emirates are territories ruled by an Arab monarch.', '2004-04-21 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1943, 29, 'Lebanon, Kansas is the geographic center of the continental United States.', '2004-04-22 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1944, 29, 'The Alhambra is a Moorish citadel and palace found in Granada, Spain. ', '2004-04-23 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1945, 29, 'The Strait of Hormuz is the only sea passage to the open ocean for most of the Persian Gulf. It connects the Persian Gulf to the Gulf of Oman, leading to the Arabian Sea and the Indian Ocean.', '2004-04-24 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1946, 29, 'Crete is the largest of the Greek islands. It lies about 96 miles south of the Greek mainland.', '2004-04-25 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1947, 29, 'Mt. Fuji is the highest mountain Japan. It is located on Honshu island along with Mount Tate and Mount Haku. They are called Japan''s "Three Holy Mountains".', '2004-04-26 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1948, 29, 'The peninsula of Musandam is what is called an exclave of Oman. It is separated from the rest of the country by a strip of the United Arab Emirates. It is strategically located on the Strait of Hormuz.', '2004-04-27 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1949, 29, 'The last major conflict between the Sioux Indians and US Troops took place in 1890 at Wounded Knee, South Dakota.', '2004-04-28 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1950, 29, 'Crescent-shaped Croatia is a south-central European nation bordered by the Adriatic Sea, Slovenia, Hungary, Serbia, Bosnia and Herzegovina and Montenegro. It is split into two non-contiguous parts by the short coastline of Bosnia and Herzegovina. Croatia was a part of Yugoslavia.', '2004-04-29 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1951, 29, 'Glacier covered Mt. Rainer in Washington state is a volcano. It last erupted in the 1840s.', '2004-04-30 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1952, 29, 'Venice is a city in northeastern Italy. It stretches across 118 small islands in the Venetian Lagoon along the Adriatic Sea. The lagoon stretches the shoreline between the mouths of the Po and Piave Rivers. You can take the train, or drive to Venice, but once there, the waterways form the only roads within the city. ', '2004-05-01 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1953, 29, 'The Valley of the Giants is a tree top walk that rises over 130 feet above the forest floor. You will find it between Denmark and Walpole in Western Australia.', '2004-05-02 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1954, 29, 'The Cliffs of Moher rise 394 feet above the Atlantic Ocean at Hag''s Head in County Clare, Ireland. They reach their maximum height of 702 feet just north of O''Brien''s Tower about 5 miles away.', '2004-05-03 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1955, 29, 'The Great Salt Lake, located in northern Utah, is the largest salt lake in the western hemisphere. It is a remnant of Lake Bonneville, a pluvial lake. It is far saltier than sea water.', '2004-05-04 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1956, 29, 'The Faroe Islands, a part of the Kingdom of Denmark, are situated between the Norwegian Sea and the North Atlantic Ocean, approximately halfway between Scotland and Iceland.', '2004-05-05 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1957, 29, 'The Gobi Desert, the largest desert region in Asia, spans parts of northern and northwestern China and southern Mongolia. It is what is known as a rain shadow desert. This is when a mountain range, the Himalayas in this case, block rain-carrying clouds from reaching the area, the Gobi.', '2004-05-06 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1958, 29, 'Sri Lanka is an island country in Southeast Asia. It is about 19 miles off the southern coast of India in the Indian Ocean. It lies southwest of the Bay of Bengal and southeast of the Arabian Sea.', '2004-05-07 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1959, 29, 'Athens, the capital of Greece is one of the world''s oldest cities. It sprawls across the central plain of Attica. It is built around a number of hills and bounded by four large mountains, Mount Aegaleo to the west, Mount Parnitha to the north, Mount Penteli to the northeast, and Mount Hymettus to the east. The Saronic Gulf lies to the southeast.', '2004-05-08 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1960, 29, 'In 1873, Budapest, the largest city and capital of Hungary became a single city, merging Buda on the right-bank of the Danube River with left-bank Pest. You can find Budapest in north central Hungary.', '2004-05-09 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1961, 29, 'Mt. Mitchell in North Carolina is the highest point in the United States, east of the Mississippi River. It is 6, 684 feet high.', '2004-05-10 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1962, 29, 'Arlington County, Virginia was originally part of the ten square mile parcel of land to be part of Washington DC.', '2004-05-11 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1963, 29, 'Kigali, Rwanda on the African continent, is built in hilly country in the center of the country. It sprawls across four ridges and the valleys between them. The city is ringed by higher hills, with the highest of these being Mt. Kigali.', '2004-05-12 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1964, 29, 'St. Petersburg is located on the Neva River at the head of the Gulf of Finland on the Baltic Sea. It is the world''s northernmost city of more than one million people.', '2004-05-13 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1965, 29, 'Hokkaido, the northernmost island of Japan is connected to Honshu, the largest of Japan''s islands by an underwater tunnel. ', '2004-05-14 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1966, 29, 'Montreal gets it''s name from the triple-peaked hill in the heart of the city. It is the largest city in the Quebec province of Canada. It sits at the confluence of the Saint Lawrence and Ottawa Rivers in southern Canada, north of the state of Vermont.', '2004-05-15 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1967, 29, 'Austria is a landlocked country in central Europe. It borders Germany and the Czech Republic to the north, Slovakia and Hungary to the east, Slovenia and Italy to the south, and Switzerland and Liechtenstein to the west. It lies primarily in the Alps, so it is mostly a mountainous country.', '2004-05-16 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1968, 29, 'Michigan has the longest freshwater shoreline of an political entity in the world, being bounded by four of the five Great Lakes plus Lake Saint Clair.', '2004-05-17 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1969, 29, 'Mt. St. Helens cleared over 150 square miles of forest and created a lava dome that stands 920 feet high when it violently exploded on May 18, 1980.', '2004-05-18 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1970, 29, 'The Philippines is a country comprised of more than 7,000 islands. It is considered an archipelago. ', '2004-05-19 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1971, 29, 'The industrial, cultural, economic, and political capital of Mexico is Mexico City. It is also the second largest metropolitan area in the Americas. It is located in the Valley of Mexico in the high plateaus at the center of Mexico.', '2004-05-20 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1972, 29, 'Based on the date of incorporation, Wayne County, Michigan is the oldest county in the United States. It was incorporated in 1815.', '2004-05-21 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1973, 29, 'The north-bending arc of the River Seine is where you will find Paris, France. It also includes two islands, Ile Saint-Louis and Ile de la Cite. Paris, the capital of France is located in northern France.', '2004-05-22 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1974, 29, 'Jakarta, capital and largest city of Indonesia is on the northwest coast of Java at the mouth of the Ciliwung River on Jakarta Bay, an inlet of the Java Sea. ', '2004-05-23 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1975, 29, 'The Isle of Capri, home of the Blue Grotto is located in the Bay of Naples off Italy''s southwestern coast.', '2004-05-24 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1976, 29, 'One of the largest long-term ecological research sites in the United States is the H.J. Andrews Experimental Forest near Blue River, Oregon. ', '2004-05-25 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1977, 29, 'Florence, the most populous city in the Tuscany region of Italy lies on the River Arno. It sits in a basin among the Senese Clavey Hills of Careggi, Fiesole, Settignano, Arcetri, Poggio Imperiale, and Bellosguardo.', '2004-05-26 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1978, 29, 'The "City of a Thousand Minarets" is the nickname of Cairo, Egypt. The present-day site of the city is in northern Egypt along the Nile River, right where it branches into the low-lying Nile Delta area,', '2004-05-27 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1979, 29, 'I-90 is the longest interstate highway in the United States. It runs over 3,111 miles from Seattle, Washington to Boston, Massachusetts.', '2004-05-28 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1980, 29, 'Puerto Rico is located in the Caribbean Sea, east of Hispaniola, and west of the Virgin Islands. Puerto Rico is an archipelago that includes the main island, Puerto Rico, and a number of smaller islands, including Vieques, Culebra, Desecheo, Cajade Muertos and Mona. There are a number of smaller islands as well. It is a self-governing territory of the United States.', '2004-05-29 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1981, 29, 'Hispaniola is a major island in the Caribbean Sea. It is about 50 miles southeast of Cuba. Two different countries reside beside each other on the island, Haiti and the Domenican Republic. Haiti resides on the western third of the island and is very mountainous. The Dominican Republic occupies the eastern two-thirds. The northern shore of the Dominican Republic is on the Atlantic Ocean with the southern shores being the Caribbean. Hispaniola, along with Puerto Rico, Cuba, and Jamaica are collectively known as the Greater Antilles. ', '2004-05-30 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1982, 29, 'Moscow, Russia is the largest metropolitan area in Europe. It is the capital of Russia and was the capital of the former Union of Soviet Socialist Republics (USSR). It is located on the Moscow River in central Russia. This is in the European part of Russia.', '2004-05-31 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1983, 29, 'The Netherlands is a low-lying country in northwestern Europe. It is bordered on the north and west by the North Sea, Belgium is to the south, and Germany to the east. Much of the country is formed by the estuary of three rivers, the Rhine, Meuse, and Scheldt.', '2004-06-01 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1984, 29, 'Vietnam is the easternmost country on the Indochina Peninsula of Southeast Asia. The South China Sea is on it''s east coast, Cambodia borders it to the southwest, with Laos on the northwest, and China on the north.', '2004-06-02 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1985, 29, 'There are two countries on the African continent with similar names, "The Republic of the Congo" and "The Democratic Republic of the Congo", which used to be known as Zaire. These two countries each border the Congo River, the first on the northwest and the second on the southeast. ', '2004-06-03 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1986, 29, 'The Republic of the Congo straddles the equator in west-central Africa, while the larger Democratic Republic of the Congo is to the south and east of it''s similarly named neighbor. ', '2004-06-04 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1987, 29, 'The capitals of the Republic of the Congo (Brazzaville) and the Democratic Republic of the Congo (Kinshasa) lie directly across the Congo River from each other. This is the only place in the world where two national capitals sit on opposite banks of the same river, within sight of each other.', '2004-06-05 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1988, 29, 'The Golden Gate Bridge spans 1.7 miles across the San Francisco Bay. Nearly 3 million people cross it every month.', '2004-06-06 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1989, 29, 'Rhodes is a Greek island about 11 miles southwest of Turkey, in the eastern Aegean Sea. It was the home of one of the original seven wonders of the world, the Colossus of Rhodes.', '2004-06-07 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1990, 29, 'Manaus is the largest city in northern Brazil. It is situated at the confluence of the Negro (Black) and Solimoes Rivers. Both rivers are tributaries of the Amazon River. Manaus has often been called "the Heart of the Amazon" and the "City of the Forest".', '2004-06-08 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1991, 29, 'Damascus, the oldest continuously inhabited city in the world, is the capital and largest city in Syria. It is about 50 miles inland from the Mediterranean Sea on a plateau about 2,200 feet above sea level. ', '2004-06-09 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1992, 29, 'Muir Woods is a national monument, north of San Francisco. It contains one of the finest preserved groves of old growth coastal redwood trees in California.', '2004-06-10 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1993, 29, 'The Swan River estuary flows through the city of Perth in the southwestern part of Western Australia. The Avon River is the major source of the Swan, which drains into the Indian Ocean.', '2004-06-11 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1994, 29, 'The remains of the ancient city of Babylon are located about 55 miles south of Baghdad, Iraq. The city was situated in the plain between the Tigris and Euphrates rivers. The Hanging Gardens of Babylon was one of the original Seven Wonders of the World.', '2004-06-12 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1995, 29, 'The Fraser River, rising at Fraser Pass in the Rocky Mountains and flowing for 870 miles into the Strait of Georgia at Vancouver, is the longest river within British Columbia, Canada.', '2004-06-13 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1996, 29, 'Kathmandu is the capital and largest city of Nepal. It is located in the northwestern part of Kathmandu Valley in central Nepal. It is in the heart of the Himalaya mountains and is often the jumping off point for teams headed to climb Mt. Everest. ', '2004-06-14 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1997, 29, 'The northern boundary of Delaware is highly unusual. It is defined by an arc extending 12 miles from the cupola of the courthouse in New Castle, Delaware. It is referred to as the Twelve-Mile Circle. It is the only true-arc political boundary in the United States.', '2004-06-15 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1998, 29, 'The Altai Mountains are a mountain range in central Asia. They are the source of the Ob and Irtysh rivers as well as where Russia, China, Mongolia, and Kazakhstan come together.', '2004-06-16 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (1999, 29, 'Ghana, a country in West Africa is bordered by Cote d''Ivoire (Ivory Coast) on the west, Burkina Faso on the north, Togo on the east, and the Gulf of Guinea on the south. It was known as the Gold Coast before achieving independence from the United Kingdom in 1957.', '2004-06-17 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2000, 29, 'Cape Agulhas is the point on the southern tip of Africa and is the official diving point between the Indian Ocean and the Atlantic Ocean. Sometimes it is called Cape L''Agullas (Cape of Needles).', '2004-06-18 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2001, 29, 'Beirut, the largest city in Lebanon is also the capital of the country. It is located on a peninsula in the middle of Lebanon''s Mediterranean coastline.', '2004-06-19 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2002, 29, 'Montevideo is the chief port, capital and largest city in Uruguay. It is located in the south central part of the country on the Bay of Montevideo opening to the South Atlantic Ocean.', '2004-06-20 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2003, 29, 'Ougadougou is the capital of the African nation of Burkina Faso. It is located in the center of the country. Burkina Faso is a landlocked country in West Africa, bounded by Mali to the north, Niger to the east, Benin to the southeast, Togo and Ghana to the south, and Cote d''Ivoire to the southwest.', '2004-06-21 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2004, 29, 'The Hague is the third largest city in the Netherlands. It is the home of judicial institutions of the United Nations. It is located on the west coast of the Netherlands. The name means "land surrounded by hedges".', '2004-06-22 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2005, 29, 'A full moon rising and extremely low tide help create a natural phenomenon called "The Staircase to the Moon". It can be seen from several locations in Western Australia, especially Roebuck Bay in Broome, Cooke Point in Port Hedland, the Lookout at Cossack, Hearson''s Cove near Karratha, and Sunrise Beach in Onslow.', '2004-06-23 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2006, 29, 'Rome, Italy is also called the "City of Seven Hills". The seven hills were settled as small villages and eventually grew together and became the city of Rome. The seven hills are Aventine Hill, Caelian Hill, Capitoline Hill, Esquiline Hill, Palatine Hill, Quirinal Hill, and Viminal Hill. ', '2004-06-24 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2007, 29, 'The Asian country of Nepal is similar in size to Michigan, about 56,500 square miles.', '2004-06-25 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2008, 29, 'The most remote inhabited island in the world, Tristan da Cunha lies midway between South Africa and South America in the South Atlantic Ocean. It is 1,750 miles from South Africa and 2,090 miles from South America. It is a British Overseas Territory composed of four volcanic islands.', '2004-06-26 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2009, 29, 'Baghdad, the capital of Iraq is situated on a vast plain that is cut in half by the Tigris River in east-central Iraq. ', '2004-06-27 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2010, 29, 'The world''s riches gold rift zone is in the Chocolate Mountains in Imperial and Riverside Counties. They stretch more than 60 miles northwest to southeast in direction, between the Colorado River and the Salton Sea in Southern California.', '2004-06-28 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2011, 29, 'The surface elevation of Spirit Lake, north of Mount St. Helens in Washington state, was raised over 200 feet in 1980 when Mt. St. Helens erupted. This made the lake 10% smaller and much shallower.', '2004-06-29 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2012, 29, 'The Gran Chaco is a sparsely populated, semi-arid expanse of the Rio de la Plata basin that covers area in Bolivia, Paraguay, Argentina and Brazil. Sometimes it is called the Chaco Plain.', '2004-06-30 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2013, 29, 'The Grand Canal, also called Da Yunhe, is a 1,000 mile long manmade waterway, begun in the 6the century that extends from Beijing, China at the north to Hangzhou in the south. There is another canal with that same name located in Venice, Italy.', '2004-07-01 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2014, 29, 'Majorca is the largest of the islands in the Balearic islands in the western Mediterranean Sea. They are an autonomous community and a province of Spain. They are near the eastern coast of the Iberian peninsula.', '2004-07-02 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2015, 29, 'Jerusalem is a city in dispute, between Israel and Palestine. It is located in the Judean mountains between the Mediterranean Sea and the northern tip of the Dead Sea. It is a holy city for Christianity, Judaism, and Islam.', '2004-07-03 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2016, 29, 'There are cities named Independence in a number of American states, most well-known is Independence, Missouri. Other states claiming an "Independence" include, Ohio, Kentucky, Minnesota, Iowa, and Kansas. ', '2004-07-04 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2017, 29, 'Yalta is a city in southern Ukraine, on the north coast of the Black Sea. Yalta sits on a deep bay that lies to the south of the Crimean Mountains. This part of Ukraine is also called the Crimea. ', '2004-07-05 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2018, 29, 'Kentucky is the only U.S. state to have a non-contiguous part exist as an exclave surrounded by other states. Fulton County, in the far west corner of the state, includes a small part of land, Kentucky Bend, on the Mississippi River bordered by Missouri and accessible via Tennessee, created by the New Madrid Earthquake.', '2004-07-06 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2019, 29, 'The White Sea is an inlet of the Barents Sea on the northwest coast of Russia. It is surrounded by Karelia to the west, the Kola peninsula to the north, and the Kanin Peninsula to the northeast. The most important port on the White Sea is the Russian port of Arkangelsk (Archangel).', '2004-07-07 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2020, 29, 'The Rialto Bridge is the oldest of the four bridges spanning the Grand Canal in Venice, Italy.', '2004-07-08 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2021, 29, 'The White Cliffs of Dover are located on the south coast of England, in the county of Kent. They form part of the British coastline facing the Strait of Dover and France.', '2004-07-09 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2022, 29, 'Honolulu is the largest city in the world -- at least it has the longest borders. According to the state constitution any island (or islet) not named as belonging to a county belongs to Honolulu. This makes all islands within the Hawaiian Archipelago, that stretch to Midway Island (1,500 miles northwest of Hawaii) part of Honolulu. Honolulu is about 1,500 miles long or more distance than halfway across the 48 contiguous states. ', '2004-07-10 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2023, 29, 'Harare, formerly Salisbury, Rhodesia, is the capital of Zimbabwe. It is located in the northwest central part of Zimbabwe, where three of the eight provinces meet.', '2004-07-11 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2024, 29, 'Located on the eastern shore of the Baltic Sea, Latvia is bounded on the east by the Russian Federation, to the southeast by Belarus. Lithuania is on the south and Estonia is to the north. Sweden is located to Latvia''s west, across the Baltic Sea.', '2004-07-12 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2025, 29, 'The Arabian Peninsula in Southwest Asia is where you will find the Republic of Yemen. Saudi Arabia is to it''s north, Oman is to the east, the Gulf of Aden and Arabian Sea bound it on the south with the Red Sea at it''s western border.', '2004-07-13 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2026, 29, 'Hong Kong is a "Special Administrative Region" of the People''s Republic of China. It sits on China''s south coast, across the Pearl River Delta from Macau. The South China Sea surrounds the territory on the east, south, and west. Hong Kong Island, Lantau, Kowloon Peninsula, and the New Territories along with over 250 smaller islands make up the Hong Kong Territory.', '2004-07-14 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2027, 29, 'Georgia is not just a state in the southern United States! It is also the name of a country that sits at the juncture of Western Asia and Eastern Europe. The Black Sea bounds it on the west, Russia on the north, Turkey and Armenia are on the south with Azerbaijan is to it''s east.', '2004-07-15 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2028, 29, 'Bhutan sits at the eastern end of the Himalaya Mountains, a tiny, landlocked country surrounded on three sides by the Republic of India with the Republic China on it''s northern border.', '2004-07-16 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2029, 29, 'Albania''s coastline of over 215 miles along the Adriatic and Ionian Seas form its western and southwestern borders. On the north you find Montenegro, with Kosovo on the northeast. Macedonia is on the east and Greece forms the southeastern border. It is less than 45 miles across the Strait of Otranto from Italy.', '2004-07-17 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2030, 29, 'The Horn of Africa (also called Northeast Africa and sometimes the Somali Peninsula) juts out of East Africa (like the horn of a rhinoceros) into the Arabian Sea, along the southern side of the Gulf of Aden. The countries of Eritrea, Djibouti, Ethiopia, and Somalia are the countries in this part of the continent.', '2004-07-18 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2031, 29, 'The republic of Finland, a Nordic country is in northern Europe bordering Sweden on the west, Russia on the east, Norway to the north and Estonia to the sough, across the Gulf of Finland. ', '2004-07-19 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2032, 29, 'Ka Lae, on the island of Hawaii, is the southernmost point in the United States. It is located at 18:54:49 N 155:41:00 W. There is a constant 27 knots per hour wind blowing east to west, 24 hours per day and 365 days per year. ', '2004-07-20 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2033, 29, 'The Republic of Bulgaria is a Balkan country in southeastern Europe, It''s borders are formed by the Black Sea on the east and five countries, in order from north to south Romania, Serbia, The Republic of Macedonia, Greece, and Turkey.', '2004-07-21 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2034, 29, 'The Kingdom of Thailand sits in the heart of Southeast Asia. Laos and Burma (Myanmar) form it''s northern border, Laos and Cambodia are on the east, the Gulf of Thailand and Malaysia lie to the south, the Andaman Sea and Burma are to the west. ', '2004-07-22 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2035, 29, 'The British overseas territory of Bermuda sits in the North Atlantic Ocean about 1,100 miles northeast of Miami, Florida and 840 miles south of Halifax, Nova Scotia, Canada. Its closest neighbor is Cape Hatteras, North Carolina about 640 miles west-northwest.', '2004-07-23 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2036, 29, 'Cape Town, South Africa is the second most populous city in South Africa. It is the legislative capital of the country. It sites on the shore of Table Bay, a natural inlet of the South Atlantic Ocean.', '2004-07-24 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2037, 29, 'The Republic of Armenia is a mountainous, landlocked nation in the Caucasus region where Western Asia and Eastern Europe join. Turkey sits to its west, Georgia to the north, Azerbaijan to the east, with Iran and the Azerbaijani exclave of Nakhchivan to the south.', NULL, 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2038, 29, 'Capitol Reef National Park, in Utah, protects The Waterpocket Fold a 100-mile long wrinkle in the earth''s crust known to geologists as a monocline. The Waterpocket Fold extends from Thousand Lakes Mountain to the Colorado River. ', '2004-07-26 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2039, 29, 'Istanbul, Turkey (previously known as Byzantium and Constantinople) is the largest city in Turkey and the fifth largest city in the world. It is situated on the Bosporus Strait on the natural harbor, the Golden Horn, in northwest Turkey. It is unique because it sits on two continent, Europe and Asia.', '2004-07-27 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2040, 29, 'The Dwight Eisenhower Memorial Tunnel between Clear Creek & Summit counties is the highest auto tunnel in the world. Bored at an elevation of 11,000 feet under the Continental Divide it is 8,960 feet long and the average daily traffic exceeds 26,000 vehicles. ', '2004-07-28 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2041, 29, 'Tunisia is a North African country bordered by Algeria to the west and southwest, Libya to the southeast and the Mediterranean Sea on its north and northeast. The Italian islands of Sicily and Sardinia are the closest European lands to its north. The extensive coastline, the Atlas mountain range and the Sahara desert are the most prominent geographic features in Tunisia.', '2004-07-29 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2042, 29, 'Concord, Massachusetts is the home of Walden Pond. It is a famous example of a kettle hole (a shallow body of water formed by retreating glaciers) where Henry David Thoreau lived for 2 years. His book Walden; or, Life in the Woods is an account of his time here. ', '2004-07-30 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2043, 29, 'The capital and largest city of Mongolia is Ulan Bator (Ulaanbaatar). It is found in the north-central part of the country in a valley of the Tuul River. Because it sits at a relatively high elevation, 4,430 feet above sea level, in a high latitude, far away from any the affects of any moderating coastal breezes, it is the coldest national capital in the world. ', '2004-07-31 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2044, 29, 'The United States has six different time zones, Eastern, Central, Mountain, Pacific, Alaska, and Hawaii. The Hawaii time zone is the same as the Aleutian time zone.', '2004-08-01 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2045, 29, 'The Republic of Vanuatu, a volcanic island nation, is located in the South Pacific Ocean about 1,100 miles east of northern Australia. It is also about 300 miles northeast of New Caledonia, west of Fiji, and southeast of the Solomon Islands. Before 1980, it was known as New Hebrides and was claimed by France and the United Kingdom.', '2004-08-02 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2046, 29, 'The Great Dividing Range, or the Eastern Highlands, is Australia''s most substantial mountain range. It is the fourth largest in the world, stretching 2,175 miles from Dauan Island off the northeastern tip of Queensland and running the entire length of the eastern coastline through new South Wales, into Victoria and heading west to the central plain of western Victoria.', '2004-08-03 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2047, 29, 'The Republic of Namibia in Southwestern Africa shares a border with Angola and Zambia to the north, Botswana and Zimbabwe to the east, South Africa to the south and east and the Atlantic Ocean on the west.', '2004-08-04 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2048, 29, 'Gdansk (also known as Danzig) sits on the Baltic coast in northern Poland. The principal seaport of Poland, it sits at the mouth of the Motlawa River, a branch of the Vistula River, connecting Gdansk to the capital, Warsaw.', '2004-08-05 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2049, 29, 'The highest (Mt. Whitney) and lowest (Badwater) points in the continental United States are in the same county, Inyo County, California', '2004-08-06 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2050, 29, 'Glasgow, the largest city in Scotland sits on the River Clyde in the west central lowlands. ', '2004-08-07 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2051, 29, 'The Australian island of Tasmania is 150 miles south of the eastern side of the Australian mainland, across the Bass Strait.', '2004-08-08 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2052, 29, 'Scandinavia is the northern European region that is named for the Scanian Province. It includes the countries of Norway, Sweden, and Denmark. Some authorities believe it also includes Finland and Iceland.', '2004-08-09 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2053, 29, 'Portugal, officially the Portuguese Republic is located on the Iberian Peninsula in southwestern Europe. It is the westernmost country of mainland Europe and is bordered by the Atlantic Ocean to the south and west and by Spain to the north and east.', '2004-08-10 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2054, 29, 'Bangkok is the capital and largest urban area of Thailand. It sits in the basin of the Chao Phraya River that leads to the Bay of Bangkok. It is located in the center of Thailand.', '2004-08-11 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2055, 29, 'The largest academic library in the world is the Widener Library at Harvard University, in Cambridge, Massachusetts.', '2004-08-12 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2056, 29, 'The State of Eritrea sits in the Horn of Africa, bordered on the west by Sudan, the south by Ethiopia, Djibouti on the southeast. The northeastern and eastern borders are coastline of the Red Sea. Yemen and Saudi Arabia are directly across this body of water.', '2004-08-13 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2057, 29, 'The Republic of Slovenia, formerly part of Yugoslavia, is in Central Europe. Italy borders it to the west, the Adriatic Sea is on the southwestern border, with Croatia on the south and east, Hungary to the northeast and Austria and the Alps to the north. ', '2004-08-14 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2058, 29, 'Hanoi is the capital and second-largest city in Vietnam. It is located along the Red River in the northern part of this long and mostly narrow country. ', '2004-08-15 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2059, 29, 'Marseille, the oldest and second largest city in France is located on the southeast coast of France on the Mediterranean Sea. It is the largest commercial port in the country and the administrative capital of the Provence-Alpes-Cote d''Azur region.', '2004-08-16 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2060, 29, 'The Azores is a Portuguese archipelago in the Atlantic Ocean. Located about 930 miles east of Lisbon and 2,400 miles west of the east coast of Virginia, the two westernmost islands of Flores and Corvo actually lie on the North American plate.', '2004-08-17 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2061, 29, 'Burma, officially the Union of Myanmar is the largest country by geographic area in mainland Southeast Asia or Indochina. China borders it on the northeast, Laos on the east, Thailand on the southeast, Bangladesh on the west, India on the northwest and the Bay of Bengal to the southwest. The Andaman Sea creates the southern boundary. One-third of the total perimeter of Burma is uninterrupted coastline.', '2004-08-18 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2062, 29, 'Oregon and the Latin American country of Ecuador are about the same size, each around 98,500 square miles.', '2004-08-19 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2063, 29, 'The capital and largest city of Spain is Madrid. This city, located on the Manzanares River is in the center of Spain. ', '2004-08-20 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2064, 29, 'The Netherlands is divided into two main parts by the three large rivers, the Rhine, and its main distributaries, the Waal and the Meuse. They form a natural barrier and create a cultural divide. The southwestern part of the country is really a massive river delta of the Scheldt and its two tributaries. The coastline of the country has been affected by many natural disasters, especially floods.', '2004-08-21 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2065, 29, 'The Gulf of Finland forms the northern border of Estonia. The Baltic Sea is on its Western border. Latvia sits on the southern edge of Estonia and the Russian Federation is to the east.', '2004-08-22 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2066, 29, 'Algiers is the largest city and capital of North African nation of Algeria. It sits on the west side of a bay of the Mediterranean Sea.', '2004-08-23 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2067, 29, 'The best-defined earth lodge depressions of any major Native American site in the Great Plains are located at Big Hidatsa village site near the mouth of the Knife River in Mercer County, North Dakota.', '2004-08-24 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2068, 29, 'The West African country, Benin is a narrow, north-south strip of land bordering Togo to the west, Nigeria to the east, Burkina Faso and Niger to the north, and Bight of Benin is at the south. (A bight is a type of bay.)', '2004-08-25 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2069, 29, 'Geneva, Switzerland, the second-most populous city in the country is located at the southwestern end of Lake Geneva, where the lake flows back into the Rhone River. Geneva is surrounded by two different mountain ranges, the Alps and the Jura Mountains.', '2004-08-26 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2070, 29, 'The Columbia River is the largest volume river feeding into the Pacific ocean. It runs from the Canadian Rockies of British Columbia through Washington state, into Oregon on it''s way to the Pacific.', '2004-08-27 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2071, 29, 'Tehran, the capital and largest city of Iran sprawls at the foot of the Tochal mountains. This largest city in the Middle East is located in the north central part of the country, the Alborz Mountains to its north and the central desert to its south.', '2004-08-28 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2072, 29, 'The Federal Democratic Republic of Ethiopia, a landlocked country, sits in the Horn of Africa. It is bordered on the north by Eritrea, Sudan is to the west, Kenya is to the south, Somalia is east, and Djibouti is to the northeast. ', '2004-08-29 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2073, 29, 'Monsanto Forest Park, one of the largest urban parks in Europe at almost 4 square miles is located in Lisbon, Portugal. Lisbon is the westernmost capital of mainland Europe, sitting on the south-central western coast where the Tagus River flows into the Atlantic Ocean.', '2004-08-30 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2074, 29, 'The Piedmont region of Italy is in the northwestern part of the country. It is surrounded on three sides by the Alps and borders France and Switzerland, as well as several other regions of Italy. ', '2004-08-31 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2075, 29, 'The capital and largest city of Georgia is Tbilisi. It is on the banks of the Kura River in the South Caucasus Mountains with the Iori Plain to the south. Located strategically between Asia and Europe, Tbilisi is on the historic Silk Road routes. ', '2004-09-01 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2076, 29, 'Alexandria is the second largest city in Egypt and the country''s largest seaport. It is located in north-central Egypt on the Mediterranean Sea coast. Alexandria was home to one of the original seven wonders of the World, the Great Lighthouse. It stood on the eastern point of Pharos Island, just off the coast of Alexandria.', '2004-09-02 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2077, 29, 'The Kingdom of Cambodia is located in Southeast Asia, to the west of Thailand. Laos is on its northeast, Vietnam is to the east and southeast. The Gulf of Thailand is south. The Mekong River runs the length of the country.', '2004-09-03 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2078, 29, 'Liberia is a West African nation bordering the Atlantic Ocean on the west, Sierra Leone to it''s north, Guinea and Cote D''Ivoire on the east, It is mostly flat with rolling coastal plains filled with mangrove forests and swamps that rise to a grassland plateau and low mountains in the northeast.', '2004-09-04 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2079, 29, 'The Sayan Mountains are a range in southern Siberia, Russia. They extend from the southwest end of Lake Baikal 621 miles to the Yenisei River, one of Siberia''s major rivers.', '2004-09-05 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2080, 29, 'A haboob is a form of monsoon storm that can occur, usually between May and September. It is a dust storm that resembles a wall of dust that can be up to 3,000 feet tall. These storms only occur in the Sahara Desert and the southwestern United States, mostly in Arizona and Texas.', '2004-09-06 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2081, 29, 'Togo is a small narrow country. Officially known as the Togolese Republic, a West African country shares its borders with Ghana on the west, Benin on the east, and Burkina Faso on the north. The Bight of Benin, a type of bay in the Gulf of Guinea is to the south. The capital city, Lome'' is located on the Gulf coast. ', '2004-09-07 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2082, 29, 'Lapland refers to the northernmost provinces or counties of Finland, Sweden and Norway, as well as Murmansk Oblast in Russia. It is the largest geographic area in Finland, Sweden, and Norway, yet the least populated. It is bordered by the Norwegian Sea (Atlantic Ocean) and the Barents Sea (Arctic Ocean) on the north, with parts of the area being in the Arctic Circle.', '2004-09-08 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2083, 29, 'Oracle, Arizona is the home of Biosphere 2, a man-made self-contained ecological system.', '2004-09-09 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2084, 29, 'A landlocked southeast African country, the Republic of Malawi is bordered by Zambia to the northwest, and Tanzania to the northeast. Mozambique sits on all the rest of its borders.', '2004-09-10 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2085, 29, 'The terms Nordic countries and Nordic region are used to identify the countries of Denmark, Norway, Sweden, Finland, Iceland, the Danish territory of the Faroe Islands, and the Finnish territory of Aland.', '2004-09-11 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2086, 29, 'In the summer of 2001, it was over 100 degrees Fahrenheit for a record 154 consecutive days.', '2004-09-12 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2087, 29, 'Sardinia is the second largest island in the Mediterranean Sea. It is located to the west of south-central Italy, northwest of Sicily. While it is an autonomous region of Italy, its nearest neighbor is the French island of Corsica.', '2004-09-13 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2088, 29, 'The landlocked Republic of Chad is in central Africa. It is bordered by Libya to the north, Sudan to the east, the Central African Republic to the south, Cameroon and Nigeria to the southwest, and Niger to the west. Chad is sometimes referred to as the "Dead Heart of Africa" because of it''s distance to the sea and it''s primarily desert climate.', '2004-09-14 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2089, 29, 'The Sonoran Desert, sometimes called the Gila Desert straddles part of the United States-Mexico border and covers large parts of the U.S. states of Arizona and California and the Mexican states of Sonora, Baja California, and Baja California Sur.', '2004-09-15 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2090, 29, 'The Federal Republic of Germany is in central Europe, bordered on the north by the North Sea, Denmark, and the Baltic Sea. Poland and the Czech Republic are to the east of Germany, with Austria and Switzerland on the south and France, Luxembourg, Belgium, and the Netherlands to the west. Germany shares borders with more European countries than any other country on the continent.', '2004-09-16 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2091, 29, 'Winnipeg is the capital and largest city of Manitoba, Canada. It is located near the longitudinal center of North America. It is in south-central Canada, near the eastern edge of the Canadian Prairies where the Red and Assiniboine Rivers join. ', '2004-09-17 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2092, 29, 'The southern Pacific Ocean is where you will find Tahiti, the largest island in the Windward group of French Polynesia. It is part of the archipelago of Society Islands. ', '2004-09-18 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2093, 29, 'The Great Socialist People''s Libyan Arab Jamahiriya is the official name of the country we usually call Libya. It is located in North Africa, bordering the Mediterranean Sea'' Gulf of Sidra to the north, Egypt to the east, Sudan to the southeast, Chad and Niger to the south, Algeria and Tunisia to the west.', '2004-09-19 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2094, 29, 'The Sahara Desert covers most of Northern Africa. It is the world''s largest hot desert and is almost as big as the entire United States or the whole continent of Europe. It stretches from the Red Sea to the outskirts of the Atlantic Ocean. The Sahara covers huge parts of the countries of Algeria, Chad, Egypt, Libya, Mali, Mauritania, Morocco, Niger, Western Sahara, Sudan, and Tunisia.', '2004-09-20 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2095, 29, 'September 21, 1938 saw a hurricane in New England. 186 mile per hour winds were recorded at Blue Hill Observatory in Massachusetts ', '2004-09-21 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2096, 29, 'The Judean Mountains, which include the Mount of Olives and Temple Mount surround the city of Jerusalem. They are also called the Hebron Hills and Jibal al-Khalil. They run north and south through Israel and Palestine''s West Bank. The Jordan Rift Valley is on the east side of this range of mountains.', '2004-09-22 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2097, 29, 'Khartoum is the capital of Sudan. It is located at the confluence of the White Nile River, which flows north from Lake Victoria and the Blue Nile River, which flows west fro Ethiopia. ', '2004-09-23 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2098, 29, 'New Jersey is the most densely populated state with approximately 1134 persons per square mile.', '2004-09-24 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2099, 29, 'Tierra del Fuego is an archipelago off the southernmost tip of the South American mainland, across the Strait of Magellan. Cape Horn is at the southern tip of the archipelago.', '2004-09-25 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2100, 29, 'The Republic of Singapore is an island city-state on the southern tip of the Malay Peninsula. It is just 85 miles north of the equator. Singapore is south of Malaysia and north of Indonesia''s Riau Islands. Singapore is a microstate and the smallest nation in Southeast Asia, one of the last three sovereign city-states. (The Vatican and Monaco are the other two.)', '2004-09-26 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2101, 29, 'The Great Rift Valley is a continuous geographic trench that runs for about 3,700 miles from northern Syria in Southwest Asia to central Mozambique in East Africa. Some of the deepest lakes in the world are part of a branch of the Great Rift Valley. The Western Rift Valley contains Lake Tanganyika and Lake Victoria.', '2004-09-27 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2102, 29, 'Wales is a country that is part of the United Kingdom. It sits on a peninsula in central-west Great Britain. Wales is bordered by England on the east, the Atlantic Ocean and the North Sea form northern and western borders, the Bristol Channel is to the south.. ', '2004-09-28 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2103, 29, 'The Czech Republic is a Central European country, sometimes considered Eastern European. It borders Poland on its northeast, German to its west and northwest, Austria to the south, and Slovakia to the east. The Czech Republic is composed of three historic regions, Bohemia, Moravia, and Silesia.', '2004-09-29 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2104, 29, 'Mesa Verde, in far southwestern Colorado, features an elaborate four-story city carved in the cliffs by the Ancestral Pueblo people between 600 and 1300 A.D. The mystery surrounding this ancient cultural landmark is the sudden disappearance of the thousands of inhabitants who created the more than 4,000 identified structures. ', '2004-09-30 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2105, 29, 'Taiwan, sometimes called Formosa is the largest island of the Republic of China in East Asia. It is located east of the Taiwan Strait, off the southeastern coast of mainland China. The main islands of Japan are to its northeast with the southern end of the Ryukyu Islands of Japan directly to the east. The Philippines are to the south. The island spans the Tropic of Cancer.', '2004-10-01 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2106, 29, 'The Islamic Republic of Pakistan is located at the crossroads of South Asia, Central Asia, and the Middle East. With a 650 mile coastline along the Arabian Sea and Gulf of Oman to its south, Afghanistan and Iran to its west, India to its east, and the People''s Republic of China to its far northeast, Pakistan sits in the heart of the ancient Indus Valley. Tajikistan is separated from Pakistan only by the narrow Wakhan Corridor, a 10 mile wide, almost impassable corridor in a province of Afghanistan.', '2004-10-02 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2107, 29, 'Johannesburg is the largest city in South Africa. It is home to South Africa''s highest court, the Constitutional Court. It lies in Gauteng province, on the eastern plateau known as the Highveld between the Limpopo and Vaal rivers in the north-central part of the country. ', '2004-10-03 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2108, 29, 'The Korean Peninsula in Northeast Asia is home to the two countries, North Korea and South Korea. The Amnok (Yalu) River and the Tumen River separates North Korea, officially the Democratic People''s Republic of Korea (DPRK), from The People''s Republic of China. Another section of the Tumen River forms the northeastern border with Russia. The southern border is the Korean Demilitarized Zone, the Sea of Japan is to the east, with the Yellow Sea and Korea Bay on the west.', '2004-10-04 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2109, 29, 'The Republic of Korea occupies the southern half of the Korean Peninsula. China is to the west across the Yellow Sea. The Sea of Japan is to the east. The southern tip of the peninsula lies on the Korea Strait and the East China Sea. The northern border is the Korean Demilitarized Zone at roughly the 38th parallel.', '2004-10-05 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2110, 29, 'The Republic of Panama resides on an isthmus connecting North and South America. Costa Rica is on its northwest, Colombia is to the southeast, the Caribbean Sea is to the north and the Pacific Ocean is to its south. ', '2004-10-06 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2111, 29, 'The Continental Divide is the boundary that separates water flow in the United States. Waters to the west of it flow into the Pacific Ocean. Waters east of the divide flow into the Atlantic Ocean or the Gulf of Mexico. ', '2004-10-07 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2112, 29, 'The Principality of Andorra is a small country in southwestern Europe. It is located in the eastern Pyrenees mountains bordered by France on the north and Spain on the south.', '2004-10-08 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2113, 29, 'The Eastern European country of Moldova is located between Romania on the west and Ukraine bounding the rest of the country. It lies primarily between the Dniester and Prut rivers. The country has no coastline, but is still considered part of the Black Sea basin. ', '2004-10-09 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2114, 29, 'The United Mexican States is bordered by the United States on the north. The Pacific Ocean is on the south and west. Guatemala, Belize, and the Caribbean Sea are on the southeast with the Gulf of Mexico on the eastern border. It is the southernmost country in North America.', '2004-10-10 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2115, 29, 'The Chechen Republic, also called Chechnya, is a federal subject of Russia. You will find it in the Northern Caucasus mountains north of Georgia. It lies partially in Eastern Europe and partly in Asia.', '2004-10-11 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2116, 29, 'The Republic of Indonesia is over 17,500 islands in Southeast Asia and Oceania. It shares land borders with Malaysia, East Timor, and Papua New Guinea. Neighboring countries include Australia, Singapore and the Philippines. The capital city, Jakarta is on the island of Java. ', '2004-10-12 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2117, 29, 'Romania is located in Southeastern and Central Europe. It sits north of the Balkan Peninsula on the Lower Danube River. It borders Hungary and Serbia to the west, Ukraine and the Republic of Moldova to the northeast and Bulgaria to the south, The Black Sea bounds Romania on the west.', '2004-10-13 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2118, 29, 'The Republic of Seychelles is an archipelago nation made up of 115 islands about 930 miles east of mainland Africa in the Indian Ocean. The Seychelles Islands are northeast of Madagascar, west of Zanzibar, north of Mauritius and Reunion Island. Comoros and Mayotte are to the southwest with the Maldives to the northeast. This island nation has the smallest population in all of Africa.', '2004-10-14 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2119, 29, 'The Republic of Nicaragua is the largest country in Central America. Honduras is to its north and Costa Rica is to its south. The Pacific Ocean is to the west and the Caribbean Sea to the east. It is about the same size as the state of New York and about one-fifth of the country is designated protected area, like national parks, nature reserves and biological reserves.', '2004-10-15 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2120, 29, 'Prince Edward Island is a province of Canada. It is the smallest in terms of both land mass and population. It is located in the Gulf of St. Lawrence, west of Cape Breton Island, north of the Nova Scotia Peninsula and east of New Brunswick. On the south it is bound by the Northumberland Strait.', '2004-10-16 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2121, 29, 'The Islamic Republic of Iran, the country formerly known as Persia is located in central Eurasia. It is bordered by Armenia, Azerbaijan, Turkmenistan, and the Caspian Sea on the north, Afghanistan and Pakistan to the east, the Arabian Sea, the Persian Gulf, and the Gulf of Oman. To the west is Iraq and northwest is Turkey. North of the Caspian Sea are Kazakhstan and Russia.', '2004-10-17 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2122, 29, 'The People''s Republic of Bangladesh, a South Asian country is bordered on three sides by India. It shares a short border with Burma (Myanmar) on the southeast, the Bay of Bengal forms most of the southern border. Along with the Indian state of West Bengal, it makes up the region called Bengal.', '2004-10-18 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2123, 29, 'The financial capital of the country of Albania is also the political capital, Tirana. It lies on the river Ishim about 20 miles inland from the Adriatic Sea at 41.33, 19.82E. The Lane and Tirane rivers run through this city that parallels Naples, Madrid, and Istanbul. Additionally, it sits on the same meridian as Krakow and Budapest.', '2004-10-19 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2124, 29, 'The Lao People''s Democratic Republic (Laos) is the only landlocked country in Southeast Asia. Vietnam is on it''s eastern border, with Cambodia to the south, Thailand to the west, where the Mekong River flows between the two countries. Burma and the People''s Republic of China are on the north, northwest. ', '2004-10-20 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2125, 29, 'The United Republic of Tanzania in central East Africa is bordered by Kenya and Uganda on the north, Burundi, Rwanda and the Democratic Republic of the Congo on the west, Zambia, Malawi and Mozambique on the south. Tanzania''s eastern border is created by the Indian Ocean. On older maps, the area we now call Tanzania used to be Tanganyika and Zanzibar.', '2004-10-21 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2126, 29, 'The State of Brunei Darussalam or the Nation of Brunei, the Abode of Peace, is a country located on the north coast of the island of Borneo. It is located in Southeast Asia. It is surrounded on three sides by the state of Sarawak, Malaysia. Its only other neighbor is the South China Sea. Brunei is a rich and powerful sultanate, meaning it is ruled by a Muslim prince or king.', '2004-10-22 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2127, 29, 'Craters of the Moon national monument in Idaho was used by NASA for astronauts to practice lunar landings.', '2004-10-23 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2128, 29, 'The Republic of Trinidad and Tobago, an archipelago state in the southern Caribbean Sea is northwest of the South American country, Venezuela, and south of the island of Grenada in the Lesser Antilles group. Barbados is to the northeast and Guyana to the southwest. It is made up of 2 major islands, Trinidad and Tobago as well as many smaller islands.', '2004-10-24 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2129, 29, 'Corsica is one of 26 regions of France. It is a volcanic island, the fourth largest, in the Mediterranean Sea. It is located west of Italy, southwest of the French mainland, north of Sardinia. Do you know what famous French emperor was born here? ', '2004-10-25 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2130, 29, 'The Islamic Republic of Mauritania is a northwestern African country bordered by the Atlantic Ocean on the west, Senegal on the southwest, Mali on the east and southeast, Algeria on the northeast, and Western Sahara on the northwest. Almost three-quarters of the country is desert or semi desert.', '2004-10-26 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2131, 29, 'The Western Atlantic Ocean is where you will find the island nation of Barbados. It is considered part of the Lesser Antilles group. Its closest neighbors include Martinique, Saint Lucia, St. Vincent & the Grenadines. Barbados is considered the easternmost Caribbean island.', '2004-10-27 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2132, 29, 'The Republic of the Fiji Islands is located in the Pacific Ocean, east of Vanuatu, west of Tonga and south of Tuvalu. This archipelago nation includes about 322 islands, about one-third of them are inhabited. The International Dateline is bent around Fiji so the entire island nation has a single time zone.', '2004-10-28 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2133, 29, 'The Republic of Sierra Leone, a West African country is bordered by Guinea to the northeast, Liberia to the southeast, and the Atlantic Ocean to the southwest. ', '2004-10-29 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2134, 29, 'The Yucatan Peninsula in southeastern Mexico separates the Caribbean Sea from the Gulf of Mexico. It''s northern coastline is on the Yucatan Channel. The peninsula lies east of the Isthmus of Tehuantepec, a geographic partition separating Central America from North America. ', '2004-10-30 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2135, 29, 'Transylvania is a historical region in central Romania. It is bounded on the east and south by the Carpathian mountain range. Transylvania covers the northwestern third of Romania.', '2004-10-31 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2136, 29, 'Liberia is an African nation that was initially colonized by the United States. It was a haven for former slaves.', '2004-11-01 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2137, 29, 'Machias Seal Island and North Rock, off the easternmost coast of Maine are still claimed by both the United States and Canada.', '2004-11-02 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2138, 29, 'East Africa''s Republic of Kenya lies on the equator with the Indian Ocean forming the eastern edge of the country. On the north is Ethiopia. Somalia is to the northeast, Tanzania to the south, Uganda and Lake Victoria are on the west and the Sudan is the northwest. Kenya is home to many wildlife preserves with thousands of animal species.', '2004-11-03 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2139, 29, 'The Cayman Islands, a British overseas territory is located in the western Caribbean Sea. The islands of Grand Cayman, Cayman Brac, and Little Cayman, south of Cuba and northwest of Jamaica make up this territory.', '2004-11-04 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2140, 29, 'Sana''a is the capital of the Republic of Yemen. It is also the largest city in the country. It is located in the west central part of the country at 15.354722N 44.20667E. ', '2004-12-02 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2141, 29, 'The United Arab Emirates is a federation of seven emirates (a political territory ruled by a Muslim family king-like emir). It is located in the southeast part of the Arabian Peninsula on the Persian Gulf. It borders Oman to the south and Saudi Arabia to the west and southwest. The Persian Gulf surrounds the rest of the emirates, which include; Abu Dhabi, Dubai, Sharjah, Ajman, Umm al Quwain, Ras al-Khaiman, and Fujairah. From the 18th through the early 20th centuries this area was called the Pirate Coast.', '2004-11-05 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2142, 29, 'The Republic of Cameroon''s coastline is on the Bight of Bonny, part of the Gulf of Guinea and Atlantic Ocean. This forms Cameroon''s eastern border. Nigeria is on its western border, with Chad to the northeast, the Central African Republic to the east, Equatorial Guinea, Gabon and the Republic of the Congo to the south.', '2004-11-06 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2143, 29, 'The Hashemite Kingdom of Jordan is a Western Asian country that spans the southern part of the Syrian Desert. Jordan shares borders with Syria to the north, Iraq to the northeast, Saudi Arabia to the east and south, the Gulf of Aqaba to the southwest. Israel and the West Bank are to its west. Israel and Jordan share control of the Dead Sea.', '2004-11-07 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2144, 29, 'The Hanish Islands, in the Red Sea are claimed by both Yemen and Eritrea. Yemen has full ownership of the larger island, with Eritrea owning the peripheral islands to the southwest of the larger islands.', '2004-11-08 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2145, 29, 'Newfoundland and Labrador is the easternmost province of Canada. It sits on the Atlantic Coast of northeastern North America. It is made up or two main parts, the mainland area of Labrador and to the southeast of that, the island of Newfoundland. Labrador''s southern and western neighbor is the province of Quebec. The rest of it''s borders include the North Atlantic Ocean and the Gulf of St. Lawrence.', '2004-11-09 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2146, 29, 'The South Pole is the southernmost point on the surface of the Earth. It is located on the continent of Antarctica. The Amundsen-Scott South Pole Station belonging to the United States is located there. The nearest sea location is about 800 miles away at McMurdo Sound.', '2004-11-10 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2147, 29, 'Thimphu, Bhutan, the capital and largest city of the country, sprawls across the western slopes of the Wang Chuu river valley in west central Bhutan. It is located at an altitude over 7650 feet at 2728''00"N 8938''30"E.', '2004-11-11 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2148, 29, 'The continental divide forks in the south central part of Wyoming in an area known as the Great Divide Basin where the waters that flow or precipitate into this area remain there and cannot flow to any ocean. Instead, because of the overall aridity of Wyoming, water in the Great Divide Basin simply sinks into the soil or evaporates.', '2004-11-12 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2149, 29, 'Socotra is the largest of the over 200 islands that are territories of the Republic of Yemen. They are located in the Arabian Sea, about 260 miles south of Yemen off the coast of Somalia.', '2004-11-13 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2150, 29, 'The Kingdom of Swaziland, sometimes call Ngwane, a landlocked country in Southern Africa is bordered on the north, south and west by South Africa. Mozambique is its eastern neighbor. This small country is only 120 miles north to south and 78 miles across east to west.', '2004-11-14 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2151, 29, 'The islands of Lanzarote, Fuerteventura, Tenerife, and Gran Canaria are part of the Canary Islands off the coast of Africa, but they are considered an autonomous community of Spain, making them politically part of Europe.', '2004-11-15 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2152, 29, 'The smallest and most densely populated country in Central America is El Salvador. It borders the Pacific Ocean on its west coast, with Guatemala to the north and Honduras to the east and southeast, The Gulf of Fonseca is the southwestern border.', '2004-11-16 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2153, 29, 'The space chosen for the first nuclear fission reactor was a squash court under the football stadium at the University of Chicago, in Chicago, Illinois, when Enrico Fermi and a small band of scientists and engineers demonstrated that a simple construction of graphite bricks and uranium lumps could produce controlled heat.. ', '2004-11-17 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2154, 29, 'The Faroe Islands, in the North Atlantic, are an autonomous province of Denmark.', '2004-11-18 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2155, 29, 'Landlocked Uganda, in East Africa includes a large part of Lake Victoria on its southern border. Also bordering Uganda are Kenya on the east, Sudan on the north, the Democratic Republic of the Congo on the west, Rwanda on the southwest and Tanzania on the south.', '2004-11-19 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2156, 29, 'The Bolivarian Republic of Venezuela is one of the northernmost countries in South America. It''s entire northern border is Caribbean Sea coastline. It borders Guyana to the east, across the Essequibo River. Brazil is to the south and Colombia to the west. a number of Caribbean islands are not too far off the northern coastline, including St. Lucia, Curacao, Bonaire, Aruba and the Leeward Antilles.', '2004-11-20 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2157, 29, 'The Democratic Republic of Timor-Leste, more commonly known as East Timor, is in Southeast Asia. It comprises the eastern half of Timor Island, the nearby islands of Atauro and Jaco, as well as the exclave Oecussi-Ambeno on the northwestern side of the island. It is located about 400 miles northwest of Darwin, Australia.', '2004-11-21 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2158, 29, 'Western Asia is where we find the Republic of Iraq, also known as Mesopotamia. It spans much of the northwestern end of the Zagros mountain range, along with the eastern part of the Syrian Desert and the northern part of the Arabian Desert. Iraq is bordered by Jordan on the west, Syria on the northwest, Turkey on the north, Iran on the east, Kuwait and Saudi Arabia on the south.', '2004-11-22 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2159, 29, 'The Republic of Costa Rica, in Central America borders Nicaragua to its north, Panama to the east and south, the Pacific Ocean to the south and west, and the Caribbean Sea to the east. It is only 10 north of the equator.', '2004-11-23 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2160, 29, 'The Republic of Mozambique, a southeastern African nation is bordered by the Indian Ocean on the east, Tanzania on the north, Malawi and Zambia to the northwest, Zimbabwe to the west, and Swaziland and South Africa to the southwest. Geographically, Mozambique is divided into two regions by the Zambezi River as it runs primarily from west to east across the middle of the country. ', '2004-11-24 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2161, 29, 'Micronesia is a sub region of Oceania. It is made up of hundreds of small islands in the Western Pacific Ocean. Some of the islands and island groups in Micronesia include Wake island, the Mariana Islands, Guam, the Marshall Islands Nauru, and Kiribati.', '2004-11-25 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2162, 29, 'The Republic of Maldives is a string of 1190 islands in the Indian Ocean. All of the islands are five square miles or smaller in size, with only 198 of them inhabited. You will find them spanning an area of over 500 miles southwest of India.', '2004-11-26 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2163, 29, 'The island of Gibraltar at the southern end of the Iberian Peninsula and Europe, sits at the entrance to the Mediterranean Sea. It is a self-governing British overseas territory, but Spain disputes the British claim to the island.', '2004-11-27 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2164, 29, 'Timbuktu is a city in the West African nation of Mali. It is centrally located in that country just north of the Niger River. It is also at the juncture of a major east-west and a north-south Trans-Saharan trade route across the Sahara Desert.', '2004-11-28 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2165, 29, 'The Sargasso Sea is a region in the middle of the North Atlantic Ocean surrounded by ocean currents. It is bounded by the Gulf Stream on the west, the North Atlantic Current on the north, the Canary Current on the east, and the North Atlantic Equatorial Current on the south. It is the only "sea" without shores.', '2004-11-29 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2166, 29, 'The country of Bulgaria is almost the same size as Virginia, about 48,800 square miles.', '2004-11-30 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2167, 29, 'The Kingdom of Lesotho is a landlocked country entirely surrounded by the Republic of South Africa. It is the southernmost landlocked country in the world.', '2004-12-01 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2168, 29, 'The Republic of Rwanda, a landlocked country in east-central Africa is bordered by Uganda (north), Burundi (south), the Democratic Republic of the Congo (west), and Tanzania (east). Rwanda, a little bit smaller than Massachusetts is near the center of Africa, a few degrees south of the equator. ', '2004-12-03 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2169, 29, 'The Strait of Malacca (Melaka) separates the Malay Peninsula on the north and Sumatra on the south. It is the main shipping canal between the Indian Ocean and the Pacific Ocean, linking the major Asian economies of South Korea, China, Japan, and India.', '2004-12-04 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2170, 29, 'Honduras is a Central American republic previously known as Spanish Honduras. It borders Guatemala to its west, El Salvador to its southwest, Nicaragua to the southeast, the Gulf of Fonseca (part of the Pacific Ocean) to the south. The Gulf of Honduras, a large inlet of the Caribbean Sea is on the north.', '2004-12-05 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2171, 29, 'The Basque Country refers to an area comprised of the Spanish provinces of Alava, Vizcaya, Gipuzkoa, and the Autonomous Community of Navarra along with the French areas of Lower Navarre, Labourd, and Soule. This cultural region is in the western Pyrenees mountains between France and Spain on the Atlantic coast.', '2004-12-06 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2172, 29, 'One of the major rivers of the Indian subcontinent is the Ganges. It rises in the Western Himalaya Mountains and flows through India and Bangladesh on its way to the Bay of Bengal.', '2004-12-07 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2173, 29, 'Tavolara is the smallest kingdom on Earth. It is an island off the northeast coast of Sardinia, Italy that was never formally annexed by Italy, therefore it technically remains a "Kingdom".', '2004-12-08 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2174, 29, 'The Republic of the Gambia is the smallest country on mainland Africa. It is surrounded on three sides by Senegal and the fourth side is a small coast on the Atlantic Ocean. The Gambia is a narrow country whose borders mostly reflect the path of the Gambia River. The country is only about 29 miles across at its widest point.', '2004-12-09 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2175, 29, 'Patagonia is a geographic region that spans two countries, Chile and Argentina. It encompasses the southernmost part of South America, including the southern portion of the Andes Mountains in Chile to the west and south, and the terraces and steppe-like plains of Argentina to the east.', '2004-12-10 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2176, 29, 'Finland is one of the few countries in the world whose surface area is still expanding. Because of post-glacial rebound, it grows about 2.5 square miles a year.', '2004-12-11 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2177, 29, 'Guatemala, a Central American country is bordered by Mexico to the north and west, the Pacific Ocean to the southwest, Belize to the northeast, the Caribbean Sea to the east, and Honduras and El Salvador to the southeast. The capital, Guatemala City is also the largest city in Central America and the Caribbean. It is located in the south central part of the country.', '2004-12-12 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2178, 29, 'Belarus, a landlocked country in Eastern Europe is bordered by Latvia and Lithuania to the north, Poland to the west, Ukraine to the south, and Russia to the north and east. Belarus received about 70% of the radiation from the 1986 Chernobyl (in neighboring Ukraine) nuclear disaster and some areas are still being affected today.', '2004-12-13 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2179, 29, 'The Republic of Colombia in northwestern South America is bordered on the east by Venezuela and Brazil. It shares its southern border with Ecuador and Peru. Panama is to the northwest. Colombia is the only country to have a border with both the Pacific Ocean (west) and the Caribbean Sea (north).', '2004-12-14 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2180, 29, 'The Mojave Desert, sometimes called the High Desert covers a significant part of southeastern California, and a lesser area of central California, southern Nevada, southwestern Utah, and northwestern Arizona. Part of its boundaries are defined by the growth of the Joshua tree, otherwise the Sonoran Desert is on the southern boundary. The Tehachapi, San Gabriel, and San Bernardino mountain ranges along with the two largest faults in California, the San Andreas and Garlock, are part of the Mohave Desert.. The Great Basin shrub steppe is to the north.', '2004-12-15 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2181, 29, 'The Dahlak Archipelago, an island group near Massawa, Eritrea in the Red Sea is known for its pearl fisheries. Kebir is the largest, most populated of the island group. Three others have permanent resident communities.', '2004-12-16 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2182, 29, 'Ho Chi Minh City, formerly Saigon is the largest city in Vietnam. It is located on the banks of the Saigon River approximately 37 miles from the South China Sea in the far south of the country.', '2004-12-17 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2183, 29, 'The southernmost city in the world is a topic of dispute between Chile and Argentina. Chile says it is Puerto Williams, Chile, about 60 miles south of Ushuaia, Argentina''s claim as the southernmost city. Puerto Williams has a population of around 2,000, not meeting the Chilean definition of a city (an urban entity having more than 5,000 inhabitants), while Ushuaia has 64,000 residents. Both sit on the southernmost tip of South America, south of the Strait of Magellan. ', '2004-12-18 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2184, 29, 'Quemoy and nearby Matsu island are areas that are in dispute between Communist China and the Nationalist government in Taiwan.', '2004-12-19 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2185, 29, 'The largest city and capital of Slovenia, Ljubljana is the geographic, as well as cultural, scientific, economic, administrative and political center of the country. It sits at an altitude of 980 feet in the Ljubljanica River valley at the confluence of the Ljubljanica and Sava rivers. ', '2004-12-20 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2186, 29, 'The Kurile Islands are administered by Russia, but Japan maintains a claim on the four southernmost islands of Kunashiri, Etorofu, Shikotan, and Habomai.', '2004-12-21 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2187, 29, 'Lake Tanganyika forms much of the southwestern border of the Republic of Burundi, an eastern African nation. Burundi''s other neighbors include'' Rwanda to the north, Tanzania to the east and south, and the Democratic Republic of the Congo to the west.', '2004-12-22 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2188, 29, 'The Republic of Ecuador is one of only two South American countries that does not share a border with Brazil. (Chile is the other.) It does share a border with Colombia on the north, Peru on the south and east, and the Pacific Ocean on the west.', '2004-12-23 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2189, 29, 'Bethlehem is in the central West Bank of Palestine, about 6 miles south of Jerusalem. There are several translations for the name, "House of Meat", "House of Food", "House of Bread" are the most common.', '2004-12-24 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2190, 29, 'The northernmost point on earth is known as the North Pole, sometimes called either the Geographic North Pole or the Terrestrial North Pole. This point lies in the middle of the Arctic Ocean amidst waters almost permanently covered with constantly shifting sea ice, so there is not a way to construct a permanent station there, as at the South Pole.', '2004-12-25 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2191, 29, 'Belize, formerly known as British Honduras is in Central America. It''s northern border is with Mexico. Guatemala is to the south and west and the Caribbean Sea is on the east. It is the only Central American country with a British colonial heritage. The world''s second longest barrier reef flanks much of its marshy coastline.', '2004-12-26 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2192, 29, 'The Syrian Arab Republic, in western Asia borders Lebanon and the Mediterranean Sea to the west, Turkey to the north, Iraq to the east, Jordan to the south and Israel to the southwest. Syria is one of 15 countries that are part of what is called the "Cradle of Civilization".', '2004-12-27 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2193, 29, 'The Lesser Antilles are a group of islands include the US Virgin Islands, British Islands, Saint Kitts, Antigua, Montserrat, Guadeloupe, Grenada, Martinique, Barbados, Trinidad and Tobago, Aruba, Curacao, Bonaire, La Tortuga and a number of smaller islands. Together with the Bahamas, the Turks and Caicos Islands and the islands of the Greater Antilles (Cuba, Jamaica, Hispaniola, and Puerto Rico) make up what is commonly called the West Indies.', '2004-12-28 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2194, 29, 'The Republic of Senegal in western Africa is bordered by Mauritania on the north, Mali on the east, Guinea and Guinea-Bissau on the south. It encircles The Gambia on all sides by the west and is bounded by the Atlantic Ocean on the west. Senegal''s capital city, Dakar sits on the Cap-Vert peninsula, the westernmost point on the continent of Africa.', '2004-12-29 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2195, 29, 'Prague is the largest city and capital of the Czech Republic. It is situated on the Vltava River in the central Bohemia region and is spread, like Rome over nine hills, Letna, Vitkov, Opys, Vetrov, Skalka, Emauzy, Vysehrad, Karlov, and Petrin, the highest.', '2004-12-30 00:00:00.000', 1, '2010-01-07 14:46:43.597')
INSERT INTO [dbo].[widget_content] ([id], [widget_apps_id], [data], [mydate], [default_data], [installation_date]) VALUES (2196, 29, 'The Republic of Angola, in south-central Africa is bordered by Namibia on the south, the Democratic Republic of the Congo on the north, Zambia on the east and the Atlantic Ocean on the west. The excalve province of Cabinda has borders with both the Republic of the Congo and the Democratic Republic of the Congo.', '2004-12-31 00:00:00.000', 1, '2010-01-07 14:46:43.597')
print 'Adjusting custom_settings_ind on settings tables'
/*
Description: Compares the values in the settings columns
(those that would be found in [default_settings])in [school_settings],
[student_settings], and [student_subject] tables to determine if a customization has
been made. If one is found then the respective rows custom_settings_ind
field is set to true.
[default_settings] is compared to [school_settings]
[school_settings] is compared to [student_settings]
[student_settings] is compared to [student_subject]
(Note: The below description of FK and PK is for
sosschool where [student_settings] is replaced with [class])
In addition to comparing the values in the settings
columns for [class] to [student_subject], the foreign
and primary key for these are also compared (in the join)
to ensure that student_subjects records are compared to the correct
class records.
The best way to quickly understand what this code does it
to print @upd (see below) for each iteration. This will show
you the UPDATE statements it generates and eventually executes. Be sure
the exec[ute] statement is commented out first so no manipulations are
performed on the db */
declare @table_column as nvarchar(128)
declare @parent_column as nvarchar(128)
declare @settings_table as varchar(max)
declare @parent_table as varchar(max)
declare @pk as varchar(max)
declare @fk as varchar(max)
declare @parentPK as varchar(max)
declare @depth as int
declare @settings_tables table (table_name varchar(max), depth int, pk varchar(max), fk varchar(max))
declare @excluded_colums table (column_name varchar(max))
declare @sql varchar(max); set @sql = ''
declare @upd varchar(max)
/* Create tmp table to store settings table whose custom_settings_ind
will conditionally be updated. default_settings is the root table
and won't be updated. The depth field defines a sort of
parent child relationship where a table is a parent of another
table where it's depth equals the child table's depth minus 1.
Child tables are compared to parent tables to determine whether
or not the child should be updated. In some cases, the parent
and child need to be joined by the parent pk and the child's fk
for example: class and student_subject (sosschool). When this is needed,
the pk and fk fields are set and this conditional is added to
the update statement (@upd) below.
*/
insert into @settings_tables values ('default_settings', 0, '', '')
insert into @settings_tables values ('school_settings', 1, '', '')
insert into @settings_tables values ('student_settings', 2, 'student_id', '')
insert into @settings_tables values ('student_subject', 3, '', 'student_id')
/* We don't want certain columns to affect custom_settings_ind so
we create a temp table here to exclude them during processing.
*/
insert into @excluded_colums values ('access_new_homepage_ind')
insert into @excluded_colums values ('access_homepage_web_ind')
insert into @excluded_colums values ('access_google_ind')
/* for each table in @settings_table */
declare c_settings_tables cursor for
select *
from @settings_tables
order by depth asc
open c_settings_tables
fetch next from c_settings_tables into @settings_table, @depth, @pk, @fk
while @@fetch_status = 0
begin
/* If table is root table (default_settings) then continue.
It won't need to be updated. */
if @depth = 0
begin
fetch next from c_settings_tables into @settings_table, @depth, @pk, @fk
continue
end
print 'updating custom_settings_ind for ' + @settings_table + ''''
/* default all rows to custom_settings_ind=0 before conditionally
updating to custom_settings_ind=1*/
exec ('update ' + @settings_table + ' set custom_settings_ind=0')
/* Get the parent table of the current table */
select @parent_table = table_name
from @settings_tables
where depth = (@depth - 1)
/* for each column in settings table (@settings_table) which is also in default_settings */
declare c_table_settings_columns cursor for
select lower(s.column_name)
from information_schema.columns s
inner join information_schema.columns d
on s.column_name = d.column_name
where s.table_name = @settings_table and
d.table_name = 'default_settings' and
lower(s.column_name) not in (select column_name
from @excluded_colums)
open c_table_settings_columns
fetch next from c_table_settings_columns into @table_column
while @@fetch_status = 0
begin
/* for each column that is in the parent table (@settings_table) */
declare c_parent_table_columns cursor for
select lower(column_name) from information_schema.columns
where table_name = @parent_table
open c_parent_table_columns
fetch next from c_parent_table_columns into @parent_column
while @@fetch_status = 0
begin
if @table_column = @parent_column
begin
/* set custom_settings_ind=1 on @settings_table where
column values don't equal the corresponding parent values */
set @upd = '
update s
set custom_settings_ind = 1
from ' + @settings_table + ' s
inner join ' + @parent_table + ' p
on p.' + @parent_column + ' != s.' + @table_column + '
'
if (@fk != '')
begin
set @upd = @upd +
' and p.' + @parentPK + ' = s.' + @fk
end
-- print (@upd) -- for debugging
set @sql = @sql + @upd
end
fetch next from c_parent_table_columns into @parent_column
end
Close c_parent_table_columns
Deallocate c_parent_table_columns
fetch next from c_table_settings_columns into @table_column
end
Close c_table_settings_columns
Deallocate c_table_settings_columns
set @parentPK = @pk
fetch next from c_settings_tables into @settings_table, @depth, @pk, @fk
end
-- print @sql /* NOTE: PRINT truncates at 8000 chars. Print out @upd above for better debugging.*/
exec (@sql)
Close c_settings_tables
Deallocate c_settings_tables
/*
Run this script on:
GL-C7MCHN1-P\SOSHOME309.SOSHOME2010 - This database will be modified
to synchronize it with:
(local).soshome2011
You are recommended to back up your database before running this script
Script created by SQL Compare version 8.1.0 from Red Gate Software Ltd at 12/22/2010 12:06:26 PM
*/
SET NUMERIC_ROUNDABORT OFF
GO
SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE id=OBJECT_ID('tempdb..#tmpErrors')) DROP TABLE #tmpErrors
GO
CREATE TABLE #tmpErrors (Error int)
GO
SET XACT_ABORT ON
GO
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
GO
BEGIN TRANSACTION
if object_id('Stored_Procedure_Name') is not null
begin
print 'PREDROP: Stored_Procedure_Name'
drop proc Stored_Procedure_Name
end
go
GO
PRINT N'Dropping foreign keys from [dbo].[todo]'
GO
ALTER TABLE [dbo].[todo] DROP
CONSTRAINT [FK_todo_user]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Dropping constraints from [dbo].[homepage]'
GO
ALTER TABLE [dbo].[homepage] DROP CONSTRAINT [DF_homepage_rss1]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Dropping constraints from [dbo].[homepage]'
GO
ALTER TABLE [dbo].[homepage] DROP CONSTRAINT [DF_homepage_rss2]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Dropping constraints from [dbo].[homepage]'
GO
ALTER TABLE [dbo].[homepage] DROP CONSTRAINT [DF_homepage_rss3]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Dropping constraints from [dbo].[homepage]'
GO
ALTER TABLE [dbo].[homepage] DROP CONSTRAINT [DF_homepage_rss4]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Dropping constraints from [dbo].[homepage]'
GO
ALTER TABLE [dbo].[homepage] DROP CONSTRAINT [DF_homepage_rss5]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[student_attendance]'
GO
CREATE TABLE [dbo].[student_attendance]
(
[term_id] [int] NOT NULL,
[student_id] [uniqueidentifier] NOT NULL,
[calendar_month] [tinyint] NOT NULL,
[calendar_year] [smallint] NOT NULL,
[calendar_days] [varchar] (31) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating primary key [PK_student_attendance] on [dbo].[student_attendance]'
GO
ALTER TABLE [dbo].[student_attendance] ADD CONSTRAINT [PK_student_attendance] PRIMARY KEY CLUSTERED ([term_id], [student_id], [calendar_month], [calendar_year])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[DeleteStudentAttendance]'
GO
IF OBJECT_ID('DeleteStudentAttendance') IS NOT NULL
BEGIN
PRINT N'-Dropping proc DeleteStudentAttendance'
DROP PROC DeleteStudentAttendance
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc DeleteStudentAttendance'
GO
CREATE Procedure DeleteStudentAttendance
/* Param List */
@TermId as int,
@StudentId as uniqueidentifier
AS
/******************************************************************************
** File:
** Name: DeleteStudentAttendance
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
--Delete items from student_attendance
DELETE FROM student_attendance
WHERE term_id = @TermId
AND student_id = @StudentId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[DeleteStudentAttendanceMonth]'
GO
IF OBJECT_ID('DeleteStudentAttendanceMonth') IS NOT NULL
BEGIN
PRINT N'-Dropping proc DeleteStudentAttendanceMonth'
DROP PROC DeleteStudentAttendanceMonth
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc DeleteStudentAttendanceMonth'
GO
CREATE Procedure DeleteStudentAttendanceMonth
/* Param List */
@TermId int,
@Month tinyint,
@Year smallint,
@StudentId uniqueidentifier,
@InsertDeletedInd as bit,
@DeletedDate as datetime
AS
DELETE student_attendance
WHERE term_id = @TermId
AND calendar_month = @Month
AND calendar_year = @Year
AND student_id = @StudentId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetStudentAttendance]'
GO
IF OBJECT_ID('GetStudentAttendance') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetStudentAttendance'
DROP PROC GetStudentAttendance
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetStudentAttendance'
GO
CREATE Procedure GetStudentAttendance
/* Param List */
@TermId int,
@StudentId uniqueidentifier
AS
SELECT calendar_month, calendar_year, calendar_days
FROM student_attendance
WHERE term_id = @TermId AND student_id = @StudentId
ORDER BY calendar_year, calendar_month
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetStudentAttendanceStatus]'
GO
IF OBJECT_ID('GetStudentAttendanceStatus') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetStudentAttendanceStatus'
DROP PROC GetStudentAttendanceStatus
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetStudentAttendanceStatus'
GO
CREATE Procedure GetStudentAttendanceStatus
/* Param List */
@TermId int,
@StudentId uniqueidentifier
AS
SELECT COUNT(*)
FROM student_attendance
WHERE term_id = @TermId AND student_id = @StudentId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[SaveStudentAttendanceMonth]'
GO
IF OBJECT_ID('SaveStudentAttendanceMonth') IS NOT NULL
BEGIN
PRINT N'-Dropping proc SaveStudentAttendanceMonth'
DROP PROC SaveStudentAttendanceMonth
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc SaveStudentAttendanceMonth'
GO
CREATE Procedure SaveStudentAttendanceMonth
/* Param List */
@TermId int,
@StudentId uniqueidentifier,
@Month tinyint,
@Year smallint,
@Days varchar(31),
@ModifiedDate datetime
AS
-- If month already exists,
IF (SELECT COUNT(*)
FROM student_attendance
WHERE term_id = @TermId
AND student_id = @StudentId
AND calendar_month = @Month
AND calendar_year = @Year) > 0
BEGIN
-- Update it
UPDATE student_attendance
SET calendar_days = @Days
WHERE term_id = @TermId
AND student_id = @StudentId
AND calendar_month = @Month
AND calendar_year = @Year
END
ELSE
BEGIN
-- Otherwise add a new month to the Student calendar
INSERT INTO student_attendance(term_id, student_id, calendar_month, calendar_year, calendar_days)
Values (@TermId, @StudentId, @Month, @Year, @Days)
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetBibleVerses]'
GO
SET QUOTED_IDENTIFIER OFF
GO
IF OBJECT_ID('GetBibleVerses') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetBibleVerses'
DROP PROC GetBibleVerses
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetBibleVerses'
GO
CREATE Procedure GetBibleVerses
(
@translation nvarchar(255),
@book nvarchar(255),
@chapter float,
@beginning_versenum float,
@ending_versenum float
)
AS
/******************************************************************************
** File: GetBibleVerses.sql
** Name: GetBibleVerses
** Desc: returns a recordset of Bible verses
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
Select verse_text
from bible
where
Translation = @translation and
Book = @book and
Chapter = @chapter and
Verse_Num >= @beginning_versenum and
Verse_Num <= @ending_versenum
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[school_rss]'
GO
ALTER TABLE [dbo].[school_rss] ADD
[rssTitle] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
ALTER TABLE [dbo].[school_rss] ALTER COLUMN [rssUrl] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[CRUDSchoolRSS]'
GO
SET QUOTED_IDENTIFIER ON
GO
IF OBJECT_ID('[dbo].[CRUDSchoolRSS]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[CRUDSchoolRSS]'
DROP PROC [dbo].[CRUDSchoolRSS]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[CRUDSchoolRSS]'
GO
CREATE Procedure [dbo].[CRUDSchoolRSS]
@FeedId as int = 1,
@URL as nvarchar(max) = ' ',
@FeedQuant as int = 1,
@RssTitle as nvarchar(50) = 'RSS Feed',
@CRUD char -- create, retrieve, update, delete
as
set @CRUD = upper(@CRUD)
if @CRUD = 'C'
begin
if not exists (select rssFeedNumber
from school_rss
WHERE rssFeedNumber = @FeedId)
begin
insert into school_rss
(rssFeedNumber, rssURL, rssQuantity, rssTitle) values (@FeedId, @URL, @FeedQuant, @RssTitle )
end
end
if @CRUD = 'R'
begin
select * from school_rss
end
if @CRUD = 'U'
begin
if not exists (select rssFeedNumber
from school_rss
WHERE rssFeedNumber = @FeedId)
begin
insert into school_rss
(rssFeedNumber, rssURL, rssQuantity,rssTitle) values (@FeedId, @URL, @FeedQuant,@RssTitle )
end
else
begin
UPDATE
school_rss
SET
rssURL = @URL,
rssQuantity = @FeedQuant,
rssTitle = @RssTitle
WHERE
rssFeedNumber = @FeedId
end
end
if @CRUD = 'D'
begin
delete from school_rss
where rssFeedNumber = @FeedId
end
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetBibleVerses2]'
GO
SET QUOTED_IDENTIFIER OFF
GO
IF OBJECT_ID('[dbo].[GetBibleVerses2]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetBibleVerses2]'
DROP PROC [dbo].[GetBibleVerses2]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetBibleVerses2]'
GO
CREATE Procedure [dbo].[GetBibleVerses2]
(
@translation nvarchar(255),
@book nvarchar(255),
@chapter_from int,
@chapter_to int,
@verse_from int,
@verse_to int
)
AS
select * from bible
where
translation = @translation and
book = @book and
(
(@chapter_from = @chapter_to and
@chapter_from = chapter and
@verse_from <= verse_num and
@verse_to >= verse_num
)or
(
@chapter_from <> @chapter_to and
(
(@chapter_from = chapter and @verse_from <= verse_num) or
(@chapter_to = chapter and @verse_to >= verse_num)
)
)or
(chapter > @chapter_from and chapter < @chapter_to)
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[ClearStudentAttendance]'
GO
SET QUOTED_IDENTIFIER ON
GO
IF OBJECT_ID('ClearStudentAttendance') IS NOT NULL
BEGIN
PRINT N'-Dropping proc ClearStudentAttendance'
DROP PROC ClearStudentAttendance
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc ClearStudentAttendance'
GO
CREATE Procedure ClearStudentAttendance
/* Param List */
@TermId int,
@StudentId uniqueidentifier
AS
DELETE FROM student_attendance
WHERE term_id = @TermId
AND student_id = @StudentId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[ImportStudentAttendance]'
GO
IF OBJECT_ID('ImportStudentAttendance') IS NOT NULL
BEGIN
PRINT N'-Dropping proc ImportStudentAttendance'
DROP PROC ImportStudentAttendance
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc ImportStudentAttendance'
GO
CREATE Procedure ImportStudentAttendance
@TermId as int,
@StudentId as uniqueidentifier,
@CalendarMonth as tinyint,
@CalendarYear as smallint,
@CalendarDays as varchar(31)
AS
IF (SELECT COUNT(*)
FROM student_attendance
WHERE term_id = @TermId AND student_id = @StudentId AND calendar_month = @CalendarMonth AND calendar_year = @CalendarYear) = 0
BEGIN
/* only insert new values if they do not already exist for this student, month, year */
INSERT INTO student_attendance(term_id, student_id, calendar_month, calendar_year, calendar_days)
VALUES(@TermId, @StudentId, @CalendarMonth, @CalendarYear, @CalendarDays)
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[subject_time_information]'
GO
CREATE TABLE [dbo].[subject_time_information]
(
[subject_time_id] [int] NOT NULL IDENTITY(1, 1),
[student_id] [uniqueidentifier] NOT NULL,
[term_id] [int] NOT NULL,
[subject] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[hours] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[minutes] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating primary key [PK_subject_time_information] on [dbo].[subject_time_information]'
GO
ALTER TABLE [dbo].[subject_time_information] ADD CONSTRAINT [PK_subject_time_information] PRIMARY KEY CLUSTERED ([subject_time_id])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[DeleteSubjectTimeInformation]'
GO
IF OBJECT_ID('DeleteSubjectTimeInformation') IS NOT NULL
BEGIN
PRINT N'-Dropping proc DeleteSubjectTimeInformation'
DROP PROC DeleteSubjectTimeInformation
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc DeleteSubjectTimeInformation'
GO
CREATE Procedure DeleteSubjectTimeInformation
@SubjectTimeId int
AS
DELETE FROM subject_time_information
WHERE subject_time_id = @SubjectTimeId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[SaveSubjectTimeInformation]'
GO
IF OBJECT_ID('SaveSubjectTimeInformation') IS NOT NULL
BEGIN
PRINT N'-Dropping proc SaveSubjectTimeInformation'
DROP PROC SaveSubjectTimeInformation
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc SaveSubjectTimeInformation'
GO
CREATE Procedure SaveSubjectTimeInformation
/* Param List */
@StudentId uniqueidentifier,
@TermId int,
@Subject varchar(100),
@Hours varchar(10),
@Minutes varchar(10),
@SubjectTimeId int
AS
-- If row already exists,
IF (SELECT COUNT(*)
FROM subject_time_information
WHERE subject_time_id = @SubjectTimeId) > 0
BEGIN
-- Update it
UPDATE subject_time_information
SET subject = @Subject,
hours = @Hours,
minutes = @Minutes
WHERE subject_time_id = @SubjectTimeId
END
ELSE
BEGIN
-- Otherwise add a new subject time info
INSERT INTO subject_time_information(student_id, term_id, subject, hours, minutes)
VALUES (@StudentId, @TermId, @Subject, @Hours, @Minutes)
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[homepage]'
GO
ALTER TABLE [dbo].[homepage] ADD
[rss_title1] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_homepage_rss_title1] DEFAULT ('RSS Feed 1'),
[rss_title2] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_homepage_rss_title2] DEFAULT ('RSS Feed 2'),
[rss_title3] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_homepage_rss_title3] DEFAULT ('RSS Feed 3'),
[rss_title4] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_homepage_rss_title4] DEFAULT ('RSS Feed 4'),
[rss_title5] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_homepage_rss_title5] DEFAULT ('RSS Feed 5')
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
ALTER TABLE [dbo].[homepage] ALTER COLUMN [rss1] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
ALTER TABLE [dbo].[homepage] ALTER COLUMN [rss2] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
ALTER TABLE [dbo].[homepage] ALTER COLUMN [rss3] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
ALTER TABLE [dbo].[homepage] ALTER COLUMN [rss4] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
ALTER TABLE [dbo].[homepage] ALTER COLUMN [rss5] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[RUDHomepageRSS]'
GO
IF OBJECT_ID('[dbo].[RUDHomepageRSS]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[RUDHomepageRSS]'
DROP PROC [dbo].[RUDHomepageRSS]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[RUDHomepageRSS]'
GO
CREATE Procedure [dbo].[RUDHomepageRSS]
@UserId as uniqueidentifier,
@FeedId as int = 1,
@URL as nvarchar(max) = ' ',
@FeedQuant as int = 1,
@RssTitle as nvarchar(50) = 'RSS Feed',
@CRUD char -- create, retrieve, update, delete
as
set @CRUD = upper(@CRUD)
if @CRUD = 'R'
begin
select * from homepage where user_id = @UserId
end
if @CRUD = 'U'
begin
IF @FeedId = 1
BEGIN
UPDATE
homepage
SET
rss1 = @URL,
rssQuantity1 = @FeedQuant,
rss_title1 = @RssTitle
WHERE
user_id = @UserId
END
IF @FeedId = 2
BEGIN
UPDATE
homepage
SET
rss2 = @URL,
rssQuantity2 = @FeedQuant,
rss_title2 = @RssTitle
WHERE
user_id = @UserId
END
IF @FeedId = 3
BEGIN
UPDATE
homepage
SET
rss3 = @URL,
rssQuantity3 = @FeedQuant,
rss_title3 = @RssTitle
WHERE
user_id = @UserId
END
IF @FeedId = 4
BEGIN
UPDATE
homepage
SET
rss4 = @URL,
rssQuantity4 = @FeedQuant,
rss_title4 = @RssTitle
WHERE
user_id = @UserId
END
IF @FeedId = 5
BEGIN
UPDATE
homepage
SET
rss5 = @URL,
rssQuantity5 = @FeedQuant,
rss_title5 = @RssTitle
WHERE
user_id = @UserId
END
end
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[student_settings]'
GO
ALTER TABLE [dbo].[student_settings] ADD
[audiofeedback_disabled] [bit] NOT NULL CONSTRAINT [DF_student_settings_audiofeedback_disabled] DEFAULT ((0))
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[school_settings]'
GO
ALTER TABLE [dbo].[school_settings] ADD
[school_name] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetSchoolName]'
GO
IF OBJECT_ID('GetSchoolName') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetSchoolName'
DROP PROC GetSchoolName
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetSchoolName'
GO
CREATE Procedure GetSchoolName
/* Param List */
AS
/******************************************************************************
** File:
** Name: GetSchoolName
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SELECT school_name FROM school_settings
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[SaveSchoolName]'
GO
IF OBJECT_ID('SaveSchoolName') IS NOT NULL
BEGIN
PRINT N'-Dropping proc SaveSchoolName'
DROP PROC SaveSchoolName
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc SaveSchoolName'
GO
CREATE Procedure SaveSchoolName
/* Param List */
@SchoolName varchar(100)
AS
/******************************************************************************
** File:
** Name: SaveSchoolName
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
UPDATE school_settings
SET school_name = @SchoolName
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetAssignmentsOn]'
GO
IF OBJECT_ID('GetAssignmentsOn') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetAssignmentsOn'
DROP PROC GetAssignmentsOn
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetAssignmentsOn'
GO
CREATE Procedure GetAssignmentsOn
/* Param List */
@StudentId as uniqueidentifier,
@Date as varchar(50),
@TermId as int
AS
/******************************************************************************
** File:
** Name: GetAssignmentsOn
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth: Paul Shippy
** Date: 11/07/02
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
** 11/14/02 Paul Shippy Added alp_sequence
** 11/25/02 Paul Shippy Renamed, and handled start date
** 12/17/02 Paul Shippy Added cd_number
** 2/20/02 Paul Shippy Added needs_grading
** 12/27/2004 Mark Stasi Added total_time
** 1/11/05 Mark Stasi Added sa.vocab_game_wins, sa.vocab_game_count, sa.vocab_game_time
*******************************************************************************/
SELECT sa.id, sa.sequence_nbr, sa.completed_ind, sa.score, sa.due_date, sa.blocked_ind, sa.custom_xml,
sa.student_unit_id, sa.title, sa.folder, sa.[filename], sa.namespace as 'subject_namespace',
sa.assignment_type, sa.time_to_work, ss.id as 'subject_id', ss.title as 'subject_title', su.title as 'unit_title',
len(sa.notepad) as notepad_length, ss.student_id, u.[username], sa.alp_sequence, sa.start_date, sa.cd_number, sa.total_time, sa.first_accessed, sa.vocab_game_points, sa.vocab_game_count, sa.vocab_game_time,
'needs_grading' = (SELECT count(*) FROM student_problem
WHERE student_assignment_id = sa.id
AND grading_completed_ind = 0
AND auto_graded_problem_ind = 0
AND student_completed_ind = 1
AND assigned_ind = 1)
FROM student_assignment sa
JOIN student_unit su ON su.id = sa.student_unit_id
JOIN student_subject ss ON ss.id = su.student_subject_id
JOIN [user] u ON u.[user_id] = ss.student_id
WHERE CAST(sa.due_date AS DATETIME) >= CAST(@Date AS DATETIME)
AND CAST(sa.start_date AS DATETIME) <= CAST(@Date AS DATETIME)
AND (((charindex((SELECT DATENAME(dw, CAST(@Date AS DATETIME))), (select days_of_week from student_subject where [id] = ss.[id])) > 0) AND sa.assignment_type = 'Project') OR (sa.completed_ind = 1) OR (sa.assignment_type <> 'Project') OR (sa.assignment_type = 'Project' AND (CAST(sa.due_date AS DATETIME) = CAST(@Date AS DATETIME))))
AND ss.student_id = @StudentId
AND su.term_id = @TermId
ORDER BY ss.title, CAST(sa.start_date AS DATETIME), sa.alp_sequence, sa.sequence_nbr
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetSettingsStudent]'
GO
IF OBJECT_ID('GetSettingsStudent') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetSettingsStudent'
DROP PROC GetSettingsStudent
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetSettingsStudent'
GO
CREATE Procedure GetSettingsStudent
/* Param List */
@id uniqueidentifier
AS
/******************************************************************************
** File:
** Name: GetSettingsStudent
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
IF (SELECT COUNT(*)
FROM student_settings
WHERE student_id = @id) > 0
BEGIN
SELECT
access_internet_ind,
max_problem_attempts,
tf_max_problem_attempts,
unlimited_problem_attempts,
leave_msg_skip_ind,
quiz_leave_msg_skip_ind,
quiz_notify_correct_incorrect_ind,
quiz_open_page_ind,
quiz_open_book_ind,
easy_spelling_ind,
quiz_access_answer_key_ind,
access_answer_key_ind,
quiz_easy_spelling_ind,
student_print_ind,
bible_translation,
access_lesson_calculator_ind,
access_lesson_dictionary_ind,
access_lesson_periodic_table_ind,
access_quiz_calculator_ind,
access_quiz_dictionary_ind,
access_quiz_periodic_table_ind,
access_test_calculator_ind,
access_test_dictionary_ind,
access_test_periodic_table_ind,
access_project_calculator_ind,
access_project_dictionary_ind,
access_project_periodic_table_ind,
access_homepage_calculator_ind,
access_homepage_dictionary_ind,
access_homepage_periodic_table_ind,
display_percent_ind,
display_letter_ind,
a_minimum,
b_minimum,
c_minimum,
d_minimum,
lesson_weight,
quiz_weight,
test_weight,
project_weight,
spelling_penalty,
quiz_spelling_penalty,
problem_attempts_penalty,
test_access_answer_key_ind,
test_leave_msg_skip_ind,
test_notify_correct_incorrect_ind,
test_open_book_ind,
test_open_page_ind,
test_spelling_penalty,
test_easy_spelling_ind,
access_allright_ind,
access_farmerfrank_ind,
access_vocab_games_ind,
quiz_notify_parent_ind,
test_notify_parent_ind,
custom_settings_ind,
advanced_lesson_planning_ind,
active_ind,
current_term_id,
audiofeedback_disabled
FROM
student_settings
WHERE
student_id = @id
END
ELSE
BEGIN
SELECT
access_internet_ind,
max_problem_attempts,
tf_max_problem_attempts,
unlimited_problem_attempts,
leave_msg_skip_ind,
quiz_leave_msg_skip_ind,
quiz_notify_correct_incorrect_ind,
quiz_open_page_ind,
quiz_open_book_ind,
easy_spelling_ind,
quiz_access_answer_key_ind,
access_answer_key_ind,
quiz_easy_spelling_ind,
student_print_ind,
bible_translation,
access_lesson_calculator_ind,
access_lesson_dictionary_ind,
access_lesson_periodic_table_ind,
access_quiz_calculator_ind,
access_quiz_dictionary_ind,
access_quiz_periodic_table_ind,
access_test_calculator_ind,
access_test_dictionary_ind,
access_test_periodic_table_ind,
access_project_calculator_ind,
access_project_dictionary_ind,
access_project_periodic_table_ind,
access_homepage_calculator_ind,
access_homepage_dictionary_ind,
access_homepage_periodic_table_ind,
display_percent_ind,
display_letter_ind,
a_minimum,
b_minimum,
c_minimum,
d_minimum,
lesson_weight,
quiz_weight,
test_weight,
project_weight,
spelling_penalty,
quiz_spelling_penalty,
problem_attempts_penalty,
test_access_answer_key_ind,
test_leave_msg_skip_ind,
test_notify_correct_incorrect_ind,
test_open_book_ind,
test_open_page_ind,
test_spelling_penalty,
test_easy_spelling_ind,
access_allright_ind,
access_farmerfrank_ind,
access_vocab_games_ind,
quiz_notify_parent_ind,
test_notify_parent_ind,
custom_settings_ind = 0,
advanced_lesson_planning_ind = 0,
active_ind = 1,
current_term_id = (SELECT TOP 1 term_id FROM term),
audiofeedback_disabled = 0
FROM
school_settings
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetStudent]'
GO
IF OBJECT_ID('GetStudent') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetStudent'
DROP PROC GetStudent
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetStudent'
GO
CREATE Procedure GetStudent
/* Param List */
@studentId as uniqueidentifier
AS
/******************************************************************************
** File:
** Name: GetStudent
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SELECT u.[user_id], u.first_name, u.last_name, u.username, u.password, u.user_type, u.last_login, ss.advanced_lesson_planning_ind,
ss.active_ind, ss.current_term_id, individualized_learning_ind = ss.advanced_lesson_planning_ind , last_sync_date = null,
sync_access_ind = null, global_id = 0, audiofeedback_disabled
FROM [user] u JOIN student_settings ss ON u.user_id = ss.student_id
WHERE u.[user_id] = @studentId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetStudents]'
GO
IF OBJECT_ID('GetStudents') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetStudents'
DROP PROC GetStudents
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetStudents'
GO
CREATE Procedure GetStudents
/* No params */
@ActiveOnly bit
AS
/******************************************************************************
** File:
** Name: GetStudents
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
If @ActiveOnly = 1
BEGIN
SELECT u.user_id, u.first_name, u.last_name, s.bible_translation, individualized_learning_ind = s.advanced_lesson_planning_ind,
s.advanced_lesson_planning_ind, u.username, u.password, u.user_type, u.last_login,
s.active_ind, s.current_term_id, last_sync_date = null, sync_access_ind = 0, global_id = 0, audiofeedback_disabled
FROM [user] u
JOIN student_settings s ON u.user_id = s.student_id
WHERE s.active_ind = 1
ORDER BY u.username
END
Else
BEGIN
SELECT u.user_id, u.first_name, u.last_name, s.bible_translation, individualized_learning_ind = s.advanced_lesson_planning_ind, s.advanced_lesson_planning_ind,
u.username, u.password, u.user_type, u.last_login, s.active_ind, s.current_term_id, last_sync_date = null, sync_access_ind = 0, global_id = 0, audiofeedback_disabled
FROM [user] u
JOIN student_settings s ON u.user_id = s.student_id
ORDER BY u.username
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[SaveStudent]'
GO
IF OBJECT_ID('SaveStudent') IS NOT NULL
BEGIN
PRINT N'-Dropping proc SaveStudent'
DROP PROC SaveStudent
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc SaveStudent'
GO
CREATE Procedure SaveStudent
@StudentId as uniqueidentifier,
@FirstName as varchar(20),
@LastName as varchar(20),
@UserName as varchar(50),
@Password as varchar(12),
@ActiveInd as bit,
@CurrentTermId as int,
@AdvancedLessonPlanningInd as bit,
@AudioFeedbackDisabled as bit,
/* Added this unused parameter to match the school student object parameters*/
@SyncAccessInd as bit
AS
/******************************************************************************
** File:
** Name: SaveStudent
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
/*Variables used to store default values
*/
DECLARE @BibleTranslationDefault char(4)
DECLARE @QuizAccessAnswerKeyIndDefault bit
DECLARE @AccessAnswerKeyIndDefault bit
DECLARE @EasySpellingIndDefault bit
DECLARE @AccessHomepageCalculatorIndDefault bit
DECLARE @AccessHomepageDictionaryIndDefault bit
DECLARE @AccessHomepagePeriodicTableIndDefault bit
DECLARE @AccessInternetIndDefault bit
DECLARE @LeaveMsgSkipIndDefault bit
DECLARE @QuizLeaveMsgSkipIndDefault bit
DECLARE @AccessLessonCalculatorIndDefault bit
DECLARE @AccessLessonDictionaryIndDefault bit
DECLARE @AccessLessonPeriodicTableIndDefault bit
DECLARE @QuizNotifyCorrectIncorrectIndDefault bit
DECLARE @QuizOpenBookIndDefault bit
DECLARE @QuizOpenPageIndDefault bit
DECLARE @AccessProjectCalculatorIndDefault bit
DECLARE @AccessProjectDictionaryIndDefault bit
DECLARE @AccessProjectPeriodicTableIndDefault bit
DECLARE @AccessQuizCalculatorIndDefault bit
DECLARE @AccessQuizDictionaryIndDefault bit
DECLARE @AccessQuizPeriodicTableIndDefault bit
DECLARE @QuizEasySpellingIndDefault bit
DECLARE @DisplayLetterIndDefault bit
DECLARE @DisplayPercentIndDefault bit
DECLARE @StudentPrintIndDefault bit
DECLARE @AccessTestCalculatorIndDefault bit
DECLARE @AccessTestDictionaryIndDefault bit
DECLARE @AccessTestPeriodicTableIndDefault bit
DECLARE @UnlimitedProblemAttemptsDefault bit
DECLARE @AMinimumDefault int
DECLARE @BMinimumDefault int
DECLARE @CMinimumDefault int
DECLARE @DMinimumDefault int
DECLARE @LessonWeightDefault int
DECLARE @MaxProblemAttemptsDefault int
DECLARE @MaxTrueFalseProblemAttemptsDefault int
DECLARE @ProblemAttemptsPenaltyDefault int
DECLARE @ProjectWeightDefault int
DECLARE @QuizSpellingPenaltyDefault int
DECLARE @QuizWeightDefault int
DECLARE @SpellingPenaltyDefault int
DECLARE @TestWeightDefault int
DECLARE @TestAccessAnswerKeyIndDefault bit
DECLARE @TestLeaveMsgSkipIndDefault bit
DECLARE @TestNotifyCorrectIncorrectIndDefault bit
DECLARE @TestOpenBookIndDefault bit
DECLARE @TestOpenPageIndDefault bit
DECLARE @TestSpellingPenaltyDefault int
DECLARE @TestEasySpellingIndDefault bit
DECLARE @AccessAllRightIndDefault bit
DECLARE @AccessFarmerFrankIndDefault bit
DECLARE @AccessNewHomepageIndDefault bit
DECLARE @AccessHomepageWebIndDefault bit
DECLARE @AccessGoogleIndDefault bit
DECLARE @AccessVocabGamesIndDefault bit
DECLARE @QuizNotifyParentIndDefault bit
DECLARE @TestNotifyParentIndDefault bit
DECLARE @IsCustom bit
SET @IsCustom = 0
SELECT
@AccessHomepageCalculatorIndDefault = access_homepage_calculator_ind,
@AccessHomepageDictionaryIndDefault = access_homepage_dictionary_ind,
@AccessHomepagePeriodicTableIndDefault = access_homepage_periodic_table_ind,
@AccessProjectCalculatorIndDefault = access_project_calculator_ind,
@AccessProjectDictionaryIndDefault = access_project_dictionary_ind,
@AccessProjectPeriodicTableIndDefault = access_project_periodic_table_ind,
@AccessLessonCalculatorIndDefault = access_lesson_calculator_ind,
@AccessLessonDictionaryIndDefault = access_lesson_dictionary_ind,
@AccessLessonPeriodicTableIndDefault = access_lesson_periodic_table_ind,
@AccessQuizCalculatorIndDefault = access_quiz_calculator_ind,
@AccessQuizDictionaryIndDefault = access_quiz_dictionary_ind,
@AccessQuizPeriodicTableIndDefault = access_quiz_periodic_table_ind,
@AccessTestCalculatorIndDefault = access_test_calculator_ind,
@AccessTestDictionaryIndDefault = access_test_dictionary_ind,
@AccessTestPeriodicTableIndDefault = access_test_periodic_table_ind,
@BibleTranslationDefault = bible_translation,
@QuizAccessAnswerKeyIndDefault = quiz_access_answer_key_ind,
@AccessAnswerKeyIndDefault = access_answer_key_ind,
@EasySpellingIndDefault = easy_spelling_ind,
@AccessInternetIndDefault = access_internet_ind,
@LeaveMsgSkipIndDefault = leave_msg_skip_ind,
@QuizLeaveMsgSkipIndDefault = quiz_leave_msg_skip_ind,
@QuizNotifyCorrectIncorrectIndDefault = quiz_notify_correct_incorrect_ind,
@QuizOpenBookIndDefault = quiz_open_book_ind,
@QuizOpenPageIndDefault = quiz_open_page_ind,
@QuizEasySpellingIndDefault = quiz_easy_spelling_ind,
@DisplayLetterIndDefault = display_letter_ind,
@DisplayPercentIndDefault = display_percent_ind,
@StudentPrintIndDefault = student_print_ind,
@UnlimitedProblemAttemptsDefault = unlimited_problem_attempts,
@AMinimumDefault = a_minimum,
@BMinimumDefault = b_minimum,
@CMinimumDefault = c_minimum,
@DMinimumDefault = d_minimum,
@LessonWeightDefault = lesson_weight,
@MaxProblemAttemptsDefault = max_problem_attempts,
@MaxTrueFalseProblemAttemptsDefault = tf_max_problem_attempts,
@ProblemAttemptsPenaltyDefault = problem_attempts_penalty,
@ProjectWeightDefault = project_weight,
@QuizSpellingPenaltyDefault = quiz_spelling_penalty,
@QuizWeightDefault = quiz_weight,
@SpellingPenaltyDefault = spelling_penalty,
@TestWeightDefault = test_weight,
@TestAccessAnswerKeyIndDefault = test_access_answer_key_ind,
@TestLeaveMsgSkipIndDefault = test_leave_msg_skip_ind,
@TestNotifyCorrectIncorrectIndDefault = test_notify_correct_incorrect_ind,
@TestOpenBookIndDefault = test_open_book_ind,
@TestOpenPageIndDefault = test_open_page_ind,
@TestSpellingPenaltyDefault = test_spelling_penalty,
@TestEasySpellingIndDefault = test_easy_spelling_ind,
@AccessAllRightIndDefault = access_allright_ind,
@AccessFarmerFrankIndDefault = access_farmerfrank_ind,
@AccessNewHomepageIndDefault = access_new_homepage_ind,
@AccessHomepageWebIndDefault = access_homepage_web_ind,
@AccessGoogleIndDefault = access_google_ind,
@AccessVocabGamesIndDefault = access_vocab_games_ind,
@QuizNotifyParentIndDefault = quiz_notify_parent_ind,
@TestNotifyParentIndDefault = test_notify_parent_ind
FROM school_settings
IF (SELECT COUNT(*)
FROM [user]
WHERE user_id = @StudentId) > 0
BEGIN
IF (SELECT COUNT(*)
FROM [user]
WHERE username = @Username
AND user_id <> @StudentId) > 0
RETURN -100
ELSE
BEGIN
UPDATE [user]
SET first_name = @FirstName,
last_name = @LastName,
username = @UserName,
password = @Password
WHERE user_id = @StudentId
UPDATE student_settings
SET active_ind = @ActiveInd,
current_term_id = @CurrentTermId,
advanced_lesson_planning_ind = @AdvancedLessonPlanningInd,
audiofeedback_disabled = @AudioFeedbackDisabled
WHERE student_id = @StudentId
END
END
ELSE
BEGIN
--Verify that username doesn't already exist
IF (SELECT COUNT(*)
FROM [user]
WHERE username = @Username) > 0
RETURN -100
ELSE
BEGIN
INSERT INTO [user](user_id, getting_started_shown_ind, username,
password, user_type, first_name, last_name)
VALUES (@StudentId, 0, @UserName, @Password, 'S', @FirstName, @LastName)
INSERT INTO
student_settings
(
student_id,
quiz_access_answer_key_ind,
access_answer_key_ind,
easy_spelling_ind,
access_homepage_calculator_ind,
access_homepage_dictionary_ind,
access_homepage_periodic_table_ind,
access_internet_ind,
leave_msg_skip_ind,
quiz_leave_msg_skip_ind,
access_lesson_calculator_ind ,
access_lesson_dictionary_ind ,
access_lesson_periodic_table_ind ,
quiz_notify_correct_incorrect_ind ,
quiz_open_book_ind ,
quiz_open_page_ind ,
access_project_calculator_ind ,
access_project_dictionary_ind ,
access_project_periodic_table_ind ,
access_quiz_calculator_ind ,
access_quiz_dictionary_ind ,
access_quiz_periodic_table_ind ,
quiz_easy_spelling_ind ,
display_letter_ind ,
display_percent_ind ,
student_print_ind ,
access_test_calculator_ind ,
access_test_dictionary_ind ,
access_test_periodic_table_ind ,
unlimited_problem_attempts ,
a_minimum ,
b_minimum ,
c_minimum ,
d_minimum ,
lesson_weight ,
max_problem_attempts ,
tf_max_problem_attempts ,
problem_attempts_penalty ,
project_weight ,
quiz_spelling_penalty ,
quiz_weight ,
spelling_penalty ,
test_weight ,
bible_translation ,
test_access_answer_key_ind,
test_leave_msg_skip_ind,
test_notify_correct_incorrect_ind,
test_open_book_ind,
test_open_page_ind,
test_spelling_penalty,
test_easy_spelling_ind,
access_allright_ind,
access_farmerfrank_ind,
active_ind,
advanced_lesson_planning_ind,
current_term_id,
access_new_homepage_ind,
access_homepage_web_ind,
access_google_ind,
custom_homepage_ind,
custom_settings_ind ,
access_vocab_games_ind,
quiz_notify_parent_ind,
test_notify_parent_ind,
audiofeedback_disabled
)
VALUES
(
@StudentId,
@QuizAccessAnswerKeyIndDefault,
@AccessAnswerKeyIndDefault,
@EasySpellingIndDefault,
@AccessHomepageCalculatorIndDefault,
@AccessHomepageDictionaryIndDefault,
@AccessHomepagePeriodicTableIndDefault,
@AccessInternetIndDefault,
@LeaveMsgSkipIndDefault,
@QuizLeaveMsgSkipIndDefault,
@AccessLessonCalculatorIndDefault,
@AccessLessonDictionaryIndDefault,
@AccessLessonPeriodicTableIndDefault,
@QuizNotifyCorrectIncorrectIndDefault,
@QuizOpenBookIndDefault,
@QuizOpenPageIndDefault,
@AccessProjectCalculatorIndDefault,
@AccessProjectDictionaryIndDefault,
@AccessProjectPeriodicTableIndDefault,
@AccessQuizCalculatorIndDefault,
@AccessQuizDictionaryIndDefault,
@AccessQuizPeriodicTableIndDefault,
@QuizEasySpellingIndDefault,
@DisplayLetterIndDefault,
@DisplayPercentIndDefault,
@StudentPrintIndDefault,
@AccessTestCalculatorIndDefault,
@AccessTestDictionaryIndDefault,
@AccessTestPeriodicTableIndDefault,
@UnlimitedProblemAttemptsDefault,
@AMinimumDefault,
@BMinimumDefault,
@CMinimumDefault,
@DMinimumDefault,
@LessonWeightDefault,
@MaxProblemAttemptsDefault,
@MaxTrueFalseProblemAttemptsDefault,
@ProblemAttemptsPenaltyDefault,
@ProjectWeightDefault,
@QuizSpellingPenaltyDefault,
@QuizWeightDefault,
@SpellingPenaltyDefault,
@TestWeightDefault,
@BibleTranslationDefault,
@TestAccessAnswerKeyIndDefault,
@TestLeaveMsgSkipIndDefault,
@TestNotifyCorrectIncorrectIndDefault,
@TestOpenBookIndDefault,
@TestOpenPageIndDefault,
@TestSpellingPenaltyDefault,
@TestEasySpellingIndDefault,
@AccessAllRightIndDefault,
@AccessFarmerFrankIndDefault,
@ActiveInd,
@AdvancedLessonPlanningInd,
@CurrentTermId,
@AccessNewHomepageIndDefault,
@AccessHomepageWebIndDefault,
@AccessGoogleIndDefault,
0,
@IsCustom,
@AccessVocabGamesIndDefault,
@QuizNotifyParentIndDefault,
@TestNotifyParentIndDefault,
@AudioFeedbackDisabled
)
END
END
RETURN 0
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[ImportStudentSettings]'
GO
IF OBJECT_ID('ImportStudentSettings') IS NOT NULL
BEGIN
PRINT N'-Dropping proc ImportStudentSettings'
DROP PROC ImportStudentSettings
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc ImportStudentSettings'
GO
CREATE Procedure ImportStudentSettings
/* Param List */
@id uniqueidentifier,
@QuizAccessAnswerKeyInd bit,
@AccessAnswerKeyInd bit,
@EasySpellingInd bit,
@AccessHomepageCalculatorInd bit,
@AccessHomepageDictionaryInd bit,
@AccessHomepagePeriodicTableInd bit,
@AccessInternetInd bit,
@LeaveMsgSkipInd bit,
@QuizLeaveMsgSkipInd bit,
@AccessLessonCalculatorInd bit,
@AccessLessonDictionaryInd bit,
@AccessLessonPeriodicTableInd bit,
@QuizNotifyCorrectIncorrectInd bit,
@QuizOpenBookInd bit,
@QuizOpenPageInd bit,
@AccessProjectCalculatorInd bit,
@AccessProjectDictionaryInd bit,
@AccessProjectPeriodicTableInd bit,
@AccessQuizCalculatorInd bit,
@AccessQuizDictionaryInd bit,
@AccessQuizPeriodicTableInd bit,
@QuizEasySpellingInd bit,
@DisplayLetterInd bit,
@DisplayPercentInd bit,
@StudentPrintInd bit,
@AccessTestCalculatorInd bit,
@AccessTestDictionaryInd bit,
@AccessTestPeriodicTableInd bit,
@UnlimitedProblemAttempts bit,
@AMinimum int,
@BMinimum int,
@CMinimum int,
@DMinimum int,
@LessonWeight int,
@MaxProblemAttempts int,
@MaxTrueFalseProblemAttempts int,
@ProblemAttemptsPenalty int,
@ProjectWeight int,
@QuizSpellingPenalty int,
@QuizWeight int,
@SpellingPenalty int,
@TestWeight int,
@BibleTranslation char(4),
@TestAccessAnswerKeyInd bit,
@TestLeaveMsgSkipInd bit,
@TestNotifyCorrectIncorrectInd bit,
@TestOpenBookInd bit,
@TestOpenPageInd bit,
@TestSpellingPenalty int,
@TestEasySpellingInd bit,
@AccessAllRightInd bit,
@AccessFarmerFrankInd bit,
@ActiveInd bit,
@AdvancedLessonPlanningInd bit,
@AccessNewHomepageInd bit,
@AccessHomepageWebInd bit,
@AccessGoogleInd bit,
@CustomHomepageInd bit,
@CurrentTermId int,
@AccessVocabGamesInd bit,
@QuizNotifyParentInd bit,
@TestNotifyParentInd bit,
@AudioFeedbackDisabled bit
AS
/******************************************************************************
** File:
** Name: ImportStudentSettings
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
/*Variables used to store default values
*/
DECLARE @QuizAccessAnswerKeyIndDefault bit
DECLARE @AccessAnswerKeyIndDefault bit
DECLARE @EasySpellingIndDefault bit
DECLARE @AccessHomepageCalculatorIndDefault bit
DECLARE @AccessHomepageDictionaryIndDefault bit
DECLARE @AccessHomepagePeriodicTableIndDefault bit
DECLARE @AccessInternetIndDefault bit
DECLARE @LeaveMsgSkipIndDefault bit
DECLARE @QuizLeaveMsgSkipIndDefault bit
DECLARE @AccessLessonCalculatorIndDefault bit
DECLARE @AccessLessonDictionaryIndDefault bit
DECLARE @AccessLessonPeriodicTableIndDefault bit
DECLARE @QuizNotifyCorrectIncorrectIndDefault bit
DECLARE @QuizOpenBookIndDefault bit
DECLARE @QuizOpenPageIndDefault bit
DECLARE @AccessProjectCalculatorIndDefault bit
DECLARE @AccessProjectDictionaryIndDefault bit
DECLARE @AccessProjectPeriodicTableIndDefault bit
DECLARE @AccessQuizCalculatorIndDefault bit
DECLARE @AccessQuizDictionaryIndDefault bit
DECLARE @AccessQuizPeriodicTableIndDefault bit
DECLARE @QuizEasySpellingIndDefault bit
DECLARE @DisplayLetterIndDefault bit
DECLARE @DisplayPercentIndDefault bit
DECLARE @StudentPrintIndDefault bit
DECLARE @AccessTestCalculatorIndDefault bit
DECLARE @AccessTestDictionaryIndDefault bit
DECLARE @AccessTestPeriodicTableIndDefault bit
DECLARE @UnlimitedProblemAttemptsDefault bit
DECLARE @AMinimumDefault int
DECLARE @BMinimumDefault int
DECLARE @CMinimumDefault int
DECLARE @DMinimumDefault int
DECLARE @LessonWeightDefault int
DECLARE @MaxProblemAttemptsDefault int
DECLARE @MaxTrueFalseProblemAttemptsDefault int
DECLARE @ProblemAttemptsPenaltyDefault int
DECLARE @ProjectWeightDefault int
DECLARE @QuizSpellingPenaltyDefault int
DECLARE @QuizWeightDefault int
DECLARE @SpellingPenaltyDefault int
DECLARE @TestWeightDefault int
DECLARE @BibleTranslationDefault char(4)
DECLARE @TestAccessAnswerKeyIndDefault bit
DECLARE @TestLeaveMsgSkipIndDefault bit
DECLARE @TestNotifyCorrectIncorrectIndDefault bit
DECLARE @TestOpenBookIndDefault bit
DECLARE @TestOpenPageIndDefault bit
DECLARE @TestSpellingPenaltyDefault int
DECLARE @TestEasySpellingIndDefault bit
DECLARE @AccessAllRightIndDefault bit
DECLARE @AccessFarmerFrankIndDefault bit
DECLARE @AccessNewHomepageIndDefault bit
DECLARE @AccessHomepageWebIndDefault bit
DECLARE @AccessVocabGamesIndDefault bit
DECLARE @QuizNotifyParentIndDefault bit
DECLARE @TestNotifyParentIndDefault bit
DECLARE @IsCustom bit
SET @IsCustom = 0
SELECT
@QuizAccessAnswerKeyIndDefault = quiz_access_answer_key_ind,
@AccessAnswerKeyIndDefault = access_answer_key_ind,
@EasySpellingIndDefault = easy_spelling_ind,
@AccessHomepageCalculatorIndDefault = access_homepage_calculator_ind,
@AccessHomepageDictionaryIndDefault = access_homepage_dictionary_ind,
@AccessHomepagePeriodicTableIndDefault = access_homepage_periodic_table_ind,
@AccessInternetIndDefault = access_internet_ind,
@LeaveMsgSkipIndDefault = leave_msg_skip_ind,
@QuizLeaveMsgSkipIndDefault = quiz_leave_msg_skip_ind,
@AccessLessonCalculatorIndDefault = access_lesson_calculator_ind,
@AccessLessonDictionaryIndDefault = access_lesson_dictionary_ind,
@AccessLessonPeriodicTableIndDefault = access_lesson_periodic_table_ind,
@QuizNotifyCorrectIncorrectIndDefault = quiz_notify_correct_incorrect_ind,
@QuizOpenBookIndDefault = quiz_open_book_ind,
@QuizOpenPageIndDefault = quiz_open_page_ind,
@AccessProjectCalculatorIndDefault = access_project_calculator_ind,
@AccessProjectDictionaryIndDefault = access_project_dictionary_ind,
@AccessProjectPeriodicTableIndDefault = access_project_periodic_table_ind,
@AccessQuizCalculatorIndDefault = access_quiz_calculator_ind,
@AccessQuizDictionaryIndDefault = access_quiz_dictionary_ind,
@AccessQuizPeriodicTableIndDefault = access_quiz_periodic_table_ind,
@QuizEasySpellingIndDefault = quiz_easy_spelling_ind,
@DisplayLetterIndDefault = display_letter_ind,
@DisplayPercentIndDefault = display_percent_ind,
@StudentPrintIndDefault = student_print_ind,
@AccessTestCalculatorIndDefault = access_test_calculator_ind,
@AccessTestDictionaryIndDefault = access_test_dictionary_ind,
@AccessTestPeriodicTableIndDefault = access_test_periodic_table_ind,
@UnlimitedProblemAttemptsDefault = unlimited_problem_attempts,
@AMinimumDefault = a_minimum,
@BMinimumDefault = b_minimum,
@CMinimumDefault = c_minimum,
@DMinimumDefault = d_minimum,
@LessonWeightDefault = lesson_weight,
@MaxProblemAttemptsDefault = max_problem_attempts,
@MaxTrueFalseProblemAttemptsDefault = tf_max_problem_attempts,
@ProblemAttemptsPenaltyDefault = problem_attempts_penalty,
@ProjectWeightDefault = project_weight,
@QuizSpellingPenaltyDefault = quiz_spelling_penalty,
@QuizWeightDefault = quiz_weight,
@SpellingPenaltyDefault = spelling_penalty,
@TestWeightDefault = test_weight,
@BibleTranslationDefault = bible_translation,
@TestAccessAnswerKeyIndDefault = test_access_answer_key_ind,
@TestLeaveMsgSkipIndDefault = test_leave_msg_skip_ind,
@TestNotifyCorrectIncorrectIndDefault = test_notify_correct_incorrect_ind,
@TestOpenBookIndDefault = test_open_book_ind,
@TestOpenPageIndDefault = test_open_page_ind,
@TestSpellingPenaltyDefault = test_spelling_penalty,
@TestEasySpellingIndDefault = test_easy_spelling_ind,
@AccessAllRightIndDefault = access_allright_ind,
@AccessFarmerFrankIndDefault = access_farmerfrank_ind,
@AccessVocabGamesIndDefault = access_vocab_games_ind,
@QuizNotifyParentIndDefault = quiz_notify_parent_ind,
@TestNotifyParentIndDefault = test_notify_parent_ind
FROM school_settings
/*compare values to defaults to determine if the values are custom
*/
IF @QuizAccessAnswerKeyInd != @QuizAccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @AccessAnswerKeyInd != @AccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @EasySpellingInd != @EasySpellingIndDefault
SET @IsCustom = 1
IF @AccessHomepageCalculatorInd != @AccessHomepageCalculatorIndDefault
SET @IsCustom = 1
IF @AccessHomepageDictionaryInd != @AccessHomepageDictionaryIndDefault
SET @IsCustom = 1
IF @AccessHomepagePeriodicTableInd != @AccessHomepagePeriodicTableIndDefault
SET @IsCustom = 1
IF @AccessInternetInd != @AccessInternetIndDefault
SET @IsCustom = 1
IF @LeaveMsgSkipInd != @LeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @QuizLeaveMsgSkipInd != @QuizLeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @AccessLessonCalculatorInd != @AccessLessonCalculatorIndDefault
SET @IsCustom = 1
IF @AccessLessonDictionaryInd != @AccessLessonDictionaryIndDefault
SET @IsCustom = 1
IF @AccessLessonPeriodicTableInd != @AccessLessonPeriodicTableIndDefault
SET @IsCustom = 1
IF @QuizNotifyCorrectIncorrectInd != @QuizNotifyCorrectIncorrectIndDefault
SET @IsCustom = 1
IF @QuizOpenBookInd != @QuizOpenBookIndDefault
SET @IsCustom = 1
IF @QuizOpenPageInd != @QuizOpenPageIndDefault
SET @IsCustom = 1
IF @AccessProjectCalculatorInd != @AccessProjectCalculatorIndDefault
SET @IsCustom = 1
IF @AccessProjectDictionaryInd != @AccessProjectDictionaryIndDefault
SET @IsCustom = 1
IF @AccessProjectPeriodicTableInd != @AccessProjectPeriodicTableIndDefault
SET @IsCustom = 1
IF @AccessQuizCalculatorInd != @AccessQuizCalculatorIndDefault
SET @IsCustom = 1
IF @AccessQuizDictionaryInd != @AccessQuizDictionaryIndDefault
SET @IsCustom = 1
IF @AccessQuizPeriodicTableInd != @AccessQuizPeriodicTableIndDefault
SET @IsCustom = 1
IF @QuizEasySpellingInd != @QuizEasySpellingIndDefault
SET @IsCustom = 1
IF @DisplayLetterInd != @DisplayLetterIndDefault
SET @IsCustom = 1
IF @DisplayPercentInd != @DisplayPercentIndDefault
SET @IsCustom = 1
IF @StudentPrintInd != @StudentPrintIndDefault
SET @IsCustom = 1
IF @AccessTestCalculatorInd != @AccessTestCalculatorIndDefault
SET @IsCustom = 1
IF @AccessTestDictionaryInd != @AccessTestDictionaryIndDefault
SET @IsCustom = 1
IF @AccessTestPeriodicTableInd != @AccessTestPeriodicTableIndDefault
SET @IsCustom = 1
IF @UnlimitedProblemAttempts != @UnlimitedProblemAttemptsDefault
SET @IsCustom = 1
IF @AMinimum != @AMinimumDefault
SET @IsCustom = 1
IF @BMinimum != @BMinimumDefault
SET @IsCustom = 1
IF @CMinimum != @CMinimumDefault
SET @IsCustom = 1
IF @DMinimum != @DMinimumDefault
SET @IsCustom = 1
IF @LessonWeight != @LessonWeightDefault
SET @IsCustom = 1
IF @MaxProblemAttempts != @MaxProblemAttemptsDefault
SET @IsCustom = 1
IF @MaxTrueFalseProblemAttempts != @MaxTrueFalseProblemAttemptsDefault
SET @IsCustom = 1
IF @ProblemAttemptsPenalty != @ProblemAttemptsPenaltyDefault
SET @IsCustom = 1
IF @ProjectWeight != @ProjectWeightDefault
SET @IsCustom = 1
IF @QuizSpellingPenalty != @QuizSpellingPenaltyDefault
SET @IsCustom = 1
IF @QuizWeight != @QuizWeightDefault
SET @IsCustom = 1
IF @SpellingPenalty != @SpellingPenaltyDefault
SET @IsCustom = 1
IF @TestWeight != @TestWeightDefault
SET @IsCustom = 1
IF @BibleTranslation != @BibleTranslationDefault
SET @IsCustom = 1
IF @TestAccessAnswerKeyInd != @TestAccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @TestLeaveMsgSkipInd != @TestLeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @TestNotifyCorrectIncorrectInd != @TestNotifyCorrectIncorrectIndDefault
SET @IsCustom = 1
IF @TestOpenBookInd != @TestOpenBookIndDefault
SET @IsCustom = 1
IF @TestOpenPageInd != @TestOpenPageIndDefault
SET @IsCustom = 1
IF @TestSpellingPenalty != @TestSpellingPenaltyDefault
SET @IsCustom = 1
IF @TestEasySpellingInd != @TestEasySpellingIndDefault
SET @IsCustom = 1
IF @AccessAllRightInd != @AccessAllRightIndDefault
SET @IsCustom = 1
IF @AccessFarmerFrankInd != @AccessFarmerFrankIndDefault
SET @IsCustom = 1
IF @AccessVocabGamesInd != @AccessVocabGamesIndDefault
SET @IsCustom = 1
IF @QuizNotifyParentInd != @QuizNotifyParentIndDefault
SET @IsCustom = 1
IF @TestNotifyParentInd != @TestNotifyParentIndDefault
SET @IsCustom = 1
-- If student settings already exist for this student,
IF (SELECT COUNT(*)
FROM student_settings
WHERE student_id = @Id) > 0
BEGIN
/*insert new record */
UPDATE
student_settings
SET
quiz_access_answer_key_ind = @QuizAccessAnswerKeyInd,
access_answer_key_ind = @AccessAnswerKeyInd,
easy_spelling_ind = @EasySpellingInd,
access_homepage_calculator_ind = @AccessHomepageCalculatorInd,
access_homepage_dictionary_ind = @AccessHomepageDictionaryInd,
access_homepage_periodic_table_ind = @AccessHomepagePeriodicTableInd,
access_internet_ind = @AccessInternetInd,
leave_msg_skip_ind = @LeaveMsgSkipInd,
quiz_leave_msg_skip_ind = @QuizLeaveMsgSkipInd,
access_lesson_calculator_ind = @AccessLessonCalculatorInd,
access_lesson_dictionary_ind = @AccessLessonDictionaryInd,
access_lesson_periodic_table_ind = @AccessLessonPeriodicTableInd,
quiz_notify_correct_incorrect_ind = @QuizNotifyCorrectIncorrectInd,
quiz_open_book_ind = @QuizOpenBookInd,
quiz_open_page_ind = @QuizOpenPageInd,
access_project_calculator_ind = @AccessProjectCalculatorInd,
access_project_dictionary_ind = @AccessProjectDictionaryInd,
access_project_periodic_table_ind = @AccessProjectPeriodicTableInd,
access_quiz_calculator_ind = @AccessQuizCalculatorInd,
access_quiz_dictionary_ind = @AccessQuizDictionaryInd,
access_quiz_periodic_table_ind = @AccessQuizPeriodicTableInd,
quiz_easy_spelling_ind = @QuizEasySpellingInd,
display_letter_ind = @DisplayLetterInd,
display_percent_ind = @DisplayPercentInd,
student_print_ind = @StudentPrintInd,
access_test_calculator_ind = @AccessTestCalculatorInd,
access_test_dictionary_ind = @AccessTestDictionaryInd,
access_test_periodic_table_ind = @AccessTestPeriodicTableInd,
unlimited_problem_attempts = @UnlimitedProblemAttempts,
a_minimum = @AMinimum,
b_minimum = @BMinimum,
c_minimum = @CMinimum,
d_minimum = @DMinimum,
lesson_weight = @LessonWeight,
max_problem_attempts = @MaxProblemAttempts,
tf_max_problem_attempts = @MaxTrueFalseProblemAttempts,
problem_attempts_penalty = @ProblemAttemptsPenalty,
project_weight = @ProjectWeight,
quiz_spelling_penalty = @QuizSpellingPenalty,
quiz_weight = @QuizWeight,
spelling_penalty = @SpellingPenalty,
test_weight = @TestWeight,
bible_translation = @BibleTranslation,
test_access_answer_key_ind = @TestAccessAnswerKeyInd,
test_leave_msg_skip_ind = @TestLeaveMsgSkipInd,
test_notify_correct_incorrect_ind = @TestNotifyCorrectIncorrectInd,
test_open_book_ind = @TestOpenBookInd,
test_open_page_ind = @TestOpenPageInd,
test_spelling_penalty = @TestSpellingPenalty,
test_easy_spelling_ind = @TestEasySpellingInd,
access_allright_ind = @AccessAllRightInd,
access_farmerfrank_ind = @AccessFarmerFrankInd,
active_ind = @ActiveInd,
advanced_lesson_planning_ind = @AdvancedLessonPlanningInd,
current_term_id = @CurrentTermId,
access_new_homepage_ind = @AccessNewHomepageInd,
access_homepage_web_ind = @AccessHomepageWebInd,
access_google_ind = @AccessGoogleInd,
custom_homepage_ind = @CustomHomepageInd,
custom_settings_ind = @IsCustom,
access_vocab_games_ind = @AccessVocabGamesInd,
quiz_notify_parent_ind = @QuizNotifyParentInd,
test_notify_parent_ind = @TestNotifyParentInd,
audiofeedback_disabled = @AudioFeedbackDisabled
WHERE student_id = @id
END
ELSE
BEGIN
--Otherwise add new student settings
INSERT INTO student_settings(student_id, quiz_access_answer_key_ind, access_answer_key_ind, easy_spelling_ind,
access_homepage_calculator_ind, access_homepage_dictionary_ind,
access_homepage_periodic_table_ind, access_internet_ind, leave_msg_skip_ind, quiz_leave_msg_skip_ind,
access_lesson_calculator_ind, access_lesson_dictionary_ind,
access_lesson_periodic_table_ind, quiz_notify_correct_incorrect_ind,
quiz_open_book_ind, quiz_open_page_ind,
access_project_calculator_ind, access_project_dictionary_ind,
access_project_periodic_table_ind, access_quiz_calculator_ind,
access_quiz_dictionary_ind, access_quiz_periodic_table_ind,
quiz_easy_spelling_ind, display_letter_ind, display_percent_ind,
student_print_ind, access_test_calculator_ind, access_test_dictionary_ind,
access_test_periodic_table_ind, unlimited_problem_attempts,
a_minimum, b_minimum, c_minimum, d_minimum, lesson_weight, max_problem_attempts, tf_max_problem_attempts,
problem_attempts_penalty, project_weight, quiz_spelling_penalty,
quiz_weight, spelling_penalty, test_weight, bible_translation, active_ind,
advanced_lesson_planning_ind, current_term_id,
test_access_answer_key_ind, test_leave_msg_skip_ind,
test_notify_correct_incorrect_ind, test_open_book_ind,
test_open_page_ind, test_spelling_penalty,
test_easy_spelling_ind, access_allright_ind,
access_farmerfrank_ind, access_new_homepage_ind,
access_homepage_web_ind, access_google_ind, custom_homepage_ind, custom_settings_ind, access_vocab_games_ind, quiz_notify_parent_ind, test_notify_parent_ind, audiofeedback_disabled)
Values (@Id, @QuizAccessAnswerKeyInd, @AccessAnswerKeyInd, @EasySpellingInd, @AccessHomepageCalculatorInd,
@AccessHomepageDictionaryInd, @AccessHomepagePeriodicTableInd, @AccessInternetInd,
@LeaveMsgSkipInd, @QuizLeaveMsgSkipInd, @AccessLessonCalculatorInd, @AccessLessonDictionaryInd, @AccessLessonPeriodicTableInd,
@QuizNotifyCorrectIncorrectInd, @QuizOpenBookInd, @QuizOpenPageInd,
@AccessProjectCalculatorInd, @AccessProjectDictionaryInd, @AccessProjectPeriodicTableInd,
@AccessQuizCalculatorInd, @AccessQuizDictionaryInd, @AccessQuizPeriodicTableInd,
@QuizEasySpellingInd, @DisplayLetterInd, @DisplayPercentInd, @StudentPrintInd,
@AccessTestCalculatorInd, @AccessTestDictionaryInd, @AccessTestPeriodicTableInd,
@UnlimitedProblemAttempts, @AMinimum, @BMinimum, @CMinimum, @DMinimum, @LessonWeight,
@MaxProblemAttempts, @MaxTrueFalseProblemAttempts, @ProblemAttemptsPenalty, @ProjectWeight, @QuizSpellingPenalty,
@QuizWeight, @SpellingPenalty, @TestWeight, @BibleTranslation,
@ActiveInd, @AdvancedLessonPlanningInd, @CurrentTermId,
@TestAccessAnswerKeyInd, @TestLeaveMsgSkipInd,
@TestNotifyCorrectIncorrectInd, @TestOpenBookInd,
@TestOpenPageInd, @TestSpellingPenalty,
@TestEasySpellingInd, @AccessAllRightInd,
@AccessFarmerFrankInd, @AccessNewHomepageInd, @AccessHomepageWebInd, @AccessGoogleInd, @CustomHomepageInd, @IsCustom, @AccessVocabGamesInd, @QuizNotifyParentInd,@TestNotifyParentInd, @AudioFeedbackDisabled)
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[UpdateHomepageRSS]'
GO
IF OBJECT_ID('[dbo].[UpdateHomepageRSS]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[UpdateHomepageRSS]'
DROP PROC [dbo].[UpdateHomepageRSS]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[UpdateHomepageRSS]'
GO
CREATE Procedure [dbo].[UpdateHomepageRSS]
@UserId as uniqueidentifier,
@FeedId as int = 1,
@URL as nvarchar(max) = ' ',
@FeedQuant as int = 1,
@RssTitle as nvarchar(50) = 'RSS Feed'
as
IF @FeedId = 1
BEGIN
UPDATE
homepage
SET
rss1 = @URL,
rssQuantity1 = @FeedQuant,
rss_title1 = @RssTitle
WHERE
user_id = @UserId
END
IF @FeedId = 2
BEGIN
UPDATE
homepage
SET
rss2 = @URL,
rssQuantity2 = @FeedQuant,
rss_title2 = @RssTitle
WHERE
user_id = @UserId
END
IF @FeedId = 3
BEGIN
UPDATE
homepage
SET
rss3 = @URL,
rssQuantity3 = @FeedQuant,
rss_title3 = @RssTitle
WHERE
user_id = @UserId
END
IF @FeedId = 4
BEGIN
UPDATE
homepage
SET
rss4 = @URL,
rssQuantity4 = @FeedQuant,
rss_title4 = @RssTitle
WHERE
user_id = @UserId
END
IF @FeedId = 5
BEGIN
UPDATE
homepage
SET
rss5 = @URL,
rssQuantity5 = @FeedQuant,
rss_title5 = @RssTitle
WHERE
user_id = @UserId
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[ExportStudentAttendance]'
GO
IF OBJECT_ID('ExportStudentAttendance') IS NOT NULL
BEGIN
PRINT N'-Dropping proc ExportStudentAttendance'
DROP PROC ExportStudentAttendance
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc ExportStudentAttendance'
GO
CREATE Procedure ExportStudentAttendance
@StudentId as uniqueidentifier
AS
SELECT *
FROM student_attendance
WHERE student_id = @StudentId AND term_id = (SELECT current_term_id FROM student_settings WHERE student_id = @StudentId)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetHomepage]'
GO
IF OBJECT_ID('[dbo].[GetHomepage]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetHomepage]'
DROP PROC [dbo].[GetHomepage]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetHomepage]'
GO
CREATE Procedure [dbo].[GetHomepage]
/* Param List */
@UserId as uniqueidentifier
AS
/******************************************************************************
** File:
** Name: [GetUserHomepage]
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SELECT [backgroundColor]
,[modColor]
,[fontStyle]
,[fontSize]
,[modOrder]
,[modCollapsed]
,[wallpaperOn]
,[wallpaperTile]
,[rss1]
,[rss2]
,[rss3]
,[rss4]
,[rss5]
,[rssquantity1]
,[rssquantity2]
,[rssquantity3]
,[rssquantity4]
,[rssquantity5]
,[rss_title1]
,[rss_title2]
,[rss_title3]
,[rss_title4]
,[rss_title5]
FROM homepage
WHERE user_id = @UserId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Rebuilding [dbo].[todo]'
GO
CREATE TABLE [dbo].[tmp_rg_xx_todo]
(
[id] [uniqueidentifier] NOT NULL,
[comment] [nvarchar] (4000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[color] [char] (6) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[sthrough] [bit] NOT NULL,
[ordinal] [int] NOT NULL,
[user_id] [uniqueidentifier] NOT NULL,
[modified_date] [datetime] NOT NULL CONSTRAINT [DF_todo_modified_date] DEFAULT (getdate())
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
INSERT INTO [dbo].[tmp_rg_xx_todo]([id], [comment], [color], [sthrough], [ordinal], [user_id]) SELECT newid(), [comment], [color], [sthrough], [ordinal], [user_id] FROM [dbo].[todo]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
DROP TABLE [dbo].[todo]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
EXEC sp_rename N'[dbo].[tmp_rg_xx_todo]', N'todo'
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating primary key [PK_todo] on [dbo].[todo]'
GO
ALTER TABLE [dbo].[todo] ADD CONSTRAINT [PK_todo] PRIMARY KEY CLUSTERED ([id])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[CRUDTodo]'
GO
SET QUOTED_IDENTIFIER OFF
GO
IF OBJECT_ID('[dbo].[CRUDTodo]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[CRUDTodo]'
DROP PROC [dbo].[CRUDTodo]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[CRUDTodo]'
GO
CREATE proc [dbo].[CRUDTodo]
@CRUD char, -- create, retrieve, update, delete, sync
@id uniqueidentifier= null,
@comment nvarchar(4000)= null,
@color char(6)= null,
@sthrough bit= null,
@ordinal int= null,
@uid uniqueidentifier= null,
@modified_date datetime= null
as
set @modified_date = isnull(@modified_date, getdate())
if @CRUD = 'S'
begin
if exists(select * from todo where id = @id)
set @CRUD = 'U'
else
begin
set @CRUD = 'C'
end
end
if @CRUD = 'C'
begin
set @id = isnull(@id, newid())
insert into todo
values(@id, @comment, @color, @sthrough, @ordinal, @uid, @modified_date)
select @id
end
if @CRUD = 'R'
select * from todo
where user_id = @uid
if @CRUD = 'U'
update todo set
comment = @comment,
color = @color,
sthrough = @sthrough,
ordinal = @ordinal,
user_id = @uid,
modified_date = @modified_date
where id = @id
if @CRUD = 'D'
begin
delete from todo
where id = @id
end
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[DeleteStudent]'
GO
SET QUOTED_IDENTIFIER ON
GO
IF OBJECT_ID('DeleteStudent') IS NOT NULL
BEGIN
PRINT N'-Dropping proc DeleteStudent'
DROP PROC DeleteStudent
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc DeleteStudent'
GO
CREATE Procedure DeleteStudent
/* Param List */
@StudentId uniqueidentifier
AS
/******************************************************************************
** File:
** Name: DeleteStudent
** Desc:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
Begin Transaction
--Delete messages to student
DELETE message
WHERE recipient_id = @StudentId
IF @@ERROR <> 0 GOTO Handle_Error
--Delete messages from student
DELETE message
WHERE sender_id = @StudentId
IF @@ERROR <> 0 GOTO Handle_Error
DELETE TODO
WHERE USER_ID = @STUDENTID
IF @@ERROR <> 0 GOTO Handle_Error
--Delete user
--Delete student settings
--Delete student journal
--Delete student calendar
--Delete student subjects
--Delete student units
--Delete student presentation output
--Delete student assignments
--Delete student problems
DELETE [user]
WHERE [user_id] = @StudentId
Handle_Error:
IF (@@error <> 0)
Rollback Transaction
ELSE
Commit Transaction
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[CRUDUserWidget]'
GO
IF OBJECT_ID('[dbo].[CRUDUserWidget]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[CRUDUserWidget]'
DROP PROC [dbo].[CRUDUserWidget]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[CRUDUserWidget]'
GO
CREATE proc [dbo].[CRUDUserWidget]
@UserID uniqueidentifier,
@WidgetID int = null,
@Active bit = 1,
@JustGetActive bit = 0,
@CRUD char -- create, retrieve, update, delete
as
set @CRUD = upper(@CRUD)
declare @OLDORDER nvarchar(500)
declare @MODNAME nvarchar(500)
declare @NEWORDER nvarchar(500)
if @CRUD = 'U'
begin
update user_widget set active = @active
where user_id = @UserID and widget_id = @WidgetID
set @OLDORDER = (select h.modorder from homepage h where h.user_id = @UserID)
set @MODNAME = (select w.name from widget_app w where w.id = @WidgetID)
if @active = 1
begin
if charindex(@MODNAME, @OLDORDER) = 0 -- if @modname isn't currently in homepage.modorder
begin
set @NEWORDER = @OLDORDER + ',' + @MODNAME
set @NEWORDER = replace(@NEWORDER,',|','|')
set @NEWORDER = replace(@NEWORDER,'|,','|')
set @NEWORDER = replace(@NEWORDER,',,',',')
update homepage set modOrder = @NEWORDER
where user_id = @UserID
end
end
if @active = 0
begin
set @NEWORDER = replace(@OLDORDER,@MODNAME,'')
set @NEWORDER = replace(@NEWORDER,',|','|')
set @NEWORDER = replace(@NEWORDER,'|,','|')
set @NEWORDER = replace(@NEWORDER,',,',',')
update homepage set modOrder = @NEWORDER
where user_id = @UserID
end
end
if @CRUD = 'C'
begin
if not exists (select user_id
from user_widget
where user_id = @UserID and widget_id = @WidgetID)
begin
insert into user_widget
(user_id, widget_id) values (@UserID, @WidgetID)
update homepage set modOrder =
(select h.modorder from homepage h where h.user_id = @UserID) + ',' +
(select w.name from widget_app w where w.id = @WidgetID)
where user_id = @UserID
end
end
if @CRUD = 'R'
begin
Create table #temp(rssFeedNumber varchar(10), rssTitle varchar(max))
insert into #temp(rssFeedNumber, rssTitle)
select '1' as rssFeedNumber, rss_title1 as rssTitle
from homepage
where user_id = @UserID
insert into #temp(rssFeedNumber, rssTitle)
select '2' as rssFeedNumber, rss_title2 as rssTitle
from homepage
where user_id = @UserID
insert into #temp(rssFeedNumber, rssTitle)
select '3' as rssFeedNumber, rss_title3 as rssTitle
from homepage
where user_id = @UserID
insert into #temp(rssFeedNumber, rssTitle)
select '4' as rssFeedNumber, rss_title4 as rssTitle
from homepage
where user_id = @UserID
insert into #temp(rssFeedNumber, rssTitle)
select '5' as rssFeedNumber, rss_title5 as rssTitle
from homepage
where user_id = @UserID
if @JustGetActive = 1
begin
select w.id,
isnull(r.rssTitle,w.title) as title,
w.title,
w.template,
w.post_load_javascript,
w.requires_web,
w.optional,
w.teacher,
w.student,
w.default_column,
w.default_order,
u.active
from user_widget u
inner join widget_app w
on u.widget_id = w.id
left join #temp r
on RIGHT(w.title,1) = cast(r.rssFeedNumber as varchar(1))
where user_id = @UserID and u.active = 1
order by w.title
end
else
begin
select w.id,
isnull(r.rssTitle,w.title) as title,
w.title,
w.template,
w.post_load_javascript,
w.requires_web,
w.optional,
w.teacher,
w.student,
w.default_column,
w.default_order,
u.active
from user_widget u
inner join widget_app w
on u.widget_id = w.id
left join #temp r
on RIGHT(w.title,1) = cast(r.rssFeedNumber as varchar(1))
where user_id = @UserID
order by w.title
end
end
if @CRUD = 'D'
begin
delete from user_widget
where user_id = @UserID
and widget_id = @WidgetID
set @OLDORDER = (select h.modorder from homepage h where h.user_id = @UserID)
set @MODNAME = (select w.name from widget_app w where w.id = @WidgetID)
set @NEWORDER = replace(@OLDORDER,@MODNAME,'')
set @NEWORDER = replace(@NEWORDER,',,',',')
update homepage set modOrder = @NEWORDER where user_id = @UserID
end
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[SaveSettingsStudentSubject]'
GO
IF OBJECT_ID('SaveSettingsStudentSubject') IS NOT NULL
BEGIN
PRINT N'-Dropping proc SaveSettingsStudentSubject'
DROP PROC SaveSettingsStudentSubject
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc SaveSettingsStudentSubject'
GO
CREATE Procedure SaveSettingsStudentSubject
/* Param List */
@id uniqueidentifier,
@QuizAccessAnswerKeyInd bit,
@AccessAnswerKeyInd bit,
@EasySpellingInd bit,
@AccessInternetInd bit,
@LeaveMsgSkipInd bit,
@QuizLeaveMsgSkipInd bit,
@QuizNotifyCorrectIncorrectInd bit,
@QuizOpenBookInd bit,
@QuizOpenPageInd bit,
@QuizEasySpellingInd bit,
@DisplayLetterInd bit,
@DisplayPercentInd bit,
@UnlimitedProblemAttempts bit,
@AMinimum int,
@BMinimum int,
@CMinimum int,
@DMinimum int,
@LessonWeight int,
@MaxProblemAttempts int,
@MaxTrueFalseProblemAttempts int,
@ProblemAttemptsPenalty int,
@ProjectWeight int,
@QuizSpellingPenalty int,
@QuizWeight int,
@SpellingPenalty int,
@TestWeight int,
@TestAccessAnswerKeyInd bit,
@TestLeaveMsgSkipInd bit,
@TestNotifyCorrectIncorrectInd bit,
@TestOpenBookInd bit,
@TestOpenPageInd bit,
@TestSpellingPenalty int,
@TestEasySpellingInd bit,
@AccessAllRightInd bit,
@AccessFarmerFrankInd bit,
@AccessVocabGamesInd bit,
@QuizNotifyParentInd bit,
@TestNotifyParentInd bit
AS
/******************************************************************************
** File:
** Name: SaveSettingsStudentSubject
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
/*Variables used to store default values
*/
DECLARE @QuizAccessAnswerKeyIndDefault bit
DECLARE @AccessAnswerKeyIndDefault bit
DECLARE @EasySpellingIndDefault bit
DECLARE @AccessInternetIndDefault bit
DECLARE @LeaveMsgSkipIndDefault bit
DECLARE @QuizLeaveMsgSkipIndDefault bit
DECLARE @QuizNotifyCorrectIncorrectIndDefault bit
DECLARE @QuizOpenBookIndDefault bit
DECLARE @QuizOpenPageIndDefault bit
DECLARE @QuizEasySpellingIndDefault bit
DECLARE @DisplayLetterIndDefault bit
DECLARE @DisplayPercentIndDefault bit
DECLARE @UnlimitedProblemAttemptsDefault bit
DECLARE @AMinimumDefault int
DECLARE @BMinimumDefault int
DECLARE @CMinimumDefault int
DECLARE @DMinimumDefault int
DECLARE @LessonWeightDefault int
DECLARE @MaxProblemAttemptsDefault int
DECLARE @MaxTrueFalseProblemAttemptsDefault int
DECLARE @ProblemAttemptsPenaltyDefault int
DECLARE @ProjectWeightDefault int
DECLARE @QuizSpellingPenaltyDefault int
DECLARE @QuizWeightDefault int
DECLARE @SpellingPenaltyDefault int
DECLARE @TestWeightDefault int
DECLARE @TestAccessAnswerKeyIndDefault bit
DECLARE @TestLeaveMsgSkipIndDefault bit
DECLARE @TestNotifyCorrectIncorrectIndDefault bit
DECLARE @TestOpenBookIndDefault bit
DECLARE @TestOpenPageIndDefault bit
DECLARE @TestSpellingPenaltyDefault int
DECLARE @TestEasySpellingIndDefault bit
DECLARE @AccessAllRightIndDefault bit
DECLARE @AccessFarmerFrankIndDefault bit
DECLARE @AccessVocabGamesIndDefault bit
DECLARE @QuizNotifyParentIndDefault bit
DECLARE @TestNotifyParentIndDefault bit
DECLARE @IsCustom bit
DECLARE @StudentId uniqueidentifier
SET @IsCustom = 0
SELECT @StudentId = student_id
FROM student_subject
WHERE [id] = @id
SELECT
@QuizAccessAnswerKeyIndDefault = quiz_access_answer_key_ind,
@AccessAnswerKeyIndDefault = access_answer_key_ind,
@EasySpellingIndDefault = easy_spelling_ind,
@AccessInternetIndDefault = access_internet_ind,
@LeaveMsgSkipIndDefault = leave_msg_skip_ind,
@QuizLeaveMsgSkipIndDefault = quiz_leave_msg_skip_ind,
@QuizNotifyCorrectIncorrectIndDefault = quiz_notify_correct_incorrect_ind,
@QuizOpenBookIndDefault = quiz_open_book_ind,
@QuizOpenPageIndDefault = quiz_open_page_ind,
@QuizEasySpellingIndDefault = quiz_easy_spelling_ind,
@DisplayLetterIndDefault = display_letter_ind,
@DisplayPercentIndDefault = display_percent_ind,
@UnlimitedProblemAttemptsDefault = unlimited_problem_attempts,
@AMinimumDefault = a_minimum,
@BMinimumDefault = b_minimum,
@CMinimumDefault = c_minimum,
@DMinimumDefault = d_minimum,
@LessonWeightDefault = lesson_weight,
@MaxProblemAttemptsDefault = max_problem_attempts,
@MaxTrueFalseProblemAttemptsDefault = tf_max_problem_attempts,
@ProblemAttemptsPenaltyDefault = problem_attempts_penalty,
@ProjectWeightDefault = project_weight,
@QuizSpellingPenaltyDefault = quiz_spelling_penalty,
@QuizWeightDefault = quiz_weight,
@SpellingPenaltyDefault = spelling_penalty,
@TestWeightDefault = test_weight,
@TestAccessAnswerKeyIndDefault = test_access_answer_key_ind,
@TestLeaveMsgSkipIndDefault = test_leave_msg_skip_ind,
@TestNotifyCorrectIncorrectIndDefault = test_notify_correct_incorrect_ind,
@TestOpenBookIndDefault = test_open_book_ind,
@TestOpenPageIndDefault = test_open_page_ind,
@TestSpellingPenaltyDefault = test_spelling_penalty,
@TestEasySpellingIndDefault = test_easy_spelling_ind,
@AccessAllRightIndDefault = access_allright_ind,
@AccessFarmerFrankIndDefault = access_farmerfrank_ind,
@AccessVocabGamesIndDefault = access_vocab_games_ind,
@QuizNotifyParentIndDefault = quiz_notify_parent_ind,
@TestNotifyParentIndDefault = test_notify_parent_ind
FROM student_settings
WHERE student_id = @StudentId
/*compare values to defaults to determine if the values are custom
*/
IF @QuizAccessAnswerKeyInd != @QuizAccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @AccessAnswerKeyInd != @AccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @EasySpellingInd != @EasySpellingIndDefault
SET @IsCustom = 1
IF @AccessInternetInd != @AccessInternetIndDefault
SET @IsCustom = 1
IF @LeaveMsgSkipInd != @LeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @QuizLeaveMsgSkipInd != @QuizLeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @QuizNotifyCorrectIncorrectInd != @QuizNotifyCorrectIncorrectIndDefault
SET @IsCustom = 1
IF @QuizOpenBookInd != @QuizOpenBookIndDefault
SET @IsCustom = 1
IF @QuizOpenPageInd != @QuizOpenPageIndDefault
SET @IsCustom = 1
IF @QuizEasySpellingInd != @QuizEasySpellingIndDefault
SET @IsCustom = 1
IF @DisplayLetterInd != @DisplayLetterIndDefault
SET @IsCustom = 1
IF @DisplayPercentInd != @DisplayPercentIndDefault
SET @IsCustom = 1
IF @UnlimitedProblemAttempts != @UnlimitedProblemAttemptsDefault
SET @IsCustom = 1
IF @AMinimum != @AMinimumDefault
SET @IsCustom = 1
IF @BMinimum != @BMinimumDefault
SET @IsCustom = 1
IF @CMinimum != @CMinimumDefault
SET @IsCustom = 1
IF @DMinimum != @DMinimumDefault
SET @IsCustom = 1
IF @LessonWeight != @LessonWeightDefault
SET @IsCustom = 1
IF @MaxProblemAttempts != @MaxProblemAttemptsDefault
SET @IsCustom = 1
IF @MaxTrueFalseProblemAttempts != @MaxTrueFalseProblemAttemptsDefault
SET @IsCustom = 1
IF @ProblemAttemptsPenalty != @ProblemAttemptsPenaltyDefault
SET @IsCustom = 1
IF @ProjectWeight != @ProjectWeightDefault
SET @IsCustom = 1
IF @QuizSpellingPenalty != @QuizSpellingPenaltyDefault
SET @IsCustom = 1
IF @QuizWeight != @QuizWeightDefault
SET @IsCustom = 1
IF @SpellingPenalty != @SpellingPenaltyDefault
SET @IsCustom = 1
IF @TestWeight != @TestWeightDefault
SET @IsCustom = 1
IF @TestAccessAnswerKeyInd != @TestAccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @TestLeaveMsgSkipInd != @TestLeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @TestNotifyCorrectIncorrectInd != @TestNotifyCorrectIncorrectIndDefault
SET @IsCustom = 1
IF @TestOpenBookInd != @TestOpenBookIndDefault
SET @IsCustom = 1
IF @TestOpenPageInd != @TestOpenPageIndDefault
SET @IsCustom = 1
IF @TestSpellingPenalty != @TestSpellingPenaltyDefault
SET @IsCustom = 1
IF @TestEasySpellingInd != @TestEasySpellingIndDefault
SET @IsCustom = 1
IF @AccessAllRightInd != @AccessAllRightIndDefault
SET @IsCustom = 1
IF @AccessFarmerFrankInd != @AccessFarmerFrankIndDefault
SET @IsCustom = 1
IF @AccessVocabGamesInd != @AccessVocabGamesIndDefault
SET @IsCustom = 1
IF @QuizNotifyParentInd != @QuizNotifyParentIndDefault
SET @IsCustom = 1
IF @TestNotifyParentInd != @TestNotifyParentIndDefault
SET @IsCustom = 1
/*insert new record */
UPDATE
student_subject
SET
quiz_access_answer_key_ind = @QuizAccessAnswerKeyInd,
access_answer_key_ind = @AccessAnswerKeyInd,
easy_spelling_ind = @EasySpellingInd,
access_internet_ind = @AccessInternetInd,
leave_msg_skip_ind = @LeaveMsgSkipInd,
quiz_leave_msg_skip_ind = @QuizLeaveMsgSkipInd,
quiz_notify_correct_incorrect_ind = @QuizNotifyCorrectIncorrectInd,
quiz_open_book_ind = @QuizOpenBookInd,
quiz_open_page_ind = @QuizOpenPageInd,
quiz_easy_spelling_ind = @QuizEasySpellingInd,
display_letter_ind = @DisplayLetterInd,
display_percent_ind = @DisplayPercentInd,
unlimited_problem_attempts = @UnlimitedProblemAttempts,
a_minimum = @AMinimum,
b_minimum = @BMinimum,
c_minimum = @CMinimum,
d_minimum = @DMinimum,
lesson_weight = @LessonWeight,
max_problem_attempts = @MaxProblemAttempts,
tf_max_problem_attempts = @MaxTrueFalseProblemAttempts,
problem_attempts_penalty = @ProblemAttemptsPenalty,
project_weight = @ProjectWeight,
quiz_spelling_penalty = @QuizSpellingPenalty,
quiz_weight = @QuizWeight,
spelling_penalty = @SpellingPenalty,
test_weight = @TestWeight,
test_access_answer_key_ind = @TestAccessAnswerKeyInd,
test_leave_msg_skip_ind = @TestLeaveMsgSkipInd,
test_notify_correct_incorrect_ind = @TestNotifyCorrectIncorrectInd,
test_open_book_ind = @TestOpenBookInd,
test_open_page_ind = @TestOpenPageInd,
test_spelling_penalty = @TestSpellingPenalty,
test_easy_spelling_ind = @TestEasySpellingInd,
access_allright_ind = @AccessAllRightInd,
access_farmerfrank_ind = @AccessFarmerFrankInd,
access_vocab_games_ind = @AccessVocabGamesInd,
quiz_notify_parent_ind = @QuizNotifyParentInd,
test_notify_parent_ind = @TestNotifyParentInd,
custom_settings_ind = @IsCustom
WHERE [id] = @id
-- Loop through student units and recalculate unit grades
DECLARE @UnitId as uniqueidentifier
DECLARE curUnits CURSOR READ_ONLY FOR
SELECT [id]
FROM student_unit
WHERE student_subject_id = @id
OPEN curUnits
FETCH NEXT FROM curUnits INTO @UnitId
WHILE (@@fetch_status <> -1)
BEGIN
IF (@@fetch_status <> -2)
BEGIN
EXEC CalculateUnitGrade @UnitId
END
FETCH NEXT FROM curUnits INTO @UnitId
END
CLOSE curUnits
DEALLOCATE curUnits
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[CalculateAssignmentGrade]'
GO
IF OBJECT_ID('CalculateAssignmentGrade') IS NOT NULL
BEGIN
PRINT N'-Dropping proc CalculateAssignmentGrade'
DROP PROC CalculateAssignmentGrade
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc CalculateAssignmentGrade'
GO
CREATE Procedure CalculateAssignmentGrade
/* Param List */
@AssignmentId uniqueidentifier
AS
/******************************************************************************
** File:
** Name: CalculateAssignmentGrade
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SET NOCOUNT ON
DECLARE @intPtsPossible Integer,
@numPtsReceived Numeric(9,2),
@intIncompleteCount Integer,
@intSkippedCount Integer,
@intProblemCount Integer,
@strAssignmentType as char(10),
@newScore tinyint
SET @intProblemCount = (SELECT COUNT(*)
FROM student_problem
WHERE student_assignment_id = @AssignmentId
AND assigned_ind = 1)
/*Check for skipped problems*/
SET @intSkippedCount = (SELECT COUNT(*)
FROM student_problem
WHERE student_assignment_id = @AssignmentId
AND assigned_ind = 0)
/*Check for assigned problems that are not complete*/
SET @intIncompleteCount = (SELECT COUNT(*)
FROM student_problem
WHERE student_assignment_id = @AssignmentId
AND assigned_ind = 1
AND student_completed_ind = 0)
IF @intIncompleteCount = 0 AND @intProblemCount > 0
/* there are no incomplete problems so calculate the assignment grade and set the assignment completed flag to true*/
BEGIN
SET @intPtsPossible = (SELECT SUM(points_possible)
FROM student_problem
WHERE student_assignment_id = @AssignmentId
AND grading_completed_ind = 1 AND assigned_ind = 1)
SET @numPtsReceived = (SELECT SUM(points_received)
FROM student_problem
WHERE student_assignment_id = @AssignmentId
AND grading_completed_ind = 1 AND assigned_ind = 1)
SET @strAssignmentType = (SELECT assignment_type from student_assignment WHERE [id] = @AssignmentId)
IF @intPtsPossible = 0 OR @strAssignmentType = 'Review'
SET @newScore = NULL
ELSE
SET @newScore = ROUND((@numPtsReceived/@intPtsPossible) * 100,0)
UPDATE student_assignment
SET score = @newScore,
completed_ind = 1,
completed_date = GETDATE()
WHERE id = @AssignmentId
END
ELSE
If @intSkippedCount > 0 And @intProblemCount = 0
BEGIN
/*All of the problems are skipped, so set assignment grade to 0 for non review assignment types or NULL for review type and completed flag to true*/
SET @strAssignmentType = (SELECT assignment_type from student_assignment WHERE [id] = @AssignmentId)
IF @strAssignmentType = 'Review'
SET @newScore = NULL
ELSE
SET @newScore = 0
UPDATE student_assignment
SET score = @newScore,
completed_ind = 1,
completed_date = GETDATE()
WHERE id = @AssignmentId
END
ELSE
/*Not all of the problems are completed, so set assignment grade to NULL and completed flag to false*/
BEGIN
UPDATE student_assignment
SET score = NULL,
completed_ind = 0,
completed_date = NULL
WHERE id = @AssignmentId
END
DECLARE @UnitId uniqueidentifier
SELECT @UnitId = student_unit_id FROM student_assignment WHERE id = @AssignmentId
EXEC CalculateUnitGrade @UnitId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[ClearStudentProblemAndAnswer]'
GO
IF OBJECT_ID('ClearStudentProblemAndAnswer') IS NOT NULL
BEGIN
PRINT N'-Dropping proc ClearStudentProblemAndAnswer'
DROP PROC ClearStudentProblemAndAnswer
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc ClearStudentProblemAndAnswer'
GO
CREATE Procedure ClearStudentProblemAndAnswer
(@AssignmentId as uniqueidentifier,
@ProblemId as integer)
AS
BEGIN TRANSACTION
--Clear the student_problem record so that the student can work the problem again and remove student answer
UPDATE
student_problem
SET
grading_completed_ind = 0,
student_completed_ind = 0,
attempts_remaining = 1,
points_received = -1,
student_skipped_ind = 0,
student_answer = NULL
WHERE
problem_id = @ProblemId AND
student_assignment_id = @AssignmentId
IF @@ERROR <> 0 GOTO Handle_Error
DELETE student_problem_file
WHERE
problem_id = @ProblemId AND
student_assignment_id = @AssignmentId
IF @@ERROR <> 0 GOTO Handle_Error
--Update the student_assignment record so that the assignment is not complete
UPDATE student_assignment
SET completed_ind = 0, student_completed_date = null
WHERE [id] = @AssignmentId
Handle_Error:
IF (@@error <> 0)
Rollback Transaction
ELSE
BEGIN
Commit Transaction
EXEC CalculateAssignmentGrade @AssignmentId
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[TimeReport]'
GO
IF OBJECT_ID('TimeReport') IS NOT NULL
BEGIN
PRINT N'-Dropping proc TimeReport'
DROP PROC TimeReport
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc TimeReport'
GO
CREATE Procedure TimeReport
/* Param List */
@strTermIds as varchar(100),
@strStudentIds as varChar(6500)
AS
/******************************************************************************
** File:
** Name: TimeReport
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SET NOCOUNT ON
DECLARE @strSql As VarChar(3000)
SET @strSql ='SELECT ss.student_id, u.username, u.first_name + '' '' + u.last_name as''displayname'', t.description, ss.title, sum(su.total_time) as total_time, ''hours'' = ''0'', ''minutes'' = ''0'', ''student_total_time'' = ''0'''
SET @strSql = @strSql + ' FROM student_subject ss '
SET @strSql = @strSql + ' INNER JOIN [user] u '
SET @strSql = @strSql + ' on u.user_id = ss.student_id '
SET @strSql = @strSql + ' INNER JOIN student_unit su '
SET @strSql = @strSql + ' on su.student_subject_id = ss.id '
SET @strSql = @strSql + ' INNER JOIN term t '
SET @strSql = @strSql + ' on t.term_id = su.term_id '
SET @strSql = @strSql + ' WHERE '
SET @strSql = @strSql + ' u.user_id IN ('
SET @strSql = @strSql + @strStudentIds + ') and '
SET @strSql = @strSql + ' t.term_id in (' + @strTermIds + ')'
SET @strSql = @strSql + ' GROUP BY t.description, u.username, u.last_name, u.first_name, ss.student_id, ss.title '
SET @strSql = @strSql + ' ORDER BY u.username, u.last_name, u.first_name, ss.title '
exec(@strSql)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[DailyWorkReport]'
GO
IF OBJECT_ID('DailyWorkReport') IS NOT NULL
BEGIN
PRINT N'-Dropping proc DailyWorkReport'
DROP PROC DailyWorkReport
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc DailyWorkReport'
GO
CREATE Procedure DailyWorkReport
/* Param List */
@strGradeOption As char(25),
@strStudentIds as varChar(6500),
@dtStart as datetime,
@dtEnd as datetime
AS
SET NOCOUNT ON
DECLARE @strSql As VarChar(8000)
--Build sql statement
SET @strSql ='SELECT DISTINCT u.username, u.first_name + '' '' + u.last_name as "displayname", ss.title as "subjecttitle", su.title as "unittitle", su.sequence_nbr, sa.[id], sa.title as "assignmenttitle", sa.last_worked_on, sa.student_completed_date, sa.completed_date, ISNULL(due_date, ''N/A'') AS ''date_due'', sa.score, sa.sequence_nbr, sa.assignment_type, "needsgrading" = '' '', "description" = '' '', CONVERT(VARCHAR(10),sa.last_worked_on,101) as "display_date", '
IF lower(@strGradeOption) = 'letter'
BEGIN
SET @strSql = @strSql + 'AssignmentGrade = CASE '
SET @strSql = @strSql + 'WHEN sa.score is null THEN '''' '
SET @strSql = @strSql + 'WHEN sa.score >= a_minimum THEN ''A'' '
SET @strSql = @strSql + 'WHEN sa.score >= b_minimum THEN ''B'' '
SET @strSql = @strSql + 'WHEN sa.score >= c_minimum THEN ''C'' '
SET @strSql = @strSql + 'WHEN sa.score >= d_minimum THEN ''D'' '
SET @strSql = @strSql + 'Else ''F'' '
SET @strSql = @strSql + 'End '
END
IF lower(@strGradeOption) = 'percent'
BEGIN
SET @strSQL = @strSql + 'AssignmentGrade = RTRIM(CAST(sa.score AS char(3)))+ ''%'' '
END
IF lower(@strGradeOption) = 'both'
BEGIN
SET @strSQL = @strSql + 'AssignmentGrade = CASE '
SET @strSQL = @strSql + 'WHEN sa.score >= a_minimum '
SET @strSQL = @strSql + 'THEN ''A: '' + RTRIM(CAST(sa.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN sa.score >= b_minimum '
SET @strSQL = @strSql + 'THEN ''B: '' + RTRIM(CAST(sa.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN sa.score >= c_minimum '
SET @strSQL = @strSql + 'THEN ''C: '' + RTRIM(CAST(sa.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN sa.score >= d_minimum '
SET @strSQL = @strSql + 'THEN ''D: '' + RTRIM(CAST(sa.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'Else ''F: '' + RTRIM(CAST(sa.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'End '
END
SET @strSql = @strSql + 'FROM student_assignment sa '
SET @strSql = @strSql + 'INNER JOIN student_unit su on sa.student_unit_id = su.[id] '
SET @strSQL = @strSql + 'INNER JOIN student_subject ss on su.student_subject_id = ss.[id] '
SET @strSQL = @strSql + 'INNER JOIN [user] u on u.[user_id] = ss.student_id '
SET @strSql = @strSql + 'WHERE u.[user_id] in ('
SET @strSql = @strSql + @strStudentIds + ') '
SET @strSql = @strSql + ' AND sa.last_worked_on BETWEEN ''' + CAST(@dtStart as varchar) + ''' AND ''' + CAST(@dtEnd as varchar)
SET @strSql = @strSql + ''' ORDER BY u.username, ss.title, su.sequence_nbr, sa.sequence_nbr'
EXEC(@strSql)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[AttendanceReport]'
GO
IF OBJECT_ID('AttendanceReport') IS NOT NULL
BEGIN
PRINT N'-Dropping proc AttendanceReport'
DROP PROC AttendanceReport
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc AttendanceReport'
GO
CREATE Procedure AttendanceReport
@strTermId as varChar(100),
@strStudentIds as varChar(500)
AS
DECLARE @strSql As VarChar(3000)
--Build sql statement
SET @strSql ='SELECT t.description, u.username, u.first_name + '' '' + u.last_name as''displayname'', sa.calendar_year, sa.calendar_month, sa.calendar_days, ''attendance_day1'' = '' '', ''attendance_day2'' = '' '',''attendance_day3'' = '' '',''attendance_day4'' = '' '',''attendance_day5'' = '' '',''attendance_day6'' = '' '',''attendance_day7'' = '' '',''attendance_day8'' = '' '',''attendance_day9'' = '' '',''attendance_day10'' = '' '',''attendance_day11'' = '' '',''attendance_day12'' = '' '',''attendance_day13'' = '' '',''attendance_day14'' = '' '',''attendance_day15'' = '' '',''attendance_day16'' = '' '',''attendance_day17'' = '' '',''attendance_day18'' = '' '',''attendance_day19'' = '' '',''attendance_day20'' = '' '',''attendance_day21'' = '' '',''attendance_day22'' = '' '',''attendance_day23'' = '' '',''attendance_day24'' = '' '',''attendance_day25'' = '' '',''attendance_day26'' = '' '',''attendance_day27'' = '' '',''attendance_day28'' = '' '',''attendance_day29'' = '' '',''attendance_day30'' = '' '',''attendance_day31'' = '' '', ''month_count'' = ''0'' , ''total_count'' = ''0'', ''monthname'' = ''0'''
SET @strSQL = @strSql + ' from [user] u join student_attendance sa on u.[user_id] = sa.student_id '
SET @strSQL = @strSql + 'join term t on t.[term_id] = sa.term_id '
SET @strSql = @strSql + 'WHERE sa.term_id in ('
SET @strSql = @strSql + @strTermId + ') '
SET @strSql = @strSql + ' AND sa.student_id IN ('
SET @strSql = @strSql + @strStudentIds + ') '
SET @strSql = @strSql + 'ORDER BY u.username, sa.calendar_year, sa.calendar_month'
EXEC(@strSql)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetSubjectTimeInformation]'
GO
IF OBJECT_ID('GetSubjectTimeInformation') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetSubjectTimeInformation'
DROP PROC GetSubjectTimeInformation
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetSubjectTimeInformation'
GO
CREATE Procedure GetSubjectTimeInformation
/* Param List */
@studentIds as varchar(500),
@termid as int
AS
DECLARE @sql as varchar(3000)
SET @sql = 'SELECT sti.subject_time_id, sti.student_id, sti.term_id, sti.subject, sti.hours, sti.minutes, u.username, ((CAST(sti.hours AS int) * 3600) + (CAST(sti.minutes AS int) * 60)) as total_time'
SET @sql = @sql + ' FROM subject_time_information sti INNER JOIN [user] u ON sti.student_id = u.user_id'
SET @sql = @sql + ' WHERE student_id in(' + @studentIds + ') AND term_id = ' + CAST(@termid as varchar)
SET @sql = @sql + ' GROUP BY sti.subject_time_id, sti.student_id, sti.term_id, sti.subject, sti.hours, sti.minutes, u.username '
EXEC(@sql)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating primary key [PK_widget_content] on [dbo].[widget_content]'
GO
ALTER TABLE [dbo].[widget_content] ADD CONSTRAINT [PK_widget_content] PRIMARY KEY CLUSTERED ([id])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Adding constraints to [dbo].[homepage]'
GO
ALTER TABLE [dbo].[homepage] ADD CONSTRAINT [DF_homepage_rss1] DEFAULT (' ') FOR [rss1]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
ALTER TABLE [dbo].[homepage] ADD CONSTRAINT [DF_homepage_rss2] DEFAULT (' ') FOR [rss2]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
ALTER TABLE [dbo].[homepage] ADD CONSTRAINT [DF_homepage_rss3] DEFAULT (' ') FOR [rss3]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
ALTER TABLE [dbo].[homepage] ADD CONSTRAINT [DF_homepage_rss4] DEFAULT (' ') FOR [rss4]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
ALTER TABLE [dbo].[homepage] ADD CONSTRAINT [DF_homepage_rss5] DEFAULT (' ') FOR [rss5]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Adding foreign keys to [dbo].[student_attendance]'
GO
ALTER TABLE [dbo].[student_attendance] ADD
CONSTRAINT [FK_student_attendance_term] FOREIGN KEY ([term_id]) REFERENCES [dbo].[term] ([term_id]) ON DELETE CASCADE,
CONSTRAINT [FK_student_attendance_user] FOREIGN KEY ([student_id]) REFERENCES [dbo].[user] ([user_id]) ON DELETE CASCADE
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Adding foreign keys to [dbo].[subject_time_information]'
GO
ALTER TABLE [dbo].[subject_time_information] ADD
CONSTRAINT [FK_subject_time_information_user] FOREIGN KEY ([student_id]) REFERENCES [dbo].[user] ([user_id]) ON DELETE CASCADE,
CONSTRAINT [FK_subject_time_information_term] FOREIGN KEY ([term_id]) REFERENCES [dbo].[term] ([term_id]) ON DELETE CASCADE
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering permissions on [dbo].[student_assignment]'
GO
--REVOKE SELECT ON [dbo].[student_assignment] TO [soshome10]
GO
PRINT N'Altering permissions on [dbo].[student_subject]'
GO
--REVOKE SELECT ON [dbo].[student_subject] TO [soshome10]
GO
PRINT N'Altering permissions on [dbo].[student_unit]'
GO
--REVOKE SELECT ON [dbo].[student_unit] TO [soshome10]
GO
PRINT N'Altering permissions on [dbo].[term]'
GO
--REVOKE SELECT ON [dbo].[term] TO [soshome10]
GO
PRINT N'Altering permissions on [dbo].[user]'
GO
--REVOKE SELECT ON [dbo].[user] TO [soshome10]
GO
IF EXISTS (SELECT * FROM #tmpErrors) ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT>0 BEGIN
PRINT 'The database update succeeded'
COMMIT TRANSACTION
END
ELSE PRINT 'The database update failed'
GO
DROP TABLE #tmpErrors
GO
/*
Run this script on:
(local).DMLCOMP - This database will be modified
to synchronize it with:
(local).soshome2011_goldendata
You are recommended to back up your database before running this script
Script created by SQL Data Compare version 8.0.1 from Red Gate Software Ltd at 12/22/2010 12:06:51
*/
SET NUMERIC_ROUNDABORT OFF
GO
SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS, NOCOUNT ON
GO
SET DATEFORMAT YMD
GO
SET XACT_ABORT ON
GO
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
GO
-- Pointer used for text / image updates. This might not be needed, but is declared here just in case
DECLARE @pv binary(16)
BEGIN TRANSACTION
-- Update rows in [dbo].[widget_app]
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=1
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=2
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=3
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=4
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=11
UPDATE [dbo].[widget_app] SET [template]='
', [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=12
UPDATE [dbo].[widget_app] SET [default_order]=3, [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=13
UPDATE [dbo].[widget_app] SET [template]='
', [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=14
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=15
UPDATE [dbo].[widget_app] SET [template]='
', [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=16
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=17
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=18
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=19
UPDATE [dbo].[widget_app] SET [template]='
', [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=20
UPDATE [dbo].[widget_app] SET [default_order]=2, [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=21
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=22
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=23
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=24
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=25
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=26
UPDATE [dbo].[widget_app] SET [template]='
',NULL,NULL) WHERE [id]=30
-- Operation applied to 21 rows out of 21
-- Update rows in [dbo].[static_html]
UPDATE [dbo].[static_html] SET [display_html]=N'
Switched-On Schoolhouse - Custom
#BASECSS#
#WIDGETSTEMPLATE#
',NULL,NULL) WHERE [static_html_id]=2
-- Operation applied to 2 rows out of 2
-- Update rows in [dbo].[widget_content]
UPDATE [dbo].[widget_content] SET [data]='gratitude - the quality or feeling of being grateful or thankful', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=367
UPDATE [dbo].[widget_content] SET [data]='vehement - zealous; ardent; impassioned', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=368
UPDATE [dbo].[widget_content] SET [data]='archipelago - a group of islands', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=369
UPDATE [dbo].[widget_content] SET [data]='rhythm - any movement or sound with a regular repetition of a beat', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=370
UPDATE [dbo].[widget_content] SET [data]='dialogue - conversation between tow or more persons', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=371
UPDATE [dbo].[widget_content] SET [data]='beloved - greatly loved; dear to the heart', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=372
UPDATE [dbo].[widget_content] SET [data]='meteorite - a meteor or meteor fragment that impacts the earth''s surface', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=373
UPDATE [dbo].[widget_content] SET [data]='salient - prominent or conspicuous', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=374
UPDATE [dbo].[widget_content] SET [data]='dimension - a measure of length, width, or height', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=375
UPDATE [dbo].[widget_content] SET [data]='abstract - not concrete; expressing a quality or idea that is distinct from material objects; something that cannot be experienced through the five senses', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=376
UPDATE [dbo].[widget_content] SET [data]='preservative - an added substance used to slow down or stop a substance from spoiling', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=377
UPDATE [dbo].[widget_content] SET [data]='eradicate - to remove or destroy utterly', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=378
UPDATE [dbo].[widget_content] SET [data]='recession - a general business slump', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=379
UPDATE [dbo].[widget_content] SET [data]='tantalizing - tempting; teasing; very desirable but out of reach', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=380
UPDATE [dbo].[widget_content] SET [data]='wanton - without regard for what is right; senseless', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=381
UPDATE [dbo].[widget_content] SET [data]='gregarious - tending to associate with others; to be social', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=382
UPDATE [dbo].[widget_content] SET [data]='cipher - a secret method of writing', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=383
UPDATE [dbo].[widget_content] SET [data]='benevolent - expressing goodwill or kindly feelings', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=384
UPDATE [dbo].[widget_content] SET [data]='enzymes - proteins in the body which quicken chemical reactions', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=385
UPDATE [dbo].[widget_content] SET [data]='disarmament - the elimination or limitation of armed forces, military equipment, or weapons of war', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=386
UPDATE [dbo].[widget_content] SET [data]='salute - to make a bow or other gesture to, as in greeting, farewell, or respect', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=387
UPDATE [dbo].[widget_content] SET [data]='systemic - having to do with the entire body', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=388
UPDATE [dbo].[widget_content] SET [data]='mercenary - a person hired to fight for a foreign ruler, army, or cause', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=389
UPDATE [dbo].[widget_content] SET [data]='conspicuous - easily seen or noticed; readily visible or observable', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=390
UPDATE [dbo].[widget_content] SET [data]='erratic - having no certain or definite course; wandering; not fixed', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=391
UPDATE [dbo].[widget_content] SET [data]='preparation - a proceeding, measure, or provision by which one gets ready for something', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=392
UPDATE [dbo].[widget_content] SET [data]='secession - the act of removing oneself from a group or union, esp. a religious or political group', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=393
UPDATE [dbo].[widget_content] SET [data]='tensile - relating to tension and stress', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=394
UPDATE [dbo].[widget_content] SET [data]='memorandum - brief communication which provides information, directions, or advice', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=395
UPDATE [dbo].[widget_content] SET [data]='technology - application of science to practical uses', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=396
UPDATE [dbo].[widget_content] SET [data]='recline - to lean or lie back', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=397
UPDATE [dbo].[widget_content] SET [data]='dialysis - the process of artificially filtering wastes from blood', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=398
UPDATE [dbo].[widget_content] SET [data]='circumference - the distance around the outside of the circle', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=399
UPDATE [dbo].[widget_content] SET [data]='semantics - the branch of linguistics having to do with meaning', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=400
UPDATE [dbo].[widget_content] SET [data]='premium - of exceptional quality or greater value than others of its kind; superior', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=401
UPDATE [dbo].[widget_content] SET [data]='metabolism - chemical processes going on in the body which break down food, release energy, and build up new cells', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=402
UPDATE [dbo].[widget_content] SET [data]='sequence - following of one thing after another; order of arrangement', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=403
UPDATE [dbo].[widget_content] SET [data]='transcontinental - across an entire continent', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=404
UPDATE [dbo].[widget_content] SET [data]='referendum - the submitting of an proposed public measure for voting by the general public', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=405
UPDATE [dbo].[widget_content] SET [data]='dilemma - any difficult or perplexing situation or problem', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=406
UPDATE [dbo].[widget_content] SET [data]='meddle - to busy oneself with or in other people''s things or affairs without being asked', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=407
UPDATE [dbo].[widget_content] SET [data]='telescope - an instrument for making distant objects seem nearer or larger', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=408
UPDATE [dbo].[widget_content] SET [data]='prejudice - an unfavorable opinion or feeling formed beforehand or without knowledge, thought, or reason', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=409
UPDATE [dbo].[widget_content] SET [data]='tundra - frozen, treeless plain in the Arctic', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=410
UPDATE [dbo].[widget_content] SET [data]='enunciate - to speak or pronounce words', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=411
UPDATE [dbo].[widget_content] SET [data]='ridicule - to laugh at; make fun of', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=412
UPDATE [dbo].[widget_content] SET [data]='zeal - eager desire or endeavor', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=413
UPDATE [dbo].[widget_content] SET [data]='contemporary - living or happening in the same period of time', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=414
UPDATE [dbo].[widget_content] SET [data]='endowed - to be given a special gift', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=415
UPDATE [dbo].[widget_content] SET [data]='satirical - uses irony, mockery, or wit to ridicule something', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=416
UPDATE [dbo].[widget_content] SET [data]='unique - having no like or equal', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=417
UPDATE [dbo].[widget_content] SET [data]='precious - of high price or great value; very valuable or costly', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=418
UPDATE [dbo].[widget_content] SET [data]='terrace - a flat, raised level of land with sloping sides that often look like steps', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=419
UPDATE [dbo].[widget_content] SET [data]='maxim - an established principle; a practical truth; a proverb', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=420
UPDATE [dbo].[widget_content] SET [data]='civilize - enlighten; refine, to bring out of an uneducated, or rude state', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=421
UPDATE [dbo].[widget_content] SET [data]='endemic - pertaining specifically to a place or people', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=422
UPDATE [dbo].[widget_content] SET [data]='predict - to declare or tell in advance', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=423
UPDATE [dbo].[widget_content] SET [data]='reflect - to give back or show an image of; mirror', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=424
UPDATE [dbo].[widget_content] SET [data]='transgress - to violate a law, command, moral code, etc.; offend; sin', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=425
UPDATE [dbo].[widget_content] SET [data]='terrain - the particular land surface of an area or region', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=426
UPDATE [dbo].[widget_content] SET [data]='preserve - to keep safe from harm or injury', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=427
UPDATE [dbo].[widget_content] SET [data]='deduce - to derive as a conclusion from something known or assumed; infer', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=428
UPDATE [dbo].[widget_content] SET [data]='copyright - the legal right to control every way of producing a version of an original work, such as a book or piece of music', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=429
UPDATE [dbo].[widget_content] SET [data]='stringent - strict; severe', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=430
UPDATE [dbo].[widget_content] SET [data]='subjunctive - a verb mode typically used to express possibility, necessity, and emotion', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=431
UPDATE [dbo].[widget_content] SET [data]='essential - very important, cannot do without', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=432
UPDATE [dbo].[widget_content] SET [data]='diaphragm - a muscle between the chest and stomach used for breathing', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=433
UPDATE [dbo].[widget_content] SET [data]='prestige - to possess honor or high respect from other people or countries', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=434
UPDATE [dbo].[widget_content] SET [data]='stamina - resistance to fatigue or hardship; endurance', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=435
UPDATE [dbo].[widget_content] SET [data]='grimace - a twisting of the face expressing pain, contempt, or disgust', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=436
UPDATE [dbo].[widget_content] SET [data]='precise - strictly accurate, exact', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=437
UPDATE [dbo].[widget_content] SET [data]='tarp - a strong, waterproof cloth used for protection or covering', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=438
UPDATE [dbo].[widget_content] SET [data]='civilization - the state or condition of people or nations that have developed their culture, government, art, and science to a high level', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=439
UPDATE [dbo].[widget_content] SET [data]='spindle - a devise that spins as it turns, especially used as a device for spinning thread', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=440
UPDATE [dbo].[widget_content] SET [data]='mitigate - to make less severe', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=441
UPDATE [dbo].[widget_content] SET [data]='diameter - distance across the circle through the center', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=442
UPDATE [dbo].[widget_content] SET [data]='reflex - any automatic, unthinking, often habitual behavior or response', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=443
UPDATE [dbo].[widget_content] SET [data]='treason - betrayal of one''s country or ruler', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=444
UPDATE [dbo].[widget_content] SET [data]='emphatic - forceful; insisten', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=445
UPDATE [dbo].[widget_content] SET [data]='cytoplasm - the fluid-like substance contained within the cell membrane', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=446
UPDATE [dbo].[widget_content] SET [data]='authority - the power or right to determine, control, or command that has been legally granted by law, custom, or consent', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=447
UPDATE [dbo].[widget_content] SET [data]='halcyon - happy; joyful; carefree', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=448
UPDATE [dbo].[widget_content] SET [data]='posthumous - published after the writer''s death', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=449
UPDATE [dbo].[widget_content] SET [data]='subpoena - a legal document requiring one to appear in court', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=450
UPDATE [dbo].[widget_content] SET [data]='trepidation - dread; fear', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=451
UPDATE [dbo].[widget_content] SET [data]='deficit - the excess of liabilities over assets', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=452
UPDATE [dbo].[widget_content] SET [data]='bestow - to give, to put, or to place', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=453
UPDATE [dbo].[widget_content] SET [data]='invade - to enter forcefully as an enemy', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=454
UPDATE [dbo].[widget_content] SET [data]='mnemonics - a short rhyme, phrase, acronym, or other mental technique used to ease the task of memorization', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=455
UPDATE [dbo].[widget_content] SET [data]='vindication - a clearing from criticism, censure, or suspicion', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=456
UPDATE [dbo].[widget_content] SET [data]='telescope - an instrument for making distant objects seem nearer or larger', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=457
UPDATE [dbo].[widget_content] SET [data]='exaggerate - to make something bigger or greater than it really is', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=458
UPDATE [dbo].[widget_content] SET [data]='auxiliary - additional; supplementary; reserve', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=459
UPDATE [dbo].[widget_content] SET [data]='refraction - the bending of a wave as it passes from one medium into another, or as it passes through a non-uniform medium', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=460
UPDATE [dbo].[widget_content] SET [data]='linguistic - having to do with the history and structure of language', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=461
UPDATE [dbo].[widget_content] SET [data]='worthy - of commendable excellence or merit; deserving', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=462
UPDATE [dbo].[widget_content] SET [data]='liquify - to melt (a solid) by heating', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=463
UPDATE [dbo].[widget_content] SET [data]='technology - application of science to practical uses', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=464
UPDATE [dbo].[widget_content] SET [data]='unalienable - things that cannot be taken away or given away', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=465
UPDATE [dbo].[widget_content] SET [data]='disclaimer - a statement made to refuse responsibility for something', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=466
UPDATE [dbo].[widget_content] SET [data]='calculate - to determine by mathematical methods; compute', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=467
UPDATE [dbo].[widget_content] SET [data]='terrace - a flat, raised level of land with sloping sides that often look like steps', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=468
UPDATE [dbo].[widget_content] SET [data]='molecule - two or more atoms chemically combined', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=469
UPDATE [dbo].[widget_content] SET [data]='intercept - to stop or interrupt the course, progress, or transmission of', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=470
UPDATE [dbo].[widget_content] SET [data]='heteronym - a word spelled like another but different in pronunciation and meaning', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=471
UPDATE [dbo].[widget_content] SET [data]='transcendent - a very high and remarkable degree; surpassing', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=472
UPDATE [dbo].[widget_content] SET [data]='integer - a number belonging to the set made up of the whole numbers and their opposites', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=473
UPDATE [dbo].[widget_content] SET [data]='ponder - to think about deeply and carefully', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=474
UPDATE [dbo].[widget_content] SET [data]='speed - the ratio of distance (displacement) over time; linear velocity', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=475
UPDATE [dbo].[widget_content] SET [data]='atrophy - to waste away; wither or deteriorate', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=476
UPDATE [dbo].[widget_content] SET [data]='exception - something that does not follow the rule', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=477
UPDATE [dbo].[widget_content] SET [data]='syntax - the way in which words are put together to form sentences, phrases, or clauses', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=478
UPDATE [dbo].[widget_content] SET [data]='subservient - useful, helpful, or of service in an inferior or subordinate capacity; submissive', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=479
UPDATE [dbo].[widget_content] SET [data]='intangible - not clear; vague; difficult to show, reveal, or define', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=480
UPDATE [dbo].[widget_content] SET [data]='lexicography - the study of the dictionary, its compilation, and usage', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=481
UPDATE [dbo].[widget_content] SET [data]='discourse - a long written or spoken discussion of some subject', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=482
UPDATE [dbo].[widget_content] SET [data]='bellow - to utter in a loud deep voice', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=483
UPDATE [dbo].[widget_content] SET [data]='hoist - to raise or lift, esp. by some mechanical appliance', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=484
UPDATE [dbo].[widget_content] SET [data]='monoliths - a large single block or piece of stone', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=485
UPDATE [dbo].[widget_content] SET [data]='ardent - intensely devoted, eager, or enthusiastic; zealous: an ardent fan', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=486
UPDATE [dbo].[widget_content] SET [data]='literal - true to fact; not exaggerated; actual or factual', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=487
UPDATE [dbo].[widget_content] SET [data]='geyser - a spring that sends up fountains or jets of hot water or steam', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=488
UPDATE [dbo].[widget_content] SET [data]='sonnet - a poem that usually contains fourteen lines, that follow a definite rhyme scheme', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=489
UPDATE [dbo].[widget_content] SET [data]='mandatory - something you must do, obligatory; compulsory', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=490
UPDATE [dbo].[widget_content] SET [data]='acoustics - the scientific study of sound', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=491
UPDATE [dbo].[widget_content] SET [data]='conduit - a pipe, canal, channel, or passage for conveying water or fluid', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=492
UPDATE [dbo].[widget_content] SET [data]='insurgency - a rebellion; uprising', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=493
UPDATE [dbo].[widget_content] SET [data]='martyr - one who is killed because of his religious beliefs', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=494
UPDATE [dbo].[widget_content] SET [data]='geography - the study of the earth''s surface, climate, continents, countries, peoples, industries, and products', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=495
UPDATE [dbo].[widget_content] SET [data]='terrain - the particular land surface of an area or region', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=496
UPDATE [dbo].[widget_content] SET [data]='monotheism - worship and belief in one god', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=497
UPDATE [dbo].[widget_content] SET [data]='lenient - agreeably tolerant; permissive; indulgent', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=498
UPDATE [dbo].[widget_content] SET [data]='dialect - the form of a language that is distinct to a region or group of people', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=499
UPDATE [dbo].[widget_content] SET [data]='compound - composed of two or more parts, elements, or ingredients', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=500
UPDATE [dbo].[widget_content] SET [data]='banter - an exchange of light, playful, teasing remarks', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=501
UPDATE [dbo].[widget_content] SET [data]='pompous - filled with self-importance', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=502
UPDATE [dbo].[widget_content] SET [data]='refugee - a person who flees for safety, especially to a foreign land', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=503
UPDATE [dbo].[widget_content] SET [data]='tranquil - free from commotion or tumult; peaceful; quiet; calm', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=504
UPDATE [dbo].[widget_content] SET [data]='sheaf - grass or stalks of grain bound together', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=505
UPDATE [dbo].[widget_content] SET [data]='aquifer - a large body of underground water', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=506
UPDATE [dbo].[widget_content] SET [data]='composure - serene, self-controlled state of mind; calmness; tranquillity', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=507
UPDATE [dbo].[widget_content] SET [data]='transition - movement, passage, or change from one position, state, stage, subject, concept, etc., to another', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=508
UPDATE [dbo].[widget_content] SET [data]='process - a systematic series of actions directed to some end', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=509
UPDATE [dbo].[widget_content] SET [data]='glimpse - a very brief, passing look, sight, or view', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=510
UPDATE [dbo].[widget_content] SET [data]='diagram - a picture that shows the pieces of something and how they fit together', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=511
UPDATE [dbo].[widget_content] SET [data]='leisure - time free from the demands of work or duty', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=512
UPDATE [dbo].[widget_content] SET [data]='reproof - telling you that you are wrong', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=513
UPDATE [dbo].[widget_content] SET [data]='transitive - expressing an action that passes over to and takes effect on some person or thing', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=514
UPDATE [dbo].[widget_content] SET [data]='confiscating - seizing by authority; taking and keeping', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=515
UPDATE [dbo].[widget_content] SET [data]='genial - comforting, friendly, warm; kindly', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=516
UPDATE [dbo].[widget_content] SET [data]='larynx - the part of the body that makes speaking possible', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=517
UPDATE [dbo].[widget_content] SET [data]='regalia - clothing, costumes, medals and ornaments worn by a person for ritualistic purposes', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=518
UPDATE [dbo].[widget_content] SET [data]='tribute - a gift, testimonial, compliment, or the like, given in acknowledgment of gratitude or esteem', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=519
UPDATE [dbo].[widget_content] SET [data]='sedimentary - rock formed from things that have settled to the bottom of the sea over a long time', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=520
UPDATE [dbo].[widget_content] SET [data]='aural - of or received through the ear or the sense of hearing', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=521
UPDATE [dbo].[widget_content] SET [data]='excerpt - a passage or quotation taken or selected from a book, document, film, or the like; extract', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=522
UPDATE [dbo].[widget_content] SET [data]='theoretical - planned or worked out in the mind; based on theory but not yet proved or tested', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=523
UPDATE [dbo].[widget_content] SET [data]='proclaim - to extol or praise publicly', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=524
UPDATE [dbo].[widget_content] SET [data]='generous - liberal in giving or sharing; unselfish', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=525
UPDATE [dbo].[widget_content] SET [data]='inspire - to produce or arouse a feeling, thought, etc.', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=526
UPDATE [dbo].[widget_content] SET [data]='organelle - a structure that performs a specific function within a cell; nucleus', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=527
UPDATE [dbo].[widget_content] SET [data]='subtle - characterized by skill or ingenuity; so slight as to be difficult to detect or describe', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=528
UPDATE [dbo].[widget_content] SET [data]='digestion - the act of changing food into a form that cells use for energy', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=529
UPDATE [dbo].[widget_content] SET [data]='detente - the easing of strained relations, especially between nations or political groups', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=530
UPDATE [dbo].[widget_content] SET [data]='combine - to unite, bring together', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=531
UPDATE [dbo].[widget_content] SET [data]='acumen - keen insight; shrewdness', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=532
UPDATE [dbo].[widget_content] SET [data]='opulent - richly supplied; abundant or plentiful', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=533
UPDATE [dbo].[widget_content] SET [data]='hydrosphere - sphere containing all of the earth''s water - vapor, liquid, and solid', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=534
UPDATE [dbo].[widget_content] SET [data]='colloquial - ordinary or familiar speech that is appropriate for informal or casual settings', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=535
UPDATE [dbo].[widget_content] SET [data]='irony - a way of speaking or writing in which the ordinary meaning of the words is the opposite of the thought in the speaker''s or writer''s mind', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=536
UPDATE [dbo].[widget_content] SET [data]='pollute - to make dirty or impure', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=537
UPDATE [dbo].[widget_content] SET [data]='segment - one of the parts into which something naturally separates or is divided; a division, portion, or section', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=538
UPDATE [dbo].[widget_content] SET [data]='monsoon - a seasonal reversal in wind direction that brings heavy rainfall off the Indian Ocean to southern Asia', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=539
UPDATE [dbo].[widget_content] SET [data]='dilate - to widen or get larger in size', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=540
UPDATE [dbo].[widget_content] SET [data]='innovate - to introduce something new; make changes in anything established', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=541
UPDATE [dbo].[widget_content] SET [data]='solvent - a material that can dissolve other materials', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=542
UPDATE [dbo].[widget_content] SET [data]='languor - lack of energy; weakness', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=543
UPDATE [dbo].[widget_content] SET [data]='exemplify - to show or illustrate by example', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=544
UPDATE [dbo].[widget_content] SET [data]='catharsis - the cleansing or purification of emotions, usually by empathizing with another''s problems', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=545
UPDATE [dbo].[widget_content] SET [data]='solstice - time of year when the sun is farthest north or farthest south of the equator', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=546
UPDATE [dbo].[widget_content] SET [data]='unabridged - complete, not condensed', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=547
UPDATE [dbo].[widget_content] SET [data]='orient - to determine the position of in relation to the points of the compass; get the bearings of', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=548
UPDATE [dbo].[widget_content] SET [data]='idiom - an informal expression whose meaning is different from the literal translation', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=549
UPDATE [dbo].[widget_content] SET [data]='distraction - thing that diverts or draws the mind away in another direction', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=550
UPDATE [dbo].[widget_content] SET [data]='Apostle - one who is sent; one of the twelve men chosen by Christ as a follower', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=551
UPDATE [dbo].[widget_content] SET [data]='procrastinate - to put off till another day or time; defer; delay', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=552
UPDATE [dbo].[widget_content] SET [data]='expedite - to speed up the progress of; hasten', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=553
UPDATE [dbo].[widget_content] SET [data]='caricature - a description of a person or thing that exaggerates peculiarities', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=554
UPDATE [dbo].[widget_content] SET [data]='adapt - to change to fit different conditions, adjust', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=555
UPDATE [dbo].[widget_content] SET [data]='poise - a dignified, self-confident manner or bearing', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=556
UPDATE [dbo].[widget_content] SET [data]='hollow - having a space or cavity inside; not solid; empty', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=557
UPDATE [dbo].[widget_content] SET [data]='fascinating - of great interest or attraction; enchanting; charming; captivating', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=558
UPDATE [dbo].[widget_content] SET [data]='regenerate - to renew or restore', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=559
UPDATE [dbo].[widget_content] SET [data]='subtrahend - the number being subtracted to find a difference', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=560
UPDATE [dbo].[widget_content] SET [data]='irrelevant - not to the point; off the subject', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=561
UPDATE [dbo].[widget_content] SET [data]='selfless - having little or no concern for oneself, esp. with regard to fame, position, money, etc.; unselfish', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=562
UPDATE [dbo].[widget_content] SET [data]='mope - sulk; brood', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=563
UPDATE [dbo].[widget_content] SET [data]='congruent - exact size and shape', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=564
UPDATE [dbo].[widget_content] SET [data]='prominent - standing out so as to be seen easily; conspicuous; particularly noticeabl', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=565
UPDATE [dbo].[widget_content] SET [data]='Celsius - a scale of temperature where water freezes at 0 degrees and boils at 100 degrees', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=566
UPDATE [dbo].[widget_content] SET [data]='optional - leaving something to choice', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=567
UPDATE [dbo].[widget_content] SET [data]='sumptuous - entailing great expense, as from choice materials, fine work, etc.; costly', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=568
UPDATE [dbo].[widget_content] SET [data]='homonym - a word that sounds the same as another word, but has a different meaning and often a different spelling', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=569
UPDATE [dbo].[widget_content] SET [data]='exuberant - abounding in vitality; extremely joyful and vigorous', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=570
UPDATE [dbo].[widget_content] SET [data]='olfactory - having to do with smelling', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=571
UPDATE [dbo].[widget_content] SET [data]='platelet - a substance in the bloodstream which aids in the clotting of blood near a cut', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=572
UPDATE [dbo].[widget_content] SET [data]='jovial - characterized by a hearty, joyous humor or a spirit of good-fellowship', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=573
UPDATE [dbo].[widget_content] SET [data]='isthmus - a narrow bridge of land, with water on both sides of it, connecting two larger pieces of land', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=574
UPDATE [dbo].[widget_content] SET [data]='faith - firm belief; complete confidence; trust', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=575
UPDATE [dbo].[widget_content] SET [data]='adequate - enough to meet the need', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=576
UPDATE [dbo].[widget_content] SET [data]='credible - worthy of belief or confidence; trustworthy', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=577
UPDATE [dbo].[widget_content] SET [data]='regime - a government that is in power; an administration', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=578
UPDATE [dbo].[widget_content] SET [data]='transparent - clear; allows light to pass', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=579
UPDATE [dbo].[widget_content] SET [data]='distillation - the process of evaporating a liquid and condensing the vapors to form a pure substance', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=580
UPDATE [dbo].[widget_content] SET [data]='morphology - the study of word forms and how they are affected by their origins', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=581
UPDATE [dbo].[widget_content] SET [data]='pun - a humorous use of a word that can have two meanings', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=582
UPDATE [dbo].[widget_content] SET [data]='thesis - the controlling or central idea of a paper', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=583
UPDATE [dbo].[widget_content] SET [data]='deteriorate - to disintegrate or wear away', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=584
UPDATE [dbo].[widget_content] SET [data]='aficionado - one who appreciates and admires something', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=585
UPDATE [dbo].[widget_content] SET [data]='tidewater - low-lying land along a seacoast through which tides flow', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=586
UPDATE [dbo].[widget_content] SET [data]='pessimist - one who tends to look on the dark side of things, to see all of the difficulties', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=587
UPDATE [dbo].[widget_content] SET [data]='falsify - prove or show to be incorrect; not true or not possible', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=588
UPDATE [dbo].[widget_content] SET [data]='symbiosis - a mutually beneficial relationship between two species, an example of which is lichens', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=589
UPDATE [dbo].[widget_content] SET [data]='mosaic - many different and separate parts which when united together make a picture or design of beauty', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=590
UPDATE [dbo].[widget_content] SET [data]='variety - a mix of different kinds of things', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=591
UPDATE [dbo].[widget_content] SET [data]='anticipate - to expect; look forward to', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=592
UPDATE [dbo].[widget_content] SET [data]='placid - pleasantly calm or peaceful; unruffled; tranquil; serenely quiet or undisturbed', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=593
UPDATE [dbo].[widget_content] SET [data]='tensile - relating to tension and stres', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=594
UPDATE [dbo].[widget_content] SET [data]='adroit - cleverly skillful, resourceful, or ingenious', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=595
UPDATE [dbo].[widget_content] SET [data]='orthodox - sound or correct in doctrine; conforming to approved doctrine', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=596
UPDATE [dbo].[widget_content] SET [data]='timbre - the characteristics by which the ear distinguishes between sounds with the same frequency and amplitude', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=597
UPDATE [dbo].[widget_content] SET [data]='reverence - a feeling or attitude of deep respect tinged with awe', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=598
UPDATE [dbo].[widget_content] SET [data]='idiosyncrasies - characteristics, habits, mannerisms that are peculiar to an individual', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=599
UPDATE [dbo].[widget_content] SET [data]='capacity - the measurement of volume or the amount an object can hold', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=600
UPDATE [dbo].[widget_content] SET [data]='persuade - prevail on a person to do something, as by advising or urging', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=601
UPDATE [dbo].[widget_content] SET [data]='tribe - a group of people sharing the same customs, language, and ancestors, forming a community under one leader or group of leaders', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=602
UPDATE [dbo].[widget_content] SET [data]='valor - bravery; courage', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=603
UPDATE [dbo].[widget_content] SET [data]='participle - a verb part used to form tenses and which may be used as an adjective', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=604
UPDATE [dbo].[widget_content] SET [data]='egotism - self-centeredness; excessive concern for oneself', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=605
UPDATE [dbo].[widget_content] SET [data]='turmoil - a commotion; disturbance; disorder', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=606
UPDATE [dbo].[widget_content] SET [data]='reliability - quality of being reliable, trustworthy, or dependable', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=607
UPDATE [dbo].[widget_content] SET [data]='culture - the customs, arts, tools, and lifestyles of a nation or people', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=608
UPDATE [dbo].[widget_content] SET [data]='alternative - a choice limited to one of two or more possibilities', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=609
UPDATE [dbo].[widget_content] SET [data]='pension - money paid by a company or government to a person who has retired', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=610
UPDATE [dbo].[widget_content] SET [data]='agile - quick and well-coordinated in movement; lithe', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=611
UPDATE [dbo].[widget_content] SET [data]='perspire - to have water come out of the skin when a person gets hot', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=612
UPDATE [dbo].[widget_content] SET [data]='trade - an exchange of items, usually without payment of money', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=613
UPDATE [dbo].[widget_content] SET [data]='motive - thought, reason, or feeling that makes a person act', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=614
UPDATE [dbo].[widget_content] SET [data]='domicile - a place of residence; abode; house or home', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=615
UPDATE [dbo].[widget_content] SET [data]='particular - exceptional, distinguished or different from others or from the ordinary; noteworthy; marked; unusual', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=616
UPDATE [dbo].[widget_content] SET [data]='tributary - stream that flows into a larger stream or body of water', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=617
UPDATE [dbo].[widget_content] SET [data]='reparation - the making of amends for wrong or injury done', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=618
UPDATE [dbo].[widget_content] SET [data]='punctilious - exact in the observance of form or rules, behavior or ceremony', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=619
UPDATE [dbo].[widget_content] SET [data]='chlorophyll - the green pigment in a plant cell chloroplast that gives the plant a green color', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=620
UPDATE [dbo].[widget_content] SET [data]='pinnacle - the highest point of achievement or development', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=621
UPDATE [dbo].[widget_content] SET [data]='agape - Greek word meaning affection expressed by selfless acts of benevolence or charity', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=622
UPDATE [dbo].[widget_content] SET [data]='soliloquy - a speech made by an actor to himself', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=623
UPDATE [dbo].[widget_content] SET [data]='urban - characteristic of or accustomed to cities', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=624
UPDATE [dbo].[widget_content] SET [data]='reverberate - to echo back or resound', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=625
UPDATE [dbo].[widget_content] SET [data]=' patriarch - the father and ruler of a family or tribe', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=626
UPDATE [dbo].[widget_content] SET [data]='motto - a sentence, phrase, or word expressing the spirit or purpose of a person, organization, city, etc.', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=627
UPDATE [dbo].[widget_content] SET [data]='festive - joyous; merry: a festive mood', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=628
UPDATE [dbo].[widget_content] SET [data]='altar - a table, stand, or similar raised structure at which people worship or sacrifice', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=629
UPDATE [dbo].[widget_content] SET [data]='chastise - to criticize severely', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=630
UPDATE [dbo].[widget_content] SET [data]='persistent - refusing to give up or quit', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=631
UPDATE [dbo].[widget_content] SET [data]='tidewater - low-lying land along a seacoast through which tides flow', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=632
UPDATE [dbo].[widget_content] SET [data]='reticence - the quality or state of being reserved', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=633
UPDATE [dbo].[widget_content] SET [data]='purloin - to take dishonestly; steal', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=634
UPDATE [dbo].[widget_content] SET [data]='ignite - to set on fire; kindle', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=635
UPDATE [dbo].[widget_content] SET [data]='synapse - region between neurons that chemically passes on messages', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=636
UPDATE [dbo].[widget_content] SET [data]='pester - to bother persistently with petty annoyances; trouble', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=637
UPDATE [dbo].[widget_content] SET [data]='vague - not precisely expressed; obscure', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=638
UPDATE [dbo].[widget_content] SET [data]='symbiosis - a mutually beneficial relationship between two species, an example of which is lichens', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=639
UPDATE [dbo].[widget_content] SET [data]='fiction - something made-up; not true', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=640
UPDATE [dbo].[widget_content] SET [data]='elect - to choose or select by vote, as for an office', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=641
UPDATE [dbo].[widget_content] SET [data]='angst - a feeling of dread, anxiety, or anguish', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=642
UPDATE [dbo].[widget_content] SET [data]='syntax - the way in which words are put together to form sentences, phrases, or clauses', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=643
UPDATE [dbo].[widget_content] SET [data]='phrase - a group of words that is not a sentence', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=644
UPDATE [dbo].[widget_content] SET [data]='sanction - to ratify or confirm: to sanction a law', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=645
UPDATE [dbo].[widget_content] SET [data]='consent - to permit, approve, or agree', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=646
UPDATE [dbo].[widget_content] SET [data]='amphibian - animals such as frogs, toads, and salamanders', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=647
UPDATE [dbo].[widget_content] SET [data]='sag - to hang down unevenly; droop', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=648
UPDATE [dbo].[widget_content] SET [data]='myriad - many diverse or different characteristics, e.g. in a society', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=649
UPDATE [dbo].[widget_content] SET [data]='fret - to feel or express worry', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=650
UPDATE [dbo].[widget_content] SET [data]='mull - to think about carefully; consider (often fol. by over): to mull over an idea', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=651
UPDATE [dbo].[widget_content] SET [data]='personification - a figure of speech that gives to inanimate objects or ideas human characteristics', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=652
UPDATE [dbo].[widget_content] SET [data]='conjugate - to change a verb to agree with the subject and the tense being used', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=653
UPDATE [dbo].[widget_content] SET [data]='illustrator - an artist who draws pictures that tell about a stor', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=654
UPDATE [dbo].[widget_content] SET [data]='quandary - a state of perplexity or uncertainty, esp. as to what to do; dilemma', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=655
UPDATE [dbo].[widget_content] SET [data]='solace - to console; to soothe', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=656
UPDATE [dbo].[widget_content] SET [data]='synapse - region between neurons that chemically passes on messages', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=657
UPDATE [dbo].[widget_content] SET [data]='myrrh - a perfume or incense; a gift brought to Jesus', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=658
UPDATE [dbo].[widget_content] SET [data]='indigenous - native; originating in the region or country where found', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=659
UPDATE [dbo].[widget_content] SET [data]='elevate - to raise the spirits; put in high spirits', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=660
UPDATE [dbo].[widget_content] SET [data]='photon - a bundle of energy, usually light, emitted from some energy source or atom', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=661
UPDATE [dbo].[widget_content] SET [data]='rumpus - a noisy or violent disturbance; commotion; uproar', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=662
UPDATE [dbo].[widget_content] SET [data]='myth - a traditional or legendary story, usually concerning some being or hero or event', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=664
UPDATE [dbo].[widget_content] SET [data]='incumbent - a person who currently holds an office', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=665
UPDATE [dbo].[widget_content] SET [data]='quatrain - a stanza or poem with four lines, usually with alternate rhymes', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=666
UPDATE [dbo].[widget_content] SET [data]='pernicious - deadly in nature; that which can destroy or ruin; causing great harm or damage', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=667
UPDATE [dbo].[widget_content] SET [data]='zenith - point in heavens directly overhead; the opposite of nadir', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=668
UPDATE [dbo].[widget_content] SET [data]='traditional - a long-established or inherited way of thinking or acting', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=669
UPDATE [dbo].[widget_content] SET [data]='sinew - A tough, stringy part of the body that fastens muscles to the bones', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=670
UPDATE [dbo].[widget_content] SET [data]='consonant - any letter that is not a vowel', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=671
UPDATE [dbo].[widget_content] SET [data]='timbre - the characteristics by which the ear distinguishes between sounds with the same frequency and amplitude', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=672
UPDATE [dbo].[widget_content] SET [data]='pensive - expressing or revealing thoughtfulness, usually marked by some sadness', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=673
UPDATE [dbo].[widget_content] SET [data]='remainder - part left over in a division problem', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=674
UPDATE [dbo].[widget_content] SET [data]='siege - a military operation in which an army surrounds a place, cutting off all outside access until surrender', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=675
UPDATE [dbo].[widget_content] SET [data]='coalesce - to blend or come together', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=676
UPDATE [dbo].[widget_content] SET [data]='notoriety - the state of being well known, usually unfavorably', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=677
UPDATE [dbo].[widget_content] SET [data]='permafrost - frost that does not thaw (ground areas in the Arctic have parts that are frozen all year)', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=678
UPDATE [dbo].[widget_content] SET [data]='shrivel - to wither; make or become helpless or useless', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=679
UPDATE [dbo].[widget_content] SET [data]='thesis - the controlling or central idea of a paper', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=680
UPDATE [dbo].[widget_content] SET [data]='garrulous - talkative, long-winded', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=681
UPDATE [dbo].[widget_content] SET [data]='nostalgic - having a longing for something far away or long ago', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=682
UPDATE [dbo].[widget_content] SET [data]='pestilence - any disease that spreads rapidly causing many deaths', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=683
UPDATE [dbo].[widget_content] SET [data]='tsunami - series of destructive ocean waves caused by vibrations in Earth''s crust', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=684
UPDATE [dbo].[widget_content] SET [data]='reluctant - unwilling; disinclined ', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=685
UPDATE [dbo].[widget_content] SET [data]='ally - a person, group, or nation united with another for some special purpose', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=686
UPDATE [dbo].[widget_content] SET [data]='theoretical - planned or worked out in the mind; based on theory but not yet proved or tested', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=687
UPDATE [dbo].[widget_content] SET [data]='peril - something that causes or may cause injury, loss, or destruction', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=688
UPDATE [dbo].[widget_content] SET [data]='inertia - the property of matter that allows it to remain still if still or to continue moving if moving unless acted upon by an outside force', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=689
UPDATE [dbo].[widget_content] SET [data]='frivolous - unimportant; not serious', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=690
UPDATE [dbo].[widget_content] SET [data]='coalition - a union or alliance between a number of people or nations', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=691
UPDATE [dbo].[widget_content] SET [data]='quotient - the answer to a division problem', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=692
UPDATE [dbo].[widget_content] SET [data]='sizzle - to make a hissing sound, as in frying or burning', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=693
UPDATE [dbo].[widget_content] SET [data]='nourish - to sustain with food or nutriment; supply with what is necessary for life, health, and growth', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=694
UPDATE [dbo].[widget_content] SET [data]='antecedent - the noun that is referred to by a pronoun', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=695
UPDATE [dbo].[widget_content] SET [data]='impartial - unbiased; fair; just', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=696
UPDATE [dbo].[widget_content] SET [data]='systemic - having to do with the entire body', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=697
UPDATE [dbo].[widget_content] SET [data]='vacant - empty; not having anything in it', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=698
UPDATE [dbo].[widget_content] SET [data]='nuisance - an obnoxious or annoying person, thing, condition, practice', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=699
UPDATE [dbo].[widget_content] SET [data]='snatch - to rescue or save by prompt action', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=700
UPDATE [dbo].[widget_content] SET [data]='elongate - extended; lengthened', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=701
UPDATE [dbo].[widget_content] SET [data]='cogitate - to think hard; ponder; meditate', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=702
UPDATE [dbo].[widget_content] SET [data]='annoint - to consecrate or make sacred in a ceremony that includes the token applying of oil', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=703
UPDATE [dbo].[widget_content] SET [data]='smuggle - to bring something in or take something out of a country secretly and against the law', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=704
UPDATE [dbo].[widget_content] SET [data]='infallible - containing no lies; completely true', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=705
UPDATE [dbo].[widget_content] SET [data]='tantalizing - tempting; teasing; very desirable but out of reach', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=706
UPDATE [dbo].[widget_content] SET [data]='skepticism - an attitude of disbelief or doubt', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=707
UPDATE [dbo].[widget_content] SET [data]='nullify - to cancel or make ineffective', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=708
UPDATE [dbo].[widget_content] SET [data]='dew - moisture from the air that collects on cool surfaces at night', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=709
UPDATE [dbo].[widget_content] SET [data]='comfort - to soothe, console, or reassure; bring cheer to', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=710
UPDATE [dbo].[widget_content] SET [data]='periodical - a magazine or newspaper that is published regularly, but not daily', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=711
UPDATE [dbo].[widget_content] SET [data]='reservoir - a place where extra supplies are collected and stored', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=712
UPDATE [dbo].[widget_content] SET [data]='skew - to distort; depict unfairly', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=713
UPDATE [dbo].[widget_content] SET [data]='hyperbole - the use of obvious exaggeration for a particular effect', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=714
UPDATE [dbo].[widget_content] SET [data]='philosopher - one who studies theories about knowledge and reality', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=715
UPDATE [dbo].[widget_content] SET [data]='random - occurring without definite aim, reason, or pattern', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=716
UPDATE [dbo].[widget_content] SET [data]='incorrigible - so firmly fixed (in bad habits) that nothing else can be expected', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=717
UPDATE [dbo].[widget_content] SET [data]='sarcoma - cancers of connective and supportive tissues such as tendons, bone and muscle', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=718
UPDATE [dbo].[widget_content] SET [data]='deviate - to depart or swerve, as from a procedure, course of action, or acceptable norm', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=719
UPDATE [dbo].[widget_content] SET [data]='allegory - a story whose actions and characters are symbols representing other values, ideas, or meanings', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=720
UPDATE [dbo].[widget_content] SET [data]='emerge - come out into view', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=721
UPDATE [dbo].[widget_content] SET [data]='periphery - the edge or outskirts, as of a city', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=722
UPDATE [dbo].[widget_content] SET [data]='incongruities - things or ideas which are not in agreement with each other or are not compatible', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=723
UPDATE [dbo].[widget_content] SET [data]='sanguine - cheerfully optimistic, hopeful, or confident', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=724
UPDATE [dbo].[widget_content] SET [data]='obeisance - a movement indicating respect, such as a bow or nod', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=725
UPDATE [dbo].[widget_content] SET [data]='albatross - a large, web-footed bird found in the South Seas, noted for its ability to flying long distances', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=726
UPDATE [dbo].[widget_content] SET [data]='readiness - willingness; inclination; cheerful consent', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=727
UPDATE [dbo].[widget_content] SET [data]='innate - inherent or natural rather than gotten from someplace', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=728
UPDATE [dbo].[widget_content] SET [data]='implement - to fulfill; perform; carry out', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=729
UPDATE [dbo].[widget_content] SET [data]='cochlea - a spiral tube in the inner ear containing nerve endings necessary for hearing', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=730
UPDATE [dbo].[widget_content] SET [data]='obvious - easily seen, recognized, or understood; open to view or knowledge; evident', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=731
UPDATE [dbo].[widget_content] SET [data]='allude - to make an indirect reference to something', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=732
UPDATE [dbo].[widget_content] SET [data]='1911 - A dispatcher in the New York Times office sends the first telegram around the world via commercial service. Exactly 66 years later, the National Aeronautics and Space Administration (NASA) sends a different kind of message--a phonograph record containing information about Earth for extraterrestrial beings--shooting into space aboard the unmanned spacecraft Voyager II.', [installation_date]='2009-04-17 14:55:22.837' WHERE [id]=965
UPDATE [dbo].[widget_content] SET [data]='1948 - In the greatest upset in presidential election history, Democratic incumbent Harry S. Truman defeats his Republican challenger, Governor Thomas E. Dewey of New York, by just over two million popular votes. In the days preceding the vote, political analysts and polls were so behind Dewey that on election night, long before all the votes were counted, the Chicago Tribune published an early edition with the banner headline "DEWEY DEFEATS TRUMAN."', [installation_date]='2009-04-17 14:55:22.837' WHERE [id]=1039
UPDATE [dbo].[widget_content] SET [data]='1938 - In an event that would foreshadow the Holocaust, German Nazis launch a campaign of terror against Jewish people and their homes and businesses in Germany and Austria. The violence, which continued through November 10 and was later dubbed "Kristallnacht," or "Night of Broken Glass".', [installation_date]='2009-04-17 14:55:22.837' WHERE [id]=1046
UPDATE [dbo].[widget_content] SET [data]='1955 - In Montgomery, Alabama, Rosa Parks is jailed for refusing to give up her seat on a public bus to a white man, a violation of the city''s racial segregation laws. The successful Montgomery Bus Boycott, organized by a young Baptist minister named Martin Luther King, Jr., followed Park''s historic act of civil disobedience.', [installation_date]='2009-04-17 14:55:22.837' WHERE [id]=1068
-- Operation applied to 2195 rows out of 2195
-- Add rows to [dbo].[widget_app]
INSERT INTO [dbo].[widget_app] ([id], [name], [title], [template], [content_key], [post_load_javascript], [requires_web], [optional], [student], [teacher], [default_column], [default_order], [default_widget], [installation_date]) VALUES (31, 'MathDrill', 'Math Drill', 'Operantics Math Flashcards Jeremiah Jones: Fact Quest', '#NONE#', '', 0, 1, 1, 1, 3, 99, 1, '2010-11-17 11:27:13.737')
INSERT INTO [dbo].[widget_app] ([id], [name], [title], [template], [content_key], [post_load_javascript], [requires_web], [optional], [student], [teacher], [default_column], [default_order], [default_widget], [installation_date]) VALUES (32, 'BibleLookup', 'Bible Lookup', '
KJVNASB
', '#NONE#', 'readyBibleLookup();', 0, 1, 1, 1, 3, 99, 1, '2010-10-06 09:03:25.567')
INSERT INTO [dbo].[widget_app] ([id], [name], [title], [template], [content_key], [post_load_javascript], [requires_web], [optional], [student], [teacher], [default_column], [default_order], [default_widget], [installation_date]) VALUES (33, 'LessonBook', 'Lesson Book', '
', '#NONE#', '', 0, 0, 0, 1, 2, 1, 1, '2010-10-18 11:00:53.763')
INSERT INTO [dbo].[widget_app] ([id], [name], [title], [template], [content_key], [post_load_javascript], [requires_web], [optional], [student], [teacher], [default_column], [default_order], [default_widget], [installation_date]) VALUES (34, 'GeographyDrill', 'Geography Drill', 'State Capitals World Capitals', '#NONE#', '', 0, 1, 1, 1, 3, 99, 1, '2010-11-17 11:28:15.340')
-- Operation applied to 4 rows out of 4
insert into vulgar values('jackass', 1)
insert into vulgar values('diddly', 1)
insert into vulgar values('masturbate', 1)
print 'Adding lesson book'
update homepage
set modorder = replace(modorder, 'Administration', 'Administration,LessonBook')
where user_id = (select user_id from [user] where user_type = 'A')
print 'Updating school_rss'
declare @rssfeednumber as integer
set @rssfeednumber = 1
while @rssfeednumber <=5
begin
if not exists(select * from school_rss where rssfeednumber = @rssfeednumber)
insert into school_rss values(@rssfeednumber, '', 5, 'RSS Feed ' + cast(@rssfeednumber as char(1)))
set @rssfeednumber = @rssfeednumber + 1
end
update school_rss set
rssTitle = 'RSS Feed ' + cast(rssfeednumber as varchar(3))
where rssTitle is null
print 'Correcting typo in [bible]'
update bible
set verse_text = 'That the man of God may be perfect, thoroughly furnished unto all good works.'
where translation = 'KJV' and book = '2 Timothy' and chapter = '3' and verse_num = '17'
update widget_content
set data = '1780 - American General Benedict Arnold meets with British Major John Andre to discuss handing over West Point to the British, in return for the promise of a large sum of money and a high position in the British army. The plot was foiled and Arnold, a former American hero, became synonymous with the word "traitor."'
where [id] = 997
update widget_content
set data = '1776 - Nathan Hale was hanged as a spy by the British during the Revolutionary War.'
where [id] = 998
UPDATE [dbo].[tip_of_week] SET [data]='Want to delete an assignment from a student''s workload? Click "Assignments" in the "Lesson Book" widget, select the student, select the subject with the assignment, click the "Edit Subject" button, click the unit containing the assignment, click the "Remove" button, click Yes, click the "Save" button. If you are using due dates, you can click "OK" to change them or "Cancel" to leave them alone.' WHERE [week_num]=9
UPDATE [dbo].[tip_of_week] SET [data]='To assign an alternate assignment or test: click "Assignments" in the "Lesson Book" widget, select the student, click the subject in the "Student Schoolwork" section on the bottom of the screen and click the "Edit" button. Expand the curriculum folder in the "Available Curriculum" column on the right-hand side of the screen. Select the subject, then select the unit, click the "Alternate Test" (or other alternate assignment) and drag it to the unit folder. Use the "Move Up" or "Move Down" button if necessary. To delete the existing test, click it and then click the "Remove" button. Click the "Save" button when you are finished.' WHERE [week_num]=11
UPDATE [dbo].[tip_of_week] SET [data]='To customize the calendar for one student and not all students: Click "Student Setup". Choose the student and click the "Edit Calendar" button. Select the "Term" and click the "Open" button. Edit the student''s calendar just as you do the school calendar. Click the "Save Calendar" button when you are done. You can regenerate the due dates by clicking the "Regenerate" button or skip this by clicking the "Cancel" button.' WHERE [week_num]=17
UPDATE [dbo].[tip_of_week] SET [data]='"Open Book" is an option for quizzes and tests to allow students to start and stop a quiz or test and then return to it, until they choose to submit it for grading. Set it on the Quiz/Test Setup Page (Find this option under School Setup or Student Setup/Edit Settings. For just one subject, go to the "Lesson Book" widget and click "Assignments", select the subject, click Edit Subject and select Quiz/Test).' WHERE [week_num]=18
UPDATE [dbo].[tip_of_week] SET [data]='You can easily print a lesson plan for your student, simply click "Lesson Plan" in the "Lesson Book" widget, select the student whose lesson plan you want to print, click the "Print" button on the bottom of the screen, select the start and end dates of the date range you want. Click the "Preview" button to verify that is what you want, click the "Print" button to select your printer, and click the "Print" button.' WHERE [week_num]=23
UPDATE [dbo].[tip_of_week] SET [data]='Do you want to set up an event that spans multiple days? Click "School Setup" in the "Administration" widget, select "Term", and click the calendar icon. Double-click the first day of the event. Click the "Add" button on the "Edit Day" window. Enter a brief "Description" of the event and select the "End Date" for the event. Click the "Save" button and close the "Edit Day" window. Click "Save Calendar" on the Edit School Calendar" window.' WHERE [week_num]=35
UPDATE [dbo].[tip_of_week] SET [data]='Need to remove an event (items in those darker yellow boxes on your calendar)? Click "School Setup" in the "Administration" widget, select "Term", and click the calendar icon. Double-click the day with the event to remove, click the event to select it, and click the "Remove" button. Close the "Edit Day" window, and click "Save Calendar" on the "Edit School Calendar" window.' WHERE [week_num]=36
UPDATE [dbo].[tip_of_week] SET [data]='Printing from SOS Student is only possible if it has been enabled by the teacher. To do this, click "School Setup" in the "Administration" widget. Click the checkbox next to "Student Printing" at the bottom of the "Lesson Options" section and click the "Save" button.' WHERE [week_num]=37
UPDATE [dbo].[tip_of_week] SET [data]='A student''s lesson can be printed from SOS Teacher. Click "Assignments" in the "Lesson Book" widget and select the student, then in the Student Schoolwork" section, select the subject and unit containing the lesson you want to print. Double-click the "Assignment Title" in the lower right-hand part of the window and click the "Print" button on the bottom of the window.' WHERE [week_num]=38
UPDATE [dbo].[tip_of_week] SET [data]='To create a new term and the calendar associated with it, click "School Setup" in the "Administration" widget, and select "Term". Click the "Add" button, enter the new "Term Name" and click the "Save" button. Now the calendar, select the term you just created using the drop-down menu, and click the calendar icon. Select Traditional or Custom (Traditional is similar to the public schools, custom allows you to select your preferred dates.). Customize your calendar to meet your needs and click the "Save" button when you are finished.' WHERE [week_num]=40
UPDATE [dbo].[tip_of_week] SET [data]='Do you need to modify your traditional calendar school year to end on a different date? Click "School Setup" in the "Administration" widget, and select "Term". Click the calendar icon and click the "Reset" button. Select "Custom" and choose the new "End Date" using the drop-down menu. Customize your calendar if you wish. Be sure to click the "Save" button when you are done.' WHERE [week_num]=41
UPDATE [dbo].[tip_of_week] SET [data]='Do you want to create a custom assignment for only one student? Go to "Assignments" in the "Lesson Book" widget and select the student. Select the subject and click the "Edit Subject" button. Click the unit where you want to place the assignment and click the "Create Assignment" button. When you finish entering the custom assignment, you can use the "Move Up" and "Move Down" buttons to place the assignment exactly where you want it to appear. Be sure to click the "Save" button when you are finished. It is automatically assigned to this student only.' WHERE [week_num]=48
COMMIT TRANSACTION
GO
/*
Run this script on:
GL-C7MCHN1-P\SOSHOME309.SOSHOME2010 - This database will be modified
to synchronize it with:
(local).soshome2011
You are recommended to back up your database before running this script
Script created by SQL Compare version 8.1.0 from Red Gate Software Ltd at 12/22/2010 12:06:26 PM
*/
use soshome20XX
go
SET NUMERIC_ROUNDABORT OFF
GO
SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE id=OBJECT_ID('tempdb..#tmpErrors')) DROP TABLE #tmpErrors
GO
CREATE TABLE #tmpErrors (Error int)
GO
SET XACT_ABORT ON
GO
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
GO
BEGIN TRANSACTION
if object_id('Stored_Procedure_Name') is not null
begin
print 'PREDROP: Stored_Procedure_Name'
drop proc Stored_Procedure_Name
end
go
GO
PRINT N'Dropping foreign keys from [dbo].[todo]'
GO
ALTER TABLE [dbo].[todo] DROP
CONSTRAINT [FK_todo_user]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Dropping constraints from [dbo].[homepage]'
GO
ALTER TABLE [dbo].[homepage] DROP CONSTRAINT [DF_homepage_rss1]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Dropping constraints from [dbo].[homepage]'
GO
ALTER TABLE [dbo].[homepage] DROP CONSTRAINT [DF_homepage_rss2]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Dropping constraints from [dbo].[homepage]'
GO
ALTER TABLE [dbo].[homepage] DROP CONSTRAINT [DF_homepage_rss3]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Dropping constraints from [dbo].[homepage]'
GO
ALTER TABLE [dbo].[homepage] DROP CONSTRAINT [DF_homepage_rss4]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Dropping constraints from [dbo].[homepage]'
GO
ALTER TABLE [dbo].[homepage] DROP CONSTRAINT [DF_homepage_rss5]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[student_attendance]'
GO
CREATE TABLE [dbo].[student_attendance]
(
[term_id] [int] NOT NULL,
[student_id] [uniqueidentifier] NOT NULL,
[calendar_month] [tinyint] NOT NULL,
[calendar_year] [smallint] NOT NULL,
[calendar_days] [varchar] (31) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating primary key [PK_student_attendance] on [dbo].[student_attendance]'
GO
ALTER TABLE [dbo].[student_attendance] ADD CONSTRAINT [PK_student_attendance] PRIMARY KEY CLUSTERED ([term_id], [student_id], [calendar_month], [calendar_year])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[DeleteStudentAttendance]'
GO
IF OBJECT_ID('DeleteStudentAttendance') IS NOT NULL
BEGIN
PRINT N'-Dropping proc DeleteStudentAttendance'
DROP PROC DeleteStudentAttendance
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc DeleteStudentAttendance'
GO
CREATE Procedure DeleteStudentAttendance
/* Param List */
@TermId as int,
@StudentId as uniqueidentifier
AS
/******************************************************************************
** File:
** Name: DeleteStudentAttendance
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
--Delete items from student_attendance
DELETE FROM student_attendance
WHERE term_id = @TermId
AND student_id = @StudentId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[DeleteStudentAttendanceMonth]'
GO
IF OBJECT_ID('DeleteStudentAttendanceMonth') IS NOT NULL
BEGIN
PRINT N'-Dropping proc DeleteStudentAttendanceMonth'
DROP PROC DeleteStudentAttendanceMonth
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc DeleteStudentAttendanceMonth'
GO
CREATE Procedure DeleteStudentAttendanceMonth
/* Param List */
@TermId int,
@Month tinyint,
@Year smallint,
@StudentId uniqueidentifier,
@InsertDeletedInd as bit,
@DeletedDate as datetime
AS
DELETE student_attendance
WHERE term_id = @TermId
AND calendar_month = @Month
AND calendar_year = @Year
AND student_id = @StudentId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetStudentAttendance]'
GO
IF OBJECT_ID('GetStudentAttendance') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetStudentAttendance'
DROP PROC GetStudentAttendance
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetStudentAttendance'
GO
CREATE Procedure GetStudentAttendance
/* Param List */
@TermId int,
@StudentId uniqueidentifier
AS
SELECT calendar_month, calendar_year, calendar_days
FROM student_attendance
WHERE term_id = @TermId AND student_id = @StudentId
ORDER BY calendar_year, calendar_month
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetStudentAttendanceStatus]'
GO
IF OBJECT_ID('GetStudentAttendanceStatus') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetStudentAttendanceStatus'
DROP PROC GetStudentAttendanceStatus
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetStudentAttendanceStatus'
GO
CREATE Procedure GetStudentAttendanceStatus
/* Param List */
@TermId int,
@StudentId uniqueidentifier
AS
SELECT COUNT(*)
FROM student_attendance
WHERE term_id = @TermId AND student_id = @StudentId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[SaveStudentAttendanceMonth]'
GO
IF OBJECT_ID('SaveStudentAttendanceMonth') IS NOT NULL
BEGIN
PRINT N'-Dropping proc SaveStudentAttendanceMonth'
DROP PROC SaveStudentAttendanceMonth
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc SaveStudentAttendanceMonth'
GO
CREATE Procedure SaveStudentAttendanceMonth
/* Param List */
@TermId int,
@StudentId uniqueidentifier,
@Month tinyint,
@Year smallint,
@Days varchar(31),
@ModifiedDate datetime
AS
-- If month already exists,
IF (SELECT COUNT(*)
FROM student_attendance
WHERE term_id = @TermId
AND student_id = @StudentId
AND calendar_month = @Month
AND calendar_year = @Year) > 0
BEGIN
-- Update it
UPDATE student_attendance
SET calendar_days = @Days
WHERE term_id = @TermId
AND student_id = @StudentId
AND calendar_month = @Month
AND calendar_year = @Year
END
ELSE
BEGIN
-- Otherwise add a new month to the Student calendar
INSERT INTO student_attendance(term_id, student_id, calendar_month, calendar_year, calendar_days)
Values (@TermId, @StudentId, @Month, @Year, @Days)
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetBibleVerses]'
GO
SET QUOTED_IDENTIFIER OFF
GO
IF OBJECT_ID('GetBibleVerses') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetBibleVerses'
DROP PROC GetBibleVerses
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetBibleVerses'
GO
CREATE Procedure GetBibleVerses
(
@translation nvarchar(255),
@book nvarchar(255),
@chapter float,
@beginning_versenum float,
@ending_versenum float
)
AS
/******************************************************************************
** File: GetBibleVerses.sql
** Name: GetBibleVerses
** Desc: returns a recordset of Bible verses
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
Select verse_text
from bible
where
Translation = @translation and
Book = @book and
Chapter = @chapter and
Verse_Num >= @beginning_versenum and
Verse_Num <= @ending_versenum
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[school_rss]'
GO
ALTER TABLE [dbo].[school_rss] ADD
[rssTitle] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
ALTER TABLE [dbo].[school_rss] ALTER COLUMN [rssUrl] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[CRUDSchoolRSS]'
GO
SET QUOTED_IDENTIFIER ON
GO
IF OBJECT_ID('[dbo].[CRUDSchoolRSS]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[CRUDSchoolRSS]'
DROP PROC [dbo].[CRUDSchoolRSS]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[CRUDSchoolRSS]'
GO
CREATE Procedure [dbo].[CRUDSchoolRSS]
@FeedId as int = 1,
@URL as nvarchar(max) = ' ',
@FeedQuant as int = 1,
@RssTitle as nvarchar(50) = 'RSS Feed',
@CRUD char -- create, retrieve, update, delete
as
set @CRUD = upper(@CRUD)
if @CRUD = 'C'
begin
if not exists (select rssFeedNumber
from school_rss
WHERE rssFeedNumber = @FeedId)
begin
insert into school_rss
(rssFeedNumber, rssURL, rssQuantity, rssTitle) values (@FeedId, @URL, @FeedQuant, @RssTitle )
end
end
if @CRUD = 'R'
begin
select * from school_rss
end
if @CRUD = 'U'
begin
if not exists (select rssFeedNumber
from school_rss
WHERE rssFeedNumber = @FeedId)
begin
insert into school_rss
(rssFeedNumber, rssURL, rssQuantity,rssTitle) values (@FeedId, @URL, @FeedQuant,@RssTitle )
end
else
begin
UPDATE
school_rss
SET
rssURL = @URL,
rssQuantity = @FeedQuant,
rssTitle = @RssTitle
WHERE
rssFeedNumber = @FeedId
end
end
if @CRUD = 'D'
begin
delete from school_rss
where rssFeedNumber = @FeedId
end
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetBibleVerses2]'
GO
SET QUOTED_IDENTIFIER OFF
GO
IF OBJECT_ID('[dbo].[GetBibleVerses2]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetBibleVerses2]'
DROP PROC [dbo].[GetBibleVerses2]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetBibleVerses2]'
GO
CREATE Procedure [dbo].[GetBibleVerses2]
(
@translation nvarchar(255),
@book nvarchar(255),
@chapter_from int,
@chapter_to int,
@verse_from int,
@verse_to int
)
AS
select * from bible
where
translation = @translation and
book = @book and
(
(@chapter_from = @chapter_to and
@chapter_from = chapter and
@verse_from <= verse_num and
@verse_to >= verse_num
)or
(
@chapter_from <> @chapter_to and
(
(@chapter_from = chapter and @verse_from <= verse_num) or
(@chapter_to = chapter and @verse_to >= verse_num)
)
)or
(chapter > @chapter_from and chapter < @chapter_to)
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[ClearStudentAttendance]'
GO
SET QUOTED_IDENTIFIER ON
GO
IF OBJECT_ID('ClearStudentAttendance') IS NOT NULL
BEGIN
PRINT N'-Dropping proc ClearStudentAttendance'
DROP PROC ClearStudentAttendance
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc ClearStudentAttendance'
GO
CREATE Procedure ClearStudentAttendance
/* Param List */
@TermId int,
@StudentId uniqueidentifier
AS
DELETE FROM student_attendance
WHERE term_id = @TermId
AND student_id = @StudentId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[ImportStudentAttendance]'
GO
IF OBJECT_ID('ImportStudentAttendance') IS NOT NULL
BEGIN
PRINT N'-Dropping proc ImportStudentAttendance'
DROP PROC ImportStudentAttendance
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc ImportStudentAttendance'
GO
CREATE Procedure ImportStudentAttendance
@TermId as int,
@StudentId as uniqueidentifier,
@CalendarMonth as tinyint,
@CalendarYear as smallint,
@CalendarDays as varchar(31)
AS
IF (SELECT COUNT(*)
FROM student_attendance
WHERE term_id = @TermId AND student_id = @StudentId AND calendar_month = @CalendarMonth AND calendar_year = @CalendarYear) = 0
BEGIN
/* only insert new values if they do not already exist for this student, month, year */
INSERT INTO student_attendance(term_id, student_id, calendar_month, calendar_year, calendar_days)
VALUES(@TermId, @StudentId, @CalendarMonth, @CalendarYear, @CalendarDays)
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[subject_time_information]'
GO
CREATE TABLE [dbo].[subject_time_information]
(
[subject_time_id] [int] NOT NULL IDENTITY(1, 1),
[student_id] [uniqueidentifier] NOT NULL,
[term_id] [int] NOT NULL,
[subject] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[hours] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[minutes] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating primary key [PK_subject_time_information] on [dbo].[subject_time_information]'
GO
ALTER TABLE [dbo].[subject_time_information] ADD CONSTRAINT [PK_subject_time_information] PRIMARY KEY CLUSTERED ([subject_time_id])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[DeleteSubjectTimeInformation]'
GO
IF OBJECT_ID('DeleteSubjectTimeInformation') IS NOT NULL
BEGIN
PRINT N'-Dropping proc DeleteSubjectTimeInformation'
DROP PROC DeleteSubjectTimeInformation
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc DeleteSubjectTimeInformation'
GO
CREATE Procedure DeleteSubjectTimeInformation
@SubjectTimeId int
AS
DELETE FROM subject_time_information
WHERE subject_time_id = @SubjectTimeId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[SaveSubjectTimeInformation]'
GO
IF OBJECT_ID('SaveSubjectTimeInformation') IS NOT NULL
BEGIN
PRINT N'-Dropping proc SaveSubjectTimeInformation'
DROP PROC SaveSubjectTimeInformation
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc SaveSubjectTimeInformation'
GO
CREATE Procedure SaveSubjectTimeInformation
/* Param List */
@StudentId uniqueidentifier,
@TermId int,
@Subject varchar(100),
@Hours varchar(10),
@Minutes varchar(10),
@SubjectTimeId int
AS
-- If row already exists,
IF (SELECT COUNT(*)
FROM subject_time_information
WHERE subject_time_id = @SubjectTimeId) > 0
BEGIN
-- Update it
UPDATE subject_time_information
SET subject = @Subject,
hours = @Hours,
minutes = @Minutes
WHERE subject_time_id = @SubjectTimeId
END
ELSE
BEGIN
-- Otherwise add a new subject time info
INSERT INTO subject_time_information(student_id, term_id, subject, hours, minutes)
VALUES (@StudentId, @TermId, @Subject, @Hours, @Minutes)
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[homepage]'
GO
ALTER TABLE [dbo].[homepage] ADD
[rss_title1] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_homepage_rss_title1] DEFAULT ('RSS Feed 1'),
[rss_title2] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_homepage_rss_title2] DEFAULT ('RSS Feed 2'),
[rss_title3] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_homepage_rss_title3] DEFAULT ('RSS Feed 3'),
[rss_title4] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_homepage_rss_title4] DEFAULT ('RSS Feed 4'),
[rss_title5] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_homepage_rss_title5] DEFAULT ('RSS Feed 5')
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
ALTER TABLE [dbo].[homepage] ALTER COLUMN [rss1] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
ALTER TABLE [dbo].[homepage] ALTER COLUMN [rss2] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
ALTER TABLE [dbo].[homepage] ALTER COLUMN [rss3] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
ALTER TABLE [dbo].[homepage] ALTER COLUMN [rss4] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
ALTER TABLE [dbo].[homepage] ALTER COLUMN [rss5] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[RUDHomepageRSS]'
GO
IF OBJECT_ID('[dbo].[RUDHomepageRSS]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[RUDHomepageRSS]'
DROP PROC [dbo].[RUDHomepageRSS]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[RUDHomepageRSS]'
GO
CREATE Procedure [dbo].[RUDHomepageRSS]
@UserId as uniqueidentifier,
@FeedId as int = 1,
@URL as nvarchar(max) = ' ',
@FeedQuant as int = 1,
@RssTitle as nvarchar(50) = 'RSS Feed',
@CRUD char -- create, retrieve, update, delete
as
set @CRUD = upper(@CRUD)
if @CRUD = 'R'
begin
select * from homepage where user_id = @UserId
end
if @CRUD = 'U'
begin
IF @FeedId = 1
BEGIN
UPDATE
homepage
SET
rss1 = @URL,
rssQuantity1 = @FeedQuant,
rss_title1 = @RssTitle
WHERE
user_id = @UserId
END
IF @FeedId = 2
BEGIN
UPDATE
homepage
SET
rss2 = @URL,
rssQuantity2 = @FeedQuant,
rss_title2 = @RssTitle
WHERE
user_id = @UserId
END
IF @FeedId = 3
BEGIN
UPDATE
homepage
SET
rss3 = @URL,
rssQuantity3 = @FeedQuant,
rss_title3 = @RssTitle
WHERE
user_id = @UserId
END
IF @FeedId = 4
BEGIN
UPDATE
homepage
SET
rss4 = @URL,
rssQuantity4 = @FeedQuant,
rss_title4 = @RssTitle
WHERE
user_id = @UserId
END
IF @FeedId = 5
BEGIN
UPDATE
homepage
SET
rss5 = @URL,
rssQuantity5 = @FeedQuant,
rss_title5 = @RssTitle
WHERE
user_id = @UserId
END
end
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[student_settings]'
GO
ALTER TABLE [dbo].[student_settings] ADD
[audiofeedback_disabled] [bit] NOT NULL CONSTRAINT [DF_student_settings_audiofeedback_disabled] DEFAULT ((0))
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[school_settings]'
GO
ALTER TABLE [dbo].[school_settings] ADD
[school_name] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetSchoolName]'
GO
IF OBJECT_ID('GetSchoolName') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetSchoolName'
DROP PROC GetSchoolName
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetSchoolName'
GO
CREATE Procedure GetSchoolName
/* Param List */
AS
/******************************************************************************
** File:
** Name: GetSchoolName
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SELECT school_name FROM school_settings
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[SaveSchoolName]'
GO
IF OBJECT_ID('SaveSchoolName') IS NOT NULL
BEGIN
PRINT N'-Dropping proc SaveSchoolName'
DROP PROC SaveSchoolName
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc SaveSchoolName'
GO
CREATE Procedure SaveSchoolName
/* Param List */
@SchoolName varchar(100)
AS
/******************************************************************************
** File:
** Name: SaveSchoolName
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
UPDATE school_settings
SET school_name = @SchoolName
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetAssignmentsOn]'
GO
IF OBJECT_ID('GetAssignmentsOn') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetAssignmentsOn'
DROP PROC GetAssignmentsOn
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetAssignmentsOn'
GO
CREATE Procedure GetAssignmentsOn
/* Param List */
@StudentId as uniqueidentifier,
@Date as varchar(50),
@TermId as int
AS
/******************************************************************************
** File:
** Name: GetAssignmentsOn
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth: Paul Shippy
** Date: 11/07/02
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
** 11/14/02 Paul Shippy Added alp_sequence
** 11/25/02 Paul Shippy Renamed, and handled start date
** 12/17/02 Paul Shippy Added cd_number
** 2/20/02 Paul Shippy Added needs_grading
** 12/27/2004 Mark Stasi Added total_time
** 1/11/05 Mark Stasi Added sa.vocab_game_wins, sa.vocab_game_count, sa.vocab_game_time
*******************************************************************************/
SELECT sa.id, sa.sequence_nbr, sa.completed_ind, sa.score, sa.due_date, sa.blocked_ind, sa.custom_xml,
sa.student_unit_id, sa.title, sa.folder, sa.[filename], sa.namespace as 'subject_namespace',
sa.assignment_type, sa.time_to_work, ss.id as 'subject_id', ss.title as 'subject_title', su.title as 'unit_title',
len(sa.notepad) as notepad_length, ss.student_id, u.[username], sa.alp_sequence, sa.start_date, sa.cd_number, sa.total_time, sa.first_accessed, sa.vocab_game_points, sa.vocab_game_count, sa.vocab_game_time,
'needs_grading' = (SELECT count(*) FROM student_problem
WHERE student_assignment_id = sa.id
AND grading_completed_ind = 0
AND auto_graded_problem_ind = 0
AND student_completed_ind = 1
AND assigned_ind = 1)
FROM student_assignment sa
JOIN student_unit su ON su.id = sa.student_unit_id
JOIN student_subject ss ON ss.id = su.student_subject_id
JOIN [user] u ON u.[user_id] = ss.student_id
WHERE CAST(sa.due_date AS DATETIME) >= CAST(@Date AS DATETIME)
AND CAST(sa.start_date AS DATETIME) <= CAST(@Date AS DATETIME)
AND (((charindex((SELECT DATENAME(dw, CAST(@Date AS DATETIME))), (select days_of_week from student_subject where [id] = ss.[id])) > 0) AND sa.assignment_type = 'Project') OR (sa.completed_ind = 1) OR (sa.assignment_type <> 'Project') OR (sa.assignment_type = 'Project' AND (CAST(sa.due_date AS DATETIME) = CAST(@Date AS DATETIME))))
AND ss.student_id = @StudentId
AND su.term_id = @TermId
ORDER BY ss.title, CAST(sa.start_date AS DATETIME), sa.alp_sequence, sa.sequence_nbr
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetSettingsStudent]'
GO
IF OBJECT_ID('GetSettingsStudent') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetSettingsStudent'
DROP PROC GetSettingsStudent
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetSettingsStudent'
GO
CREATE Procedure GetSettingsStudent
/* Param List */
@id uniqueidentifier
AS
/******************************************************************************
** File:
** Name: GetSettingsStudent
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
IF (SELECT COUNT(*)
FROM student_settings
WHERE student_id = @id) > 0
BEGIN
SELECT
access_internet_ind,
max_problem_attempts,
tf_max_problem_attempts,
unlimited_problem_attempts,
leave_msg_skip_ind,
quiz_leave_msg_skip_ind,
quiz_notify_correct_incorrect_ind,
quiz_open_page_ind,
quiz_open_book_ind,
easy_spelling_ind,
quiz_access_answer_key_ind,
access_answer_key_ind,
quiz_easy_spelling_ind,
student_print_ind,
bible_translation,
access_lesson_calculator_ind,
access_lesson_dictionary_ind,
access_lesson_periodic_table_ind,
access_quiz_calculator_ind,
access_quiz_dictionary_ind,
access_quiz_periodic_table_ind,
access_test_calculator_ind,
access_test_dictionary_ind,
access_test_periodic_table_ind,
access_project_calculator_ind,
access_project_dictionary_ind,
access_project_periodic_table_ind,
access_homepage_calculator_ind,
access_homepage_dictionary_ind,
access_homepage_periodic_table_ind,
display_percent_ind,
display_letter_ind,
a_minimum,
b_minimum,
c_minimum,
d_minimum,
lesson_weight,
quiz_weight,
test_weight,
project_weight,
spelling_penalty,
quiz_spelling_penalty,
problem_attempts_penalty,
test_access_answer_key_ind,
test_leave_msg_skip_ind,
test_notify_correct_incorrect_ind,
test_open_book_ind,
test_open_page_ind,
test_spelling_penalty,
test_easy_spelling_ind,
access_allright_ind,
access_farmerfrank_ind,
access_vocab_games_ind,
quiz_notify_parent_ind,
test_notify_parent_ind,
custom_settings_ind,
advanced_lesson_planning_ind,
active_ind,
current_term_id,
audiofeedback_disabled
FROM
student_settings
WHERE
student_id = @id
END
ELSE
BEGIN
SELECT
access_internet_ind,
max_problem_attempts,
tf_max_problem_attempts,
unlimited_problem_attempts,
leave_msg_skip_ind,
quiz_leave_msg_skip_ind,
quiz_notify_correct_incorrect_ind,
quiz_open_page_ind,
quiz_open_book_ind,
easy_spelling_ind,
quiz_access_answer_key_ind,
access_answer_key_ind,
quiz_easy_spelling_ind,
student_print_ind,
bible_translation,
access_lesson_calculator_ind,
access_lesson_dictionary_ind,
access_lesson_periodic_table_ind,
access_quiz_calculator_ind,
access_quiz_dictionary_ind,
access_quiz_periodic_table_ind,
access_test_calculator_ind,
access_test_dictionary_ind,
access_test_periodic_table_ind,
access_project_calculator_ind,
access_project_dictionary_ind,
access_project_periodic_table_ind,
access_homepage_calculator_ind,
access_homepage_dictionary_ind,
access_homepage_periodic_table_ind,
display_percent_ind,
display_letter_ind,
a_minimum,
b_minimum,
c_minimum,
d_minimum,
lesson_weight,
quiz_weight,
test_weight,
project_weight,
spelling_penalty,
quiz_spelling_penalty,
problem_attempts_penalty,
test_access_answer_key_ind,
test_leave_msg_skip_ind,
test_notify_correct_incorrect_ind,
test_open_book_ind,
test_open_page_ind,
test_spelling_penalty,
test_easy_spelling_ind,
access_allright_ind,
access_farmerfrank_ind,
access_vocab_games_ind,
quiz_notify_parent_ind,
test_notify_parent_ind,
custom_settings_ind = 0,
advanced_lesson_planning_ind = 0,
active_ind = 1,
current_term_id = (SELECT TOP 1 term_id FROM term),
audiofeedback_disabled = 0
FROM
school_settings
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetStudent]'
GO
IF OBJECT_ID('GetStudent') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetStudent'
DROP PROC GetStudent
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetStudent'
GO
CREATE Procedure GetStudent
/* Param List */
@studentId as uniqueidentifier
AS
/******************************************************************************
** File:
** Name: GetStudent
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SELECT u.[user_id], u.first_name, u.last_name, u.username, u.password, u.user_type, u.last_login, ss.advanced_lesson_planning_ind,
ss.active_ind, ss.current_term_id, individualized_learning_ind = ss.advanced_lesson_planning_ind , last_sync_date = null,
sync_access_ind = null, global_id = 0, audiofeedback_disabled
FROM [user] u JOIN student_settings ss ON u.user_id = ss.student_id
WHERE u.[user_id] = @studentId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetStudents]'
GO
IF OBJECT_ID('GetStudents') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetStudents'
DROP PROC GetStudents
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetStudents'
GO
CREATE Procedure GetStudents
/* No params */
@ActiveOnly bit
AS
/******************************************************************************
** File:
** Name: GetStudents
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
If @ActiveOnly = 1
BEGIN
SELECT u.user_id, u.first_name, u.last_name, s.bible_translation, individualized_learning_ind = s.advanced_lesson_planning_ind,
s.advanced_lesson_planning_ind, u.username, u.password, u.user_type, u.last_login,
s.active_ind, s.current_term_id, last_sync_date = null, sync_access_ind = 0, global_id = 0, audiofeedback_disabled
FROM [user] u
JOIN student_settings s ON u.user_id = s.student_id
WHERE s.active_ind = 1
ORDER BY u.username
END
Else
BEGIN
SELECT u.user_id, u.first_name, u.last_name, s.bible_translation, individualized_learning_ind = s.advanced_lesson_planning_ind, s.advanced_lesson_planning_ind,
u.username, u.password, u.user_type, u.last_login, s.active_ind, s.current_term_id, last_sync_date = null, sync_access_ind = 0, global_id = 0, audiofeedback_disabled
FROM [user] u
JOIN student_settings s ON u.user_id = s.student_id
ORDER BY u.username
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[SaveStudent]'
GO
IF OBJECT_ID('SaveStudent') IS NOT NULL
BEGIN
PRINT N'-Dropping proc SaveStudent'
DROP PROC SaveStudent
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc SaveStudent'
GO
CREATE Procedure SaveStudent
@StudentId as uniqueidentifier,
@FirstName as varchar(20),
@LastName as varchar(20),
@UserName as varchar(50),
@Password as varchar(12),
@ActiveInd as bit,
@CurrentTermId as int,
@AdvancedLessonPlanningInd as bit,
@AudioFeedbackDisabled as bit,
/* Added this unused parameter to match the school student object parameters*/
@SyncAccessInd as bit
AS
/******************************************************************************
** File:
** Name: SaveStudent
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
/*Variables used to store default values
*/
DECLARE @BibleTranslationDefault char(4)
DECLARE @QuizAccessAnswerKeyIndDefault bit
DECLARE @AccessAnswerKeyIndDefault bit
DECLARE @EasySpellingIndDefault bit
DECLARE @AccessHomepageCalculatorIndDefault bit
DECLARE @AccessHomepageDictionaryIndDefault bit
DECLARE @AccessHomepagePeriodicTableIndDefault bit
DECLARE @AccessInternetIndDefault bit
DECLARE @LeaveMsgSkipIndDefault bit
DECLARE @QuizLeaveMsgSkipIndDefault bit
DECLARE @AccessLessonCalculatorIndDefault bit
DECLARE @AccessLessonDictionaryIndDefault bit
DECLARE @AccessLessonPeriodicTableIndDefault bit
DECLARE @QuizNotifyCorrectIncorrectIndDefault bit
DECLARE @QuizOpenBookIndDefault bit
DECLARE @QuizOpenPageIndDefault bit
DECLARE @AccessProjectCalculatorIndDefault bit
DECLARE @AccessProjectDictionaryIndDefault bit
DECLARE @AccessProjectPeriodicTableIndDefault bit
DECLARE @AccessQuizCalculatorIndDefault bit
DECLARE @AccessQuizDictionaryIndDefault bit
DECLARE @AccessQuizPeriodicTableIndDefault bit
DECLARE @QuizEasySpellingIndDefault bit
DECLARE @DisplayLetterIndDefault bit
DECLARE @DisplayPercentIndDefault bit
DECLARE @StudentPrintIndDefault bit
DECLARE @AccessTestCalculatorIndDefault bit
DECLARE @AccessTestDictionaryIndDefault bit
DECLARE @AccessTestPeriodicTableIndDefault bit
DECLARE @UnlimitedProblemAttemptsDefault bit
DECLARE @AMinimumDefault int
DECLARE @BMinimumDefault int
DECLARE @CMinimumDefault int
DECLARE @DMinimumDefault int
DECLARE @LessonWeightDefault int
DECLARE @MaxProblemAttemptsDefault int
DECLARE @MaxTrueFalseProblemAttemptsDefault int
DECLARE @ProblemAttemptsPenaltyDefault int
DECLARE @ProjectWeightDefault int
DECLARE @QuizSpellingPenaltyDefault int
DECLARE @QuizWeightDefault int
DECLARE @SpellingPenaltyDefault int
DECLARE @TestWeightDefault int
DECLARE @TestAccessAnswerKeyIndDefault bit
DECLARE @TestLeaveMsgSkipIndDefault bit
DECLARE @TestNotifyCorrectIncorrectIndDefault bit
DECLARE @TestOpenBookIndDefault bit
DECLARE @TestOpenPageIndDefault bit
DECLARE @TestSpellingPenaltyDefault int
DECLARE @TestEasySpellingIndDefault bit
DECLARE @AccessAllRightIndDefault bit
DECLARE @AccessFarmerFrankIndDefault bit
DECLARE @AccessNewHomepageIndDefault bit
DECLARE @AccessHomepageWebIndDefault bit
DECLARE @AccessGoogleIndDefault bit
DECLARE @AccessVocabGamesIndDefault bit
DECLARE @QuizNotifyParentIndDefault bit
DECLARE @TestNotifyParentIndDefault bit
DECLARE @IsCustom bit
SET @IsCustom = 0
SELECT
@AccessHomepageCalculatorIndDefault = access_homepage_calculator_ind,
@AccessHomepageDictionaryIndDefault = access_homepage_dictionary_ind,
@AccessHomepagePeriodicTableIndDefault = access_homepage_periodic_table_ind,
@AccessProjectCalculatorIndDefault = access_project_calculator_ind,
@AccessProjectDictionaryIndDefault = access_project_dictionary_ind,
@AccessProjectPeriodicTableIndDefault = access_project_periodic_table_ind,
@AccessLessonCalculatorIndDefault = access_lesson_calculator_ind,
@AccessLessonDictionaryIndDefault = access_lesson_dictionary_ind,
@AccessLessonPeriodicTableIndDefault = access_lesson_periodic_table_ind,
@AccessQuizCalculatorIndDefault = access_quiz_calculator_ind,
@AccessQuizDictionaryIndDefault = access_quiz_dictionary_ind,
@AccessQuizPeriodicTableIndDefault = access_quiz_periodic_table_ind,
@AccessTestCalculatorIndDefault = access_test_calculator_ind,
@AccessTestDictionaryIndDefault = access_test_dictionary_ind,
@AccessTestPeriodicTableIndDefault = access_test_periodic_table_ind,
@BibleTranslationDefault = bible_translation,
@QuizAccessAnswerKeyIndDefault = quiz_access_answer_key_ind,
@AccessAnswerKeyIndDefault = access_answer_key_ind,
@EasySpellingIndDefault = easy_spelling_ind,
@AccessInternetIndDefault = access_internet_ind,
@LeaveMsgSkipIndDefault = leave_msg_skip_ind,
@QuizLeaveMsgSkipIndDefault = quiz_leave_msg_skip_ind,
@QuizNotifyCorrectIncorrectIndDefault = quiz_notify_correct_incorrect_ind,
@QuizOpenBookIndDefault = quiz_open_book_ind,
@QuizOpenPageIndDefault = quiz_open_page_ind,
@QuizEasySpellingIndDefault = quiz_easy_spelling_ind,
@DisplayLetterIndDefault = display_letter_ind,
@DisplayPercentIndDefault = display_percent_ind,
@StudentPrintIndDefault = student_print_ind,
@UnlimitedProblemAttemptsDefault = unlimited_problem_attempts,
@AMinimumDefault = a_minimum,
@BMinimumDefault = b_minimum,
@CMinimumDefault = c_minimum,
@DMinimumDefault = d_minimum,
@LessonWeightDefault = lesson_weight,
@MaxProblemAttemptsDefault = max_problem_attempts,
@MaxTrueFalseProblemAttemptsDefault = tf_max_problem_attempts,
@ProblemAttemptsPenaltyDefault = problem_attempts_penalty,
@ProjectWeightDefault = project_weight,
@QuizSpellingPenaltyDefault = quiz_spelling_penalty,
@QuizWeightDefault = quiz_weight,
@SpellingPenaltyDefault = spelling_penalty,
@TestWeightDefault = test_weight,
@TestAccessAnswerKeyIndDefault = test_access_answer_key_ind,
@TestLeaveMsgSkipIndDefault = test_leave_msg_skip_ind,
@TestNotifyCorrectIncorrectIndDefault = test_notify_correct_incorrect_ind,
@TestOpenBookIndDefault = test_open_book_ind,
@TestOpenPageIndDefault = test_open_page_ind,
@TestSpellingPenaltyDefault = test_spelling_penalty,
@TestEasySpellingIndDefault = test_easy_spelling_ind,
@AccessAllRightIndDefault = access_allright_ind,
@AccessFarmerFrankIndDefault = access_farmerfrank_ind,
@AccessNewHomepageIndDefault = access_new_homepage_ind,
@AccessHomepageWebIndDefault = access_homepage_web_ind,
@AccessGoogleIndDefault = access_google_ind,
@AccessVocabGamesIndDefault = access_vocab_games_ind,
@QuizNotifyParentIndDefault = quiz_notify_parent_ind,
@TestNotifyParentIndDefault = test_notify_parent_ind
FROM school_settings
IF (SELECT COUNT(*)
FROM [user]
WHERE user_id = @StudentId) > 0
BEGIN
IF (SELECT COUNT(*)
FROM [user]
WHERE username = @Username
AND user_id <> @StudentId) > 0
RETURN -100
ELSE
BEGIN
UPDATE [user]
SET first_name = @FirstName,
last_name = @LastName,
username = @UserName,
password = @Password
WHERE user_id = @StudentId
UPDATE student_settings
SET active_ind = @ActiveInd,
current_term_id = @CurrentTermId,
advanced_lesson_planning_ind = @AdvancedLessonPlanningInd,
audiofeedback_disabled = @AudioFeedbackDisabled
WHERE student_id = @StudentId
END
END
ELSE
BEGIN
--Verify that username doesn't already exist
IF (SELECT COUNT(*)
FROM [user]
WHERE username = @Username) > 0
RETURN -100
ELSE
BEGIN
INSERT INTO [user](user_id, getting_started_shown_ind, username,
password, user_type, first_name, last_name)
VALUES (@StudentId, 0, @UserName, @Password, 'S', @FirstName, @LastName)
INSERT INTO
student_settings
(
student_id,
quiz_access_answer_key_ind,
access_answer_key_ind,
easy_spelling_ind,
access_homepage_calculator_ind,
access_homepage_dictionary_ind,
access_homepage_periodic_table_ind,
access_internet_ind,
leave_msg_skip_ind,
quiz_leave_msg_skip_ind,
access_lesson_calculator_ind ,
access_lesson_dictionary_ind ,
access_lesson_periodic_table_ind ,
quiz_notify_correct_incorrect_ind ,
quiz_open_book_ind ,
quiz_open_page_ind ,
access_project_calculator_ind ,
access_project_dictionary_ind ,
access_project_periodic_table_ind ,
access_quiz_calculator_ind ,
access_quiz_dictionary_ind ,
access_quiz_periodic_table_ind ,
quiz_easy_spelling_ind ,
display_letter_ind ,
display_percent_ind ,
student_print_ind ,
access_test_calculator_ind ,
access_test_dictionary_ind ,
access_test_periodic_table_ind ,
unlimited_problem_attempts ,
a_minimum ,
b_minimum ,
c_minimum ,
d_minimum ,
lesson_weight ,
max_problem_attempts ,
tf_max_problem_attempts ,
problem_attempts_penalty ,
project_weight ,
quiz_spelling_penalty ,
quiz_weight ,
spelling_penalty ,
test_weight ,
bible_translation ,
test_access_answer_key_ind,
test_leave_msg_skip_ind,
test_notify_correct_incorrect_ind,
test_open_book_ind,
test_open_page_ind,
test_spelling_penalty,
test_easy_spelling_ind,
access_allright_ind,
access_farmerfrank_ind,
active_ind,
advanced_lesson_planning_ind,
current_term_id,
access_new_homepage_ind,
access_homepage_web_ind,
access_google_ind,
custom_homepage_ind,
custom_settings_ind ,
access_vocab_games_ind,
quiz_notify_parent_ind,
test_notify_parent_ind,
audiofeedback_disabled
)
VALUES
(
@StudentId,
@QuizAccessAnswerKeyIndDefault,
@AccessAnswerKeyIndDefault,
@EasySpellingIndDefault,
@AccessHomepageCalculatorIndDefault,
@AccessHomepageDictionaryIndDefault,
@AccessHomepagePeriodicTableIndDefault,
@AccessInternetIndDefault,
@LeaveMsgSkipIndDefault,
@QuizLeaveMsgSkipIndDefault,
@AccessLessonCalculatorIndDefault,
@AccessLessonDictionaryIndDefault,
@AccessLessonPeriodicTableIndDefault,
@QuizNotifyCorrectIncorrectIndDefault,
@QuizOpenBookIndDefault,
@QuizOpenPageIndDefault,
@AccessProjectCalculatorIndDefault,
@AccessProjectDictionaryIndDefault,
@AccessProjectPeriodicTableIndDefault,
@AccessQuizCalculatorIndDefault,
@AccessQuizDictionaryIndDefault,
@AccessQuizPeriodicTableIndDefault,
@QuizEasySpellingIndDefault,
@DisplayLetterIndDefault,
@DisplayPercentIndDefault,
@StudentPrintIndDefault,
@AccessTestCalculatorIndDefault,
@AccessTestDictionaryIndDefault,
@AccessTestPeriodicTableIndDefault,
@UnlimitedProblemAttemptsDefault,
@AMinimumDefault,
@BMinimumDefault,
@CMinimumDefault,
@DMinimumDefault,
@LessonWeightDefault,
@MaxProblemAttemptsDefault,
@MaxTrueFalseProblemAttemptsDefault,
@ProblemAttemptsPenaltyDefault,
@ProjectWeightDefault,
@QuizSpellingPenaltyDefault,
@QuizWeightDefault,
@SpellingPenaltyDefault,
@TestWeightDefault,
@BibleTranslationDefault,
@TestAccessAnswerKeyIndDefault,
@TestLeaveMsgSkipIndDefault,
@TestNotifyCorrectIncorrectIndDefault,
@TestOpenBookIndDefault,
@TestOpenPageIndDefault,
@TestSpellingPenaltyDefault,
@TestEasySpellingIndDefault,
@AccessAllRightIndDefault,
@AccessFarmerFrankIndDefault,
@ActiveInd,
@AdvancedLessonPlanningInd,
@CurrentTermId,
@AccessNewHomepageIndDefault,
@AccessHomepageWebIndDefault,
@AccessGoogleIndDefault,
0,
@IsCustom,
@AccessVocabGamesIndDefault,
@QuizNotifyParentIndDefault,
@TestNotifyParentIndDefault,
@AudioFeedbackDisabled
)
END
END
RETURN 0
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[ImportStudentSettings]'
GO
IF OBJECT_ID('ImportStudentSettings') IS NOT NULL
BEGIN
PRINT N'-Dropping proc ImportStudentSettings'
DROP PROC ImportStudentSettings
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc ImportStudentSettings'
GO
CREATE Procedure ImportStudentSettings
/* Param List */
@id uniqueidentifier,
@QuizAccessAnswerKeyInd bit,
@AccessAnswerKeyInd bit,
@EasySpellingInd bit,
@AccessHomepageCalculatorInd bit,
@AccessHomepageDictionaryInd bit,
@AccessHomepagePeriodicTableInd bit,
@AccessInternetInd bit,
@LeaveMsgSkipInd bit,
@QuizLeaveMsgSkipInd bit,
@AccessLessonCalculatorInd bit,
@AccessLessonDictionaryInd bit,
@AccessLessonPeriodicTableInd bit,
@QuizNotifyCorrectIncorrectInd bit,
@QuizOpenBookInd bit,
@QuizOpenPageInd bit,
@AccessProjectCalculatorInd bit,
@AccessProjectDictionaryInd bit,
@AccessProjectPeriodicTableInd bit,
@AccessQuizCalculatorInd bit,
@AccessQuizDictionaryInd bit,
@AccessQuizPeriodicTableInd bit,
@QuizEasySpellingInd bit,
@DisplayLetterInd bit,
@DisplayPercentInd bit,
@StudentPrintInd bit,
@AccessTestCalculatorInd bit,
@AccessTestDictionaryInd bit,
@AccessTestPeriodicTableInd bit,
@UnlimitedProblemAttempts bit,
@AMinimum int,
@BMinimum int,
@CMinimum int,
@DMinimum int,
@LessonWeight int,
@MaxProblemAttempts int,
@MaxTrueFalseProblemAttempts int,
@ProblemAttemptsPenalty int,
@ProjectWeight int,
@QuizSpellingPenalty int,
@QuizWeight int,
@SpellingPenalty int,
@TestWeight int,
@BibleTranslation char(4),
@TestAccessAnswerKeyInd bit,
@TestLeaveMsgSkipInd bit,
@TestNotifyCorrectIncorrectInd bit,
@TestOpenBookInd bit,
@TestOpenPageInd bit,
@TestSpellingPenalty int,
@TestEasySpellingInd bit,
@AccessAllRightInd bit,
@AccessFarmerFrankInd bit,
@ActiveInd bit,
@AdvancedLessonPlanningInd bit,
@AccessNewHomepageInd bit,
@AccessHomepageWebInd bit,
@AccessGoogleInd bit,
@CustomHomepageInd bit,
@CurrentTermId int,
@AccessVocabGamesInd bit,
@QuizNotifyParentInd bit,
@TestNotifyParentInd bit,
@AudioFeedbackDisabled bit
AS
/******************************************************************************
** File:
** Name: ImportStudentSettings
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
/*Variables used to store default values
*/
DECLARE @QuizAccessAnswerKeyIndDefault bit
DECLARE @AccessAnswerKeyIndDefault bit
DECLARE @EasySpellingIndDefault bit
DECLARE @AccessHomepageCalculatorIndDefault bit
DECLARE @AccessHomepageDictionaryIndDefault bit
DECLARE @AccessHomepagePeriodicTableIndDefault bit
DECLARE @AccessInternetIndDefault bit
DECLARE @LeaveMsgSkipIndDefault bit
DECLARE @QuizLeaveMsgSkipIndDefault bit
DECLARE @AccessLessonCalculatorIndDefault bit
DECLARE @AccessLessonDictionaryIndDefault bit
DECLARE @AccessLessonPeriodicTableIndDefault bit
DECLARE @QuizNotifyCorrectIncorrectIndDefault bit
DECLARE @QuizOpenBookIndDefault bit
DECLARE @QuizOpenPageIndDefault bit
DECLARE @AccessProjectCalculatorIndDefault bit
DECLARE @AccessProjectDictionaryIndDefault bit
DECLARE @AccessProjectPeriodicTableIndDefault bit
DECLARE @AccessQuizCalculatorIndDefault bit
DECLARE @AccessQuizDictionaryIndDefault bit
DECLARE @AccessQuizPeriodicTableIndDefault bit
DECLARE @QuizEasySpellingIndDefault bit
DECLARE @DisplayLetterIndDefault bit
DECLARE @DisplayPercentIndDefault bit
DECLARE @StudentPrintIndDefault bit
DECLARE @AccessTestCalculatorIndDefault bit
DECLARE @AccessTestDictionaryIndDefault bit
DECLARE @AccessTestPeriodicTableIndDefault bit
DECLARE @UnlimitedProblemAttemptsDefault bit
DECLARE @AMinimumDefault int
DECLARE @BMinimumDefault int
DECLARE @CMinimumDefault int
DECLARE @DMinimumDefault int
DECLARE @LessonWeightDefault int
DECLARE @MaxProblemAttemptsDefault int
DECLARE @MaxTrueFalseProblemAttemptsDefault int
DECLARE @ProblemAttemptsPenaltyDefault int
DECLARE @ProjectWeightDefault int
DECLARE @QuizSpellingPenaltyDefault int
DECLARE @QuizWeightDefault int
DECLARE @SpellingPenaltyDefault int
DECLARE @TestWeightDefault int
DECLARE @BibleTranslationDefault char(4)
DECLARE @TestAccessAnswerKeyIndDefault bit
DECLARE @TestLeaveMsgSkipIndDefault bit
DECLARE @TestNotifyCorrectIncorrectIndDefault bit
DECLARE @TestOpenBookIndDefault bit
DECLARE @TestOpenPageIndDefault bit
DECLARE @TestSpellingPenaltyDefault int
DECLARE @TestEasySpellingIndDefault bit
DECLARE @AccessAllRightIndDefault bit
DECLARE @AccessFarmerFrankIndDefault bit
DECLARE @AccessNewHomepageIndDefault bit
DECLARE @AccessHomepageWebIndDefault bit
DECLARE @AccessVocabGamesIndDefault bit
DECLARE @QuizNotifyParentIndDefault bit
DECLARE @TestNotifyParentIndDefault bit
DECLARE @IsCustom bit
SET @IsCustom = 0
SELECT
@QuizAccessAnswerKeyIndDefault = quiz_access_answer_key_ind,
@AccessAnswerKeyIndDefault = access_answer_key_ind,
@EasySpellingIndDefault = easy_spelling_ind,
@AccessHomepageCalculatorIndDefault = access_homepage_calculator_ind,
@AccessHomepageDictionaryIndDefault = access_homepage_dictionary_ind,
@AccessHomepagePeriodicTableIndDefault = access_homepage_periodic_table_ind,
@AccessInternetIndDefault = access_internet_ind,
@LeaveMsgSkipIndDefault = leave_msg_skip_ind,
@QuizLeaveMsgSkipIndDefault = quiz_leave_msg_skip_ind,
@AccessLessonCalculatorIndDefault = access_lesson_calculator_ind,
@AccessLessonDictionaryIndDefault = access_lesson_dictionary_ind,
@AccessLessonPeriodicTableIndDefault = access_lesson_periodic_table_ind,
@QuizNotifyCorrectIncorrectIndDefault = quiz_notify_correct_incorrect_ind,
@QuizOpenBookIndDefault = quiz_open_book_ind,
@QuizOpenPageIndDefault = quiz_open_page_ind,
@AccessProjectCalculatorIndDefault = access_project_calculator_ind,
@AccessProjectDictionaryIndDefault = access_project_dictionary_ind,
@AccessProjectPeriodicTableIndDefault = access_project_periodic_table_ind,
@AccessQuizCalculatorIndDefault = access_quiz_calculator_ind,
@AccessQuizDictionaryIndDefault = access_quiz_dictionary_ind,
@AccessQuizPeriodicTableIndDefault = access_quiz_periodic_table_ind,
@QuizEasySpellingIndDefault = quiz_easy_spelling_ind,
@DisplayLetterIndDefault = display_letter_ind,
@DisplayPercentIndDefault = display_percent_ind,
@StudentPrintIndDefault = student_print_ind,
@AccessTestCalculatorIndDefault = access_test_calculator_ind,
@AccessTestDictionaryIndDefault = access_test_dictionary_ind,
@AccessTestPeriodicTableIndDefault = access_test_periodic_table_ind,
@UnlimitedProblemAttemptsDefault = unlimited_problem_attempts,
@AMinimumDefault = a_minimum,
@BMinimumDefault = b_minimum,
@CMinimumDefault = c_minimum,
@DMinimumDefault = d_minimum,
@LessonWeightDefault = lesson_weight,
@MaxProblemAttemptsDefault = max_problem_attempts,
@MaxTrueFalseProblemAttemptsDefault = tf_max_problem_attempts,
@ProblemAttemptsPenaltyDefault = problem_attempts_penalty,
@ProjectWeightDefault = project_weight,
@QuizSpellingPenaltyDefault = quiz_spelling_penalty,
@QuizWeightDefault = quiz_weight,
@SpellingPenaltyDefault = spelling_penalty,
@TestWeightDefault = test_weight,
@BibleTranslationDefault = bible_translation,
@TestAccessAnswerKeyIndDefault = test_access_answer_key_ind,
@TestLeaveMsgSkipIndDefault = test_leave_msg_skip_ind,
@TestNotifyCorrectIncorrectIndDefault = test_notify_correct_incorrect_ind,
@TestOpenBookIndDefault = test_open_book_ind,
@TestOpenPageIndDefault = test_open_page_ind,
@TestSpellingPenaltyDefault = test_spelling_penalty,
@TestEasySpellingIndDefault = test_easy_spelling_ind,
@AccessAllRightIndDefault = access_allright_ind,
@AccessFarmerFrankIndDefault = access_farmerfrank_ind,
@AccessVocabGamesIndDefault = access_vocab_games_ind,
@QuizNotifyParentIndDefault = quiz_notify_parent_ind,
@TestNotifyParentIndDefault = test_notify_parent_ind
FROM school_settings
/*compare values to defaults to determine if the values are custom
*/
IF @QuizAccessAnswerKeyInd != @QuizAccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @AccessAnswerKeyInd != @AccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @EasySpellingInd != @EasySpellingIndDefault
SET @IsCustom = 1
IF @AccessHomepageCalculatorInd != @AccessHomepageCalculatorIndDefault
SET @IsCustom = 1
IF @AccessHomepageDictionaryInd != @AccessHomepageDictionaryIndDefault
SET @IsCustom = 1
IF @AccessHomepagePeriodicTableInd != @AccessHomepagePeriodicTableIndDefault
SET @IsCustom = 1
IF @AccessInternetInd != @AccessInternetIndDefault
SET @IsCustom = 1
IF @LeaveMsgSkipInd != @LeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @QuizLeaveMsgSkipInd != @QuizLeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @AccessLessonCalculatorInd != @AccessLessonCalculatorIndDefault
SET @IsCustom = 1
IF @AccessLessonDictionaryInd != @AccessLessonDictionaryIndDefault
SET @IsCustom = 1
IF @AccessLessonPeriodicTableInd != @AccessLessonPeriodicTableIndDefault
SET @IsCustom = 1
IF @QuizNotifyCorrectIncorrectInd != @QuizNotifyCorrectIncorrectIndDefault
SET @IsCustom = 1
IF @QuizOpenBookInd != @QuizOpenBookIndDefault
SET @IsCustom = 1
IF @QuizOpenPageInd != @QuizOpenPageIndDefault
SET @IsCustom = 1
IF @AccessProjectCalculatorInd != @AccessProjectCalculatorIndDefault
SET @IsCustom = 1
IF @AccessProjectDictionaryInd != @AccessProjectDictionaryIndDefault
SET @IsCustom = 1
IF @AccessProjectPeriodicTableInd != @AccessProjectPeriodicTableIndDefault
SET @IsCustom = 1
IF @AccessQuizCalculatorInd != @AccessQuizCalculatorIndDefault
SET @IsCustom = 1
IF @AccessQuizDictionaryInd != @AccessQuizDictionaryIndDefault
SET @IsCustom = 1
IF @AccessQuizPeriodicTableInd != @AccessQuizPeriodicTableIndDefault
SET @IsCustom = 1
IF @QuizEasySpellingInd != @QuizEasySpellingIndDefault
SET @IsCustom = 1
IF @DisplayLetterInd != @DisplayLetterIndDefault
SET @IsCustom = 1
IF @DisplayPercentInd != @DisplayPercentIndDefault
SET @IsCustom = 1
IF @StudentPrintInd != @StudentPrintIndDefault
SET @IsCustom = 1
IF @AccessTestCalculatorInd != @AccessTestCalculatorIndDefault
SET @IsCustom = 1
IF @AccessTestDictionaryInd != @AccessTestDictionaryIndDefault
SET @IsCustom = 1
IF @AccessTestPeriodicTableInd != @AccessTestPeriodicTableIndDefault
SET @IsCustom = 1
IF @UnlimitedProblemAttempts != @UnlimitedProblemAttemptsDefault
SET @IsCustom = 1
IF @AMinimum != @AMinimumDefault
SET @IsCustom = 1
IF @BMinimum != @BMinimumDefault
SET @IsCustom = 1
IF @CMinimum != @CMinimumDefault
SET @IsCustom = 1
IF @DMinimum != @DMinimumDefault
SET @IsCustom = 1
IF @LessonWeight != @LessonWeightDefault
SET @IsCustom = 1
IF @MaxProblemAttempts != @MaxProblemAttemptsDefault
SET @IsCustom = 1
IF @MaxTrueFalseProblemAttempts != @MaxTrueFalseProblemAttemptsDefault
SET @IsCustom = 1
IF @ProblemAttemptsPenalty != @ProblemAttemptsPenaltyDefault
SET @IsCustom = 1
IF @ProjectWeight != @ProjectWeightDefault
SET @IsCustom = 1
IF @QuizSpellingPenalty != @QuizSpellingPenaltyDefault
SET @IsCustom = 1
IF @QuizWeight != @QuizWeightDefault
SET @IsCustom = 1
IF @SpellingPenalty != @SpellingPenaltyDefault
SET @IsCustom = 1
IF @TestWeight != @TestWeightDefault
SET @IsCustom = 1
IF @BibleTranslation != @BibleTranslationDefault
SET @IsCustom = 1
IF @TestAccessAnswerKeyInd != @TestAccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @TestLeaveMsgSkipInd != @TestLeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @TestNotifyCorrectIncorrectInd != @TestNotifyCorrectIncorrectIndDefault
SET @IsCustom = 1
IF @TestOpenBookInd != @TestOpenBookIndDefault
SET @IsCustom = 1
IF @TestOpenPageInd != @TestOpenPageIndDefault
SET @IsCustom = 1
IF @TestSpellingPenalty != @TestSpellingPenaltyDefault
SET @IsCustom = 1
IF @TestEasySpellingInd != @TestEasySpellingIndDefault
SET @IsCustom = 1
IF @AccessAllRightInd != @AccessAllRightIndDefault
SET @IsCustom = 1
IF @AccessFarmerFrankInd != @AccessFarmerFrankIndDefault
SET @IsCustom = 1
IF @AccessVocabGamesInd != @AccessVocabGamesIndDefault
SET @IsCustom = 1
IF @QuizNotifyParentInd != @QuizNotifyParentIndDefault
SET @IsCustom = 1
IF @TestNotifyParentInd != @TestNotifyParentIndDefault
SET @IsCustom = 1
-- If student settings already exist for this student,
IF (SELECT COUNT(*)
FROM student_settings
WHERE student_id = @Id) > 0
BEGIN
/*insert new record */
UPDATE
student_settings
SET
quiz_access_answer_key_ind = @QuizAccessAnswerKeyInd,
access_answer_key_ind = @AccessAnswerKeyInd,
easy_spelling_ind = @EasySpellingInd,
access_homepage_calculator_ind = @AccessHomepageCalculatorInd,
access_homepage_dictionary_ind = @AccessHomepageDictionaryInd,
access_homepage_periodic_table_ind = @AccessHomepagePeriodicTableInd,
access_internet_ind = @AccessInternetInd,
leave_msg_skip_ind = @LeaveMsgSkipInd,
quiz_leave_msg_skip_ind = @QuizLeaveMsgSkipInd,
access_lesson_calculator_ind = @AccessLessonCalculatorInd,
access_lesson_dictionary_ind = @AccessLessonDictionaryInd,
access_lesson_periodic_table_ind = @AccessLessonPeriodicTableInd,
quiz_notify_correct_incorrect_ind = @QuizNotifyCorrectIncorrectInd,
quiz_open_book_ind = @QuizOpenBookInd,
quiz_open_page_ind = @QuizOpenPageInd,
access_project_calculator_ind = @AccessProjectCalculatorInd,
access_project_dictionary_ind = @AccessProjectDictionaryInd,
access_project_periodic_table_ind = @AccessProjectPeriodicTableInd,
access_quiz_calculator_ind = @AccessQuizCalculatorInd,
access_quiz_dictionary_ind = @AccessQuizDictionaryInd,
access_quiz_periodic_table_ind = @AccessQuizPeriodicTableInd,
quiz_easy_spelling_ind = @QuizEasySpellingInd,
display_letter_ind = @DisplayLetterInd,
display_percent_ind = @DisplayPercentInd,
student_print_ind = @StudentPrintInd,
access_test_calculator_ind = @AccessTestCalculatorInd,
access_test_dictionary_ind = @AccessTestDictionaryInd,
access_test_periodic_table_ind = @AccessTestPeriodicTableInd,
unlimited_problem_attempts = @UnlimitedProblemAttempts,
a_minimum = @AMinimum,
b_minimum = @BMinimum,
c_minimum = @CMinimum,
d_minimum = @DMinimum,
lesson_weight = @LessonWeight,
max_problem_attempts = @MaxProblemAttempts,
tf_max_problem_attempts = @MaxTrueFalseProblemAttempts,
problem_attempts_penalty = @ProblemAttemptsPenalty,
project_weight = @ProjectWeight,
quiz_spelling_penalty = @QuizSpellingPenalty,
quiz_weight = @QuizWeight,
spelling_penalty = @SpellingPenalty,
test_weight = @TestWeight,
bible_translation = @BibleTranslation,
test_access_answer_key_ind = @TestAccessAnswerKeyInd,
test_leave_msg_skip_ind = @TestLeaveMsgSkipInd,
test_notify_correct_incorrect_ind = @TestNotifyCorrectIncorrectInd,
test_open_book_ind = @TestOpenBookInd,
test_open_page_ind = @TestOpenPageInd,
test_spelling_penalty = @TestSpellingPenalty,
test_easy_spelling_ind = @TestEasySpellingInd,
access_allright_ind = @AccessAllRightInd,
access_farmerfrank_ind = @AccessFarmerFrankInd,
active_ind = @ActiveInd,
advanced_lesson_planning_ind = @AdvancedLessonPlanningInd,
current_term_id = @CurrentTermId,
access_new_homepage_ind = @AccessNewHomepageInd,
access_homepage_web_ind = @AccessHomepageWebInd,
access_google_ind = @AccessGoogleInd,
custom_homepage_ind = @CustomHomepageInd,
custom_settings_ind = @IsCustom,
access_vocab_games_ind = @AccessVocabGamesInd,
quiz_notify_parent_ind = @QuizNotifyParentInd,
test_notify_parent_ind = @TestNotifyParentInd,
audiofeedback_disabled = @AudioFeedbackDisabled
WHERE student_id = @id
END
ELSE
BEGIN
--Otherwise add new student settings
INSERT INTO student_settings(student_id, quiz_access_answer_key_ind, access_answer_key_ind, easy_spelling_ind,
access_homepage_calculator_ind, access_homepage_dictionary_ind,
access_homepage_periodic_table_ind, access_internet_ind, leave_msg_skip_ind, quiz_leave_msg_skip_ind,
access_lesson_calculator_ind, access_lesson_dictionary_ind,
access_lesson_periodic_table_ind, quiz_notify_correct_incorrect_ind,
quiz_open_book_ind, quiz_open_page_ind,
access_project_calculator_ind, access_project_dictionary_ind,
access_project_periodic_table_ind, access_quiz_calculator_ind,
access_quiz_dictionary_ind, access_quiz_periodic_table_ind,
quiz_easy_spelling_ind, display_letter_ind, display_percent_ind,
student_print_ind, access_test_calculator_ind, access_test_dictionary_ind,
access_test_periodic_table_ind, unlimited_problem_attempts,
a_minimum, b_minimum, c_minimum, d_minimum, lesson_weight, max_problem_attempts, tf_max_problem_attempts,
problem_attempts_penalty, project_weight, quiz_spelling_penalty,
quiz_weight, spelling_penalty, test_weight, bible_translation, active_ind,
advanced_lesson_planning_ind, current_term_id,
test_access_answer_key_ind, test_leave_msg_skip_ind,
test_notify_correct_incorrect_ind, test_open_book_ind,
test_open_page_ind, test_spelling_penalty,
test_easy_spelling_ind, access_allright_ind,
access_farmerfrank_ind, access_new_homepage_ind,
access_homepage_web_ind, access_google_ind, custom_homepage_ind, custom_settings_ind, access_vocab_games_ind, quiz_notify_parent_ind, test_notify_parent_ind, audiofeedback_disabled)
Values (@Id, @QuizAccessAnswerKeyInd, @AccessAnswerKeyInd, @EasySpellingInd, @AccessHomepageCalculatorInd,
@AccessHomepageDictionaryInd, @AccessHomepagePeriodicTableInd, @AccessInternetInd,
@LeaveMsgSkipInd, @QuizLeaveMsgSkipInd, @AccessLessonCalculatorInd, @AccessLessonDictionaryInd, @AccessLessonPeriodicTableInd,
@QuizNotifyCorrectIncorrectInd, @QuizOpenBookInd, @QuizOpenPageInd,
@AccessProjectCalculatorInd, @AccessProjectDictionaryInd, @AccessProjectPeriodicTableInd,
@AccessQuizCalculatorInd, @AccessQuizDictionaryInd, @AccessQuizPeriodicTableInd,
@QuizEasySpellingInd, @DisplayLetterInd, @DisplayPercentInd, @StudentPrintInd,
@AccessTestCalculatorInd, @AccessTestDictionaryInd, @AccessTestPeriodicTableInd,
@UnlimitedProblemAttempts, @AMinimum, @BMinimum, @CMinimum, @DMinimum, @LessonWeight,
@MaxProblemAttempts, @MaxTrueFalseProblemAttempts, @ProblemAttemptsPenalty, @ProjectWeight, @QuizSpellingPenalty,
@QuizWeight, @SpellingPenalty, @TestWeight, @BibleTranslation,
@ActiveInd, @AdvancedLessonPlanningInd, @CurrentTermId,
@TestAccessAnswerKeyInd, @TestLeaveMsgSkipInd,
@TestNotifyCorrectIncorrectInd, @TestOpenBookInd,
@TestOpenPageInd, @TestSpellingPenalty,
@TestEasySpellingInd, @AccessAllRightInd,
@AccessFarmerFrankInd, @AccessNewHomepageInd, @AccessHomepageWebInd, @AccessGoogleInd, @CustomHomepageInd, @IsCustom, @AccessVocabGamesInd, @QuizNotifyParentInd,@TestNotifyParentInd, @AudioFeedbackDisabled)
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[UpdateHomepageRSS]'
GO
IF OBJECT_ID('[dbo].[UpdateHomepageRSS]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[UpdateHomepageRSS]'
DROP PROC [dbo].[UpdateHomepageRSS]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[UpdateHomepageRSS]'
GO
CREATE Procedure [dbo].[UpdateHomepageRSS]
@UserId as uniqueidentifier,
@FeedId as int = 1,
@URL as nvarchar(max) = ' ',
@FeedQuant as int = 1,
@RssTitle as nvarchar(50) = 'RSS Feed'
as
IF @FeedId = 1
BEGIN
UPDATE
homepage
SET
rss1 = @URL,
rssQuantity1 = @FeedQuant,
rss_title1 = @RssTitle
WHERE
user_id = @UserId
END
IF @FeedId = 2
BEGIN
UPDATE
homepage
SET
rss2 = @URL,
rssQuantity2 = @FeedQuant,
rss_title2 = @RssTitle
WHERE
user_id = @UserId
END
IF @FeedId = 3
BEGIN
UPDATE
homepage
SET
rss3 = @URL,
rssQuantity3 = @FeedQuant,
rss_title3 = @RssTitle
WHERE
user_id = @UserId
END
IF @FeedId = 4
BEGIN
UPDATE
homepage
SET
rss4 = @URL,
rssQuantity4 = @FeedQuant,
rss_title4 = @RssTitle
WHERE
user_id = @UserId
END
IF @FeedId = 5
BEGIN
UPDATE
homepage
SET
rss5 = @URL,
rssQuantity5 = @FeedQuant,
rss_title5 = @RssTitle
WHERE
user_id = @UserId
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[ExportStudentAttendance]'
GO
IF OBJECT_ID('ExportStudentAttendance') IS NOT NULL
BEGIN
PRINT N'-Dropping proc ExportStudentAttendance'
DROP PROC ExportStudentAttendance
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc ExportStudentAttendance'
GO
CREATE Procedure ExportStudentAttendance
@StudentId as uniqueidentifier
AS
SELECT *
FROM student_attendance
WHERE student_id = @StudentId AND term_id = (SELECT current_term_id FROM student_settings WHERE student_id = @StudentId)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetHomepage]'
GO
IF OBJECT_ID('[dbo].[GetHomepage]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetHomepage]'
DROP PROC [dbo].[GetHomepage]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetHomepage]'
GO
CREATE Procedure [dbo].[GetHomepage]
/* Param List */
@UserId as uniqueidentifier
AS
/******************************************************************************
** File:
** Name: [GetUserHomepage]
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SELECT [backgroundColor]
,[modColor]
,[fontStyle]
,[fontSize]
,[modOrder]
,[modCollapsed]
,[wallpaperOn]
,[wallpaperTile]
,[rss1]
,[rss2]
,[rss3]
,[rss4]
,[rss5]
,[rssquantity1]
,[rssquantity2]
,[rssquantity3]
,[rssquantity4]
,[rssquantity5]
,[rss_title1]
,[rss_title2]
,[rss_title3]
,[rss_title4]
,[rss_title5]
FROM homepage
WHERE user_id = @UserId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Rebuilding [dbo].[todo]'
GO
CREATE TABLE [dbo].[tmp_rg_xx_todo]
(
[id] [uniqueidentifier] NOT NULL,
[comment] [nvarchar] (4000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[color] [char] (6) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[sthrough] [bit] NOT NULL,
[ordinal] [int] NOT NULL,
[user_id] [uniqueidentifier] NOT NULL,
[modified_date] [datetime] NOT NULL CONSTRAINT [DF_todo_modified_date] DEFAULT (getdate())
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
INSERT INTO [dbo].[tmp_rg_xx_todo]([id], [comment], [color], [sthrough], [ordinal], [user_id]) SELECT newid(), [comment], [color], [sthrough], [ordinal], [user_id] FROM [dbo].[todo]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
DROP TABLE [dbo].[todo]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
EXEC sp_rename N'[dbo].[tmp_rg_xx_todo]', N'todo'
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating primary key [PK_todo] on [dbo].[todo]'
GO
ALTER TABLE [dbo].[todo] ADD CONSTRAINT [PK_todo] PRIMARY KEY CLUSTERED ([id])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[CRUDTodo]'
GO
SET QUOTED_IDENTIFIER OFF
GO
IF OBJECT_ID('[dbo].[CRUDTodo]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[CRUDTodo]'
DROP PROC [dbo].[CRUDTodo]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[CRUDTodo]'
GO
CREATE proc [dbo].[CRUDTodo]
@CRUD char, -- create, retrieve, update, delete, sync
@id uniqueidentifier= null,
@comment nvarchar(4000)= null,
@color char(6)= null,
@sthrough bit= null,
@ordinal int= null,
@uid uniqueidentifier= null,
@modified_date datetime= null
as
set @modified_date = isnull(@modified_date, getdate())
if @CRUD = 'S'
begin
if exists(select * from todo where id = @id)
set @CRUD = 'U'
else
begin
set @CRUD = 'C'
end
end
if @CRUD = 'C'
begin
set @id = isnull(@id, newid())
insert into todo
values(@id, @comment, @color, @sthrough, @ordinal, @uid, @modified_date)
select @id
end
if @CRUD = 'R'
select * from todo
where user_id = @uid
if @CRUD = 'U'
update todo set
comment = @comment,
color = @color,
sthrough = @sthrough,
ordinal = @ordinal,
user_id = @uid,
modified_date = @modified_date
where id = @id
if @CRUD = 'D'
begin
delete from todo
where id = @id
end
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[DeleteStudent]'
GO
SET QUOTED_IDENTIFIER ON
GO
IF OBJECT_ID('DeleteStudent') IS NOT NULL
BEGIN
PRINT N'-Dropping proc DeleteStudent'
DROP PROC DeleteStudent
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc DeleteStudent'
GO
CREATE Procedure DeleteStudent
/* Param List */
@StudentId uniqueidentifier
AS
/******************************************************************************
** File:
** Name: DeleteStudent
** Desc:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
Begin Transaction
--Delete messages to student
DELETE message
WHERE recipient_id = @StudentId
IF @@ERROR <> 0 GOTO Handle_Error
--Delete messages from student
DELETE message
WHERE sender_id = @StudentId
IF @@ERROR <> 0 GOTO Handle_Error
DELETE TODO
WHERE USER_ID = @STUDENTID
IF @@ERROR <> 0 GOTO Handle_Error
--Delete user
--Delete student settings
--Delete student journal
--Delete student calendar
--Delete student subjects
--Delete student units
--Delete student presentation output
--Delete student assignments
--Delete student problems
DELETE [user]
WHERE [user_id] = @StudentId
Handle_Error:
IF (@@error <> 0)
Rollback Transaction
ELSE
Commit Transaction
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[CRUDUserWidget]'
GO
IF OBJECT_ID('[dbo].[CRUDUserWidget]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[CRUDUserWidget]'
DROP PROC [dbo].[CRUDUserWidget]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[CRUDUserWidget]'
GO
CREATE proc [dbo].[CRUDUserWidget]
@UserID uniqueidentifier,
@WidgetID int = null,
@Active bit = 1,
@JustGetActive bit = 0,
@CRUD char -- create, retrieve, update, delete
as
set @CRUD = upper(@CRUD)
declare @OLDORDER nvarchar(500)
declare @MODNAME nvarchar(500)
declare @NEWORDER nvarchar(500)
if @CRUD = 'U'
begin
update user_widget set active = @active
where user_id = @UserID and widget_id = @WidgetID
set @OLDORDER = (select h.modorder from homepage h where h.user_id = @UserID)
set @MODNAME = (select w.name from widget_app w where w.id = @WidgetID)
if @active = 1
begin
if charindex(@MODNAME, @OLDORDER) = 0 -- if @modname isn't currently in homepage.modorder
begin
set @NEWORDER = @OLDORDER + ',' + @MODNAME
set @NEWORDER = replace(@NEWORDER,',|','|')
set @NEWORDER = replace(@NEWORDER,'|,','|')
set @NEWORDER = replace(@NEWORDER,',,',',')
update homepage set modOrder = @NEWORDER
where user_id = @UserID
end
end
if @active = 0
begin
set @NEWORDER = replace(@OLDORDER,@MODNAME,'')
set @NEWORDER = replace(@NEWORDER,',|','|')
set @NEWORDER = replace(@NEWORDER,'|,','|')
set @NEWORDER = replace(@NEWORDER,',,',',')
update homepage set modOrder = @NEWORDER
where user_id = @UserID
end
end
if @CRUD = 'C'
begin
if not exists (select user_id
from user_widget
where user_id = @UserID and widget_id = @WidgetID)
begin
insert into user_widget
(user_id, widget_id) values (@UserID, @WidgetID)
update homepage set modOrder =
(select h.modorder from homepage h where h.user_id = @UserID) + ',' +
(select w.name from widget_app w where w.id = @WidgetID)
where user_id = @UserID
end
end
if @CRUD = 'R'
begin
Create table #temp(rssFeedNumber varchar(10), rssTitle varchar(max))
insert into #temp(rssFeedNumber, rssTitle)
select '1' as rssFeedNumber, rss_title1 as rssTitle
from homepage
where user_id = @UserID
insert into #temp(rssFeedNumber, rssTitle)
select '2' as rssFeedNumber, rss_title2 as rssTitle
from homepage
where user_id = @UserID
insert into #temp(rssFeedNumber, rssTitle)
select '3' as rssFeedNumber, rss_title3 as rssTitle
from homepage
where user_id = @UserID
insert into #temp(rssFeedNumber, rssTitle)
select '4' as rssFeedNumber, rss_title4 as rssTitle
from homepage
where user_id = @UserID
insert into #temp(rssFeedNumber, rssTitle)
select '5' as rssFeedNumber, rss_title5 as rssTitle
from homepage
where user_id = @UserID
if @JustGetActive = 1
begin
select w.id,
isnull(r.rssTitle,w.title) as title,
w.title,
w.template,
w.post_load_javascript,
w.requires_web,
w.optional,
w.teacher,
w.student,
w.default_column,
w.default_order,
u.active
from user_widget u
inner join widget_app w
on u.widget_id = w.id
left join #temp r
on RIGHT(w.title,1) = cast(r.rssFeedNumber as varchar(1))
where user_id = @UserID and u.active = 1
order by w.title
end
else
begin
select w.id,
isnull(r.rssTitle,w.title) as title,
w.title,
w.template,
w.post_load_javascript,
w.requires_web,
w.optional,
w.teacher,
w.student,
w.default_column,
w.default_order,
u.active
from user_widget u
inner join widget_app w
on u.widget_id = w.id
left join #temp r
on RIGHT(w.title,1) = cast(r.rssFeedNumber as varchar(1))
where user_id = @UserID
order by w.title
end
end
if @CRUD = 'D'
begin
delete from user_widget
where user_id = @UserID
and widget_id = @WidgetID
set @OLDORDER = (select h.modorder from homepage h where h.user_id = @UserID)
set @MODNAME = (select w.name from widget_app w where w.id = @WidgetID)
set @NEWORDER = replace(@OLDORDER,@MODNAME,'')
set @NEWORDER = replace(@NEWORDER,',,',',')
update homepage set modOrder = @NEWORDER where user_id = @UserID
end
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[SaveSettingsStudentSubject]'
GO
IF OBJECT_ID('SaveSettingsStudentSubject') IS NOT NULL
BEGIN
PRINT N'-Dropping proc SaveSettingsStudentSubject'
DROP PROC SaveSettingsStudentSubject
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc SaveSettingsStudentSubject'
GO
CREATE Procedure SaveSettingsStudentSubject
/* Param List */
@id uniqueidentifier,
@QuizAccessAnswerKeyInd bit,
@AccessAnswerKeyInd bit,
@EasySpellingInd bit,
@AccessInternetInd bit,
@LeaveMsgSkipInd bit,
@QuizLeaveMsgSkipInd bit,
@QuizNotifyCorrectIncorrectInd bit,
@QuizOpenBookInd bit,
@QuizOpenPageInd bit,
@QuizEasySpellingInd bit,
@DisplayLetterInd bit,
@DisplayPercentInd bit,
@UnlimitedProblemAttempts bit,
@AMinimum int,
@BMinimum int,
@CMinimum int,
@DMinimum int,
@LessonWeight int,
@MaxProblemAttempts int,
@MaxTrueFalseProblemAttempts int,
@ProblemAttemptsPenalty int,
@ProjectWeight int,
@QuizSpellingPenalty int,
@QuizWeight int,
@SpellingPenalty int,
@TestWeight int,
@TestAccessAnswerKeyInd bit,
@TestLeaveMsgSkipInd bit,
@TestNotifyCorrectIncorrectInd bit,
@TestOpenBookInd bit,
@TestOpenPageInd bit,
@TestSpellingPenalty int,
@TestEasySpellingInd bit,
@AccessAllRightInd bit,
@AccessFarmerFrankInd bit,
@AccessVocabGamesInd bit,
@QuizNotifyParentInd bit,
@TestNotifyParentInd bit
AS
/******************************************************************************
** File:
** Name: SaveSettingsStudentSubject
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
/*Variables used to store default values
*/
DECLARE @QuizAccessAnswerKeyIndDefault bit
DECLARE @AccessAnswerKeyIndDefault bit
DECLARE @EasySpellingIndDefault bit
DECLARE @AccessInternetIndDefault bit
DECLARE @LeaveMsgSkipIndDefault bit
DECLARE @QuizLeaveMsgSkipIndDefault bit
DECLARE @QuizNotifyCorrectIncorrectIndDefault bit
DECLARE @QuizOpenBookIndDefault bit
DECLARE @QuizOpenPageIndDefault bit
DECLARE @QuizEasySpellingIndDefault bit
DECLARE @DisplayLetterIndDefault bit
DECLARE @DisplayPercentIndDefault bit
DECLARE @UnlimitedProblemAttemptsDefault bit
DECLARE @AMinimumDefault int
DECLARE @BMinimumDefault int
DECLARE @CMinimumDefault int
DECLARE @DMinimumDefault int
DECLARE @LessonWeightDefault int
DECLARE @MaxProblemAttemptsDefault int
DECLARE @MaxTrueFalseProblemAttemptsDefault int
DECLARE @ProblemAttemptsPenaltyDefault int
DECLARE @ProjectWeightDefault int
DECLARE @QuizSpellingPenaltyDefault int
DECLARE @QuizWeightDefault int
DECLARE @SpellingPenaltyDefault int
DECLARE @TestWeightDefault int
DECLARE @TestAccessAnswerKeyIndDefault bit
DECLARE @TestLeaveMsgSkipIndDefault bit
DECLARE @TestNotifyCorrectIncorrectIndDefault bit
DECLARE @TestOpenBookIndDefault bit
DECLARE @TestOpenPageIndDefault bit
DECLARE @TestSpellingPenaltyDefault int
DECLARE @TestEasySpellingIndDefault bit
DECLARE @AccessAllRightIndDefault bit
DECLARE @AccessFarmerFrankIndDefault bit
DECLARE @AccessVocabGamesIndDefault bit
DECLARE @QuizNotifyParentIndDefault bit
DECLARE @TestNotifyParentIndDefault bit
DECLARE @IsCustom bit
DECLARE @StudentId uniqueidentifier
SET @IsCustom = 0
SELECT @StudentId = student_id
FROM student_subject
WHERE [id] = @id
SELECT
@QuizAccessAnswerKeyIndDefault = quiz_access_answer_key_ind,
@AccessAnswerKeyIndDefault = access_answer_key_ind,
@EasySpellingIndDefault = easy_spelling_ind,
@AccessInternetIndDefault = access_internet_ind,
@LeaveMsgSkipIndDefault = leave_msg_skip_ind,
@QuizLeaveMsgSkipIndDefault = quiz_leave_msg_skip_ind,
@QuizNotifyCorrectIncorrectIndDefault = quiz_notify_correct_incorrect_ind,
@QuizOpenBookIndDefault = quiz_open_book_ind,
@QuizOpenPageIndDefault = quiz_open_page_ind,
@QuizEasySpellingIndDefault = quiz_easy_spelling_ind,
@DisplayLetterIndDefault = display_letter_ind,
@DisplayPercentIndDefault = display_percent_ind,
@UnlimitedProblemAttemptsDefault = unlimited_problem_attempts,
@AMinimumDefault = a_minimum,
@BMinimumDefault = b_minimum,
@CMinimumDefault = c_minimum,
@DMinimumDefault = d_minimum,
@LessonWeightDefault = lesson_weight,
@MaxProblemAttemptsDefault = max_problem_attempts,
@MaxTrueFalseProblemAttemptsDefault = tf_max_problem_attempts,
@ProblemAttemptsPenaltyDefault = problem_attempts_penalty,
@ProjectWeightDefault = project_weight,
@QuizSpellingPenaltyDefault = quiz_spelling_penalty,
@QuizWeightDefault = quiz_weight,
@SpellingPenaltyDefault = spelling_penalty,
@TestWeightDefault = test_weight,
@TestAccessAnswerKeyIndDefault = test_access_answer_key_ind,
@TestLeaveMsgSkipIndDefault = test_leave_msg_skip_ind,
@TestNotifyCorrectIncorrectIndDefault = test_notify_correct_incorrect_ind,
@TestOpenBookIndDefault = test_open_book_ind,
@TestOpenPageIndDefault = test_open_page_ind,
@TestSpellingPenaltyDefault = test_spelling_penalty,
@TestEasySpellingIndDefault = test_easy_spelling_ind,
@AccessAllRightIndDefault = access_allright_ind,
@AccessFarmerFrankIndDefault = access_farmerfrank_ind,
@AccessVocabGamesIndDefault = access_vocab_games_ind,
@QuizNotifyParentIndDefault = quiz_notify_parent_ind,
@TestNotifyParentIndDefault = test_notify_parent_ind
FROM student_settings
WHERE student_id = @StudentId
/*compare values to defaults to determine if the values are custom
*/
IF @QuizAccessAnswerKeyInd != @QuizAccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @AccessAnswerKeyInd != @AccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @EasySpellingInd != @EasySpellingIndDefault
SET @IsCustom = 1
IF @AccessInternetInd != @AccessInternetIndDefault
SET @IsCustom = 1
IF @LeaveMsgSkipInd != @LeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @QuizLeaveMsgSkipInd != @QuizLeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @QuizNotifyCorrectIncorrectInd != @QuizNotifyCorrectIncorrectIndDefault
SET @IsCustom = 1
IF @QuizOpenBookInd != @QuizOpenBookIndDefault
SET @IsCustom = 1
IF @QuizOpenPageInd != @QuizOpenPageIndDefault
SET @IsCustom = 1
IF @QuizEasySpellingInd != @QuizEasySpellingIndDefault
SET @IsCustom = 1
IF @DisplayLetterInd != @DisplayLetterIndDefault
SET @IsCustom = 1
IF @DisplayPercentInd != @DisplayPercentIndDefault
SET @IsCustom = 1
IF @UnlimitedProblemAttempts != @UnlimitedProblemAttemptsDefault
SET @IsCustom = 1
IF @AMinimum != @AMinimumDefault
SET @IsCustom = 1
IF @BMinimum != @BMinimumDefault
SET @IsCustom = 1
IF @CMinimum != @CMinimumDefault
SET @IsCustom = 1
IF @DMinimum != @DMinimumDefault
SET @IsCustom = 1
IF @LessonWeight != @LessonWeightDefault
SET @IsCustom = 1
IF @MaxProblemAttempts != @MaxProblemAttemptsDefault
SET @IsCustom = 1
IF @MaxTrueFalseProblemAttempts != @MaxTrueFalseProblemAttemptsDefault
SET @IsCustom = 1
IF @ProblemAttemptsPenalty != @ProblemAttemptsPenaltyDefault
SET @IsCustom = 1
IF @ProjectWeight != @ProjectWeightDefault
SET @IsCustom = 1
IF @QuizSpellingPenalty != @QuizSpellingPenaltyDefault
SET @IsCustom = 1
IF @QuizWeight != @QuizWeightDefault
SET @IsCustom = 1
IF @SpellingPenalty != @SpellingPenaltyDefault
SET @IsCustom = 1
IF @TestWeight != @TestWeightDefault
SET @IsCustom = 1
IF @TestAccessAnswerKeyInd != @TestAccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @TestLeaveMsgSkipInd != @TestLeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @TestNotifyCorrectIncorrectInd != @TestNotifyCorrectIncorrectIndDefault
SET @IsCustom = 1
IF @TestOpenBookInd != @TestOpenBookIndDefault
SET @IsCustom = 1
IF @TestOpenPageInd != @TestOpenPageIndDefault
SET @IsCustom = 1
IF @TestSpellingPenalty != @TestSpellingPenaltyDefault
SET @IsCustom = 1
IF @TestEasySpellingInd != @TestEasySpellingIndDefault
SET @IsCustom = 1
IF @AccessAllRightInd != @AccessAllRightIndDefault
SET @IsCustom = 1
IF @AccessFarmerFrankInd != @AccessFarmerFrankIndDefault
SET @IsCustom = 1
IF @AccessVocabGamesInd != @AccessVocabGamesIndDefault
SET @IsCustom = 1
IF @QuizNotifyParentInd != @QuizNotifyParentIndDefault
SET @IsCustom = 1
IF @TestNotifyParentInd != @TestNotifyParentIndDefault
SET @IsCustom = 1
/*insert new record */
UPDATE
student_subject
SET
quiz_access_answer_key_ind = @QuizAccessAnswerKeyInd,
access_answer_key_ind = @AccessAnswerKeyInd,
easy_spelling_ind = @EasySpellingInd,
access_internet_ind = @AccessInternetInd,
leave_msg_skip_ind = @LeaveMsgSkipInd,
quiz_leave_msg_skip_ind = @QuizLeaveMsgSkipInd,
quiz_notify_correct_incorrect_ind = @QuizNotifyCorrectIncorrectInd,
quiz_open_book_ind = @QuizOpenBookInd,
quiz_open_page_ind = @QuizOpenPageInd,
quiz_easy_spelling_ind = @QuizEasySpellingInd,
display_letter_ind = @DisplayLetterInd,
display_percent_ind = @DisplayPercentInd,
unlimited_problem_attempts = @UnlimitedProblemAttempts,
a_minimum = @AMinimum,
b_minimum = @BMinimum,
c_minimum = @CMinimum,
d_minimum = @DMinimum,
lesson_weight = @LessonWeight,
max_problem_attempts = @MaxProblemAttempts,
tf_max_problem_attempts = @MaxTrueFalseProblemAttempts,
problem_attempts_penalty = @ProblemAttemptsPenalty,
project_weight = @ProjectWeight,
quiz_spelling_penalty = @QuizSpellingPenalty,
quiz_weight = @QuizWeight,
spelling_penalty = @SpellingPenalty,
test_weight = @TestWeight,
test_access_answer_key_ind = @TestAccessAnswerKeyInd,
test_leave_msg_skip_ind = @TestLeaveMsgSkipInd,
test_notify_correct_incorrect_ind = @TestNotifyCorrectIncorrectInd,
test_open_book_ind = @TestOpenBookInd,
test_open_page_ind = @TestOpenPageInd,
test_spelling_penalty = @TestSpellingPenalty,
test_easy_spelling_ind = @TestEasySpellingInd,
access_allright_ind = @AccessAllRightInd,
access_farmerfrank_ind = @AccessFarmerFrankInd,
access_vocab_games_ind = @AccessVocabGamesInd,
quiz_notify_parent_ind = @QuizNotifyParentInd,
test_notify_parent_ind = @TestNotifyParentInd,
custom_settings_ind = @IsCustom
WHERE [id] = @id
-- Loop through student units and recalculate unit grades
DECLARE @UnitId as uniqueidentifier
DECLARE curUnits CURSOR READ_ONLY FOR
SELECT [id]
FROM student_unit
WHERE student_subject_id = @id
OPEN curUnits
FETCH NEXT FROM curUnits INTO @UnitId
WHILE (@@fetch_status <> -1)
BEGIN
IF (@@fetch_status <> -2)
BEGIN
EXEC CalculateUnitGrade @UnitId
END
FETCH NEXT FROM curUnits INTO @UnitId
END
CLOSE curUnits
DEALLOCATE curUnits
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[CalculateAssignmentGrade]'
GO
IF OBJECT_ID('CalculateAssignmentGrade') IS NOT NULL
BEGIN
PRINT N'-Dropping proc CalculateAssignmentGrade'
DROP PROC CalculateAssignmentGrade
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc CalculateAssignmentGrade'
GO
CREATE Procedure CalculateAssignmentGrade
/* Param List */
@AssignmentId uniqueidentifier
AS
/******************************************************************************
** File:
** Name: CalculateAssignmentGrade
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SET NOCOUNT ON
DECLARE @intPtsPossible Integer,
@numPtsReceived Numeric(9,2),
@intIncompleteCount Integer,
@intSkippedCount Integer,
@intProblemCount Integer,
@strAssignmentType as char(10),
@newScore tinyint
SET @intProblemCount = (SELECT COUNT(*)
FROM student_problem
WHERE student_assignment_id = @AssignmentId
AND assigned_ind = 1)
/*Check for skipped problems*/
SET @intSkippedCount = (SELECT COUNT(*)
FROM student_problem
WHERE student_assignment_id = @AssignmentId
AND assigned_ind = 0)
/*Check for assigned problems that are not complete*/
SET @intIncompleteCount = (SELECT COUNT(*)
FROM student_problem
WHERE student_assignment_id = @AssignmentId
AND assigned_ind = 1
AND student_completed_ind = 0)
IF @intIncompleteCount = 0 AND @intProblemCount > 0
/* there are no incomplete problems so calculate the assignment grade and set the assignment completed flag to true*/
BEGIN
SET @intPtsPossible = (SELECT SUM(points_possible)
FROM student_problem
WHERE student_assignment_id = @AssignmentId
AND grading_completed_ind = 1 AND assigned_ind = 1)
SET @numPtsReceived = (SELECT SUM(points_received)
FROM student_problem
WHERE student_assignment_id = @AssignmentId
AND grading_completed_ind = 1 AND assigned_ind = 1)
SET @strAssignmentType = (SELECT assignment_type from student_assignment WHERE [id] = @AssignmentId)
IF @intPtsPossible = 0 OR @strAssignmentType = 'Review'
SET @newScore = NULL
ELSE
SET @newScore = ROUND((@numPtsReceived/@intPtsPossible) * 100,0)
UPDATE student_assignment
SET score = @newScore,
completed_ind = 1,
completed_date = GETDATE()
WHERE id = @AssignmentId
END
ELSE
If @intSkippedCount > 0 And @intProblemCount = 0
BEGIN
/*All of the problems are skipped, so set assignment grade to 0 for non review assignment types or NULL for review type and completed flag to true*/
SET @strAssignmentType = (SELECT assignment_type from student_assignment WHERE [id] = @AssignmentId)
IF @strAssignmentType = 'Review'
SET @newScore = NULL
ELSE
SET @newScore = 0
UPDATE student_assignment
SET score = @newScore,
completed_ind = 1,
completed_date = GETDATE()
WHERE id = @AssignmentId
END
ELSE
/*Not all of the problems are completed, so set assignment grade to NULL and completed flag to false*/
BEGIN
UPDATE student_assignment
SET score = NULL,
completed_ind = 0,
completed_date = NULL
WHERE id = @AssignmentId
END
DECLARE @UnitId uniqueidentifier
SELECT @UnitId = student_unit_id FROM student_assignment WHERE id = @AssignmentId
EXEC CalculateUnitGrade @UnitId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[ClearStudentProblemAndAnswer]'
GO
IF OBJECT_ID('ClearStudentProblemAndAnswer') IS NOT NULL
BEGIN
PRINT N'-Dropping proc ClearStudentProblemAndAnswer'
DROP PROC ClearStudentProblemAndAnswer
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc ClearStudentProblemAndAnswer'
GO
CREATE Procedure ClearStudentProblemAndAnswer
(@AssignmentId as uniqueidentifier,
@ProblemId as integer)
AS
BEGIN TRANSACTION
--Clear the student_problem record so that the student can work the problem again and remove student answer
UPDATE
student_problem
SET
grading_completed_ind = 0,
student_completed_ind = 0,
attempts_remaining = 1,
points_received = -1,
student_skipped_ind = 0,
student_answer = NULL
WHERE
problem_id = @ProblemId AND
student_assignment_id = @AssignmentId
IF @@ERROR <> 0 GOTO Handle_Error
DELETE student_problem_file
WHERE
problem_id = @ProblemId AND
student_assignment_id = @AssignmentId
IF @@ERROR <> 0 GOTO Handle_Error
--Update the student_assignment record so that the assignment is not complete
UPDATE student_assignment
SET completed_ind = 0, student_completed_date = null
WHERE [id] = @AssignmentId
Handle_Error:
IF (@@error <> 0)
Rollback Transaction
ELSE
BEGIN
Commit Transaction
EXEC CalculateAssignmentGrade @AssignmentId
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[TimeReport]'
GO
IF OBJECT_ID('TimeReport') IS NOT NULL
BEGIN
PRINT N'-Dropping proc TimeReport'
DROP PROC TimeReport
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc TimeReport'
GO
CREATE Procedure TimeReport
/* Param List */
@strTermIds as varchar(100),
@strStudentIds as varChar(6500)
AS
/******************************************************************************
** File:
** Name: TimeReport
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SET NOCOUNT ON
DECLARE @strSql As VarChar(3000)
SET @strSql ='SELECT ss.student_id, u.username, u.first_name + '' '' + u.last_name as''displayname'', t.description, ss.title, sum(su.total_time) as total_time, ''hours'' = ''0'', ''minutes'' = ''0'', ''student_total_time'' = ''0'''
SET @strSql = @strSql + ' FROM student_subject ss '
SET @strSql = @strSql + ' INNER JOIN [user] u '
SET @strSql = @strSql + ' on u.user_id = ss.student_id '
SET @strSql = @strSql + ' INNER JOIN student_unit su '
SET @strSql = @strSql + ' on su.student_subject_id = ss.id '
SET @strSql = @strSql + ' INNER JOIN term t '
SET @strSql = @strSql + ' on t.term_id = su.term_id '
SET @strSql = @strSql + ' WHERE '
SET @strSql = @strSql + ' u.user_id IN ('
SET @strSql = @strSql + @strStudentIds + ') and '
SET @strSql = @strSql + ' t.term_id in (' + @strTermIds + ')'
SET @strSql = @strSql + ' GROUP BY t.description, u.username, u.last_name, u.first_name, ss.student_id, ss.title '
SET @strSql = @strSql + ' ORDER BY u.username, u.last_name, u.first_name, ss.title '
exec(@strSql)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[DailyWorkReport]'
GO
IF OBJECT_ID('DailyWorkReport') IS NOT NULL
BEGIN
PRINT N'-Dropping proc DailyWorkReport'
DROP PROC DailyWorkReport
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc DailyWorkReport'
GO
CREATE Procedure DailyWorkReport
/* Param List */
@strGradeOption As char(25),
@strStudentIds as varChar(6500),
@dtStart as datetime,
@dtEnd as datetime
AS
SET NOCOUNT ON
DECLARE @strSql As VarChar(8000)
--Build sql statement
SET @strSql ='SELECT DISTINCT u.username, u.first_name + '' '' + u.last_name as "displayname", ss.title as "subjecttitle", su.title as "unittitle", su.sequence_nbr, sa.[id], sa.title as "assignmenttitle", sa.last_worked_on, sa.student_completed_date, sa.completed_date, ISNULL(due_date, ''N/A'') AS ''date_due'', sa.score, sa.sequence_nbr, sa.assignment_type, "needsgrading" = '' '', "description" = '' '', CONVERT(VARCHAR(10),sa.last_worked_on,101) as "display_date", '
IF lower(@strGradeOption) = 'letter'
BEGIN
SET @strSql = @strSql + 'AssignmentGrade = CASE '
SET @strSql = @strSql + 'WHEN sa.score is null THEN '''' '
SET @strSql = @strSql + 'WHEN sa.score >= a_minimum THEN ''A'' '
SET @strSql = @strSql + 'WHEN sa.score >= b_minimum THEN ''B'' '
SET @strSql = @strSql + 'WHEN sa.score >= c_minimum THEN ''C'' '
SET @strSql = @strSql + 'WHEN sa.score >= d_minimum THEN ''D'' '
SET @strSql = @strSql + 'Else ''F'' '
SET @strSql = @strSql + 'End '
END
IF lower(@strGradeOption) = 'percent'
BEGIN
SET @strSQL = @strSql + 'AssignmentGrade = RTRIM(CAST(sa.score AS char(3)))+ ''%'' '
END
IF lower(@strGradeOption) = 'both'
BEGIN
SET @strSQL = @strSql + 'AssignmentGrade = CASE '
SET @strSQL = @strSql + 'WHEN sa.score >= a_minimum '
SET @strSQL = @strSql + 'THEN ''A: '' + RTRIM(CAST(sa.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN sa.score >= b_minimum '
SET @strSQL = @strSql + 'THEN ''B: '' + RTRIM(CAST(sa.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN sa.score >= c_minimum '
SET @strSQL = @strSql + 'THEN ''C: '' + RTRIM(CAST(sa.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN sa.score >= d_minimum '
SET @strSQL = @strSql + 'THEN ''D: '' + RTRIM(CAST(sa.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'Else ''F: '' + RTRIM(CAST(sa.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'End '
END
SET @strSql = @strSql + 'FROM student_assignment sa '
SET @strSql = @strSql + 'INNER JOIN student_unit su on sa.student_unit_id = su.[id] '
SET @strSQL = @strSql + 'INNER JOIN student_subject ss on su.student_subject_id = ss.[id] '
SET @strSQL = @strSql + 'INNER JOIN [user] u on u.[user_id] = ss.student_id '
SET @strSql = @strSql + 'WHERE u.[user_id] in ('
SET @strSql = @strSql + @strStudentIds + ') '
SET @strSql = @strSql + ' AND sa.last_worked_on BETWEEN ''' + CAST(@dtStart as varchar) + ''' AND ''' + CAST(@dtEnd as varchar)
SET @strSql = @strSql + ''' ORDER BY u.username, ss.title, su.sequence_nbr, sa.sequence_nbr'
EXEC(@strSql)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[AttendanceReport]'
GO
IF OBJECT_ID('AttendanceReport') IS NOT NULL
BEGIN
PRINT N'-Dropping proc AttendanceReport'
DROP PROC AttendanceReport
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc AttendanceReport'
GO
CREATE Procedure AttendanceReport
@strTermId as varChar(100),
@strStudentIds as varChar(500)
AS
DECLARE @strSql As VarChar(3000)
--Build sql statement
SET @strSql ='SELECT t.description, u.username, u.first_name + '' '' + u.last_name as''displayname'', sa.calendar_year, sa.calendar_month, sa.calendar_days, ''attendance_day1'' = '' '', ''attendance_day2'' = '' '',''attendance_day3'' = '' '',''attendance_day4'' = '' '',''attendance_day5'' = '' '',''attendance_day6'' = '' '',''attendance_day7'' = '' '',''attendance_day8'' = '' '',''attendance_day9'' = '' '',''attendance_day10'' = '' '',''attendance_day11'' = '' '',''attendance_day12'' = '' '',''attendance_day13'' = '' '',''attendance_day14'' = '' '',''attendance_day15'' = '' '',''attendance_day16'' = '' '',''attendance_day17'' = '' '',''attendance_day18'' = '' '',''attendance_day19'' = '' '',''attendance_day20'' = '' '',''attendance_day21'' = '' '',''attendance_day22'' = '' '',''attendance_day23'' = '' '',''attendance_day24'' = '' '',''attendance_day25'' = '' '',''attendance_day26'' = '' '',''attendance_day27'' = '' '',''attendance_day28'' = '' '',''attendance_day29'' = '' '',''attendance_day30'' = '' '',''attendance_day31'' = '' '', ''month_count'' = ''0'' , ''total_count'' = ''0'', ''monthname'' = ''0'''
SET @strSQL = @strSql + ' from [user] u join student_attendance sa on u.[user_id] = sa.student_id '
SET @strSQL = @strSql + 'join term t on t.[term_id] = sa.term_id '
SET @strSql = @strSql + 'WHERE sa.term_id in ('
SET @strSql = @strSql + @strTermId + ') '
SET @strSql = @strSql + ' AND sa.student_id IN ('
SET @strSql = @strSql + @strStudentIds + ') '
SET @strSql = @strSql + 'ORDER BY u.username, sa.calendar_year, sa.calendar_month'
EXEC(@strSql)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetSubjectTimeInformation]'
GO
IF OBJECT_ID('GetSubjectTimeInformation') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetSubjectTimeInformation'
DROP PROC GetSubjectTimeInformation
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetSubjectTimeInformation'
GO
CREATE Procedure GetSubjectTimeInformation
/* Param List */
@studentIds as varchar(500),
@termid as int
AS
DECLARE @sql as varchar(3000)
SET @sql = 'SELECT sti.subject_time_id, sti.student_id, sti.term_id, sti.subject, sti.hours, sti.minutes, u.username, ((CAST(sti.hours AS int) * 3600) + (CAST(sti.minutes AS int) * 60)) as total_time'
SET @sql = @sql + ' FROM subject_time_information sti INNER JOIN [user] u ON sti.student_id = u.user_id'
SET @sql = @sql + ' WHERE student_id in(' + @studentIds + ') AND term_id = ' + CAST(@termid as varchar)
SET @sql = @sql + ' GROUP BY sti.subject_time_id, sti.student_id, sti.term_id, sti.subject, sti.hours, sti.minutes, u.username '
EXEC(@sql)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating primary key [PK_widget_content] on [dbo].[widget_content]'
GO
ALTER TABLE [dbo].[widget_content] ADD CONSTRAINT [PK_widget_content] PRIMARY KEY CLUSTERED ([id])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Adding constraints to [dbo].[homepage]'
GO
ALTER TABLE [dbo].[homepage] ADD CONSTRAINT [DF_homepage_rss1] DEFAULT (' ') FOR [rss1]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
ALTER TABLE [dbo].[homepage] ADD CONSTRAINT [DF_homepage_rss2] DEFAULT (' ') FOR [rss2]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
ALTER TABLE [dbo].[homepage] ADD CONSTRAINT [DF_homepage_rss3] DEFAULT (' ') FOR [rss3]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
ALTER TABLE [dbo].[homepage] ADD CONSTRAINT [DF_homepage_rss4] DEFAULT (' ') FOR [rss4]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
ALTER TABLE [dbo].[homepage] ADD CONSTRAINT [DF_homepage_rss5] DEFAULT (' ') FOR [rss5]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Adding foreign keys to [dbo].[student_attendance]'
GO
ALTER TABLE [dbo].[student_attendance] ADD
CONSTRAINT [FK_student_attendance_term] FOREIGN KEY ([term_id]) REFERENCES [dbo].[term] ([term_id]) ON DELETE CASCADE,
CONSTRAINT [FK_student_attendance_user] FOREIGN KEY ([student_id]) REFERENCES [dbo].[user] ([user_id]) ON DELETE CASCADE
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Adding foreign keys to [dbo].[subject_time_information]'
GO
ALTER TABLE [dbo].[subject_time_information] ADD
CONSTRAINT [FK_subject_time_information_user] FOREIGN KEY ([student_id]) REFERENCES [dbo].[user] ([user_id]) ON DELETE CASCADE,
CONSTRAINT [FK_subject_time_information_term] FOREIGN KEY ([term_id]) REFERENCES [dbo].[term] ([term_id]) ON DELETE CASCADE
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering permissions on [dbo].[student_assignment]'
GO
--REVOKE SELECT ON [dbo].[student_assignment] TO [soshome10]
GO
PRINT N'Altering permissions on [dbo].[student_subject]'
GO
--REVOKE SELECT ON [dbo].[student_subject] TO [soshome10]
GO
PRINT N'Altering permissions on [dbo].[student_unit]'
GO
--REVOKE SELECT ON [dbo].[student_unit] TO [soshome10]
GO
PRINT N'Altering permissions on [dbo].[term]'
GO
--REVOKE SELECT ON [dbo].[term] TO [soshome10]
GO
PRINT N'Altering permissions on [dbo].[user]'
GO
--REVOKE SELECT ON [dbo].[user] TO [soshome10]
GO
IF EXISTS (SELECT * FROM #tmpErrors) ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT>0 BEGIN
PRINT 'The database update succeeded'
COMMIT TRANSACTION
END
ELSE PRINT 'The database update failed'
GO
DROP TABLE #tmpErrors
GO
/*
Run this script on:
(local).DMLCOMP - This database will be modified
to synchronize it with:
(local).soshome2011_goldendata
You are recommended to back up your database before running this script
Script created by SQL Data Compare version 8.0.1 from Red Gate Software Ltd at 12/22/2010 12:06:51
*/
SET NUMERIC_ROUNDABORT OFF
GO
SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS, NOCOUNT ON
GO
SET DATEFORMAT YMD
GO
SET XACT_ABORT ON
GO
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
GO
-- Pointer used for text / image updates. This might not be needed, but is declared here just in case
DECLARE @pv binary(16)
BEGIN TRANSACTION
-- Update rows in [dbo].[widget_app]
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=1
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=2
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=3
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=4
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=11
UPDATE [dbo].[widget_app] SET [template]='
', [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=12
UPDATE [dbo].[widget_app] SET [default_order]=3, [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=13
UPDATE [dbo].[widget_app] SET [template]='
', [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=14
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=15
UPDATE [dbo].[widget_app] SET [template]='
', [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=16
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=17
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=18
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=19
UPDATE [dbo].[widget_app] SET [template]='
', [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=20
UPDATE [dbo].[widget_app] SET [default_order]=2, [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=21
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=22
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=23
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=24
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=25
UPDATE [dbo].[widget_app] SET [installation_date]='2009-06-08 11:14:56.210' WHERE [id]=26
UPDATE [dbo].[widget_app] SET [template]='
',NULL,NULL) WHERE [id]=30
-- Operation applied to 21 rows out of 21
-- Update rows in [dbo].[static_html]
UPDATE [dbo].[static_html] SET [display_html]=N'
Switched-On Schoolhouse - Custom
#BASECSS#
#WIDGETSTEMPLATE#
',NULL,NULL) WHERE [static_html_id]=2
-- Operation applied to 2 rows out of 2
-- Update rows in [dbo].[widget_content]
UPDATE [dbo].[widget_content] SET [data]='gratitude - the quality or feeling of being grateful or thankful', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=367
UPDATE [dbo].[widget_content] SET [data]='vehement - zealous; ardent; impassioned', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=368
UPDATE [dbo].[widget_content] SET [data]='archipelago - a group of islands', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=369
UPDATE [dbo].[widget_content] SET [data]='rhythm - any movement or sound with a regular repetition of a beat', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=370
UPDATE [dbo].[widget_content] SET [data]='dialogue - conversation between tow or more persons', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=371
UPDATE [dbo].[widget_content] SET [data]='beloved - greatly loved; dear to the heart', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=372
UPDATE [dbo].[widget_content] SET [data]='meteorite - a meteor or meteor fragment that impacts the earth''s surface', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=373
UPDATE [dbo].[widget_content] SET [data]='salient - prominent or conspicuous', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=374
UPDATE [dbo].[widget_content] SET [data]='dimension - a measure of length, width, or height', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=375
UPDATE [dbo].[widget_content] SET [data]='abstract - not concrete; expressing a quality or idea that is distinct from material objects; something that cannot be experienced through the five senses', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=376
UPDATE [dbo].[widget_content] SET [data]='preservative - an added substance used to slow down or stop a substance from spoiling', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=377
UPDATE [dbo].[widget_content] SET [data]='eradicate - to remove or destroy utterly', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=378
UPDATE [dbo].[widget_content] SET [data]='recession - a general business slump', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=379
UPDATE [dbo].[widget_content] SET [data]='tantalizing - tempting; teasing; very desirable but out of reach', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=380
UPDATE [dbo].[widget_content] SET [data]='wanton - without regard for what is right; senseless', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=381
UPDATE [dbo].[widget_content] SET [data]='gregarious - tending to associate with others; to be social', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=382
UPDATE [dbo].[widget_content] SET [data]='cipher - a secret method of writing', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=383
UPDATE [dbo].[widget_content] SET [data]='benevolent - expressing goodwill or kindly feelings', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=384
UPDATE [dbo].[widget_content] SET [data]='enzymes - proteins in the body which quicken chemical reactions', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=385
UPDATE [dbo].[widget_content] SET [data]='disarmament - the elimination or limitation of armed forces, military equipment, or weapons of war', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=386
UPDATE [dbo].[widget_content] SET [data]='salute - to make a bow or other gesture to, as in greeting, farewell, or respect', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=387
UPDATE [dbo].[widget_content] SET [data]='systemic - having to do with the entire body', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=388
UPDATE [dbo].[widget_content] SET [data]='mercenary - a person hired to fight for a foreign ruler, army, or cause', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=389
UPDATE [dbo].[widget_content] SET [data]='conspicuous - easily seen or noticed; readily visible or observable', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=390
UPDATE [dbo].[widget_content] SET [data]='erratic - having no certain or definite course; wandering; not fixed', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=391
UPDATE [dbo].[widget_content] SET [data]='preparation - a proceeding, measure, or provision by which one gets ready for something', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=392
UPDATE [dbo].[widget_content] SET [data]='secession - the act of removing oneself from a group or union, esp. a religious or political group', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=393
UPDATE [dbo].[widget_content] SET [data]='tensile - relating to tension and stress', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=394
UPDATE [dbo].[widget_content] SET [data]='memorandum - brief communication which provides information, directions, or advice', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=395
UPDATE [dbo].[widget_content] SET [data]='technology - application of science to practical uses', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=396
UPDATE [dbo].[widget_content] SET [data]='recline - to lean or lie back', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=397
UPDATE [dbo].[widget_content] SET [data]='dialysis - the process of artificially filtering wastes from blood', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=398
UPDATE [dbo].[widget_content] SET [data]='circumference - the distance around the outside of the circle', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=399
UPDATE [dbo].[widget_content] SET [data]='semantics - the branch of linguistics having to do with meaning', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=400
UPDATE [dbo].[widget_content] SET [data]='premium - of exceptional quality or greater value than others of its kind; superior', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=401
UPDATE [dbo].[widget_content] SET [data]='metabolism - chemical processes going on in the body which break down food, release energy, and build up new cells', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=402
UPDATE [dbo].[widget_content] SET [data]='sequence - following of one thing after another; order of arrangement', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=403
UPDATE [dbo].[widget_content] SET [data]='transcontinental - across an entire continent', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=404
UPDATE [dbo].[widget_content] SET [data]='referendum - the submitting of an proposed public measure for voting by the general public', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=405
UPDATE [dbo].[widget_content] SET [data]='dilemma - any difficult or perplexing situation or problem', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=406
UPDATE [dbo].[widget_content] SET [data]='meddle - to busy oneself with or in other people''s things or affairs without being asked', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=407
UPDATE [dbo].[widget_content] SET [data]='telescope - an instrument for making distant objects seem nearer or larger', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=408
UPDATE [dbo].[widget_content] SET [data]='prejudice - an unfavorable opinion or feeling formed beforehand or without knowledge, thought, or reason', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=409
UPDATE [dbo].[widget_content] SET [data]='tundra - frozen, treeless plain in the Arctic', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=410
UPDATE [dbo].[widget_content] SET [data]='enunciate - to speak or pronounce words', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=411
UPDATE [dbo].[widget_content] SET [data]='ridicule - to laugh at; make fun of', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=412
UPDATE [dbo].[widget_content] SET [data]='zeal - eager desire or endeavor', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=413
UPDATE [dbo].[widget_content] SET [data]='contemporary - living or happening in the same period of time', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=414
UPDATE [dbo].[widget_content] SET [data]='endowed - to be given a special gift', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=415
UPDATE [dbo].[widget_content] SET [data]='satirical - uses irony, mockery, or wit to ridicule something', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=416
UPDATE [dbo].[widget_content] SET [data]='unique - having no like or equal', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=417
UPDATE [dbo].[widget_content] SET [data]='precious - of high price or great value; very valuable or costly', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=418
UPDATE [dbo].[widget_content] SET [data]='terrace - a flat, raised level of land with sloping sides that often look like steps', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=419
UPDATE [dbo].[widget_content] SET [data]='maxim - an established principle; a practical truth; a proverb', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=420
UPDATE [dbo].[widget_content] SET [data]='civilize - enlighten; refine, to bring out of an uneducated, or rude state', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=421
UPDATE [dbo].[widget_content] SET [data]='endemic - pertaining specifically to a place or people', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=422
UPDATE [dbo].[widget_content] SET [data]='predict - to declare or tell in advance', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=423
UPDATE [dbo].[widget_content] SET [data]='reflect - to give back or show an image of; mirror', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=424
UPDATE [dbo].[widget_content] SET [data]='transgress - to violate a law, command, moral code, etc.; offend; sin', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=425
UPDATE [dbo].[widget_content] SET [data]='terrain - the particular land surface of an area or region', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=426
UPDATE [dbo].[widget_content] SET [data]='preserve - to keep safe from harm or injury', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=427
UPDATE [dbo].[widget_content] SET [data]='deduce - to derive as a conclusion from something known or assumed; infer', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=428
UPDATE [dbo].[widget_content] SET [data]='copyright - the legal right to control every way of producing a version of an original work, such as a book or piece of music', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=429
UPDATE [dbo].[widget_content] SET [data]='stringent - strict; severe', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=430
UPDATE [dbo].[widget_content] SET [data]='subjunctive - a verb mode typically used to express possibility, necessity, and emotion', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=431
UPDATE [dbo].[widget_content] SET [data]='essential - very important, cannot do without', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=432
UPDATE [dbo].[widget_content] SET [data]='diaphragm - a muscle between the chest and stomach used for breathing', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=433
UPDATE [dbo].[widget_content] SET [data]='prestige - to possess honor or high respect from other people or countries', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=434
UPDATE [dbo].[widget_content] SET [data]='stamina - resistance to fatigue or hardship; endurance', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=435
UPDATE [dbo].[widget_content] SET [data]='grimace - a twisting of the face expressing pain, contempt, or disgust', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=436
UPDATE [dbo].[widget_content] SET [data]='precise - strictly accurate, exact', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=437
UPDATE [dbo].[widget_content] SET [data]='tarp - a strong, waterproof cloth used for protection or covering', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=438
UPDATE [dbo].[widget_content] SET [data]='civilization - the state or condition of people or nations that have developed their culture, government, art, and science to a high level', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=439
UPDATE [dbo].[widget_content] SET [data]='spindle - a devise that spins as it turns, especially used as a device for spinning thread', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=440
UPDATE [dbo].[widget_content] SET [data]='mitigate - to make less severe', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=441
UPDATE [dbo].[widget_content] SET [data]='diameter - distance across the circle through the center', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=442
UPDATE [dbo].[widget_content] SET [data]='reflex - any automatic, unthinking, often habitual behavior or response', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=443
UPDATE [dbo].[widget_content] SET [data]='treason - betrayal of one''s country or ruler', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=444
UPDATE [dbo].[widget_content] SET [data]='emphatic - forceful; insisten', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=445
UPDATE [dbo].[widget_content] SET [data]='cytoplasm - the fluid-like substance contained within the cell membrane', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=446
UPDATE [dbo].[widget_content] SET [data]='authority - the power or right to determine, control, or command that has been legally granted by law, custom, or consent', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=447
UPDATE [dbo].[widget_content] SET [data]='halcyon - happy; joyful; carefree', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=448
UPDATE [dbo].[widget_content] SET [data]='posthumous - published after the writer''s death', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=449
UPDATE [dbo].[widget_content] SET [data]='subpoena - a legal document requiring one to appear in court', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=450
UPDATE [dbo].[widget_content] SET [data]='trepidation - dread; fear', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=451
UPDATE [dbo].[widget_content] SET [data]='deficit - the excess of liabilities over assets', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=452
UPDATE [dbo].[widget_content] SET [data]='bestow - to give, to put, or to place', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=453
UPDATE [dbo].[widget_content] SET [data]='invade - to enter forcefully as an enemy', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=454
UPDATE [dbo].[widget_content] SET [data]='mnemonics - a short rhyme, phrase, acronym, or other mental technique used to ease the task of memorization', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=455
UPDATE [dbo].[widget_content] SET [data]='vindication - a clearing from criticism, censure, or suspicion', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=456
UPDATE [dbo].[widget_content] SET [data]='telescope - an instrument for making distant objects seem nearer or larger', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=457
UPDATE [dbo].[widget_content] SET [data]='exaggerate - to make something bigger or greater than it really is', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=458
UPDATE [dbo].[widget_content] SET [data]='auxiliary - additional; supplementary; reserve', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=459
UPDATE [dbo].[widget_content] SET [data]='refraction - the bending of a wave as it passes from one medium into another, or as it passes through a non-uniform medium', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=460
UPDATE [dbo].[widget_content] SET [data]='linguistic - having to do with the history and structure of language', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=461
UPDATE [dbo].[widget_content] SET [data]='worthy - of commendable excellence or merit; deserving', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=462
UPDATE [dbo].[widget_content] SET [data]='liquify - to melt (a solid) by heating', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=463
UPDATE [dbo].[widget_content] SET [data]='technology - application of science to practical uses', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=464
UPDATE [dbo].[widget_content] SET [data]='unalienable - things that cannot be taken away or given away', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=465
UPDATE [dbo].[widget_content] SET [data]='disclaimer - a statement made to refuse responsibility for something', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=466
UPDATE [dbo].[widget_content] SET [data]='calculate - to determine by mathematical methods; compute', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=467
UPDATE [dbo].[widget_content] SET [data]='terrace - a flat, raised level of land with sloping sides that often look like steps', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=468
UPDATE [dbo].[widget_content] SET [data]='molecule - two or more atoms chemically combined', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=469
UPDATE [dbo].[widget_content] SET [data]='intercept - to stop or interrupt the course, progress, or transmission of', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=470
UPDATE [dbo].[widget_content] SET [data]='heteronym - a word spelled like another but different in pronunciation and meaning', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=471
UPDATE [dbo].[widget_content] SET [data]='transcendent - a very high and remarkable degree; surpassing', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=472
UPDATE [dbo].[widget_content] SET [data]='integer - a number belonging to the set made up of the whole numbers and their opposites', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=473
UPDATE [dbo].[widget_content] SET [data]='ponder - to think about deeply and carefully', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=474
UPDATE [dbo].[widget_content] SET [data]='speed - the ratio of distance (displacement) over time; linear velocity', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=475
UPDATE [dbo].[widget_content] SET [data]='atrophy - to waste away; wither or deteriorate', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=476
UPDATE [dbo].[widget_content] SET [data]='exception - something that does not follow the rule', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=477
UPDATE [dbo].[widget_content] SET [data]='syntax - the way in which words are put together to form sentences, phrases, or clauses', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=478
UPDATE [dbo].[widget_content] SET [data]='subservient - useful, helpful, or of service in an inferior or subordinate capacity; submissive', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=479
UPDATE [dbo].[widget_content] SET [data]='intangible - not clear; vague; difficult to show, reveal, or define', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=480
UPDATE [dbo].[widget_content] SET [data]='lexicography - the study of the dictionary, its compilation, and usage', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=481
UPDATE [dbo].[widget_content] SET [data]='discourse - a long written or spoken discussion of some subject', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=482
UPDATE [dbo].[widget_content] SET [data]='bellow - to utter in a loud deep voice', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=483
UPDATE [dbo].[widget_content] SET [data]='hoist - to raise or lift, esp. by some mechanical appliance', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=484
UPDATE [dbo].[widget_content] SET [data]='monoliths - a large single block or piece of stone', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=485
UPDATE [dbo].[widget_content] SET [data]='ardent - intensely devoted, eager, or enthusiastic; zealous: an ardent fan', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=486
UPDATE [dbo].[widget_content] SET [data]='literal - true to fact; not exaggerated; actual or factual', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=487
UPDATE [dbo].[widget_content] SET [data]='geyser - a spring that sends up fountains or jets of hot water or steam', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=488
UPDATE [dbo].[widget_content] SET [data]='sonnet - a poem that usually contains fourteen lines, that follow a definite rhyme scheme', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=489
UPDATE [dbo].[widget_content] SET [data]='mandatory - something you must do, obligatory; compulsory', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=490
UPDATE [dbo].[widget_content] SET [data]='acoustics - the scientific study of sound', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=491
UPDATE [dbo].[widget_content] SET [data]='conduit - a pipe, canal, channel, or passage for conveying water or fluid', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=492
UPDATE [dbo].[widget_content] SET [data]='insurgency - a rebellion; uprising', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=493
UPDATE [dbo].[widget_content] SET [data]='martyr - one who is killed because of his religious beliefs', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=494
UPDATE [dbo].[widget_content] SET [data]='geography - the study of the earth''s surface, climate, continents, countries, peoples, industries, and products', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=495
UPDATE [dbo].[widget_content] SET [data]='terrain - the particular land surface of an area or region', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=496
UPDATE [dbo].[widget_content] SET [data]='monotheism - worship and belief in one god', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=497
UPDATE [dbo].[widget_content] SET [data]='lenient - agreeably tolerant; permissive; indulgent', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=498
UPDATE [dbo].[widget_content] SET [data]='dialect - the form of a language that is distinct to a region or group of people', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=499
UPDATE [dbo].[widget_content] SET [data]='compound - composed of two or more parts, elements, or ingredients', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=500
UPDATE [dbo].[widget_content] SET [data]='banter - an exchange of light, playful, teasing remarks', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=501
UPDATE [dbo].[widget_content] SET [data]='pompous - filled with self-importance', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=502
UPDATE [dbo].[widget_content] SET [data]='refugee - a person who flees for safety, especially to a foreign land', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=503
UPDATE [dbo].[widget_content] SET [data]='tranquil - free from commotion or tumult; peaceful; quiet; calm', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=504
UPDATE [dbo].[widget_content] SET [data]='sheaf - grass or stalks of grain bound together', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=505
UPDATE [dbo].[widget_content] SET [data]='aquifer - a large body of underground water', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=506
UPDATE [dbo].[widget_content] SET [data]='composure - serene, self-controlled state of mind; calmness; tranquillity', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=507
UPDATE [dbo].[widget_content] SET [data]='transition - movement, passage, or change from one position, state, stage, subject, concept, etc., to another', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=508
UPDATE [dbo].[widget_content] SET [data]='process - a systematic series of actions directed to some end', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=509
UPDATE [dbo].[widget_content] SET [data]='glimpse - a very brief, passing look, sight, or view', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=510
UPDATE [dbo].[widget_content] SET [data]='diagram - a picture that shows the pieces of something and how they fit together', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=511
UPDATE [dbo].[widget_content] SET [data]='leisure - time free from the demands of work or duty', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=512
UPDATE [dbo].[widget_content] SET [data]='reproof - telling you that you are wrong', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=513
UPDATE [dbo].[widget_content] SET [data]='transitive - expressing an action that passes over to and takes effect on some person or thing', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=514
UPDATE [dbo].[widget_content] SET [data]='confiscating - seizing by authority; taking and keeping', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=515
UPDATE [dbo].[widget_content] SET [data]='genial - comforting, friendly, warm; kindly', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=516
UPDATE [dbo].[widget_content] SET [data]='larynx - the part of the body that makes speaking possible', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=517
UPDATE [dbo].[widget_content] SET [data]='regalia - clothing, costumes, medals and ornaments worn by a person for ritualistic purposes', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=518
UPDATE [dbo].[widget_content] SET [data]='tribute - a gift, testimonial, compliment, or the like, given in acknowledgment of gratitude or esteem', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=519
UPDATE [dbo].[widget_content] SET [data]='sedimentary - rock formed from things that have settled to the bottom of the sea over a long time', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=520
UPDATE [dbo].[widget_content] SET [data]='aural - of or received through the ear or the sense of hearing', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=521
UPDATE [dbo].[widget_content] SET [data]='excerpt - a passage or quotation taken or selected from a book, document, film, or the like; extract', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=522
UPDATE [dbo].[widget_content] SET [data]='theoretical - planned or worked out in the mind; based on theory but not yet proved or tested', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=523
UPDATE [dbo].[widget_content] SET [data]='proclaim - to extol or praise publicly', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=524
UPDATE [dbo].[widget_content] SET [data]='generous - liberal in giving or sharing; unselfish', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=525
UPDATE [dbo].[widget_content] SET [data]='inspire - to produce or arouse a feeling, thought, etc.', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=526
UPDATE [dbo].[widget_content] SET [data]='organelle - a structure that performs a specific function within a cell; nucleus', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=527
UPDATE [dbo].[widget_content] SET [data]='subtle - characterized by skill or ingenuity; so slight as to be difficult to detect or describe', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=528
UPDATE [dbo].[widget_content] SET [data]='digestion - the act of changing food into a form that cells use for energy', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=529
UPDATE [dbo].[widget_content] SET [data]='detente - the easing of strained relations, especially between nations or political groups', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=530
UPDATE [dbo].[widget_content] SET [data]='combine - to unite, bring together', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=531
UPDATE [dbo].[widget_content] SET [data]='acumen - keen insight; shrewdness', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=532
UPDATE [dbo].[widget_content] SET [data]='opulent - richly supplied; abundant or plentiful', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=533
UPDATE [dbo].[widget_content] SET [data]='hydrosphere - sphere containing all of the earth''s water - vapor, liquid, and solid', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=534
UPDATE [dbo].[widget_content] SET [data]='colloquial - ordinary or familiar speech that is appropriate for informal or casual settings', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=535
UPDATE [dbo].[widget_content] SET [data]='irony - a way of speaking or writing in which the ordinary meaning of the words is the opposite of the thought in the speaker''s or writer''s mind', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=536
UPDATE [dbo].[widget_content] SET [data]='pollute - to make dirty or impure', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=537
UPDATE [dbo].[widget_content] SET [data]='segment - one of the parts into which something naturally separates or is divided; a division, portion, or section', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=538
UPDATE [dbo].[widget_content] SET [data]='monsoon - a seasonal reversal in wind direction that brings heavy rainfall off the Indian Ocean to southern Asia', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=539
UPDATE [dbo].[widget_content] SET [data]='dilate - to widen or get larger in size', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=540
UPDATE [dbo].[widget_content] SET [data]='innovate - to introduce something new; make changes in anything established', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=541
UPDATE [dbo].[widget_content] SET [data]='solvent - a material that can dissolve other materials', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=542
UPDATE [dbo].[widget_content] SET [data]='languor - lack of energy; weakness', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=543
UPDATE [dbo].[widget_content] SET [data]='exemplify - to show or illustrate by example', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=544
UPDATE [dbo].[widget_content] SET [data]='catharsis - the cleansing or purification of emotions, usually by empathizing with another''s problems', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=545
UPDATE [dbo].[widget_content] SET [data]='solstice - time of year when the sun is farthest north or farthest south of the equator', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=546
UPDATE [dbo].[widget_content] SET [data]='unabridged - complete, not condensed', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=547
UPDATE [dbo].[widget_content] SET [data]='orient - to determine the position of in relation to the points of the compass; get the bearings of', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=548
UPDATE [dbo].[widget_content] SET [data]='idiom - an informal expression whose meaning is different from the literal translation', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=549
UPDATE [dbo].[widget_content] SET [data]='distraction - thing that diverts or draws the mind away in another direction', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=550
UPDATE [dbo].[widget_content] SET [data]='Apostle - one who is sent; one of the twelve men chosen by Christ as a follower', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=551
UPDATE [dbo].[widget_content] SET [data]='procrastinate - to put off till another day or time; defer; delay', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=552
UPDATE [dbo].[widget_content] SET [data]='expedite - to speed up the progress of; hasten', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=553
UPDATE [dbo].[widget_content] SET [data]='caricature - a description of a person or thing that exaggerates peculiarities', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=554
UPDATE [dbo].[widget_content] SET [data]='adapt - to change to fit different conditions, adjust', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=555
UPDATE [dbo].[widget_content] SET [data]='poise - a dignified, self-confident manner or bearing', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=556
UPDATE [dbo].[widget_content] SET [data]='hollow - having a space or cavity inside; not solid; empty', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=557
UPDATE [dbo].[widget_content] SET [data]='fascinating - of great interest or attraction; enchanting; charming; captivating', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=558
UPDATE [dbo].[widget_content] SET [data]='regenerate - to renew or restore', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=559
UPDATE [dbo].[widget_content] SET [data]='subtrahend - the number being subtracted to find a difference', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=560
UPDATE [dbo].[widget_content] SET [data]='irrelevant - not to the point; off the subject', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=561
UPDATE [dbo].[widget_content] SET [data]='selfless - having little or no concern for oneself, esp. with regard to fame, position, money, etc.; unselfish', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=562
UPDATE [dbo].[widget_content] SET [data]='mope - sulk; brood', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=563
UPDATE [dbo].[widget_content] SET [data]='congruent - exact size and shape', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=564
UPDATE [dbo].[widget_content] SET [data]='prominent - standing out so as to be seen easily; conspicuous; particularly noticeabl', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=565
UPDATE [dbo].[widget_content] SET [data]='Celsius - a scale of temperature where water freezes at 0 degrees and boils at 100 degrees', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=566
UPDATE [dbo].[widget_content] SET [data]='optional - leaving something to choice', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=567
UPDATE [dbo].[widget_content] SET [data]='sumptuous - entailing great expense, as from choice materials, fine work, etc.; costly', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=568
UPDATE [dbo].[widget_content] SET [data]='homonym - a word that sounds the same as another word, but has a different meaning and often a different spelling', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=569
UPDATE [dbo].[widget_content] SET [data]='exuberant - abounding in vitality; extremely joyful and vigorous', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=570
UPDATE [dbo].[widget_content] SET [data]='olfactory - having to do with smelling', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=571
UPDATE [dbo].[widget_content] SET [data]='platelet - a substance in the bloodstream which aids in the clotting of blood near a cut', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=572
UPDATE [dbo].[widget_content] SET [data]='jovial - characterized by a hearty, joyous humor or a spirit of good-fellowship', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=573
UPDATE [dbo].[widget_content] SET [data]='isthmus - a narrow bridge of land, with water on both sides of it, connecting two larger pieces of land', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=574
UPDATE [dbo].[widget_content] SET [data]='faith - firm belief; complete confidence; trust', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=575
UPDATE [dbo].[widget_content] SET [data]='adequate - enough to meet the need', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=576
UPDATE [dbo].[widget_content] SET [data]='credible - worthy of belief or confidence; trustworthy', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=577
UPDATE [dbo].[widget_content] SET [data]='regime - a government that is in power; an administration', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=578
UPDATE [dbo].[widget_content] SET [data]='transparent - clear; allows light to pass', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=579
UPDATE [dbo].[widget_content] SET [data]='distillation - the process of evaporating a liquid and condensing the vapors to form a pure substance', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=580
UPDATE [dbo].[widget_content] SET [data]='morphology - the study of word forms and how they are affected by their origins', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=581
UPDATE [dbo].[widget_content] SET [data]='pun - a humorous use of a word that can have two meanings', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=582
UPDATE [dbo].[widget_content] SET [data]='thesis - the controlling or central idea of a paper', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=583
UPDATE [dbo].[widget_content] SET [data]='deteriorate - to disintegrate or wear away', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=584
UPDATE [dbo].[widget_content] SET [data]='aficionado - one who appreciates and admires something', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=585
UPDATE [dbo].[widget_content] SET [data]='tidewater - low-lying land along a seacoast through which tides flow', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=586
UPDATE [dbo].[widget_content] SET [data]='pessimist - one who tends to look on the dark side of things, to see all of the difficulties', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=587
UPDATE [dbo].[widget_content] SET [data]='falsify - prove or show to be incorrect; not true or not possible', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=588
UPDATE [dbo].[widget_content] SET [data]='symbiosis - a mutually beneficial relationship between two species, an example of which is lichens', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=589
UPDATE [dbo].[widget_content] SET [data]='mosaic - many different and separate parts which when united together make a picture or design of beauty', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=590
UPDATE [dbo].[widget_content] SET [data]='variety - a mix of different kinds of things', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=591
UPDATE [dbo].[widget_content] SET [data]='anticipate - to expect; look forward to', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=592
UPDATE [dbo].[widget_content] SET [data]='placid - pleasantly calm or peaceful; unruffled; tranquil; serenely quiet or undisturbed', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=593
UPDATE [dbo].[widget_content] SET [data]='tensile - relating to tension and stres', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=594
UPDATE [dbo].[widget_content] SET [data]='adroit - cleverly skillful, resourceful, or ingenious', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=595
UPDATE [dbo].[widget_content] SET [data]='orthodox - sound or correct in doctrine; conforming to approved doctrine', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=596
UPDATE [dbo].[widget_content] SET [data]='timbre - the characteristics by which the ear distinguishes between sounds with the same frequency and amplitude', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=597
UPDATE [dbo].[widget_content] SET [data]='reverence - a feeling or attitude of deep respect tinged with awe', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=598
UPDATE [dbo].[widget_content] SET [data]='idiosyncrasies - characteristics, habits, mannerisms that are peculiar to an individual', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=599
UPDATE [dbo].[widget_content] SET [data]='capacity - the measurement of volume or the amount an object can hold', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=600
UPDATE [dbo].[widget_content] SET [data]='persuade - prevail on a person to do something, as by advising or urging', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=601
UPDATE [dbo].[widget_content] SET [data]='tribe - a group of people sharing the same customs, language, and ancestors, forming a community under one leader or group of leaders', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=602
UPDATE [dbo].[widget_content] SET [data]='valor - bravery; courage', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=603
UPDATE [dbo].[widget_content] SET [data]='participle - a verb part used to form tenses and which may be used as an adjective', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=604
UPDATE [dbo].[widget_content] SET [data]='egotism - self-centeredness; excessive concern for oneself', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=605
UPDATE [dbo].[widget_content] SET [data]='turmoil - a commotion; disturbance; disorder', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=606
UPDATE [dbo].[widget_content] SET [data]='reliability - quality of being reliable, trustworthy, or dependable', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=607
UPDATE [dbo].[widget_content] SET [data]='culture - the customs, arts, tools, and lifestyles of a nation or people', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=608
UPDATE [dbo].[widget_content] SET [data]='alternative - a choice limited to one of two or more possibilities', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=609
UPDATE [dbo].[widget_content] SET [data]='pension - money paid by a company or government to a person who has retired', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=610
UPDATE [dbo].[widget_content] SET [data]='agile - quick and well-coordinated in movement; lithe', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=611
UPDATE [dbo].[widget_content] SET [data]='perspire - to have water come out of the skin when a person gets hot', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=612
UPDATE [dbo].[widget_content] SET [data]='trade - an exchange of items, usually without payment of money', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=613
UPDATE [dbo].[widget_content] SET [data]='motive - thought, reason, or feeling that makes a person act', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=614
UPDATE [dbo].[widget_content] SET [data]='domicile - a place of residence; abode; house or home', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=615
UPDATE [dbo].[widget_content] SET [data]='particular - exceptional, distinguished or different from others or from the ordinary; noteworthy; marked; unusual', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=616
UPDATE [dbo].[widget_content] SET [data]='tributary - stream that flows into a larger stream or body of water', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=617
UPDATE [dbo].[widget_content] SET [data]='reparation - the making of amends for wrong or injury done', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=618
UPDATE [dbo].[widget_content] SET [data]='punctilious - exact in the observance of form or rules, behavior or ceremony', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=619
UPDATE [dbo].[widget_content] SET [data]='chlorophyll - the green pigment in a plant cell chloroplast that gives the plant a green color', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=620
UPDATE [dbo].[widget_content] SET [data]='pinnacle - the highest point of achievement or development', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=621
UPDATE [dbo].[widget_content] SET [data]='agape - Greek word meaning affection expressed by selfless acts of benevolence or charity', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=622
UPDATE [dbo].[widget_content] SET [data]='soliloquy - a speech made by an actor to himself', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=623
UPDATE [dbo].[widget_content] SET [data]='urban - characteristic of or accustomed to cities', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=624
UPDATE [dbo].[widget_content] SET [data]='reverberate - to echo back or resound', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=625
UPDATE [dbo].[widget_content] SET [data]=' patriarch - the father and ruler of a family or tribe', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=626
UPDATE [dbo].[widget_content] SET [data]='motto - a sentence, phrase, or word expressing the spirit or purpose of a person, organization, city, etc.', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=627
UPDATE [dbo].[widget_content] SET [data]='festive - joyous; merry: a festive mood', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=628
UPDATE [dbo].[widget_content] SET [data]='altar - a table, stand, or similar raised structure at which people worship or sacrifice', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=629
UPDATE [dbo].[widget_content] SET [data]='chastise - to criticize severely', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=630
UPDATE [dbo].[widget_content] SET [data]='persistent - refusing to give up or quit', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=631
UPDATE [dbo].[widget_content] SET [data]='tidewater - low-lying land along a seacoast through which tides flow', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=632
UPDATE [dbo].[widget_content] SET [data]='reticence - the quality or state of being reserved', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=633
UPDATE [dbo].[widget_content] SET [data]='purloin - to take dishonestly; steal', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=634
UPDATE [dbo].[widget_content] SET [data]='ignite - to set on fire; kindle', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=635
UPDATE [dbo].[widget_content] SET [data]='synapse - region between neurons that chemically passes on messages', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=636
UPDATE [dbo].[widget_content] SET [data]='pester - to bother persistently with petty annoyances; trouble', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=637
UPDATE [dbo].[widget_content] SET [data]='vague - not precisely expressed; obscure', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=638
UPDATE [dbo].[widget_content] SET [data]='symbiosis - a mutually beneficial relationship between two species, an example of which is lichens', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=639
UPDATE [dbo].[widget_content] SET [data]='fiction - something made-up; not true', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=640
UPDATE [dbo].[widget_content] SET [data]='elect - to choose or select by vote, as for an office', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=641
UPDATE [dbo].[widget_content] SET [data]='angst - a feeling of dread, anxiety, or anguish', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=642
UPDATE [dbo].[widget_content] SET [data]='syntax - the way in which words are put together to form sentences, phrases, or clauses', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=643
UPDATE [dbo].[widget_content] SET [data]='phrase - a group of words that is not a sentence', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=644
UPDATE [dbo].[widget_content] SET [data]='sanction - to ratify or confirm: to sanction a law', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=645
UPDATE [dbo].[widget_content] SET [data]='consent - to permit, approve, or agree', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=646
UPDATE [dbo].[widget_content] SET [data]='amphibian - animals such as frogs, toads, and salamanders', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=647
UPDATE [dbo].[widget_content] SET [data]='sag - to hang down unevenly; droop', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=648
UPDATE [dbo].[widget_content] SET [data]='myriad - many diverse or different characteristics, e.g. in a society', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=649
UPDATE [dbo].[widget_content] SET [data]='fret - to feel or express worry', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=650
UPDATE [dbo].[widget_content] SET [data]='mull - to think about carefully; consider (often fol. by over): to mull over an idea', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=651
UPDATE [dbo].[widget_content] SET [data]='personification - a figure of speech that gives to inanimate objects or ideas human characteristics', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=652
UPDATE [dbo].[widget_content] SET [data]='conjugate - to change a verb to agree with the subject and the tense being used', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=653
UPDATE [dbo].[widget_content] SET [data]='illustrator - an artist who draws pictures that tell about a stor', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=654
UPDATE [dbo].[widget_content] SET [data]='quandary - a state of perplexity or uncertainty, esp. as to what to do; dilemma', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=655
UPDATE [dbo].[widget_content] SET [data]='solace - to console; to soothe', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=656
UPDATE [dbo].[widget_content] SET [data]='synapse - region between neurons that chemically passes on messages', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=657
UPDATE [dbo].[widget_content] SET [data]='myrrh - a perfume or incense; a gift brought to Jesus', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=658
UPDATE [dbo].[widget_content] SET [data]='indigenous - native; originating in the region or country where found', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=659
UPDATE [dbo].[widget_content] SET [data]='elevate - to raise the spirits; put in high spirits', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=660
UPDATE [dbo].[widget_content] SET [data]='photon - a bundle of energy, usually light, emitted from some energy source or atom', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=661
UPDATE [dbo].[widget_content] SET [data]='rumpus - a noisy or violent disturbance; commotion; uproar', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=662
UPDATE [dbo].[widget_content] SET [data]='myth - a traditional or legendary story, usually concerning some being or hero or event', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=664
UPDATE [dbo].[widget_content] SET [data]='incumbent - a person who currently holds an office', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=665
UPDATE [dbo].[widget_content] SET [data]='quatrain - a stanza or poem with four lines, usually with alternate rhymes', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=666
UPDATE [dbo].[widget_content] SET [data]='pernicious - deadly in nature; that which can destroy or ruin; causing great harm or damage', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=667
UPDATE [dbo].[widget_content] SET [data]='zenith - point in heavens directly overhead; the opposite of nadir', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=668
UPDATE [dbo].[widget_content] SET [data]='traditional - a long-established or inherited way of thinking or acting', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=669
UPDATE [dbo].[widget_content] SET [data]='sinew - A tough, stringy part of the body that fastens muscles to the bones', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=670
UPDATE [dbo].[widget_content] SET [data]='consonant - any letter that is not a vowel', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=671
UPDATE [dbo].[widget_content] SET [data]='timbre - the characteristics by which the ear distinguishes between sounds with the same frequency and amplitude', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=672
UPDATE [dbo].[widget_content] SET [data]='pensive - expressing or revealing thoughtfulness, usually marked by some sadness', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=673
UPDATE [dbo].[widget_content] SET [data]='remainder - part left over in a division problem', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=674
UPDATE [dbo].[widget_content] SET [data]='siege - a military operation in which an army surrounds a place, cutting off all outside access until surrender', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=675
UPDATE [dbo].[widget_content] SET [data]='coalesce - to blend or come together', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=676
UPDATE [dbo].[widget_content] SET [data]='notoriety - the state of being well known, usually unfavorably', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=677
UPDATE [dbo].[widget_content] SET [data]='permafrost - frost that does not thaw (ground areas in the Arctic have parts that are frozen all year)', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=678
UPDATE [dbo].[widget_content] SET [data]='shrivel - to wither; make or become helpless or useless', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=679
UPDATE [dbo].[widget_content] SET [data]='thesis - the controlling or central idea of a paper', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=680
UPDATE [dbo].[widget_content] SET [data]='garrulous - talkative, long-winded', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=681
UPDATE [dbo].[widget_content] SET [data]='nostalgic - having a longing for something far away or long ago', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=682
UPDATE [dbo].[widget_content] SET [data]='pestilence - any disease that spreads rapidly causing many deaths', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=683
UPDATE [dbo].[widget_content] SET [data]='tsunami - series of destructive ocean waves caused by vibrations in Earth''s crust', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=684
UPDATE [dbo].[widget_content] SET [data]='reluctant - unwilling; disinclined ', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=685
UPDATE [dbo].[widget_content] SET [data]='ally - a person, group, or nation united with another for some special purpose', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=686
UPDATE [dbo].[widget_content] SET [data]='theoretical - planned or worked out in the mind; based on theory but not yet proved or tested', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=687
UPDATE [dbo].[widget_content] SET [data]='peril - something that causes or may cause injury, loss, or destruction', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=688
UPDATE [dbo].[widget_content] SET [data]='inertia - the property of matter that allows it to remain still if still or to continue moving if moving unless acted upon by an outside force', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=689
UPDATE [dbo].[widget_content] SET [data]='frivolous - unimportant; not serious', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=690
UPDATE [dbo].[widget_content] SET [data]='coalition - a union or alliance between a number of people or nations', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=691
UPDATE [dbo].[widget_content] SET [data]='quotient - the answer to a division problem', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=692
UPDATE [dbo].[widget_content] SET [data]='sizzle - to make a hissing sound, as in frying or burning', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=693
UPDATE [dbo].[widget_content] SET [data]='nourish - to sustain with food or nutriment; supply with what is necessary for life, health, and growth', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=694
UPDATE [dbo].[widget_content] SET [data]='antecedent - the noun that is referred to by a pronoun', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=695
UPDATE [dbo].[widget_content] SET [data]='impartial - unbiased; fair; just', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=696
UPDATE [dbo].[widget_content] SET [data]='systemic - having to do with the entire body', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=697
UPDATE [dbo].[widget_content] SET [data]='vacant - empty; not having anything in it', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=698
UPDATE [dbo].[widget_content] SET [data]='nuisance - an obnoxious or annoying person, thing, condition, practice', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=699
UPDATE [dbo].[widget_content] SET [data]='snatch - to rescue or save by prompt action', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=700
UPDATE [dbo].[widget_content] SET [data]='elongate - extended; lengthened', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=701
UPDATE [dbo].[widget_content] SET [data]='cogitate - to think hard; ponder; meditate', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=702
UPDATE [dbo].[widget_content] SET [data]='annoint - to consecrate or make sacred in a ceremony that includes the token applying of oil', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=703
UPDATE [dbo].[widget_content] SET [data]='smuggle - to bring something in or take something out of a country secretly and against the law', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=704
UPDATE [dbo].[widget_content] SET [data]='infallible - containing no lies; completely true', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=705
UPDATE [dbo].[widget_content] SET [data]='tantalizing - tempting; teasing; very desirable but out of reach', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=706
UPDATE [dbo].[widget_content] SET [data]='skepticism - an attitude of disbelief or doubt', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=707
UPDATE [dbo].[widget_content] SET [data]='nullify - to cancel or make ineffective', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=708
UPDATE [dbo].[widget_content] SET [data]='dew - moisture from the air that collects on cool surfaces at night', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=709
UPDATE [dbo].[widget_content] SET [data]='comfort - to soothe, console, or reassure; bring cheer to', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=710
UPDATE [dbo].[widget_content] SET [data]='periodical - a magazine or newspaper that is published regularly, but not daily', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=711
UPDATE [dbo].[widget_content] SET [data]='reservoir - a place where extra supplies are collected and stored', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=712
UPDATE [dbo].[widget_content] SET [data]='skew - to distort; depict unfairly', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=713
UPDATE [dbo].[widget_content] SET [data]='hyperbole - the use of obvious exaggeration for a particular effect', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=714
UPDATE [dbo].[widget_content] SET [data]='philosopher - one who studies theories about knowledge and reality', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=715
UPDATE [dbo].[widget_content] SET [data]='random - occurring without definite aim, reason, or pattern', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=716
UPDATE [dbo].[widget_content] SET [data]='incorrigible - so firmly fixed (in bad habits) that nothing else can be expected', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=717
UPDATE [dbo].[widget_content] SET [data]='sarcoma - cancers of connective and supportive tissues such as tendons, bone and muscle', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=718
UPDATE [dbo].[widget_content] SET [data]='deviate - to depart or swerve, as from a procedure, course of action, or acceptable norm', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=719
UPDATE [dbo].[widget_content] SET [data]='allegory - a story whose actions and characters are symbols representing other values, ideas, or meanings', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=720
UPDATE [dbo].[widget_content] SET [data]='emerge - come out into view', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=721
UPDATE [dbo].[widget_content] SET [data]='periphery - the edge or outskirts, as of a city', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=722
UPDATE [dbo].[widget_content] SET [data]='incongruities - things or ideas which are not in agreement with each other or are not compatible', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=723
UPDATE [dbo].[widget_content] SET [data]='sanguine - cheerfully optimistic, hopeful, or confident', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=724
UPDATE [dbo].[widget_content] SET [data]='obeisance - a movement indicating respect, such as a bow or nod', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=725
UPDATE [dbo].[widget_content] SET [data]='albatross - a large, web-footed bird found in the South Seas, noted for its ability to flying long distances', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=726
UPDATE [dbo].[widget_content] SET [data]='readiness - willingness; inclination; cheerful consent', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=727
UPDATE [dbo].[widget_content] SET [data]='innate - inherent or natural rather than gotten from someplace', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=728
UPDATE [dbo].[widget_content] SET [data]='implement - to fulfill; perform; carry out', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=729
UPDATE [dbo].[widget_content] SET [data]='cochlea - a spiral tube in the inner ear containing nerve endings necessary for hearing', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=730
UPDATE [dbo].[widget_content] SET [data]='obvious - easily seen, recognized, or understood; open to view or knowledge; evident', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=731
UPDATE [dbo].[widget_content] SET [data]='allude - to make an indirect reference to something', [installation_date]='2010-12-08 10:19:15.913' WHERE [id]=732
UPDATE [dbo].[widget_content] SET [data]='1911 - A dispatcher in the New York Times office sends the first telegram around the world via commercial service. Exactly 66 years later, the National Aeronautics and Space Administration (NASA) sends a different kind of message--a phonograph record containing information about Earth for extraterrestrial beings--shooting into space aboard the unmanned spacecraft Voyager II.', [installation_date]='2009-04-17 14:55:22.837' WHERE [id]=965
UPDATE [dbo].[widget_content] SET [data]='1948 - In the greatest upset in presidential election history, Democratic incumbent Harry S. Truman defeats his Republican challenger, Governor Thomas E. Dewey of New York, by just over two million popular votes. In the days preceding the vote, political analysts and polls were so behind Dewey that on election night, long before all the votes were counted, the Chicago Tribune published an early edition with the banner headline "DEWEY DEFEATS TRUMAN."', [installation_date]='2009-04-17 14:55:22.837' WHERE [id]=1039
UPDATE [dbo].[widget_content] SET [data]='1938 - In an event that would foreshadow the Holocaust, German Nazis launch a campaign of terror against Jewish people and their homes and businesses in Germany and Austria. The violence, which continued through November 10 and was later dubbed "Kristallnacht," or "Night of Broken Glass".', [installation_date]='2009-04-17 14:55:22.837' WHERE [id]=1046
UPDATE [dbo].[widget_content] SET [data]='1955 - In Montgomery, Alabama, Rosa Parks is jailed for refusing to give up her seat on a public bus to a white man, a violation of the city''s racial segregation laws. The successful Montgomery Bus Boycott, organized by a young Baptist minister named Martin Luther King, Jr., followed Park''s historic act of civil disobedience.', [installation_date]='2009-04-17 14:55:22.837' WHERE [id]=1068
-- Operation applied to 2195 rows out of 2195
-- Add rows to [dbo].[widget_app]
INSERT INTO [dbo].[widget_app] ([id], [name], [title], [template], [content_key], [post_load_javascript], [requires_web], [optional], [student], [teacher], [default_column], [default_order], [default_widget], [installation_date]) VALUES (31, 'MathDrill', 'Math Drill', 'Operantics Math Flashcards Jeremiah Jones: Fact Quest', '#NONE#', '', 0, 1, 1, 1, 3, 99, 1, '2010-11-17 11:27:13.737')
INSERT INTO [dbo].[widget_app] ([id], [name], [title], [template], [content_key], [post_load_javascript], [requires_web], [optional], [student], [teacher], [default_column], [default_order], [default_widget], [installation_date]) VALUES (32, 'BibleLookup', 'Bible Lookup', '
KJVNASB
', '#NONE#', 'readyBibleLookup();', 0, 1, 1, 1, 3, 99, 1, '2010-10-06 09:03:25.567')
INSERT INTO [dbo].[widget_app] ([id], [name], [title], [template], [content_key], [post_load_javascript], [requires_web], [optional], [student], [teacher], [default_column], [default_order], [default_widget], [installation_date]) VALUES (33, 'LessonBook', 'Lesson Book', '
', '#NONE#', '', 0, 0, 0, 1, 2, 1, 1, '2010-10-18 11:00:53.763')
INSERT INTO [dbo].[widget_app] ([id], [name], [title], [template], [content_key], [post_load_javascript], [requires_web], [optional], [student], [teacher], [default_column], [default_order], [default_widget], [installation_date]) VALUES (34, 'GeographyDrill', 'Geography Drill', 'State Capitals World Capitals', '#NONE#', '', 0, 1, 1, 1, 3, 99, 1, '2010-11-17 11:28:15.340')
-- Operation applied to 4 rows out of 4
insert into vulgar values('jackass', 1)
insert into vulgar values('diddly', 1)
insert into vulgar values('masturbate', 1)
print 'Adding lesson book'
update homepage
set modorder = replace(modorder, 'Administration', 'Administration,LessonBook')
where user_id = (select user_id from [user] where user_type = 'A')
print 'Updating school_rss'
declare @rssfeednumber as integer
set @rssfeednumber = 1
while @rssfeednumber <=5
begin
if not exists(select * from school_rss where rssfeednumber = @rssfeednumber)
insert into school_rss values(@rssfeednumber, '', 5, 'RSS Feed ' + cast(@rssfeednumber as char(1)))
set @rssfeednumber = @rssfeednumber + 1
end
update school_rss set
rssTitle = 'RSS Feed ' + cast(rssfeednumber as varchar(3))
where rssTitle is null
print 'Correcting typo in [bible]'
update bible
set verse_text = 'That the man of God may be perfect, thoroughly furnished unto all good works.'
where translation = 'KJV' and book = '2 Timothy' and chapter = '3' and verse_num = '17'
update widget_content
set data = '1780 - American General Benedict Arnold meets with British Major John Andre to discuss handing over West Point to the British, in return for the promise of a large sum of money and a high position in the British army. The plot was foiled and Arnold, a former American hero, became synonymous with the word "traitor."'
where [id] = 997
update widget_content
set data = '1776 - Nathan Hale was hanged as a spy by the British during the Revolutionary War.'
where [id] = 998
UPDATE [dbo].[tip_of_week] SET [data]='Want to delete an assignment from a student''s workload? Click "Assignments" in the "Lesson Book" widget, select the student, select the subject with the assignment, click the "Edit Subject" button, click the unit containing the assignment, click the "Remove" button, click Yes, click the "Save" button. If you are using due dates, you can click "OK" to change them or "Cancel" to leave them alone.' WHERE [week_num]=9
UPDATE [dbo].[tip_of_week] SET [data]='To assign an alternate assignment or test: click "Assignments" in the "Lesson Book" widget, select the student, click the subject in the "Student Schoolwork" section on the bottom of the screen and click the "Edit" button. Expand the curriculum folder in the "Available Curriculum" column on the right-hand side of the screen. Select the subject, then select the unit, click the "Alternate Test" (or other alternate assignment) and drag it to the unit folder. Use the "Move Up" or "Move Down" button if necessary. To delete the existing test, click it and then click the "Remove" button. Click the "Save" button when you are finished.' WHERE [week_num]=11
UPDATE [dbo].[tip_of_week] SET [data]='To customize the calendar for one student and not all students: Click "Student Setup". Choose the student and click the "Edit Calendar" button. Select the "Term" and click the "Open" button. Edit the student''s calendar just as you do the school calendar. Click the "Save Calendar" button when you are done. You can regenerate the due dates by clicking the "Regenerate" button or skip this by clicking the "Cancel" button.' WHERE [week_num]=17
UPDATE [dbo].[tip_of_week] SET [data]='"Open Book" is an option for quizzes and tests to allow students to start and stop a quiz or test and then return to it, until they choose to submit it for grading. Set it on the Quiz/Test Setup Page (Find this option under School Setup or Student Setup/Edit Settings. For just one subject, go to the "Lesson Book" widget and click "Assignments", select the subject, click Edit Subject and select Quiz/Test).' WHERE [week_num]=18
UPDATE [dbo].[tip_of_week] SET [data]='You can easily print a lesson plan for your student, simply click "Lesson Plan" in the "Lesson Book" widget, select the student whose lesson plan you want to print, click the "Print" button on the bottom of the screen, select the start and end dates of the date range you want. Click the "Preview" button to verify that is what you want, click the "Print" button to select your printer, and click the "Print" button.' WHERE [week_num]=23
UPDATE [dbo].[tip_of_week] SET [data]='Do you want to set up an event that spans multiple days? Click "School Setup" in the "Administration" widget, select "Term", and click the calendar icon. Double-click the first day of the event. Click the "Add" button on the "Edit Day" window. Enter a brief "Description" of the event and select the "End Date" for the event. Click the "Save" button and close the "Edit Day" window. Click "Save Calendar" on the Edit School Calendar" window.' WHERE [week_num]=35
UPDATE [dbo].[tip_of_week] SET [data]='Need to remove an event (items in those darker yellow boxes on your calendar)? Click "School Setup" in the "Administration" widget, select "Term", and click the calendar icon. Double-click the day with the event to remove, click the event to select it, and click the "Remove" button. Close the "Edit Day" window, and click "Save Calendar" on the "Edit School Calendar" window.' WHERE [week_num]=36
UPDATE [dbo].[tip_of_week] SET [data]='Printing from SOS Student is only possible if it has been enabled by the teacher. To do this, click "School Setup" in the "Administration" widget. Click the checkbox next to "Student Printing" at the bottom of the "Lesson Options" section and click the "Save" button.' WHERE [week_num]=37
UPDATE [dbo].[tip_of_week] SET [data]='A student''s lesson can be printed from SOS Teacher. Click "Assignments" in the "Lesson Book" widget and select the student, then in the Student Schoolwork" section, select the subject and unit containing the lesson you want to print. Double-click the "Assignment Title" in the lower right-hand part of the window and click the "Print" button on the bottom of the window.' WHERE [week_num]=38
UPDATE [dbo].[tip_of_week] SET [data]='To create a new term and the calendar associated with it, click "School Setup" in the "Administration" widget, and select "Term". Click the "Add" button, enter the new "Term Name" and click the "Save" button. Now the calendar, select the term you just created using the drop-down menu, and click the calendar icon. Select Traditional or Custom (Traditional is similar to the public schools, custom allows you to select your preferred dates.). Customize your calendar to meet your needs and click the "Save" button when you are finished.' WHERE [week_num]=40
UPDATE [dbo].[tip_of_week] SET [data]='Do you need to modify your traditional calendar school year to end on a different date? Click "School Setup" in the "Administration" widget, and select "Term". Click the calendar icon and click the "Reset" button. Select "Custom" and choose the new "End Date" using the drop-down menu. Customize your calendar if you wish. Be sure to click the "Save" button when you are done.' WHERE [week_num]=41
UPDATE [dbo].[tip_of_week] SET [data]='Do you want to create a custom assignment for only one student? Go to "Assignments" in the "Lesson Book" widget and select the student. Select the subject and click the "Edit Subject" button. Click the unit where you want to place the assignment and click the "Create Assignment" button. When you finish entering the custom assignment, you can use the "Move Up" and "Move Down" buttons to place the assignment exactly where you want it to appear. Be sure to click the "Save" button when you are finished. It is automatically assigned to this student only.' WHERE [week_num]=48
COMMIT TRANSACTION
GO
/*
Run this script on:
AOP-QA02.migtest - This database will be modified
to synchronize it with:
(local).soshome2012
You are recommended to back up your database before running this script
Script created by SQL Compare version 8.1.0 from Red Gate Software Ltd at 2/24/2012 1:42:49 PM
*/
USE SOSHOME20XX
GO
SET NUMERIC_ROUNDABORT OFF
GO
SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE id=OBJECT_ID('tempdb..#tmpErrors')) DROP TABLE #tmpErrors
GO
CREATE TABLE #tmpErrors (Error int)
GO
SET XACT_ABORT ON
GO
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
GO
BEGIN TRANSACTION
if object_id('Stored_Procedure_Name') is not null
begin
print 'PREDROP: Stored_Procedure_Name'
drop proc Stored_Procedure_Name
end
go
GO
PRINT N'Creating [dbo].[transcript_subject_information]'
GO
CREATE TABLE [dbo].[transcript_subject_information]
(
[transcript_subject_id] [int] NOT NULL IDENTITY(1, 1),
[student_id] [uniqueidentifier] NOT NULL,
[term_id] [int] NOT NULL,
[subject] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[grade] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[credit] [float] NOT NULL
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating primary key [PK_transcript_subject_information] on [dbo].[transcript_subject_information]'
GO
ALTER TABLE [dbo].[transcript_subject_information] ADD CONSTRAINT [PK_transcript_subject_information] PRIMARY KEY CLUSTERED ([transcript_subject_id])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[DeleteCustomTranscriptSubject]'
GO
IF OBJECT_ID('DeleteCustomTranscriptSubject') IS NOT NULL
BEGIN
PRINT N'-Dropping proc DeleteCustomTranscriptSubject'
DROP PROC DeleteCustomTranscriptSubject
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc DeleteCustomTranscriptSubject'
GO
CREATE Procedure DeleteCustomTranscriptSubject
/* Param List */
@TranscriptSubjectId int
AS
DELETE FROM transcript_subject_information
WHERE transcript_subject_id = @TranscriptSubjectId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[activity]'
GO
CREATE TABLE [dbo].[activity]
(
[event_id] [uniqueidentifier] NOT NULL,
[summary] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[location] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[hours] [real] NOT NULL,
[type] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating primary key [PK_activity] on [dbo].[activity]'
GO
ALTER TABLE [dbo].[activity] ADD CONSTRAINT [PK_activity] PRIMARY KEY CLUSTERED ([event_id])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[school_event_mm_user]'
GO
CREATE TABLE [dbo].[school_event_mm_user]
(
[event_id] [uniqueidentifier] NOT NULL,
[user_id] [uniqueidentifier] NOT NULL
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating index [IX_school_event_mm_user] on [dbo].[school_event_mm_user]'
GO
CREATE NONCLUSTERED INDEX [IX_school_event_mm_user] ON [dbo].[school_event_mm_user] ([event_id])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[transcript_information]'
GO
CREATE TABLE [dbo].[transcript_information]
(
[user_id] [uniqueidentifier] NOT NULL,
[address] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[city] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[state] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[zipcode] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[country] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[phone] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[email] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DOB] [datetime] NULL
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating primary key [PK_transcript_information] on [dbo].[transcript_information]'
GO
ALTER TABLE [dbo].[transcript_information] ADD CONSTRAINT [PK_transcript_information] PRIMARY KEY CLUSTERED ([user_id])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[reading_log]'
GO
CREATE TABLE [dbo].[reading_log]
(
[id] [uniqueidentifier] NOT NULL,
[title] [varchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[author] [varchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[started] [datetime] NOT NULL,
[due] [datetime] NULL,
[completed] [datetime] NULL,
[user_id] [uniqueidentifier] NOT NULL
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating primary key [PK_reading_log] on [dbo].[reading_log]'
GO
ALTER TABLE [dbo].[reading_log] ADD CONSTRAINT [PK_reading_log] PRIMARY KEY CLUSTERED ([id])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[CRUDReadingLog]'
GO
IF OBJECT_ID('[dbo].[CRUDReadingLog]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[CRUDReadingLog]'
DROP PROC [dbo].[CRUDReadingLog]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[CRUDReadingLog]'
GO
CREATE proc [dbo].[CRUDReadingLog]
@CRUD char, -- create, retrieve, update, delete
@id uniqueidentifier=null,
@title varchar(max)=null,
@author varchar(max)=null,
@started datetime=null,
@due datetime=null,
@completed datetime=null,
@user_id as uniqueidentifier=null
as
if @CRUD = 'C'
begin
set @id = newid()
insert into reading_log
values(@id, @title, @author, @started, @due, @completed, @user_id)
select @id
end
if @CRUD = 'R'
select *
from reading_log
where user_id = @user_id
if @CRUD = 'U'
update reading_log set
title = @title,
author = @author,
started = @started,
due = @due,
completed = @completed
where id = @id
if @CRUD = 'D'
delete reading_log
where id = @id
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetReadingLogReport]'
GO
IF OBJECT_ID('GetReadingLogReport') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetReadingLogReport'
DROP PROC GetReadingLogReport
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetReadingLogReport'
GO
CREATE Procedure GetReadingLogReport
/* Param List */
@StudentId as uniqueidentifier
AS
SET NOCOUNT ON
SELECT u.username, u.first_name + ' ' + u.last_name AS 'displayname', rl.title, rl.author, CONVERT(VARCHAR(10),rl.[started],101) as 'StartDate',
'DueDate' = CASE WHEN rl.due IS NULL then ' '
ELSE CONVERT(VARCHAR(10),rl.due,101)
END,
'CompletedDate' = CASE WHEN rl.completed IS NULL then ' '
ELSE CONVERT(VARCHAR(10),rl.completed,101)
END
FROM reading_log rl join [user] u ON rl.[user_id] = u.[user_id]
WHERE rl.[user_id] = @StudentId
ORDER BY rl.title
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[SendMessage]'
GO
IF OBJECT_ID('SendMessage') IS NOT NULL
BEGIN
PRINT N'-Dropping proc SendMessage'
DROP PROC SendMessage
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc SendMessage'
GO
CREATE Procedure SendMessage
/* Param List */
@MessageBody as varchar(4000),
@SenderId as uniqueidentifier,
@RecipientId as uniqueidentifier,
@Subject as varchar(100),
@StudentSubjectId as uniqueidentifier,
@StudentAssignmentId as uniqueidentifier,
@StudentProblemId as integer
AS
/******************************************************************************
** File:
** Name: SendMessage
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
INSERT INTO message(message_id, unread_ind, message_body, sender_id, recipient_id, direction, subject, message_date,
student_subject_id, student_assignment_id, student_problem_id)
VALUES (NEWID(), 1, @MessageBody, @SenderId, @RecipientId, 'I', @Subject, GETDATE(), @StudentSubjectId,
@StudentAssignmentId, @StudentProblemId)
INSERT INTO message(message_id, unread_ind, message_body, sender_id, recipient_id, direction, subject, message_date,
student_subject_id, student_assignment_id, student_problem_id)
VALUES (NEWID(), 1, @MessageBody, @SenderId, @RecipientId, 'O', @Subject, GETDATE(), @StudentSubjectId,
@StudentAssignmentId, @StudentProblemId)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[SaveCustomTranscriptSubjects]'
GO
IF OBJECT_ID('SaveCustomTranscriptSubjects') IS NOT NULL
BEGIN
PRINT N'-Dropping proc SaveCustomTranscriptSubjects'
DROP PROC SaveCustomTranscriptSubjects
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc SaveCustomTranscriptSubjects'
GO
CREATE Procedure SaveCustomTranscriptSubjects
/* Param List */
@student_id uniqueidentifier,
@term_id int,
@subject varchar(100),
@grade varchar(1),
@credit float,
@transcript_subject_id int,
@NewId as int OUTPUT
AS
/******************************************************************************
** File:
** Name: SaveCustomTranscriptSubjects
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
-- If row already exists,
IF (SELECT COUNT(*)
FROM transcript_subject_information
WHERE transcript_subject_id = @transcript_subject_id) > 0
BEGIN
-- Update it
UPDATE transcript_subject_information
SET [subject] = @subject,
grade = @grade,
credit = @credit,
term_id = @term_id
WHERE transcript_subject_id = @transcript_subject_id
SET @NewId = @transcript_subject_id
END
ELSE
BEGIN
-- Otherwise add a new report info (custom subject)
INSERT INTO transcript_subject_information(student_id, term_id, [subject], grade, credit)
VALUES (@student_id, @term_id, @subject, @grade, @credit)
-- Output the ID
SELECT @NewId = SCOPE_IDENTITY()
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[tip_of_week]'
GO
ALTER TABLE [dbo].[tip_of_week] ALTER COLUMN [week_num] [int] NOT NULL
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating primary key [PK_tip_of_week] on [dbo].[tip_of_week]'
GO
ALTER TABLE [dbo].[tip_of_week] ADD CONSTRAINT [PK_tip_of_week] PRIMARY KEY CLUSTERED ([week_num])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetTranscriptAddress]'
GO
IF OBJECT_ID('GetTranscriptAddress') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetTranscriptAddress'
DROP PROC GetTranscriptAddress
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetTranscriptAddress'
GO
CREATE Procedure GetTranscriptAddress
@UserId as uniqueidentifier
AS
SELECT * from transcript_information WHERE [USER_ID] = @UserId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[SaveTranscriptAddress]'
GO
IF OBJECT_ID('SaveTranscriptAddress') IS NOT NULL
BEGIN
PRINT N'-Dropping proc SaveTranscriptAddress'
DROP PROC SaveTranscriptAddress
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc SaveTranscriptAddress'
GO
CREATE Procedure SaveTranscriptAddress
/* Param List */
@UserId as uniqueidentifier,
@Address as varchar(50),
@City as varchar(50),
@State as varchar(50),
@Zipcode as varchar(50),
@Country as varchar(50),
@Phone as varchar(50),
@Email as varchar(50),
@DOB as varchar(50)
AS
/******************************************************************************
** File:
** Name: SaveTranscriptAddress
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SET NOCOUNT ON
IF (SELECT COUNT(*)
FROM transcript_information
WHERE [user_id] = @UserId) > 0
BEGIN
-- Update it
UPDATE transcript_information
SET [address] = @Address,
city = @City,
[state] = @State,
zipcode = @Zipcode,
country = @Country,
phone = @Phone,
email = @Email,
DOB = @DOB
WHERE [user_id] = @UserId
END
ELSE
BEGIN
-- Otherwise add a new address
INSERT INTO transcript_information(user_id, address, city, [state], zipcode, country, phone, email, DOB)
VALUES (@UserId, @Address, @City, @State, @Zipcode, @Country, @Phone, @Email, @DOB)
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[student_subject]'
GO
ALTER TABLE [dbo].[student_subject] ADD
[access_lesson_bible_ind] [bit] NOT NULL CONSTRAINT [DF_student_subject_access_lesson_bible_ind] DEFAULT ((1)),
[access_project_bible_ind] [bit] NOT NULL CONSTRAINT [DF_student_subject_access_project_bible_ind] DEFAULT ((1)),
[access_quiz_bible_ind] [bit] NOT NULL CONSTRAINT [DF_student_subject_access_quiz_bible_ind] DEFAULT ((0)),
[access_test_bible_ind] [bit] NOT NULL CONSTRAINT [DF_student_subject_access_test_bible_ind] DEFAULT ((0)),
[access_lesson_journal_ind] [bit] NOT NULL CONSTRAINT [DF_student_subject_access_lesson_journal_ind] DEFAULT ((1)),
[access_project_journal_ind] [bit] NOT NULL CONSTRAINT [DF_student_subject_access_project_journal_ind] DEFAULT ((1)),
[access_quiz_journal_ind] [bit] NOT NULL CONSTRAINT [DF_student_subject_access_quiz_journal_ind_ind] DEFAULT ((0)),
[access_test_journal_ind] [bit] NOT NULL CONSTRAINT [DF_student_subject_access_test_journal_ind_ind] DEFAULT ((0)),
[lesson_threshold_notify_ind] [bit] NOT NULL CONSTRAINT [DF_student_subject_lesson_threshold_notify_ind] DEFAULT ((0)),
[lesson_notify_threshold] [tinyint] NOT NULL CONSTRAINT [DF_student_subject_lesson_notify_threshold] DEFAULT ((0)),
[quiz_threshold_notify_ind] [bit] NOT NULL CONSTRAINT [DF_student_subject_quiz_threshold_notify_ind] DEFAULT ((0)),
[quiz_notify_threshold] [tinyint] NOT NULL CONSTRAINT [DF_student_subject_quiz_notify_threshold] DEFAULT ((0)),
[test_threshold_notify_ind] [bit] NOT NULL CONSTRAINT [DF_student_subject_test_threshold_notify_ind] DEFAULT ((0)),
[test_notify_threshold] [tinyint] NOT NULL CONSTRAINT [DF_student_subject_test_notify_threshold] DEFAULT ((0))
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[student_settings]'
GO
ALTER TABLE [dbo].[student_settings] ADD
[enable_search_ind] [bit] NOT NULL CONSTRAINT [DF_student_settings_enable_search_ind] DEFAULT ((0)),
[access_lesson_bible_ind] [bit] NOT NULL CONSTRAINT [DF_student_settings_access_lesson_bible_ind] DEFAULT ((1)),
[access_project_bible_ind] [bit] NOT NULL CONSTRAINT [DF_student_settings_access_project_bible_ind] DEFAULT ((1)),
[access_quiz_bible_ind] [bit] NOT NULL CONSTRAINT [DF_student_settings_access_quiz_bible_ind] DEFAULT ((0)),
[access_test_bible_ind] [bit] NOT NULL CONSTRAINT [DF_student_settings_access_test_bible_ind] DEFAULT ((0)),
[access_lesson_journal_ind] [bit] NOT NULL CONSTRAINT [DF_student_settings_access_lesson_journal_ind] DEFAULT ((1)),
[access_project_journal_ind] [bit] NOT NULL CONSTRAINT [DF_student_settings_access_project_journal_ind] DEFAULT ((1)),
[access_quiz_journal_ind] [bit] NOT NULL CONSTRAINT [DF_student_settings_access_quiz_journal_ind_ind] DEFAULT ((0)),
[access_test_journal_ind] [bit] NOT NULL CONSTRAINT [DF_student_settings_access_test_journal_ind_ind] DEFAULT ((0)),
[lesson_threshold_notify_ind] [bit] NOT NULL CONSTRAINT [DF_student_settings_lesson_threshold_notify_ind] DEFAULT ((0)),
[lesson_notify_threshold] [tinyint] NOT NULL CONSTRAINT [DF_student_settings_lesson_notify_threshold] DEFAULT ((0)),
[quiz_threshold_notify_ind] [bit] NOT NULL CONSTRAINT [DF_student_settings_quiz_threshold_notify_ind] DEFAULT ((0)),
[quiz_notify_threshold] [tinyint] NOT NULL CONSTRAINT [DF_student_settings_quiz_notify_threshold] DEFAULT ((0)),
[test_threshold_notify_ind] [bit] NOT NULL CONSTRAINT [DF_student_settings_test_threshold_notify_ind] DEFAULT ((0)),
[test_notify_threshold] [tinyint] NOT NULL CONSTRAINT [DF_student_settings_test_notify_threshold] DEFAULT ((0))
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetStudentTranscriptHeader]'
GO
IF OBJECT_ID('GetStudentTranscriptHeader') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetStudentTranscriptHeader'
DROP PROC GetStudentTranscriptHeader
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetStudentTranscriptHeader'
GO
CREATE Procedure GetStudentTranscriptHeader
@StudentId as uniqueidentifier
AS
SELECT u.first_name + ' '+ u.last_name as 'displayname', t.address as 'student_address', t.city + ', ' + t.state + ' ' + t.zipcode as 'student_city', t.country as 'student_country',
t.phone as 'student_phone', t.email as 'student_email', CONVERT(VARCHAR(10),t.DOB,101) as 'DOB' from transcript_information t RIGHT JOIN [user] u on t.[user_id] = u.[user_id]
WHERE u.[user_id] = @StudentId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[CRUDSchoolEvent_mm_User]'
GO
IF OBJECT_ID('CRUDSchoolEvent_mm_User') IS NOT NULL
BEGIN
PRINT N'-Dropping proc CRUDSchoolEvent_mm_User'
DROP PROC CRUDSchoolEvent_mm_User
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc CRUDSchoolEvent_mm_User'
GO
CREATE procedure CRUDSchoolEvent_mm_User
@CRUD as char,
@event_id as uniqueidentifier,
@user_id as uniqueidentifier
as
if @CRUD = 'C'
insert into school_event_mm_user
values(@event_id, @user_id)
if @CRUD = 'R'
select *
from school_event_mm_user mm
join [user] u
on mm.user_id = u.user_id
join student_settings s
on u.user_id = s.student_id
where mm.event_id = @event_id
if @CRUD = 'D'
delete from school_event_mm_user
where event_id = @event_id and
user_id = @user_id
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetEventsSchool]'
GO
IF OBJECT_ID('[dbo].[GetEventsSchool]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetEventsSchool]'
DROP PROC [dbo].[GetEventsSchool]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetEventsSchool]'
GO
CREATE Procedure [dbo].[GetEventsSchool]
AS
select *, act.event_id as act_event_id,
event_type=case when ste.event_id is null then 0 else 2 end
from event e
left join school_event se
on se.event_id = e.event_id
left join student_event ste
on ste.event_id = e.event_id
left join activity act
on act.event_id = e.event_id
where (se.event_id is not null or ste.event_id is not null) and
(ste.event_id is null or
( ste.event_id is not null and
ste.student_id in (select user_id
from [user]
where user_type = 's'
)
)
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetEventsStudent]'
GO
IF OBJECT_ID('[dbo].[GetEventsStudent]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetEventsStudent]'
DROP PROC [dbo].[GetEventsStudent]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetEventsStudent]'
GO
CREATE Procedure [dbo].[GetEventsStudent]
/* Param List */
@StudentID uniqueidentifier
AS
select *, act.event_id as act_event_id,
event_type=case when ste.event_id is null then 0 else 2 end
from event e
left join school_event se
on se.event_id = e.event_id
left join student_event ste
on ste.event_id = e.event_id
left join activity act
on act.event_id = e.event_id
where (se.event_id is not null or ste.event_id is not null) and
(ste.event_id is null or
( ste.event_id is not null and ste.student_id = @StudentID)
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[school_settings]'
GO
ALTER TABLE [dbo].[school_settings] ADD
[access_lesson_bible_ind] [bit] NOT NULL CONSTRAINT [DF_school_settings_access_lesson_bible_ind] DEFAULT ((1)),
[access_project_bible_ind] [bit] NOT NULL CONSTRAINT [DF_school_settings_access_project_bible_ind] DEFAULT ((1)),
[access_quiz_bible_ind] [bit] NOT NULL CONSTRAINT [DF_school_settings_access_quiz_bible_ind] DEFAULT ((0)),
[access_test_bible_ind] [bit] NOT NULL CONSTRAINT [DF_school_settings_access_test_bible_ind] DEFAULT ((0)),
[access_lesson_journal_ind] [bit] NOT NULL CONSTRAINT [DF_school_settings_access_lesson_journal_ind] DEFAULT ((1)),
[access_project_journal_ind] [bit] NOT NULL CONSTRAINT [DF_school_settings_access_project_journal_ind] DEFAULT ((1)),
[access_quiz_journal_ind] [bit] NOT NULL CONSTRAINT [DF_school_settings_access_quiz_journal_ind_ind] DEFAULT ((0)),
[access_test_journal_ind] [bit] NOT NULL CONSTRAINT [DF_school_settings_access_test_journal_ind_ind] DEFAULT ((0)),
[lesson_threshold_notify_ind] [bit] NOT NULL CONSTRAINT [DF_school_settings_lesson_threshold_notify_ind] DEFAULT ((0)),
[lesson_notify_threshold] [tinyint] NOT NULL CONSTRAINT [DF_school_settings_lesson_notify_threshold] DEFAULT ((0)),
[quiz_threshold_notify_ind] [bit] NOT NULL CONSTRAINT [DF_school_settings_quiz_threshold_notify_ind] DEFAULT ((0)),
[quiz_notify_threshold] [tinyint] NOT NULL CONSTRAINT [DF_school_settings_quiz_notify_threshold] DEFAULT ((0)),
[test_threshold_notify_ind] [bit] NOT NULL CONSTRAINT [DF_school_settings_test_threshold_notify_ind] DEFAULT ((0)),
[test_notify_threshold] [tinyint] NOT NULL CONSTRAINT [DF_school_settings_test_notify_threshold] DEFAULT ((0))
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[default_settings]'
GO
ALTER TABLE [dbo].[default_settings] ADD
[access_lesson_bible_ind] [bit] NOT NULL CONSTRAINT [DF_default_settings_access_lesson_bible_ind] DEFAULT ((1)),
[access_project_bible_ind] [bit] NOT NULL CONSTRAINT [DF_default_settings_access_project_bible_ind] DEFAULT ((1)),
[access_quiz_bible_ind] [bit] NOT NULL CONSTRAINT [DF_default_settings_access_quiz_bible_ind] DEFAULT ((0)),
[access_test_bible_ind] [bit] NOT NULL CONSTRAINT [DF_default_settings_access_test_bible_ind] DEFAULT ((0)),
[access_lesson_journal_ind] [bit] NOT NULL CONSTRAINT [DF_default_settings_access_lesson_journal_ind] DEFAULT ((1)),
[access_project_journal_ind] [bit] NOT NULL CONSTRAINT [DF_default_settings_access_project_journal_ind] DEFAULT ((1)),
[access_quiz_journal_ind] [bit] NOT NULL CONSTRAINT [DF_default_settings_access_quiz_journal_ind] DEFAULT ((0)),
[access_test_journal_ind] [bit] NOT NULL CONSTRAINT [DF_default_settings_access_test_journal_ind_ind] DEFAULT ((0)),
[lesson_threshold_notify_ind] [bit] NOT NULL CONSTRAINT [DF_default_settings_lesson_threshold_notify_ind] DEFAULT ((0)),
[lesson_notify_threshold] [tinyint] NOT NULL CONSTRAINT [DF_default_settings_lesson_notify_threshold] DEFAULT ((0)),
[quiz_threshold_notify_ind] [bit] NOT NULL CONSTRAINT [DF_default_settings_quiz_threshold_notify_ind] DEFAULT ((0)),
[quiz_notify_threshold] [tinyint] NOT NULL CONSTRAINT [DF_default_settings_quiz_threshold_notify] DEFAULT ((0)),
[test_threshold_notify_ind] [bit] NOT NULL CONSTRAINT [DF_default_settings_test_threshold_notify_ind] DEFAULT ((0)),
[test_notify_threshold] [tinyint] NOT NULL CONSTRAINT [DF_default_settings_test_notify_threshold] DEFAULT ((0))
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetActivityLogReport]'
GO
IF OBJECT_ID('GetActivityLogReport') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetActivityLogReport'
DROP PROC GetActivityLogReport
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetActivityLogReport'
GO
CREATE Procedure GetActivityLogReport
/* Param List */
@StudentId as uniqueidentifier
AS
SET NOCOUNT ON
select u.first_name + ' ' + u.last_name as 'displayname', mm.[user_id], act.type, e.description, act.summary, act.location, CAST(act.hours as varchar(20)) as 'hours', e.start_date, e.end_date
from activity act
join school_event_mm_user mm
on act.event_id = mm.event_id
join event e
on act.event_id = e.event_id
join [user] u on u.[user_id] = mm.[user_id]
where mm.user_id = @StudentId
union
select u.first_name + ' ' + u.last_name as 'displayname', se.[student_id], act.type, e.description, act.summary, act.location, CAST(act.hours as varchar(20)) as 'hours', e.start_date, e.end_date
from activity act
join student_event se
on act.event_id = se.event_id
join event e
on act.event_id = e.event_id
join [user] u on u.[user_id] = se.[student_id]
where se.student_id = @StudentId
ORDER BY act.type
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[SaveStudent]'
GO
IF OBJECT_ID('SaveStudent') IS NOT NULL
BEGIN
PRINT N'-Dropping proc SaveStudent'
DROP PROC SaveStudent
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc SaveStudent'
GO
CREATE Procedure SaveStudent
@StudentId as uniqueidentifier,
@FirstName as varchar(20),
@LastName as varchar(20),
@UserName as varchar(50),
@Password as varchar(12),
@ActiveInd as bit,
@CurrentTermId as int,
@AdvancedLessonPlanningInd as bit,
@AudioFeedbackDisabled as bit,
/* Added this unused parameter to match the school student object parameters*/
@SyncAccessInd as bit
AS
/******************************************************************************
** File:
** Name: SaveStudent
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
/*Variables used to store default values
*/
DECLARE @BibleTranslationDefault char(4)
DECLARE @QuizAccessAnswerKeyIndDefault bit
DECLARE @AccessAnswerKeyIndDefault bit
DECLARE @EasySpellingIndDefault bit
DECLARE @AccessHomepageCalculatorIndDefault bit
DECLARE @AccessHomepageDictionaryIndDefault bit
DECLARE @AccessHomepagePeriodicTableIndDefault bit
DECLARE @AccessInternetIndDefault bit
DECLARE @LeaveMsgSkipIndDefault bit
DECLARE @QuizLeaveMsgSkipIndDefault bit
DECLARE @AccessLessonCalculatorIndDefault bit
DECLARE @AccessLessonDictionaryIndDefault bit
DECLARE @AccessLessonPeriodicTableIndDefault bit
DECLARE @QuizNotifyCorrectIncorrectIndDefault bit
DECLARE @QuizOpenBookIndDefault bit
DECLARE @QuizOpenPageIndDefault bit
DECLARE @AccessProjectCalculatorIndDefault bit
DECLARE @AccessProjectDictionaryIndDefault bit
DECLARE @AccessProjectPeriodicTableIndDefault bit
DECLARE @AccessQuizCalculatorIndDefault bit
DECLARE @AccessQuizDictionaryIndDefault bit
DECLARE @AccessQuizPeriodicTableIndDefault bit
DECLARE @QuizEasySpellingIndDefault bit
DECLARE @DisplayLetterIndDefault bit
DECLARE @DisplayPercentIndDefault bit
DECLARE @StudentPrintIndDefault bit
DECLARE @AccessTestCalculatorIndDefault bit
DECLARE @AccessTestDictionaryIndDefault bit
DECLARE @AccessTestPeriodicTableIndDefault bit
DECLARE @UnlimitedProblemAttemptsDefault bit
DECLARE @AMinimumDefault int
DECLARE @BMinimumDefault int
DECLARE @CMinimumDefault int
DECLARE @DMinimumDefault int
DECLARE @LessonWeightDefault int
DECLARE @MaxProblemAttemptsDefault int
DECLARE @MaxTrueFalseProblemAttemptsDefault int
DECLARE @ProblemAttemptsPenaltyDefault int
DECLARE @ProjectWeightDefault int
DECLARE @QuizSpellingPenaltyDefault int
DECLARE @QuizWeightDefault int
DECLARE @SpellingPenaltyDefault int
DECLARE @TestWeightDefault int
DECLARE @TestAccessAnswerKeyIndDefault bit
DECLARE @TestLeaveMsgSkipIndDefault bit
DECLARE @TestNotifyCorrectIncorrectIndDefault bit
DECLARE @TestOpenBookIndDefault bit
DECLARE @TestOpenPageIndDefault bit
DECLARE @TestSpellingPenaltyDefault int
DECLARE @TestEasySpellingIndDefault bit
DECLARE @AccessAllRightIndDefault bit
DECLARE @AccessFarmerFrankIndDefault bit
DECLARE @AccessNewHomepageIndDefault bit
DECLARE @AccessHomepageWebIndDefault bit
DECLARE @AccessGoogleIndDefault bit
DECLARE @AccessVocabGamesIndDefault bit
DECLARE @QuizNotifyParentIndDefault bit
DECLARE @TestNotifyParentIndDefault bit
DECLARE @LessonThresholdNotifyIndDefault bit
DECLARE @LessonNotifyThresholdDefault tinyint
DECLARE @QuizThresholdNotifyIndDefault bit
DECLARE @QuizNotifyThresholdDefault tinyint
DECLARE @TestThresholdNotifyIndDefault bit
DECLARE @TestNotifyThresholdDefault tinyint
DECLARE @IsCustom bit
SET @IsCustom = 0
SELECT
@AccessHomepageCalculatorIndDefault = access_homepage_calculator_ind,
@AccessHomepageDictionaryIndDefault = access_homepage_dictionary_ind,
@AccessHomepagePeriodicTableIndDefault = access_homepage_periodic_table_ind,
@AccessProjectCalculatorIndDefault = access_project_calculator_ind,
@AccessProjectDictionaryIndDefault = access_project_dictionary_ind,
@AccessProjectPeriodicTableIndDefault = access_project_periodic_table_ind,
@AccessLessonCalculatorIndDefault = access_lesson_calculator_ind,
@AccessLessonDictionaryIndDefault = access_lesson_dictionary_ind,
@AccessLessonPeriodicTableIndDefault = access_lesson_periodic_table_ind,
@AccessQuizCalculatorIndDefault = access_quiz_calculator_ind,
@AccessQuizDictionaryIndDefault = access_quiz_dictionary_ind,
@AccessQuizPeriodicTableIndDefault = access_quiz_periodic_table_ind,
@AccessTestCalculatorIndDefault = access_test_calculator_ind,
@AccessTestDictionaryIndDefault = access_test_dictionary_ind,
@AccessTestPeriodicTableIndDefault = access_test_periodic_table_ind,
@BibleTranslationDefault = bible_translation,
@QuizAccessAnswerKeyIndDefault = quiz_access_answer_key_ind,
@AccessAnswerKeyIndDefault = access_answer_key_ind,
@EasySpellingIndDefault = easy_spelling_ind,
@AccessInternetIndDefault = access_internet_ind,
@LeaveMsgSkipIndDefault = leave_msg_skip_ind,
@QuizLeaveMsgSkipIndDefault = quiz_leave_msg_skip_ind,
@QuizNotifyCorrectIncorrectIndDefault = quiz_notify_correct_incorrect_ind,
@QuizOpenBookIndDefault = quiz_open_book_ind,
@QuizOpenPageIndDefault = quiz_open_page_ind,
@QuizEasySpellingIndDefault = quiz_easy_spelling_ind,
@DisplayLetterIndDefault = display_letter_ind,
@DisplayPercentIndDefault = display_percent_ind,
@StudentPrintIndDefault = student_print_ind,
@UnlimitedProblemAttemptsDefault = unlimited_problem_attempts,
@AMinimumDefault = a_minimum,
@BMinimumDefault = b_minimum,
@CMinimumDefault = c_minimum,
@DMinimumDefault = d_minimum,
@LessonWeightDefault = lesson_weight,
@MaxProblemAttemptsDefault = max_problem_attempts,
@MaxTrueFalseProblemAttemptsDefault = tf_max_problem_attempts,
@ProblemAttemptsPenaltyDefault = problem_attempts_penalty,
@ProjectWeightDefault = project_weight,
@QuizSpellingPenaltyDefault = quiz_spelling_penalty,
@QuizWeightDefault = quiz_weight,
@SpellingPenaltyDefault = spelling_penalty,
@TestWeightDefault = test_weight,
@TestAccessAnswerKeyIndDefault = test_access_answer_key_ind,
@TestLeaveMsgSkipIndDefault = test_leave_msg_skip_ind,
@TestNotifyCorrectIncorrectIndDefault = test_notify_correct_incorrect_ind,
@TestOpenBookIndDefault = test_open_book_ind,
@TestOpenPageIndDefault = test_open_page_ind,
@TestSpellingPenaltyDefault = test_spelling_penalty,
@TestEasySpellingIndDefault = test_easy_spelling_ind,
@AccessAllRightIndDefault = access_allright_ind,
@AccessFarmerFrankIndDefault = access_farmerfrank_ind,
@AccessNewHomepageIndDefault = access_new_homepage_ind,
@AccessHomepageWebIndDefault = access_homepage_web_ind,
@AccessGoogleIndDefault = access_google_ind,
@AccessVocabGamesIndDefault = access_vocab_games_ind,
@QuizNotifyParentIndDefault = quiz_notify_parent_ind,
@TestNotifyParentIndDefault = test_notify_parent_ind,
@LessonThresholdNotifyIndDefault = lesson_threshold_notify_ind,
@LessonNotifyThresholdDefault = lesson_notify_threshold,
@QuizThresholdNotifyIndDefault = quiz_threshold_notify_ind,
@QuizNotifyThresholdDefault = quiz_notify_threshold,
@TestThresholdNotifyIndDefault = test_threshold_notify_ind,
@TestNotifyThresholdDefault = test_notify_threshold
FROM school_settings
IF (SELECT COUNT(*)
FROM [user]
WHERE user_id = @StudentId) > 0
BEGIN
IF (SELECT COUNT(*)
FROM [user]
WHERE username = @Username
AND user_id <> @StudentId) > 0
RETURN -100
ELSE
BEGIN
UPDATE [user]
SET first_name = @FirstName,
last_name = @LastName,
username = @UserName,
password = @Password
WHERE user_id = @StudentId
UPDATE student_settings
SET active_ind = @ActiveInd,
current_term_id = @CurrentTermId,
advanced_lesson_planning_ind = @AdvancedLessonPlanningInd,
audiofeedback_disabled = @AudioFeedbackDisabled
WHERE student_id = @StudentId
END
END
ELSE
BEGIN
--Verify that username doesn't already exist
IF (SELECT COUNT(*)
FROM [user]
WHERE username = @Username) > 0
RETURN -100
ELSE
BEGIN
INSERT INTO [user](user_id, getting_started_shown_ind, username,
password, user_type, first_name, last_name)
VALUES (@StudentId, 0, @UserName, @Password, 'S', @FirstName, @LastName)
INSERT INTO
student_settings
(
student_id,
quiz_access_answer_key_ind,
access_answer_key_ind,
easy_spelling_ind,
access_homepage_calculator_ind,
access_homepage_dictionary_ind,
access_homepage_periodic_table_ind,
access_internet_ind,
leave_msg_skip_ind,
quiz_leave_msg_skip_ind,
access_lesson_calculator_ind ,
access_lesson_dictionary_ind ,
access_lesson_periodic_table_ind ,
quiz_notify_correct_incorrect_ind ,
quiz_open_book_ind ,
quiz_open_page_ind ,
access_project_calculator_ind ,
access_project_dictionary_ind ,
access_project_periodic_table_ind ,
access_quiz_calculator_ind ,
access_quiz_dictionary_ind ,
access_quiz_periodic_table_ind ,
quiz_easy_spelling_ind ,
display_letter_ind ,
display_percent_ind ,
student_print_ind ,
access_test_calculator_ind ,
access_test_dictionary_ind ,
access_test_periodic_table_ind ,
unlimited_problem_attempts ,
a_minimum ,
b_minimum ,
c_minimum ,
d_minimum ,
lesson_weight ,
max_problem_attempts ,
tf_max_problem_attempts ,
problem_attempts_penalty ,
project_weight ,
quiz_spelling_penalty ,
quiz_weight ,
spelling_penalty ,
test_weight ,
bible_translation ,
test_access_answer_key_ind,
test_leave_msg_skip_ind,
test_notify_correct_incorrect_ind,
test_open_book_ind,
test_open_page_ind,
test_spelling_penalty,
test_easy_spelling_ind,
access_allright_ind,
access_farmerfrank_ind,
active_ind,
advanced_lesson_planning_ind,
current_term_id,
access_new_homepage_ind,
access_homepage_web_ind,
access_google_ind,
custom_homepage_ind,
custom_settings_ind ,
access_vocab_games_ind,
quiz_notify_parent_ind,
test_notify_parent_ind,
audiofeedback_disabled,
lesson_threshold_notify_ind,
lesson_notify_threshold,
quiz_threshold_notify_ind,
quiz_notify_threshold,
test_threshold_notify_ind,
test_notify_threshold
)
VALUES
(
@StudentId,
@QuizAccessAnswerKeyIndDefault,
@AccessAnswerKeyIndDefault,
@EasySpellingIndDefault,
@AccessHomepageCalculatorIndDefault,
@AccessHomepageDictionaryIndDefault,
@AccessHomepagePeriodicTableIndDefault,
@AccessInternetIndDefault,
@LeaveMsgSkipIndDefault,
@QuizLeaveMsgSkipIndDefault,
@AccessLessonCalculatorIndDefault,
@AccessLessonDictionaryIndDefault,
@AccessLessonPeriodicTableIndDefault,
@QuizNotifyCorrectIncorrectIndDefault,
@QuizOpenBookIndDefault,
@QuizOpenPageIndDefault,
@AccessProjectCalculatorIndDefault,
@AccessProjectDictionaryIndDefault,
@AccessProjectPeriodicTableIndDefault,
@AccessQuizCalculatorIndDefault,
@AccessQuizDictionaryIndDefault,
@AccessQuizPeriodicTableIndDefault,
@QuizEasySpellingIndDefault,
@DisplayLetterIndDefault,
@DisplayPercentIndDefault,
@StudentPrintIndDefault,
@AccessTestCalculatorIndDefault,
@AccessTestDictionaryIndDefault,
@AccessTestPeriodicTableIndDefault,
@UnlimitedProblemAttemptsDefault,
@AMinimumDefault,
@BMinimumDefault,
@CMinimumDefault,
@DMinimumDefault,
@LessonWeightDefault,
@MaxProblemAttemptsDefault,
@MaxTrueFalseProblemAttemptsDefault,
@ProblemAttemptsPenaltyDefault,
@ProjectWeightDefault,
@QuizSpellingPenaltyDefault,
@QuizWeightDefault,
@SpellingPenaltyDefault,
@TestWeightDefault,
@BibleTranslationDefault,
@TestAccessAnswerKeyIndDefault,
@TestLeaveMsgSkipIndDefault,
@TestNotifyCorrectIncorrectIndDefault,
@TestOpenBookIndDefault,
@TestOpenPageIndDefault,
@TestSpellingPenaltyDefault,
@TestEasySpellingIndDefault,
@AccessAllRightIndDefault,
@AccessFarmerFrankIndDefault,
@ActiveInd,
@AdvancedLessonPlanningInd,
@CurrentTermId,
@AccessNewHomepageIndDefault,
@AccessHomepageWebIndDefault,
@AccessGoogleIndDefault,
0,
@IsCustom,
@AccessVocabGamesIndDefault,
@QuizNotifyParentIndDefault,
@TestNotifyParentIndDefault,
@AudioFeedbackDisabled,
@LessonThresholdNotifyIndDefault,
@LessonNotifyThresholdDefault,
@QuizThresholdNotifyIndDefault,
@QuizNotifyThresholdDefault,
@TestThresholdNotifyIndDefault,
@TestNotifyThresholdDefault
)
END
END
RETURN 0
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[ImportStudentSubject]'
GO
IF OBJECT_ID('ImportStudentSubject') IS NOT NULL
BEGIN
PRINT N'-Dropping proc ImportStudentSubject'
DROP PROC ImportStudentSubject
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc ImportStudentSubject'
GO
CREATE Procedure ImportStudentSubject
/* Param List */
@StudentSubjectId as uniqueidentifier,
@StudentId as uniqueidentifier,
@CompletedInd as bit,
@Notepad as varchar(3000),
@score as tinyint,
@Title as varchar(100),
@ActiveInd as bit,
@Icon as varchar(50),
@IntroVideoShown as bit,
@Namespace as varchar(100),
@DefaultInd as bit,
@DaysOfWeek as varchar(100)
AS
/******************************************************************************
** File:
** Name: ImportStudentSubject
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth: Marcia Messner
** Date: 11/13/02
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
** 11-15-02 Marcia Messner grade and option settings will be imported
** separately and so only set other fields, if
** this is a new student subject fill the other
** fields from the school settings
*******************************************************************************/
-- If subject already exists,
IF (SELECT COUNT(*)
FROM student_subject
WHERE id = @StudentSubjectId) > 0
BEGIN
-- Update it
UPDATE student_subject
SET student_id = @StudentId, completed_ind = @CompletedInd, notepad = @Notepad, score = @score,
title = @Title, active_ind = @ActiveInd, icon = @Icon, intro_video_shown = @IntroVideoShown,
default_ind = @DefaultInd, nocustom_namespace = @Namespace, days_of_Week = @DaysOfWeek
WHERE id = @StudentSubjectId
END
ELSE
BEGIN
-- Otherwise add a new student_subject
INSERT INTO student_subject(id, student_id, completed_ind, notepad, score,
title, active_ind, access_internet_ind, max_problem_attempts, tf_max_problem_attempts,
unlimited_problem_attempts, leave_msg_skip_ind, quiz_leave_msg_skip_ind, quiz_notify_correct_incorrect_ind,
quiz_open_page_ind, quiz_open_book_ind, easy_spelling_ind, quiz_access_answer_key_ind, access_answer_key_ind, custom_settings_ind,
display_percent_ind, display_letter_ind, a_minimum, b_minimum, c_minimum, d_minimum,
lesson_weight, quiz_weight, test_weight, project_weight, spelling_penalty, icon,
quiz_easy_spelling_ind, quiz_spelling_penalty,
problem_attempts_penalty,
test_access_answer_key_ind,
test_leave_msg_skip_ind,
test_notify_correct_incorrect_ind,
test_open_book_ind,
test_open_page_ind,
test_spelling_penalty,
test_easy_spelling_ind,
access_allright_ind,
access_farmerfrank_ind,
intro_video_shown, default_ind, nocustom_namespace, days_of_week, access_vocab_games_ind, quiz_notify_parent_ind, test_notify_parent_ind, lesson_threshold_notify_ind, lesson_notify_threshold, quiz_threshold_notify_ind, quiz_notify_threshold, test_threshold_notify_ind, test_notify_threshold)
SELECT [id] = @StudentSubjectId, student_id = @StudentId, completed_ind = @CompletedInd,
notepad = @Notepad, score = @Score, title = @Title, active_ind = @ActiveInd,
access_internet_ind, max_problem_attempts, tf_max_problem_attempts,
unlimited_problem_attempts, leave_msg_skip_ind, quiz_leave_msg_skip_ind, quiz_notify_correct_incorrect_ind,
quiz_open_page_ind, quiz_open_book_ind, easy_spelling_ind, quiz_access_answer_key_ind, access_answer_key_ind,
0, display_percent_ind, display_letter_ind, a_minimum,
b_minimum, c_minimum, d_minimum, lesson_weight, quiz_weight, test_weight,
project_weight, spelling_penalty, icon = @Icon,
quiz_easy_spelling_ind,
quiz_spelling_penalty, problem_attempts_penalty,
test_access_answer_key_ind,
test_leave_msg_skip_ind,
test_notify_correct_incorrect_ind,
test_open_book_ind,
test_open_page_ind,
test_spelling_penalty,
test_easy_spelling_ind,
access_allright_ind,
access_farmerfrank_ind,
intro_video_shown = 0,
default_ind = @DefaultInd, nocustom_namespace = @Namespace, days_of_week = @DaysOfWeek,
access_vocab_games_ind, quiz_notify_parent_ind, test_notify_parent_ind, lesson_threshold_notify_ind, lesson_notify_threshold, quiz_threshold_notify_ind, quiz_notify_threshold, test_threshold_notify_ind, test_notify_threshold
FROM student_settings
WHERE student_id = @StudentId
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[AssignSubject]'
GO
IF OBJECT_ID('AssignSubject') IS NOT NULL
BEGIN
PRINT N'-Dropping proc AssignSubject'
DROP PROC AssignSubject
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc AssignSubject'
GO
CREATE Procedure AssignSubject
/* Param List */
@SubjectId as INT,
@StudentId as UNIQUEIDENTIFIER,
@TermId as INT,
@NewSubjectId as UNIQUEIDENTIFIER OUTPUT
AS
/******************************************************************************
** File:
** Name: AssignSubject
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
**
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
DECLARE @Title varchar(100)
DECLARE @Icon varchar(50)
DECLARE @IntroVideoShown bit
DECLARE @DefaultInd bit
DECLARE @NoCustomNamespace varchar(100)
SELECT @Title = title, @Icon = icon, @DefaultInd = default_ind,
@NoCustomNamespace = nocustom_namespace
FROM subject
WHERE subject_id = @SubjectId
--Flip the bit to get the correct value to insert
IF @DefaultInd = 1
SET @IntroVideoShown = 0
ELSE
SET @IntroVideoShown = 1
SET @NewSubjectId = NEWID()
-- Populate student_subject table
INSERT INTO student_subject([id], student_id, completed_ind, title,
active_ind, intro_video_shown,
access_internet_ind, max_problem_attempts, tf_max_problem_attempts,
unlimited_problem_attempts, leave_msg_skip_ind,
quiz_leave_msg_skip_ind, quiz_notify_correct_incorrect_ind,
quiz_open_page_ind, quiz_open_book_ind, easy_spelling_ind,
quiz_access_answer_key_ind, access_answer_key_ind,
custom_settings_ind, display_percent_ind,
display_letter_ind, a_minimum,
b_minimum, c_minimum, d_minimum, lesson_weight,
quiz_weight, test_weight,
project_weight, spelling_penalty, default_ind, icon,
quiz_easy_spelling_ind,
quiz_spelling_penalty, problem_attempts_penalty,
test_access_answer_key_ind,
test_leave_msg_skip_ind,
test_notify_correct_incorrect_ind,
test_open_book_ind,
test_open_page_ind,
test_spelling_penalty,
test_easy_spelling_ind,
access_allright_ind,
access_farmerfrank_ind,
access_vocab_games_ind,
quiz_notify_parent_ind,
test_notify_parent_ind,
lesson_threshold_notify_ind,
lesson_notify_threshold,
quiz_threshold_notify_ind,
quiz_notify_threshold,
test_threshold_notify_ind,
test_notify_threshold,
nocustom_namespace)
SELECT [id] = @NewSubjectId, student_id = @StudentId, completed_ind = 0, title = @Title,
active_ind = 1, intro_video_shown = @IntroVideoShown,
access_internet_ind, max_problem_attempts, tf_max_problem_attempts,
unlimited_problem_attempts, leave_msg_skip_ind,
quiz_leave_msg_skip_ind, quiz_notify_correct_incorrect_ind,
quiz_open_page_ind, quiz_open_book_ind, easy_spelling_ind,
quiz_access_answer_key_ind, access_answer_key_ind,
custom_settings_ind = 0, display_percent_ind,
display_letter_ind, a_minimum,
b_minimum, c_minimum, d_minimum, lesson_weight,
quiz_weight, test_weight,
project_weight, spelling_penalty,
default_id = @DefaultInd, icon = @Icon,
quiz_easy_spelling_ind,
quiz_spelling_penalty, problem_attempts_penalty,
test_access_answer_key_ind,
test_leave_msg_skip_ind,
test_notify_correct_incorrect_ind,
test_open_book_ind,
test_open_page_ind,
test_spelling_penalty,
test_easy_spelling_ind,
access_allright_ind,
access_farmerfrank_ind,
access_vocab_games_ind,
quiz_notify_parent_ind,
test_notify_parent_ind,
lesson_threshold_notify_ind,
lesson_notify_threshold,
quiz_threshold_notify_ind,
quiz_notify_threshold,
test_threshold_notify_ind,
test_notify_threshold,
nocustom_namespace = @NoCustomNamespace
FROM student_settings
WHERE student_id = @StudentId
DECLARE @Sequence as INT
DECLARE @UnitId as INT
DECLARE @NewUnitId as UNIQUEIDENTIFIER
DECLARE @AssignmentId as UNIQUEIDENTIFIER
DECLARE @NewAssignmentId as UNIQUEIDENTIFIER
DECLARE @AssignmentSequence as INT
DECLARE @AssignmentTitle as VARCHAR(100)
DECLARE @UnitFolder as VARCHAR(100)
DECLARE @FileName as VARCHAR(100)
DECLARE @Namespace as VARCHAR(100)
DECLARE @Type as CHAR(10)
DECLARE @TimeToWork as INT
DECLARE @CDNumber as INT
-- Loop through units
DECLARE curUnits CURSOR READ_ONLY FOR
SELECT unit_id, sequence_nbr, title
FROM unit
WHERE subject_id = @SubjectId
OPEN curUnits
FETCH NEXT FROM curUnits INTO @UnitId, @Sequence, @Title
WHILE (@@fetch_status <> -1)
BEGIN
IF (@@fetch_status <> -2)
BEGIN
SET @NewUnitId = NEWID()
-- Populate student_unit table
INSERT INTO student_unit([id], sequence_nbr, completed_ind, title, student_subject_id, term_id)
VALUES(@NewUnitId, @Sequence, 0, @Title, @NewSubjectId, @TermId)
-- Loop through assignments
DECLARE curAssignments CURSOR READ_ONLY FOR
SELECT assign.assignment_id, assign.sequence_nbr, assign.title,
cunit.folder, cassign.[filename], cunit.curriculum_subject_namespace,
cassign.assignment_type, cassign.time_to_work, cunit.cd_number
FROM assignment assign
JOIN curriculum_assignment cassign ON assign.curriculum_assignment_id = cassign.assignment_id
JOIN curriculum_unit cunit ON cassign.curriculum_unit_id = cunit.unit_id
WHERE assign.unit_id = @UnitId
OPEN curAssignments
FETCH NEXT FROM curAssignments INTO @AssignmentId, @Sequence,
@AssignmentTitle, @UnitFolder, @FileName, @Namespace,
@Type, @TimeToWork, @CDNumber
WHILE (@@fetch_status <> -1)
BEGIN
IF (@@fetch_status <> -2)
BEGIN
SET @NewAssignmentId = NEWID()
--Populate student_assignment table
INSERT INTO student_assignment ([id], sequence_nbr, completed_ind,
blocked_ind, student_unit_id, title, folder, [filename],
namespace, assignment_type, time_to_work, cd_number)
VALUES(@NewAssignmentId, @Sequence, 0, 0, @NewUnitId, @AssignmentTitle,
@UnitFolder, @FileName, @Namespace, @Type, @TimeToWork, @CDNumber)
--Populate student_skipped_problem table
INSERT INTO student_skipped_problem
SELECT assignment_id = @NewAssignmentId, problem_id
FROM skipped_problem
WHERE assignment_id = @AssignmentId
END
FETCH NEXT FROM curAssignments INTO @AssignmentId, @Sequence,
@AssignmentTitle, @UnitFolder, @FileName, @Namespace,
@Type, @TimeToWork, @CDNumber
END
CLOSE curAssignments
DEALLOCATE curAssignments
-- Insert custom assignments
INSERT INTO student_assignment ([id], sequence_nbr, completed_ind,
blocked_ind, student_unit_id, title, folder, [filename],
namespace, assignment_type, time_to_work, cd_number, custom_xml)
SELECT newid() [id], a.sequence_nbr, 0 completed_ind, 0 blocked_ind,
@NewUnitId student_unit_id, a.title, '' folder, '' [filename],
'Custom' namespace, ac.assignment_type, ac.time_to_work, '1' cd_number, ac.custom_xml
FROM assignment a
JOIN assignment_custom ac ON ac.assignment_id = a.assignment_id
WHERE a.unit_id = @UnitId
END
FETCH NEXT FROM curUnits INTO @UnitId, @Sequence, @Title
END
CLOSE curUnits
DEALLOCATE curUnits
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetSettingsDefault]'
GO
IF OBJECT_ID('[dbo].[GetSettingsDefault]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetSettingsDefault]'
DROP PROC [dbo].[GetSettingsDefault]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetSettingsDefault]'
GO
CREATE Procedure [dbo].[GetSettingsDefault]
/* Param List */
AS
/******************************************************************************
** File:
** Name: GetSettingsDefault
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SELECT TOP 1
access_internet_ind,
max_problem_attempts,
tf_max_problem_attempts,
unlimited_problem_attempts,
leave_msg_skip_ind,
quiz_leave_msg_skip_ind,
quiz_notify_correct_incorrect_ind,
quiz_open_page_ind,
quiz_open_book_ind,
easy_spelling_ind,
quiz_access_answer_key_ind,
access_answer_key_ind,
quiz_easy_spelling_ind,
student_print_ind,
bible_translation,
access_lesson_calculator_ind,
access_lesson_dictionary_ind,
access_lesson_periodic_table_ind,
access_quiz_calculator_ind,
access_quiz_dictionary_ind,
access_quiz_periodic_table_ind,
access_test_calculator_ind,
access_test_dictionary_ind,
access_test_periodic_table_ind,
access_project_calculator_ind,
access_project_dictionary_ind,
access_project_periodic_table_ind,
access_homepage_calculator_ind,
access_homepage_dictionary_ind,
access_homepage_periodic_table_ind,
display_percent_ind,
display_letter_ind,
a_minimum,
b_minimum,
c_minimum,
d_minimum,
lesson_weight,
quiz_weight,
test_weight,
project_weight,
spelling_penalty,
quiz_spelling_penalty,
problem_attempts_penalty,
test_access_answer_key_ind,
test_leave_msg_skip_ind,
test_notify_correct_incorrect_ind,
test_open_book_ind,
test_open_page_ind,
test_spelling_penalty,
test_easy_spelling_ind,
access_allright_ind,
access_farmerfrank_ind,
access_vocab_games_ind,
quiz_notify_parent_ind,
test_notify_parent_ind,
access_lesson_bible_ind,
access_project_bible_ind,
access_quiz_bible_ind,
access_test_bible_ind,
access_lesson_journal_ind,
access_project_journal_ind,
access_quiz_journal_ind,
access_test_journal_ind,
lesson_threshold_notify_ind,
lesson_notify_threshold,
quiz_threshold_notify_ind,
quiz_notify_threshold,
test_threshold_notify_ind,
test_notify_threshold
FROM
default_settings
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetSettingsStudent]'
GO
IF OBJECT_ID('[dbo].[GetSettingsStudent]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetSettingsStudent]'
DROP PROC [dbo].[GetSettingsStudent]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetSettingsStudent]'
GO
CREATE Procedure [dbo].[GetSettingsStudent]
/* Param List */
@id uniqueidentifier
AS
/******************************************************************************
** File:
** Name: GetSettingsStudent
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
IF (SELECT COUNT(*)
FROM student_settings
WHERE student_id = @id) > 0
BEGIN
SELECT
access_internet_ind,
max_problem_attempts,
tf_max_problem_attempts,
unlimited_problem_attempts,
leave_msg_skip_ind,
quiz_leave_msg_skip_ind,
quiz_notify_correct_incorrect_ind,
quiz_open_page_ind,
quiz_open_book_ind,
easy_spelling_ind,
quiz_access_answer_key_ind,
access_answer_key_ind,
quiz_easy_spelling_ind,
student_print_ind,
bible_translation,
access_lesson_calculator_ind,
access_lesson_dictionary_ind,
access_lesson_periodic_table_ind,
access_quiz_calculator_ind,
access_quiz_dictionary_ind,
access_quiz_periodic_table_ind,
access_test_calculator_ind,
access_test_dictionary_ind,
access_test_periodic_table_ind,
access_project_calculator_ind,
access_project_dictionary_ind,
access_project_periodic_table_ind,
access_homepage_calculator_ind,
access_homepage_dictionary_ind,
access_homepage_periodic_table_ind,
display_percent_ind,
display_letter_ind,
a_minimum,
b_minimum,
c_minimum,
d_minimum,
lesson_weight,
quiz_weight,
test_weight,
project_weight,
spelling_penalty,
quiz_spelling_penalty,
problem_attempts_penalty,
test_access_answer_key_ind,
test_leave_msg_skip_ind,
test_notify_correct_incorrect_ind,
test_open_book_ind,
test_open_page_ind,
test_spelling_penalty,
test_easy_spelling_ind,
access_allright_ind,
access_farmerfrank_ind,
access_vocab_games_ind,
quiz_notify_parent_ind,
test_notify_parent_ind,
custom_settings_ind,
advanced_lesson_planning_ind,
active_ind,
current_term_id,
audiofeedback_disabled,
enable_search_ind,
access_lesson_bible_ind,
access_project_bible_ind,
access_quiz_bible_ind,
access_test_bible_ind,
access_lesson_journal_ind,
access_project_journal_ind,
access_quiz_journal_ind,
access_test_journal_ind,
lesson_threshold_notify_ind,
lesson_notify_threshold,
quiz_threshold_notify_ind,
quiz_notify_threshold,
test_threshold_notify_ind,
test_notify_threshold
FROM
student_settings
WHERE
student_id = @id
END
ELSE
BEGIN
SELECT
access_internet_ind,
max_problem_attempts,
tf_max_problem_attempts,
unlimited_problem_attempts,
leave_msg_skip_ind,
quiz_leave_msg_skip_ind,
quiz_notify_correct_incorrect_ind,
quiz_open_page_ind,
quiz_open_book_ind,
easy_spelling_ind,
quiz_access_answer_key_ind,
access_answer_key_ind,
quiz_easy_spelling_ind,
student_print_ind,
bible_translation,
access_lesson_calculator_ind,
access_lesson_dictionary_ind,
access_lesson_periodic_table_ind,
access_quiz_calculator_ind,
access_quiz_dictionary_ind,
access_quiz_periodic_table_ind,
access_test_calculator_ind,
access_test_dictionary_ind,
access_test_periodic_table_ind,
access_project_calculator_ind,
access_project_dictionary_ind,
access_project_periodic_table_ind,
access_homepage_calculator_ind,
access_homepage_dictionary_ind,
access_homepage_periodic_table_ind,
display_percent_ind,
display_letter_ind,
a_minimum,
b_minimum,
c_minimum,
d_minimum,
lesson_weight,
quiz_weight,
test_weight,
project_weight,
spelling_penalty,
quiz_spelling_penalty,
problem_attempts_penalty,
test_access_answer_key_ind,
test_leave_msg_skip_ind,
test_notify_correct_incorrect_ind,
test_open_book_ind,
test_open_page_ind,
test_spelling_penalty,
test_easy_spelling_ind,
access_allright_ind,
access_farmerfrank_ind,
access_vocab_games_ind,
quiz_notify_parent_ind,
test_notify_parent_ind,
custom_settings_ind = 0,
advanced_lesson_planning_ind = 0,
active_ind = 1,
current_term_id = (SELECT TOP 1 term_id FROM term),
audiofeedback_disabled = 0,
enable_search_ind = 0,
access_lesson_bible_ind,
access_project_bible_ind,
access_quiz_bible_ind,
access_test_bible_ind,
access_lesson_journal_ind,
access_project_journal_ind,
access_quiz_journal_ind,
access_test_journal_ind,
lesson_threshold_notify_ind,
lesson_notify_threshold,
quiz_threshold_notify_ind,
quiz_notify_threshold,
test_threshold_notify_ind,
test_notify_threshold
FROM
school_settings
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetSettingsStudentSubject]'
GO
IF OBJECT_ID('[dbo].[GetSettingsStudentSubject]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetSettingsStudentSubject]'
DROP PROC [dbo].[GetSettingsStudentSubject]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetSettingsStudentSubject]'
GO
CREATE Procedure [dbo].[GetSettingsStudentSubject]
/* Param List */
@id uniqueidentifier
AS
/******************************************************************************
** File:
** Name: GetSettingsStudentSubject
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SELECT
ss.access_internet_ind,
ss.max_problem_attempts,
ss.tf_max_problem_attempts,
ss.unlimited_problem_attempts,
ss.leave_msg_skip_ind,
ss.quiz_leave_msg_skip_ind,
ss.quiz_notify_correct_incorrect_ind,
ss.quiz_open_page_ind,
ss.quiz_open_book_ind,
ss.easy_spelling_ind,
ss.quiz_access_answer_key_ind,
ss.access_answer_key_ind,
ss.quiz_easy_spelling_ind,
s.student_print_ind,
s.bible_translation,
s.access_lesson_calculator_ind,
s.access_lesson_dictionary_ind,
s.access_lesson_periodic_table_ind,
s.access_quiz_calculator_ind,
s.access_quiz_dictionary_ind,
s.access_quiz_periodic_table_ind,
s.access_test_calculator_ind,
s.access_test_dictionary_ind,
s.access_test_periodic_table_ind,
s.access_project_calculator_ind,
s.access_project_dictionary_ind,
s.access_project_periodic_table_ind,
s.access_homepage_calculator_ind,
s.access_homepage_dictionary_ind,
s.access_homepage_periodic_table_ind,
ss.display_percent_ind,
ss.display_letter_ind,
ss.a_minimum,
ss.b_minimum,
ss.c_minimum,
ss.d_minimum,
ss.lesson_weight,
ss.quiz_weight,
ss.test_weight,
ss.project_weight,
ss.spelling_penalty,
ss.quiz_spelling_penalty,
ss.problem_attempts_penalty,
ss.test_access_answer_key_ind,
ss.test_leave_msg_skip_ind,
ss.test_notify_correct_incorrect_ind,
ss.test_open_book_ind,
ss.test_open_page_ind,
ss.test_spelling_penalty,
ss.test_easy_spelling_ind,
ss.access_allright_ind,
ss.access_farmerfrank_ind,
ss.access_vocab_games_ind,
ss.quiz_notify_parent_ind,
ss.test_notify_parent_ind,
ss.custom_settings_ind,
s.access_lesson_bible_ind,
s.access_project_bible_ind,
s.access_quiz_bible_ind,
s.access_test_bible_ind,
s.access_lesson_journal_ind,
s.access_project_journal_ind,
s.access_quiz_journal_ind,
s.access_test_journal_ind,
ss.lesson_threshold_notify_ind,
ss.lesson_notify_threshold,
ss.quiz_threshold_notify_ind,
ss.quiz_notify_threshold,
ss.test_threshold_notify_ind,
ss.test_notify_threshold
FROM
student_subject ss
JOIN
student_settings s ON s.student_id = ss.student_id
WHERE
ss.[id] = @id
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[ImportStudentSettings]'
GO
IF OBJECT_ID('ImportStudentSettings') IS NOT NULL
BEGIN
PRINT N'-Dropping proc ImportStudentSettings'
DROP PROC ImportStudentSettings
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc ImportStudentSettings'
GO
CREATE Procedure ImportStudentSettings
/* Param List */
@id uniqueidentifier,
@QuizAccessAnswerKeyInd bit,
@AccessAnswerKeyInd bit,
@EasySpellingInd bit,
@AccessHomepageCalculatorInd bit,
@AccessHomepageDictionaryInd bit,
@AccessHomepagePeriodicTableInd bit,
@AccessInternetInd bit,
@LeaveMsgSkipInd bit,
@QuizLeaveMsgSkipInd bit,
@AccessLessonCalculatorInd bit,
@AccessLessonDictionaryInd bit,
@AccessLessonPeriodicTableInd bit,
@QuizNotifyCorrectIncorrectInd bit,
@QuizOpenBookInd bit,
@QuizOpenPageInd bit,
@AccessProjectCalculatorInd bit,
@AccessProjectDictionaryInd bit,
@AccessProjectPeriodicTableInd bit,
@AccessQuizCalculatorInd bit,
@AccessQuizDictionaryInd bit,
@AccessQuizPeriodicTableInd bit,
@QuizEasySpellingInd bit,
@DisplayLetterInd bit,
@DisplayPercentInd bit,
@StudentPrintInd bit,
@AccessTestCalculatorInd bit,
@AccessTestDictionaryInd bit,
@AccessTestPeriodicTableInd bit,
@UnlimitedProblemAttempts bit,
@AMinimum int,
@BMinimum int,
@CMinimum int,
@DMinimum int,
@LessonWeight int,
@MaxProblemAttempts int,
@MaxTrueFalseProblemAttempts int,
@ProblemAttemptsPenalty int,
@ProjectWeight int,
@QuizSpellingPenalty int,
@QuizWeight int,
@SpellingPenalty int,
@TestWeight int,
@BibleTranslation char(4),
@TestAccessAnswerKeyInd bit,
@TestLeaveMsgSkipInd bit,
@TestNotifyCorrectIncorrectInd bit,
@TestOpenBookInd bit,
@TestOpenPageInd bit,
@TestSpellingPenalty int,
@TestEasySpellingInd bit,
@AccessAllRightInd bit,
@AccessFarmerFrankInd bit,
@ActiveInd bit,
@AdvancedLessonPlanningInd bit,
@AccessNewHomepageInd bit,
@AccessHomepageWebInd bit,
@AccessGoogleInd bit,
@CustomHomepageInd bit,
@CurrentTermId int,
@AccessVocabGamesInd bit,
@QuizNotifyParentInd bit,
@TestNotifyParentInd bit,
@AudioFeedbackDisabled bit,
@EnableSearchInd bit,
@AccessLessonBibleInd bit,
@AccessProjectBibleInd bit,
@AccessQuizBibleInd bit,
@AccessTestBibleInd bit,
@AccessLessonJournalInd bit,
@AccessProjectJournalInd bit,
@AccessQuizJournalInd bit,
@AccessTestJournalInd bit,
@LessonThresholdNotifyInd bit,
@LessonNotifyThreshold tinyint,
@QuizThresholdNotifyInd bit,
@QuizNotifyThreshold tinyint,
@TestThresholdNotifyInd bit,
@TestNotifyThreshold tinyint
AS
/******************************************************************************
** File:
** Name: ImportStudentSettings
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
/*Variables used to store default values
*/
DECLARE @QuizAccessAnswerKeyIndDefault bit
DECLARE @AccessAnswerKeyIndDefault bit
DECLARE @EasySpellingIndDefault bit
DECLARE @AccessHomepageCalculatorIndDefault bit
DECLARE @AccessHomepageDictionaryIndDefault bit
DECLARE @AccessHomepagePeriodicTableIndDefault bit
DECLARE @AccessInternetIndDefault bit
DECLARE @LeaveMsgSkipIndDefault bit
DECLARE @QuizLeaveMsgSkipIndDefault bit
DECLARE @AccessLessonCalculatorIndDefault bit
DECLARE @AccessLessonDictionaryIndDefault bit
DECLARE @AccessLessonPeriodicTableIndDefault bit
DECLARE @QuizNotifyCorrectIncorrectIndDefault bit
DECLARE @QuizOpenBookIndDefault bit
DECLARE @QuizOpenPageIndDefault bit
DECLARE @AccessProjectCalculatorIndDefault bit
DECLARE @AccessProjectDictionaryIndDefault bit
DECLARE @AccessProjectPeriodicTableIndDefault bit
DECLARE @AccessQuizCalculatorIndDefault bit
DECLARE @AccessQuizDictionaryIndDefault bit
DECLARE @AccessQuizPeriodicTableIndDefault bit
DECLARE @QuizEasySpellingIndDefault bit
DECLARE @DisplayLetterIndDefault bit
DECLARE @DisplayPercentIndDefault bit
DECLARE @StudentPrintIndDefault bit
DECLARE @AccessTestCalculatorIndDefault bit
DECLARE @AccessTestDictionaryIndDefault bit
DECLARE @AccessTestPeriodicTableIndDefault bit
DECLARE @UnlimitedProblemAttemptsDefault bit
DECLARE @AMinimumDefault int
DECLARE @BMinimumDefault int
DECLARE @CMinimumDefault int
DECLARE @DMinimumDefault int
DECLARE @LessonWeightDefault int
DECLARE @MaxProblemAttemptsDefault int
DECLARE @MaxTrueFalseProblemAttemptsDefault int
DECLARE @ProblemAttemptsPenaltyDefault int
DECLARE @ProjectWeightDefault int
DECLARE @QuizSpellingPenaltyDefault int
DECLARE @QuizWeightDefault int
DECLARE @SpellingPenaltyDefault int
DECLARE @TestWeightDefault int
DECLARE @BibleTranslationDefault char(4)
DECLARE @TestAccessAnswerKeyIndDefault bit
DECLARE @TestLeaveMsgSkipIndDefault bit
DECLARE @TestNotifyCorrectIncorrectIndDefault bit
DECLARE @TestOpenBookIndDefault bit
DECLARE @TestOpenPageIndDefault bit
DECLARE @TestSpellingPenaltyDefault int
DECLARE @TestEasySpellingIndDefault bit
DECLARE @AccessAllRightIndDefault bit
DECLARE @AccessFarmerFrankIndDefault bit
DECLARE @AccessNewHomepageIndDefault bit
DECLARE @AccessHomepageWebIndDefault bit
DECLARE @AccessVocabGamesIndDefault bit
DECLARE @QuizNotifyParentIndDefault bit
DECLARE @TestNotifyParentIndDefault bit
DECLARE @AccessLessonBibleIndDefault bit
DECLARE @AccessProjectBibleIndDefault bit
DECLARE @AccessQuizBibleIndDefault bit
DECLARE @AccessTestBibleIndDefault bit
DECLARE @AccessLessonJournalIndDefault bit
DECLARE @AccessProjectJournalIndDefault bit
DECLARE @AccessQuizJournalIndDefault bit
DECLARE @AccessTestJournalIndDefault bit
DECLARE @LessonThresholdNotifyIndDefault bit
DECLARE @LessonNotifyThresholdDefault tinyint
DECLARE @QuizThresholdNotifyIndDefault bit
DECLARE @QuizNotifyThresholdDefault tinyint
DECLARE @TestThresholdNotifyIndDefault bit
DECLARE @TestNotifyThresholdDefault tinyint
DECLARE @IsCustom bit
SET @IsCustom = 0
SELECT
@QuizAccessAnswerKeyIndDefault = quiz_access_answer_key_ind,
@AccessAnswerKeyIndDefault = access_answer_key_ind,
@EasySpellingIndDefault = easy_spelling_ind,
@AccessHomepageCalculatorIndDefault = access_homepage_calculator_ind,
@AccessHomepageDictionaryIndDefault = access_homepage_dictionary_ind,
@AccessHomepagePeriodicTableIndDefault = access_homepage_periodic_table_ind,
@AccessInternetIndDefault = access_internet_ind,
@LeaveMsgSkipIndDefault = leave_msg_skip_ind,
@QuizLeaveMsgSkipIndDefault = quiz_leave_msg_skip_ind,
@AccessLessonCalculatorIndDefault = access_lesson_calculator_ind,
@AccessLessonDictionaryIndDefault = access_lesson_dictionary_ind,
@AccessLessonPeriodicTableIndDefault = access_lesson_periodic_table_ind,
@QuizNotifyCorrectIncorrectIndDefault = quiz_notify_correct_incorrect_ind,
@QuizOpenBookIndDefault = quiz_open_book_ind,
@QuizOpenPageIndDefault = quiz_open_page_ind,
@AccessProjectCalculatorIndDefault = access_project_calculator_ind,
@AccessProjectDictionaryIndDefault = access_project_dictionary_ind,
@AccessProjectPeriodicTableIndDefault = access_project_periodic_table_ind,
@AccessQuizCalculatorIndDefault = access_quiz_calculator_ind,
@AccessQuizDictionaryIndDefault = access_quiz_dictionary_ind,
@AccessQuizPeriodicTableIndDefault = access_quiz_periodic_table_ind,
@QuizEasySpellingIndDefault = quiz_easy_spelling_ind,
@DisplayLetterIndDefault = display_letter_ind,
@DisplayPercentIndDefault = display_percent_ind,
@StudentPrintIndDefault = student_print_ind,
@AccessTestCalculatorIndDefault = access_test_calculator_ind,
@AccessTestDictionaryIndDefault = access_test_dictionary_ind,
@AccessTestPeriodicTableIndDefault = access_test_periodic_table_ind,
@UnlimitedProblemAttemptsDefault = unlimited_problem_attempts,
@AMinimumDefault = a_minimum,
@BMinimumDefault = b_minimum,
@CMinimumDefault = c_minimum,
@DMinimumDefault = d_minimum,
@LessonWeightDefault = lesson_weight,
@MaxProblemAttemptsDefault = max_problem_attempts,
@MaxTrueFalseProblemAttemptsDefault = tf_max_problem_attempts,
@ProblemAttemptsPenaltyDefault = problem_attempts_penalty,
@ProjectWeightDefault = project_weight,
@QuizSpellingPenaltyDefault = quiz_spelling_penalty,
@QuizWeightDefault = quiz_weight,
@SpellingPenaltyDefault = spelling_penalty,
@TestWeightDefault = test_weight,
@BibleTranslationDefault = bible_translation,
@TestAccessAnswerKeyIndDefault = test_access_answer_key_ind,
@TestLeaveMsgSkipIndDefault = test_leave_msg_skip_ind,
@TestNotifyCorrectIncorrectIndDefault = test_notify_correct_incorrect_ind,
@TestOpenBookIndDefault = test_open_book_ind,
@TestOpenPageIndDefault = test_open_page_ind,
@TestSpellingPenaltyDefault = test_spelling_penalty,
@TestEasySpellingIndDefault = test_easy_spelling_ind,
@AccessAllRightIndDefault = access_allright_ind,
@AccessFarmerFrankIndDefault = access_farmerfrank_ind,
@AccessVocabGamesIndDefault = access_vocab_games_ind,
@QuizNotifyParentIndDefault = quiz_notify_parent_ind,
@TestNotifyParentIndDefault = test_notify_parent_ind,
@AccessLessonBibleIndDefault = access_lesson_bible_ind,
@AccessProjectBibleIndDefault = access_project_bible_ind,
@AccessQuizBibleIndDefault = access_quiz_bible_ind,
@AccessTestBibleIndDefault = access_test_bible_ind,
@AccessLessonJournalIndDefault = access_lesson_journal_ind,
@AccessProjectJournalIndDefault = access_project_journal_ind,
@AccessQuizJournalIndDefault = access_quiz_journal_ind,
@AccessTestJournalIndDefault = access_test_journal_ind,
@LessonThresholdNotifyIndDefault = lesson_threshold_notify_ind,
@LessonNotifyThresholdDefault = lesson_notify_threshold,
@QuizThresholdNotifyIndDefault = quiz_threshold_notify_ind,
@QuizNotifyThresholdDefault = quiz_notify_threshold,
@TestThresholdNotifyIndDefault = test_threshold_notify_ind,
@TestNotifyThresholdDefault = test_notify_threshold
FROM school_settings
/*compare values to defaults to determine if the values are custom
*/
IF @QuizAccessAnswerKeyInd != @QuizAccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @AccessAnswerKeyInd != @AccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @EasySpellingInd != @EasySpellingIndDefault
SET @IsCustom = 1
IF @AccessHomepageCalculatorInd != @AccessHomepageCalculatorIndDefault
SET @IsCustom = 1
IF @AccessHomepageDictionaryInd != @AccessHomepageDictionaryIndDefault
SET @IsCustom = 1
IF @AccessHomepagePeriodicTableInd != @AccessHomepagePeriodicTableIndDefault
SET @IsCustom = 1
IF @AccessInternetInd != @AccessInternetIndDefault
SET @IsCustom = 1
IF @LeaveMsgSkipInd != @LeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @QuizLeaveMsgSkipInd != @QuizLeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @AccessLessonCalculatorInd != @AccessLessonCalculatorIndDefault
SET @IsCustom = 1
IF @AccessLessonDictionaryInd != @AccessLessonDictionaryIndDefault
SET @IsCustom = 1
IF @AccessLessonPeriodicTableInd != @AccessLessonPeriodicTableIndDefault
SET @IsCustom = 1
IF @QuizNotifyCorrectIncorrectInd != @QuizNotifyCorrectIncorrectIndDefault
SET @IsCustom = 1
IF @QuizOpenBookInd != @QuizOpenBookIndDefault
SET @IsCustom = 1
IF @QuizOpenPageInd != @QuizOpenPageIndDefault
SET @IsCustom = 1
IF @AccessProjectCalculatorInd != @AccessProjectCalculatorIndDefault
SET @IsCustom = 1
IF @AccessProjectDictionaryInd != @AccessProjectDictionaryIndDefault
SET @IsCustom = 1
IF @AccessProjectPeriodicTableInd != @AccessProjectPeriodicTableIndDefault
SET @IsCustom = 1
IF @AccessQuizCalculatorInd != @AccessQuizCalculatorIndDefault
SET @IsCustom = 1
IF @AccessQuizDictionaryInd != @AccessQuizDictionaryIndDefault
SET @IsCustom = 1
IF @AccessQuizPeriodicTableInd != @AccessQuizPeriodicTableIndDefault
SET @IsCustom = 1
IF @QuizEasySpellingInd != @QuizEasySpellingIndDefault
SET @IsCustom = 1
IF @DisplayLetterInd != @DisplayLetterIndDefault
SET @IsCustom = 1
IF @DisplayPercentInd != @DisplayPercentIndDefault
SET @IsCustom = 1
IF @StudentPrintInd != @StudentPrintIndDefault
SET @IsCustom = 1
IF @AccessTestCalculatorInd != @AccessTestCalculatorIndDefault
SET @IsCustom = 1
IF @AccessTestDictionaryInd != @AccessTestDictionaryIndDefault
SET @IsCustom = 1
IF @AccessTestPeriodicTableInd != @AccessTestPeriodicTableIndDefault
SET @IsCustom = 1
IF @UnlimitedProblemAttempts != @UnlimitedProblemAttemptsDefault
SET @IsCustom = 1
IF @AMinimum != @AMinimumDefault
SET @IsCustom = 1
IF @BMinimum != @BMinimumDefault
SET @IsCustom = 1
IF @CMinimum != @CMinimumDefault
SET @IsCustom = 1
IF @DMinimum != @DMinimumDefault
SET @IsCustom = 1
IF @LessonWeight != @LessonWeightDefault
SET @IsCustom = 1
IF @MaxProblemAttempts != @MaxProblemAttemptsDefault
SET @IsCustom = 1
IF @MaxTrueFalseProblemAttempts != @MaxTrueFalseProblemAttemptsDefault
SET @IsCustom = 1
IF @ProblemAttemptsPenalty != @ProblemAttemptsPenaltyDefault
SET @IsCustom = 1
IF @ProjectWeight != @ProjectWeightDefault
SET @IsCustom = 1
IF @QuizSpellingPenalty != @QuizSpellingPenaltyDefault
SET @IsCustom = 1
IF @QuizWeight != @QuizWeightDefault
SET @IsCustom = 1
IF @SpellingPenalty != @SpellingPenaltyDefault
SET @IsCustom = 1
IF @TestWeight != @TestWeightDefault
SET @IsCustom = 1
IF @BibleTranslation != @BibleTranslationDefault
SET @IsCustom = 1
IF @TestAccessAnswerKeyInd != @TestAccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @TestLeaveMsgSkipInd != @TestLeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @TestNotifyCorrectIncorrectInd != @TestNotifyCorrectIncorrectIndDefault
SET @IsCustom = 1
IF @TestOpenBookInd != @TestOpenBookIndDefault
SET @IsCustom = 1
IF @TestOpenPageInd != @TestOpenPageIndDefault
SET @IsCustom = 1
IF @TestSpellingPenalty != @TestSpellingPenaltyDefault
SET @IsCustom = 1
IF @TestEasySpellingInd != @TestEasySpellingIndDefault
SET @IsCustom = 1
IF @AccessAllRightInd != @AccessAllRightIndDefault
SET @IsCustom = 1
IF @AccessFarmerFrankInd != @AccessFarmerFrankIndDefault
SET @IsCustom = 1
IF @AccessVocabGamesInd != @AccessVocabGamesIndDefault
SET @IsCustom = 1
IF @QuizNotifyParentInd != @QuizNotifyParentIndDefault
SET @IsCustom = 1
IF @TestNotifyParentInd != @TestNotifyParentIndDefault
SET @IsCustom = 1
IF @AccessLessonBibleIndDefault != @AccessLessonBibleInd
SET @IsCustom = 1
IF @AccessProjectBibleIndDefault != @AccessProjectBibleInd
SET @IsCustom = 1
IF @AccessQuizBibleIndDefault != @AccessQuizBibleInd
SET @IsCustom = 1
IF @AccessTestBibleIndDefault != @AccessTestBibleInd
SET @IsCustom = 1
IF @AccessLessonJournalIndDefault != @AccessLessonJournalInd
SET @IsCustom = 1
IF @AccessProjectJournalIndDefault != @AccessProjectJournalInd
SET @IsCustom = 1
IF @AccessQuizJournalIndDefault != @AccessQuizJournalInd
SET @IsCustom = 1
IF @AccessTestJournalIndDefault != @AccessTestJournalInd
SET @IsCustom = 1
IF @LessonThresholdNotifyIndDefault != @LessonThresholdNotifyInd
SET @IsCustom = 1
IF @LessonNotifyThresholdDefault != @LessonNotifyThreshold
SET @IsCustom = 1
IF @QuizThresholdNotifyIndDefault != @QuizThresholdNotifyInd
SET @IsCustom = 1
IF @QuizNotifyThresholdDefault != @QuizNotifyThreshold
SET @IsCustom = 1
IF @TestThresholdNotifyIndDefault != @TestThresholdNotifyInd
SET @IsCustom = 1
IF @TestNotifyThresholdDefault != @TestNotifyThreshold
SET @IsCustom = 1
-- If student settings already exist for this student,
IF (SELECT COUNT(*)
FROM student_settings
WHERE student_id = @Id) > 0
BEGIN
/*insert new record */
UPDATE
student_settings
SET
quiz_access_answer_key_ind = @QuizAccessAnswerKeyInd,
access_answer_key_ind = @AccessAnswerKeyInd,
easy_spelling_ind = @EasySpellingInd,
access_homepage_calculator_ind = @AccessHomepageCalculatorInd,
access_homepage_dictionary_ind = @AccessHomepageDictionaryInd,
access_homepage_periodic_table_ind = @AccessHomepagePeriodicTableInd,
access_internet_ind = @AccessInternetInd,
leave_msg_skip_ind = @LeaveMsgSkipInd,
quiz_leave_msg_skip_ind = @QuizLeaveMsgSkipInd,
access_lesson_calculator_ind = @AccessLessonCalculatorInd,
access_lesson_dictionary_ind = @AccessLessonDictionaryInd,
access_lesson_periodic_table_ind = @AccessLessonPeriodicTableInd,
quiz_notify_correct_incorrect_ind = @QuizNotifyCorrectIncorrectInd,
quiz_open_book_ind = @QuizOpenBookInd,
quiz_open_page_ind = @QuizOpenPageInd,
access_project_calculator_ind = @AccessProjectCalculatorInd,
access_project_dictionary_ind = @AccessProjectDictionaryInd,
access_project_periodic_table_ind = @AccessProjectPeriodicTableInd,
access_quiz_calculator_ind = @AccessQuizCalculatorInd,
access_quiz_dictionary_ind = @AccessQuizDictionaryInd,
access_quiz_periodic_table_ind = @AccessQuizPeriodicTableInd,
quiz_easy_spelling_ind = @QuizEasySpellingInd,
display_letter_ind = @DisplayLetterInd,
display_percent_ind = @DisplayPercentInd,
student_print_ind = @StudentPrintInd,
access_test_calculator_ind = @AccessTestCalculatorInd,
access_test_dictionary_ind = @AccessTestDictionaryInd,
access_test_periodic_table_ind = @AccessTestPeriodicTableInd,
unlimited_problem_attempts = @UnlimitedProblemAttempts,
a_minimum = @AMinimum,
b_minimum = @BMinimum,
c_minimum = @CMinimum,
d_minimum = @DMinimum,
lesson_weight = @LessonWeight,
max_problem_attempts = @MaxProblemAttempts,
tf_max_problem_attempts = @MaxTrueFalseProblemAttempts,
problem_attempts_penalty = @ProblemAttemptsPenalty,
project_weight = @ProjectWeight,
quiz_spelling_penalty = @QuizSpellingPenalty,
quiz_weight = @QuizWeight,
spelling_penalty = @SpellingPenalty,
test_weight = @TestWeight,
bible_translation = @BibleTranslation,
test_access_answer_key_ind = @TestAccessAnswerKeyInd,
test_leave_msg_skip_ind = @TestLeaveMsgSkipInd,
test_notify_correct_incorrect_ind = @TestNotifyCorrectIncorrectInd,
test_open_book_ind = @TestOpenBookInd,
test_open_page_ind = @TestOpenPageInd,
test_spelling_penalty = @TestSpellingPenalty,
test_easy_spelling_ind = @TestEasySpellingInd,
access_allright_ind = @AccessAllRightInd,
access_farmerfrank_ind = @AccessFarmerFrankInd,
active_ind = @ActiveInd,
advanced_lesson_planning_ind = @AdvancedLessonPlanningInd,
current_term_id = @CurrentTermId,
access_new_homepage_ind = @AccessNewHomepageInd,
access_homepage_web_ind = @AccessHomepageWebInd,
access_google_ind = @AccessGoogleInd,
custom_homepage_ind = @CustomHomepageInd,
custom_settings_ind = @IsCustom,
access_vocab_games_ind = @AccessVocabGamesInd,
quiz_notify_parent_ind = @QuizNotifyParentInd,
test_notify_parent_ind = @TestNotifyParentInd,
audiofeedback_disabled = @AudioFeedbackDisabled,
enable_search_ind = @EnableSearchInd,
access_lesson_bible_ind = @AccessLessonBibleInd,
access_project_bible_ind = @AccessProjectBibleInd,
access_quiz_bible_ind = @AccessQuizBibleInd,
access_test_bible_ind = @AccessTestBibleInd,
access_lesson_journal_ind = @AccessLessonJournalInd,
access_project_journal_ind = @AccessProjectJournalInd,
access_quiz_journal_ind = @AccessQuizJournalInd,
access_test_journal_ind = @AccessTestJournalInd,
lesson_threshold_notify_ind = @LessonThresholdNotifyInd,
lesson_notify_threshold = @LessonNotifyThreshold,
quiz_threshold_notify_ind = @QuizThresholdNotifyInd,
quiz_notify_threshold = @QuizNotifyThreshold,
test_threshold_notify_ind = @TestThresholdNotifyInd,
test_notify_threshold = @TestNotifyThreshold
WHERE student_id = @id
END
ELSE
BEGIN
--Otherwise add new student settings
INSERT INTO student_settings(student_id, quiz_access_answer_key_ind, access_answer_key_ind, easy_spelling_ind,
access_homepage_calculator_ind, access_homepage_dictionary_ind,
access_homepage_periodic_table_ind, access_internet_ind, leave_msg_skip_ind, quiz_leave_msg_skip_ind,
access_lesson_calculator_ind, access_lesson_dictionary_ind,
access_lesson_periodic_table_ind, quiz_notify_correct_incorrect_ind,
quiz_open_book_ind, quiz_open_page_ind,
access_project_calculator_ind, access_project_dictionary_ind,
access_project_periodic_table_ind, access_quiz_calculator_ind,
access_quiz_dictionary_ind, access_quiz_periodic_table_ind,
quiz_easy_spelling_ind, display_letter_ind, display_percent_ind,
student_print_ind, access_test_calculator_ind, access_test_dictionary_ind,
access_test_periodic_table_ind, unlimited_problem_attempts,
a_minimum, b_minimum, c_minimum, d_minimum, lesson_weight, max_problem_attempts, tf_max_problem_attempts,
problem_attempts_penalty, project_weight, quiz_spelling_penalty,
quiz_weight, spelling_penalty, test_weight, bible_translation, active_ind,
advanced_lesson_planning_ind, current_term_id,
test_access_answer_key_ind, test_leave_msg_skip_ind,
test_notify_correct_incorrect_ind, test_open_book_ind,
test_open_page_ind, test_spelling_penalty,
test_easy_spelling_ind, access_allright_ind,
access_farmerfrank_ind, access_new_homepage_ind,
access_homepage_web_ind, access_google_ind, custom_homepage_ind, custom_settings_ind, access_vocab_games_ind, quiz_notify_parent_ind, test_notify_parent_ind, audiofeedback_disabled,
enable_search_ind , access_lesson_bible_ind, access_project_bible_ind , access_quiz_bible_ind, access_test_bible_ind, access_lesson_journal_ind, access_project_journal_ind,
access_quiz_journal_ind, access_test_journal_ind, lesson_threshold_notify_ind, lesson_notify_threshold, quiz_threshold_notify_ind, quiz_notify_threshold, test_threshold_notify_ind, test_notify_threshold)
Values (@Id, @QuizAccessAnswerKeyInd, @AccessAnswerKeyInd, @EasySpellingInd, @AccessHomepageCalculatorInd,
@AccessHomepageDictionaryInd, @AccessHomepagePeriodicTableInd, @AccessInternetInd,
@LeaveMsgSkipInd, @QuizLeaveMsgSkipInd, @AccessLessonCalculatorInd, @AccessLessonDictionaryInd, @AccessLessonPeriodicTableInd,
@QuizNotifyCorrectIncorrectInd, @QuizOpenBookInd, @QuizOpenPageInd,
@AccessProjectCalculatorInd, @AccessProjectDictionaryInd, @AccessProjectPeriodicTableInd,
@AccessQuizCalculatorInd, @AccessQuizDictionaryInd, @AccessQuizPeriodicTableInd,
@QuizEasySpellingInd, @DisplayLetterInd, @DisplayPercentInd, @StudentPrintInd,
@AccessTestCalculatorInd, @AccessTestDictionaryInd, @AccessTestPeriodicTableInd,
@UnlimitedProblemAttempts, @AMinimum, @BMinimum, @CMinimum, @DMinimum, @LessonWeight,
@MaxProblemAttempts, @MaxTrueFalseProblemAttempts, @ProblemAttemptsPenalty, @ProjectWeight, @QuizSpellingPenalty,
@QuizWeight, @SpellingPenalty, @TestWeight, @BibleTranslation,
@ActiveInd, @AdvancedLessonPlanningInd, @CurrentTermId,
@TestAccessAnswerKeyInd, @TestLeaveMsgSkipInd,
@TestNotifyCorrectIncorrectInd, @TestOpenBookInd,
@TestOpenPageInd, @TestSpellingPenalty,
@TestEasySpellingInd, @AccessAllRightInd,
@AccessFarmerFrankInd, @AccessNewHomepageInd, @AccessHomepageWebInd, @AccessGoogleInd, @CustomHomepageInd, @IsCustom, @AccessVocabGamesInd, @QuizNotifyParentInd,@TestNotifyParentInd, @AudioFeedbackDisabled,
@EnableSearchInd, @AccessLessonBibleInd, @AccessProjectBibleInd, @AccessQuizBibleInd, @AccessTestBibleInd, @AccessLessonJournalInd, @AccessProjectJournalInd, @AccessQuizJournalInd, @AccessTestJournalInd,
@LessonThresholdNotifyInd, @LessonNotifyThreshold, @QuizThresholdNotifyInd, @QuizNotifyThreshold, @TestThresholdNotifyInd, @TestNotifyThreshold)
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[ImportStudentSubjectSettings]'
GO
IF OBJECT_ID('ImportStudentSubjectSettings') IS NOT NULL
BEGIN
PRINT N'-Dropping proc ImportStudentSubjectSettings'
DROP PROC ImportStudentSubjectSettings
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc ImportStudentSubjectSettings'
GO
CREATE Procedure ImportStudentSubjectSettings
/* Param List */
@StudentSubjectId as uniqueidentifier,
@DisplayPercentInd as bit,
@DisplayLetterInd as bit,
@AMinimum as tinyint,
@BMinimum as tinyint,
@CMinimum as tinyint,
@DMinimum as tinyint,
@LessonWeight as tinyint,
@QuizWeight as tinyint,
@TestWeight as tinyint,
@ProjectWeight as tinyint,
@SpellingPenalty as tinyint,
@QuizSpellingPenalty as tinyint,
@ProblemAttemptsPenalty as tinyint,
@AccessInternetInd as bit,
@MaxProblemAttempts as tinyint,
@MaxTrueFalseProblemAttempts as tinyint,
@UnlimitedProblemAttempts as bit,
@LeaveMsgSkipInd as bit,
@QuizLeaveMsgSkipInd as bit,
@QuizNotifyCorrectIncorrectInd as bit,
@QuizOpenPageInd as bit,
@QuizOpenBookInd as bit,
@EasySpellingInd as bit,
@QuizAccessAnswerKeyInd as bit,
@AccessAnswerKeyInd as bit,
@QuizEasySpellingInd as bit,
@TestAccessAnswerKeyInd bit,
@TestLeaveMsgSkipInd bit,
@TestNotifyCorrectIncorrectInd bit,
@TestOpenBookInd bit,
@TestOpenPageInd bit,
@TestSpellingPenalty int,
@TestEasySpellingInd bit,
@AccessAllRightInd bit,
@AccessFarmerFrankInd bit,
@AccessVocabGamesInd bit,
@QuizNotifyParentInd bit,
@TestNotifyParentInd bit,
@AccessLessonBibleInd bit,
@AccessProjectBibleInd bit,
@AccessQuizBibleInd bit,
@AccessTestBibleInd bit,
@AccessLessonJournalInd bit,
@AccessProjectJournalInd bit,
@AccessQuizJournalInd bit,
@AccessTestJournalInd bit,
@LessonThresholdNotifyInd bit,
@LessonNotifyThreshold tinyint,
@QuizThresholdNotifyInd bit,
@QuizNotifyThreshold tinyint,
@TestThresholdNotifyInd bit,
@TestNotifyThreshold tinyint
AS
/******************************************************************************
** File:
** Name: ImportStudentSubjectSettings
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
/*Variables used to store School values
*/
DECLARE @DisplayPercentIndSchool bit
DECLARE @DisplayLetterIndSchool bit
DECLARE @AMinimumSchool tinyint
DECLARE @BMinimumSchool tinyint
DECLARE @CMinimumSchool tinyint
DECLARE @DMinimumSchool tinyint
DECLARE @LessonWeightSchool tinyint
DECLARE @QuizWeightSchool tinyint
DECLARE @TestWeightSchool tinyint
DECLARE @ProjectWeightSchool tinyint
DECLARE @SpellingPenaltySchool tinyint
DECLARE @IsCustom bit
DECLARE @QuizSpellingPenaltySchool tinyint
DECLARE @ProblemAttemptsPenaltySchool tinyint
DECLARE @AccessInternetIndSchool bit
DECLARE @MaxProblemAttemptsSchool tinyint
DECLARE @MaxTrueFalseProblemAttemptsSchool tinyint
DECLARE @UnlimitedProblemAttemptsSchool bit
DECLARE @LeaveMsgSkipIndSchool bit
DECLARE @QuizLeaveMsgSkipIndSchool bit
DECLARE @QuizNotifyCorrectIncorrectIndSchool bit
DECLARE @QuizOpenPageIndSchool bit
DECLARE @QuizOpenBookIndSchool bit
DECLARE @EasySpellingIndSchool bit
DECLARE @QuizAccessAnswerKeyIndSchool bit
DECLARE @AccessAnswerKeyIndSchool bit
DECLARE @QuizEasySpellingIndSchool bit
DECLARE @TestAccessAnswerKeyIndSchool bit
DECLARE @TestLeaveMsgSkipIndSchool bit
DECLARE @TestNotifyCorrectIncorrectIndSchool bit
DECLARE @TestOpenBookIndSchool bit
DECLARE @TestOpenPageIndSchool bit
DECLARE @TestSpellingPenaltySchool int
DECLARE @TestEasySpellingIndSchool bit
DECLARE @AccessAllRightIndSchool bit
DECLARE @AccessFarmerFrankIndSchool bit
DECLARE @AccessVocabGamesIndSchool bit
DECLARE @QuizNotifyParentIndSchool bit
DECLARE @TestNotifyParentIndSchool bit
DECLARE @AccessLessonBibleIndSchool bit
DECLARE @AccessProjectBibleIndSchool bit
DECLARE @AccessQuizBibleIndSchool bit
DECLARE @AccessTestBibleIndSchool bit
DECLARE @AccessLessonJournalIndSchool bit
DECLARE @AccessProjectJournalIndSchool bit
DECLARE @AccessQuizJournalIndSchool bit
DECLARE @AccessTestJournalIndSchool bit
DECLARE @LessonThresholdNotifyIndSchool bit
DECLARE @LessonNotifyThresholdSchool tinyint
DECLARE @QuizThresholdNotifyIndSchool bit
DECLARE @QuizNotifyThresholdSchool tinyint
DECLARE @TestThresholdNotifyIndSchool bit
DECLARE @TestNotifyThresholdSchool tinyint
SET @IsCustom = 0
/*Retrieve school values
*/
SELECT @DisplayPercentIndSchool = display_percent_ind,
@DisplayLetterIndSchool = display_letter_ind,
@AMinimumSchool = a_minimum,
@BMinimumSchool = b_minimum,
@CMinimumSchool = c_minimum,
@DMinimumSchool = d_minimum,
@LessonWeightSchool = lesson_weight,
@QuizWeightSchool = quiz_weight,
@TestWeightSchool = test_weight,
@ProjectWeightSchool = project_weight,
@SpellingPenaltySchool = spelling_penalty,
@QuizSpellingPenaltySchool = quiz_spelling_penalty,
@ProblemAttemptsPenaltySchool = problem_attempts_penalty,
@AccessInternetIndSchool = access_internet_ind,
@MaxProblemAttemptsSchool = max_problem_attempts,
@MaxTrueFalseProblemAttemptsSchool = tf_max_problem_attempts,
@UnlimitedProblemAttemptsSchool = unlimited_problem_attempts,
@LeaveMsgSkipIndSchool = leave_msg_skip_ind,
@QuizLeaveMsgSkipIndSchool = quiz_leave_msg_skip_ind,
@QuizNotifyCorrectIncorrectIndSchool = quiz_notify_correct_incorrect_ind,
@QuizOpenPageIndSchool = quiz_open_page_ind,
@QuizOpenBookIndSchool = quiz_open_book_ind,
@EasySpellingIndSchool = easy_spelling_ind,
@QuizAccessAnswerKeyIndSchool = quiz_access_answer_key_ind,
@AccessAnswerKeyIndSchool = access_answer_key_ind,
@QuizEasySpellingIndSchool = quiz_easy_spelling_ind,
@TestAccessAnswerKeyIndSchool = test_access_answer_key_ind,
@TestLeaveMsgSkipIndSchool = test_leave_msg_skip_ind,
@TestNotifyCorrectIncorrectIndSchool = test_notify_correct_incorrect_ind,
@TestOpenBookIndSchool = test_open_book_ind,
@TestOpenPageIndSchool = test_open_page_ind,
@TestSpellingPenaltySchool = test_spelling_penalty,
@TestEasySpellingIndSchool = test_easy_spelling_ind,
@AccessAllRightIndSchool = access_allright_ind,
@AccessFarmerFrankIndSchool = access_farmerfrank_ind,
@AccessVocabGamesIndSchool = access_vocab_games_ind,
@QuizNotifyParentIndSchool = quiz_notify_parent_ind,
@TestNotifyParentIndSchool = test_notify_parent_ind,
@AccessLessonBibleIndSchool = access_lesson_bible_ind,
@AccessProjectBibleIndSchool= access_project_bible_ind,
@AccessQuizBibleIndSchool = access_quiz_bible_ind,
@AccessTestBibleIndSchool = access_test_bible_ind,
@AccessLessonJournalIndSchool = access_lesson_journal_ind,
@AccessProjectJournalIndSchool = access_project_journal_ind,
@AccessQuizJournalIndSchool = access_quiz_journal_ind,
@AccessTestJournalIndSchool = access_test_journal_ind,
@LessonThresholdNotifyIndSchool = lesson_threshold_notify_ind,
@LessonNotifyThresholdSchool = lesson_notify_threshold,
@QuizThresholdNotifyIndSchool = quiz_threshold_notify_ind,
@QuizNotifyThresholdSchool = quiz_notify_threshold,
@TestThresholdNotifyIndSchool = test_threshold_notify_ind,
@TestNotifyThresholdSchool = test_notify_threshold
FROM school_settings
/*compare values to School's to determine if the values are custom
*/
IF @DisplayPercentInd != @DisplayPercentIndSchool
SET @IsCustom = 1
IF @DisplayLetterInd != @DisplayLetterIndSchool
SET @IsCustom = 1
IF @AMinimum != @AMinimumSchool
SET @IsCustom = 1
IF @BMinimum != @BMinimumSchool
SET @IsCustom = 1
IF @CMinimum != @CMinimumSchool
SET @IsCustom = 1
IF @DMinimum != @DMinimumSchool
SET @IsCustom = 1
IF @LessonWeight != @LessonWeightSchool
SET @IsCustom = 1
IF @QuizWeight != @QuizWeightSchool
SET @IsCustom = 1
IF @TestWeight != @TestWeightSchool
SET @IsCustom = 1
IF @ProjectWeight != @ProjectWeightSchool
SET @IsCustom = 1
IF @SpellingPenalty != @SpellingPenaltySchool
SET @IsCustom = 1
IF @QuizSpellingPenalty != @QuizSpellingPenaltySchool
SET @IsCustom = 1
IF @ProblemAttemptsPenalty != @ProblemAttemptsPenaltySchool
SET @IsCustom = 1
IF @AccessInternetInd != @AccessInternetIndSchool
SET @IsCustom = 1
IF @MaxProblemAttempts != @MaxProblemAttemptsSchool
SET @IsCustom = 1
IF @MaxTrueFalseProblemAttempts != @MaxTrueFalseProblemAttemptsSchool
SET @IsCustom = 1
IF @UnlimitedProblemAttempts != @UnlimitedProblemAttemptsSchool
SET @IsCustom = 1
IF @LeaveMsgSkipInd != @LeaveMsgSkipIndSchool
SET @IsCustom = 1
IF @QuizLeaveMsgSkipInd != @QuizLeaveMsgSkipIndSchool
SET @IsCustom = 1
IF @QuizNotifyCorrectIncorrectInd != @QuizNotifyCorrectIncorrectIndSchool
SET @IsCustom = 1
IF @QuizOpenPageInd != @QuizOpenPageIndSchool
SET @IsCustom = 1
IF @QuizOpenBookInd != @QuizOpenBookIndSchool
SET @IsCustom = 1
IF @EasySpellingInd != @EasySpellingIndSchool
SET @IsCustom = 1
IF @QuizAccessAnswerKeyInd != @QuizAccessAnswerKeyIndSchool
SET @IsCustom = 1
IF @AccessAnswerKeyInd != @AccessAnswerKeyIndSchool
SET @IsCustom = 1
IF @QuizEasySpellingInd != @QuizEasySpellingIndSchool
SET @IsCustom = 1
IF @TestAccessAnswerKeyInd != @TestAccessAnswerKeyIndSchool
SET @IsCustom = 1
IF @TestLeaveMsgSkipInd != @TestLeaveMsgSkipIndSchool
SET @IsCustom = 1
IF @TestNotifyCorrectIncorrectInd != @TestNotifyCorrectIncorrectIndSchool
SET @IsCustom = 1
IF @TestOpenBookInd != @TestOpenBookIndSchool
SET @IsCustom = 1
IF @TestOpenPageInd != @TestOpenPageIndSchool
SET @IsCustom = 1
IF @TestSpellingPenalty != @TestSpellingPenaltySchool
SET @IsCustom = 1
IF @TestEasySpellingInd != @TestEasySpellingIndSchool
SET @IsCustom = 1
IF @AccessAllRightInd != @AccessAllRightIndSchool
SET @IsCustom = 1
IF @AccessFarmerFrankInd != @AccessFarmerFrankIndSchool
SET @IsCustom = 1
IF @AccessVocabGamesInd != @AccessVocabGamesIndSchool
SET @IsCustom = 1
IF @QuizNotifyParentInd != @QuizNotifyParentIndSchool
SET @IsCustom = 1
IF @TestNotifyParentInd != @TestNotifyParentIndSchool
SET @IsCustom = 1
IF @AccessLessonBibleIndSchool != @AccessLessonBibleInd
SET @IsCustom = 1
IF @AccessProjectBibleIndSchool != @AccessProjectBibleInd
SET @IsCustom = 1
IF @AccessQuizBibleIndSchool != @AccessQuizBibleInd
SET @IsCustom = 1
IF @AccessTestBibleIndSchool != @AccessTestBibleInd
SET @IsCustom = 1
IF @AccessLessonJournalIndSchool != @AccessLessonJournalInd
SET @IsCustom = 1
IF @AccessProjectJournalIndSchool != @AccessProjectJournalInd
SET @IsCustom = 1
IF @AccessQuizJournalIndSchool != @AccessQuizJournalInd
SET @IsCustom = 1
IF @AccessTestJournalIndSchool != @AccessTestJournalInd
SET @IsCustom = 1
IF @LessonThresholdNotifyInd != @LessonThresholdNotifyIndSchool
SET @IsCustom = 1
IF @LessonNotifyThreshold != @LessonNotifyThresholdSchool
SET @IsCustom = 1
IF @QuizThresholdNotifyInd != @QuizThresholdNotifyIndSchool
SET @IsCustom = 1
IF @QuizNotifyThreshold = @QuizNotifyThresholdSchool
SET @IsCustom = 1
IF @TestThresholdNotifyInd != @TestThresholdNotifyIndSchool
SET @IsCustom = 1
IF @TestNotifyThreshold != @TestNotifyThresholdSchool
SET @IsCustom = 1
UPDATE student_subject
SET display_percent_ind = @DisplayPercentInd, display_letter_ind = @DisplayLetterInd,
a_minimum = @AMinimum, b_minimum = @BMinimum, c_minimum = @CMinimum,
d_minimum = @DMinimum, lesson_weight = @LessonWeight, quiz_weight = @QuizWeight,
test_weight = @TestWeight, project_weight = @ProjectWeight, spelling_penalty = @SpellingPenalty,
custom_settings_ind = @IsCustom,
quiz_spelling_penalty = @QuizSpellingPenalty, problem_attempts_penalty = @ProblemAttemptsPenalty,
access_internet_ind = @AccessInternetInd,
max_problem_attempts = @MaxProblemAttempts,
tf_max_problem_attempts = @MaxTrueFalseProblemAttempts,
unlimited_problem_attempts = @UnlimitedProblemAttempts,
leave_msg_skip_ind = @LeaveMsgSkipInd, quiz_leave_msg_skip_ind = @QuizLeaveMsgSkipInd, quiz_notify_correct_incorrect_ind = @QuizNotifyCorrectIncorrectInd,
quiz_open_page_ind = @QuizOpenPageInd, quiz_open_book_ind = @QuizOpenBookInd, easy_spelling_ind = @EasySpellingInd,
quiz_access_answer_key_ind = @QuizAccessAnswerKeyInd, access_answer_key_ind = @AccessAnswerKeyInd, quiz_easy_spelling_ind = @QuizEasySpellingInd,
test_access_answer_key_ind = @TestAccessAnswerKeyInd,
test_leave_msg_skip_ind = @TestLeaveMsgSkipInd,
test_notify_correct_incorrect_ind = @TestNotifyCorrectIncorrectInd,
test_open_book_ind = @TestOpenBookInd,
test_open_page_ind = @TestOpenPageInd,
test_spelling_penalty = @TestSpellingPenalty,
test_easy_spelling_ind = @TestEasySpellingInd,
access_allright_ind = @AccessAllRightInd,
access_farmerfrank_ind = @AccessFarmerFrankInd,
access_vocab_games_ind = @AccessVocabGamesInd,
quiz_notify_parent_ind = @QuizNotifyParentInd,
test_notify_parent_ind = @TestNotifyParentInd,
access_lesson_bible_ind = @AccessLessonBibleInd,
access_project_bible_ind = @AccessProjectBibleInd,
access_quiz_bible_ind = @AccessQuizBibleInd,
access_test_bible_ind = @AccessTestBibleInd,
access_lesson_journal_ind = @AccessLessonJournalInd,
access_project_journal_ind = @AccessProjectJournalInd,
access_quiz_journal_ind = @AccessQuizJournalInd,
access_test_journal_ind = @AccessTestJournalInd,
lesson_threshold_notify_ind = @LessonThresholdNotifyInd,
lesson_notify_threshold = @LessonNotifyThreshold,
quiz_threshold_notify_ind = @QuizThresholdNotifyInd,
quiz_notify_threshold = @QuizNotifyThreshold,
test_threshold_notify_ind = @TestThresholdNotifyInd,
test_notify_threshold = @TestNotifyThreshold
WHERE id = @StudentSubjectId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[SaveHomeSettingsStudent]'
GO
IF OBJECT_ID('[dbo].[SaveHomeSettingsStudent]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[SaveHomeSettingsStudent]'
DROP PROC [dbo].[SaveHomeSettingsStudent]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[SaveHomeSettingsStudent]'
GO
CREATE Procedure [dbo].[SaveHomeSettingsStudent]
/* Param List */
@id uniqueidentifier,
@QuizAccessAnswerKeyInd bit,
@AccessAnswerKeyInd bit,
@EasySpellingInd bit,
@AccessHomepageCalculatorInd bit,
@AccessHomepageDictionaryInd bit,
@AccessHomepagePeriodicTableInd bit,
@AccessInternetInd bit,
@LeaveMsgSkipInd bit,
@QuizLeaveMsgSkipInd bit,
@AccessLessonCalculatorInd bit,
@AccessLessonDictionaryInd bit,
@AccessLessonPeriodicTableInd bit,
@QuizNotifyCorrectIncorrectInd bit,
@QuizOpenBookInd bit,
@QuizOpenPageInd bit,
@AccessProjectCalculatorInd bit,
@AccessProjectDictionaryInd bit,
@AccessProjectPeriodicTableInd bit,
@AccessQuizCalculatorInd bit,
@AccessQuizDictionaryInd bit,
@AccessQuizPeriodicTableInd bit,
@QuizEasySpellingInd bit,
@DisplayLetterInd bit,
@DisplayPercentInd bit,
@StudentPrintInd bit,
@AccessTestCalculatorInd bit,
@AccessTestDictionaryInd bit,
@AccessTestPeriodicTableInd bit,
@UnlimitedProblemAttempts bit,
@AMinimum int,
@BMinimum int,
@CMinimum int,
@DMinimum int,
@LessonWeight int,
@MaxProblemAttempts int,
@MaxTrueFalseProblemAttempts int,
@ProblemAttemptsPenalty int,
@ProjectWeight int,
@QuizSpellingPenalty int,
@QuizWeight int,
@SpellingPenalty int,
@TestWeight int,
@BibleTranslation char(4),
@TestAccessAnswerKeyInd bit,
@TestLeaveMsgSkipInd bit,
@TestNotifyCorrectIncorrectInd bit,
@TestOpenBookInd bit,
@TestOpenPageInd bit,
@TestSpellingPenalty int,
@TestEasySpellingInd bit,
@AccessAllRightInd bit,
@AccessFarmerFrankInd bit,
@AccessVocabGamesInd bit,
@QuizNotifyParentInd bit,
@TestNotifyParentInd bit,
@EnableSearch bit,
@LessonBibleAccessInd bit,
@ProjectBibleAccessInd bit,
@QuizBibleAccessInd bit,
@TestBibleAccessInd bit,
@LessonJournalAccessInd bit,
@ProjectJournalAccessInd bit,
@QuizJournalAccessInd bit,
@TestJournalAccessInd bit,
@LessonThresholdNotifyInd bit,
@LessonNotifyThreshold tinyint,
@QuizThresholdNotifyInd bit,
@QuizNotifyThreshold tinyint,
@TestThresholdNotifyInd bit,
@TestNotifyThreshold tinyint
AS
/******************************************************************************
** File:
** Name: SaveHomeSettingsStudent
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
/*Variables used to store default values
*/
DECLARE @QuizAccessAnswerKeyIndDefault bit
DECLARE @AccessAnswerKeyIndDefault bit
DECLARE @EasySpellingIndDefault bit
DECLARE @AccessHomepageCalculatorIndDefault bit
DECLARE @AccessHomepageDictionaryIndDefault bit
DECLARE @AccessHomepagePeriodicTableIndDefault bit
DECLARE @AccessInternetIndDefault bit
DECLARE @LeaveMsgSkipIndDefault bit
DECLARE @QuizLeaveMsgSkipIndDefault bit
DECLARE @AccessLessonCalculatorIndDefault bit
DECLARE @AccessLessonDictionaryIndDefault bit
DECLARE @AccessLessonPeriodicTableIndDefault bit
DECLARE @QuizNotifyCorrectIncorrectIndDefault bit
DECLARE @QuizOpenBookIndDefault bit
DECLARE @QuizOpenPageIndDefault bit
DECLARE @AccessProjectCalculatorIndDefault bit
DECLARE @AccessProjectDictionaryIndDefault bit
DECLARE @AccessProjectPeriodicTableIndDefault bit
DECLARE @AccessQuizCalculatorIndDefault bit
DECLARE @AccessQuizDictionaryIndDefault bit
DECLARE @AccessQuizPeriodicTableIndDefault bit
DECLARE @QuizEasySpellingIndDefault bit
DECLARE @DisplayLetterIndDefault bit
DECLARE @DisplayPercentIndDefault bit
DECLARE @StudentPrintIndDefault bit
DECLARE @AccessTestCalculatorIndDefault bit
DECLARE @AccessTestDictionaryIndDefault bit
DECLARE @AccessTestPeriodicTableIndDefault bit
DECLARE @UnlimitedProblemAttemptsDefault bit
DECLARE @AMinimumDefault int
DECLARE @BMinimumDefault int
DECLARE @CMinimumDefault int
DECLARE @DMinimumDefault int
DECLARE @LessonWeightDefault int
DECLARE @MaxProblemAttemptsDefault int
DECLARE @MaxTrueFalseProblemAttemptsDefault int
DECLARE @ProblemAttemptsPenaltyDefault int
DECLARE @ProjectWeightDefault int
DECLARE @QuizSpellingPenaltyDefault int
DECLARE @QuizWeightDefault int
DECLARE @SpellingPenaltyDefault int
DECLARE @TestWeightDefault int
DECLARE @BibleTranslationDefault char(4)
DECLARE @TestAccessAnswerKeyIndDefault bit
DECLARE @TestLeaveMsgSkipIndDefault bit
DECLARE @TestNotifyCorrectIncorrectIndDefault bit
DECLARE @TestOpenBookIndDefault bit
DECLARE @TestOpenPageIndDefault bit
DECLARE @TestSpellingPenaltyDefault int
DECLARE @TestEasySpellingIndDefault bit
DECLARE @AccessAllRightIndDefault bit
DECLARE @AccessFarmerFrankIndDefault bit
DECLARE @AccessVocabGamesIndDefault bit
DECLARE @QuizNotifyParentIndDefault bit
DECLARE @TestNotifyParentIndDefault bit
DECLARE @LessonBibleAccessIndDefault bit
DECLARE @ProjectBibleAccessIndDefault bit
DECLARE @QuizBibleAccessIndDefault bit
DECLARE @TestBibleAccessIndDefault bit
DECLARE @LessonJournalAccessIndDefault bit
DECLARE @ProjectJournalAccessIndDefault bit
DECLARE @QuizJournalAccessIndDefault bit
DECLARE @TestJournalAccessIndDefault bit
DECLARE @LessonThresholdNotifyIndDefault bit
DECLARE @LessonNotifyThresholdDefault tinyint
DECLARE @QuizThresholdNotifyIndDefault bit
DECLARE @QuizNotifyThresholdDefault tinyint
DECLARE @TestThresholdNotifyIndDefault bit
DECLARE @TestNotifyThresholdDefault tinyint
DECLARE @IsCustom bit
SET @IsCustom = 0
SELECT
@QuizAccessAnswerKeyIndDefault = quiz_access_answer_key_ind,
@AccessAnswerKeyIndDefault = access_answer_key_ind,
@EasySpellingIndDefault = easy_spelling_ind,
@AccessHomepageCalculatorIndDefault = access_homepage_calculator_ind,
@AccessHomepageDictionaryIndDefault = access_homepage_dictionary_ind,
@AccessHomepagePeriodicTableIndDefault = access_homepage_periodic_table_ind,
@AccessInternetIndDefault = access_internet_ind,
@LeaveMsgSkipIndDefault = leave_msg_skip_ind,
@QuizLeaveMsgSkipIndDefault = quiz_leave_msg_skip_ind,
@AccessLessonCalculatorIndDefault = access_lesson_calculator_ind,
@AccessLessonDictionaryIndDefault = access_lesson_dictionary_ind,
@AccessLessonPeriodicTableIndDefault = access_lesson_periodic_table_ind,
@QuizNotifyCorrectIncorrectIndDefault = quiz_notify_correct_incorrect_ind,
@QuizOpenBookIndDefault = quiz_open_book_ind,
@QuizOpenPageIndDefault = quiz_open_page_ind,
@AccessProjectCalculatorIndDefault = access_project_calculator_ind,
@AccessProjectDictionaryIndDefault = access_project_dictionary_ind,
@AccessProjectPeriodicTableIndDefault = access_project_periodic_table_ind,
@AccessQuizCalculatorIndDefault = access_quiz_calculator_ind,
@AccessQuizDictionaryIndDefault = access_quiz_dictionary_ind,
@AccessQuizPeriodicTableIndDefault = access_quiz_periodic_table_ind,
@QuizEasySpellingIndDefault = quiz_easy_spelling_ind,
@DisplayLetterIndDefault = display_letter_ind,
@DisplayPercentIndDefault = display_percent_ind,
@StudentPrintIndDefault = student_print_ind,
@AccessTestCalculatorIndDefault = access_test_calculator_ind,
@AccessTestDictionaryIndDefault = access_test_dictionary_ind,
@AccessTestPeriodicTableIndDefault = access_test_periodic_table_ind,
@UnlimitedProblemAttemptsDefault = unlimited_problem_attempts,
@AMinimumDefault = a_minimum,
@BMinimumDefault = b_minimum,
@CMinimumDefault = c_minimum,
@DMinimumDefault = d_minimum,
@LessonWeightDefault = lesson_weight,
@MaxProblemAttemptsDefault = max_problem_attempts,
@MaxTrueFalseProblemAttemptsDefault = tf_max_problem_attempts,
@ProblemAttemptsPenaltyDefault = problem_attempts_penalty,
@ProjectWeightDefault = project_weight,
@QuizSpellingPenaltyDefault = quiz_spelling_penalty,
@QuizWeightDefault = quiz_weight,
@SpellingPenaltyDefault = spelling_penalty,
@TestWeightDefault = test_weight,
@BibleTranslationDefault = bible_translation,
@TestAccessAnswerKeyIndDefault = test_access_answer_key_ind,
@TestLeaveMsgSkipIndDefault = test_leave_msg_skip_ind,
@TestNotifyCorrectIncorrectIndDefault = test_notify_correct_incorrect_ind,
@TestOpenBookIndDefault = test_open_book_ind,
@TestOpenPageIndDefault = test_open_page_ind,
@TestSpellingPenaltyDefault = test_spelling_penalty,
@TestEasySpellingIndDefault = test_easy_spelling_ind,
@AccessAllRightIndDefault = access_allright_ind,
@AccessFarmerFrankIndDefault = access_farmerfrank_ind,
@AccessVocabGamesIndDefault = access_vocab_games_ind,
@QuizNotifyParentIndDefault = quiz_notify_parent_ind,
@TestNotifyParentIndDefault = test_notify_parent_ind,
@LessonBibleAccessIndDefault = access_lesson_bible_ind,
@ProjectBibleAccessIndDefault = access_project_bible_ind,
@QuizBibleAccessIndDefault = access_quiz_bible_ind,
@TestBibleAccessIndDefault = access_test_bible_ind,
@LessonJournalAccessIndDefault = access_lesson_Journal_ind,
@ProjectJournalAccessIndDefault = access_project_Journal_ind,
@QuizJournalAccessIndDefault = access_quiz_Journal_ind,
@TestJournalAccessIndDefault = access_test_Journal_ind,
@LessonThresholdNotifyIndDefault = lesson_threshold_notify_ind,
@LessonNotifyThresholdDefault = lesson_notify_threshold,
@QuizThresholdNotifyIndDefault = quiz_threshold_notify_ind,
@QuizNotifyThresholdDefault = quiz_notify_threshold,
@TestThresholdNotifyIndDefault = test_threshold_notify_ind,
@TestNotifyThresholdDefault = test_notify_threshold
FROM school_settings
/*compare values to defaults to determine if the values are custom
*/
IF @QuizAccessAnswerKeyInd != @QuizAccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @AccessAnswerKeyInd != @AccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @EasySpellingInd != @EasySpellingIndDefault
SET @IsCustom = 1
IF @AccessHomepageCalculatorInd != @AccessHomepageCalculatorIndDefault
SET @IsCustom = 1
IF @AccessHomepageDictionaryInd != @AccessHomepageDictionaryIndDefault
SET @IsCustom = 1
IF @AccessHomepagePeriodicTableInd != @AccessHomepagePeriodicTableIndDefault
SET @IsCustom = 1
IF @AccessInternetInd != @AccessInternetIndDefault
SET @IsCustom = 1
IF @LeaveMsgSkipInd != @LeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @QuizLeaveMsgSkipInd != @QuizLeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @AccessLessonCalculatorInd != @AccessLessonCalculatorIndDefault
SET @IsCustom = 1
IF @AccessLessonDictionaryInd != @AccessLessonDictionaryIndDefault
SET @IsCustom = 1
IF @AccessLessonPeriodicTableInd != @AccessLessonPeriodicTableIndDefault
SET @IsCustom = 1
IF @QuizNotifyCorrectIncorrectInd != @QuizNotifyCorrectIncorrectIndDefault
SET @IsCustom = 1
IF @QuizOpenBookInd != @QuizOpenBookIndDefault
SET @IsCustom = 1
IF @QuizOpenPageInd != @QuizOpenPageIndDefault
SET @IsCustom = 1
IF @AccessProjectCalculatorInd != @AccessProjectCalculatorIndDefault
SET @IsCustom = 1
IF @AccessProjectDictionaryInd != @AccessProjectDictionaryIndDefault
SET @IsCustom = 1
IF @AccessProjectPeriodicTableInd != @AccessProjectPeriodicTableIndDefault
SET @IsCustom = 1
IF @AccessQuizCalculatorInd != @AccessQuizCalculatorIndDefault
SET @IsCustom = 1
IF @AccessQuizDictionaryInd != @AccessQuizDictionaryIndDefault
SET @IsCustom = 1
IF @AccessQuizPeriodicTableInd != @AccessQuizPeriodicTableIndDefault
SET @IsCustom = 1
IF @QuizEasySpellingInd != @QuizEasySpellingIndDefault
SET @IsCustom = 1
IF @DisplayLetterInd != @DisplayLetterIndDefault
SET @IsCustom = 1
IF @DisplayPercentInd != @DisplayPercentIndDefault
SET @IsCustom = 1
IF @StudentPrintInd != @StudentPrintIndDefault
SET @IsCustom = 1
IF @AccessTestCalculatorInd != @AccessTestCalculatorIndDefault
SET @IsCustom = 1
IF @AccessTestDictionaryInd != @AccessTestDictionaryIndDefault
SET @IsCustom = 1
IF @AccessTestPeriodicTableInd != @AccessTestPeriodicTableIndDefault
SET @IsCustom = 1
IF @UnlimitedProblemAttempts != @UnlimitedProblemAttemptsDefault
SET @IsCustom = 1
IF @AMinimum != @AMinimumDefault
SET @IsCustom = 1
IF @BMinimum != @BMinimumDefault
SET @IsCustom = 1
IF @CMinimum != @CMinimumDefault
SET @IsCustom = 1
IF @DMinimum != @DMinimumDefault
SET @IsCustom = 1
IF @LessonWeight != @LessonWeightDefault
SET @IsCustom = 1
IF @MaxProblemAttempts != @MaxProblemAttemptsDefault
SET @IsCustom = 1
IF @MaxTrueFalseProblemAttempts != @MaxTrueFalseProblemAttemptsDefault
SET @IsCustom = 1
IF @ProblemAttemptsPenalty != @ProblemAttemptsPenaltyDefault
SET @IsCustom = 1
IF @ProjectWeight != @ProjectWeightDefault
SET @IsCustom = 1
IF @QuizSpellingPenalty != @QuizSpellingPenaltyDefault
SET @IsCustom = 1
IF @QuizWeight != @QuizWeightDefault
SET @IsCustom = 1
IF @SpellingPenalty != @SpellingPenaltyDefault
SET @IsCustom = 1
IF @TestWeight != @TestWeightDefault
SET @IsCustom = 1
IF @BibleTranslation != @BibleTranslationDefault
SET @IsCustom = 1
IF @TestAccessAnswerKeyInd != @TestAccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @TestLeaveMsgSkipInd != @TestLeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @TestNotifyCorrectIncorrectInd != @TestNotifyCorrectIncorrectIndDefault
SET @IsCustom = 1
IF @TestOpenBookInd != @TestOpenBookIndDefault
SET @IsCustom = 1
IF @TestOpenPageInd != @TestOpenPageIndDefault
SET @IsCustom = 1
IF @TestSpellingPenalty != @TestSpellingPenaltyDefault
SET @IsCustom = 1
IF @TestEasySpellingInd != @TestEasySpellingIndDefault
SET @IsCustom = 1
IF @AccessAllRightInd != @AccessAllRightIndDefault
SET @IsCustom = 1
IF @AccessFarmerFrankInd != @AccessFarmerFrankIndDefault
SET @IsCustom = 1
IF @AccessVocabGamesInd != @AccessVocabGamesIndDefault
SET @IsCustom = 1
IF @QuizNotifyParentInd != @QuizNotifyParentIndDefault
SET @IsCustom = 1
IF @TestNotifyParentInd != @TestNotifyParentIndDefault
SET @IsCustom = 1
IF @LessonBibleAccessIndDefault != @LessonBibleAccessInd
SET @IsCustom = 1
IF @ProjectBibleAccessIndDefault != @ProjectBibleAccessInd
SET @IsCustom = 1
IF @QuizBibleAccessIndDefault != @QuizBibleAccessInd
SET @IsCustom = 1
IF @TestBibleAccessIndDefault != @TestBibleAccessInd
SET @IsCustom = 1
IF @LessonJournalAccessIndDefault != @LessonJournalAccessInd
SET @IsCustom = 1
IF @ProjectJournalAccessIndDefault != @ProjectJournalAccessInd
SET @IsCustom = 1
IF @QuizJournalAccessIndDefault != @QuizJournalAccessInd
SET @IsCustom = 1
IF @TestJournalAccessIndDefault != @TestJournalAccessInd
SET @IsCustom = 1
IF @LessonThresholdNotifyIndDefault != @LessonThresholdNotifyInd
SET @IsCustom = 1
IF @LessonNotifyThresholdDefault != @LessonNotifyThreshold
SET @IsCustom = 1
IF @QuizThresholdNotifyIndDefault != @QuizThresholdNotifyInd
SET @IsCustom = 1
IF @QuizNotifyThresholdDefault != @QuizNotifyThreshold
SET @IsCustom = 1
IF @TestThresholdNotifyIndDefault != @TestThresholdNotifyInd
SET @IsCustom = 1
IF @TestNotifyThresholdDefault != @TestNotifyThreshold
SET @IsCustom = 1
/*insert new record */
UPDATE
student_settings
SET
quiz_access_answer_key_ind = @QuizAccessAnswerKeyInd,
access_answer_key_ind = @AccessAnswerKeyInd,
easy_spelling_ind = @EasySpellingInd,
access_homepage_calculator_ind = @AccessHomepageCalculatorInd,
access_homepage_dictionary_ind = @AccessHomepageDictionaryInd,
access_homepage_periodic_table_ind = @AccessHomepagePeriodicTableInd,
access_internet_ind = @AccessInternetInd,
leave_msg_skip_ind = @LeaveMsgSkipInd,
quiz_leave_msg_skip_ind = @QuizLeaveMsgSkipInd,
access_lesson_calculator_ind = @AccessLessonCalculatorInd,
access_lesson_dictionary_ind = @AccessLessonDictionaryInd,
access_lesson_periodic_table_ind = @AccessLessonPeriodicTableInd,
quiz_notify_correct_incorrect_ind = @QuizNotifyCorrectIncorrectInd,
quiz_open_book_ind = @QuizOpenBookInd,
quiz_open_page_ind = @QuizOpenPageInd,
access_project_calculator_ind = @AccessProjectCalculatorInd,
access_project_dictionary_ind = @AccessProjectDictionaryInd,
access_project_periodic_table_ind = @AccessProjectPeriodicTableInd,
access_quiz_calculator_ind = @AccessQuizCalculatorInd,
access_quiz_dictionary_ind = @AccessQuizDictionaryInd,
access_quiz_periodic_table_ind = @AccessQuizPeriodicTableInd,
quiz_easy_spelling_ind = @QuizEasySpellingInd,
display_letter_ind = @DisplayLetterInd,
display_percent_ind = @DisplayPercentInd,
student_print_ind = @StudentPrintInd,
access_test_calculator_ind = @AccessTestCalculatorInd,
access_test_dictionary_ind = @AccessTestDictionaryInd,
access_test_periodic_table_ind = @AccessTestPeriodicTableInd,
unlimited_problem_attempts = @UnlimitedProblemAttempts,
a_minimum = @AMinimum,
b_minimum = @BMinimum,
c_minimum = @CMinimum,
d_minimum = @DMinimum,
lesson_weight = @LessonWeight,
max_problem_attempts = @MaxProblemAttempts,
tf_max_problem_attempts = @MaxTrueFalseProblemAttempts,
problem_attempts_penalty = @ProblemAttemptsPenalty,
project_weight = @ProjectWeight,
quiz_spelling_penalty = @QuizSpellingPenalty,
quiz_weight = @QuizWeight,
spelling_penalty = @SpellingPenalty,
test_weight = @TestWeight,
bible_translation = @BibleTranslation,
test_access_answer_key_ind = @TestAccessAnswerKeyInd,
test_leave_msg_skip_ind = @TestLeaveMsgSkipInd,
test_notify_correct_incorrect_ind = @TestNotifyCorrectIncorrectInd,
test_open_book_ind = @TestOpenBookInd,
test_open_page_ind = @TestOpenPageInd,
test_spelling_penalty = @TestSpellingPenalty,
test_easy_spelling_ind = @TestEasySpellingInd,
access_allright_ind = @AccessAllRightInd,
access_farmerfrank_ind = @AccessFarmerFrankInd,
access_vocab_games_ind = @AccessVocabGamesInd,
quiz_notify_parent_ind = @QuizNotifyParentInd,
test_notify_parent_ind = @TestNotifyParentInd,
enable_search_ind = @EnableSearch,
access_lesson_bible_ind = @LessonBibleAccessInd,
access_project_bible_ind = @ProjectBibleAccessInd,
access_quiz_bible_ind = @QuizBibleAccessInd,
access_test_bible_ind = @TestBibleAccessInd,
access_lesson_Journal_ind = @LessonJournalAccessInd,
access_project_Journal_ind = @ProjectJournalAccessInd,
access_quiz_Journal_ind = @QuizJournalAccessInd,
access_test_Journal_ind = @TestJournalAccessInd,
lesson_threshold_notify_ind = @LessonThresholdNotifyInd,
lesson_notify_threshold = @LessonNotifyThreshold,
quiz_threshold_notify_ind = @QuizThresholdNotifyInd,
quiz_notify_threshold = @QuizNotifyThreshold,
test_threshold_notify_ind = @TestThresholdNotifyInd,
test_notify_threshold = @TestNotifyThreshold,
custom_settings_ind = @IsCustom
WHERE student_id = @id
--Select (to return) all students whose settings have not been customized
SELECT [id]
FROM student_subject
WHERE student_id = @id AND custom_settings_ind = 0
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[SaveSettingsSchool]'
GO
IF OBJECT_ID('[dbo].[SaveSettingsSchool]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[SaveSettingsSchool]'
DROP PROC [dbo].[SaveSettingsSchool]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[SaveSettingsSchool]'
GO
CREATE Procedure [dbo].[SaveSettingsSchool]
/* Param List */
@QuizAccessAnswerKeyInd bit,
@AccessAnswerKeyInd bit,
@EasySpellingInd bit,
@AccessHomepageCalculatorInd bit,
@AccessHomepageDictionaryInd bit,
@AccessHomepagePeriodicTableInd bit,
@AccessInternetInd bit,
@LeaveMsgSkipInd bit,
@QuizLeaveMsgSkipInd bit,
@AccessLessonCalculatorInd bit,
@AccessLessonDictionaryInd bit,
@AccessLessonPeriodicTableInd bit,
@QuizNotifyCorrectIncorrectInd bit,
@QuizOpenBookInd bit,
@QuizOpenPageInd bit,
@AccessProjectCalculatorInd bit,
@AccessProjectDictionaryInd bit,
@AccessProjectPeriodicTableInd bit,
@AccessQuizCalculatorInd bit,
@AccessQuizDictionaryInd bit,
@AccessQuizPeriodicTableInd bit,
@QuizEasySpellingInd bit,
@DisplayLetterInd bit,
@DisplayPercentInd bit,
@StudentPrintInd bit,
@AccessTestCalculatorInd bit,
@AccessTestDictionaryInd bit,
@AccessTestPeriodicTableInd bit,
@UnlimitedProblemAttempts bit,
@AMinimum int,
@BMinimum int,
@CMinimum int,
@DMinimum int,
@LessonWeight int,
@MaxProblemAttempts int,
@MaxTrueFalseProblemAttempts int,
@ProblemAttemptsPenalty int,
@ProjectWeight int,
@QuizSpellingPenalty int,
@QuizWeight int,
@SpellingPenalty int,
@TestWeight int,
@BibleTranslation char(4),
@TestAccessAnswerKeyInd bit,
@TestLeaveMsgSkipInd bit,
@TestNotifyCorrectIncorrectInd bit,
@TestOpenBookInd bit,
@TestOpenPageInd bit,
@TestSpellingPenalty int,
@TestEasySpellingInd bit,
@AccessAllRightInd bit,
@AccessFarmerFrankInd bit,
@AccessVocabGamesInd bit,
@QuizNotifyParentInd bit,
@TestNotifyParentInd bit,
@LessonBibleAccessInd bit,
@ProjectBibleAccessInd bit,
@QuizBibleAccessInd bit,
@TestBibleAccessInd bit,
@LessonJournalAccessInd bit,
@ProjectJournalAccessInd bit,
@QuizJournalAccessInd bit,
@TestJournalAccessInd bit,
@LessonThresholdNotifyInd bit,
@LessonNotifyThreshold tinyint,
@QuizThresholdNotifyInd bit,
@QuizNotifyThreshold tinyint,
@TestThresholdNotifyInd bit,
@TestNotifyThreshold tinyint
AS
/******************************************************************************
** File:
** Name: SaveSettingsSchool
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
/*Variables used to store default values
*/
DECLARE @QuizAccessAnswerKeyIndDefault bit
DECLARE @AccessAnswerKeyIndDefault bit
DECLARE @EasySpellingIndDefault bit
DECLARE @AccessHomepageCalculatorIndDefault bit
DECLARE @AccessHomepageDictionaryIndDefault bit
DECLARE @AccessHomepagePeriodicTableIndDefault bit
DECLARE @AccessInternetIndDefault bit
DECLARE @LeaveMsgSkipIndDefault bit
DECLARE @QuizLeaveMsgSkipIndDefault bit
DECLARE @AccessLessonCalculatorIndDefault bit
DECLARE @AccessLessonDictionaryIndDefault bit
DECLARE @AccessLessonPeriodicTableIndDefault bit
DECLARE @QuizNotifyCorrectIncorrectIndDefault bit
DECLARE @QuizOpenBookIndDefault bit
DECLARE @QuizOpenPageIndDefault bit
DECLARE @AccessProjectCalculatorIndDefault bit
DECLARE @AccessProjectDictionaryIndDefault bit
DECLARE @AccessProjectPeriodicTableIndDefault bit
DECLARE @AccessQuizCalculatorIndDefault bit
DECLARE @AccessQuizDictionaryIndDefault bit
DECLARE @AccessQuizPeriodicTableIndDefault bit
DECLARE @QuizEasySpellingIndDefault bit
DECLARE @DisplayLetterIndDefault bit
DECLARE @DisplayPercentIndDefault bit
DECLARE @StudentPrintIndDefault bit
DECLARE @AccessTestCalculatorIndDefault bit
DECLARE @AccessTestDictionaryIndDefault bit
DECLARE @AccessTestPeriodicTableIndDefault bit
DECLARE @UnlimitedProblemAttemptsDefault bit
DECLARE @AMinimumDefault int
DECLARE @BMinimumDefault int
DECLARE @CMinimumDefault int
DECLARE @DMinimumDefault int
DECLARE @LessonWeightDefault int
DECLARE @MaxProblemAttemptsDefault int
DECLARE @MaxTrueFalseProblemAttemptsDefault int
DECLARE @ProblemAttemptsPenaltyDefault int
DECLARE @ProjectWeightDefault int
DECLARE @QuizSpellingPenaltyDefault int
DECLARE @QuizWeightDefault int
DECLARE @SpellingPenaltyDefault int
DECLARE @TestWeightDefault int
DECLARE @BibleTranslationDefault char(4)
DECLARE @TestAccessAnswerKeyIndDefault bit
DECLARE @TestLeaveMsgSkipIndDefault bit
DECLARE @TestNotifyCorrectIncorrectIndDefault bit
DECLARE @TestOpenBookIndDefault bit
DECLARE @TestOpenPageIndDefault bit
DECLARE @TestSpellingPenaltyDefault int
DECLARE @TestEasySpellingIndDefault bit
DECLARE @AccessAllRightIndDefault bit
DECLARE @AccessFarmerFrankIndDefault bit
DECLARE @AccessVocabGamesIndDefault bit
DECLARE @QuizNotifyParentIndDefault bit
DECLARE @TestNotifyParentIndDefault bit
DECLARE @LessonBibleAccessIndDefault bit
DECLARE @ProjectBibleAccessIndDefault bit
DECLARE @QuizBibleAccessIndDefault bit
DECLARE @TestBibleAccessIndDefault bit
DECLARE @LessonJournalAccessIndDefault bit
DECLARE @ProjectJournalAccessIndDefault bit
DECLARE @QuizJournalAccessIndDefault bit
DECLARE @TestJournalAccessIndDefault bit
DECLARE @LessonThresholdNotifyIndDefault bit
DECLARE @LessonNotifyThresholdDefault tinyint
DECLARE @QuizThresholdNotifyIndDefault bit
DECLARE @QuizNotifyThresholdDefault tinyint
DECLARE @TestThresholdNotifyIndDefault bit
DECLARE @TestNotifyThresholdDefault tinyint
DECLARE @IsCustom bit
SET @IsCustom = 0
SELECT
@QuizAccessAnswerKeyIndDefault = quiz_access_answer_key_ind,
@AccessAnswerKeyIndDefault = access_answer_key_ind,
@EasySpellingIndDefault = easy_spelling_ind,
@AccessHomepageCalculatorIndDefault = access_homepage_calculator_ind,
@AccessHomepageDictionaryIndDefault = access_homepage_dictionary_ind,
@AccessHomepagePeriodicTableIndDefault = access_homepage_periodic_table_ind,
@AccessInternetIndDefault = access_internet_ind,
@LeaveMsgSkipIndDefault = leave_msg_skip_ind,
@QuizLeaveMsgSkipIndDefault = quiz_leave_msg_skip_ind,
@AccessLessonCalculatorIndDefault = access_lesson_calculator_ind,
@AccessLessonDictionaryIndDefault = access_lesson_dictionary_ind,
@AccessLessonPeriodicTableIndDefault = access_lesson_periodic_table_ind,
@QuizNotifyCorrectIncorrectIndDefault = quiz_notify_correct_incorrect_ind,
@QuizOpenBookIndDefault = quiz_open_book_ind,
@QuizOpenPageIndDefault = quiz_open_page_ind,
@AccessProjectCalculatorIndDefault = access_project_calculator_ind,
@AccessProjectDictionaryIndDefault = access_project_dictionary_ind,
@AccessProjectPeriodicTableIndDefault = access_project_periodic_table_ind,
@AccessQuizCalculatorIndDefault = access_quiz_calculator_ind,
@AccessQuizDictionaryIndDefault = access_quiz_dictionary_ind,
@AccessQuizPeriodicTableIndDefault = access_quiz_periodic_table_ind,
@QuizEasySpellingIndDefault = quiz_easy_spelling_ind,
@DisplayLetterIndDefault = display_letter_ind,
@DisplayPercentIndDefault = display_percent_ind,
@StudentPrintIndDefault = student_print_ind,
@AccessTestCalculatorIndDefault = access_test_calculator_ind,
@AccessTestDictionaryIndDefault = access_test_dictionary_ind,
@AccessTestPeriodicTableIndDefault = access_test_periodic_table_ind,
@UnlimitedProblemAttemptsDefault = unlimited_problem_attempts,
@AMinimumDefault = a_minimum,
@BMinimumDefault = b_minimum,
@CMinimumDefault = c_minimum,
@DMinimumDefault = d_minimum,
@LessonWeightDefault = lesson_weight,
@MaxProblemAttemptsDefault = max_problem_attempts,
@MaxTrueFalseProblemAttemptsDefault = tf_max_problem_attempts,
@ProblemAttemptsPenaltyDefault = problem_attempts_penalty,
@ProjectWeightDefault = project_weight,
@QuizSpellingPenaltyDefault = quiz_spelling_penalty,
@QuizWeightDefault = quiz_weight,
@SpellingPenaltyDefault = spelling_penalty,
@TestWeightDefault = test_weight,
@BibleTranslationDefault = bible_translation,
@TestAccessAnswerKeyIndDefault = test_access_answer_key_ind,
@TestLeaveMsgSkipIndDefault = test_leave_msg_skip_ind,
@TestNotifyCorrectIncorrectIndDefault = test_notify_correct_incorrect_ind,
@TestOpenBookIndDefault = test_open_book_ind,
@TestOpenPageIndDefault = test_open_page_ind,
@TestSpellingPenaltyDefault = test_spelling_penalty,
@TestEasySpellingIndDefault = test_easy_spelling_ind,
@AccessAllRightIndDefault = access_allright_ind,
@AccessFarmerFrankIndDefault = access_farmerfrank_ind,
@AccessVocabGamesIndDefault = access_vocab_games_ind,
@QuizNotifyParentIndDefault = quiz_notify_parent_ind,
@TestNotifyParentIndDefault = test_notify_parent_ind,
@LessonBibleAccessIndDefault = access_lesson_bible_ind,
@ProjectBibleAccessIndDefault = access_project_bible_ind,
@QuizBibleAccessIndDefault = access_quiz_bible_ind,
@TestBibleAccessIndDefault = access_test_bible_ind,
@LessonJournalAccessIndDefault = access_lesson_Journal_ind,
@ProjectJournalAccessIndDefault = access_project_Journal_ind,
@QuizJournalAccessIndDefault = access_quiz_Journal_ind,
@TestJournalAccessIndDefault = access_test_Journal_ind,
@LessonThresholdNotifyIndDefault = lesson_threshold_notify_ind,
@LessonNotifyThresholdDefault = lesson_notify_threshold,
@QuizThresholdNotifyIndDefault = quiz_threshold_notify_ind,
@QuizNotifyThresholdDefault = quiz_notify_threshold,
@TestThresholdNotifyIndDefault = test_threshold_notify_ind,
@TestNotifyThresholdDefault = test_notify_threshold
FROM default_settings
/*compare values to defaults to determine if the values are custom
*/
IF @QuizAccessAnswerKeyInd != @QuizAccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @AccessAnswerKeyInd != @AccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @EasySpellingInd != @EasySpellingIndDefault
SET @IsCustom = 1
IF @AccessHomepageCalculatorInd != @AccessHomepageCalculatorIndDefault
SET @IsCustom = 1
IF @AccessHomepageDictionaryInd != @AccessHomepageDictionaryIndDefault
SET @IsCustom = 1
IF @AccessHomepagePeriodicTableInd != @AccessHomepagePeriodicTableIndDefault
SET @IsCustom = 1
IF @AccessInternetInd != @AccessInternetIndDefault
SET @IsCustom = 1
IF @LeaveMsgSkipInd != @LeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @QuizLeaveMsgSkipInd != @QuizLeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @AccessLessonCalculatorInd != @AccessLessonCalculatorIndDefault
SET @IsCustom = 1
IF @AccessLessonDictionaryInd != @AccessLessonDictionaryIndDefault
SET @IsCustom = 1
IF @AccessLessonPeriodicTableInd != @AccessLessonPeriodicTableIndDefault
SET @IsCustom = 1
IF @QuizNotifyCorrectIncorrectInd != @QuizNotifyCorrectIncorrectIndDefault
SET @IsCustom = 1
IF @QuizOpenBookInd != @QuizOpenBookIndDefault
SET @IsCustom = 1
IF @QuizOpenPageInd != @QuizOpenPageIndDefault
SET @IsCustom = 1
IF @AccessProjectCalculatorInd != @AccessProjectCalculatorIndDefault
SET @IsCustom = 1
IF @AccessProjectDictionaryInd != @AccessProjectDictionaryIndDefault
SET @IsCustom = 1
IF @AccessProjectPeriodicTableInd != @AccessProjectPeriodicTableIndDefault
SET @IsCustom = 1
IF @AccessQuizCalculatorInd != @AccessQuizCalculatorIndDefault
SET @IsCustom = 1
IF @AccessQuizDictionaryInd != @AccessQuizDictionaryIndDefault
SET @IsCustom = 1
IF @AccessQuizPeriodicTableInd != @AccessQuizPeriodicTableIndDefault
SET @IsCustom = 1
IF @QuizEasySpellingInd != @QuizEasySpellingIndDefault
SET @IsCustom = 1
IF @DisplayLetterInd != @DisplayLetterIndDefault
SET @IsCustom = 1
IF @DisplayPercentInd != @DisplayPercentIndDefault
SET @IsCustom = 1
IF @StudentPrintInd != @StudentPrintIndDefault
SET @IsCustom = 1
IF @AccessTestCalculatorInd != @AccessTestCalculatorIndDefault
SET @IsCustom = 1
IF @AccessTestDictionaryInd != @AccessTestDictionaryIndDefault
SET @IsCustom = 1
IF @AccessTestPeriodicTableInd != @AccessTestPeriodicTableIndDefault
SET @IsCustom = 1
IF @UnlimitedProblemAttempts != @UnlimitedProblemAttemptsDefault
SET @IsCustom = 1
IF @AMinimum != @AMinimumDefault
SET @IsCustom = 1
IF @BMinimum != @BMinimumDefault
SET @IsCustom = 1
IF @CMinimum != @CMinimumDefault
SET @IsCustom = 1
IF @DMinimum != @DMinimumDefault
SET @IsCustom = 1
IF @LessonWeight != @LessonWeightDefault
SET @IsCustom = 1
IF @MaxProblemAttempts != @MaxProblemAttemptsDefault
SET @IsCustom = 1
IF @MaxTrueFalseProblemAttempts != @MaxTrueFalseProblemAttemptsDefault
SET @IsCustom = 1
IF @ProblemAttemptsPenalty != @ProblemAttemptsPenaltyDefault
SET @IsCustom = 1
IF @ProjectWeight != @ProjectWeightDefault
SET @IsCustom = 1
IF @QuizSpellingPenalty != @QuizSpellingPenaltyDefault
SET @IsCustom = 1
IF @QuizWeight != @QuizWeightDefault
SET @IsCustom = 1
IF @SpellingPenalty != @SpellingPenaltyDefault
SET @IsCustom = 1
IF @TestWeight != @TestWeightDefault
SET @IsCustom = 1
IF @BibleTranslation != @BibleTranslationDefault
SET @IsCustom = 1
IF @TestAccessAnswerKeyInd != @TestAccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @TestLeaveMsgSkipInd != @TestLeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @TestNotifyCorrectIncorrectInd != @TestNotifyCorrectIncorrectIndDefault
SET @IsCustom = 1
IF @TestOpenBookInd != @TestOpenBookIndDefault
SET @IsCustom = 1
IF @TestOpenPageInd != @TestOpenPageIndDefault
SET @IsCustom = 1
IF @TestSpellingPenalty != @TestSpellingPenaltyDefault
SET @IsCustom = 1
IF @TestEasySpellingInd != @TestEasySpellingIndDefault
SET @IsCustom = 1
IF @AccessAllRightInd != @AccessAllRightIndDefault
SET @IsCustom = 1
IF @AccessFarmerFrankInd != @AccessFarmerFrankIndDefault
SET @IsCustom = 1
IF @AccessVocabGamesInd != @AccessVocabGamesIndDefault
SET @IsCustom = 1
IF @QuizNotifyParentInd != @QuizNotifyParentIndDefault
SET @IsCustom = 1
IF @TestNotifyParentInd != @TestNotifyParentIndDefault
SET @IsCustom = 1
IF @LessonBibleAccessIndDefault != @LessonBibleAccessInd
SET @IsCustom = 1
IF @ProjectBibleAccessIndDefault != @ProjectBibleAccessInd
SET @IsCustom = 1
IF @QuizBibleAccessIndDefault != @QuizBibleAccessInd
SET @IsCustom = 1
IF @TestBibleAccessIndDefault != @TestBibleAccessInd
SET @IsCustom = 1
IF @LessonJournalAccessIndDefault != @LessonJournalAccessInd
SET @IsCustom = 1
IF @ProjectJournalAccessIndDefault != @ProjectJournalAccessInd
SET @IsCustom = 1
IF @QuizJournalAccessIndDefault != @QuizJournalAccessInd
SET @IsCustom = 1
IF @TestJournalAccessIndDefault != @TestJournalAccessInd
SET @IsCustom = 1
IF @LessonThresholdNotifyIndDefault != @LessonThresholdNotifyInd
SET @IsCustom = 1
IF @LessonNotifyThresholdDefault != @LessonNotifyThreshold
SET @IsCustom = 1
IF @QuizThresholdNotifyIndDefault != @QuizThresholdNotifyInd
SET @IsCustom = 1
IF @QuizNotifyThresholdDefault != @QuizNotifyThreshold
SET @IsCustom = 1
IF @TestThresholdNotifyIndDefault != @TestThresholdNotifyInd
SET @IsCustom = 1
IF @TestNotifyThresholdDefault != @TestNotifyThreshold
SET @IsCustom = 1
/*update school settings */
UPDATE school_settings
SET
quiz_access_answer_key_ind = @QuizAccessAnswerKeyInd,
access_answer_key_ind = @AccessAnswerKeyInd,
easy_spelling_ind = @EasySpellingInd,
access_homepage_calculator_ind = @AccessHomepageCalculatorInd,
access_homepage_dictionary_ind = @AccessHomepageDictionaryInd,
access_homepage_periodic_table_ind = @AccessHomepagePeriodicTableInd,
access_internet_ind = @AccessInternetInd,
leave_msg_skip_ind = @LeaveMsgSkipInd,
quiz_leave_msg_skip_ind = @QuizLeaveMsgSkipInd,
access_lesson_calculator_ind = @AccessLessonCalculatorInd,
access_lesson_dictionary_ind = @AccessLessonDictionaryInd,
access_lesson_periodic_table_ind = @AccessLessonPeriodicTableInd,
quiz_notify_correct_incorrect_ind = @QuizNotifyCorrectIncorrectInd,
quiz_open_book_ind = @QuizOpenBookInd,
quiz_open_page_ind = @QuizOpenPageInd,
access_project_calculator_ind = @AccessProjectCalculatorInd,
access_project_dictionary_ind = @AccessProjectDictionaryInd,
access_project_periodic_table_ind = @AccessProjectPeriodicTableInd,
access_quiz_calculator_ind = @AccessQuizCalculatorInd,
access_quiz_dictionary_ind = @AccessQuizDictionaryInd,
access_quiz_periodic_table_ind = @AccessQuizPeriodicTableInd,
quiz_easy_spelling_ind = @QuizEasySpellingInd,
display_letter_ind = @DisplayLetterInd,
display_percent_ind = @DisplayPercentInd,
student_print_ind = @StudentPrintInd,
access_test_calculator_ind = @AccessTestCalculatorInd,
access_test_dictionary_ind = @AccessTestDictionaryInd,
access_test_periodic_table_ind = @AccessTestPeriodicTableInd,
unlimited_problem_attempts = @UnlimitedProblemAttempts,
a_minimum = @AMinimum,
b_minimum = @BMinimum,
c_minimum = @CMinimum,
d_minimum = @DMinimum,
lesson_weight = @LessonWeight,
max_problem_attempts = @MaxProblemAttempts,
tf_max_problem_attempts = @MaxTrueFalseProblemAttempts,
problem_attempts_penalty = @ProblemAttemptsPenalty,
project_weight = @ProjectWeight,
quiz_spelling_penalty = @QuizSpellingPenalty,
quiz_weight = @QuizWeight,
spelling_penalty = @SpellingPenalty,
test_weight = @TestWeight,
bible_translation = @BibleTranslation,
test_access_answer_key_ind = @TestAccessAnswerKeyInd,
test_leave_msg_skip_ind = @TestLeaveMsgSkipInd,
test_notify_correct_incorrect_ind = @TestNotifyCorrectIncorrectInd,
test_open_book_ind = @TestOpenBookInd,
test_open_page_ind = @TestOpenPageInd,
test_spelling_penalty = @TestSpellingPenalty,
test_easy_spelling_ind = @TestEasySpellingInd,
access_allright_ind = @AccessAllRightInd,
access_farmerfrank_ind = @AccessFarmerFrankInd,
access_vocab_games_ind = @AccessVocabGamesInd,
quiz_notify_parent_ind = @QuizNotifyParentInd,
test_notify_parent_ind = @TestNotifyParentInd,
access_lesson_bible_ind = @LessonBibleAccessInd,
access_project_bible_ind = @ProjectBibleAccessInd,
access_quiz_bible_ind = @QuizBibleAccessInd,
access_test_bible_ind = @TestBibleAccessInd,
access_lesson_Journal_ind = @LessonJournalAccessInd,
access_project_Journal_ind = @ProjectJournalAccessInd,
access_quiz_Journal_ind = @QuizJournalAccessInd,
access_test_Journal_ind = @TestJournalAccessInd,
lesson_threshold_notify_ind = @LessonThresholdNotifyInd,
lesson_notify_threshold = @LessonNotifyThreshold,
quiz_threshold_notify_ind = @QuizThresholdNotifyInd,
quiz_notify_threshold = @QuizNotifyThreshold,
test_threshold_notify_ind = @TestThresholdNotifyInd,
test_notify_threshold = @TestNotifyThreshold,
custom_settings_ind = @IsCustom
--Select (to return) all students whose settings have not been customized
SELECT student_id
FROM student_settings
WHERE custom_settings_ind = 0
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetSettingsSchool]'
GO
IF OBJECT_ID('[dbo].[GetSettingsSchool]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetSettingsSchool]'
DROP PROC [dbo].[GetSettingsSchool]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetSettingsSchool]'
GO
CREATE Procedure [dbo].[GetSettingsSchool]
/* Param List */
AS
/******************************************************************************
** File:
** Name: GetSettingsSchool
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SELECT TOP 1
access_internet_ind,
max_problem_attempts,
tf_max_problem_attempts,
unlimited_problem_attempts,
leave_msg_skip_ind,
quiz_leave_msg_skip_ind,
quiz_notify_correct_incorrect_ind,
quiz_open_page_ind,
quiz_open_book_ind,
easy_spelling_ind,
quiz_access_answer_key_ind,
access_answer_key_ind,
quiz_easy_spelling_ind,
student_print_ind,
bible_translation,
access_lesson_calculator_ind,
access_lesson_dictionary_ind,
access_lesson_periodic_table_ind,
access_quiz_calculator_ind,
access_quiz_dictionary_ind,
access_quiz_periodic_table_ind,
access_test_calculator_ind,
access_test_dictionary_ind,
access_test_periodic_table_ind,
access_project_calculator_ind,
access_project_dictionary_ind,
access_project_periodic_table_ind,
access_homepage_calculator_ind,
access_homepage_dictionary_ind,
access_homepage_periodic_table_ind,
display_percent_ind,
display_letter_ind,
a_minimum,
b_minimum,
c_minimum,
d_minimum,
lesson_weight,
quiz_weight,
test_weight,
project_weight,
spelling_penalty,
quiz_spelling_penalty,
problem_attempts_penalty,
test_access_answer_key_ind,
test_leave_msg_skip_ind,
test_notify_correct_incorrect_ind,
test_open_book_ind,
test_open_page_ind,
test_spelling_penalty,
test_easy_spelling_ind,
access_allright_ind,
access_farmerfrank_ind,
access_vocab_games_ind,
quiz_notify_parent_ind,
test_notify_parent_ind,
custom_settings_ind,
access_lesson_bible_ind,
access_project_bible_ind,
access_quiz_bible_ind,
access_test_bible_ind,
access_lesson_journal_ind,
access_project_journal_ind,
access_quiz_journal_ind,
access_test_journal_ind,
lesson_threshold_notify_ind,
lesson_notify_threshold,
quiz_threshold_notify_ind,
quiz_notify_threshold,
test_threshold_notify_ind,
test_notify_threshold
FROM
school_settings
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetAllTermsForStudent]'
GO
IF OBJECT_ID('GetAllTermsForStudent') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetAllTermsForStudent'
DROP PROC GetAllTermsForStudent
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetAllTermsForStudent'
GO
CREATE Procedure GetAllTermsForStudent
/* Param List */
@StudentId as uniqueidentifier
AS
select distinct t.description, t.term_id from term t join student_unit su on t.term_id = su.term_id
join student_subject ss on ss.[id] = su.student_subject_id
where ss.student_id = @StudentId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[DeleteStudent]'
GO
IF OBJECT_ID('[dbo].[DeleteStudent]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[DeleteStudent]'
DROP PROC [dbo].[DeleteStudent]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[DeleteStudent]'
GO
CREATE Procedure [dbo].[DeleteStudent]
/* Param List */
@StudentId uniqueidentifier
AS
/******************************************************************************
** File:
** Name: DeleteStudent
** Desc:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
Begin Transaction
--Delete messages to student
DELETE message
WHERE recipient_id = @StudentId
IF @@ERROR <> 0 GOTO Handle_Error
--Delete messages from student
DELETE message
WHERE sender_id = @StudentId
IF @@ERROR <> 0 GOTO Handle_Error
DELETE TODO
WHERE USER_ID = @STUDENTID
IF @@ERROR <> 0 GOTO Handle_Error
-- Deleting user's [activity] records here because
-- setting up a cascading delete to activity was
-- impossible
DELETE FROM ACTIVITY
WHERE EVENT_ID IN (SELECT EVENT_ID
FROM STUDENT_EVENT
WHERE STUDENT_ID = @STUDENTID)
IF @@ERROR <> 0 GOTO Handle_Error
--Delete user
--Delete student settings
--Delete student journal
--Delete student calendar
--Delete student subjects
--Delete student units
--Delete student presentation output
--Delete student assignments
--Delete student problems
DELETE [user]
WHERE [user_id] = @StudentId
Handle_Error:
IF (@@error <> 0)
Rollback Transaction
ELSE
Commit Transaction
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[CRUDUserWidget]'
GO
IF OBJECT_ID('[dbo].[CRUDUserWidget]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[CRUDUserWidget]'
DROP PROC [dbo].[CRUDUserWidget]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[CRUDUserWidget]'
GO
CREATE proc [dbo].[CRUDUserWidget]
@UserID uniqueidentifier,
@WidgetID int = null,
@Active bit = 1,
@JustGetActive bit = 0,
@CRUD char -- create, retrieve, update, delete
as
set @CRUD = upper(@CRUD)
declare @OLDORDER nvarchar(500)
declare @MODNAME nvarchar(500)
declare @NEWORDER nvarchar(500)
if @CRUD = 'U'
begin
update user_widget set active = @active
where user_id = @UserID and widget_id = @WidgetID
set @OLDORDER = (select h.modorder from homepage h where h.user_id = @UserID)
set @MODNAME = (select w.name from widget_app w where w.id = @WidgetID)
if @active = 1
begin
if charindex(@MODNAME, @OLDORDER) = 0 -- if @modname isn't currently in homepage.modorder
begin
set @NEWORDER = @OLDORDER + ',' + @MODNAME
set @NEWORDER = replace(@NEWORDER,',|','|')
set @NEWORDER = replace(@NEWORDER,'|,','|')
set @NEWORDER = replace(@NEWORDER,',,',',')
update homepage set modOrder = @NEWORDER
where user_id = @UserID
end
end
if @active = 0
begin
set @NEWORDER = replace(@OLDORDER,@MODNAME,'')
set @NEWORDER = replace(@NEWORDER,',|','|')
set @NEWORDER = replace(@NEWORDER,'|,','|')
set @NEWORDER = replace(@NEWORDER,',,',',')
update homepage set modOrder = @NEWORDER
where user_id = @UserID
end
end
if @CRUD = 'C'
begin
if not exists (select user_id
from user_widget
where user_id = @UserID and widget_id = @WidgetID)
begin
insert into user_widget
(user_id, widget_id) values (@UserID, @WidgetID)
update homepage set modOrder =
(select h.modorder from homepage h where h.user_id = @UserID) + ',' +
(select w.name from widget_app w where w.id = @WidgetID)
where user_id = @UserID
end
end
if @CRUD = 'R'
begin
Create table #temp(rssFeedNumber varchar(10), rssTitle varchar(max))
insert into #temp(rssFeedNumber, rssTitle)
select '1' as rssFeedNumber, rss_title1 as rssTitle
from homepage
where user_id = @UserID
insert into #temp(rssFeedNumber, rssTitle)
select '2' as rssFeedNumber, rss_title2 as rssTitle
from homepage
where user_id = @UserID
insert into #temp(rssFeedNumber, rssTitle)
select '3' as rssFeedNumber, rss_title3 as rssTitle
from homepage
where user_id = @UserID
insert into #temp(rssFeedNumber, rssTitle)
select '4' as rssFeedNumber, rss_title4 as rssTitle
from homepage
where user_id = @UserID
insert into #temp(rssFeedNumber, rssTitle)
select '5' as rssFeedNumber, rss_title5 as rssTitle
from homepage
where user_id = @UserID
/* The "COLLATE DATABASE_DEFAULT" in the following queries is intended to correct an error
that occasionally pops up in the field. It's assumed that the tempdb, for some reason, is set
to an incorrect database collation. Correcting the collation of tempdb would be involved (http://support.microsoft.com/kb/325335)
and may be inappropriate since the user could be using it for their own purposes. */
if @JustGetActive = 1
begin
select w.id,
isnull(r.rssTitle,w.title) as title,
w.title,
w.template,
w.post_load_javascript,
w.requires_web,
w.optional,
w.teacher,
w.student,
w.default_column,
w.default_order,
u.active
from user_widget u
inner join widget_app w
on u.widget_id = w.id
left join #temp r
on RIGHT(w.title,1) COLLATE DATABASE_DEFAULT = cast(r.rssFeedNumber as varchar(1)) COLLATE DATABASE_DEFAULT
where user_id = @UserID and u.active = 1
order by w.title
end
else
begin
select w.id,
isnull(r.rssTitle,w.title) as title,
w.title,
w.template,
w.post_load_javascript,
w.requires_web,
w.optional,
w.teacher,
w.student,
w.default_column,
w.default_order,
u.active
from user_widget u
inner join widget_app w
on u.widget_id = w.id
left join #temp r
on RIGHT(w.title,1) COLLATE DATABASE_DEFAULT = cast(r.rssFeedNumber as varchar(1)) COLLATE DATABASE_DEFAULT
where user_id = @UserID
order by w.title
end
end
if @CRUD = 'D'
begin
delete from user_widget
where user_id = @UserID
and widget_id = @WidgetID
set @OLDORDER = (select h.modorder from homepage h where h.user_id = @UserID)
set @MODNAME = (select w.name from widget_app w where w.id = @WidgetID)
set @NEWORDER = replace(@OLDORDER,@MODNAME,'')
set @NEWORDER = replace(@NEWORDER,',,',',')
update homepage set modOrder = @NEWORDER where user_id = @UserID
end
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetTranscriptHeader]'
GO
IF OBJECT_ID('GetTranscriptHeader') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetTranscriptHeader'
DROP PROC GetTranscriptHeader
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetTranscriptHeader'
GO
CREATE Procedure GetTranscriptHeader
AS
DECLARE @ParentId as uniqueidentifier
SET @ParentId = (SELECT [user_id] from [user] where user_type = 'A')
SELECT s.school_name, t.address as 'school_address', t.city + ', ' + t.state + ' ' + t.zipcode as 'school_city', t.country as 'school_country',
t.phone as 'school_phone', t.email as 'school_email' from transcript_information t, school_settings s WHERE [user_id] = @ParentId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[CRUDActivity]'
GO
IF OBJECT_ID('[dbo].[CRUDActivity]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[CRUDActivity]'
DROP PROC [dbo].[CRUDActivity]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[CRUDActivity]'
GO
CREATE proc [dbo].[CRUDActivity]
@CRUD char, -- create, retrieve, update, delete
@event_id uniqueidentifier=null,
@summary varchar(max)=null,
@location varchar(max)=null,
@hours real=null,
@type varchar(max)=null,
@user_id uniqueidentifier=null
as
if @CRUD = 'C'
begin
if @event_id is null
set @event_id = newid()
insert into activity values(@event_id, @summary, @location, @hours, @type)
select @event_id
end
if @CRUD = 'R'
select *, event_type=0
from activity act
join school_event_mm_user mm
on act.event_id = mm.event_id
join event e
on act.event_id = e.event_id
where mm.user_id = @user_id
union
select *, event_type=2
from activity act
join student_event se
on act.event_id = se.event_id
join event e
on act.event_id = e.event_id
where se.student_id = @user_id
if @CRUD = 'U'
update activity set
event_id = @event_id,
summary = @summary,
location = @location,
hours = @hours,
type = @type
where event_id = @event_id
if @CRUD = 'D'
delete activity where event_id = @event_id
if @CRUD = 'T'
select distinct type from activity
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[SaveSettingsStudentSubject]'
GO
IF OBJECT_ID('[dbo].[SaveSettingsStudentSubject]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[SaveSettingsStudentSubject]'
DROP PROC [dbo].[SaveSettingsStudentSubject]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[SaveSettingsStudentSubject]'
GO
CREATE Procedure [dbo].[SaveSettingsStudentSubject]
/* Param List */
@id uniqueidentifier,
@QuizAccessAnswerKeyInd bit,
@AccessAnswerKeyInd bit,
@EasySpellingInd bit,
@AccessInternetInd bit,
@LeaveMsgSkipInd bit,
@QuizLeaveMsgSkipInd bit,
@QuizNotifyCorrectIncorrectInd bit,
@QuizOpenBookInd bit,
@QuizOpenPageInd bit,
@QuizEasySpellingInd bit,
@DisplayLetterInd bit,
@DisplayPercentInd bit,
@UnlimitedProblemAttempts bit,
@AMinimum int,
@BMinimum int,
@CMinimum int,
@DMinimum int,
@LessonWeight int,
@MaxProblemAttempts int,
@MaxTrueFalseProblemAttempts int,
@ProblemAttemptsPenalty int,
@ProjectWeight int,
@QuizSpellingPenalty int,
@QuizWeight int,
@SpellingPenalty int,
@TestWeight int,
@TestAccessAnswerKeyInd bit,
@TestLeaveMsgSkipInd bit,
@TestNotifyCorrectIncorrectInd bit,
@TestOpenBookInd bit,
@TestOpenPageInd bit,
@TestSpellingPenalty int,
@TestEasySpellingInd bit,
@AccessAllRightInd bit,
@AccessFarmerFrankInd bit,
@AccessVocabGamesInd bit,
@QuizNotifyParentInd bit,
@TestNotifyParentInd bit,
@LessonBibleAccessInd bit,
@ProjectBibleAccessInd bit,
@QuizBibleAccessInd bit,
@TestBibleAccessInd bit,
@LessonJournalAccessInd bit,
@ProjectJournalAccessInd bit,
@QuizJournalAccessInd bit,
@TestJournalAccessInd bit,
@LessonThresholdNotifyInd bit,
@LessonNotifyThreshold tinyint,
@QuizThresholdNotifyInd bit,
@QuizNotifyThreshold tinyint,
@TestThresholdNotifyInd bit,
@TestNotifyThreshold tinyint
AS
/******************************************************************************
** File:
** Name: SaveSettingsStudentSubject
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
/*Variables used to store default values
*/
DECLARE @QuizAccessAnswerKeyIndDefault bit
DECLARE @AccessAnswerKeyIndDefault bit
DECLARE @EasySpellingIndDefault bit
DECLARE @AccessInternetIndDefault bit
DECLARE @LeaveMsgSkipIndDefault bit
DECLARE @QuizLeaveMsgSkipIndDefault bit
DECLARE @QuizNotifyCorrectIncorrectIndDefault bit
DECLARE @QuizOpenBookIndDefault bit
DECLARE @QuizOpenPageIndDefault bit
DECLARE @QuizEasySpellingIndDefault bit
DECLARE @DisplayLetterIndDefault bit
DECLARE @DisplayPercentIndDefault bit
DECLARE @UnlimitedProblemAttemptsDefault bit
DECLARE @AMinimumDefault int
DECLARE @BMinimumDefault int
DECLARE @CMinimumDefault int
DECLARE @DMinimumDefault int
DECLARE @LessonWeightDefault int
DECLARE @MaxProblemAttemptsDefault int
DECLARE @MaxTrueFalseProblemAttemptsDefault int
DECLARE @ProblemAttemptsPenaltyDefault int
DECLARE @ProjectWeightDefault int
DECLARE @QuizSpellingPenaltyDefault int
DECLARE @QuizWeightDefault int
DECLARE @SpellingPenaltyDefault int
DECLARE @TestWeightDefault int
DECLARE @TestAccessAnswerKeyIndDefault bit
DECLARE @TestLeaveMsgSkipIndDefault bit
DECLARE @TestNotifyCorrectIncorrectIndDefault bit
DECLARE @TestOpenBookIndDefault bit
DECLARE @TestOpenPageIndDefault bit
DECLARE @TestSpellingPenaltyDefault int
DECLARE @TestEasySpellingIndDefault bit
DECLARE @AccessAllRightIndDefault bit
DECLARE @AccessFarmerFrankIndDefault bit
DECLARE @AccessVocabGamesIndDefault bit
DECLARE @QuizNotifyParentIndDefault bit
DECLARE @TestNotifyParentIndDefault bit
DECLARE @LessonBibleAccessIndDefault bit
DECLARE @ProjectBibleAccessIndDefault bit
DECLARE @QuizBibleAccessIndDefault bit
DECLARE @TestBibleAccessIndDefault bit
DECLARE @LessonJournalAccessIndDefault bit
DECLARE @ProjectJournalAccessIndDefault bit
DECLARE @QuizJournalAccessIndDefault bit
DECLARE @TestJournalAccessIndDefault bit
DECLARE @LessonThresholdNotifyIndDefault bit
DECLARE @LessonNotifyThresholdDefault tinyint
DECLARE @QuizThresholdNotifyIndDefault bit
DECLARE @QuizNotifyThresholdDefault tinyint
DECLARE @TestThresholdNotifyIndDefault bit
DECLARE @TestNotifyThresholdDefault tinyint
DECLARE @IsCustom bit
DECLARE @StudentId uniqueidentifier
SET @IsCustom = 0
SELECT @StudentId = student_id
FROM student_subject
WHERE [id] = @id
SELECT
@QuizAccessAnswerKeyIndDefault = quiz_access_answer_key_ind,
@AccessAnswerKeyIndDefault = access_answer_key_ind,
@EasySpellingIndDefault = easy_spelling_ind,
@AccessInternetIndDefault = access_internet_ind,
@LeaveMsgSkipIndDefault = leave_msg_skip_ind,
@QuizLeaveMsgSkipIndDefault = quiz_leave_msg_skip_ind,
@QuizNotifyCorrectIncorrectIndDefault = quiz_notify_correct_incorrect_ind,
@QuizOpenBookIndDefault = quiz_open_book_ind,
@QuizOpenPageIndDefault = quiz_open_page_ind,
@QuizEasySpellingIndDefault = quiz_easy_spelling_ind,
@DisplayLetterIndDefault = display_letter_ind,
@DisplayPercentIndDefault = display_percent_ind,
@UnlimitedProblemAttemptsDefault = unlimited_problem_attempts,
@AMinimumDefault = a_minimum,
@BMinimumDefault = b_minimum,
@CMinimumDefault = c_minimum,
@DMinimumDefault = d_minimum,
@LessonWeightDefault = lesson_weight,
@MaxProblemAttemptsDefault = max_problem_attempts,
@MaxTrueFalseProblemAttemptsDefault = tf_max_problem_attempts,
@ProblemAttemptsPenaltyDefault = problem_attempts_penalty,
@ProjectWeightDefault = project_weight,
@QuizSpellingPenaltyDefault = quiz_spelling_penalty,
@QuizWeightDefault = quiz_weight,
@SpellingPenaltyDefault = spelling_penalty,
@TestWeightDefault = test_weight,
@TestAccessAnswerKeyIndDefault = test_access_answer_key_ind,
@TestLeaveMsgSkipIndDefault = test_leave_msg_skip_ind,
@TestNotifyCorrectIncorrectIndDefault = test_notify_correct_incorrect_ind,
@TestOpenBookIndDefault = test_open_book_ind,
@TestOpenPageIndDefault = test_open_page_ind,
@TestSpellingPenaltyDefault = test_spelling_penalty,
@TestEasySpellingIndDefault = test_easy_spelling_ind,
@AccessAllRightIndDefault = access_allright_ind,
@AccessFarmerFrankIndDefault = access_farmerfrank_ind,
@AccessVocabGamesIndDefault = access_vocab_games_ind,
@QuizNotifyParentIndDefault = quiz_notify_parent_ind,
@TestNotifyParentIndDefault = test_notify_parent_ind,
@LessonBibleAccessIndDefault = access_lesson_bible_ind,
@ProjectBibleAccessIndDefault = access_project_bible_ind,
@QuizBibleAccessIndDefault = access_quiz_bible_ind,
@TestBibleAccessIndDefault = access_test_bible_ind,
@LessonJournalAccessIndDefault = access_lesson_Journal_ind,
@ProjectJournalAccessIndDefault = access_project_Journal_ind,
@QuizJournalAccessIndDefault = access_quiz_Journal_ind,
@TestJournalAccessIndDefault = access_test_Journal_ind,
@LessonThresholdNotifyIndDefault = lesson_threshold_notify_ind,
@LessonNotifyThresholdDefault = lesson_notify_threshold,
@QuizThresholdNotifyIndDefault = quiz_threshold_notify_ind,
@QuizNotifyThresholdDefault = quiz_notify_threshold,
@TestThresholdNotifyIndDefault = test_threshold_notify_ind,
@TestNotifyThresholdDefault = test_notify_threshold
FROM student_settings
WHERE student_id = @StudentId
/*compare values to defaults to determine if the values are custom
*/
IF @QuizAccessAnswerKeyInd != @QuizAccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @AccessAnswerKeyInd != @AccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @EasySpellingInd != @EasySpellingIndDefault
SET @IsCustom = 1
IF @AccessInternetInd != @AccessInternetIndDefault
SET @IsCustom = 1
IF @LeaveMsgSkipInd != @LeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @QuizLeaveMsgSkipInd != @QuizLeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @QuizNotifyCorrectIncorrectInd != @QuizNotifyCorrectIncorrectIndDefault
SET @IsCustom = 1
IF @QuizOpenBookInd != @QuizOpenBookIndDefault
SET @IsCustom = 1
IF @QuizOpenPageInd != @QuizOpenPageIndDefault
SET @IsCustom = 1
IF @QuizEasySpellingInd != @QuizEasySpellingIndDefault
SET @IsCustom = 1
IF @DisplayLetterInd != @DisplayLetterIndDefault
SET @IsCustom = 1
IF @DisplayPercentInd != @DisplayPercentIndDefault
SET @IsCustom = 1
IF @UnlimitedProblemAttempts != @UnlimitedProblemAttemptsDefault
SET @IsCustom = 1
IF @AMinimum != @AMinimumDefault
SET @IsCustom = 1
IF @BMinimum != @BMinimumDefault
SET @IsCustom = 1
IF @CMinimum != @CMinimumDefault
SET @IsCustom = 1
IF @DMinimum != @DMinimumDefault
SET @IsCustom = 1
IF @LessonWeight != @LessonWeightDefault
SET @IsCustom = 1
IF @MaxProblemAttempts != @MaxProblemAttemptsDefault
SET @IsCustom = 1
IF @MaxTrueFalseProblemAttempts != @MaxTrueFalseProblemAttemptsDefault
SET @IsCustom = 1
IF @ProblemAttemptsPenalty != @ProblemAttemptsPenaltyDefault
SET @IsCustom = 1
IF @ProjectWeight != @ProjectWeightDefault
SET @IsCustom = 1
IF @QuizSpellingPenalty != @QuizSpellingPenaltyDefault
SET @IsCustom = 1
IF @QuizWeight != @QuizWeightDefault
SET @IsCustom = 1
IF @SpellingPenalty != @SpellingPenaltyDefault
SET @IsCustom = 1
IF @TestWeight != @TestWeightDefault
SET @IsCustom = 1
IF @TestAccessAnswerKeyInd != @TestAccessAnswerKeyIndDefault
SET @IsCustom = 1
IF @TestLeaveMsgSkipInd != @TestLeaveMsgSkipIndDefault
SET @IsCustom = 1
IF @TestNotifyCorrectIncorrectInd != @TestNotifyCorrectIncorrectIndDefault
SET @IsCustom = 1
IF @TestOpenBookInd != @TestOpenBookIndDefault
SET @IsCustom = 1
IF @TestOpenPageInd != @TestOpenPageIndDefault
SET @IsCustom = 1
IF @TestSpellingPenalty != @TestSpellingPenaltyDefault
SET @IsCustom = 1
IF @TestEasySpellingInd != @TestEasySpellingIndDefault
SET @IsCustom = 1
IF @AccessAllRightInd != @AccessAllRightIndDefault
SET @IsCustom = 1
IF @AccessFarmerFrankInd != @AccessFarmerFrankIndDefault
SET @IsCustom = 1
IF @AccessVocabGamesInd != @AccessVocabGamesIndDefault
SET @IsCustom = 1
IF @QuizNotifyParentInd != @QuizNotifyParentIndDefault
SET @IsCustom = 1
IF @TestNotifyParentInd != @TestNotifyParentIndDefault
SET @IsCustom = 1
IF @LessonBibleAccessIndDefault != @LessonBibleAccessInd
SET @IsCustom = 1
IF @ProjectBibleAccessIndDefault != @ProjectBibleAccessInd
SET @IsCustom = 1
IF @QuizBibleAccessIndDefault != @QuizBibleAccessInd
SET @IsCustom = 1
IF @TestBibleAccessIndDefault != @TestBibleAccessInd
SET @IsCustom = 1
IF @LessonJournalAccessIndDefault != @LessonJournalAccessInd
SET @IsCustom = 1
IF @ProjectJournalAccessIndDefault != @ProjectJournalAccessInd
SET @IsCustom = 1
IF @QuizJournalAccessIndDefault != @QuizJournalAccessInd
SET @IsCustom = 1
IF @TestJournalAccessIndDefault != @TestJournalAccessInd
SET @IsCustom = 1
IF @LessonThresholdNotifyIndDefault != @LessonThresholdNotifyInd
SET @IsCustom = 1
IF @LessonNotifyThresholdDefault != @LessonNotifyThreshold
SET @IsCustom = 1
IF @QuizThresholdNotifyIndDefault != @QuizThresholdNotifyInd
SET @IsCustom = 1
IF @QuizNotifyThresholdDefault != @QuizNotifyThreshold
SET @IsCustom = 1
IF @TestThresholdNotifyIndDefault != @TestThresholdNotifyInd
SET @IsCustom = 1
IF @TestNotifyThresholdDefault != @TestNotifyThreshold
SET @IsCustom = 1
/*insert new record */
UPDATE
student_subject
SET
quiz_access_answer_key_ind = @QuizAccessAnswerKeyInd,
access_answer_key_ind = @AccessAnswerKeyInd,
easy_spelling_ind = @EasySpellingInd,
access_internet_ind = @AccessInternetInd,
leave_msg_skip_ind = @LeaveMsgSkipInd,
quiz_leave_msg_skip_ind = @QuizLeaveMsgSkipInd,
quiz_notify_correct_incorrect_ind = @QuizNotifyCorrectIncorrectInd,
quiz_open_book_ind = @QuizOpenBookInd,
quiz_open_page_ind = @QuizOpenPageInd,
quiz_easy_spelling_ind = @QuizEasySpellingInd,
display_letter_ind = @DisplayLetterInd,
display_percent_ind = @DisplayPercentInd,
unlimited_problem_attempts = @UnlimitedProblemAttempts,
a_minimum = @AMinimum,
b_minimum = @BMinimum,
c_minimum = @CMinimum,
d_minimum = @DMinimum,
lesson_weight = @LessonWeight,
max_problem_attempts = @MaxProblemAttempts,
tf_max_problem_attempts = @MaxTrueFalseProblemAttempts,
problem_attempts_penalty = @ProblemAttemptsPenalty,
project_weight = @ProjectWeight,
quiz_spelling_penalty = @QuizSpellingPenalty,
quiz_weight = @QuizWeight,
spelling_penalty = @SpellingPenalty,
test_weight = @TestWeight,
test_access_answer_key_ind = @TestAccessAnswerKeyInd,
test_leave_msg_skip_ind = @TestLeaveMsgSkipInd,
test_notify_correct_incorrect_ind = @TestNotifyCorrectIncorrectInd,
test_open_book_ind = @TestOpenBookInd,
test_open_page_ind = @TestOpenPageInd,
test_spelling_penalty = @TestSpellingPenalty,
test_easy_spelling_ind = @TestEasySpellingInd,
access_allright_ind = @AccessAllRightInd,
access_farmerfrank_ind = @AccessFarmerFrankInd,
access_vocab_games_ind = @AccessVocabGamesInd,
quiz_notify_parent_ind = @QuizNotifyParentInd,
test_notify_parent_ind = @TestNotifyParentInd,
access_lesson_bible_ind = @LessonBibleAccessInd,
access_project_bible_ind = @ProjectBibleAccessInd,
access_quiz_bible_ind = @QuizBibleAccessInd,
access_test_bible_ind = @TestBibleAccessInd,
access_lesson_Journal_ind = @LessonJournalAccessInd,
access_project_Journal_ind = @ProjectJournalAccessInd,
access_quiz_Journal_ind = @QuizJournalAccessInd,
access_test_Journal_ind = @TestJournalAccessInd,
lesson_threshold_notify_ind = @LessonThresholdNotifyInd,
lesson_notify_threshold = @LessonNotifyThreshold,
quiz_threshold_notify_ind = @QuizThresholdNotifyInd,
quiz_notify_threshold = @QuizNotifyThreshold,
test_threshold_notify_ind = @TestThresholdNotifyInd,
test_notify_threshold = @TestNotifyThreshold,
custom_settings_ind = @IsCustom
WHERE [id] = @id
-- Loop through student units and recalculate unit grades
DECLARE @UnitId as uniqueidentifier
DECLARE curUnits CURSOR READ_ONLY FOR
SELECT [id]
FROM student_unit
WHERE student_subject_id = @id
OPEN curUnits
FETCH NEXT FROM curUnits INTO @UnitId
WHILE (@@fetch_status <> -1)
BEGIN
IF (@@fetch_status <> -2)
BEGIN
EXEC CalculateUnitGrade @UnitId
END
FETCH NEXT FROM curUnits INTO @UnitId
END
CLOSE curUnits
DEALLOCATE curUnits
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[ReportCard]'
GO
IF OBJECT_ID('ReportCard') IS NOT NULL
BEGIN
PRINT N'-Dropping proc ReportCard'
DROP PROC ReportCard
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc ReportCard'
GO
CREATE Procedure ReportCard
/* Param List */
@strGradeOption As char(25),
@strTermIds as varchar(100),
@strStudentIds as varChar(500)
AS
/******************************************************************************
** File:
** Name: ReportCard
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SET NOCOUNT ON
DECLARE @strSql As VarChar(8000)
--Build sql statement
SET @strSql ='SELECT DISTINCT term.description, User_id, username, first_name + '' '' + last_name as ''displayname'', ss.title, '
IF lower(@strGradeOption) = 'letter'
BEGIN
SET @strSql = @strSql + 'SubjectGrades = CASE '
SET @strSql = @strSql + 'WHEN ss.score is null THEN '''' '
SET @strSql = @strSql + 'WHEN ss.score >= a_minimum THEN ''A'' '
SET @strSql = @strSql + 'WHEN ss.score >= b_minimum THEN ''B'' '
SET @strSql = @strSql + 'WHEN ss.score >= c_minimum THEN ''C'' '
SET @strSql = @strSql + 'WHEN ss.score >= d_minimum THEN ''D'' '
SET @strSql = @strSql + 'Else ''F'' '
SET @strSql = @strSql + 'End '
END
IF lower(@strGradeOption) = 'percent'
BEGIN
SET @strSQL = @strSql + 'SubjectGrades = RTRIM(CAST(ss.score AS char(3)))+ ''%'' '
END
IF lower(@strGradeOption) = 'both'
BEGIN
SET @strSQL = @strSql + 'SubjectGrades = CASE '
SET @strSQL = @strSql + 'WHEN ss.score >= a_minimum '
SET @strSQL = @strSql + 'THEN ''A: '' + RTRIM(CAST(ss.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN ss.score >= b_minimum '
SET @strSQL = @strSql + 'THEN ''B: '' + RTRIM(CAST(ss.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN ss.score >= c_minimum '
SET @strSQL = @strSql + 'THEN ''C: '' + RTRIM(CAST(ss.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN ss.score >= d_minimum '
SET @strSQL = @strSql + 'THEN ''D: '' + RTRIM(CAST(ss.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'Else ''F: '' + RTRIM(CAST(ss.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'End '
END
SET @strSql = @strSql + 'FROM student_subject ss '
SET @strSql = @strSql + 'INNER JOIN [user] on [user].user_id = ss.student_id '
SET @strSql = @strSql + 'INNER JOIN student_unit su on ss.id = su.student_subject_id '
SET @strSql = @strSql + 'INNER JOIN term on su.term_id = term.term_id '
SET @strSql = @strSql + 'WHERE su.term_id in ('
SET @strSql = @strSql + @strTermIds + ') '
SET @strSql = @strSql + 'AND User_id IN ('
SET @strSql = @strSql + @strStudentIds + ')'
SET @strSql = @strSql + 'ORDER BY username, ss.title'
EXEC(@strSql)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GradeReportSubjectUnitAssignment]'
GO
IF OBJECT_ID('GradeReportSubjectUnitAssignment') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GradeReportSubjectUnitAssignment'
DROP PROC GradeReportSubjectUnitAssignment
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GradeReportSubjectUnitAssignment'
GO
CREATE Procedure GradeReportSubjectUnitAssignment
/* Param List */
@strGradeOption As char(25),
@strTermIds as varchar(100),
@strStudentIds as varChar(500)
AS
/******************************************************************************
** File:
** Name: GradeReportSubjectUnitAssignment
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SET NOCOUNT ON
DECLARE @strSql As VarChar(8000)
--Build sql statement
SET @strSql ='SELECT DISTINCT term.description, username, first_name + '' '' + last_name as ''displayname'', ss.title, ss.id, su.title as ''UnitTitle'', su.id as ''UnitID'', su.sequence_nbr, sa.sequence_nbr, '
SET @strSql = @strSql + 'sa.title as ''AssignmentTitle'', '
IF lower(@strGradeOption) = 'letter'
BEGIN
SET @strSql = @strSql + 'SubjectGrades = CASE '
SET @strSql = @strSql + 'WHEN ss.score is null THEN '''' '
SET @strSql = @strSql + 'WHEN ss.score >= a_minimum THEN ''A'' '
SET @strSql = @strSql + 'WHEN ss.score >= b_minimum THEN ''B'' '
SET @strSql = @strSql + 'WHEN ss.score >= c_minimum THEN ''C'' '
SET @strSql = @strSql + 'WHEN ss.score >= d_minimum THEN ''D'' '
SET @strSql = @strSql + 'Else ''F'' '
SET @strSql = @strSql + 'End '
SET @strSql = @strSql + ', '
SET @strSql = @strSql + 'UnitGrades = CASE '
SET @strSql = @strSql + 'WHEN su.score is null THEN '''' '
SET @strSql = @strSql + 'WHEN su.score >= a_minimum THEN ''A'' '
SET @strSql = @strSql + 'WHEN su.score >= b_minimum THEN ''B'' '
SET @strSql = @strSql + 'WHEN su.score >= c_minimum THEN ''C'' '
SET @strSql = @strSql + 'WHEN su.score >= d_minimum THEN ''D'' '
SET @strSql = @strSql + 'Else ''F'' '
SET @strSql = @strSql + 'End '
SET @strSql = @strSql + ', '
SET @strSql = @strSql + 'AssignmentGrades = CASE '
SET @strSql = @strSql + 'WHEN sa.score is null THEN '''' '
SET @strSql = @strSql + 'WHEN sa.score >= a_minimum THEN ''A'' '
SET @strSql = @strSql + 'WHEN sa.score >= b_minimum THEN ''B'' '
SET @strSql = @strSql + 'WHEN sa.score >= c_minimum THEN ''C'' '
SET @strSql = @strSql + 'WHEN sa.score >= d_minimum THEN ''D'' '
SET @strSql = @strSql + 'Else ''F'' '
SET @strSql = @strSql + 'End '
END
IF lower(@strGradeOption) = 'percent'
BEGIN
SET @strSQL = @strSql + 'SubjectGrades = RTRIM(CAST(ss.score AS char(3)))+ ''%'' '
SET @strSql = @strSql + ', '
SET @strSQL = @strSql + 'UnitGrades = RTRIM(CAST(su.score AS char(3)))+ ''%'' '
SET @strSql = @strSql + ', '
SET @strSQL = @strSql + 'AssignmentGrades = RTRIM(CAST(sa.score AS char(3)))+ ''%'' '
END
IF lower(@strGradeOption) = 'both'
BEGIN
SET @strSQL = @strSql + 'SubjectGrades = CASE '
SET @strSQL = @strSql + 'WHEN ss.score >= a_minimum '
SET @strSQL = @strSql + 'THEN ''A: '' + RTRIM(CAST(ss.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN ss.score >= b_minimum '
SET @strSQL = @strSql + 'THEN ''B: '' + RTRIM(CAST(ss.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN ss.score >= c_minimum '
SET @strSQL = @strSql + 'THEN ''C: '' + RTRIM(CAST(ss.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN ss.score >= d_minimum '
SET @strSQL = @strSql + 'THEN ''D: '' + RTRIM(CAST(ss.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'Else ''F: '' + RTRIM(CAST(ss.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'End '
SET @strSql = @strSql + ', '
SET @strSQL = @strSql + 'UnitGrades = CASE '
SET @strSQL = @strSql + 'WHEN su.score >= a_minimum '
SET @strSQL = @strSql + 'THEN ''A: '' + RTRIM(CAST(su.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN su.score >= b_minimum '
SET @strSQL = @strSql + 'THEN ''B: '' + RTRIM(CAST(su.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN su.score >= c_minimum '
SET @strSQL = @strSql + 'THEN ''C: '' + RTRIM(CAST(su.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN su.score >= d_minimum '
SET @strSQL = @strSql + 'THEN ''D: '' + RTRIM(CAST(su.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'Else ''F: '' + RTRIM(CAST(su.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'End '
SET @strSql = @strSql + ', '
SET @strSQL = @strSql + 'AssignmentGrades = CASE '
SET @strSQL = @strSql + 'WHEN sa.score >= a_minimum '
SET @strSQL = @strSql + 'THEN ''A: '' + RTRIM(CAST(sa.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN sa.score >= b_minimum '
SET @strSQL = @strSql + 'THEN ''B: '' + RTRIM(CAST(sa.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN sa.score >= c_minimum '
SET @strSQL = @strSql + 'THEN ''C: '' + RTRIM(CAST(sa.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN sa.score >= d_minimum '
SET @strSQL = @strSql + 'THEN ''D: '' + RTRIM(CAST(sa.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'Else ''F: '' + RTRIM(CAST(sa.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'End '
END
SET @strSql = @strSql + 'FROM student_subject ss '
SET @strSql = @strSql + 'INNER JOIN [user] on [user].user_id = ss.student_id '
SET @strSQL = @strSql + 'INNER JOIN student_unit su on ss.id = su.student_subject_id '
SET @strSql = @strSql + 'INNER JOIN term on su.term_id = term.term_id '
SET @strSQL = @strSql + 'INNER JOIN student_assignment sa on su.id = sa.student_unit_id '
SET @strSql = @strSql + 'WHERE su.term_id in ('
SET @strSql = @strSql + @strTermIds + ') '
SET @strSql = @strSql + 'AND User_id IN ('
SET @strSql = @strSql + @strStudentIds + ') '
SET @strSql = @strSql + 'AND ss.score is not null AND su.score is not null AND sa.score is not null '
SET @strSql = @strSql + 'ORDER BY username, ss.title, su.sequence_nbr, sa.sequence_nbr'
EXEC(@strSql)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GradeReportSubjectUnit]'
GO
IF OBJECT_ID('GradeReportSubjectUnit') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GradeReportSubjectUnit'
DROP PROC GradeReportSubjectUnit
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GradeReportSubjectUnit'
GO
CREATE Procedure GradeReportSubjectUnit
/* Param List */
@strGradeOption As char(25),
@strTermIds as varchar(100),
@strStudentIds as varChar(500)
AS
/******************************************************************************
** File:
** Name: GradeReportSubjectUnit
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SET NOCOUNT ON
DECLARE @strSql As VarChar(8000)
--Build sql statement
SET @strSql ='SELECT DISTINCT term.description, username, first_name + '' '' + last_name as ''displayname'', ss.title, su.title as ''UnitTitle'', su.sequence_nbr, '
IF lower(@strGradeOption) = 'letter'
BEGIN
SET @strSql = @strSql + 'SubjectGrades = CASE '
SET @strSql = @strSql + 'WHEN ss.score is null THEN '''' '
SET @strSql = @strSql + 'WHEN ss.score >= a_minimum THEN ''A'' '
SET @strSql = @strSql + 'WHEN ss.score >= b_minimum THEN ''B'' '
SET @strSql = @strSql + 'WHEN ss.score >= c_minimum THEN ''C'' '
SET @strSql = @strSql + 'WHEN ss.score >= d_minimum THEN ''D'' '
SET @strSql = @strSql + 'Else ''F'' '
SET @strSql = @strSql + 'End '
SET @strSql = @strSql + ', '
SET @strSql = @strSql + 'UnitGrades = CASE '
SET @strSql = @strSql + 'WHEN su.score is null THEN '''' '
SET @strSql = @strSql + 'WHEN su.score >= a_minimum THEN ''A'' '
SET @strSql = @strSql + 'WHEN su.score >= b_minimum THEN ''B'' '
SET @strSql = @strSql + 'WHEN su.score >= c_minimum THEN ''C'' '
SET @strSql = @strSql + 'WHEN su.score >= d_minimum THEN ''D'' '
SET @strSql = @strSql + 'Else ''F'' '
SET @strSql = @strSql + 'End '
END
IF lower(@strGradeOption) = 'percent'
BEGIN
SET @strSQL = @strSql + 'SubjectGrades = RTRIM(CAST(ss.score AS char(3)))+ ''%'' '
SET @strSql = @strSql + ', '
SET @strSQL = @strSql + 'UnitGrades = RTRIM(CAST(su.score AS char(3)))+ ''%'' '
END
IF lower(@strGradeOption) = 'both'
BEGIN
SET @strSQL = @strSql + 'SubjectGrades = CASE '
SET @strSQL = @strSql + 'WHEN ss.score >= a_minimum '
SET @strSQL = @strSql + 'THEN ''A: '' + RTRIM(CAST(ss.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN ss.score >= b_minimum '
SET @strSQL = @strSql + 'THEN ''B: '' + RTRIM(CAST(ss.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN ss.score >= c_minimum '
SET @strSQL = @strSql + 'THEN ''C: '' + RTRIM(CAST(ss.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN ss.score >= d_minimum '
SET @strSQL = @strSql + 'THEN ''D: '' + RTRIM(CAST(ss.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'Else ''F: '' + RTRIM(CAST(ss.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'End '
SET @strSql = @strSql + ', '
SET @strSQL = @strSql + 'UnitGrades = CASE '
SET @strSQL = @strSql + 'WHEN su.score >= a_minimum '
SET @strSQL = @strSql + 'THEN ''A: '' + RTRIM(CAST(su.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN su.score >= b_minimum '
SET @strSQL = @strSql + 'THEN ''B: '' + RTRIM(CAST(su.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN su.score >= c_minimum '
SET @strSQL = @strSql + 'THEN ''C: '' + RTRIM(CAST(su.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN su.score >= d_minimum '
SET @strSQL = @strSql + 'THEN ''D: '' + RTRIM(CAST(su.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'Else ''F: '' + RTRIM(CAST(su.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'End '
END
SET @strSql = @strSql + 'FROM student_subject ss '
SET @strSql = @strSql + 'INNER JOIN [user] on [user].user_id = ss.student_id '
SET @strSql = @strSql + 'INNER JOIN student_unit su on ss.id = su.student_subject_id '
SET @strSql = @strSql + 'INNER JOIN term on su.term_id = term.term_id '
SET @strSql = @strSql + 'WHERE su.term_id in ('
SET @strSql = @strSql + @strTermIds + ') '
SET @strSql = @strSql + 'AND User_id IN ('
SET @strSql = @strSql + @strStudentIds + ') '
SET @strSql = @strSql + 'AND ss.score is not null AND su.score is not null '
SET @strSql = @strSql + 'ORDER BY username, ss.title, su.sequence_nbr'
EXEC(@strSql)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[AttendanceReport]'
GO
IF OBJECT_ID('AttendanceReport') IS NOT NULL
BEGIN
PRINT N'-Dropping proc AttendanceReport'
DROP PROC AttendanceReport
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc AttendanceReport'
GO
CREATE Procedure AttendanceReport
@strTermId as varChar(100),
@strStudentIds as varChar(500)
AS
DECLARE @strSql As VarChar(8000)
--Build sql statement
SET @strSql ='SELECT t.description, u.username, u.first_name + '' '' + u.last_name as''displayname'', sa.calendar_year, sa.calendar_month, sa.calendar_days, ''attendance_day1'' = '' '', ''attendance_day2'' = '' '',''attendance_day3'' = '' '',''attendance_day4'' = '' '',''attendance_day5'' = '' '',''attendance_day6'' = '' '',''attendance_day7'' = '' '',''attendance_day8'' = '' '',''attendance_day9'' = '' '',''attendance_day10'' = '' '',''attendance_day11'' = '' '',''attendance_day12'' = '' '',''attendance_day13'' = '' '',''attendance_day14'' = '' '',''attendance_day15'' = '' '',''attendance_day16'' = '' '',''attendance_day17'' = '' '',''attendance_day18'' = '' '',''attendance_day19'' = '' '',''attendance_day20'' = '' '',''attendance_day21'' = '' '',''attendance_day22'' = '' '',''attendance_day23'' = '' '',''attendance_day24'' = '' '',''attendance_day25'' = '' '',''attendance_day26'' = '' '',''attendance_day27'' = '' '',''attendance_day28'' = '' '',''attendance_day29'' = '' '',''attendance_day30'' = '' '',''attendance_day31'' = '' '', ''month_count'' = ''0'' , ''total_count'' = ''0'', ''monthname'' = ''0'''
SET @strSQL = @strSql + ' from [user] u join student_attendance sa on u.[user_id] = sa.student_id '
SET @strSQL = @strSql + 'join term t on t.[term_id] = sa.term_id '
SET @strSql = @strSql + 'WHERE sa.term_id in ('
SET @strSql = @strSql + @strTermId + ') '
SET @strSql = @strSql + ' AND sa.student_id IN ('
SET @strSql = @strSql + @strStudentIds + ') '
SET @strSql = @strSql + 'ORDER BY u.username, sa.calendar_year, sa.calendar_month'
EXEC(@strSql)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GradeReportSubject]'
GO
IF OBJECT_ID('GradeReportSubject') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GradeReportSubject'
DROP PROC GradeReportSubject
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GradeReportSubject'
GO
CREATE Procedure GradeReportSubject
/* Param List */
@strGradeOption As char(25),
@strTermIds as varchar(100),
@strStudentIds as varChar(500)
AS
/******************************************************************************
** File:
** Name: GradeReportSubject
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SET NOCOUNT ON
DECLARE @strSql As VarChar(8000)
--Build sql statement
SET @strSql ='SELECT DISTINCT term.description, username, first_name + '' '' + last_name as ''displayname'', ss.title, '
IF lower(@strGradeOption) = 'letter'
BEGIN
SET @strSql = @strSql + 'SubjectGrades = CASE '
SET @strSql = @strSql + 'WHEN ss.score is null THEN '''' '
SET @strSql = @strSql + 'WHEN ss.score >= a_minimum THEN ''A'' '
SET @strSql = @strSql + 'WHEN ss.score >= b_minimum THEN ''B'' '
SET @strSql = @strSql + 'WHEN ss.score >= c_minimum THEN ''C'' '
SET @strSql = @strSql + 'WHEN ss.score >= d_minimum THEN ''D'' '
SET @strSql = @strSql + 'Else ''F'' '
SET @strSql = @strSql + 'End '
END
IF lower(@strGradeOption) = 'percent'
BEGIN
SET @strSQL = @strSql + 'SubjectGrades = RTRIM(CAST(ss.score AS char(3)))+ ''%'' '
END
IF lower(@strGradeOption) = 'both'
BEGIN
SET @strSQL = @strSql + 'SubjectGrades = CASE '
SET @strSQL = @strSql + 'WHEN ss.score >= a_minimum '
SET @strSQL = @strSql + 'THEN ''A: '' + RTRIM(CAST(ss.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN ss.score >= b_minimum '
SET @strSQL = @strSql + 'THEN ''B: '' + RTRIM(CAST(ss.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN ss.score >= c_minimum '
SET @strSQL = @strSql + 'THEN ''C: '' + RTRIM(CAST(ss.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'WHEN ss.score >= d_minimum '
SET @strSQL = @strSql + 'THEN ''D: '' + RTRIM(CAST(ss.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'Else ''F: '' + RTRIM(CAST(ss.score AS char(3))) + ''%'' '
SET @strSQL = @strSql + 'End '
END
SET @strSql = @strSql + 'FROM student_subject ss '
SET @strSql = @strSql + 'INNER JOIN [user] on [user].user_id = ss.student_id '
SET @strSql = @strSql + 'INNER JOIN student_unit su on ss.id = su.student_subject_id '
SET @strSql = @strSql + 'INNER JOIN term on su.term_id = term.term_id '
SET @strSql = @strSql + 'WHERE su.term_id in ('
SET @strSql = @strSql + @strTermIds + ') '
SET @strSql = @strSql + 'AND User_id IN ('
SET @strSql = @strSql + @strStudentIds + ') '
SET @strSql = @strSql + 'AND ss.score is not null '
SET @strSql = @strSql + 'ORDER BY username, ss.title'
EXEC(@strSql)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[TimeReport]'
GO
IF OBJECT_ID('TimeReport') IS NOT NULL
BEGIN
PRINT N'-Dropping proc TimeReport'
DROP PROC TimeReport
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc TimeReport'
GO
CREATE Procedure TimeReport
/* Param List */
@strTermIds as varchar(100),
@strStudentIds as varChar(500)
AS
/******************************************************************************
** File:
** Name: TimeReport
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SET NOCOUNT ON
DECLARE @strSql As VarChar(8000)
SET @strSql ='SELECT ss.student_id, u.username, u.first_name + '' '' + u.last_name as''displayname'', t.description, ss.title, sum(su.total_time) as total_time, ''hours'' = ''0'', ''minutes'' = ''0'', ''student_total_time'' = ''0'''
SET @strSql = @strSql + ' FROM student_subject ss '
SET @strSql = @strSql + ' INNER JOIN [user] u '
SET @strSql = @strSql + ' on u.user_id = ss.student_id '
SET @strSql = @strSql + ' INNER JOIN student_unit su '
SET @strSql = @strSql + ' on su.student_subject_id = ss.id '
SET @strSql = @strSql + ' INNER JOIN term t '
SET @strSql = @strSql + ' on t.term_id = su.term_id '
SET @strSql = @strSql + ' WHERE '
SET @strSql = @strSql + ' u.user_id IN ('
SET @strSql = @strSql + @strStudentIds + ') and '
SET @strSql = @strSql + ' t.term_id in (' + @strTermIds + ')'
SET @strSql = @strSql + ' GROUP BY t.description, u.username, u.last_name, u.first_name, ss.student_id, ss.title '
SET @strSql = @strSql + ' ORDER BY u.username, u.last_name, u.first_name, ss.title '
exec(@strSql)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetCustomTranscriptSubjects]'
GO
IF OBJECT_ID('GetCustomTranscriptSubjects') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetCustomTranscriptSubjects'
DROP PROC GetCustomTranscriptSubjects
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetCustomTranscriptSubjects'
GO
CREATE Procedure GetCustomTranscriptSubjects
/* Param List */
@strTermIds as varchar(100),
@strStudentId as varChar(100)
AS
/******************************************************************************
** File:
** Name: GetCustomTranscriptSubjects
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SET NOCOUNT ON
DECLARE @strSql As VarChar(8000)
--Build sql statement
SET @strSql ='SELECT transcript_subject_id, student_id, tsi.term_id, term.description, subject, grade, credit, ''grade_level'' = '' '' from transcript_subject_information tsi '
SET @strSql = @strSql + 'INNER JOIN term on tsi.term_id = term.term_id '
SET @strSql = @strSql + 'WHERE tsi.term_id in ('
SET @strSql = @strSql + @strTermIds + ') '
SET @strSql = @strSql + 'AND tsi.student_id IN ('
SET @strSql = @strSql + @strStudentId + ')'
SET @strSql = @strSql + 'ORDER BY tsi.term_id'
EXEC(@strSql)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetTranscript]'
GO
IF OBJECT_ID('GetTranscript') IS NOT NULL
BEGIN
PRINT N'-Dropping proc GetTranscript'
DROP PROC GetTranscript
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc GetTranscript'
GO
CREATE Procedure GetTranscript
/* Param List */
@strTermId as varchar(100),
@strStudentId as varChar(500)
AS
/******************************************************************************
** File:
** Name: GetTranscript
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SET NOCOUNT ON
DECLARE @strSql As VarChar(8000)
SET @strSql ='SELECT DISTINCT u.username, first_name + '' '' + last_name as ''displayname'', ss.title, count(su.title) as UnitCnt, '
SET @strSql = @strSql + 'completed_ind = CASE '
SET @strSql = @strSql + 'WHEN ss.[id] not in (SELECT DISTINCT ss.[id] '
SET @strSql = @strSql + 'FROM student_assignment sa '
SET @strSql = @strSql + 'JOIN student_unit su ON su.id = sa.student_unit_id '
SET @strSql = @strSql + 'JOIN student_subject ss ON ss.id = su.student_subject_id '
SET @strSql = @strSql + 'JOIN student_problem sp ON sp.student_assignment_id = sa.id '
SET @strSql = @strSql + 'JOIN [user] u ON u.[user_id] = ss.student_id '
SET @strSql = @strSql + 'WHERE ss.student_id = ' + @strStudentId + ' AND su.term_id = ' + @strTermId + ' AND '
SET @strSql = @strSql + 'sp.auto_graded_problem_ind = 0 AND sp.grading_completed_ind = 0 AND sp.student_completed_ind = 1 '
SET @strSql = @strSql + 'AND sp.assigned_ind = 1) and ss.completed_ind = 1 THEN ''Complete'' '
SET @strSql = @strSql + 'ELSE ''Incomplete'' '
SET @strSql = @strSql + 'END, '
SET @strSql = @strSql + 'Grade = CASE '
SET @strSql = @strSql + 'WHEN ss.score is null THEN ''I'' '
SET @strSql = @strSql + 'WHEN ss.score >= a_minimum THEN ''A'' '
SET @strSql = @strSql + 'WHEN ss.score >= b_minimum THEN ''B'' '
SET @strSql = @strSql + 'WHEN ss.score >= c_minimum THEN ''C'' '
SET @strSql = @strSql + 'WHEN ss.score >= d_minimum THEN ''D'' '
SET @strSql = @strSql + 'Else ''F'' '
SET @strSql = @strSql + 'End, '
SET @strSql = @strSql + 'Credit = CASE '
SET @strSql = @strSql + 'WHEN (count(su.title) >= 8) THEN ''1.0'' '
SET @strSql = @strSql + 'ELSE ''0.5'' '
SET @strSql = @strSql + 'END '
SET @strSql = @strSql + 'FROM student_subject ss '
SET @strSql = @strSql + 'INNER JOIN [user] u on u.user_id = ss.student_id '
SET @strSql = @strSql + 'INNER JOIN student_unit su on ss.id = su.student_subject_id '
SET @strSql = @strSql + 'INNER JOIN term on su.term_id = term.term_id '
SET @strSql = @strSql + 'WHERE su.term_id = ' + @strTermId
SET @strSql = @strSql + ' AND User_id = ' + @strStudentId
SET @strSql = @strSql + ' group BY u.username, u.first_name, u.last_name, ss.title, ss.[id], ss.completed_ind, ss.score, ss.a_minimum, ss.b_minimum, ss.c_minimum, ss.d_minimum'
EXEC(@strSql)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[PastDueReport]'
GO
IF OBJECT_ID('PastDueReport') IS NOT NULL
BEGIN
PRINT N'-Dropping proc PastDueReport'
DROP PROC PastDueReport
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc PastDueReport'
GO
CREATE Procedure PastDueReport
@strDate as varchar(100),
@strTermId as varChar(100),
@strStudentIds as varChar(500)
AS
DECLARE @strSql As VarChar(8000)
set @strSql='
SELECT
sa.title as ''assignment_title'',
isnull(u.first_name, '''') + '' '' + isnull(u.last_name, '''') as display_name,
u.username,
u.[user_id] as ''student_id'',
sa.due_date as due_date,
sa.sequence_nbr,
su.title as ''unit_title'',
ss.title as ''subject_title'',
t.description as ''term_title'',
PastDueDate = '' ''
FROM
student_assignment sa
JOIN student_unit su ON su.id = sa.student_unit_id
JOIN student_subject ss ON ss.id = su.student_subject_id
JOIN [user] u ON u.[user_id] = ss.student_id
JOIN term t on su.term_id = t.term_id
where u.user_id in (' + @strStudentIds + ')
and DATEDIFF(day,sa.due_date,CAST(''' + @strDate + ''' AS DATETIME)) > 0
and sa.completed_ind = 0
and su.term_id in (' + @strTermId + ')
'
set @strSql = @strSql + ' order by u.username, CAST(sa.due_date as DATETIME), subject_title, su.sequence_nbr, sa.sequence_nbr'
EXEC(@strSql)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating primary key [PK_daily_verse] on [dbo].[daily_verse]'
GO
ALTER TABLE [dbo].[daily_verse] ADD CONSTRAINT [PK_daily_verse] PRIMARY KEY CLUSTERED ([dayNumber])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Adding foreign keys to [dbo].[activity]'
GO
ALTER TABLE [dbo].[activity] ADD
CONSTRAINT [FK_activity_event] FOREIGN KEY ([event_id]) REFERENCES [dbo].[event] ([event_id]) ON DELETE CASCADE
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Adding foreign keys to [dbo].[reading_log]'
GO
ALTER TABLE [dbo].[reading_log] ADD
CONSTRAINT [FK_reading_log_user] FOREIGN KEY ([user_id]) REFERENCES [dbo].[user] ([user_id]) ON DELETE CASCADE
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Adding foreign keys to [dbo].[school_event_mm_user]'
GO
ALTER TABLE [dbo].[school_event_mm_user] ADD
CONSTRAINT [FK_school_event_mm_user_user] FOREIGN KEY ([user_id]) REFERENCES [dbo].[user] ([user_id]) ON DELETE CASCADE
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Adding foreign keys to [dbo].[transcript_information]'
GO
ALTER TABLE [dbo].[transcript_information] ADD
CONSTRAINT [FK_transcript_information_user] FOREIGN KEY ([user_id]) REFERENCES [dbo].[user] ([user_id]) ON DELETE CASCADE
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Adding foreign keys to [dbo].[transcript_subject_information]'
GO
ALTER TABLE [dbo].[transcript_subject_information] ADD
CONSTRAINT [FK_transcript_subject_information_user] FOREIGN KEY ([student_id]) REFERENCES [dbo].[user] ([user_id]) ON DELETE CASCADE,
CONSTRAINT [FK_transcript_subject_information_term] FOREIGN KEY ([term_id]) REFERENCES [dbo].[term] ([term_id]) ON DELETE CASCADE
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
IF OBJECT_ID('[dbo].[GetBibleVerses2]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetBibleVerses2]'
DROP PROC [dbo].[GetBibleVerses2]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetBibleVerses2]'
GO
CREATE Procedure [dbo].[GetBibleVerses2] ( @translation nvarchar(255), @book nvarchar(255), @chapter_from int, @chapter_to int, @verse_from int, @verse_to int ) AS
select count(*)
from bible
where book = @book
and translation = @translation
select * from bible where translation = @translation and book = @book and ( (@chapter_from = @chapter_to and @chapter_from = chapter and @verse_from <= verse_num and @verse_to >= verse_num )or ( @chapter_from <> @chapter_to and
( (@chapter_from = chapter and @verse_from <= verse_num) or (@chapter_to = chapter and @verse_to >= verse_num) ) )or (chapter > @chapter_from and chapter < @chapter_to) )
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering permissions on [dbo].[student_assignment]'
GO
--REVOKE SELECT ON [dbo].[student_assignment] TO [soshome11]
GO
PRINT N'Altering permissions on [dbo].[student_subject]'
GO
--REVOKE SELECT ON [dbo].[student_subject] TO [soshome11]
GO
PRINT N'Altering permissions on [dbo].[student_unit]'
GO
--REVOKE SELECT ON [dbo].[student_unit] TO [soshome11]
GO
PRINT N'Altering permissions on [dbo].[term]'
GO
--REVOKE SELECT ON [dbo].[term] TO [soshome11]
GO
PRINT N'Altering permissions on [dbo].[user]'
GO
--REVOKE SELECT ON [dbo].[user] TO [soshome11]
GO
IF EXISTS (SELECT * FROM #tmpErrors) ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT>0 BEGIN
PRINT 'The database update succeeded'
COMMIT TRANSACTION
END
ELSE PRINT 'The database update failed'
GO
DROP TABLE #tmpErrors
GO
/*
Run this script on:
(local).DMLCOMP - This database will be modified
to synchronize it with:
(local).soshome2012_goldendata
You are recommended to back up your database before running this script
Script created by SQL Data Compare version 8.0.1 from Red Gate Software Ltd at 02/24/2012 13:43:47
*/
SET NUMERIC_ROUNDABORT OFF
GO
SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS, NOCOUNT ON
GO
SET DATEFORMAT YMD
GO
SET XACT_ABORT ON
GO
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
GO
-- Pointer used for text / image updates. This might not be needed, but is declared here just in case
DECLARE @pv binary(16)
BEGIN TRANSACTION
-- Delete row from [dbo].[widget_app]
DELETE FROM [dbo].[widget_app] WHERE [id]=19
-- Update rows in [dbo].[widget_app]
UPDATE [dbo].[widget_app] SET [template]='
' WHERE [id]=21
UPDATE [dbo].[widget_app] SET [name]='WhereInWorld', [post_load_javascript]=' ' WHERE [id]=29
UPDATE [dbo].[widget_app] SET [post_load_javascript]=' ' WHERE [id]=31
UPDATE [dbo].[widget_app] SET [template]='
' WHERE [id]=33
-- Operation applied to 7 rows out of 7
-- Update rows in [dbo].[widget_content]
UPDATE [dbo].[widget_content] SET [data]='1879 - E. M. Forster' WHERE [id]=1
UPDATE [dbo].[widget_content] SET [data]='1836 - Queen Emma of Hawaii' WHERE [id]=2
UPDATE [dbo].[widget_content] SET [data]='1892 - John Ronald Reuel (J.R.R.) Tolkien' WHERE [id]=3
UPDATE [dbo].[widget_content] SET [data]='1785 - Jacob Grimm' WHERE [id]=4
UPDATE [dbo].[widget_content] SET [data]='1928 - Walter Mondale' WHERE [id]=5
UPDATE [dbo].[widget_content] SET [data]='1878 - Carl Sandburg' WHERE [id]=6
UPDATE [dbo].[widget_content] SET [data]='1922 - Jean-Pierre Rampal' WHERE [id]=7
UPDATE [dbo].[widget_content] SET [data]='1821 - General James Longstreet' WHERE [id]=8
UPDATE [dbo].[widget_content] SET [data]='1856 - John Hancock' WHERE [id]=12
UPDATE [dbo].[widget_content] SET [data]='1807 - General Napoleon Bonaparte Buford' WHERE [id]=13
UPDATE [dbo].[widget_content] SET [data]='1741 - Benedict Arnold' WHERE [id]=14
UPDATE [dbo].[widget_content] SET [data]='1929 - Martin Luther King, Jr.' WHERE [id]=15
UPDATE [dbo].[widget_content] SET [data]='1914- Roger Wagner' WHERE [id]=16
UPDATE [dbo].[widget_content] SET [data]='1763 - John Jacob Astor' WHERE [id]=17
UPDATE [dbo].[widget_content] SET [data]='1882 - A.A. Milne' WHERE [id]=18
UPDATE [dbo].[widget_content] SET [data]='1889 - Edgar Allan Poe' WHERE [id]=19
UPDATE [dbo].[widget_content] SET [data]='1930 - Edwin E "Buzz" Aldrin, Jr.' WHERE [id]=20
UPDATE [dbo].[widget_content] SET [data]='1738 - Ethan Allen' WHERE [id]=21
UPDATE [dbo].[widget_content] SET [data]='1788 - George Gordon, Lord Byron' WHERE [id]=22
UPDATE [dbo].[widget_content] SET [data]='1350 - Vincent Ferrer' WHERE [id]=23
UPDATE [dbo].[widget_content] SET [data]='1862 - Edith Wharton' WHERE [id]=24
UPDATE [dbo].[widget_content] SET [data]='1759 - Robert Burns' WHERE [id]=25
UPDATE [dbo].[widget_content] SET [data]='1843 - William McKinley' WHERE [id]=29
UPDATE [dbo].[widget_content] SET [data]='1930 - Gene Hackman' WHERE [id]=30
UPDATE [dbo].[widget_content] SET [data]='1872 - Zane Grey' WHERE [id]=31
UPDATE [dbo].[widget_content] SET [data]='1882 - James Joyce' WHERE [id]=33
UPDATE [dbo].[widget_content] SET [data]='1959 - Lawrence Taylor' WHERE [id]=35
UPDATE [dbo].[widget_content] SET [data]='1837 - Dwight L. Moody' WHERE [id]=36
UPDATE [dbo].[widget_content] SET [data]='1955 - John Grisham' WHERE [id]=39
UPDATE [dbo].[widget_content] SET [data]='1910 - Dominique Pire' WHERE [id]=41
UPDATE [dbo].[widget_content] SET [data]='1809 - Abraham Lincoln' WHERE [id]=43
UPDATE [dbo].[widget_content] SET [data]='1923 - Chuck Yeager' WHERE [id]=44
UPDATE [dbo].[widget_content] SET [data]='1859 - George Ferris' WHERE [id]=45
UPDATE [dbo].[widget_content] SET [data]='1809 - Cyrus Hall McCormick' WHERE [id]=46
UPDATE [dbo].[widget_content] SET [data]='1874 - Thomas J. Watson, Sr.' WHERE [id]=48
UPDATE [dbo].[widget_content] SET [data]='1892 - Wendell Wilkie' WHERE [id]=49
UPDATE [dbo].[widget_content] SET [data]='1927- Sidney Poitier' WHERE [id]=51
UPDATE [dbo].[widget_content] SET [data]='1907 - W. H. Auden' WHERE [id]=52
UPDATE [dbo].[widget_content] SET [data]='1810 - Frederic Francois Chopin' WHERE [id]=53
UPDATE [dbo].[widget_content] SET [data]='1685 - George Handel' WHERE [id]=54
UPDATE [dbo].[widget_content] SET [data]='1836 - Winslow Homer' WHERE [id]=55
UPDATE [dbo].[widget_content] SET [data]='1873 - Enrico Caruso' WHERE [id]=56
UPDATE [dbo].[widget_content] SET [data]='1829 - Levi Strauss' WHERE [id]=57
UPDATE [dbo].[widget_content] SET [data]='272 - Constantine the Great' WHERE [id]=58
UPDATE [dbo].[widget_content] SET [data]='1865 - Wilfred Grenfell' WHERE [id]=59
UPDATE [dbo].[widget_content] SET [data]='1840 - John Philip Holland' WHERE [id]=60
UPDATE [dbo].[widget_content] SET [data]='1924 - Donald (Deke) Slayton' WHERE [id]=61
UPDATE [dbo].[widget_content] SET [data]='1793 - Sam Houston' WHERE [id]=62
UPDATE [dbo].[widget_content] SET [data]='1840 - Chief Joseph' WHERE [id]=63
UPDATE [dbo].[widget_content] SET [data]='1888 - Knute Rockne' WHERE [id]=64
UPDATE [dbo].[widget_content] SET [data]='1836 Charles Goodnight' WHERE [id]=65
UPDATE [dbo].[widget_content] SET [data]='1806 - Elizabeth Barrett Browning' WHERE [id]=66
UPDATE [dbo].[widget_content] SET [data]='1849 - Luther Burbank' WHERE [id]=67
UPDATE [dbo].[widget_content] SET [data]='1824 - Leland Stanford' WHERE [id]=69
UPDATE [dbo].[widget_content] SET [data]='1903 -Claire Booth Luce' WHERE [id]=70
UPDATE [dbo].[widget_content] SET [data]='1936 - Antonin Scalia' WHERE [id]=71
UPDATE [dbo].[widget_content] SET [data]='1928 - Edward Albee' WHERE [id]=72
UPDATE [dbo].[widget_content] SET [data]='1855 - Percival Lowell' WHERE [id]=73
UPDATE [dbo].[widget_content] SET [data]='1920 - Hank Ketchum' WHERE [id]=74
UPDATE [dbo].[widget_content] SET [data]='1932 - Alan LaVern Bean' WHERE [id]=75
UPDATE [dbo].[widget_content] SET [data]='1926 - Jerry Lewis' WHERE [id]=76
UPDATE [dbo].[widget_content] SET [data]='1804 - Jim Bridger' WHERE [id]=77
UPDATE [dbo].[widget_content] SET [data]='1837 - Grover Cleveland' WHERE [id]=78
UPDATE [dbo].[widget_content] SET [data]='1891 - Earl Warren' WHERE [id]=79
UPDATE [dbo].[widget_content] SET [data]='43 B.C.- Ovid' WHERE [id]=80
UPDATE [dbo].[widget_content] SET [data]='1942 - John Irving' WHERE [id]=81
UPDATE [dbo].[widget_content] SET [data]='1908 - Louis L''Amour' WHERE [id]=82
UPDATE [dbo].[widget_content] SET [data]='1929 - Roger Bannister' WHERE [id]=83
UPDATE [dbo].[widget_content] SET [data]='1875 - Harry Houdini' WHERE [id]=84
UPDATE [dbo].[widget_content] SET [data]='1881 - Bela Bartok' WHERE [id]=85
UPDATE [dbo].[widget_content] SET [data]='1930 - Sandra Day O''Connor' WHERE [id]=86
UPDATE [dbo].[widget_content] SET [data]='1845 - Wilhelm Conrad Roentgen' WHERE [id]=87
UPDATE [dbo].[widget_content] SET [data]='1483 - Raphael' WHERE [id]=88
UPDATE [dbo].[widget_content] SET [data]='1918 - Sam Walton' WHERE [id]=89
UPDATE [dbo].[widget_content] SET [data]='1828 - Anna Sewell' WHERE [id]=90
UPDATE [dbo].[widget_content] SET [data]='1735 Franz Joseph Hayden' WHERE [id]=91
UPDATE [dbo].[widget_content] SET [data]='1873 - Sergei Rachmaninov' WHERE [id]=92
UPDATE [dbo].[widget_content] SET [data]='1875 - Walter Chrysler' WHERE [id]=93
UPDATE [dbo].[widget_content] SET [data]='1934 - Jane Goodall' WHERE [id]=94
UPDATE [dbo].[widget_content] SET [data]='1928 - Maya Angelou' WHERE [id]=95
UPDATE [dbo].[widget_content] SET [data]='1937 - Colin Powell' WHERE [id]=96
UPDATE [dbo].[widget_content] SET [data]='1770- William Wordsworth' WHERE [id]=98
UPDATE [dbo].[widget_content] SET [data]='1955 - Barbara Kingsolver' WHERE [id]=99
UPDATE [dbo].[widget_content] SET [data]='1847 - Joseph Pulitzer' WHERE [id]=101
UPDATE [dbo].[widget_content] SET [data]='1908 - Jane (Matilda) Bolin' WHERE [id]=102
UPDATE [dbo].[widget_content] SET [data]='1906 - Samuel Beckett' WHERE [id]=104
UPDATE [dbo].[widget_content] SET [data]='1889 - Arnold (Joseph) Toynbee' WHERE [id]=105
UPDATE [dbo].[widget_content] SET [data]='1452 - Leonardo da Vinci' WHERE [id]=106
UPDATE [dbo].[widget_content] SET [data]='1867 - Wilbur Wright' WHERE [id]=107
UPDATE [dbo].[widget_content] SET [data]='1741 - Samuel Chase' WHERE [id]=108
UPDATE [dbo].[widget_content] SET [data]='1882 - Leopold Stokowski' WHERE [id]=109
UPDATE [dbo].[widget_content] SET [data]='1832 - Lucretia Garfield' WHERE [id]=110
UPDATE [dbo].[widget_content] SET [data]='1920 - John Paul Stevens' WHERE [id]=111
UPDATE [dbo].[widget_content] SET [data]='1870 - Vladimir Lenin' WHERE [id]=113
UPDATE [dbo].[widget_content] SET [data]='1791 - James Buchanan' WHERE [id]=114
UPDATE [dbo].[widget_content] SET [data]='1533 - William of Orange' WHERE [id]=115
UPDATE [dbo].[widget_content] SET [data]='1874 - Gugilelmo Marconi' WHERE [id]=116
UPDATE [dbo].[widget_content] SET [data]='1822 - Ulysses S. Grant' WHERE [id]=118
UPDATE [dbo].[widget_content] SET [data]='1758 - James Monroe' WHERE [id]=119
UPDATE [dbo].[widget_content] SET [data]='1863 - William Randolph Hearst' WHERE [id]=120
UPDATE [dbo].[widget_content] SET [data]='1916 - Robert Shaw' WHERE [id]=121
UPDATE [dbo].[widget_content] SET [data]='1738 - King Kamehameha I' WHERE [id]=122
UPDATE [dbo].[widget_content] SET [data]='1729 - Catherine the Great' WHERE [id]=123
UPDATE [dbo].[widget_content] SET [data]='1469 - Niccolo Machiavelli' WHERE [id]=124
UPDATE [dbo].[widget_content] SET [data]='1928 - Hosni Mubarak' WHERE [id]=125
UPDATE [dbo].[widget_content] SET [data]='1818 - Karl Marx' WHERE [id]=126
UPDATE [dbo].[widget_content] SET [data]='1953 - Tony Blair' WHERE [id]=127
UPDATE [dbo].[widget_content] SET [data]='1840 - Peter Ilyich Tchaikovsky' WHERE [id]=128
UPDATE [dbo].[widget_content] SET [data]='1848 - Oscar Hammerstein' WHERE [id]=129
UPDATE [dbo].[widget_content] SET [data]='1860 - J.M. Barrie' WHERE [id]=130
UPDATE [dbo].[widget_content] SET [data]='1958 - Ellen Ochoa' WHERE [id]=131
UPDATE [dbo].[widget_content] SET [data]='1888 - Irving Berlin' WHERE [id]=132
UPDATE [dbo].[widget_content] SET [data]='1968 - Tony Hawk' WHERE [id]=133
UPDATE [dbo].[widget_content] SET [data]='1638 - Richard Simon' WHERE [id]=134
UPDATE [dbo].[widget_content] SET [data]='1944 - George Lucas' WHERE [id]=135
UPDATE [dbo].[widget_content] SET [data]='1937 - Madeleine Albright' WHERE [id]=136
UPDATE [dbo].[widget_content] SET [data]='1955 - Olga Korbut' WHERE [id]=137
UPDATE [dbo].[widget_content] SET [data]='1920 - Karol Wojtyla (Pope John Paul II)' WHERE [id]=139
UPDATE [dbo].[widget_content] SET [data]='1795 - John Hopkins' WHERE [id]=140
UPDATE [dbo].[widget_content] SET [data]='1915 - Moshe Dayan' WHERE [id]=141
UPDATE [dbo].[widget_content] SET [data]='1844 - Henri Rousseau' WHERE [id]=142
UPDATE [dbo].[widget_content] SET [data]='1813 - Richard Wagner' WHERE [id]=143
UPDATE [dbo].[widget_content] SET [data]='1951 - Anatoly Yevgenyevich Karpov' WHERE [id]=144
UPDATE [dbo].[widget_content] SET [data]='1819 - Queen Victoria' WHERE [id]=145
UPDATE [dbo].[widget_content] SET [data]='1865 - John Mott' WHERE [id]=146
UPDATE [dbo].[widget_content] SET [data]='1951 - Sally Ride' WHERE [id]=147
UPDATE [dbo].[widget_content] SET [data]='1923 - Henry Kissinger' WHERE [id]=148
UPDATE [dbo].[widget_content] SET [data]='1888 - Jim Thorpe' WHERE [id]=149
UPDATE [dbo].[widget_content] SET [data]='1903 - Bob Hope' WHERE [id]=150
UPDATE [dbo].[widget_content] SET [data]='1943 - Gale Sayers' WHERE [id]=151
UPDATE [dbo].[widget_content] SET [data]='1898 - Norman Vincent Peale' WHERE [id]=152
UPDATE [dbo].[widget_content] SET [data]='1804 - Mikhail Glinka' WHERE [id]=153
UPDATE [dbo].[widget_content] SET [data]='1840 - Thomas Hardy' WHERE [id]=154
UPDATE [dbo].[widget_content] SET [data]='1936 - Larry McMurtry' WHERE [id]=155
UPDATE [dbo].[widget_content] SET [data]='1917 - Charles Collingwood' WHERE [id]=156
UPDATE [dbo].[widget_content] SET [data]='1878 - Pancho Villa' WHERE [id]=157
UPDATE [dbo].[widget_content] SET [data]='1901 - Sukarno' WHERE [id]=158
UPDATE [dbo].[widget_content] SET [data]='1917 - Gwendolyn Brooks' WHERE [id]=159
UPDATE [dbo].[widget_content] SET [data]='1925 - Barbara Bush' WHERE [id]=160
UPDATE [dbo].[widget_content] SET [data]='1768 - Samuel Slater' WHERE [id]=161
UPDATE [dbo].[widget_content] SET [data]='1928 - Maurice Sendak' WHERE [id]=162
UPDATE [dbo].[widget_content] SET [data]='1910 - Jacques-Yves Cousteau' WHERE [id]=163
UPDATE [dbo].[widget_content] SET [data]='1924 - George Herbert Walker Bush' WHERE [id]=164
UPDATE [dbo].[widget_content] SET [data]='1865 - William Butler Yeats' WHERE [id]=165
UPDATE [dbo].[widget_content] SET [data]='1928 - Ernesto "Che" Guevara' WHERE [id]=166
UPDATE [dbo].[widget_content] SET [data]='1767 - Rachel Jackson' WHERE [id]=167
UPDATE [dbo].[widget_content] SET [data]='1723 - Adam Smith' WHERE [id]=168
UPDATE [dbo].[widget_content] SET [data]='1882 - Igor Stravinsky' WHERE [id]=169
UPDATE [dbo].[widget_content] SET [data]='1857 - Henry Clay Folger' WHERE [id]=170
UPDATE [dbo].[widget_content] SET [data]='1945 - Daw Aung San Suu Kyi' WHERE [id]=171
UPDATE [dbo].[widget_content] SET [data]='1950 - Nouri Al-Maliki' WHERE [id]=172
UPDATE [dbo].[widget_content] SET [data]='1982 - Prince William Windsor' WHERE [id]=173
UPDATE [dbo].[widget_content] SET [data]='1906 - Anne Morrow Lindbergh' WHERE [id]=174
UPDATE [dbo].[widget_content] SET [data]='1948 - Clarence Thomas' WHERE [id]=175
UPDATE [dbo].[widget_content] SET [data]='1915 - Norman Cousins' WHERE [id]=176
UPDATE [dbo].[widget_content] SET [data]='1954 - Sonia Sotomayor' WHERE [id]=177
UPDATE [dbo].[widget_content] SET [data]='1819 - Abner Doubleday' WHERE [id]=178
UPDATE [dbo].[widget_content] SET [data]='1872 - Paul Laurence Dunbar' WHERE [id]=179
UPDATE [dbo].[widget_content] SET [data]='1491 - King Henry VIII' WHERE [id]=180
UPDATE [dbo].[widget_content] SET [data]='1861 - Dr. William Mayo' WHERE [id]=181
UPDATE [dbo].[widget_content] SET [data]='1919 - Paul Yost' WHERE [id]=182
UPDATE [dbo].[widget_content] SET [data]='1819 - Herman Melville' WHERE [id]=183
UPDATE [dbo].[widget_content] SET [data]='1925 - Medgar Evers' WHERE [id]=184
UPDATE [dbo].[widget_content] SET [data]='1738 - John Singleton Copley' WHERE [id]=185
UPDATE [dbo].[widget_content] SET [data]='1872 - Calvin Coolidge' WHERE [id]=186
UPDATE [dbo].[widget_content] SET [data]='1958 - Bill Watterson' WHERE [id]=187
UPDATE [dbo].[widget_content] SET [data]='1935 - Dalai Lama' WHERE [id]=188
UPDATE [dbo].[widget_content] SET [data]='1980 - Michelle Kwan' WHERE [id]=189
UPDATE [dbo].[widget_content] SET [data]='1908 - Nelson Aldrich Rockefeller' WHERE [id]=190
UPDATE [dbo].[widget_content] SET [data]='1956 - Tom Hanks' WHERE [id]=191
UPDATE [dbo].[widget_content] SET [data]='1943 - Arthur Ashe' WHERE [id]=192
UPDATE [dbo].[widget_content] SET [data]='1767 - John Quincy Adams' WHERE [id]=193
UPDATE [dbo].[widget_content] SET [data]='100 B.C. - Julius Caesar' WHERE [id]=194
UPDATE [dbo].[widget_content] SET [data]='1864 - John Jacob Astor IV' WHERE [id]=195
UPDATE [dbo].[widget_content] SET [data]='1913 - Gerald Ford' WHERE [id]=196
UPDATE [dbo].[widget_content] SET [data]='1606 - Rembrandt' WHERE [id]=197
UPDATE [dbo].[widget_content] SET [data]='1954 - Angela Merkel' WHERE [id]=199
UPDATE [dbo].[widget_content] SET [data]='1504 - Heinrich Bullinger' WHERE [id]=200
UPDATE [dbo].[widget_content] SET [data]='1834 - Edgar Degas' WHERE [id]=201
UPDATE [dbo].[widget_content] SET [data]='1919 - Edmund Hillary' WHERE [id]=202
UPDATE [dbo].[widget_content] SET [data]='1938 - Janet Reno' WHERE [id]=203
UPDATE [dbo].[widget_content] SET [data]='1822 - Gregor Mendel' WHERE [id]=204
UPDATE [dbo].[widget_content] SET [data]='1909 - John William Finn' WHERE [id]=205
UPDATE [dbo].[widget_content] SET [data]='1783 - Simon Bolivar' WHERE [id]=206
UPDATE [dbo].[widget_content] SET [data]='1941 - Emmett Till' WHERE [id]=207
UPDATE [dbo].[widget_content] SET [data]='1739 - George Clinton' WHERE [id]=208
UPDATE [dbo].[widget_content] SET [data]='1882 - Geoffrey de Havilland' WHERE [id]=209
UPDATE [dbo].[widget_content] SET [data]='1929 - Jacqueline Kennedy Onassis' WHERE [id]=210
UPDATE [dbo].[widget_content] SET [data]='1883 - Benito Mussolini' WHERE [id]=211
UPDATE [dbo].[widget_content] SET [data]='1818 - Emily Bronte' WHERE [id]=212
UPDATE [dbo].[widget_content] SET [data]='1837 - William Clarke Quantrill' WHERE [id]=213
UPDATE [dbo].[widget_content] SET [data]='1819 - Herman Melville' WHERE [id]=214
UPDATE [dbo].[widget_content] SET [data]='1834 - Frederic Auguste Bartholdi' WHERE [id]=215
UPDATE [dbo].[widget_content] SET [data]='1926 - Tony Bennett' WHERE [id]=216
UPDATE [dbo].[widget_content] SET [data]='1961 - Barack Obama' WHERE [id]=217
UPDATE [dbo].[widget_content] SET [data]='1906 - John Huston' WHERE [id]=218
UPDATE [dbo].[widget_content] SET [data]='1861 - Edith Roosevelt' WHERE [id]=219
UPDATE [dbo].[widget_content] SET [data]='1945 - Alan Page' WHERE [id]=220
UPDATE [dbo].[widget_content] SET [data]='1879 - Emiliano Zapata' WHERE [id]=221
UPDATE [dbo].[widget_content] SET [data]='1631 - John Dryden' WHERE [id]=222
UPDATE [dbo].[widget_content] SET [data]='1928 - Jimmy Dean' WHERE [id]=223
UPDATE [dbo].[widget_content] SET [data]='1673 - Richard Mead' WHERE [id]=224
UPDATE [dbo].[widget_content] SET [data]='1881 - Cecil B. DeMille' WHERE [id]=225
UPDATE [dbo].[widget_content] SET [data]='1926 - Fidel Castro' WHERE [id]=226
UPDATE [dbo].[widget_content] SET [data]='1945 - Steve Martin' WHERE [id]=227
UPDATE [dbo].[widget_content] SET [data]='1912 - Julia Child' WHERE [id]=228
UPDATE [dbo].[widget_content] SET [data]='1882 - Robert Hichens' WHERE [id]=229
UPDATE [dbo].[widget_content] SET [data]='1926 - Jiang Zemin' WHERE [id]=230
UPDATE [dbo].[widget_content] SET [data]='1774 - Meriwether Lewis' WHERE [id]=231
UPDATE [dbo].[widget_content] SET [data]='1946 - Bill Clinton' WHERE [id]=232
UPDATE [dbo].[widget_content] SET [data]='1910 - Eero Saarinen' WHERE [id]=233
UPDATE [dbo].[widget_content] SET [data]='1973 - Sergey Brin' WHERE [id]=234
UPDATE [dbo].[widget_content] SET [data]='1934 - Norman Schwarzkopf' WHERE [id]=235
UPDATE [dbo].[widget_content] SET [data]='1868 - Edgar Lee Masters' WHERE [id]=236
UPDATE [dbo].[widget_content] SET [data]='1929 - Yasser Arafat' WHERE [id]=237
UPDATE [dbo].[widget_content] SET [data]='1918 - Leonard Bernstein' WHERE [id]=238
UPDATE [dbo].[widget_content] SET [data]='1935 - Geraldine A. Ferraro' WHERE [id]=239
UPDATE [dbo].[widget_content] SET [data]='1908 - Lyndon Baines Johnson' WHERE [id]=240
UPDATE [dbo].[widget_content] SET [data]='1774 - Elizabeth Ann Seton' WHERE [id]=241
UPDATE [dbo].[widget_content] SET [data]='1947 - Temple Grandin' WHERE [id]=242
UPDATE [dbo].[widget_content] SET [data]='1930 - Warren Buffett' WHERE [id]=243
UPDATE [dbo].[widget_content] SET [data]='1945 - Itzhak Perlman' WHERE [id]=244
UPDATE [dbo].[widget_content] SET [data]='1822 - Hiram R. Revels' WHERE [id]=245
UPDATE [dbo].[widget_content] SET [data]='1838 - Liliuokalani' WHERE [id]=246
UPDATE [dbo].[widget_content] SET [data]='1918 - Paul Harvey' WHERE [id]=248
UPDATE [dbo].[widget_content] SET [data]='1766 - John Dalton' WHERE [id]=249
UPDATE [dbo].[widget_content] SET [data]='1906 - Luis Federico Leloir' WHERE [id]=250
UPDATE [dbo].[widget_content] SET [data]='1533 - Queen Elizabeth I' WHERE [id]=251
UPDATE [dbo].[widget_content] SET [data]='1151 - Richard I (Richard the Lion Hearted)' WHERE [id]=252
UPDATE [dbo].[widget_content] SET [data]='1829 - Leo Tolstoy' WHERE [id]=253
UPDATE [dbo].[widget_content] SET [data]='1659 - Henry Purcell' WHERE [id]=254
UPDATE [dbo].[widget_content] SET [data]='1862 - O. Henry (William Sydney Porter)' WHERE [id]=255
UPDATE [dbo].[widget_content] SET [data]='1892 - Alfred A. Knopf' WHERE [id]=256
UPDATE [dbo].[widget_content] SET [data]='1916 - Roald Dahl' WHERE [id]=257
UPDATE [dbo].[widget_content] SET [data]='1965 - Dmitry Medvedev' WHERE [id]=258
UPDATE [dbo].[widget_content] SET [data]='1857 - William Howard Taft' WHERE [id]=259
UPDATE [dbo].[widget_content] SET [data]='1925 - B.B. King' WHERE [id]=260
UPDATE [dbo].[widget_content] SET [data]='1939 - David Souter' WHERE [id]=261
UPDATE [dbo].[widget_content] SET [data]='1951 - Ben Carson' WHERE [id]=262
UPDATE [dbo].[widget_content] SET [data]='1907 - Lewis F. Powell' WHERE [id]=263
UPDATE [dbo].[widget_content] SET [data]='1744 - Thomas Grosvenor' WHERE [id]=264
UPDATE [dbo].[widget_content] SET [data]='1645 - Louis Joliet' WHERE [id]=265
UPDATE [dbo].[widget_content] SET [data]='1515 - Anne of Cleves' WHERE [id]=266
UPDATE [dbo].[widget_content] SET [data]='1800 - William McGuffey' WHERE [id]=267
UPDATE [dbo].[widget_content] SET [data]='1936 - Jim Henson' WHERE [id]=268
UPDATE [dbo].[widget_content] SET [data]='1906 - Dmitri Shostakovich' WHERE [id]=269
UPDATE [dbo].[widget_content] SET [data]='1774 - John Chapman (Johnny Appleseed)' WHERE [id]=270
UPDATE [dbo].[widget_content] SET [data]='1840 - Thomas Nast' WHERE [id]=271
UPDATE [dbo].[widget_content] SET [data]='1887 - Avery Brundage' WHERE [id]=272
UPDATE [dbo].[widget_content] SET [data]='1901 - Enrico Fermi' WHERE [id]=273
UPDATE [dbo].[widget_content] SET [data]='1928 - Elie Wiesel' WHERE [id]=274
UPDATE [dbo].[widget_content] SET [data]='1931 - A.P.J. Abdul Kalam' WHERE [id]=275
UPDATE [dbo].[widget_content] SET [data]='1800 - Nat Turner' WHERE [id]=276
UPDATE [dbo].[widget_content] SET [data]='1916 - James Herriot' WHERE [id]=277
UPDATE [dbo].[widget_content] SET [data]='1822 - Rutherford B. Hayes' WHERE [id]=278
UPDATE [dbo].[widget_content] SET [data]='1829 - Chester A. Arthur' WHERE [id]=279
UPDATE [dbo].[widget_content] SET [data]='1955 - Tony Dungy' WHERE [id]=280
UPDATE [dbo].[widget_content] SET [data]='1931 - Desmond Tutu' WHERE [id]=281
UPDATE [dbo].[widget_content] SET [data]='1943 - R. L. Stine' WHERE [id]=282
UPDATE [dbo].[widget_content] SET [data]='1835 - Camille Saint-Saens' WHERE [id]=283
UPDATE [dbo].[widget_content] SET [data]='1963 - Daniel Pearl' WHERE [id]=284
UPDATE [dbo].[widget_content] SET [data]='1918 - Jerome Robbins' WHERE [id]=285
UPDATE [dbo].[widget_content] SET [data]='1872 - Ralph Vaughan Williams' WHERE [id]=286
UPDATE [dbo].[widget_content] SET [data]='1925 - Margaret Thatcher' WHERE [id]=287
UPDATE [dbo].[widget_content] SET [data]='1890 - Dwight D. Eisenhower' WHERE [id]=288
UPDATE [dbo].[widget_content] SET [data]='1829 - Asaph Hall' WHERE [id]=289
UPDATE [dbo].[widget_content] SET [data]='1890 - Michael Collins' WHERE [id]=290
UPDATE [dbo].[widget_content] SET [data]='1582 - Johann Gerhard' WHERE [id]=291
UPDATE [dbo].[widget_content] SET [data]='1854 - Charles Scribner' WHERE [id]=292
UPDATE [dbo].[widget_content] SET [data]='1967 - Amy Carter' WHERE [id]=293
UPDATE [dbo].[widget_content] SET [data]='1859 - John Dewey' WHERE [id]=294
UPDATE [dbo].[widget_content] SET [data]='1949 - Benjamin Netanyanhu' WHERE [id]=295
UPDATE [dbo].[widget_content] SET [data]='1903 - George Beadle' WHERE [id]=296
UPDATE [dbo].[widget_content] SET [data]='1835 - Adlai Stevenson' WHERE [id]=297
UPDATE [dbo].[widget_content] SET [data]='1632 - Antonie Van Leeuwenhoek' WHERE [id]=298
UPDATE [dbo].[widget_content] SET [data]='1340 - Geoffrey Chaucer' WHERE [id]=299
UPDATE [dbo].[widget_content] SET [data]='1947 - Hillary Clinton' WHERE [id]=300
UPDATE [dbo].[widget_content] SET [data]='1728 - James Cook' WHERE [id]=301
UPDATE [dbo].[widget_content] SET [data]='1955 - Bill Gates' WHERE [id]=302
UPDATE [dbo].[widget_content] SET [data]='1837 - Abraham Kuyper' WHERE [id]=303
UPDATE [dbo].[widget_content] SET [data]='1735 - John Adams' WHERE [id]=304
UPDATE [dbo].[widget_content] SET [data]='1451 - Christopher Columbus' WHERE [id]=305
UPDATE [dbo].[widget_content] SET [data]='1880 - Grantland Rice' WHERE [id]=306
UPDATE [dbo].[widget_content] SET [data]='1795 - James K. Polk' WHERE [id]=307
UPDATE [dbo].[widget_content] SET [data]='1793 - Stephan Austin' WHERE [id]=308
UPDATE [dbo].[widget_content] SET [data]='1916 - Walter Cronkite' WHERE [id]=309
UPDATE [dbo].[widget_content] SET [data]='1857 - Ida Tarbell' WHERE [id]=310
UPDATE [dbo].[widget_content] SET [data]='1976 - Pat Tillman' WHERE [id]=311
UPDATE [dbo].[widget_content] SET [data]='1867 - Marie Curie' WHERE [id]=312
UPDATE [dbo].[widget_content] SET [data]='1897 - Dorothy Day' WHERE [id]=313
UPDATE [dbo].[widget_content] SET [data]='1934 - Carl Sagan' WHERE [id]=314
UPDATE [dbo].[widget_content] SET [data]='1744 - Abigail Adams' WHERE [id]=316
UPDATE [dbo].[widget_content] SET [data]='1840 - Auguste Rodin' WHERE [id]=317
UPDATE [dbo].[widget_content] SET [data]='1856 - Louis D. Brandeis' WHERE [id]=318
UPDATE [dbo].[widget_content] SET [data]='1922 - Boutros Boutros Ghali' WHERE [id]=319
UPDATE [dbo].[widget_content] SET [data]='1708 - William Pitt' WHERE [id]=320
UPDATE [dbo].[widget_content] SET [data]='42 - Tiberius' WHERE [id]=321
UPDATE [dbo].[widget_content] SET [data]='1916 - Shelby Foote' WHERE [id]=322
UPDATE [dbo].[widget_content] SET [data]='1945 - Wilma Mankiller' WHERE [id]=323
UPDATE [dbo].[widget_content] SET [data]='1831 - James Garfield' WHERE [id]=324
UPDATE [dbo].[widget_content] SET [data]='1889 - Edwin Hubble' WHERE [id]=325
UPDATE [dbo].[widget_content] SET [data]='1908 - Elizabeth George Speare' WHERE [id]=326
UPDATE [dbo].[widget_content] SET [data]='1819 - George Eliot (Mary Ann Evans)' WHERE [id]=327
UPDATE [dbo].[widget_content] SET [data]='1804 - Franklin Pierce' WHERE [id]=328
UPDATE [dbo].[widget_content] SET [data]='1784 - Zachary Taylor' WHERE [id]=329
UPDATE [dbo].[widget_content] SET [data]='1844 - Karl Benz' WHERE [id]=330
UPDATE [dbo].[widget_content] SET [data]='1922 - Charles M. Schulz' WHERE [id]=331
UPDATE [dbo].[widget_content] SET [data]='1701 - Anders Celsius' WHERE [id]=332
UPDATE [dbo].[widget_content] SET [data]='1628 - John Bunyan' WHERE [id]=333
UPDATE [dbo].[widget_content] SET [data]='1832 - Louisa May Alcott' WHERE [id]=334
UPDATE [dbo].[widget_content] SET [data]='1835 - Mark Twain (Samuel Langhorne Clemens)' WHERE [id]=335
UPDATE [dbo].[widget_content] SET [data]='1117 - Thomas Becket' WHERE [id]=336
UPDATE [dbo].[widget_content] SET [data]='1859 - Georges Seurat' WHERE [id]=337
UPDATE [dbo].[widget_content] SET [data]='1826 - George B. McClellan' WHERE [id]=338
UPDATE [dbo].[widget_content] SET [data]='1443 - Pope Julius II' WHERE [id]=339
UPDATE [dbo].[widget_content] SET [data]='1782 - Martin Van Buren' WHERE [id]=340
UPDATE [dbo].[widget_content] SET [data]='1920 - David Brubeck' WHERE [id]=341
UPDATE [dbo].[widget_content] SET [data]='1905 - Gerard Kuiper' WHERE [id]=342
UPDATE [dbo].[widget_content] SET [data]='1886 - Diego Rivera' WHERE [id]=343
UPDATE [dbo].[widget_content] SET [data]='1848 - Joel Chandler Harris' WHERE [id]=344
UPDATE [dbo].[widget_content] SET [data]='1787 - Thomas Gallaudet' WHERE [id]=345
UPDATE [dbo].[widget_content] SET [data]='1918 - Alexander Solzhenitsyn' WHERE [id]=346
UPDATE [dbo].[widget_content] SET [data]='1745 - John Jay' WHERE [id]=347
UPDATE [dbo].[widget_content] SET [data]='1953 - Ben Bernanke' WHERE [id]=348
UPDATE [dbo].[widget_content] SET [data]='1896 - Jimmy Doolittle' WHERE [id]=349
UPDATE [dbo].[widget_content] SET [data]='37 - Nero' WHERE [id]=350
UPDATE [dbo].[widget_content] SET [data]='1485 - Catherine of Aragon' WHERE [id]=351
UPDATE [dbo].[widget_content] SET [data]='1908 - Willard Frank Libby' WHERE [id]=352
UPDATE [dbo].[widget_content] SET [data]='1707 - Charles Wesley' WHERE [id]=353
UPDATE [dbo].[widget_content] SET [data]='1926 - Jeanne Kirkpatrick' WHERE [id]=354
UPDATE [dbo].[widget_content] SET [data]='1901 - Louis I. Kahn' WHERE [id]=355
UPDATE [dbo].[widget_content] SET [data]='1879 - Joseph Stalin' WHERE [id]=356
UPDATE [dbo].[widget_content] SET [data]='1856 - Frank Kellogg' WHERE [id]=357
UPDATE [dbo].[widget_content] SET [data]='1777 - Alexander I' WHERE [id]=358
UPDATE [dbo].[widget_content] SET [data]='1745 - Benjamin Rush' WHERE [id]=359
UPDATE [dbo].[widget_content] SET [data]='1642 - Sir Isaac Newton' WHERE [id]=360
UPDATE [dbo].[widget_content] SET [data]='1792 - Charles Babbage' WHERE [id]=361
UPDATE [dbo].[widget_content] SET [data]='1571 - Johannes Kepler' WHERE [id]=362
UPDATE [dbo].[widget_content] SET [data]='1859 - Venustiano Carranza' WHERE [id]=363
UPDATE [dbo].[widget_content] SET [data]='1808 - Andrew Johnson' WHERE [id]=364
UPDATE [dbo].[widget_content] SET [data]='1867 - Simon Guggenheim' WHERE [id]=365
UPDATE [dbo].[widget_content] SET [data]='1869 - Henri Matisse' WHERE [id]=366
UPDATE [dbo].[widget_content] SET [data]='1942 - President Franklin D. Roosevelt and British Prime Minister Winston Churchill issue a declaration, signed by representatives of 26 countries to create the United Nations.' WHERE [id]=733
UPDATE [dbo].[widget_content] SET [data]='1788 - Georgia became the fourth state to ratify the U. S. Constitution.' WHERE [id]=734
UPDATE [dbo].[widget_content] SET [data]='1938 - Franklin Delano Roosevelt, who developed polio as an adult, founded the National Foundation for Infantile Paralysis, later renamed the March of Dimes Foundation.' WHERE [id]=735
UPDATE [dbo].[widget_content] SET [data]='1999 - Europe was united with a common currency for the first time since the 9th century. The Euro debuted as the monetary unit for business and investment markets for Austria, Belgium, Finland, France, Germany, Ireland, Italy, Luxembourg, the Netherlands, Portugal, and Spain.' WHERE [id]=736
UPDATE [dbo].[widget_content] SET [data]='1972 - President Richard Milhous Nixon signed the bill authorizing the funding to launch the space shuttle program.' WHERE [id]=737
UPDATE [dbo].[widget_content] SET [data]='1912 - New Mexico was admitted as the 47th state in the United States.' WHERE [id]=738
UPDATE [dbo].[widget_content] SET [data]='1789 - The first presidential election is held in the United States. Only white men who owned property were allowed to vote. ' WHERE [id]=739
UPDATE [dbo].[widget_content] SET [data]='1962 - Leonardo da Vinci''s masterpiece, the Mona Lisa was exhibited for the first time in the United States at the National Gallery of Art in Washington, D.C.' WHERE [id]=740
UPDATE [dbo].[widget_content] SET [data]='1768 - Englishman Philip Astley staged the first modern circus in London, England.' WHERE [id]=741
UPDATE [dbo].[widget_content] SET [data]='2008 - The New Delhi Auto Expo in India hosted the debut of the world''s cheapest car, the Nano, developed by Tata motors.' WHERE [id]=742
UPDATE [dbo].[widget_content] SET [data]='1908 - President Theodore Roosevelt declared the Grand Canyon in northwestern Arizona a national monument.' WHERE [id]=743
UPDATE [dbo].[widget_content] SET [data]='2010 - A magnitude 7.0 earthquake devastated the Caribbean island nation of Haiti leaving over 200,000 people dead and almost 1 million people homeless.' WHERE [id]=744
UPDATE [dbo].[widget_content] SET [data]='1966 - President Lyndon B. Johnson appointed Robert C. Weaver head of the Department of Housing and Urban Development (HUD), making him the first African-American cabinet member.' WHERE [id]=745
UPDATE [dbo].[widget_content] SET [data]='1784 - The Continental Congress ratified the Second Treaty of Paris, ending the War for Independence.' WHERE [id]=746
UPDATE [dbo].[widget_content] SET [data]='2009 - US Airways Captain Sullenberger III skillfully and safely landed the Airbus 320 plane he was piloting on New York''s Hudson River. All 155 people on board were safely rescued. ' WHERE [id]=747
UPDATE [dbo].[widget_content] SET [data]='1979 - Shah Mohammad Reza Pahlavi, the leader of Iran since 1941 was forced to leave Iran by violent demonstrations and a mutiny by the army. Ayatollah Ruhollah Khomeini, the spiritual leader of the Islamic Revolution returned from exile to take control of the country.' WHERE [id]=748
UPDATE [dbo].[widget_content] SET [data]='1945 - Soviet troops liberated Warsaw, the capital of Poland, from German occupation.' WHERE [id]=749
UPDATE [dbo].[widget_content] SET [data]='1778 - English explorer Captain James Cook became the first European to discover the Hawaiian Islands when he sailed past the island of Oahu. On January 20, 1778 he landed at Waimea on the island of Kauai and named the island group the Sandwich Islands.' WHERE [id]=750
UPDATE [dbo].[widget_content] SET [data]='1966 - Indira Gandhi became head of the Congress Party and Prime Minister of India. Gandhi, daughter of Jawaharlal Nehru, the first prime minister of the independent Republic of India, was India''s first female head of government.' WHERE [id]=751
UPDATE [dbo].[widget_content] SET [data]='1981 - Ronald Reagan was inaugurated the oldest President of the U.S.' WHERE [id]=752
UPDATE [dbo].[widget_content] SET [data]='1977 - President Jimmy Carter pardoned all of the Vietnam War draft dodgers.' WHERE [id]=753
UPDATE [dbo].[widget_content] SET [data]='1840 - A group led by British statesman, Edward G. Wakefield arrived at Port Nicholson on Auckland Island, New Zealand.' WHERE [id]=754
UPDATE [dbo].[widget_content] SET [data]='1968 - The USS Pueblo, a Navy intelligence vessel, engaged in a routine surveillance of the North Korean coast was captured by North Korean patrol boats.' WHERE [id]=755
UPDATE [dbo].[widget_content] SET [data]='1848 -The California gold rush started when James Marshall discovered gold along the banks of Sutter''s Creek, a tributary of the South Fork of the American River in the Sacramento valley.' WHERE [id]=756
UPDATE [dbo].[widget_content] SET [data]='1924 - The first Winter Olympics games began in Chamonix, France. There were 14 events involving 6 winter sports.' WHERE [id]=757
UPDATE [dbo].[widget_content] SET [data]='1950 - The Indian Constitution took effect on this day making the Republic of India the most populous democracy in the world.' WHERE [id]=758
UPDATE [dbo].[widget_content] SET [data]='1967 - Three American astronauts, Virgil "Gus" Grissom, Edward H. White, and Roger B. Chafee became the first Americans to die in a spacecraft. They were preparing for the Apollo 1 launch scheduled for the next month.' WHERE [id]=759
UPDATE [dbo].[widget_content] SET [data]='1973 - A cease-fire went into effect at 8:00 a.m. Saigon time between the forces of the South Vietnamese and the North Vietnamese. After it went into effect over 70,000 people were still killed before the end of the war.' WHERE [id]=760
UPDATE [dbo].[widget_content] SET [data]='1936- The U.S. Baseball Hall of Fame elected its first members in Cooperstown, New York: Ty Cobb, Babe Ruth, Honus Wagner, Christy Matthewson, and Walter Johnson.' WHERE [id]=761
UPDATE [dbo].[widget_content] SET [data]='1781 - Maryland became the 13th and final state to ratify the Articles of Confederation. These became the law of the land for eight years until the Constitutional Convention crafted the U. S. Constitution which took effect in 1789.' WHERE [id]=762
UPDATE [dbo].[widget_content] SET [data]='1865 - The U. S. House of Representatives passed the 13th Amendment to the Constitution abolishing slavery.' WHERE [id]=763
UPDATE [dbo].[widget_content] SET [data]='1790 - The Royal Exchange Building on New Your City''s Broad Street was home to the first session of the Supreme Court of the United States. Justice John Jay presided.' WHERE [id]=764
UPDATE [dbo].[widget_content] SET [data]='1887 - Punxsutawney, Pennsylvania became celebrated for the first time when a rodent meteorologist named Phil made his appearance at Gobbler''s Knob. The tradition says that when Phil the groundhog (also known as a woodchuck) comes out of his hole on this day and sees his shadow, there will be six more weeks of winter weather. No shadow means an early spring.' WHERE [id]=765
UPDATE [dbo].[widget_content] SET [data]='1944 - American forces invaded and took control of the Marshall Islands, long occupied by the Japanese. The U.S. then used the islands as a base for military operations.' WHERE [id]=766
UPDATE [dbo].[widget_content] SET [data]='1861 - Delegates from South Carolina, Mississippi, Florida, Alabama, Georgia, and Louisiana met in Montgomery, Alabama to establish the Confederate States of America.' WHERE [id]=767
UPDATE [dbo].[widget_content] SET [data]='1917 - Mexican President Carranza proclaimed the modern Mexican constitution. ' WHERE [id]=768
UPDATE [dbo].[widget_content] SET [data]='1952 - Elizabeth II became Queen of Great Britain and Northern Ireland upon the death of her father King George VI.' WHERE [id]=769
UPDATE [dbo].[widget_content] SET [data]='1984 - Space shuttle astronauts Bruce McCandless II and Robert L. Stewart went on the first untethered spacewalk.' WHERE [id]=770
UPDATE [dbo].[widget_content] SET [data]='1904 - When Russia said no to a Japanese plan to divide Manchuria and Korea, Japan launched a surprise attack against Port Arthur, a Russian naval base in China thus beginning the Russo-Japanese War.' WHERE [id]=771
UPDATE [dbo].[widget_content] SET [data]='1943 - The battle of Guadalcanal (an island in the southwest Pacific ocean) ended with an American victory over the Japanese.' WHERE [id]=772
UPDATE [dbo].[widget_content] SET [data]='1962 - The Soviet Union exchanged American U-2 pilot Francis Gary Powers for Rudolph Ivanovich Abel, a Soviet spy held by the United States.' WHERE [id]=773
UPDATE [dbo].[widget_content] SET [data]='1990 - Nelson Mandela, leader of the movement to end apartheid in South Africa was released from prison after 27 years. In 1994 he was elected president of South Africa.' WHERE [id]=774
UPDATE [dbo].[widget_content] SET [data]='1912 - Six year old Hsina-T''ung, the last emperor of China, was forced to give up his throne following Sun Yat-sen''s republican revolution. This ended 2,000 years of imperial rule. ' WHERE [id]=775
UPDATE [dbo].[widget_content] SET [data]='1990 - Agreement made to reunify Germany.' WHERE [id]=776
UPDATE [dbo].[widget_content] SET [data]='1929 - Penicillin was discovered by Sir Alexander Fleming, a young bacteriologist, after he realized that some mold had fallen on a plate containing bacteria and killed the bacteria.' WHERE [id]=777
UPDATE [dbo].[widget_content] SET [data]='1903 - Toy store owner and inventor Morris Michtorn placed two stuffed bears in the window of his shop advertised as Teddy Bears. He had asked President Theodore Roosevelt for permission to use his nickname for the bears.' WHERE [id]=778
UPDATE [dbo].[widget_content] SET [data]='1923- The burial chamber of King Tutankhamen''s recently unearthed tomb was unsealed in Egypt.' WHERE [id]=779
UPDATE [dbo].[widget_content] SET [data]='1972 - President Richard M. Nixon left Washington, D.C. to begin a historic trip to China. He was the first American President to go to China.' WHERE [id]=780
UPDATE [dbo].[widget_content] SET [data]='1861- Jefferson Davis was sworn in as president of the Confederate States of America in Montgomery, Alabama.' WHERE [id]=781
UPDATE [dbo].[widget_content] SET [data]='1878 - Thomas Alva Edison patented a music player at his laboratory in Menlo Park, New Jersey. ' WHERE [id]=782
UPDATE [dbo].[widget_content] SET [data]='1792 - President George Washington signed the Postal Service Act creating the first U. S. Post Office.' WHERE [id]=783
UPDATE [dbo].[widget_content] SET [data]='1848 - The "Communist Manifesto" by Karl Marx with help from Friedrich Engels was published.' WHERE [id]=784
UPDATE [dbo].[widget_content] SET [data]='1980 - The United States Olympic hockey team defeated the Soviet Union team at Lake Placid, New York in a stunning upset. The U.S. team went on to win the gold medal.' WHERE [id]=785
UPDATE [dbo].[widget_content] SET [data]='1954 - In a successful attempt to fight polio, a group of children from Arsenal Elementary School in Pittsburgh, Pennsylvania were the first group to receive injections of the Salk vaccine.' WHERE [id]=786
UPDATE [dbo].[widget_content] SET [data]='1868 - The United States House of Representatives voted to impeach President Andrew Johnson after he tried to dismiss Secretary of War Edwin M. Stanton. The Senate later acquitted him.' WHERE [id]=787
UPDATE [dbo].[widget_content] SET [data]='1870 - Hiram Rhoades Revels, a Republican from Natchez, Mississippi was sworn into the U.S. Senate to fill the seat once held by Jefferson Davis, former president of the Confederacy. Revels was the first African-American ever to sit in Congress.' WHERE [id]=788
UPDATE [dbo].[widget_content] SET [data]='1993 - A bomb exploded in the garage of the World Trade Center in New York City killing six people and injuring more than 1,000.' WHERE [id]=789
UPDATE [dbo].[widget_content] SET [data]='1922 - The Supreme Court unanimously declared as constitutional the 19th Amendment to the U. S. Constitution. This amendment guaranteed women the right to vote.' WHERE [id]=790
UPDATE [dbo].[widget_content] SET [data]='1784 - John Wesley chartered the first Methodist church in the United States.' WHERE [id]=791
UPDATE [dbo].[widget_content] SET [data]='1944 - General Douglas MacArthur led his forces in "Operation Brewer", the invasion of the Admiralty Islands in the Pacific.' WHERE [id]=792
UPDATE [dbo].[widget_content] SET [data]='1961 - President John F. Kennedy issued the Executive Order establishing the Peace Corps as a new agency within the Department of State.' WHERE [id]=793
UPDATE [dbo].[widget_content] SET [data]='1836 - Texas formally declared their independence from Mexico. The Convention of 1836 at Washington-on-the-Brazos adopted the formal declaration.' WHERE [id]=794
UPDATE [dbo].[widget_content] SET [data]='1887 - Anne Sullivan began teaching six-year-old Helen Keller.' WHERE [id]=795
UPDATE [dbo].[widget_content] SET [data]='1681 - William Penn was granted a charter for the land that later became Pennsylvania.' WHERE [id]=796
UPDATE [dbo].[widget_content] SET [data]='1963 - Arthur "Spud" Melin, co-founder of Wham-O corporation received a patent for the Hula Hoop.' WHERE [id]=797
UPDATE [dbo].[widget_content] SET [data]='1853 - The premier performance of La Traviata by Guiseppe Verdi took place at the La Fenice opera house in Venice, Italy.' WHERE [id]=798
UPDATE [dbo].[widget_content] SET [data]='1876 - 29 year-old Alexander Graham Bell received a patent for a new invention, the telephone.' WHERE [id]=799
UPDATE [dbo].[widget_content] SET [data]='1950 - Volkswagen, maker of the Beetle automobile, started production of the Volkswagen van.' WHERE [id]=800
UPDATE [dbo].[widget_content] SET [data]='1985 - The Tyler Civitan Club committed to pick up trash along a certain two-mile stretch of Texas Highway 69. They erected the Adopt-a-Highway sign to kick-off the program.' WHERE [id]=801
UPDATE [dbo].[widget_content] SET [data]='1785 - Thomas Jefferson replaced Benjamin Franklin as the U. S. Minister to France.' WHERE [id]=802
UPDATE [dbo].[widget_content] SET [data]='1818 - 21-year-old May Wollstonecraft Shelley published what is often called the first science fiction novel, Frankenstein.' WHERE [id]=803
UPDATE [dbo].[widget_content] SET [data]='1933 - President Franklin Delano Roosevelt gave his first national radio address, which he called a "fireside chat." It was broadcast directly from the White House.' WHERE [id]=804
UPDATE [dbo].[widget_content] SET [data]='1942 - The Quartermaster Corps of the United States Army began training dogs for the newly established War Dog Program, more commonly known as the K-9 Corps.' WHERE [id]=805
UPDATE [dbo].[widget_content] SET [data]='1900 - The U.S. Congress ratified the Gold Standard Act.' WHERE [id]=806
UPDATE [dbo].[widget_content] SET [data]='1965 - President Lyndon B. Johnson addressed a joint session of Congress urging them to pass legislation guaranteeing the right to vote to all citizens.' WHERE [id]=807
UPDATE [dbo].[widget_content] SET [data]='1968 - The My Lai Massacre was carried out by U. S. troops under the leadership of Lt. William L. Calley Jr.' WHERE [id]=808
UPDATE [dbo].[widget_content] SET [data]='1910 - The Camp Fire Girls (now known as Camp Fire Boys and Girls) organization was founded in Lake Sebago, Maine by Luther and Charlotte Gulick. ' WHERE [id]=809
UPDATE [dbo].[widget_content] SET [data]='1922 - Mahatma Gandhi began a six-year prison term for civil disobedience in India.' WHERE [id]=810
UPDATE [dbo].[widget_content] SET [data]='2003 - The United States along with coalition forces primarily from the United Kingdom began a war on Iraq, "Iraqi Freedom."' WHERE [id]=811
UPDATE [dbo].[widget_content] SET [data]='1948 - The first televised symphonic concert was broadcast on CBS-TV with help from it''s Philadelphia station. The concert featured Eugene Ormandy and the Philadelphia Symphony Orchestra from the Philadelphia Academy of Music. Ninety minutes later NBC televised Arturo Toscanini and the NBC Symphony Orchestra from Carnegie Hall in New York City.' WHERE [id]=812
UPDATE [dbo].[widget_content] SET [data]='1980 - President Jimmy Carter announced that the United States would boycott the Summer Olympic Games in Moscow, Russia because the Soviet Union did not withdraw its troops from Afghanistan by the February deadline.' WHERE [id]=813
UPDATE [dbo].[widget_content] SET [data]='1765 - The British government passed the Stamp Act. This law levied a tax on all printed material used for business or legal purposes. The colonist protested what they said was taxation with representation. The British government repealed the law the next year.' WHERE [id]=814
UPDATE [dbo].[widget_content] SET [data]='1965 - America''s first two -person space flight blasted-off as Gemini 3 lifted off the pad at Cape Kennedy with astronauts Virgil I. (Gus) Grissom and John W. Young aboard.' WHERE [id]=815
UPDATE [dbo].[widget_content] SET [data]='1949 - President Harry S. Truman signed a resolution authorizing $16 million in aid for Palestinian refugees left homeless and facing starvation after the Israeli War of Independence in 1948.' WHERE [id]=816
UPDATE [dbo].[widget_content] SET [data]='1967 - Reverend Martin Luther King, Jr. led a march of about 5,000 anti-war demonstrators in Chicago.' WHERE [id]=817
UPDATE [dbo].[widget_content] SET [data]='1885- The first commercial moving-picture film was produced at Eastman Kodak in Rochester, New York.' WHERE [id]=818
UPDATE [dbo].[widget_content] SET [data]='1912 - First Lady Helen Taft and Vicountess Chinda, wife of the Japanese ambassador, planted the first flowering cherry trees along the Potomac River in Washington, D.C.' WHERE [id]=819
UPDATE [dbo].[widget_content] SET [data]='1939 - The bloody three-year Spanish Civil war ended this day, when the defenders of Madrid raised the white flag over the city.' WHERE [id]=820
UPDATE [dbo].[widget_content] SET [data]='1981 - Just after speaking to a labor meeting, President Ronald Reagan was shot in the chest outside a Washington, D.C. hotel by John Hinckley, Jr.' WHERE [id]=822
UPDATE [dbo].[widget_content] SET [data]='1889 - The Eiffel Tower was dedicated in Paris, France. The tower designed by Gustav Eiffel was the world''s tallest man-made structure at the time. It was built in honor of 100 years since the French Revolution. Eiffel also designed the framework of the Statue of Liberty. ' WHERE [id]=823
UPDATE [dbo].[widget_content] SET [data]='1976 - Steve Jobs and Steve Wozniak co-founded Apple Computer, Inc. in Cupertino, California' WHERE [id]=824
UPDATE [dbo].[widget_content] SET [data]='1917 - Jeanette Pickering Rankin, the first woman ever elected to Congress, took her seat in the U.S. Capital as the representative from Montana.' WHERE [id]=825
UPDATE [dbo].[widget_content] SET [data]='1948 - President Harry S. Truman signed the Foreign Assistance Act, more commonly known as the Marshall Plan into law. ' WHERE [id]=826
UPDATE [dbo].[widget_content] SET [data]='1841 - President William Henry Harrison, the ninth president of the United States, died of pneumonia, one month after his inauguration.' WHERE [id]=827
UPDATE [dbo].[widget_content] SET [data]='1862 - Union forces under General George McClellan arrived at Yorktown, Virginia and established siege lines instead of directly attacking the Confederate forces.' WHERE [id]=828
UPDATE [dbo].[widget_content] SET [data]='1896 - The first modern Olympic Games were held in Athens, Greece.' WHERE [id]=829
UPDATE [dbo].[widget_content] SET [data]='1776 - Navy Captain John Barry, commander of the American warship Lexington, took command of the British warship HMS Edward off the coast of Virginia, This was the first time an American ship captured a British ship.' WHERE [id]=830
UPDATE [dbo].[widget_content] SET [data]='1939 - Marian Anderson performed a free open-air concert for over 75,000 people at the Lincoln Memorial in Washington, D.C. after the Daughters of the American Revolution denied her the right to sing at Constitution Hall because of her race.' WHERE [id]=832
UPDATE [dbo].[widget_content] SET [data]='1906 - O. Henry''s short story collection, "The Four Million" was published today. This collection included one of his best-known and most beloved stories, "The Gift of the Magi". O. Henry was the pen name of William Sydney Porter.' WHERE [id]=833
UPDATE [dbo].[widget_content] SET [data]='1898 - President William McKinley asked Congress for a declaration of war against Spain.' WHERE [id]=834
UPDATE [dbo].[widget_content] SET [data]='1981 - The space shuttle Columbia was launched from Cape Canaveral, Florida becoming the first reusable manned spacecraft to travel into space. The shuttle orbited from 54-hours before landing successfully at Edwards Air Force Base in California on April 14.' WHERE [id]=835
UPDATE [dbo].[widget_content] SET [data]='1902 - J. C. (James Cash) Penny opened his first store in Kemmerer, Wyoming.' WHERE [id]=836
UPDATE [dbo].[widget_content] SET [data]='1865 - President Abraham Lincoln was fatally shot by John Wilkes Booth at Ford''s Theater in Washington, D.C.' WHERE [id]=837
UPDATE [dbo].[widget_content] SET [data]='1912 - The British luxury liner, Titanic, sank in the North Atlantic off the coast of Newfoundland, less than three hours after striking an iceberg. About 1,500 people died.' WHERE [id]=838
UPDATE [dbo].[widget_content] SET [data]='1900 - The U.S. Postal Service issued the first book of stamps. The two-cent stamps were available in books of 12, 24, and 48 stamps.' WHERE [id]=839
UPDATE [dbo].[widget_content] SET [data]='1970 - Apollo 13 safely returned to Earth touching down in the Pacific Ocean. The lunar spacecraft had a problem when an oxygen tank exploded. ' WHERE [id]=840
UPDATE [dbo].[widget_content] SET [data]='1775 - Paul Revere and William Dawes set out on horseback across the Massachusetts countryside from Boston to Concord to warn the Minutemen of the approaching British troops.' WHERE [id]=841
UPDATE [dbo].[widget_content] SET [data]='1935 - Aviator Amelia Earhart became the first person to make a solo flight from Los Angeles to Mexico City. ' WHERE [id]=842
UPDATE [dbo].[widget_content] SET [data]='1902 - Pierre and Marie Curie isolated the radioactive element radium.' WHERE [id]=843
UPDATE [dbo].[widget_content] SET [data]='753 B.C. - Legend tells us that Rome was founded on seven hills by Romulus and his twin brother Remus. ' WHERE [id]=844
UPDATE [dbo].[widget_content] SET [data]='1889 - The Oklahoma land rush began at noon. Nearly two million acres of land in Indian Territory was opened to white settlers.' WHERE [id]=845
UPDATE [dbo].[widget_content] SET [data]='2005 - YouTube uploaded its first video.' WHERE [id]=846
UPDATE [dbo].[widget_content] SET [data]='1898 - Spain declared war on the United States after rejecting the American ultimatum to withdraw from Cuba.' WHERE [id]=847
UPDATE [dbo].[widget_content] SET [data]='1859 - Ground was broken to start work on the Suez Canal.' WHERE [id]=848
UPDATE [dbo].[widget_content] SET [data]='1986 - The world''s worst nuclear accident happened at the Chernobyl plant in the Soviet Union. An explosion and fire in a reactor sent radioactive particles into the atmosphere. ' WHERE [id]=849
UPDATE [dbo].[widget_content] SET [data]='1521 - Portuguese navigator, Ferdinand Magellan was killed during a fight on Mactan Island in the Philippines.' WHERE [id]=850
UPDATE [dbo].[widget_content] SET [data]='1947 - Norwegian explorer and writer Thor Heyerdahl set sail from Peru across the Pacific Ocean to the Polynesian islands. They sailed on a raft named the Kon-Tiki.' WHERE [id]=851
UPDATE [dbo].[widget_content] SET [data]='2004 - The National World War II Memorial opened to thousands of visitors in Washington, D.C. The monument recognized over 16 million U.S. men and women who served in the war. It was located on 7.4 acres of the National Mall between the Washington Monument and the Lincoln Memorial.' WHERE [id]=852
UPDATE [dbo].[widget_content] SET [data]='1789 - In New York City, George Washington was inaugurated as the first president of the United States.' WHERE [id]=853
UPDATE [dbo].[widget_content] SET [data]='1931 - President Herbert Hoover officially dedicated New York City''s Empire State Building. Hoover pressed a ceremonial button from the White House in Washington, D.C. and the lights were turned on.' WHERE [id]=854
UPDATE [dbo].[widget_content] SET [data]='2011 - Al Qaeda mastermind Osama Bin Laden was killed by US Navy Seal forces in Pakistan. ' WHERE [id]=855
UPDATE [dbo].[widget_content] SET [data]='1933 - Mrs. Nellie Ross became the first woman to direct the United States Mint when she took command on May 3, 1933.' WHERE [id]=856
UPDATE [dbo].[widget_content] SET [data]='1994 - Israeli Prime Minister Yitzhak Rabin and PLO Chairman Yasser Arafat reached an agreement in Cairo, Egypt on the first stage of Palestinian self-rule.' WHERE [id]=857
UPDATE [dbo].[widget_content] SET [data]='1821 - Napoleon Bonaparte, the former French Emperor, died on the remote island of Saint Helena in the southern Atlantic Ocean as a prisoner of the British.' WHERE [id]=858
UPDATE [dbo].[widget_content] SET [data]='1994 - Queen Elizabeth II and French President Francois Mitterrand formally opened the Channel Tunnel also called "The Chunnel" that runs below the English Channel.' WHERE [id]=859
UPDATE [dbo].[widget_content] SET [data]='1954 - Ho Chi Minh''s Viet Minh forces decisively defeated the French at Dien Bien Phu, a French stronghold, signaling the end of French colonial influence in Indochina.' WHERE [id]=860
UPDATE [dbo].[widget_content] SET [data]='1945 - President Harry S. Truman announced the end of World War II.' WHERE [id]=861
UPDATE [dbo].[widget_content] SET [data]='1914 - President Woodrow Wilson issued a presidential proclamation to officially establish the first Mother''s Day holiday to celebrate mothers.' WHERE [id]=862
UPDATE [dbo].[widget_content] SET [data]='1865 - Union forces captured Confederate President Jefferson Davis and his wife near Irwinville, Georgia.' WHERE [id]=863
UPDATE [dbo].[widget_content] SET [data]='1997 - IBM''s Deep Blue computer defeated Gary Kasparov winning a six-game chess match. Kasparov was widely regarded as the greatest chess master who ever lived. This was a second attempt by Deep Blue. Kasparov beat him once before. This was the first professional match Kasparov ever lost.' WHERE [id]=864
UPDATE [dbo].[widget_content] SET [data]='1937 - George VI was crowned King of the United Kingdom at a coronation ceremony after his brother King Edward VIII abdicated his throne.' WHERE [id]=865
UPDATE [dbo].[widget_content] SET [data]='2003 - The United States government unveiled a new version of the $20 bill, the first to be colorized.' WHERE [id]=866
UPDATE [dbo].[widget_content] SET [data]='1796 - English country doctor, Edward Jenner, administered his first smallpox vaccine.' WHERE [id]=867
UPDATE [dbo].[widget_content] SET [data]='1756 - The Seven Years War, more commonly known in America as the French and Indian War, officially began when England declared war on France, but small fights had been going on between the two in North America for years.' WHERE [id]=868
UPDATE [dbo].[widget_content] SET [data]='1929 - The Academy of Motion Picture Arts and Sciences handed out its first awards at a dinner for about 250 people in the Blossom Room of the Roosevelt Hotel in Hollywood, California.' WHERE [id]=869
UPDATE [dbo].[widget_content] SET [data]='1792 - The New York Stock Exchange was founded by 24 brokers. It is located in the financial district of Manhattan, on Wall Street. ' WHERE [id]=870
UPDATE [dbo].[widget_content] SET [data]='1980 - Mount Saint Helen''s volcano in Washington state exploded when a 5.1-magnitude earthquake rocked the mountain. The blast demolished an area about 230 miles around the mountain.' WHERE [id]=871
UPDATE [dbo].[widget_content] SET [data]='1967 - The Soviet Union ratified an agreement banning nuclear weapons from outer space. This was one of the first major treaties to limit the spread of nuclear weapons. The United States, Great Britain and several dozen other countries had already ratified or signed the treaty.' WHERE [id]=872
UPDATE [dbo].[widget_content] SET [data]='1873 - San Francisco businessman, Levi Strauss, and Reno tailor, Jacob Davis, were awarded a patent to create work pants with metal rivets, marking the birth of one of the world''s most famous garments, blue jeans.' WHERE [id]=873
UPDATE [dbo].[widget_content] SET [data]='1927 - Charles Lindbergh, flying in "The Spirit of St. Louis," completed the first nonstop transatlantic flight taking off from Roosevelt Field in New York and landing at Le Bourget Field in Paris, France.' WHERE [id]=874
UPDATE [dbo].[widget_content] SET [data]='1843 - A massive wagon train made up of 1,000 settlers and 1,000 head of cattle set off on the Oregon Train from Independence, Missouri. This was known as the Great Emigration. They completed their 2,000 mile journey to Oregon in five months.' WHERE [id]=875
UPDATE [dbo].[widget_content] SET [data]='1879 - Iowa State College in Ames, Iowa established the first veterinary school in the United States.' WHERE [id]=876
UPDATE [dbo].[widget_content] SET [data]='1883 - The Brooklyn Bridge over the East River opens to traffic. The bridge connected the boroughs of Brooklyn and Manhattan for the first time. It was the largest suspension bridge ever built at that time.' WHERE [id]=877
UPDATE [dbo].[widget_content] SET [data]='1977 - The Chinese government lifted its decade-old ban on the writings of William Shakespeare. Many took this as a sign of that Mao''s "Cultural Revolution" was easing.' WHERE [id]=878
UPDATE [dbo].[widget_content] SET [data]='1805 - French Emperor, Napoleon Bonaparte was crowned King of Italy.' WHERE [id]=879
UPDATE [dbo].[widget_content] SET [data]='1996 - Russian President Boris Yeltsin negotiated a cease-fire in the war with the Chechnyan rebel leader.' WHERE [id]=880
UPDATE [dbo].[widget_content] SET [data]='1863 - The 54th Massachusetts Infantry, the most famous African-American regiment of the Civil was left Boston for combat in the South. The unit saw action as soon as they landed in South Carolina. ' WHERE [id]=881
UPDATE [dbo].[widget_content] SET [data]='1953 - Mount Everest was conquered as Edmund Hillary of New Zealand and sherpa Tensing Norgay of Nepal became the first climbers to reach the summit.' WHERE [id]=882
UPDATE [dbo].[widget_content] SET [data]='1431 - Joan of Arc was burned at the stake for heresy at Rouen, in English-controlled Normandy, France. ' WHERE [id]=883
UPDATE [dbo].[widget_content] SET [data]='1961 - South Africa became an independent republic.' WHERE [id]=884
UPDATE [dbo].[widget_content] SET [data]='1831 - James Clark Ross discovered the magnetic North Pole.' WHERE [id]=885
UPDATE [dbo].[widget_content] SET [data]='1886 - President Grover Cleveland became the first sitting president to marry while in office. He and Frances Folsom were married in a White house ceremony. His daughter, Esther became the first child born to a president in a White House bedroom.' WHERE [id]=886
UPDATE [dbo].[widget_content] SET [data]='1965 - Astronaut Edward White became the first American to "walk" in space during the flight of Gemini 4.' WHERE [id]=887
UPDATE [dbo].[widget_content] SET [data]='1942 - One of the most decisive U.S. victories against the Japanese in World War II began today. The Battle of Midway was a four-day sea and air battle.' WHERE [id]=888
UPDATE [dbo].[widget_content] SET [data]='1967 - Israel responded to a build-up of Arab forces along its borders by launching attacks against Egypt and Syria. Jordan also entered the fighting, but in the end, the Arab forces could not match Israel''s armed forces. This was the beginning of the Six-Day War.' WHERE [id]=889
UPDATE [dbo].[widget_content] SET [data]='1933 - The first ever drive-in movie theater, located on Crescent Boulevard in Camden, New Jersey opened. The Park-In Theater allowed motorists to park their cars on the grounds and watch a movie from the car.' WHERE [id]=890
UPDATE [dbo].[widget_content] SET [data]='1913 - Hudson Stock, an Alaskan missionary, led the first successful ascent of Mt. McKinley, the highest point on the North American continent at 20,320 feet. Mt. McKinley is also known as Denali, the Athabasca Indian word for "The High One."' WHERE [id]=891
UPDATE [dbo].[widget_content] SET [data]='1783 - The Laki volcano exploded in Iceland killing over 9,000 people and causing a famine that lasted until 1790.' WHERE [id]=892
UPDATE [dbo].[widget_content] SET [data]='1931 - Robert Goddard patented the first rocket-powered aircraft design' WHERE [id]=893
UPDATE [dbo].[widget_content] SET [data]='1854 - The first class of midshipmen graduated from the U. S. Naval Academy at Annapolis, Maryland. ' WHERE [id]=894
UPDATE [dbo].[widget_content] SET [data]='1942 - The United States and the Soviet Union signed a lend-lease agreement to aid the Soviet war effort in World War II.' WHERE [id]=895
UPDATE [dbo].[widget_content] SET [data]='1987 - President Ronald Reagan publicly challenged Soviet leader Mikhail Gorbachev to "tear down this wall" while on a visit to the divided city of Berlin, Germany.' WHERE [id]=896
UPDATE [dbo].[widget_content] SET [data]='1967 - President Lyndon Johnson nominated Thurgood Marshall to become the first African-American Supreme Court Justice.' WHERE [id]=897
UPDATE [dbo].[widget_content] SET [data]='1940 - German troops entered Paris to start the occupation of World War II.' WHERE [id]=898
UPDATE [dbo].[widget_content] SET [data]='1215 - After a revolt by the English nobility against his rule, King John put his royal seal on the Magna Carta or "Great Charter." It was primarily a peace treaty between the King and his barons guaranteeing that the king would respect feudal rights, uphold the freedom of the church and maintain the laws of the nation.' WHERE [id]=899
UPDATE [dbo].[widget_content] SET [data]='1963 - Russian cosmonaut, Valentina Tereshokova became the first woman in space.' WHERE [id]=900
UPDATE [dbo].[widget_content] SET [data]='1885 - The Statue of Liberty arrived in New York City aboard the French ship "Isere."' WHERE [id]=901
UPDATE [dbo].[widget_content] SET [data]='1815 - Napoleon Bonaparte suffered defeat at the hands of the Duke of Wellington at Waterloo, Belgium. This defeat was the end of the Napoleonic era of European history.' WHERE [id]=902
UPDATE [dbo].[widget_content] SET [data]='1910 - Father''s Day was celebrated for the first time. It was not until 1966 that President Lyndon B. Johnson issued a presidential proclamation designating the third Sunday in June as Father''s Day and 1972 when President Richard M. Nixon signed a public law to make the official celebration permanent.' WHERE [id]=903
UPDATE [dbo].[widget_content] SET [data]='1900 - Chinese nationalists launched what was called the Boxer Rebellion in Peking, (Beijing) China in response to what they believed was other countries interfering in China''s national affairs.' WHERE [id]=904
UPDATE [dbo].[widget_content] SET [data]='1977 - Menachem Begin became Israel''s sixth Prime Minister.' WHERE [id]=905
UPDATE [dbo].[widget_content] SET [data]='1940 - France surrendered to Nazi Germany by signing an armistice and giving up their arms.' WHERE [id]=906
UPDATE [dbo].[widget_content] SET [data]='1956 - 99.95 percent of Egyptian voters elected Gamal Abdel Nasser as the first president of the Republic of Egypt. He was the only candidate on the ballot.' WHERE [id]=907
UPDATE [dbo].[widget_content] SET [data]='1948 - The Soviet Union blocked all road and rail traffic to and from West Berlin, causing the United States to begin a massive airlift of supplies into the city. The blockade became a diplomatic embarrassment for the Soviets, making them look like an international bully. The blockade ended on May 12, 1949.' WHERE [id]=908
UPDATE [dbo].[widget_content] SET [data]='1876 - Lt. Col. George A. Custer and his 7th Cavalry were wiped out by the Sioux and Cheyenne Indians in the Battle of the Little Big Horn.' WHERE [id]=909
UPDATE [dbo].[widget_content] SET [data]='1927 - The Cyclone roller coaster opened at Coney Island in Brooklyn, New York.' WHERE [id]=910
UPDATE [dbo].[widget_content] SET [data]='1922 - The American Library Association awarded the first Newberry Medal, honoring the best children''s book of the year, to Hendrik Willem van Loon for his book, "The Story of Mankind."' WHERE [id]=911
UPDATE [dbo].[widget_content] SET [data]='1914 - Archduke Francis Ferdinand was assassinated in Sarajevo by a Serbian nationalist. This event triggered World War I.' WHERE [id]=912
UPDATE [dbo].[widget_content] SET [data]='1995 - The American space shuttle Atlantis docked with the Russian space station Mir to form the largest man-made satellite ever to orbit Earth. It was also the 100th human space mission in American history.' WHERE [id]=913
UPDATE [dbo].[widget_content] SET [data]='1921 - Former President William Howard Taft was appointed Chief Justice of the Supreme Court.' WHERE [id]=914
UPDATE [dbo].[widget_content] SET [data]='1863 - The largest military conflict in North American history began this day when Union and Confederate forces collided at Gettysburg, Pennsylvania. The epic battle lasted three days.' WHERE [id]=915
UPDATE [dbo].[widget_content] SET [data]='1964 - President Lyndon B. Johnson signed the Civil Rights Act, prohibiting racial discrimination in employment and education. It also outlawed segregation in public places such as buses, parks, and swimming pools.' WHERE [id]=916
UPDATE [dbo].[widget_content] SET [data]='1608 - George Washington formally took command of the Continental Army in front of the troops gathered on the Cambridge common in Massachusetts.' WHERE [id]=917
UPDATE [dbo].[widget_content] SET [data]='1881 - Booker T. Washington opened the Tuskegee Institute in Alabama, the first school of higher learning for African-Americans in the United States.' WHERE [id]=918
UPDATE [dbo].[widget_content] SET [data]='1937 - Spam, the luncheon meat was introduced.' WHERE [id]=919
UPDATE [dbo].[widget_content] SET [data]='1886 - Chemist Louis Pasteur tested the first rabies vaccine on nine-year-old Joseph Meister, the victim of a rabid dog attack. The treatment was a success.' WHERE [id]=920
UPDATE [dbo].[widget_content] SET [data]='1958 - President Dwight D. Eisenhower signed the Alaska Statehood bill, allowing Alaska to become the 49th state on January 3, 1959.' WHERE [id]=921
UPDATE [dbo].[widget_content] SET [data]='1951 - Paris, the capital city of France, celebrated it''s 2,000 birthday. The "City of Lights" was founded around 250 B.C. when the Parisii tribe settled an island (known today as Ille de la Cite) in the Seine River, which runs through present day Paris.' WHERE [id]=922
UPDATE [dbo].[widget_content] SET [data]='1777 - New York state elected Brigadier George Clinton as the first governor of the independent state. He would become the longest serving governor in the United States.' WHERE [id]=923
UPDATE [dbo].[widget_content] SET [data]='1940 - The 114-day Battle of Britain began as Nazi forces began attacking southern England by air. By late October, Britain was able to repel the German air forces (Luftwaffe), which suffered heavy losses.' WHERE [id]=924
UPDATE [dbo].[widget_content] SET [data]='1979 - America''s first space station, Skylab, was destroyed as it re-entered the Earth''s atmosphere.' WHERE [id]=925
UPDATE [dbo].[widget_content] SET [data]='1862 - President Abraham Lincoln signed a measure into law that created the U.S. Army Medal of Honor. This medal was to go to those who distinguished themselves by their gallantry in action.' WHERE [id]=926
UPDATE [dbo].[widget_content] SET [data]='1977 - A 25-hour blackout hit the New York City area after lightening struck power lines in upstate New York.' WHERE [id]=927
UPDATE [dbo].[widget_content] SET [data]='1789 - The reign of Louis XVI came to an end when the people of France stormed the Bastille prison, marking the beginning of the French Revolution.' WHERE [id]=928
UPDATE [dbo].[widget_content] SET [data]='1918 - The Second Battle of the Marne began in the Champagne region of France. This would become the Germans final offensive push of the war.' WHERE [id]=929
UPDATE [dbo].[widget_content] SET [data]='1790 - Congress declared the swampy site on the Potomac River between Maryland and Virginia would become the nation''s permanent capital. "Washington" in the "District of Columbia was named after the young country''s first president, George Washington.' WHERE [id]=930
UPDATE [dbo].[widget_content] SET [data]='1945 - The final "Big Three" meeting between the United States, the Soviet Union, and Great Britain took place in the Berlin suburb of Potsdam, Germany. They discussed issues relating to Europe after the war and how to end the conflict with Japan.' WHERE [id]=931
UPDATE [dbo].[widget_content] SET [data]='1976 - Romanian gymnast, Nadia Comaneci broke the world record when she scored the most perfect scores (10) at an Olympic event.' WHERE [id]=932
UPDATE [dbo].[widget_content] SET [data]='1941 - British Prime Minister, Winston Churchill launched his "V for Victory" campaign in Europe. ' WHERE [id]=933
UPDATE [dbo].[widget_content] SET [data]='1881 - Sioux Chief Sitting Bull surrendered to Federal troops five years after General Custer''s infamous defeat at Little Big Horn Creek in Montana.' WHERE [id]=934
UPDATE [dbo].[widget_content] SET [data]='1970 - After 11 years of construction, the Aswan Hight Dam across the Nile River in Egypt was completed.' WHERE [id]=935
UPDATE [dbo].[widget_content] SET [data]='1942 - The systematic deportation of Jews from the Warsaw ghetto began. Thousands of people were rounded up and sent to concentration camps.' WHERE [id]=936
UPDATE [dbo].[widget_content] SET [data]='1996 - The United States won its first ever team gold medal in the Summer Olympic games in Atlanta, Georgia.' WHERE [id]=937
UPDATE [dbo].[widget_content] SET [data]='1866 - Tennessee became the first U.S. state readmitted to the Union after the Civil War.' WHERE [id]=938
UPDATE [dbo].[widget_content] SET [data]='1775 - The U.S. postal system was established with Benjamin Franklin serving as its first postmaster general.' WHERE [id]=939
UPDATE [dbo].[widget_content] SET [data]='1908 - The Federal Bureau of Investigation (FBI) was born when U. S. Attorney General Charles Bonaparte ordered a group of newly hired federal investigators to report to the Office of Chief Examiner, which was renamed the Bureau of Investigation. It became the Federal Bureau of Investigation in 1935.' WHERE [id]=940
UPDATE [dbo].[widget_content] SET [data]='1995 - The Korean War Veterans Memorial in Washington, D.C. opened to the public on the 42nd anniversary of the armistice that ended that conflict. The memorial was dedicated by U.S. President Bill Clinton and President Kim Young Sam of the Republic of Korea (South Korea).' WHERE [id]=941
UPDATE [dbo].[widget_content] SET [data]='1945 - The United States Senate approved the charter establishing the United Nations.' WHERE [id]=942
UPDATE [dbo].[widget_content] SET [data]='1914 - Transcontinental telephone service began.' WHERE [id]=943
UPDATE [dbo].[widget_content] SET [data]='1942 - The "WAVES" (Women Accepted for Volunteer Emergency Services) were created by legislation signed by President Franklin Delano Roosevelt. They became part of the U. S. Navy.' WHERE [id]=944
UPDATE [dbo].[widget_content] SET [data]='1715 - A hurricane struck the east coast of Florida sinking 10 Spanish treasure ships. All of the gold and silver onboard at the time was not fully recovered until the 1960s.' WHERE [id]=945
UPDATE [dbo].[widget_content] SET [data]='1944 - Anne Frank made the last entry in her diary.' WHERE [id]=946
UPDATE [dbo].[widget_content] SET [data]='1790 -The first U.S. census was conducted.' WHERE [id]=947
UPDATE [dbo].[widget_content] SET [data]='1492 - Christopher Columbus set sail on the Santa Maria along with 90 crewmen and two more ships, the Nina, and the Pinta. They left Spain searching for a westward passage to India. Instead they landed on San Salvador Island in the New World of the Americas.' WHERE [id]=948
UPDATE [dbo].[widget_content] SET [data]='1914 - Britain declared war on Germany while the United States said it would remain neutral.' WHERE [id]=949
UPDATE [dbo].[widget_content] SET [data]='2002 - The rusty gun turret of the U.S.S. Monitor broke from the water and into the daylight for the first time since 1862. It went down in a storm off Cape Hatteras, North Carolina during the Civil War.' WHERE [id]=950
UPDATE [dbo].[widget_content] SET [data]='1926 - 19-year-old Gertrude Ederle became the first woman to swim the 21 miles from Dover, England to Cape Griz-Nez, France across the English Channel.' WHERE [id]=951
UPDATE [dbo].[widget_content] SET [data]='1974 - French high-wire performer Philippe Petit shocked New Yorkers by walking across a wire between the World Trade Center towers, more than a quarter of a mile above the ground.' WHERE [id]=952
UPDATE [dbo].[widget_content] SET [data]='1988 - The Chicago Cubs hosted the first night game in the history of Wrigley Field, over 50 years after the first night game in major league baseball was played in Cincinnati, Ohio.' WHERE [id]=953
UPDATE [dbo].[widget_content] SET [data]='1945 - Three days after bombing Hiroshima, Japan the United States exploded a nuclear device over Nagasaki, Japan.' WHERE [id]=954
UPDATE [dbo].[widget_content] SET [data]='1993 - Ruth Bader Ginsburg was sworn in as a Justice of the Supreme Court of the United States.' WHERE [id]=955
UPDATE [dbo].[widget_content] SET [data]='1952 - The 20th century''s longest-serving executive head of state, King Hussein, was proclaimed king of Jordan. He was formally crowned on November 14, 1953, his 18th birthday. He ruled unit his death in 1999.' WHERE [id]=956
UPDATE [dbo].[widget_content] SET [data]='1981 - IBM (International Business Machines) introduced the Model 5150 Personal Computer, making IBM the #1 microcomputer company.' WHERE [id]=957
UPDATE [dbo].[widget_content] SET [data]='1969 - Apollo 11 astronauts were released from quarantine to be the honorees in a ticker-tape parade held in New York City.' WHERE [id]=958
UPDATE [dbo].[widget_content] SET [data]='1784 - Grigory Shelikhov, a Russian fur trader founded Three Saints Bay on Kodiak Island. It was the first permanent Russian settlement in Alaska.' WHERE [id]=959
UPDATE [dbo].[widget_content] SET [data]='1947 - The Indian Independence Bill created the independent states of India and Pakistan from the former Mogul Empire. The agreement ended 200 years of British rule.' WHERE [id]=960
UPDATE [dbo].[widget_content] SET [data]='1906 - An earthquake measured at around 8.2 hit Valparaiso, Chile. The earthquake damaged much of central Chile and was felt as faraway as Peru. Energy released from this quake created tsunamis in both Hawaii and Japan. ' WHERE [id]=961
UPDATE [dbo].[widget_content] SET [data]='1978 - The Double Eagle II became the first balloon to make a successful flight across the Atlantic Ocean landing near Paris, France 137 hours after lifting off from Preque Isle, Maine.' WHERE [id]=962
UPDATE [dbo].[widget_content] SET [data]='1227 - Mongol leader Genghis Khan died during a campaign against the Chinese kingdom of Xi Xia.' WHERE [id]=963
UPDATE [dbo].[widget_content] SET [data]='1909 - The first automobile race was held at the Indianapolis Motor Speedway, now home of the Indy 500.' WHERE [id]=964
UPDATE [dbo].[widget_content] SET [data]='1980 - Italian climber Reinhold Messner made the first solo ascent of Mount Everest without the use of oxygen.' WHERE [id]=965
UPDATE [dbo].[widget_content] SET [data]='1911 - An amateur painter discovered that Leonardo da Vinci''s masterpiece, the Mona Lisa, had been stolen from the Louvre museum in Paris, France.' WHERE [id]=966
UPDATE [dbo].[widget_content] SET [data]='1902 - President Theodore Roosevelt became the first chief executive of the United States to ride in an automobile.' WHERE [id]=967
UPDATE [dbo].[widget_content] SET [data]='1966 - NASA''s Lunar Orbiter 1 took the first photograph of Earth from orbit.' WHERE [id]=968
UPDATE [dbo].[widget_content] SET [data]='1991 - Mikhail Gorbachev resigned as the head of the Communist Party, beginning the breakup of the Soviet Union.' WHERE [id]=969
UPDATE [dbo].[widget_content] SET [data]='1609 - Galileo Galilei demonstrated his telescope for the first time. He showed it to the lawmakers of Venice, Italy.' WHERE [id]=970
UPDATE [dbo].[widget_content] SET [data]='1920 - The 19th amendment to the United States Constitution was adopted, giving women the right to vote.' WHERE [id]=971
UPDATE [dbo].[widget_content] SET [data]='1963 - Dr. Martin Luther King, Jr. delivered his "I Have a Dream" speech in front of the Lincoln Memorial.' WHERE [id]=972
UPDATE [dbo].[widget_content] SET [data]='1955 - 14-year-old Emmett Till, an African-American boy from Chicago, Illinois was murdered while visiting Money, Mississippi. His murder trial focused light on the Jim Crow segregation in the South and was an early impetus to the Civil Rights movement.' WHERE [id]=973
UPDATE [dbo].[widget_content] SET [data]='1958 - The United States Air Force Academy opened.' WHERE [id]=974
UPDATE [dbo].[widget_content] SET [data]='1963 - The hot-line communications link between Washington, D.C. and Moscow went into operation to help prevent an accidental war. This happened just months after the Cuban Missile Crisis.' WHERE [id]=975
UPDATE [dbo].[widget_content] SET [data]='1980 - Representatives of the communist government of Poland agreed to the demands of the striking shipyard workers in the city of Gdansk. The strikers were led by Lech Walesa, who went on to form the first independent labor union, Solidarity, in a Soviet bloc nation.' WHERE [id]=976
UPDATE [dbo].[widget_content] SET [data]='1939 - Nazi Germany invaded Poland. This action was the beginning of World War II.' WHERE [id]=977
UPDATE [dbo].[widget_content] SET [data]='1945 - Japan formally surrendered to the Allies aboard the USS Missouri, which was anchored in Tokyo Bay.' WHERE [id]=978
UPDATE [dbo].[widget_content] SET [data]='1777 - The American flag, the Stars and Stripes, was flown in battle for the first time during the Revolutionary War skirmish at Cooch''s Bridge, Delaware.' WHERE [id]=979
UPDATE [dbo].[widget_content] SET [data]='1886 -Apache chief Geronimo surrendered to U. S. government troops after 30 years of fighting to protect his tribe''s homeland.' WHERE [id]=980
UPDATE [dbo].[widget_content] SET [data]='1836 - The Republic of Texas elected Sam Houston as its first president.' WHERE [id]=981
UPDATE [dbo].[widget_content] SET [data]='1995 - Cal Ripken, Jr. played 2131 straight games, breaking Lou Gehrig''s record. Ripken played in a total of 2, 632 games in a row before choosing to sit out a game on September 20, 1998.' WHERE [id]=982
UPDATE [dbo].[widget_content] SET [data]='70 - The city of Jerusalem fell to the forces of Roman emperor Titus, who ordered the destruction of the Jewish Second Temple.' WHERE [id]=983
UPDATE [dbo].[widget_content] SET [data]='1974 - President Gerald Ford granted an unconditional pardon to his predecessor, Richard M. Nixon for any crimes he may have committed or participated in while in office.' WHERE [id]=984
UPDATE [dbo].[widget_content] SET [data]='1850 - California became the 31st state in the Union only two years after being ceded to the United States by Mexico. It was never a territory.' WHERE [id]=985
UPDATE [dbo].[widget_content] SET [data]='1955 - Gunsmoke began it''s 20 year run on television, longer than any other prime-time network series.' WHERE [id]=986
UPDATE [dbo].[widget_content] SET [data]='1789 - Alexander Hamilton became the first Secretary of the Treasury of the United States.' WHERE [id]=987
UPDATE [dbo].[widget_content] SET [data]='1940 - A collection of prehistoric cave paintings were discovered by four teenagers who followed their dog down a narrow entrance into a cavern near Montignac, France.' WHERE [id]=988
UPDATE [dbo].[widget_content] SET [data]='1948 - Margaret Chase Smith won election to the United States Senate, making her the first woman to serve in both houses of Congress.' WHERE [id]=989
UPDATE [dbo].[widget_content] SET [data]='1901 - President William McKinley died of gunshot wounds he received on September 6. Vice President Theodore Roosevelt was immediately sworn in as president.' WHERE [id]=990
UPDATE [dbo].[widget_content] SET [data]='1858 - The first transcontinental mail service from St. Louis, Missouri to San Francisco, California began.' WHERE [id]=991
UPDATE [dbo].[widget_content] SET [data]='1985 - Steve Jobs left Apple following a power struggle in the company''s leadership.' WHERE [id]=992
UPDATE [dbo].[widget_content] SET [data]='1849 - Harriet Tubman and her brothers Ben and Henry escaped from slavery. Ben and Henry eventually turned back, but Harriet continued her journey to freedom.' WHERE [id]=993
UPDATE [dbo].[widget_content] SET [data]='1870 - Old Faithful Geyser, in Yellowstone National Park (Wyoming), was observed and named by Henry D. Washburn.' WHERE [id]=994
UPDATE [dbo].[widget_content] SET [data]='1928 - Mickey Mouse debuted on screen.' WHERE [id]=995
UPDATE [dbo].[widget_content] SET [data]='1881 - Chester Arthur became the third president to serve in one year. Rutherford B. Hayes'' one term in office ended with the inauguration of James A. Garfield, who was shot on July 2. Arthur then was sworn in the day after Garfield''s death.' WHERE [id]=996
UPDATE [dbo].[widget_content] SET [data]='1792 - In Revolutionary France, the Legislative Assembly voted to abolish the monarchy and establish the First French Republic.' WHERE [id]=997
UPDATE [dbo].[widget_content] SET [data]='1862 - President Abraham Lincoln issued a preliminary Emancipation Proclamation which set a date for freedom for more than 3 million black slaves in the United States.' WHERE [id]=998
UPDATE [dbo].[widget_content] SET [data]='1846 - German astronomer Johann Gottfried Galle discovered the planet Neptune.' WHERE [id]=999
UPDATE [dbo].[widget_content] SET [data]='1996 - President Bill Clinton signed the Comprehensive Nuclear Test Ban Treaty at the United Nations.' WHERE [id]=1000
UPDATE [dbo].[widget_content] SET [data]='1981 - Sandra Day O''Connor was sworn in as the first woman justice of the Supreme Court of the United States.' WHERE [id]=1001
UPDATE [dbo].[widget_content] SET [data]='1580 - British sea captain, Sir Francis Drake finished circumnavigating the Earth.' WHERE [id]=1002
UPDATE [dbo].[widget_content] SET [data]='1905 - Albert Einstein published a paper in a German journal of physics, introducing his theory of relativity, the equation E=MC2.' WHERE [id]=1003
UPDATE [dbo].[widget_content] SET [data]='1928 - Alexander Fleming noticed a bacteria-killing fungus in his lab, accidentally discovering penicillin.' WHERE [id]=1004
UPDATE [dbo].[widget_content] SET [data]='2005 - John Roberts was sworn in as the 17th Chief Justice of the United States Supreme Court.' WHERE [id]=1005
UPDATE [dbo].[widget_content] SET [data]='1962 - Labor leader Cesar Chavez founded the United Farm Workers union.' WHERE [id]=1006
UPDATE [dbo].[widget_content] SET [data]='1971 - Walt Disney World opened in Orlando, Florida.' WHERE [id]=1007
UPDATE [dbo].[widget_content] SET [data]='1967 - Thurgood Marshall was sworn in as a justice by Chief Justice Earl Warren. Marshall was the first black justice of the U.S. Supreme Court.' WHERE [id]=1008
UPDATE [dbo].[widget_content] SET [data]='1955 - War hero Bob Keeshan debuted as Captain Kangaroo on CBS.' WHERE [id]=1009
UPDATE [dbo].[widget_content] SET [data]='1824 - Following the overthrow of the Mexican emperor Agustin I, a constitution was adopted and the Mexican Republic declared.' WHERE [id]=1010
UPDATE [dbo].[widget_content] SET [data]='1983 - Polish Solidarity leader, Lech Walesa, won the Nobel Peace Prize for his work with labor unions and human rights.' WHERE [id]=1011
UPDATE [dbo].[widget_content] SET [data]='1927 - The era of talking motion pictures arrived with the opening of the Jazz Singer, starring Al Jolson.' WHERE [id]=1012
UPDATE [dbo].[widget_content] SET [data]='1886 - Slavery was abolished in Cuba.' WHERE [id]=1013
UPDATE [dbo].[widget_content] SET [data]='1956 - Don Larsen pitched the only perfect game in a World Series helping the New York Yankees beat the defending Brooklyn Dodgers.' WHERE [id]=1014
UPDATE [dbo].[widget_content] SET [data]='1855 - Isaac Singer patented his sewing machine.' WHERE [id]=1015
UPDATE [dbo].[widget_content] SET [data]='1943 - Chiang Kai-Shek took the oath of office as president of China.' WHERE [id]=1016
UPDATE [dbo].[widget_content] SET [data]='1910 - Theodore Roosevelt became the first president to fly in an airplane.' WHERE [id]=1017
UPDATE [dbo].[widget_content] SET [data]='1973 - President Richard M. Nixon nominated House Minority Leader Gerald Ford to succeed Spiro Agnew as Vice President.' WHERE [id]=1018
UPDATE [dbo].[widget_content] SET [data]='1981 - Egyptians elected Vice President Hosni Mubarak as the new president, one week after the assassination of Anwar Sadat.' WHERE [id]=1019
UPDATE [dbo].[widget_content] SET [data]='1926 - A. A. Milne published his classic children''s book, Winnie-the-Pooh.' WHERE [id]=1020
UPDATE [dbo].[widget_content] SET [data]='1993 - Nelson Mandela and F.W. de Klerk won the Nobel Peace Prize for their efforts to end apartheid in South Africa.' WHERE [id]=1021
UPDATE [dbo].[widget_content] SET [data]='1793 - Marie Antoinette, Queen of France, was beheaded during the French Revolution.' WHERE [id]=1022
UPDATE [dbo].[widget_content] SET [data]='1835 - Texans approved a resolution to create the Texas Rangers a corps of armed, mounted lawmen designed to guard the frontier between the Brazos and Trinity Rivers.' WHERE [id]=1023
UPDATE [dbo].[widget_content] SET [data]='1997 - The Memorial for Women in Military Service was dedicated. It sits at the entrance to Arlington National Cemetery just across the Potomac River from Washington, D.C.' WHERE [id]=1024
UPDATE [dbo].[widget_content] SET [data]='1951 - President Harry S. Truman signed the act formally ending the War with Germany.' WHERE [id]=1025
UPDATE [dbo].[widget_content] SET [data]='2005 - Saddam Hussein went on trial in Baghdad for crimes against humanity.' WHERE [id]=1026
UPDATE [dbo].[widget_content] SET [data]='1805 - The British Fleet defeated the combined forces of France and Spain in the Battle of Trafalgar.' WHERE [id]=1027
UPDATE [dbo].[widget_content] SET [data]='1957 - U. S. military personnel suffered their first casualties in the Vietnam War when 13 Americans were wounded in three bombings in Saigon.' WHERE [id]=1028
UPDATE [dbo].[widget_content] SET [data]='2001 - Apple released it''s newest product, the iPod.' WHERE [id]=1029
UPDATE [dbo].[widget_content] SET [data]='1901 - Annie Edson Taylor, a school teacher, became the first person to take the plunge over Niagara Falls in a barrel on her 63rd birthday.' WHERE [id]=1030
UPDATE [dbo].[widget_content] SET [data]='1983 - President Ronald Reagan ordered the Marines to invade the Caribbean nation of Grenada. ' WHERE [id]=1031
UPDATE [dbo].[widget_content] SET [data]='1825 - The Erie Canal opened connecting Albany, New York on the Hudson River and Buffalo, New York on Lake Erie.' WHERE [id]=1032
UPDATE [dbo].[widget_content] SET [data]='1682 - William Penn and a group of English Quakers founded Philadelphia.' WHERE [id]=1033
UPDATE [dbo].[widget_content] SET [data]='1886 - Grover Cleveland dedicated the Statue of Liberty in New York Harbor.' WHERE [id]=1034
UPDATE [dbo].[widget_content] SET [data]='1956 - Israeli armed forces pushed into Egypt toward the Suez Canal beginning the Suez Crisis.' WHERE [id]=1035
UPDATE [dbo].[widget_content] SET [data]='1980 - El Salvador and Honduras signed a peace treaty resolving the border dispute over the Gulf of Fonseca and five sections of land boundaries before the International Court of Justice.' WHERE [id]=1036
UPDATE [dbo].[widget_content] SET [data]='1864 - The United States Congress gave their approval to make Nevada the 36th state in the Union.' WHERE [id]=1037
UPDATE [dbo].[widget_content] SET [data]='1952 - The United States tested the first hydrogen bomb in the Marshall Islands of the Pacific Ocean.' WHERE [id]=1038
UPDATE [dbo].[widget_content] SET [data]='1947 - The Hughes Flying Boat, later called the "Spruce Goose," the largest aircraft ever built was piloted by Howard Hughes on its first and only flight.' WHERE [id]=1039
UPDATE [dbo].[widget_content] SET [data]='1948 - The Chicago Tribune declared New York Governor Thomas Dewey as the winner of the presidential race. Incumbent Harry S. Truman actually won the election.' WHERE [id]=1040
UPDATE [dbo].[widget_content] SET [data]='2008 - Barack Obama was elected the first African-American president of the United States.' WHERE [id]=1041
UPDATE [dbo].[widget_content] SET [data]='1605 - Guy Fawkes was betrayed and arrested in an attempt to blow up the British Parliament in the "Gunpowder Plot."' WHERE [id]=1042
UPDATE [dbo].[widget_content] SET [data]='1861 - Jefferson Davis was elected President of the Confederate States of America. ' WHERE [id]=1043
UPDATE [dbo].[widget_content] SET [data]='1637 - Anne Hutchinson was banished from the Massachusetts Bay Colony for her religious views and criticism of the Puritans' WHERE [id]=1044
UPDATE [dbo].[widget_content] SET [data]='1793 - The French Revolutionary government opened a royal palace, the Louvre, as a public museum.' WHERE [id]=1045
UPDATE [dbo].[widget_content] SET [data]='1989 - East German officials opened the Berlin Wall allowing travel from east to West Berlin. The next day celebrating Germans began to tear the wall down.' WHERE [id]=1046
UPDATE [dbo].[widget_content] SET [data]='1775 - The Continental Congress passed a resolution creating two battalions of Marines, for service as landing forces for part of the recently formed Continental Navy.' WHERE [id]=1047
UPDATE [dbo].[widget_content] SET [data]='1918 - World War I ended when Germany signed an armistice agreement with the Allies in a railroad car outside Compiegne, France.' WHERE [id]=1048
UPDATE [dbo].[widget_content] SET [data]='1927 - The Soviet Communist Party expelled Leon Trotsky and installed Joseph Stalin as the ruler of the Soviet Union.' WHERE [id]=1049
UPDATE [dbo].[widget_content] SET [data]='1927 - The Holland Tunnel linking New York City and New Jersey beneath the Hudson River was opened.' WHERE [id]=1050
UPDATE [dbo].[widget_content] SET [data]='1972 - The Dow Jones Industrial Average closed above 1,000 for the first time.' WHERE [id]=1051
UPDATE [dbo].[widget_content] SET [data]='1939 - The cornerstone was laid for the Jefferson Memorial in the Tidal Basin of the Potomac River in Washington, D.C.' WHERE [id]=1052
UPDATE [dbo].[widget_content] SET [data]='1988 - Pakistani citizens voted in their first open election in more than a decade choosing populist candidate, Benazir Bhutto. She was the first woman leader of a Muslim country in modern history.' WHERE [id]=1053
UPDATE [dbo].[widget_content] SET [data]='1839 - Giuseppe Verdi''s first opera, Oberto, Conte di San Bonifacio debuted at the La Scala opera house in Milan, Italy.' WHERE [id]=1054
UPDATE [dbo].[widget_content] SET [data]='1991 - Shiite Muslim kidnappers in Lebanon freed Anglican Church envoy Terry Waite and American educator Thomas Sutherland after more than four years of captivity.' WHERE [id]=1055
UPDATE [dbo].[widget_content] SET [data]='1977 -Egyptian President Anwar Sadat became the first Arab leader to visit Israel.' WHERE [id]=1056
UPDATE [dbo].[widget_content] SET [data]='1789 - New Jersey was the first state to ratify the Bill of Rights drafted by future President James Madison.' WHERE [id]=1057
UPDATE [dbo].[widget_content] SET [data]='1964 - The Verrazano Narrows Bridge, the world''s longest suspension bridge, at 4,260 feet, opened linking Brooklyn and Staten Island, New York.' WHERE [id]=1058
UPDATE [dbo].[widget_content] SET [data]='1963 - John Fitzgerald Kennedy, the 35th president of the United States, was assassinated while traveling through Dallas, Texas.' WHERE [id]=1059
UPDATE [dbo].[widget_content] SET [data]='1971 - The People''s Republic of China was seated in the United Nations Security Council.' WHERE [id]=1060
UPDATE [dbo].[widget_content] SET [data]='1957 - Theodore Seuss Geisel, Dr. Seuss, published How the Grinch Stole Christmas.' WHERE [id]=1061
UPDATE [dbo].[widget_content] SET [data]='2002 - President George W. Bush signed legislation creating the Department of Homeland Security.' WHERE [id]=1062
UPDATE [dbo].[widget_content] SET [data]='1998 - Tony Blair gave the first speech ever by a British Prime Minister to an Irish Parliament.' WHERE [id]=1063
UPDATE [dbo].[widget_content] SET [data]='1095 - Pope Urban II gave the speech that gave rise to the Crusades. He called Christians all over Europe to war against the Muslims and reclaim the Holy Land.' WHERE [id]=1064
UPDATE [dbo].[widget_content] SET [data]='1925 - The Grand Ole Opry in Nashville, Tennessee made it''s radio debut.' WHERE [id]=1065
UPDATE [dbo].[widget_content] SET [data]='1929 - Navy Lieutenant Commander and explorer Richard Byrd and three companions made the first flight over the South Pole. They flew to the pole and back to their airbase in 18 hours and 41 minutes.' WHERE [id]=1066
UPDATE [dbo].[widget_content] SET [data]='1962 - U Thant of Burma was unanimously appointed Secretary-General by the United Nations General Assembly. He was chosen to head the world body after the death of Secretary-General Dag Hammarskjold in an air crash in September 1961.' WHERE [id]=1067
UPDATE [dbo].[widget_content] SET [data]='1913 - Henry Ford invented the first automobile assembly line reducing the time it took to build a car from 10 hours to two.' WHERE [id]=1068
UPDATE [dbo].[widget_content] SET [data]='1942 - Italian-born Nobel Prize winning physicist, Enrico Fermi set off the first nuclear chain reaction in his laboratory beneath the bleachers of Stagg Field at the University of Chicago.' WHERE [id]=1069
UPDATE [dbo].[widget_content] SET [data]='1984 - A toxic leak at a pesticide plant in a densely populated region of Bhopal, India was responsible for killing over 8,000 people and injuring at least 600,000.' WHERE [id]=1070
UPDATE [dbo].[widget_content] SET [data]='1991- Islamic militants in Lebanon released kidnapped American journalist Terry Anderson after 2,454 days in captivity.' WHERE [id]=1071
UPDATE [dbo].[widget_content] SET [data]='771 - Charlemagne became King of the Franks.' WHERE [id]=1072
UPDATE [dbo].[widget_content] SET [data]='1923 - A presidential address was broadcast on radio for the first time when President Calvin Coolidge spoke to a joint session of Congress.' WHERE [id]=1073
UPDATE [dbo].[widget_content] SET [data]='1941 - The Japanese bombed Pearl Harbor, Hawaii.' WHERE [id]=1074
UPDATE [dbo].[widget_content] SET [data]='1886 - The American Federation of Labor (AFL) was founded.' WHERE [id]=1075
UPDATE [dbo].[widget_content] SET [data]='1960 - The Laotian government fled to Cambodia as the capital city was engulfed in war.' WHERE [id]=1076
UPDATE [dbo].[widget_content] SET [data]='1948 - The United Nations General Assembly adopted the Universal Declaration of Human Rights, co-authored by Eleanor Roosevelt.' WHERE [id]=1077
UPDATE [dbo].[widget_content] SET [data]='1946 - The General Assembly of the United Nations voted to establish the United Nations International Children''s Emergency Fund (UNICEF), an organization to help provide relief and support to children living in countries devastated by the war.' WHERE [id]=1078
UPDATE [dbo].[widget_content] SET [data]='1901 - Guglielmo Marconi made the first transatlantic radio transmission across the Atlantic Ocean. The simple message traveled from Poldhu in Cornwall, England to Newfoundland, Canada.' WHERE [id]=1079
UPDATE [dbo].[widget_content] SET [data]='1577 - Sir Francis Drake set sail from Plymouth, England with five ships and 164 men for the Pacific Ocean and the New World. He returned three years later with one ship.' WHERE [id]=1080
UPDATE [dbo].[widget_content] SET [data]='1799 - George Washington, the first president of the United States died of acute laryngitis at his estate in Mount Vernon, Virginia at the age of 67.' WHERE [id]=1081
UPDATE [dbo].[widget_content] SET [data]='2001 - Italy''s Leaning Tower of Pisa reopened after a team of experts spent 11 years and $27 million to fortify the tower without getting rid of its famous lean. ' WHERE [id]=1082
UPDATE [dbo].[widget_content] SET [data]='1950 - President Harry S. Truman declared a state of emergency after the Chinese entered the Korean War.' WHERE [id]=1083
UPDATE [dbo].[widget_content] SET [data]='1933 - The Chicago Bears defeated the New York Giants in the first NFL Championship Game at Wrigley Field in Chicago, Illinois.' WHERE [id]=1084
UPDATE [dbo].[widget_content] SET [data]='1620 - The British ship, the Mayflower docked at what is now Plymouth, Massachusetts and its passengers prepared to begin their new settlement Plymouth Colony.' WHERE [id]=1085
UPDATE [dbo].[widget_content] SET [data]='1998 - The House of Representatives approved two articles of impeachment against President Bill Clinton. The Senate acquitted him on both charges.' WHERE [id]=1086
UPDATE [dbo].[widget_content] SET [data]='1860 - South Carolina formally seceded from the Union, the first state to do so. Within six weeks, six other states followed South Carolina''s lead.' WHERE [id]=1087
UPDATE [dbo].[widget_content] SET [data]='1988 - Pan Am Flight 103 from London to New York exploded over Lockerbie, Scotland killing all 259 people aboard as well as 11 Lockerbie residents.' WHERE [id]=1088
UPDATE [dbo].[widget_content] SET [data]='1956 - Colo, the first baby gorilla born in captivity, entered the world at the Columbus Zoo in Ohio. She was a western lowland gorilla.' WHERE [id]=1089
UPDATE [dbo].[widget_content] SET [data]='1823 - "A Visit from St. Nicholas" by Clement C. Moore was first published.' WHERE [id]=1090
UPDATE [dbo].[widget_content] SET [data]='1943 - General Dwight D. Eisenhower was named to command the allied armies during World War II.' WHERE [id]=1091
UPDATE [dbo].[widget_content] SET [data]='1914 - The majority of German troops ceased firing their guns and artillery and began to sing Christmas carols. In some areas along the front, the singing could be heard by Russian, French, and British troops. At dawn, many of the Germans approached these troops calling out "Merry Christmas," shook hands with them and even exchanged small gifts.' WHERE [id]=1092
UPDATE [dbo].[widget_content] SET [data]='2004 - A powerful earthquake off the coast of Sumatra, Indonesia set off a tsunami across the Indian Ocean coastline leaving over 216,000 people dead or missing.' WHERE [id]=1093
UPDATE [dbo].[widget_content] SET [data]='1968 - Apollo 8, the first space flight to orbit the moon, returned safely to Earth.' WHERE [id]=1094
UPDATE [dbo].[widget_content] SET [data]='1945 - Congress officially recognized the "Pledge of Allegiance."' WHERE [id]=1095
UPDATE [dbo].[widget_content] SET [data]='1890 - The U. S. Cavalry massacred 146 members of the Sioux tribe at Wounded Knee on South Dakota''s Pine Ridge reservation. ' WHERE [id]=1096
UPDATE [dbo].[widget_content] SET [data]='1924 - Edwin Hubble discovered the existence of other galaxies.' WHERE [id]=1097
UPDATE [dbo].[widget_content] SET [data]='1999 - The United States officially handed control of the Panama Canal over to the Panamanian government.' WHERE [id]=1098
UPDATE [dbo].[widget_content] SET [data]='The largest enclosed urban park in Europe is Phoenix Park. You can visit it when you are in Dublin, Ireland. Dublin Zoo is one of it''s main attractions, along with a herd of wild Fallow deer.' WHERE [id]=1861
UPDATE [dbo].[widget_content] SET [data]='The continent of Antarctica has no country. A number of countries, including the United States have science stations there, but no nation owns the land; while the entire continent of Australia contains only one country, Australia.' WHERE [id]=1883
-- Operation applied to 708 rows out of 708
-- Update rows in [dbo].[tip_of_week]
UPDATE [dbo].[tip_of_week] SET [data]='Curriculum Revisions are automatically downloaded and installed. SOS Teacher runs a weekly search to see if there are updates for any of the curriculum you have installed. If so, all you have to do is click OK when the Curriculum Update message box appears and your curriculum is updated. Click Cancel if you do not want to install the update. You can also opt to check for Curriculum Revisions by selecting that link in the Application widget on your Teacher Homepage.' WHERE [week_num]=6
UPDATE [dbo].[tip_of_week] SET [data]='Want to add an assignment to your student''s work? You can drag a student assignment onto a specific day from the "Lesson Plan". Select the student, double-click the day you want the assignment done, click the "Add" button, click the plus sign beside the subject under "Student''s Subjects" on the left-hand side, click the plus signs to expand the folders in the "Available Curriculum" column on the right-hand side of the window. Locate the assignment, click and drag it until it is over the unit folder where you want the assignment placed, release the mouse button. Click "Save". Close the "Day Detail" window. The assignment now appears on the day you selected.' WHERE [week_num]=10
UPDATE [dbo].[tip_of_week] SET [data]='There are a number of free and inexpensive software packages available with voices other than Microsoft Anna. Install as you would any other software package. Once you have installed the software, the voice options automatically appear as a choice in the "Set Voice" menu.' WHERE [week_num]=14
UPDATE [dbo].[tip_of_week] SET [data]='To customize the calendar for one student and not all students: Click "Student Setup". Choose the student and click the "Edit Calendar" button. Select the "Term" and click the "Open" button. Edit the student''s calendar just as you do the school calendar. Click the "Save Calendar" button when you are done. You can reschedule the due dates by clicking the "Reschedule" button or skip this by clicking the "Cancel" button.' WHERE [week_num]=17
UPDATE [dbo].[tip_of_week] SET [data]='When you perform a backup, it automatically creates a backup file (SOSbackup2012T). This file is saved in the backup folder in folder used to install SOS. If you change the location of the default folder, you need to make note of it, so you can find it in the event you need to restore that file. The Restore function looks in the default location for the backup file.' WHERE [week_num]=26
UPDATE [dbo].[tip_of_week] SET [data]='The backup function creates the backup file based on the application that created it, so the filenames are slightly different for teacher and student. For example, the backup filename created in SOS Teacher is "SOSbackup2012T" and the one created in SOS Student is "SOSbackup2012S".' WHERE [week_num]=27
UPDATE [dbo].[tip_of_week] SET [data]='Click the "Unit Functions" button on the Lesson Book - Assignments tab window and select "Set Unit Grade to Zero" to clear all student work, mark all assignments in the unit as complete with a grade of zero with one click. The student can then continue onto the next unit in the subject.' WHERE [week_num]=30
UPDATE [dbo].[tip_of_week] SET [data]='When you reschedule due dates for your student(s), any due dates for already completed work do not change. Only assignments as yet unfinished get new due dates.' WHERE [week_num]=32
UPDATE [dbo].[tip_of_week] SET [data]='Want to change the due date of a single assignment? Go to your "Lesson Plan", select the student, and the term. Next, double-click the day that currently contains the assignment. On the "Day Detail" window, select the assignment to be changed and click the "Change Due Dates" button. Enter the date(s) you want on the "Change Dates" box and click "OK". Close the "Day Detail" window and return to your "Lesson Plan" to see the due date changed.' WHERE [week_num]=33
UPDATE [dbo].[tip_of_week] SET [data]='Do you know you can right-click over a student assignment on your Lesson Book - Assignments page? (Select the student, select the subject and unit under Student Schoolwork to see the assignments list.) When you right-click an assignment here, you can open the assignment; block or unblock the assignment; change the due date; clear the work and reassign it; clear any highlighting done in the assignment; print the assignment; remove the assignment; set the assignment grade as zero or view the details of the assignment.' WHERE [week_num]=34
UPDATE [dbo].[tip_of_week] SET [data]='You can exclude a day, or a series of days from being considered as schooldays. As an example, if my student always does non-SOS activities on Wednesday, I would not want SOS to schedule schoolwork for him/her on that day of the week. To do this, I click "Student Setup" in the "Administration" widget, select the student, and click "Edit Calendar". I click the "Exclude" button and on the "Exclude Days" window, I put the date of the last day I want excluded in the "End Date" field and if the date I want to begin is different than today, I use the drop-down menu in "Start Date" to choose that day. Now, I am going to click the checkbox next to "Wednesday" and enter a brief "Description" and click "OK" to apply this change. Every Wednesday, in my selected date range shows the description I entered. I click "Save Calendar" to save the changes. I can click the "Reschedule" button to change any existing due dates, or the "Cancel" button to leave them as they are.' WHERE [week_num]=45
UPDATE [dbo].[tip_of_week] SET [data]='Click the "Assignment Functions" button on the Lesson Book - Assignments tab window and select "Set Assignment Grade to Zero" to clear all student work, mark the assignment complete with a grade of zero. The student can then continue in the subject.' WHERE [week_num]=49
-- Operation applied to 12 rows out of 12
-- Update rows in [dbo].[daily_verse]
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=105, [VerseEnd]=105, [Chapter]=119 WHERE [dayNumber]=1
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=111, [VerseEnd]=111, [Chapter]=119 WHERE [dayNumber]=2
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=11, [VerseEnd]=11, [Chapter]=30 WHERE [dayNumber]=3
UPDATE [dbo].[daily_verse] SET [VerseBeg]=13, [VerseEnd]=13, [Chapter]=10 WHERE [dayNumber]=4
UPDATE [dbo].[daily_verse] SET [Book]=N'1 Corinthians', [VerseBeg]=16, [VerseEnd]=16, [Chapter]=3 WHERE [dayNumber]=5
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=7, [VerseEnd]=7, [Chapter]=95 WHERE [dayNumber]=6
UPDATE [dbo].[daily_verse] SET [Book]=N'Joshua ', [VerseBeg]=11, [VerseEnd]=11, [Chapter]=23 WHERE [dayNumber]=7
UPDATE [dbo].[daily_verse] SET [Book]=N'Exodus', [VerseBeg]=3, [VerseEnd]=3, [Chapter]=20 WHERE [dayNumber]=8
UPDATE [dbo].[daily_verse] SET [Book]=N'Exodus', [VerseBeg]=4, [VerseEnd]=4, [Chapter]=20 WHERE [dayNumber]=9
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=12, [VerseEnd]=12, [Chapter]=30 WHERE [dayNumber]=10
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=1, [VerseEnd]=1, [Chapter]=12 WHERE [dayNumber]=11
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=2, [VerseEnd]=2, [Chapter]=12 WHERE [dayNumber]=12
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=6, [VerseEnd]=6, [Chapter]=33 WHERE [dayNumber]=13
UPDATE [dbo].[daily_verse] SET [Book]=N'Ephesians', [VerseBeg]=2, [VerseEnd]=2, [Chapter]=4 WHERE [dayNumber]=14
UPDATE [dbo].[daily_verse] SET [Book]=N'1 John ', [VerseBeg]=11, [VerseEnd]=11, [Chapter]=4 WHERE [dayNumber]=15
UPDATE [dbo].[daily_verse] SET [Book]=N'John', [VerseBeg]=29, [VerseEnd]=29, [Chapter]=20 WHERE [dayNumber]=16
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=3, [VerseEnd]=4, [Chapter]=56 WHERE [dayNumber]=17
UPDATE [dbo].[daily_verse] SET [Book]=N'Luke', [VerseBeg]=34, [VerseEnd]=34, [Chapter]=12 WHERE [dayNumber]=18
UPDATE [dbo].[daily_verse] SET [Book]=N'Mark', [VerseBeg]=35, [VerseEnd]=35, [Chapter]=9 WHERE [dayNumber]=19
UPDATE [dbo].[daily_verse] SET [Book]=N'Exodus', [VerseBeg]=7, [VerseEnd]=7, [Chapter]=20 WHERE [dayNumber]=20
UPDATE [dbo].[daily_verse] SET [Book]=N'Exodus', [VerseBeg]=8, [VerseEnd]=8, [Chapter]=20 WHERE [dayNumber]=21
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=10, [VerseEnd]=10, [Chapter]=32 WHERE [dayNumber]=22
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=21, [VerseEnd]=21, [Chapter]=12 WHERE [dayNumber]=23
UPDATE [dbo].[daily_verse] SET [Book]=N'James', [VerseBeg]=12, [VerseEnd]=12, [Chapter]=1 WHERE [dayNumber]=24
UPDATE [dbo].[daily_verse] SET [Book]=N'Hebrews', [VerseBeg]=6, [VerseEnd]=6, [Chapter]=11 WHERE [dayNumber]=25
UPDATE [dbo].[daily_verse] SET [Book]=N'Proverbs', [VerseBeg]=5, [VerseEnd]=5, [Chapter]=3 WHERE [dayNumber]=26
UPDATE [dbo].[daily_verse] SET [Book]=N'Mark', [VerseBeg]=17, [VerseEnd]=17, [Chapter]=2 WHERE [dayNumber]=27
UPDATE [dbo].[daily_verse] SET [Book]=N'Proverbs', [VerseBeg]=8, [VerseEnd]=8, [Chapter]=1 WHERE [dayNumber]=28
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=8, [VerseEnd]=8, [Chapter]=34 WHERE [dayNumber]=29
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=23, [VerseEnd]=23, [Chapter]=4 WHERE [dayNumber]=30
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=16, [VerseEnd]=16, [Chapter]=1 WHERE [dayNumber]=31
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=17, [VerseEnd]=17, [Chapter]=1 WHERE [dayNumber]=32
UPDATE [dbo].[daily_verse] SET [Book]=N'2 Thessalonians', [VerseBeg]=16, [VerseEnd]=16 WHERE [dayNumber]=33
UPDATE [dbo].[daily_verse] SET [Book]=N'Isaiah', [VerseBeg]=21, [VerseEnd]=21, [Chapter]=30 WHERE [dayNumber]=34
UPDATE [dbo].[daily_verse] SET [Book]=N'James', [VerseBeg]=2, [VerseEnd]=2 WHERE [dayNumber]=35
UPDATE [dbo].[daily_verse] SET [Book]=N'James', [VerseBeg]=3, [VerseEnd]=3, [Chapter]=1 WHERE [dayNumber]=36
UPDATE [dbo].[daily_verse] SET [Book]=N'James', [VerseBeg]=4, [VerseEnd]=4, [Chapter]=1 WHERE [dayNumber]=37
UPDATE [dbo].[daily_verse] SET [Book]=N'James', [VerseBeg]=5, [VerseEnd]=5 WHERE [dayNumber]=38
UPDATE [dbo].[daily_verse] SET [Book]=N'Isaiah', [VerseBeg]=5, [VerseEnd]=5, [Chapter]=53 WHERE [dayNumber]=39
UPDATE [dbo].[daily_verse] SET [Book]=N'1 John', [VerseBeg]=19, [VerseEnd]=19, [Chapter]=4 WHERE [dayNumber]=40
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=19, [VerseEnd]=19, [Chapter]=4 WHERE [dayNumber]=41
UPDATE [dbo].[daily_verse] SET [Book]=N'Proverbs', [VerseBeg]=5, [VerseEnd]=5, [Chapter]=3 WHERE [dayNumber]=42
UPDATE [dbo].[daily_verse] SET [Book]=N'Proverbs', [VerseBeg]=6, [VerseEnd]=6, [Chapter]=3 WHERE [dayNumber]=43
UPDATE [dbo].[daily_verse] SET [Book]=N'deuteronomy ', [VerseBeg]=12, [VerseEnd]=13, [Chapter]=10 WHERE [dayNumber]=44
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=14, [VerseEnd]=14, [Chapter]=6 WHERE [dayNumber]=45
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=1, [VerseEnd]=1, [Chapter]=148 WHERE [dayNumber]=46
UPDATE [dbo].[daily_verse] SET [Book]=N'Hebrews', [VerseBeg]=11, [VerseEnd]=11, [Chapter]=12 WHERE [dayNumber]=47
UPDATE [dbo].[daily_verse] SET [Book]=N'Proverbs', [VerseBeg]=22, [VerseEnd]=22, [Chapter]=23 WHERE [dayNumber]=48
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=1, [VerseEnd]=1, [Chapter]=93 WHERE [dayNumber]=49
UPDATE [dbo].[daily_verse] SET [Book]=N'Mark ', [VerseBeg]=15, [VerseEnd]=15, [Chapter]=16 WHERE [dayNumber]=50
UPDATE [dbo].[daily_verse] SET [Book]=N'Mark ', [VerseBeg]=16, [VerseEnd]=16, [Chapter]=16 WHERE [dayNumber]=51
UPDATE [dbo].[daily_verse] SET [Book]=N'Exodus', [VerseBeg]=12, [VerseEnd]=12, [Chapter]=20 WHERE [dayNumber]=52
UPDATE [dbo].[daily_verse] SET [Book]=N'Exodus', [VerseBeg]=13, [VerseEnd]=13, [Chapter]=20 WHERE [dayNumber]=53
UPDATE [dbo].[daily_verse] SET [Book]=N'Exodus', [VerseBeg]=14, [VerseEnd]=14, [Chapter]=20 WHERE [dayNumber]=54
UPDATE [dbo].[daily_verse] SET [Book]=N'Exodus', [VerseBeg]=15, [VerseEnd]=16, [Chapter]=20 WHERE [dayNumber]=55
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=20, [VerseEnd]=20, [Chapter]=107 WHERE [dayNumber]=56
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=20, [VerseEnd]=21, [Chapter]=5 WHERE [dayNumber]=57
UPDATE [dbo].[daily_verse] SET [Book]=N'Proverbs ', [VerseBeg]=3, [VerseEnd]=3, [Chapter]=13 WHERE [dayNumber]=58
UPDATE [dbo].[daily_verse] SET [Book]=N'Ecclesiastes', [VerseBeg]=10, [VerseEnd]=10, [Chapter]=9 WHERE [dayNumber]=59
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=1, [VerseEnd]=1, [Chapter]=34 WHERE [dayNumber]=60
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=8, [VerseEnd]=8, [Chapter]=5 WHERE [dayNumber]=61
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=1, [VerseEnd]=1, [Chapter]=32 WHERE [dayNumber]=62
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=2, [VerseEnd]=2, [Chapter]=32 WHERE [dayNumber]=63
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=3, [VerseEnd]=3, [Chapter]=32 WHERE [dayNumber]=64
UPDATE [dbo].[daily_verse] SET [Book]=N'Luke', [VerseBeg]=6, [VerseEnd]=6, [Chapter]=2 WHERE [dayNumber]=65
UPDATE [dbo].[daily_verse] SET [Book]=N'Luke', [VerseBeg]=7, [VerseEnd]=7, [Chapter]=2 WHERE [dayNumber]=66
UPDATE [dbo].[daily_verse] SET [Book]=N'Hebrews', [VerseBeg]=14, [VerseEnd]=14, [Chapter]=12 WHERE [dayNumber]=67
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=2, [VerseEnd]=2, [Chapter]=34 WHERE [dayNumber]=68
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=3, [VerseEnd]=3, [Chapter]=34 WHERE [dayNumber]=69
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=4, [VerseEnd]=4, [Chapter]=34 WHERE [dayNumber]=70
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew ', [VerseBeg]=11, [VerseEnd]=11, [Chapter]=5 WHERE [dayNumber]=71
UPDATE [dbo].[daily_verse] SET [Book]=N'James', [VerseBeg]=7, [VerseEnd]=7, [Chapter]=5 WHERE [dayNumber]=73
UPDATE [dbo].[daily_verse] SET [Book]=N'James', [VerseBeg]=8, [VerseEnd]=8, [Chapter]=5 WHERE [dayNumber]=74
UPDATE [dbo].[daily_verse] SET [Book]=N'James', [VerseBeg]=9, [VerseEnd]=9, [Chapter]=5 WHERE [dayNumber]=75
UPDATE [dbo].[daily_verse] SET [VerseBeg]=26, [VerseEnd]=26, [Chapter]=15 WHERE [dayNumber]=76
UPDATE [dbo].[daily_verse] SET [Book]=N'Proverbs', [VerseBeg]=7, [VerseEnd]=7, [Chapter]=1 WHERE [dayNumber]=77
UPDATE [dbo].[daily_verse] SET [Book]=N'Proverbs', [VerseBeg]=22, [VerseEnd]=22, [Chapter]=15 WHERE [dayNumber]=78
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=5, [VerseEnd]=5, [Chapter]=32 WHERE [dayNumber]=79
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=9, [VerseEnd]=9, [Chapter]=5 WHERE [dayNumber]=80
UPDATE [dbo].[daily_verse] SET [Book]=N'Ecclesiastes', [VerseBeg]=1, [VerseEnd]=1, [Chapter]=3 WHERE [dayNumber]=81
UPDATE [dbo].[daily_verse] SET [Book]=N'Ecclesiastes', [VerseBeg]=2, [VerseEnd]=2, [Chapter]=3 WHERE [dayNumber]=82
UPDATE [dbo].[daily_verse] SET [Book]=N'Ecclesiastes', [VerseBeg]=3, [VerseEnd]=3, [Chapter]=3 WHERE [dayNumber]=83
UPDATE [dbo].[daily_verse] SET [Book]=N'Luke', [VerseBeg]=31, [VerseEnd]=31, [Chapter]=6 WHERE [dayNumber]=84
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=8, [VerseEnd]=8, [Chapter]=61 WHERE [dayNumber]=85
UPDATE [dbo].[daily_verse] SET [Book]=N'Isaiah', [VerseBeg]=4, [VerseEnd]=4, [Chapter]=26 WHERE [dayNumber]=86
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=43, [VerseEnd]=43, [Chapter]=5 WHERE [dayNumber]=87
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=44, [VerseEnd]=44, [Chapter]=5 WHERE [dayNumber]=88
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=2, [VerseEnd]=2, [Chapter]=103 WHERE [dayNumber]=89
UPDATE [dbo].[daily_verse] SET [Book]=N'Colossians', [VerseBeg]=8, [VerseEnd]=8, [Chapter]=2 WHERE [dayNumber]=90
UPDATE [dbo].[daily_verse] SET [Book]=N'Proverbs ', [VerseBeg]=7, [VerseEnd]=7, [Chapter]=28 WHERE [dayNumber]=91
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=6, [VerseEnd]=6, [Chapter]=32 WHERE [dayNumber]=92
UPDATE [dbo].[daily_verse] SET [Book]=N'1 Peter', [VerseBeg]=8, [VerseEnd]=8, [Chapter]=3 WHERE [dayNumber]=93
UPDATE [dbo].[daily_verse] SET [Book]=N'Job', [VerseBeg]=4, [VerseEnd]=4, [Chapter]=27 WHERE [dayNumber]=94
UPDATE [dbo].[daily_verse] SET [Book]=N'Isaiah', [VerseBeg]=1, [VerseEnd]=2, [Chapter]=12 WHERE [dayNumber]=95
UPDATE [dbo].[daily_verse] SET [Book]=N'John', [VerseBeg]=29, [VerseEnd]=29, [Chapter]=6 WHERE [dayNumber]=96
UPDATE [dbo].[daily_verse] SET [Book]=N'Isaiah', [VerseBeg]=3, [VerseEnd]=3, [Chapter]=26 WHERE [dayNumber]=97
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=8, [VerseEnd]=8, [Chapter]=107 WHERE [dayNumber]=98
UPDATE [dbo].[daily_verse] SET [Book]=N'Job', [VerseBeg]=21, [VerseEnd]=21, [Chapter]=22 WHERE [dayNumber]=99
UPDATE [dbo].[daily_verse] SET [Book]=N'John', [VerseBeg]=40, [VerseEnd]=40, [Chapter]=11 WHERE [dayNumber]=100
UPDATE [dbo].[daily_verse] SET [Book]=N'Luke', [VerseBeg]=37, [VerseEnd]=37 WHERE [dayNumber]=101
UPDATE [dbo].[daily_verse] SET [Book]=N'Malachi', [VerseBeg]=10, [VerseEnd]=10, [Chapter]=3 WHERE [dayNumber]=102
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=23, [VerseEnd]=23, [Chapter]=6 WHERE [dayNumber]=103
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew ', [VerseBeg]=15, [VerseEnd]=15, [Chapter]=7 WHERE [dayNumber]=104
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=7, [VerseEnd]=7, [Chapter]=148 WHERE [dayNumber]=105
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew ', [VerseBeg]=33, [VerseEnd]=33, [Chapter]=6 WHERE [dayNumber]=106
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=1, [VerseEnd]=1, [Chapter]=148 WHERE [dayNumber]=107
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=2, [VerseEnd]=2, [Chapter]=148 WHERE [dayNumber]=108
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=3, [VerseEnd]=3, [Chapter]=148 WHERE [dayNumber]=109
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [Chapter]=148 WHERE [dayNumber]=110
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=5, [VerseEnd]=5, [Chapter]=148 WHERE [dayNumber]=111
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=1, [VerseEnd]=1, [Chapter]=5 WHERE [dayNumber]=112
UPDATE [dbo].[daily_verse] SET [Book]=N'John', [VerseBeg]=12, [VerseEnd]=12, [Chapter]=15 WHERE [dayNumber]=113
UPDATE [dbo].[daily_verse] SET [Book]=N'Colossians', [VerseBeg]=20, [VerseEnd]=20, [Chapter]=3 WHERE [dayNumber]=114
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=11, [VerseEnd]=11, [Chapter]=42 WHERE [dayNumber]=115
UPDATE [dbo].[daily_verse] SET [Book]=N'1 Corinthians', [VerseBeg]=58, [VerseEnd]=58, [Chapter]=15 WHERE [dayNumber]=116
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=17, [VerseEnd]=17, [Chapter]=5 WHERE [dayNumber]=117
UPDATE [dbo].[daily_verse] SET [Book]=N'Proverbs', [VerseBeg]=32, [VerseEnd]=32, [Chapter]=16 WHERE [dayNumber]=118
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=8, [VerseEnd]=8, [Chapter]=107 WHERE [dayNumber]=119
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=9, [VerseEnd]=9, [Chapter]=107 WHERE [dayNumber]=120
UPDATE [dbo].[daily_verse] SET [Book]=N'Ecclesiastes', [VerseBeg]=1, [VerseEnd]=1, [Chapter]=12 WHERE [dayNumber]=121
UPDATE [dbo].[daily_verse] SET [Book]=N'2 Timothy', [VerseBeg]=16, [VerseEnd]=16, [Chapter]=3 WHERE [dayNumber]=122
UPDATE [dbo].[daily_verse] SET [Book]=N'Luke', [VerseBeg]=16, [VerseEnd]=17, [Chapter]=18 WHERE [dayNumber]=123
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=10, [VerseEnd]=10, [Chapter]=3 WHERE [dayNumber]=124
UPDATE [dbo].[daily_verse] SET [Book]=N'Mark', [VerseBeg]=30, [VerseEnd]=30, [Chapter]=12 WHERE [dayNumber]=125
UPDATE [dbo].[daily_verse] SET [Book]=N'Mark', [VerseBeg]=31, [VerseEnd]=31, [Chapter]=12 WHERE [dayNumber]=126
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=31, [VerseEnd]=31, [Chapter]=8 WHERE [dayNumber]=127
UPDATE [dbo].[daily_verse] SET [Book]=N'Proverbs', [VerseBeg]=17, [VerseEnd]=17, [Chapter]=17 WHERE [dayNumber]=128
UPDATE [dbo].[daily_verse] SET [Book]=N'Ephesians', [VerseBeg]=20, [VerseEnd]=20, [Chapter]=3 WHERE [dayNumber]=129
UPDATE [dbo].[daily_verse] SET [Book]=N'Philippians', [VerseBeg]=13, [VerseEnd]=13, [Chapter]=4 WHERE [dayNumber]=130
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=7, [VerseEnd]=7, [Chapter]=51 WHERE [dayNumber]=131
UPDATE [dbo].[daily_verse] SET [Book]=N'Luke', [VerseBeg]=19, [VerseEnd]=20, [Chapter]=22 WHERE [dayNumber]=132
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=9, [VerseEnd]=9, [Chapter]=119 WHERE [dayNumber]=133
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=10, [VerseEnd]=10, [Chapter]=119 WHERE [dayNumber]=134
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=11, [VerseEnd]=11, [Chapter]=119 WHERE [dayNumber]=135
UPDATE [dbo].[daily_verse] SET [Book]=N'1 John', [VerseBeg]=4, [VerseEnd]=4, [Chapter]=3 WHERE [dayNumber]=136
UPDATE [dbo].[daily_verse] SET [Book]=N'Colossians', [VerseBeg]=2, [VerseEnd]=2, [Chapter]=3 WHERE [dayNumber]=137
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=19, [VerseEnd]=19 WHERE [dayNumber]=138
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=165, [VerseEnd]=165, [Chapter]=119 WHERE [dayNumber]=139
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=166, [VerseEnd]=166, [Chapter]=119 WHERE [dayNumber]=140
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=167, [VerseEnd]=167, [Chapter]=119 WHERE [dayNumber]=141
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew ', [VerseBeg]=20, [VerseEnd]=20, [Chapter]=18 WHERE [dayNumber]=142
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=7, [VerseEnd]=7, [Chapter]=51 WHERE [dayNumber]=143
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=8, [VerseEnd]=8, [Chapter]=51 WHERE [dayNumber]=144
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=9, [VerseEnd]=9, [Chapter]=51 WHERE [dayNumber]=145
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=10, [VerseEnd]=10, [Chapter]=51 WHERE [dayNumber]=146
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=11, [VerseEnd]=11, [Chapter]=51 WHERE [dayNumber]=147
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=12, [VerseEnd]=12, [Chapter]=51 WHERE [dayNumber]=148
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=11, [VerseEnd]=11, [Chapter]=84 WHERE [dayNumber]=149
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=3, [VerseEnd]=3, [Chapter]=4 WHERE [dayNumber]=150
UPDATE [dbo].[daily_verse] SET [Book]=N'1 Corinthians', [VerseBeg]=4, [VerseEnd]=4, [Chapter]=13 WHERE [dayNumber]=151
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=1, [VerseEnd]=1, [Chapter]=27 WHERE [dayNumber]=152
UPDATE [dbo].[daily_verse] SET [Book]=N'1 John', [VerseBeg]=15, [VerseEnd]=15, [Chapter]=4 WHERE [dayNumber]=153
UPDATE [dbo].[daily_verse] SET [Book]=N'2 Corinthians', [VerseBeg]=9, [VerseEnd]=9, [Chapter]=12 WHERE [dayNumber]=154
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=1, [VerseEnd]=1, [Chapter]=51 WHERE [dayNumber]=155
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=2, [VerseEnd]=2, [Chapter]=51 WHERE [dayNumber]=156
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=3, [VerseEnd]=3, [Chapter]=51 WHERE [dayNumber]=157
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=4, [VerseEnd]=4, [Chapter]=51 WHERE [dayNumber]=158
UPDATE [dbo].[daily_verse] SET [Book]=N'1 Thessalonians', [VerseBeg]=7, [VerseEnd]=7, [Chapter]=3 WHERE [dayNumber]=159
UPDATE [dbo].[daily_verse] SET [Book]=N'Philippians', [VerseBeg]=6, [VerseEnd]=6, [Chapter]=4 WHERE [dayNumber]=160
UPDATE [dbo].[daily_verse] SET [Book]=N'Philippians', [VerseBeg]=7, [VerseEnd]=7, [Chapter]=4 WHERE [dayNumber]=161
UPDATE [dbo].[daily_verse] SET [Book]=N'Philippians', [VerseBeg]=8, [VerseEnd]=8, [Chapter]=4 WHERE [dayNumber]=162
UPDATE [dbo].[daily_verse] SET [Book]=N'Philippians', [VerseBeg]=9, [VerseEnd]=9, [Chapter]=4 WHERE [dayNumber]=163
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=1, [VerseEnd]=1, [Chapter]=33 WHERE [dayNumber]=164
UPDATE [dbo].[daily_verse] SET [Book]=N'John', [VerseBeg]=13, [VerseEnd]=13, [Chapter]=14 WHERE [dayNumber]=165
UPDATE [dbo].[daily_verse] SET [Book]=N'1 Timothy', [VerseBeg]=11, [VerseEnd]=11, [Chapter]=6 WHERE [dayNumber]=166
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=13, [VerseEnd]=13, [Chapter]=21 WHERE [dayNumber]=167
UPDATE [dbo].[daily_verse] SET [Book]=N'1 Thessalonians', [VerseBeg]=11, [VerseEnd]=11, [Chapter]=4 WHERE [dayNumber]=168
UPDATE [dbo].[daily_verse] SET [Book]=N'1 Thessalonians', [VerseBeg]=12, [VerseEnd]=12 WHERE [dayNumber]=169
UPDATE [dbo].[daily_verse] SET [Book]=N'John', [VerseBeg]=13, [VerseEnd]=13, [Chapter]=17 WHERE [dayNumber]=170
UPDATE [dbo].[daily_verse] SET [Book]=N'Ephesians', [VerseBeg]=18, [VerseEnd]=18, [Chapter]=1 WHERE [dayNumber]=171
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=11, [VerseEnd]=11, [Chapter]=2 WHERE [dayNumber]=172
UPDATE [dbo].[daily_verse] SET [Book]=N'1 Timothy', [VerseBeg]=12, [VerseEnd]=12, [Chapter]=4 WHERE [dayNumber]=173
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=12, [VerseEnd]=12, [Chapter]=51 WHERE [dayNumber]=174
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=28, [VerseEnd]=28, [Chapter]=11 WHERE [dayNumber]=175
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=29, [VerseEnd]=29, [Chapter]=11 WHERE [dayNumber]=176
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=30, [VerseEnd]=30 WHERE [dayNumber]=177
UPDATE [dbo].[daily_verse] SET [Book]=N'Isaiah', [Chapter]=40 WHERE [dayNumber]=178
UPDATE [dbo].[daily_verse] SET [Book]=N'Isaiah', [VerseBeg]=31, [VerseEnd]=31, [Chapter]=40 WHERE [dayNumber]=179
UPDATE [dbo].[daily_verse] SET [Book]=N'Proverbs', [VerseBeg]=3, [VerseEnd]=3, [Chapter]=20 WHERE [dayNumber]=180
UPDATE [dbo].[daily_verse] SET [Book]=N'1 Peter', [VerseBeg]=7, [VerseEnd]=7, [Chapter]=5 WHERE [dayNumber]=181
UPDATE [dbo].[daily_verse] SET [VerseBeg]=31, [VerseEnd]=31, [Chapter]=6 WHERE [dayNumber]=182
UPDATE [dbo].[daily_verse] SET [VerseBeg]=32, [VerseEnd]=32, [Chapter]=6 WHERE [dayNumber]=183
UPDATE [dbo].[daily_verse] SET [VerseBeg]=33, [VerseEnd]=33, [Chapter]=6 WHERE [dayNumber]=184
UPDATE [dbo].[daily_verse] SET [VerseBeg]=34, [VerseEnd]=34, [Chapter]=6 WHERE [dayNumber]=185
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=2, [VerseEnd]=2, [Chapter]=62 WHERE [dayNumber]=186
UPDATE [dbo].[daily_verse] SET [Book]=N'John', [VerseBeg]=16, [VerseEnd]=16, [Chapter]=3 WHERE [dayNumber]=187
UPDATE [dbo].[daily_verse] SET [Book]=N'1 John', [VerseBeg]=12, [VerseEnd]=12 WHERE [dayNumber]=188
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=1, [VerseEnd]=1, [Chapter]=1 WHERE [dayNumber]=189
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=2, [VerseEnd]=2, [Chapter]=1 WHERE [dayNumber]=190
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=23, [VerseEnd]=23, [Chapter]=139 WHERE [dayNumber]=191
UPDATE [dbo].[daily_verse] SET [Book]=N'Luke', [VerseBeg]=34, [VerseEnd]=34, [Chapter]=23 WHERE [dayNumber]=192
UPDATE [dbo].[daily_verse] SET [Book]=N'Philippians', [VerseBeg]=4, [VerseEnd]=4, [Chapter]=2 WHERE [dayNumber]=193
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew ', [VerseBeg]=20, [VerseEnd]=20, [Chapter]=17 WHERE [dayNumber]=194
UPDATE [dbo].[daily_verse] SET [Book]=N'Isaiah', [VerseBeg]=8, [VerseEnd]=8, [Chapter]=26 WHERE [dayNumber]=195
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=1, [VerseEnd]=2, [Chapter]=8 WHERE [dayNumber]=196
UPDATE [dbo].[daily_verse] SET [Book]=N'Hebrews', [VerseBeg]=1, [VerseEnd]=1, [Chapter]=11 WHERE [dayNumber]=197
UPDATE [dbo].[daily_verse] SET [Book]=N'John', [VerseBeg]=24, [VerseEnd]=24, [Chapter]=5 WHERE [dayNumber]=198
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans ', [VerseBeg]=13, [VerseEnd]=13, [Chapter]=10 WHERE [dayNumber]=199
UPDATE [dbo].[daily_verse] SET [Book]=N'John', [VerseBeg]=1, [VerseEnd]=1, [Chapter]=1 WHERE [dayNumber]=200
UPDATE [dbo].[daily_verse] SET [Book]=N'Hebrews', [VerseBeg]=5, [VerseEnd]=5, [Chapter]=13 WHERE [dayNumber]=201
UPDATE [dbo].[daily_verse] SET [Book]=N'Hebrews', [VerseBeg]=6, [VerseEnd]=6, [Chapter]=13 WHERE [dayNumber]=202
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=1, [VerseEnd]=1, [Chapter]=150 WHERE [dayNumber]=203
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=2, [VerseEnd]=2, [Chapter]=150 WHERE [dayNumber]=204
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=3, [VerseEnd]=3, [Chapter]=150 WHERE [dayNumber]=205
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=4, [VerseEnd]=4, [Chapter]=150 WHERE [dayNumber]=206
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=5, [VerseEnd]=5, [Chapter]=150 WHERE [dayNumber]=207
UPDATE [dbo].[daily_verse] SET [Book]=N'Ephesians', [VerseBeg]=10, [VerseEnd]=10, [Chapter]=2 WHERE [dayNumber]=208
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [Chapter]=37 WHERE [dayNumber]=209
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [Chapter]=37 WHERE [dayNumber]=210
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=38, [VerseEnd]=39, [Chapter]=8 WHERE [dayNumber]=211
UPDATE [dbo].[daily_verse] SET [Book]=N'Hebrews', [VerseBeg]=15, [VerseEnd]=15, [Chapter]=13 WHERE [dayNumber]=212
UPDATE [dbo].[daily_verse] SET [VerseBeg]=7, [VerseEnd]=7, [Chapter]=7 WHERE [dayNumber]=213
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [Chapter]=7 WHERE [dayNumber]=214
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=9, [VerseEnd]=9 WHERE [dayNumber]=215
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=10, [VerseEnd]=10, [Chapter]=7 WHERE [dayNumber]=216
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=11, [VerseEnd]=11, [Chapter]=7 WHERE [dayNumber]=217
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=12, [VerseEnd]=12, [Chapter]=7 WHERE [dayNumber]=218
UPDATE [dbo].[daily_verse] SET [Book]=N'2 Timothy', [VerseBeg]=22, [VerseEnd]=22, [Chapter]=2 WHERE [dayNumber]=219
UPDATE [dbo].[daily_verse] SET [Book]=N'Philippians', [VerseBeg]=14, [VerseEnd]=16, [Chapter]=2 WHERE [dayNumber]=220
UPDATE [dbo].[daily_verse] SET [Book]=N'2 Thessalonians', [VerseBeg]=5, [VerseEnd]=5, [Chapter]=3 WHERE [dayNumber]=221
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=37, [VerseEnd]=37, [Chapter]=22 WHERE [dayNumber]=222
UPDATE [dbo].[daily_verse] SET [Book]=N'John', [VerseBeg]=12, [VerseEnd]=12, [Chapter]=8 WHERE [dayNumber]=223
UPDATE [dbo].[daily_verse] SET [Book]=N'Revelation', [VerseBeg]=20, [VerseEnd]=20, [Chapter]=3 WHERE [dayNumber]=224
UPDATE [dbo].[daily_verse] SET [VerseBeg]=11, [VerseEnd]=12, [Chapter]=3 WHERE [dayNumber]=225
UPDATE [dbo].[daily_verse] SET [Book]=N'1 Corinthians', [VerseBeg]=14, [VerseEnd]=14, [Chapter]=16 WHERE [dayNumber]=226
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=12, [VerseEnd]=12, [Chapter]=103 WHERE [dayNumber]=227
UPDATE [dbo].[daily_verse] SET [Book]=N'Deuteronomy ', [VerseBeg]=8, [VerseEnd]=8, [Chapter]=31 WHERE [dayNumber]=228
UPDATE [dbo].[daily_verse] SET [Book]=N'John', [VerseBeg]=15, [VerseEnd]=15, [Chapter]=15 WHERE [dayNumber]=229
UPDATE [dbo].[daily_verse] SET [Book]=N'John', [VerseBeg]=16, [VerseEnd]=16, [Chapter]=15 WHERE [dayNumber]=230
UPDATE [dbo].[daily_verse] SET [Book]=N'John', [VerseBeg]=17, [VerseEnd]=17, [Chapter]=15 WHERE [dayNumber]=231
UPDATE [dbo].[daily_verse] SET [Book]=N'1 Timothy', [VerseBeg]=12, [VerseEnd]=12, [Chapter]=1 WHERE [dayNumber]=232
UPDATE [dbo].[daily_verse] SET [Book]=N'Jeremiah', [VerseBeg]=11, [VerseEnd]=11, [Chapter]=29 WHERE [dayNumber]=233
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=4, [VerseEnd]=4, [Chapter]=23 WHERE [dayNumber]=234
UPDATE [dbo].[daily_verse] SET [Book]=N'Philippians', [VerseBeg]=3, [VerseEnd]=4, [Chapter]=2 WHERE [dayNumber]=235
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=17, [VerseEnd]=17, [Chapter]=10 WHERE [dayNumber]=236
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=1, [VerseEnd]=1, [Chapter]=62 WHERE [dayNumber]=237
UPDATE [dbo].[daily_verse] SET [Book]=N'Hebrews', [VerseBeg]=16, [VerseEnd]=16, [Chapter]=4 WHERE [dayNumber]=238
UPDATE [dbo].[daily_verse] SET [Book]=N'John', [VerseBeg]=34, [VerseEnd]=35, [Chapter]=13 WHERE [dayNumber]=239
UPDATE [dbo].[daily_verse] SET [Book]=N'Philippians', [VerseBeg]=6, [VerseEnd]=6, [Chapter]=1 WHERE [dayNumber]=240
UPDATE [dbo].[daily_verse] SET [VerseBeg]=3, [VerseEnd]=3, [Chapter]=33 WHERE [dayNumber]=241
UPDATE [dbo].[daily_verse] SET [Book]=N'1 Thessalonians', [VerseBeg]=15, [VerseEnd]=15, [Chapter]=5 WHERE [dayNumber]=242
UPDATE [dbo].[daily_verse] SET [Book]=N'1 Thessalonians', [VerseBeg]=16, [VerseEnd]=16, [Chapter]=5 WHERE [dayNumber]=243
UPDATE [dbo].[daily_verse] SET [Book]=N'1 Thessalonians', [VerseBeg]=17, [VerseEnd]=17, [Chapter]=5 WHERE [dayNumber]=244
UPDATE [dbo].[daily_verse] SET [Book]=N'John', [VerseBeg]=25, [VerseEnd]=26, [Chapter]=11 WHERE [dayNumber]=245
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=6, [VerseEnd]=6, [Chapter]=5 WHERE [dayNumber]=246
UPDATE [dbo].[daily_verse] SET [Book]=N'John', [VerseBeg]=6, [VerseEnd]=6, [Chapter]=14 WHERE [dayNumber]=247
UPDATE [dbo].[daily_verse] SET [Book]=N'Ephesians', [VerseBeg]=32, [VerseEnd]=32, [Chapter]=4 WHERE [dayNumber]=248
UPDATE [dbo].[daily_verse] SET [VerseBeg]=1, [VerseEnd]=1, [Chapter]=136 WHERE [dayNumber]=249
UPDATE [dbo].[daily_verse] SET [Book]=N'Zechariah ', [VerseBeg]=7, [VerseEnd]=7, [Chapter]=3 WHERE [dayNumber]=250
UPDATE [dbo].[daily_verse] SET [Book]=N'John', [VerseBeg]=26, [VerseEnd]=26, [Chapter]=14 WHERE [dayNumber]=251
UPDATE [dbo].[daily_verse] SET [Book]=N'John', [VerseBeg]=27, [VerseEnd]=27, [Chapter]=14 WHERE [dayNumber]=252
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=10, [VerseEnd]=10, [Chapter]=4 WHERE [dayNumber]=253
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=26, [VerseEnd]=26, [Chapter]=8 WHERE [dayNumber]=254
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=27, [VerseEnd]=27, [Chapter]=8 WHERE [dayNumber]=255
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=28, [VerseEnd]=28, [Chapter]=8 WHERE [dayNumber]=256
UPDATE [dbo].[daily_verse] SET [VerseBeg]=5, [VerseEnd]=5, [Chapter]=86 WHERE [dayNumber]=257
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=6, [VerseEnd]=7, [Chapter]=2 WHERE [dayNumber]=258
UPDATE [dbo].[daily_verse] SET [Book]=N'Proverbs', [VerseBeg]=6, [VerseEnd]=6, [Chapter]=27 WHERE [dayNumber]=259
UPDATE [dbo].[daily_verse] SET [Book]=N'Hosea ', [VerseBeg]=3, [VerseEnd]=3, [Chapter]=6 WHERE [dayNumber]=260
UPDATE [dbo].[daily_verse] SET [Book]=N'Joshua ', [VerseBeg]=5, [VerseEnd]=5, [Chapter]=22 WHERE [dayNumber]=261
UPDATE [dbo].[daily_verse] SET [Book]=N'John', [VerseBeg]=14, [VerseEnd]=14, [Chapter]=14 WHERE [dayNumber]=262
UPDATE [dbo].[daily_verse] SET [Book]=N'Ephesians', [VerseBeg]=18, [VerseEnd]=18, [Chapter]=6 WHERE [dayNumber]=263
UPDATE [dbo].[daily_verse] SET [Book]=N'1 John', [VerseBeg]=9, [VerseEnd]=9, [Chapter]=1 WHERE [dayNumber]=264
UPDATE [dbo].[daily_verse] SET [Book]=N'2 Timothy', [Chapter]=1 WHERE [dayNumber]=265
UPDATE [dbo].[daily_verse] SET [Chapter]=100 WHERE [dayNumber]=266
UPDATE [dbo].[daily_verse] SET [Chapter]=100 WHERE [dayNumber]=267
UPDATE [dbo].[daily_verse] SET [Chapter]=100 WHERE [dayNumber]=268
UPDATE [dbo].[daily_verse] SET [Chapter]=100 WHERE [dayNumber]=269
UPDATE [dbo].[daily_verse] SET [Chapter]=100 WHERE [dayNumber]=270
UPDATE [dbo].[daily_verse] SET [Book]=N'Mark', [VerseBeg]=24, [VerseEnd]=24, [Chapter]=11 WHERE [dayNumber]=271
UPDATE [dbo].[daily_verse] SET [Book]=N'2 Thessalonians ', [VerseBeg]=16, [VerseEnd]=17, [Chapter]=2 WHERE [dayNumber]=272
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=23, [VerseEnd]=23, [Chapter]=3 WHERE [dayNumber]=273
UPDATE [dbo].[daily_verse] SET [VerseBeg]=11, [VerseEnd]=11, [Chapter]=103 WHERE [dayNumber]=274
UPDATE [dbo].[daily_verse] SET [Book]=N'Galatians', [VerseBeg]=9, [VerseEnd]=9, [Chapter]=6 WHERE [dayNumber]=275
UPDATE [dbo].[daily_verse] SET [Book]=N'Jude', [VerseBeg]=21, [VerseEnd]=21, [Chapter]=1 WHERE [dayNumber]=276
UPDATE [dbo].[daily_verse] SET [Book]=N'1 Peter', [VerseBeg]=24, [VerseEnd]=25, [Chapter]=1 WHERE [dayNumber]=277
UPDATE [dbo].[daily_verse] SET [Book]=N'Daniel', [VerseBeg]=9, [VerseEnd]=9, [Chapter]=9 WHERE [dayNumber]=278
UPDATE [dbo].[daily_verse] SET [Book]=N'Joshua ', [VerseBeg]=9, [VerseEnd]=9, [Chapter]=1 WHERE [dayNumber]=279
UPDATE [dbo].[daily_verse] SET [Book]=N'Genesis', [VerseBeg]=1, [VerseEnd]=1, [Chapter]=1 WHERE [dayNumber]=280
UPDATE [dbo].[daily_verse] SET [VerseBeg]=9, [VerseEnd]=9, [Chapter]=91 WHERE [dayNumber]=281
UPDATE [dbo].[daily_verse] SET [VerseBeg]=10, [VerseEnd]=10, [Chapter]=91 WHERE [dayNumber]=282
UPDATE [dbo].[daily_verse] SET [VerseBeg]=11, [VerseEnd]=11, [Chapter]=91 WHERE [dayNumber]=283
UPDATE [dbo].[daily_verse] SET [VerseBeg]=12, [VerseEnd]=12, [Chapter]=91 WHERE [dayNumber]=284
UPDATE [dbo].[daily_verse] SET [Book]=N'Galatians ', [VerseBeg]=3, [VerseEnd]=4, [Chapter]=1 WHERE [dayNumber]=285
UPDATE [dbo].[daily_verse] SET [Book]=N'Philippians', [VerseBeg]=19, [VerseEnd]=19, [Chapter]=4 WHERE [dayNumber]=286
UPDATE [dbo].[daily_verse] SET [Book]=N'Genesis', [VerseBeg]=3, [VerseEnd]=5, [Chapter]=1 WHERE [dayNumber]=287
UPDATE [dbo].[daily_verse] SET [Book]=N'Titus', [VerseBeg]=11, [VerseEnd]=11, [Chapter]=2 WHERE [dayNumber]=288
UPDATE [dbo].[daily_verse] SET [Book]=N'Titus', [VerseBeg]=12, [VerseEnd]=12, [Chapter]=2 WHERE [dayNumber]=289
UPDATE [dbo].[daily_verse] SET [Book]=N'Titus', [VerseBeg]=13, [VerseEnd]=13, [Chapter]=2 WHERE [dayNumber]=290
UPDATE [dbo].[daily_verse] SET [Book]=N'Nehemiah', [VerseBeg]=6, [VerseEnd]=6, [Chapter]=9 WHERE [dayNumber]=291
UPDATE [dbo].[daily_verse] SET [Book]=N'Daniel', [VerseBeg]=2, [Chapter]=4 WHERE [dayNumber]=292
UPDATE [dbo].[daily_verse] SET [VerseBeg]=1, [VerseEnd]=1, [Chapter]=9 WHERE [dayNumber]=293
UPDATE [dbo].[daily_verse] SET [Book]=N'Nahum', [VerseBeg]=7, [VerseEnd]=7, [Chapter]=1 WHERE [dayNumber]=294
UPDATE [dbo].[daily_verse] SET [Book]=N'Micah', [VerseBeg]=4, [VerseEnd]=4, [Chapter]=5 WHERE [dayNumber]=295
UPDATE [dbo].[daily_verse] SET [Book]=N'Philemon', [VerseBeg]=4, [VerseEnd]=4, [Chapter]=1 WHERE [dayNumber]=296
UPDATE [dbo].[daily_verse] SET [Chapter]=61 WHERE [dayNumber]=297
UPDATE [dbo].[daily_verse] SET [Book]=N'John ', [Chapter]=17 WHERE [dayNumber]=298
UPDATE [dbo].[daily_verse] SET [Book]=N'Habakkuk', [VerseBeg]=20, [VerseEnd]=20, [Chapter]=2 WHERE [dayNumber]=299
UPDATE [dbo].[daily_verse] SET [Book]=N'Jonah', [VerseBeg]=9, [VerseEnd]=9, [Chapter]=2 WHERE [dayNumber]=300
UPDATE [dbo].[daily_verse] SET [VerseBeg]=2, [VerseEnd]=2, [Chapter]=61 WHERE [dayNumber]=301
UPDATE [dbo].[daily_verse] SET [Book]=N'Micah', [VerseBeg]=8, [VerseEnd]=8, [Chapter]=6 WHERE [dayNumber]=302
UPDATE [dbo].[daily_verse] SET [Book]=N'Colossians', [VerseBeg]=12, [VerseEnd]=12, [Chapter]=3 WHERE [dayNumber]=303
UPDATE [dbo].[daily_verse] SET [Book]=N'Colossians', [VerseBeg]=13, [VerseEnd]=13, [Chapter]=3 WHERE [dayNumber]=304
UPDATE [dbo].[daily_verse] SET [Book]=N'Colossians', [VerseBeg]=14, [VerseEnd]=14, [Chapter]=3 WHERE [dayNumber]=305
UPDATE [dbo].[daily_verse] SET [Book]=N'Hosea', [VerseBeg]=9, [VerseEnd]=9, [Chapter]=14 WHERE [dayNumber]=306
UPDATE [dbo].[daily_verse] SET [Book]=N'Haggai', [VerseBeg]=7, [VerseEnd]=7, [Chapter]=1 WHERE [dayNumber]=307
UPDATE [dbo].[daily_verse] SET [Book]=N'Micah ', [Chapter]=7 WHERE [dayNumber]=308
UPDATE [dbo].[daily_verse] SET [VerseBeg]=11, [VerseEnd]=11, [Chapter]=5 WHERE [dayNumber]=309
UPDATE [dbo].[daily_verse] SET [Book]=N'Revelation ', [VerseBeg]=4, [VerseEnd]=4, [Chapter]=15 WHERE [dayNumber]=310
UPDATE [dbo].[daily_verse] SET [Book]=N'2 Thessalonians', [VerseBeg]=12, [VerseEnd]=12, [Chapter]=1 WHERE [dayNumber]=311
UPDATE [dbo].[daily_verse] SET [Book]=N'Jeremiah', [VerseBeg]=7, [VerseEnd]=7, [Chapter]=17 WHERE [dayNumber]=312
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=37, [VerseEnd]=37, [Chapter]=22 WHERE [dayNumber]=313
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=38, [VerseEnd]=38, [Chapter]=22 WHERE [dayNumber]=314
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=39, [VerseEnd]=39, [Chapter]=22 WHERE [dayNumber]=315
UPDATE [dbo].[daily_verse] SET [Book]=N'2 Corinthians', [VerseBeg]=17, [VerseEnd]=17, [Chapter]=5 WHERE [dayNumber]=316
UPDATE [dbo].[daily_verse] SET [Book]=N'1 Timothy', [Chapter]=1 WHERE [dayNumber]=317
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew ', [VerseBeg]=20, [VerseEnd]=20, [Chapter]=28 WHERE [dayNumber]=318
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans ', [VerseBeg]=2, [VerseEnd]=2, [Chapter]=12 WHERE [dayNumber]=319
UPDATE [dbo].[daily_verse] SET [VerseBeg]=5, [VerseEnd]=6, [Chapter]=37 WHERE [dayNumber]=320
UPDATE [dbo].[daily_verse] SET [Book]=N'Acts ', [VerseBeg]=21, [VerseEnd]=22, [Chapter]=14 WHERE [dayNumber]=321
UPDATE [dbo].[daily_verse] SET [Book]=N'Zechariah ', [VerseBeg]=6, [VerseEnd]=6, [Chapter]=4 WHERE [dayNumber]=322
UPDATE [dbo].[daily_verse] SET [VerseBeg]=9, [VerseEnd]=9, [Chapter]=96 WHERE [dayNumber]=323
UPDATE [dbo].[daily_verse] SET [Book]=N'2 Chronicles', [VerseBeg]=7, [VerseEnd]=7, [Chapter]=15 WHERE [dayNumber]=324
UPDATE [dbo].[daily_verse] SET [VerseBeg]=5, [VerseEnd]=6, [Chapter]=69 WHERE [dayNumber]=325
UPDATE [dbo].[daily_verse] SET [Book]=N'2 Corinthians', [VerseBeg]=7, [VerseEnd]=7, [Chapter]=9 WHERE [dayNumber]=326
UPDATE [dbo].[daily_verse] SET [VerseBeg]=1, [VerseEnd]=1, [Chapter]=92 WHERE [dayNumber]=327
UPDATE [dbo].[daily_verse] SET [Book]=N'Revelation', [VerseBeg]=13, [VerseEnd]=13, [Chapter]=22 WHERE [dayNumber]=328
UPDATE [dbo].[daily_verse] SET [Book]=N'Leviticus', [VerseBeg]=31, [VerseEnd]=31, [Chapter]=22 WHERE [dayNumber]=329
UPDATE [dbo].[daily_verse] SET [Book]=N'Proverbs', [VerseBeg]=4, [VerseEnd]=4, [Chapter]=22 WHERE [dayNumber]=330
UPDATE [dbo].[daily_verse] SET [Book]=N'Luke', [VerseBeg]=37, [VerseEnd]=37, [Chapter]=1 WHERE [dayNumber]=331
UPDATE [dbo].[daily_verse] SET [Book]=N'John ', [VerseBeg]=31, [VerseEnd]=31, [Chapter]=20 WHERE [dayNumber]=332
UPDATE [dbo].[daily_verse] SET [Book]=N'Ecclesiastes', [VerseBeg]=1, [VerseEnd]=1, [Chapter]=3 WHERE [dayNumber]=333
UPDATE [dbo].[daily_verse] SET [Book]=N'Ecclesiastes', [VerseBeg]=2, [VerseEnd]=3, [Chapter]=3 WHERE [dayNumber]=334
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [Chapter]=7 WHERE [dayNumber]=335
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=26, [VerseEnd]=26, [Chapter]=16 WHERE [dayNumber]=336
UPDATE [dbo].[daily_verse] SET [Book]=N'1 Peter', [VerseBeg]=4, [VerseEnd]=4, [Chapter]=5 WHERE [dayNumber]=337
UPDATE [dbo].[daily_verse] SET [Book]=N'Ephesians ', [VerseBeg]=16, [VerseEnd]=19 WHERE [dayNumber]=338
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=5, [VerseEnd]=6, [Chapter]=62 WHERE [dayNumber]=339
UPDATE [dbo].[daily_verse] SET [Book]=N'1 John ', [VerseBeg]=9, [VerseEnd]=9, [Chapter]=4 WHERE [dayNumber]=340
UPDATE [dbo].[daily_verse] SET [Book]=N'Ephesians', [VerseBeg]=15, [VerseEnd]=15, [Chapter]=4 WHERE [dayNumber]=341
UPDATE [dbo].[daily_verse] SET [Book]=N'Luke', [VerseBeg]=27, [VerseEnd]=28, [Chapter]=6 WHERE [dayNumber]=342
UPDATE [dbo].[daily_verse] SET [Book]=N'John ', [VerseBeg]=33, [VerseEnd]=33, [Chapter]=16 WHERE [dayNumber]=343
UPDATE [dbo].[daily_verse] SET [Book]=N'John', [VerseBeg]=24, [VerseEnd]=24, [Chapter]=16 WHERE [dayNumber]=344
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=5, [VerseEnd]=5, [Chapter]=17 WHERE [dayNumber]=345
UPDATE [dbo].[daily_verse] SET [Book]=N'Luke', [VerseBeg]=2, [VerseEnd]=3, [Chapter]=12 WHERE [dayNumber]=346
UPDATE [dbo].[daily_verse] SET [VerseBeg]=32, [VerseEnd]=32 WHERE [dayNumber]=347
UPDATE [dbo].[daily_verse] SET [Book]=N'Acts ', [VerseBeg]=12, [VerseEnd]=12, [Chapter]=4 WHERE [dayNumber]=348
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=13, [VerseEnd]=13, [Chapter]=9 WHERE [dayNumber]=349
UPDATE [dbo].[daily_verse] SET [Book]=N'Habakkuk', [VerseBeg]=2, [VerseEnd]=2, [Chapter]=3 WHERE [dayNumber]=350
UPDATE [dbo].[daily_verse] SET [Book]=N'Philippians', [VerseBeg]=9, [VerseEnd]=11, [Chapter]=1 WHERE [dayNumber]=351
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=2, [VerseEnd]=2, [Chapter]=6 WHERE [dayNumber]=352
UPDATE [dbo].[daily_verse] SET [VerseBeg]=18, [VerseEnd]=19, [Chapter]=145 WHERE [dayNumber]=353
UPDATE [dbo].[daily_verse] SET [Book]=N'Isaiah', [VerseBeg]=10, [VerseEnd]=10, [Chapter]=41 WHERE [dayNumber]=354
UPDATE [dbo].[daily_verse] SET [Book]=N'Proverbs', [VerseBeg]=18, [VerseEnd]=18, [Chapter]=16 WHERE [dayNumber]=355
UPDATE [dbo].[daily_verse] SET [Book]=N'Proverbs', [VerseBeg]=24, [VerseEnd]=24 WHERE [dayNumber]=356
UPDATE [dbo].[daily_verse] SET [Book]=N'Mark', [VerseBeg]=41, [VerseEnd]=41, [Chapter]=9 WHERE [dayNumber]=357
UPDATE [dbo].[daily_verse] SET [Book]=N'Galatians', [VerseBeg]=4, [VerseEnd]=5, [Chapter]=4 WHERE [dayNumber]=358
UPDATE [dbo].[daily_verse] SET [Book]=N'Deuteronomy ', [VerseBeg]=16, [VerseEnd]=16, [Chapter]=30 WHERE [dayNumber]=359
UPDATE [dbo].[daily_verse] SET [Book]=N'Matthew', [VerseBeg]=23, [VerseEnd]=23, [Chapter]=1 WHERE [dayNumber]=360
UPDATE [dbo].[daily_verse] SET [Book]=N'Luke', [VerseBeg]=27, [VerseEnd]=27, [Chapter]=18 WHERE [dayNumber]=361
UPDATE [dbo].[daily_verse] SET [Book]=N'Mark', [VerseBeg]=36, [VerseEnd]=36, [Chapter]=8 WHERE [dayNumber]=362
UPDATE [dbo].[daily_verse] SET [Book]=N'Romans', [VerseBeg]=16, [VerseEnd]=16, [Chapter]=12 WHERE [dayNumber]=363
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=4, [VerseEnd]=4, [Chapter]=27 WHERE [dayNumber]=364
UPDATE [dbo].[daily_verse] SET [VerseBeg]=10, [VerseEnd]=10, [Chapter]=13 WHERE [dayNumber]=365
UPDATE [dbo].[daily_verse] SET [Book]=N'Psalm', [VerseBeg]=2, [VerseEnd]=2, [Chapter]=33 WHERE [dayNumber]=366
-- Operation applied to 365 rows out of 365
-- Add row to [dbo].[widget_app]
INSERT INTO [dbo].[widget_app] ([id], [name], [title], [template], [content_key], [post_load_javascript], [requires_web], [optional], [student], [teacher], [default_column], [default_order], [default_widget], [installation_date]) VALUES (35, 'ParentToolbox', 'Parent Toolbox', 'Reading Log Activity Log', '#NONE#', '', 0, 1, 0, 1, 3, 99, 1, '2010-10-27 09:16:09.780')
print 'Remove journal from homepage.modOrder'
-- Remove a column that only has Journal
update homepage
set modorder = replace(modOrder, '|Journal|', '||')
-- Remove Journal that starts a column that has more than one entry
update homepage
set modorder = replace(modOrder, '|Journal,', '|')
-- Remove Journal from the middle of a column that has multiple entries
update homepage
set modorder = replace(modOrder, ',Journal,', ',')
-- Remove Journal from the end of a column that has multiple entries
update homepage
set modorder = replace(modOrder, ',Journal|', '|')
-- Remove Journal from the first column that has no other entries
-- Must be done at the end
update homepage
set modorder = replace(modOrder, 'Journal|', '')
-- Remove Journal from the final column which has no other entries.
-- Must be done at the end
update homepage
set modorder = replace(modOrder, '|Journal', '')
-- Remove Journal from the first column where a ',' (for whatever reason)
-- preceeds the entire column entry. Must be done at the end
update homepage
set modorder = replace(modOrder, ',Journal', '')
print 'Remove Journal from homepage.modCollapsed'
-- Remove Journal from the center of multiple entries
update homepage
set modCollapsed = replace(modCollapsed, ',Journal,', ',')
-- Remove Journal from the begining where a ',' (for whatever reason)
-- preceeds the entire column entry. Must be done at the end
update homepage
set modCollapsed = replace(modCollapsed, ',Journal', '')
-- Remove a stand alone 'Jounal'. Must be done at the end
update homepage
set modCollapsed = replace(modCollapsed, 'Journal', '')
print 'Updating registration codes'
delete registration
insert into registration values ('991350F16BA32479F84923771AA5CCA9329DA4BD443EBD0C', getdate())
insert into registration values ('6706D485FD7408974B5220323C3A5140509C7A7E39903220', getdate())
COMMIT TRANSACTION
GO
ރ /*
Run this script on:
GL-C7MCHN1-P\SOSHOME309.SOSHOME2012 - This database will be modified
to synchronize it with:
aop-pocqa03.soshome2013
You are recommended to back up your database before running this script
Script created by SQL Compare version 8.50.25 from Red Gate Software Ltd at 1/11/2013 12:17:52 PM
*/
USE SOSHOME20XX
GO
SET NUMERIC_ROUNDABORT OFF
GO
SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE id=OBJECT_ID('tempdb..#tmpErrors')) DROP TABLE #tmpErrors
GO
CREATE TABLE #tmpErrors (Error int)
GO
SET XACT_ABORT ON
GO
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
GO
BEGIN TRANSACTION
if object_id('Stored_Procedure_Name') is not null
begin
print 'PREDROP: Stored_Procedure_Name'
drop proc Stored_Procedure_Name
end
go
GO
PRINT N'Dropping foreign keys from [dbo].[presentation_output]'
GO
ALTER TABLE [dbo].[presentation_output] DROP
CONSTRAINT [FK_presentation_output_student_assignment]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Dropping constraints from [dbo].[curriculum_revision]'
GO
ALTER TABLE [dbo].[curriculum_revision] DROP CONSTRAINT [PK_curriculum_revision]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Dropping constraints from [dbo].[curriculum_revision]'
GO
ALTER TABLE [dbo].[curriculum_revision] DROP CONSTRAINT [DF_curriculum_revision_revision]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Dropping constraints from [dbo].[presentation_output]'
GO
ALTER TABLE [dbo].[presentation_output] DROP CONSTRAINT [PK_presentation_output]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Rebuilding [dbo].[presentation_output]'
GO
CREATE TABLE [dbo].[tmp_rg_xx_presentation_output]
(
[student_assignment_id] [uniqueidentifier] NOT NULL,
[section_index] [tinyint] NOT NULL,
[html] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
INSERT INTO [dbo].[tmp_rg_xx_presentation_output]([student_assignment_id], [section_index], [html]) SELECT [student_assignment_id], [section_index], [html] FROM [dbo].[presentation_output]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
DROP TABLE [dbo].[presentation_output]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
EXEC sp_rename N'[dbo].[tmp_rg_xx_presentation_output]', N'presentation_output'
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating primary key [PK_presentation_output] on [dbo].[presentation_output]'
GO
ALTER TABLE [dbo].[presentation_output] ADD CONSTRAINT [PK_presentation_output] PRIMARY KEY CLUSTERED ([student_assignment_id], [section_index])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[SavePresentationOutput]'
GO
IF OBJECT_ID('[dbo].[SavePresentationOutput]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[SavePresentationOutput]'
DROP PROC [dbo].[SavePresentationOutput]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[SavePresentationOutput]'
GO
CREATE Procedure [dbo].[SavePresentationOutput]
/* Param List */
@studentAssignmentId as uniqueidentifier,
@sectionIndex as tinyint,
@html as nvarchar(max)
AS
/******************************************************************************
** File:
** Name: SavePresentationOutput
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
IF (SELECT COUNT(*)
FROM presentation_output
WHERE student_assignment_id = @studentAssignmentId
AND section_index = @sectionIndex) > 0
UPDATE presentation_output
SET html = @html
WHERE student_assignment_id = @studentAssignmentId
AND section_index = @sectionIndex
ELSE
INSERT INTO presentation_output(student_assignment_id, section_index, html)
Values (@studentAssignmentId, @sectionIndex, @html)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetReadingLogReport]'
GO
IF OBJECT_ID('[dbo].[GetReadingLogReport]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetReadingLogReport]'
DROP PROC [dbo].[GetReadingLogReport]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetReadingLogReport]'
GO
CREATE Procedure [dbo].[GetReadingLogReport]
/* Param List */
@StudentId as uniqueidentifier,
@StartDate as date,
@EndDate as date
AS
SET NOCOUNT ON
SELECT u.username, u.first_name + ' ' + u.last_name AS 'displayname', rl.title, rl.author, 'daterange' = ' ', CONVERT(VARCHAR(10),rl.[started],101) as 'StartDate',
'DueDate' = CASE WHEN rl.due IS NULL then ' '
ELSE CONVERT(VARCHAR(10),rl.due,101)
END,
'CompletedDate' = CASE WHEN rl.completed IS NULL then ' '
ELSE CONVERT(VARCHAR(10),rl.completed,101)
END
FROM reading_log rl join [user] u ON rl.[user_id] = u.[user_id]
WHERE rl.[user_id] = @StudentId AND started >= @StartDate and started <= @EndDate
ORDER BY rl.title
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[keep_alive]'
GO
CREATE TABLE [dbo].[keep_alive]
(
[id] [uniqueidentifier] NOT NULL,
[name] [varchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[seconds] [int] NOT NULL,
[pid] [int] NOT NULL,
[ip] [varchar] (39) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[netbios] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[last_ping] [datetime] NOT NULL
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating primary key [PK_KeepAlive] on [dbo].[keep_alive]'
GO
ALTER TABLE [dbo].[keep_alive] ADD CONSTRAINT [PK_KeepAlive] PRIMARY KEY CLUSTERED ([id])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[KeepAlive]'
GO
IF OBJECT_ID('[dbo].[KeepAlive]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[KeepAlive]'
DROP PROC [dbo].[KeepAlive]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[KeepAlive]'
GO
CREATE procedure [dbo].[KeepAlive]
@CRUD char,
@id uniqueidentifier,
@name varchar(max) = null,
@seconds int = null,
@pid int = null,
@ip varchar(39) = null,
@netbios varchar(15) = null
as
begin
set @CRUD = upper(@CRUD)
/* First, delete all expired keep alives. */
delete keep_alive
where seconds <= datediff(s, last_ping, GETDATE())
if @CRUD = 'C' -- Create
begin
select @id=id, @netbios=netbios, @ip=ip, @pid=pid from keep_alive
where name = @name
/* If keep alive with the same name exists, raiseerror. The message is parsed
by the business layer so be careful when changing it. */
if @@rowcount <> 0
begin
raiserror ('Keepalive lock aleady exists; computer: %s, ip: %s, PID: %i'
,11,1, @netbios, @ip, @pid)
return
end
/* Create keep alive */
insert into keep_alive
values(@id, @name, @seconds, @pid, @ip, @netbios, GETDATE())
end
else if @CRUD = 'U' -- Update/Ping
begin
/* Update the last_ping column to indicate the that the process associated
with the keep alive is alive and kicking. */
update keep_alive
set last_ping = GETDATE()
where @id = id
/* If no row was updated then it must have been deleted above, meaning it doesn't
exist anymore. Setting the state of the error to 2 indicates that it is a expiry
error. */
if @@ROWCOUNT = 0
raiserror('Keepalive expired', 11, 2)
end
else if @CRUD = 'D' -- Delete/Release
/* Business layer wants to explicitly remove the keep_alive. */
delete keep_alive where id = @id
end
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetTerms]'
GO
IF OBJECT_ID('[dbo].[GetTerms]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetTerms]'
DROP PROC [dbo].[GetTerms]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetTerms]'
GO
CREATE Procedure [dbo].[GetTerms]
@TermId int = NULL
AS
/******************************************************************************
** File:
** Name: GetTerms
** Desc:
**
** This template can be customized:
**
** Return values: Return value of 0 for advanced_lesson_planning_ind since the home version
** does not set this on the term object. Return type of 4 since in the home
** version all terms are year type terms.
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
IF @TermId IS NULL
SELECT term_id, description, start_date, end_date, sequence_nbr = 0,
parent_id = null, advanced_lesson_planning_ind = 0, type = 4
FROM term
ORDER BY CAST(start_date AS DATETIME) DESC, description
ELSE
SELECT term_id, description, start_date, end_date, sequence_nbr = 0,
parent_id = null, advanced_lesson_planning_ind = 0, type = 4
FROM term
WHERE term_id = @TermId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[application_settings]'
GO
ALTER TABLE [dbo].[application_settings] ADD
[helps_enabled_ind] [bit] NOT NULL CONSTRAINT [DF_application_settings_helps_enabled_ind] DEFAULT ((0))
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[SaveHelpsEnabledIndicator]'
GO
IF OBJECT_ID('[dbo].[SaveHelpsEnabledIndicator]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[SaveHelpsEnabledIndicator]'
DROP PROC [dbo].[SaveHelpsEnabledIndicator]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[SaveHelpsEnabledIndicator]'
GO
CREATE Procedure [dbo].[SaveHelpsEnabledIndicator]
/* Param List */
@HelpsEnabled bit
AS
/******************************************************************************
** File:
** Name: SaveHelpsEnabledIndicator
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
UPDATE application_settings
SET helps_enabled_ind = @HelpsEnabled
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetHelpsEnabledInd]'
GO
IF OBJECT_ID('[dbo].[GetHelpsEnabledInd]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetHelpsEnabledInd]'
DROP PROC [dbo].[GetHelpsEnabledInd]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetHelpsEnabledInd]'
GO
CREATE Procedure [dbo].[GetHelpsEnabledInd]
/* Param List */
AS
/******************************************************************************
** File:
** Name: GetHelpsEnabledInd
** Desc: Returns the problem helps enabled indicator
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SELECT TOP 1 helps_enabled_ind
FROM application_settings
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Rebuilding [dbo].[curriculum_revision]'
GO
CREATE TABLE [dbo].[tmp_rg_xx_curriculum_revision]
(
[namespace] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[folder] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[filename] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[revision] [int] NOT NULL CONSTRAINT [DF_curriculum_revision_revision] DEFAULT ((0)),
[xml] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
INSERT INTO [dbo].[tmp_rg_xx_curriculum_revision]([namespace], [folder], [filename], [revision], [xml]) SELECT [namespace], [folder], [filename], [revision], [xml] FROM [dbo].[curriculum_revision]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
DROP TABLE [dbo].[curriculum_revision]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
EXEC sp_rename N'[dbo].[tmp_rg_xx_curriculum_revision]', N'curriculum_revision'
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating primary key [PK_curriculum_revision] on [dbo].[curriculum_revision]'
GO
ALTER TABLE [dbo].[curriculum_revision] ADD CONSTRAINT [PK_curriculum_revision] PRIMARY KEY CLUSTERED ([namespace], [folder], [filename])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetCorrelationTag]'
GO
IF OBJECT_ID('[dbo].[GetCorrelationTag]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetCorrelationTag]'
DROP PROC [dbo].[GetCorrelationTag]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetCorrelationTag]'
GO
CREATE Procedure [dbo].[GetCorrelationTag]
/* Param List */
@Namespace as varchar(100),
@Folder as varchar(100),
@FileName as varchar(100)
AS
SELECT u.title, a.title, a.assignment_id FROM curriculum_assignment a join curriculum_unit u on a.curriculum_unit_id = u.unit_id
WHERE a.filename = @FileName AND u.folder = @Folder AND u.curriculum_subject_namespace = @Namespace
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetCurriculumAssignmentByID]'
GO
IF OBJECT_ID('[dbo].[GetCurriculumAssignmentByID]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetCurriculumAssignmentByID]'
DROP PROC [dbo].[GetCurriculumAssignmentByID]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetCurriculumAssignmentByID]'
GO
CREATE Procedure [dbo].[GetCurriculumAssignmentByID]
/* Param List */
@AssignmentId as Uniqueidentifier
AS
SELECT ca.[filename], ca.title, ca.sequence_nbr, ca.assignment_type, ca.assigned_ind,
ca.time_to_work, ca.curriculum_unit_id, cu.curriculum_subject_namespace, cu.folder, cu.title as "UnitTitle", cs.title as "SubjectTitle"
FROM curriculum_assignment ca join curriculum_unit cu on ca.curriculum_unit_id = cu.unit_id
join curriculum_subject cs on cs.namespace = cu.curriculum_subject_namespace
WHERE assignment_id = @AssignmentId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetCurriculumRevisionCandidates]'
GO
IF OBJECT_ID('[dbo].[GetCurriculumRevisionCandidates]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetCurriculumRevisionCandidates]'
DROP PROC [dbo].[GetCurriculumRevisionCandidates]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetCurriculumRevisionCandidates]'
GO
CREATE proc [dbo].[GetCurriculumRevisionCandidates]
@namespace as varchar(100) = null
as
--DEFUNCT--
select cs.namespace, cu.[folder], ca.[filename],
isnull(cr.revision,0) as revision
from curriculum_subject cs
inner join curriculum_unit cu
on cu.curriculum_subject_namespace = cs.namespace
inner join curriculum_assignment ca
on ca.curriculum_unit_id = cu.unit_id
left join curriculum_revision cr
on cr.namespace = cs.namespace
and cr.folder = cu.folder
and cr.filename = ca.filename
where cs.namespace = isnull(@namespace, cs.namespace)
order by 1,2,3
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[GetAllCustomAssignments]'
GO
IF OBJECT_ID('[dbo].[GetAllCustomAssignments]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetAllCustomAssignments]'
DROP PROC [dbo].[GetAllCustomAssignments]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetAllCustomAssignments]'
GO
CREATE Procedure [dbo].[GetAllCustomAssignments]
/* Param List */
AS
/******************************************************************************
** File:
** Name: GetAllCustomAssignments
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SELECT
a.assignment_id, a.sequence_nbr, a.unit_id,
ac.custom_xml, ac.title, ac.time_to_work, ac.assignment_type
FROM assignment a
JOIN assignment_custom ac ON ac.assignment_id = a.assignment_id
JOIN unit u ON u.unit_id = a.unit_id
JOIN subject s ON u.subject_id = s.subject_id
WHERE s.title = '{20450D92-3313-4D16-8B6C-32925200698D}'
ORDER BY ac.title
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetActivityLogReport]'
GO
IF OBJECT_ID('[dbo].[GetActivityLogReport]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetActivityLogReport]'
DROP PROC [dbo].[GetActivityLogReport]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetActivityLogReport]'
GO
CREATE Procedure [dbo].[GetActivityLogReport]
/* Param List */
@StudentId as uniqueidentifier,
@StartDate as date,
@EndDate as date
AS
SET NOCOUNT ON
select u.first_name + ' ' + u.last_name as 'displayname', mm.[user_id], act.type, e.description, act.summary, act.location, 'daterange' = ' ', 'totaltime' = ' ', CAST(act.hours as varchar(20)) as 'hours', e.start_date, e.end_date
from activity act
join school_event_mm_user mm
on act.event_id = mm.event_id
join event e
on act.event_id = e.event_id
join [user] u on u.[user_id] = mm.[user_id]
where mm.user_id = @StudentId AND start_date >= @StartDate and start_date <= @EndDate
union
select u.first_name + ' ' + u.last_name as 'displayname', se.[student_id], act.type, e.description, act.summary, act.location, 'daterange' = ' ', 'totaltime' = ' ', CAST(act.hours as varchar(20)) as 'hours', e.start_date, e.end_date
from activity act
join student_event se
on act.event_id = se.event_id
join event e
on act.event_id = e.event_id
join [user] u on u.[user_id] = se.[student_id]
where se.student_id = @StudentId AND start_date >= @StartDate and start_date <= @EndDate
ORDER BY act.type
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetEventsSchool]'
GO
IF OBJECT_ID('[dbo].[GetEventsSchool]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetEventsSchool]'
DROP PROC [dbo].[GetEventsSchool]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetEventsSchool]'
GO
CREATE Procedure [dbo].[GetEventsSchool]
AS
select *, act.event_id as act_event_id,
event_type=case when ste.event_id is null then 0 else 2 end
from event e
left join school_event se
on se.event_id = e.event_id
left join student_event ste
on ste.event_id = e.event_id
left join activity act
on act.event_id = e.event_id
where (se.event_id is not null or ste.event_id is not null) and
(ste.event_id is null or
( ste.event_id is not null and
ste.student_id in (select user_id
from [user]
where user_type = 's'
)
)
)
order by e.description
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetEventsStudent]'
GO
IF OBJECT_ID('[dbo].[GetEventsStudent]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetEventsStudent]'
DROP PROC [dbo].[GetEventsStudent]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetEventsStudent]'
GO
CREATE Procedure [dbo].[GetEventsStudent]
/* Param List */
@StudentID uniqueidentifier
AS
select *, act.event_id as act_event_id,
event_type=case when ste.event_id is null then 0 else 2 end
from event e
left join school_event se
on se.event_id = e.event_id
left join student_event ste
on ste.event_id = e.event_id
left join activity act
on act.event_id = e.event_id
where (se.event_id is not null or ste.event_id is not null) and
(ste.event_id is null or
( ste.event_id is not null and ste.student_id = @StudentID)
)
order by e.description
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[SaveAssignmentRevision]'
GO
IF OBJECT_ID('[dbo].[SaveAssignmentRevision]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[SaveAssignmentRevision]'
DROP PROC [dbo].[SaveAssignmentRevision]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[SaveAssignmentRevision]'
GO
CREATE Procedure [dbo].[SaveAssignmentRevision]
/* Param List */
@Namespace as varchar(100),
@Folder as varchar(100),
@FileName as varchar(100),
@Revision as int,
@XML as nvarchar(max),
@ModifiedDate datetime
AS
/******************************************************************************
** File:
** Name: SaveAssignmentRevision
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
DECLARE @intRevision int
IF (SELECT COUNT(*)
FROM curriculum_revision
WHERE namespace = @Namespace
AND folder = @Folder
AND filename = @FileName) > 0
SET @intRevision = (SELECT revision
FROM curriculum_revision
WHERE namespace = @Namespace
AND folder = @Folder
AND filename = @FileName)
IF @intRevision <= @Revision
BEGIN
UPDATE curriculum_revision
SET revision = @Revision,
[xml] = @XML
WHERE namespace = @Namespace
AND folder = @Folder
AND filename = @FileName
END
ELSE
INSERT INTO curriculum_revision
(namespace, folder, filename, revision, [xml])
VALUES (@Namespace, @Folder, @FileName, @Revision, @XML)
DELETE presentation_output
WHERE student_assignment_id IN (
SELECT id
FROM student_assignment
WHERE namespace = @Namespace
AND folder = @Folder
AND filename = @FileName)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Adding foreign keys to [dbo].[presentation_output]'
GO
ALTER TABLE [dbo].[presentation_output] WITH NOCHECK ADD
CONSTRAINT [FK_presentation_output_student_assignment] FOREIGN KEY ([student_assignment_id]) REFERENCES [dbo].[student_assignment] ([id]) ON DELETE CASCADE
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering permissions on [dbo].[GetTopTerm]'
GO
REVOKE EXECUTE ON [dbo].[GetTopTerm] TO [public]
GO
PRINT N'Altering permissions on [dbo].[AtAGlanceNextAssignment]'
GO
REVOKE EXECUTE ON [dbo].[AtAGlanceNextAssignment] TO [public]
GO
PRINT N'Altering permissions on [dbo].[AtAGlanceNextAssignmentALP]'
GO
REVOKE EXECUTE ON [dbo].[AtAGlanceNextAssignmentALP] TO [public]
GO
PRINT N'Altering permissions on [dbo].[student_assignment]'
GO
--REVOKE SELECT ON [dbo].[student_assignment] TO [soshome12]
GO
PRINT N'Altering permissions on [dbo].[student_subject]'
GO
--REVOKE SELECT ON [dbo].[student_subject] TO [soshome12]
GO
PRINT N'Altering permissions on [dbo].[student_unit]'
GO
--REVOKE SELECT ON [dbo].[student_unit] TO [soshome12]
GO
PRINT N'Altering permissions on [dbo].[term]'
GO
--REVOKE SELECT ON [dbo].[term] TO [soshome12]
GO
PRINT N'Altering permissions on [dbo].[user]'
GO
--REVOKE SELECT ON [dbo].[user] TO [soshome12]
GO
PRINT N'Altering permissions on [dbo].[SaveProblemFile]'
GO
REVOKE EXECUTE ON [dbo].[SaveProblemFile] TO [public]
GO
PRINT N'Altering permissions on [dbo].[GetBibleDataSet]'
GO
REVOKE EXECUTE ON [dbo].[GetBibleDataSet] TO [public]
GO
IF EXISTS (SELECT * FROM #tmpErrors) ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT>0 BEGIN
PRINT 'The database update succeeded'
COMMIT TRANSACTION
END
ELSE PRINT 'The database update failed'
GO
DROP TABLE #tmpErrors
GO
/*
Run this script on:
AOP-POCQA03.DMLCOMP - This database will be modified
to synchronize it with:
AOP-POCQA03.soshome2013_goldendata
You are recommended to back up your database before running this script
Script created by SQL Data Compare version 8.1.0 from Red Gate Software Ltd at 01/11/2013 12:18:12
*/
SET NUMERIC_ROUNDABORT OFF
GO
SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS, NOCOUNT ON
GO
SET DATEFORMAT YMD
GO
SET XACT_ABORT ON
GO
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
GO
BEGIN TRANSACTION
-- Pointer used for text / image updates. This might not be needed, but is declared here just in case
DECLARE @pv binary(16)
-- Update row in [dbo].[widget_app]
UPDATE [dbo].[widget_app] SET [template]='
' WHERE [id]=33
-- Add row to [dbo].[widget_app]
INSERT INTO [dbo].[widget_app] ([id], [name], [title], [template], [content_key], [post_load_javascript], [requires_web], [optional], [student], [teacher], [default_column], [default_order], [default_widget], [installation_date]) VALUES (36, 'StudentReadingLog', 'Student Reading Log', 'Reading Log', '#NONE#', ' ', 0, 1, 1, 0, 3, 99, 1, '2012-11-15 13:37:36.513')
print 'Custom DML'
declare @start as datetime
declare @end as datetime
set @start = '2000-01-01'
set @end = '2020-12-31'
print 'Updating reading_log table'
update reading_log set started = @start where started < @start
update reading_log set due = @start where due < @start
update reading_log set completed = @start where completed < @start
update reading_log set started = @end where started > @end
update reading_log set due = @end where due > @end
update reading_log set completed = @end where completed > @end
print 'Updating event table'
update event set start_date = @start where start_date < @start
update event set end_date = @start where end_date < @start
update event set start_date = @end where start_date > @end
update event set end_date = @end where end_date > @end
COMMIT TRANSACTION
GO
B /*
Run this script on:
CHA-CXZRMS1-P\SOSHOME80.soshome2013 - This database will be modified
to synchronize it with:
soshome2014
You are recommended to back up your database before running this script
Script created by SQL Compare version 8.50.25 from Red Gate Software Ltd at 12/6/2013 11:23:26 AM
*/
USE SOSHOME20XX
GO
SET NUMERIC_ROUNDABORT OFF
GO
SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE id=OBJECT_ID('tempdb..#tmpErrors')) DROP TABLE #tmpErrors
GO
CREATE TABLE #tmpErrors (Error int)
GO
SET XACT_ABORT ON
GO
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
GO
BEGIN TRANSACTION
if object_id('Stored_Procedure_Name') is not null
begin
print 'PREDROP: Stored_Procedure_Name'
drop proc Stored_Procedure_Name
end
go
GO
PRINT N'Creating [dbo].[ticket]'
GO
CREATE TABLE [dbo].[ticket]
(
[id] [uniqueidentifier] NOT NULL,
[user_id] [uniqueidentifier] NOT NULL,
[description] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[mirrored] [bit] NOT NULL
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating primary key [PK_Ticket] on [dbo].[ticket]'
GO
ALTER TABLE [dbo].[ticket] ADD CONSTRAINT [PK_Ticket] PRIMARY KEY CLUSTERED ([id])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating index [IX_ticket] on [dbo].[ticket]'
GO
CREATE NONCLUSTERED INDEX [IX_ticket] ON [dbo].[ticket] ([id])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[curriculum_ticket]'
GO
CREATE TABLE [dbo].[curriculum_ticket]
(
[id] [uniqueidentifier] NOT NULL,
[ticket_id] [uniqueidentifier] NOT NULL,
[namespace] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[folder] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[filename] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[version] [int] NULL,
[problem_number] [int] NULL
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating primary key [PK_curriculum_ticket] on [dbo].[curriculum_ticket]'
GO
ALTER TABLE [dbo].[curriculum_ticket] ADD CONSTRAINT [PK_curriculum_ticket] PRIMARY KEY CLUSTERED ([id])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[student_problem_file_path]'
GO
CREATE TABLE [dbo].[student_problem_file_path]
(
[student_assignment_id] [uniqueidentifier] NOT NULL,
[problem_id] [int] NOT NULL,
[user_id] [uniqueidentifier] NOT NULL,
[filepath] [varchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetStudentProblemFile]'
GO
IF OBJECT_ID('[dbo].[GetStudentProblemFile]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetStudentProblemFile]'
DROP PROC [dbo].[GetStudentProblemFile]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetStudentProblemFile]'
GO
CREATE Procedure [dbo].[GetStudentProblemFile]
/* Param List */
@AssignmentId uniqueidentifier,
@ProblemId int
AS
/******************************************************************************
** File:
** Name: GetStudentProblemFile
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SELECT spf.problem_file, spf.[filename], spfp.filepath, spfp.[user_id]
FROM student_problem_file spf LEFT JOIN student_problem_file_path spfp
ON spf.student_assignment_id = spfp.student_assignment_id AND spf.problem_id = spfp.problem_id
WHERE spf.student_assignment_id = @AssignmentId
AND spf.problem_id = @ProblemId
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[SaveStudentProblemFileWithPath]'
GO
IF OBJECT_ID('[dbo].[SaveStudentProblemFileWithPath]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[SaveStudentProblemFileWithPath]'
DROP PROC [dbo].[SaveStudentProblemFileWithPath]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[SaveStudentProblemFileWithPath]'
GO
CREATE Procedure [dbo].[SaveStudentProblemFileWithPath]
/* Param List */
@AssignmentId uniqueidentifier,
@ProblemId int,
@File image,
@Filename varchar(500),
@UserId as uniqueidentifier,
@Filepath varchar(500),
@ModifiedDate datetime
AS
/******************************************************************************
** File:
** Name: SaveStudentProblemFileWithPath
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
**
*******************************************************************************/
-- If problem file already exists,
IF (SELECT COUNT(*)
FROM student_problem_file
WHERE student_assignment_id = @AssignmentId
AND problem_id = @ProblemId) > 0
BEGIN
-- Update it
UPDATE student_problem_file
SET problem_file = @File,
filename = @Filename
WHERE student_assignment_id = @AssignmentId
AND problem_id = @ProblemId
END
ELSE
BEGIN
-- Otherwise add a new problem file
INSERT INTO student_problem_file(student_assignment_id, problem_id, problem_file, filename)
Values (@AssignmentId, @ProblemId, @File, @Filename)
END
-- If problem file path already exists,
IF (SELECT COUNT(*)
FROM student_problem_file_path
WHERE student_assignment_id = @AssignmentId
AND problem_id = @ProblemId AND [user_id] = @UserId) > 0
BEGIN
-- Update it
UPDATE student_problem_file_path
SET filepath = @Filepath
WHERE student_assignment_id = @AssignmentId
AND problem_id = @ProblemId AND [user_id] = @UserId
END
ELSE
BEGIN
-- Otherwise add a new problem file path
INSERT INTO student_problem_file_path(student_assignment_id, problem_id, [user_id], filepath)
Values (@AssignmentId, @ProblemId, @UserId, @Filepath)
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[sort_order]'
GO
CREATE TABLE [dbo].[sort_order]
(
[id] [uniqueidentifier] NOT NULL,
[key] [varchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[user_id] [uniqueidentifier] NULL,
[column] [varchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ascending] [bit] NOT NULL
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating primary key [PK_sort_order] on [dbo].[sort_order]'
GO
ALTER TABLE [dbo].[sort_order] ADD CONSTRAINT [PK_sort_order] PRIMARY KEY CLUSTERED ([id])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[CRUDSortOrder]'
GO
IF OBJECT_ID('[dbo].[CRUDSortOrder]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[CRUDSortOrder]'
DROP PROC [dbo].[CRUDSortOrder]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[CRUDSortOrder]'
GO
CREATE proc [dbo].[CRUDSortOrder]
@CRUD char, -- create, retrieve, update, delete
@id as uniqueidentifier = null,
@key as varchar(max) = null,
@userId as uniqueidentifier = null,
@column as varchar(max) = null,
@ascending as bit = null
as
if @CRUD = 'C'
begin
set @id = newid()
insert into sort_order
values(@id, @key, @userId, @column, @ascending)
select @id
end
if @CRUD = 'R'
begin
select *
from sort_order
where [key] = @key and user_id = @userId
end
if @CRUD = 'U'
begin
update sort_order
set [column]=@column, ascending = @ascending
where id=@id
end
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[assignment]'
GO
ALTER TABLE [dbo].[assignment] ADD
[assigned_ind] [bit] NOT NULL CONSTRAINT [DF_assignment_assigned_ind] DEFAULT ((1))
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[CRUDTicket]'
GO
/*
A CRUD procedure to encapuslate data access to [ticket] and
[curriculum_ticket].
Each ticket submitted in SOS will have a record in [ticket].
If the ticket is for an assignment, extra data will be recorded
in [curriculum_ticket], so [ticket] has a 1..0-1 relationship
with [curriculum_ticket]. The create and update code is transactional
to ensure atomicity.
*/
IF OBJECT_ID('[dbo].[CRUDTicket]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[CRUDTicket]'
DROP PROC [dbo].[CRUDTicket]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[CRUDTicket]'
GO
CREATE procedure [dbo].[CRUDTicket]
@CRUD char,
@id uniqueidentifier =null,
@userId uniqueidentifier =null,
@desc nvarchar(max) =null,
@mirrored bit =null,
@ns varchar(100) =null,
@folder varchar(100) =null,
@filename varchar(100) =null,
@version integer =null,
@problemNumber integer =null
as
begin
set xact_abort on
/* Error handeling variables */
declare @ErrorMessage nvarchar(4000)
declare @ErrorSeverity int
declare @ErrorState int
if @CRUD = 'C' -- Create
begin
set @id = newid()
begin try
begin tran
insert into ticket
values (@id, @userId, @desc, @mirrored)
if @ns is not null -- must be a curriculum ticket
begin
insert into curriculum_ticket
values(newid(), @id, @ns, @folder,
@filename, @version, @problemNumber)
end
commit tran
end try
begin catch
if xact_state() <> 0 rollback tran
select @errorMessage = error_message() + ' ' +
'Line:' + cast(error_line() as varchar(max)) + '; ' +
'Severity: ' + cast(error_severity() as varchar(max)) + '; ' +
'State: ' + cast(error_state() as varchar(max)) + '; '
raiserror(@errorMessage, 16, 1)
return
end catch
select @id
end
else if @CRUD = 'R' -- Retrieve
begin
/* The only time we want to retrieve is when sending all
unmirrorend to Zendesk. */
if @mirrored is not null
begin
select t.id, user_id, description, namespace,
folder, filename, version, problem_number
from ticket t
left join curriculum_ticket ct
on t.id = ct.ticket_id
where mirrored = @mirrored
end
end
else if @CRUD = 'U'
begin
begin try
begin tran
update ticket
set user_id=@userId, description=@desc, mirrored=@mirrored
where id=@id
if @ns is not null -- must be a curriculum ticket
begin
update curriculum_ticket
set namespace=@ns, folder=@folder, filename=@filename,
version=@version, problem_number=@problemNumber
where ticket_id=@id
end
commit
end try
begin catch
if xact_state() <> 0 rollback tran
select @errorMessage = error_message() + ' ' +
'Line:' + cast(error_line() as varchar(max)) + '; ' +
'Severity: ' + cast(error_severity() as varchar(max)) + '; ' +
'State: ' + cast(error_state() as varchar(max)) + '; '
raiserror(@errorMessage, 16, 1)
return
end catch
end
end
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[event]'
GO
ALTER TABLE [dbo].[event] ADD
[crontab] [varchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[end_after] [int] NULL,
[end_by] [datetime] NULL
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetAssignments]'
GO
IF OBJECT_ID('[dbo].[GetAssignments]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetAssignments]'
DROP PROC [dbo].[GetAssignments]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetAssignments]'
GO
CREATE Procedure [dbo].[GetAssignments]
/* Param List */
@UnitId as int
AS
/******************************************************************************
** File:
** Name: GetAssignments
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth: Paul Shippy
** Date: 10/15/02
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
** 10/17/02 Paul Shippy Joined with curriculum_unit table to get folder and namespace
** 12/17/02 Paul Shippy Added cd_number
**
*******************************************************************************/
SELECT
a.assignment_id, a.sequence_nbr, a.unit_id, a.curriculum_assignment_id, a.title, a.assigned_ind,
-- Filename, type, and time to work from curriculum_assignment table
ca.filename, ca.assignment_type, ca.time_to_work,
-- Folder, namespace, and cd number from curriculum_unit table
cu.folder, cu.curriculum_subject_namespace, cu.cd_number
FROM assignment a
JOIN curriculum_assignment ca ON a.curriculum_assignment_id = ca.assignment_id
JOIN curriculum_unit cu ON ca.curriculum_unit_id = cu.unit_id
WHERE a.unit_id = @UnitId
ORDER BY a.sequence_nbr
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[InsertAssignment]'
GO
IF OBJECT_ID('[dbo].[InsertAssignment]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[InsertAssignment]'
DROP PROC [dbo].[InsertAssignment]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[InsertAssignment]'
GO
CREATE Procedure [dbo].[InsertAssignment]
/* Param List */
@AssignmentId as uniqueidentifier,
@Sequence as int,
@UnitId as int,
@CurriculumAssignmentId as uniqueidentifier,
@DefaultInd as bit,
@BlockedInd as bit,
@CustomXML as text,
@Title as varchar(100),
@TimeToWork as int,
@AssignmentType as char(10),
@AssignedInd as bit,
@NewId as uniqueidentifier OUTPUT
AS
/******************************************************************************
** File:
** Name: InsertAssignment
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth: Paul Shippy
** Date: 10/15/02
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
-- If assignment already exists,
IF (SELECT COUNT(*)
FROM assignment
WHERE assignment_id = @AssignmentId) > 0
BEGIN
-- Update it
UPDATE assignment
SET sequence_nbr = @Sequence,
unit_id = @UnitId,
curriculum_assignment_id = @CurriculumAssignmentId,
title = @Title
WHERE assignment_id = @AssignmentId
IF (SELECT COUNT(*) FROM assignment_custom WHERE assignment_id = @AssignmentId) > 0
BEGIN
UPDATE assignment_custom
SET custom_xml = @CustomXML,
title = @Title,
time_to_work = @TimeToWork,
assignment_type = @AssignmentType
WHERE assignment_id = @AssignmentId
END
DELETE
FROM skipped_problem
WHERE assignment_id = @AssignmentId
SET @NewId = @AssignmentId
END
ELSE
BEGIN
-- Otherwise add a new assignment
SET @NewId = NEWID()
INSERT INTO assignment
(
assignment_id,
sequence_nbr,
unit_id,
curriculum_assignment_id,
title,
assigned_ind
)
Values
(
@NewId,
@Sequence,
@UnitId,
@CurriculumAssignmentId,
@Title,
@AssignedInd
)
IF NOT @CustomXML IS NULL
BEGIN
INSERT INTO assignment_custom(assignment_id, custom_xml, title, time_to_work, assignment_type)
VALUES(@NewId, @CustomXML, @Title, @TimeToWork, @AssignmentType)
END
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetCustomAssignments]'
GO
IF OBJECT_ID('[dbo].[GetCustomAssignments]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetCustomAssignments]'
DROP PROC [dbo].[GetCustomAssignments]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetCustomAssignments]'
GO
CREATE Procedure [dbo].[GetCustomAssignments]
/* Param List */
@UnitId as int
AS
/******************************************************************************
** File:
** Name: GetCustomAssignments
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SELECT
a.assignment_id, a.sequence_nbr, a.assigned_ind,
ac.custom_xml, ac.title, ac.time_to_work, ac.assignment_type
FROM assignment a
JOIN assignment_custom ac ON ac.assignment_id = a.assignment_id
WHERE a.unit_id = @UnitId
ORDER BY a.sequence_nbr
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[GetAllCustomAssignments]'
GO
IF OBJECT_ID('[dbo].[GetAllCustomAssignments]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[GetAllCustomAssignments]'
DROP PROC [dbo].[GetAllCustomAssignments]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[GetAllCustomAssignments]'
GO
CREATE Procedure [dbo].[GetAllCustomAssignments]
/* Param List */
AS
/******************************************************************************
** File:
** Name: GetAllCustomAssignments
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
SELECT
a.assignment_id, a.sequence_nbr, a.unit_id, a.assigned_ind,
ac.custom_xml, ac.title, ac.time_to_work, ac.assignment_type
FROM assignment a
JOIN assignment_custom ac ON ac.assignment_id = a.assignment_id
JOIN unit u ON u.unit_id = a.unit_id
JOIN subject s ON u.subject_id = s.subject_id
WHERE s.title = '{20450D92-3313-4D16-8B6C-32925200698D}'
ORDER BY ac.title
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[SaveEventSchool]'
GO
IF OBJECT_ID('[dbo].[SaveEventSchool]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[SaveEventSchool]'
DROP PROC [dbo].[SaveEventSchool]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[SaveEventSchool]'
GO
CREATE Procedure [dbo].[SaveEventSchool]
/* Param List */
@EventId uniqueidentifier,
@Description varchar(100),
@StartDate varchar(50),
@EndDate varchar(50),
@NewId uniqueidentifier OUTPUT,
@Crontab varchar(max) = null,
@EndAfter int = null,
@EndBy datetime = null
AS
/******************************************************************************
** File:
** Name: SaveEventSchool
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth: Paul Shippy
** Date: 4/15/03
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
**
*******************************************************************************/
-- If event already exists,
IF (SELECT COUNT(*)
FROM event
WHERE event_id = @EventId) > 0
BEGIN
-- Update it
UPDATE event
SET description = @Description,
start_date = @StartDate,
end_date = @EndDate,
crontab = @Crontab,
end_after = @EndAfter,
end_by = @EndBy
WHERE event_id = @EventId
SET @NewId = @EventId
END
ELSE
BEGIN
SET @NewId = newid()
-- Otherwise add a new event
INSERT INTO event(event_id, description, start_date, end_date, crontab, end_after, end_by)
Values (@NewId, @Description, @StartDate, @EndDate, @Crontab, @EndAfter, @EndBy)
INSERT INTO school_event(event_id)
Values (@NewId)
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[SaveEventStudent]'
GO
IF OBJECT_ID('[dbo].[SaveEventStudent]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[SaveEventStudent]'
DROP PROC [dbo].[SaveEventStudent]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[SaveEventStudent]'
GO
CREATE Procedure [dbo].[SaveEventStudent]
/* Param List */
@EventId uniqueidentifier,
@StudentId uniqueidentifier,
@Description varchar(100),
@StartDate varchar(50),
@EndDate varchar(50),
@NewId uniqueidentifier OUTPUT,
@Crontab varchar(max) = null,
@EndAfter int = null,
@EndBy datetime = null
AS
/******************************************************************************
** File:
** Name: SaveEventStudent
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
** Auth: Paul Shippy
** Date: 4/15/03
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
-- If event already exists,
IF (SELECT COUNT(*)
FROM event
WHERE event_id = @EventId) > 0
BEGIN
-- Update it
UPDATE event
SET description = @Description,
start_date = @StartDate,
end_date = @EndDate,
crontab = @Crontab,
end_after = @EndAfter,
end_by = @EndBy
WHERE event_id = @EventId
SET @NewId = @EventId
END
ELSE
BEGIN
SET @NewId = newid()
-- Otherwise add a new event
INSERT INTO event(event_id, description, start_date, end_date, crontab, end_after, end_by)
Values (@NewId, @Description, @StartDate, @EndDate, @Crontab, @EndAfter, @EndBy)
INSERT INTO student_event(event_id, student_id)
Values (@NewId, @StudentId)
END
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering [dbo].[AssignSubject]'
GO
IF OBJECT_ID('[dbo].[AssignSubject]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[AssignSubject]'
DROP PROC [dbo].[AssignSubject]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[AssignSubject]'
GO
CREATE Procedure [dbo].[AssignSubject]
/* Param List */
@SubjectId as INT,
@StudentId as UNIQUEIDENTIFIER,
@TermId as INT,
@Alternate as bit,
@NewSubjectId as UNIQUEIDENTIFIER OUTPUT
AS
/******************************************************************************
** File:
** Name: AssignSubject
** Desc:
**
** This template can be customized:
**
** Return values:
**
** Called by:
**
** Parameters:
** Input Output
** ---------- -----------
**
**
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
DECLARE @Title varchar(100)
DECLARE @Icon varchar(50)
DECLARE @IntroVideoShown bit
DECLARE @DefaultInd bit
DECLARE @NoCustomNamespace varchar(100)
SELECT @Title = title, @Icon = icon, @DefaultInd = default_ind,
@NoCustomNamespace = nocustom_namespace
FROM subject
WHERE subject_id = @SubjectId
--Flip the bit to get the correct value to insert
IF @DefaultInd = 1
SET @IntroVideoShown = 0
ELSE
SET @IntroVideoShown = 1
SET @NewSubjectId = NEWID()
-- Populate student_subject table
INSERT INTO student_subject([id], student_id, completed_ind, title,
active_ind, intro_video_shown,
access_internet_ind, max_problem_attempts, tf_max_problem_attempts,
unlimited_problem_attempts, leave_msg_skip_ind,
quiz_leave_msg_skip_ind, quiz_notify_correct_incorrect_ind,
quiz_open_page_ind, quiz_open_book_ind, easy_spelling_ind,
quiz_access_answer_key_ind, access_answer_key_ind,
custom_settings_ind, display_percent_ind,
display_letter_ind, a_minimum,
b_minimum, c_minimum, d_minimum, lesson_weight,
quiz_weight, test_weight,
project_weight, spelling_penalty, default_ind, icon,
quiz_easy_spelling_ind,
quiz_spelling_penalty, problem_attempts_penalty,
test_access_answer_key_ind,
test_leave_msg_skip_ind,
test_notify_correct_incorrect_ind,
test_open_book_ind,
test_open_page_ind,
test_spelling_penalty,
test_easy_spelling_ind,
access_allright_ind,
access_farmerfrank_ind,
access_vocab_games_ind,
quiz_notify_parent_ind,
test_notify_parent_ind,
lesson_threshold_notify_ind,
lesson_notify_threshold,
quiz_threshold_notify_ind,
quiz_notify_threshold,
test_threshold_notify_ind,
test_notify_threshold,
nocustom_namespace)
SELECT [id] = @NewSubjectId, student_id = @StudentId, completed_ind = 0, title = @Title,
active_ind = 1, intro_video_shown = @IntroVideoShown,
access_internet_ind, max_problem_attempts, tf_max_problem_attempts,
unlimited_problem_attempts, leave_msg_skip_ind,
quiz_leave_msg_skip_ind, quiz_notify_correct_incorrect_ind,
quiz_open_page_ind, quiz_open_book_ind, easy_spelling_ind,
quiz_access_answer_key_ind, access_answer_key_ind,
custom_settings_ind = 0, display_percent_ind,
display_letter_ind, a_minimum,
b_minimum, c_minimum, d_minimum, lesson_weight,
quiz_weight, test_weight,
project_weight, spelling_penalty,
default_id = @DefaultInd, icon = @Icon,
quiz_easy_spelling_ind,
quiz_spelling_penalty, problem_attempts_penalty,
test_access_answer_key_ind,
test_leave_msg_skip_ind,
test_notify_correct_incorrect_ind,
test_open_book_ind,
test_open_page_ind,
test_spelling_penalty,
test_easy_spelling_ind,
access_allright_ind,
access_farmerfrank_ind,
access_vocab_games_ind,
quiz_notify_parent_ind,
test_notify_parent_ind,
lesson_threshold_notify_ind,
lesson_notify_threshold,
quiz_threshold_notify_ind,
quiz_notify_threshold,
test_threshold_notify_ind,
test_notify_threshold,
nocustom_namespace = @NoCustomNamespace
FROM student_settings
WHERE student_id = @StudentId
DECLARE @Sequence as INT
DECLARE @UnitId as INT
DECLARE @NewUnitId as UNIQUEIDENTIFIER
DECLARE @AssignmentId as UNIQUEIDENTIFIER
DECLARE @NewAssignmentId as UNIQUEIDENTIFIER
DECLARE @AssignmentSequence as INT
DECLARE @AssignmentTitle as VARCHAR(100)
DECLARE @UnitFolder as VARCHAR(100)
DECLARE @FileName as VARCHAR(100)
DECLARE @Namespace as VARCHAR(100)
DECLARE @Type as CHAR(10)
DECLARE @TimeToWork as INT
DECLARE @CDNumber as INT
-- Loop through units
DECLARE curUnits CURSOR READ_ONLY FOR
SELECT unit_id, sequence_nbr, title
FROM unit
WHERE subject_id = @SubjectId
OPEN curUnits
FETCH NEXT FROM curUnits INTO @UnitId, @Sequence, @Title
WHILE (@@fetch_status <> -1)
BEGIN
IF (@@fetch_status <> -2)
BEGIN
SET @NewUnitId = NEWID()
-- Populate student_unit table
INSERT INTO student_unit([id], sequence_nbr, completed_ind, title, student_subject_id, term_id)
VALUES(@NewUnitId, @Sequence, 0, @Title, @NewSubjectId, @TermId)
-- Loop through assignments
if @Alternate = 1
--assign allassignments even if they were not assigned by default
BEGIN
DECLARE curAssignments CURSOR READ_ONLY FOR
SELECT assign.assignment_id, assign.sequence_nbr, assign.title,
cunit.folder, cassign.[filename], cunit.curriculum_subject_namespace,
cassign.assignment_type, cassign.time_to_work, cunit.cd_number
FROM assignment assign
JOIN curriculum_assignment cassign ON assign.curriculum_assignment_id = cassign.assignment_id
JOIN curriculum_unit cunit ON cassign.curriculum_unit_id = cunit.unit_id
WHERE assign.unit_id = @UnitId
END
ELSE
--only assign assignments that have assigned_ind of true
BEGIN
DECLARE curAssignments CURSOR READ_ONLY FOR
SELECT assign.assignment_id, assign.sequence_nbr, assign.title,
cunit.folder, cassign.[filename], cunit.curriculum_subject_namespace,
cassign.assignment_type, cassign.time_to_work, cunit.cd_number
FROM assignment assign
JOIN curriculum_assignment cassign ON assign.curriculum_assignment_id = cassign.assignment_id
JOIN curriculum_unit cunit ON cassign.curriculum_unit_id = cunit.unit_id
WHERE assign.unit_id = @UnitId and assign.assigned_ind = 1
END
OPEN curAssignments
FETCH NEXT FROM curAssignments INTO @AssignmentId, @Sequence,
@AssignmentTitle, @UnitFolder, @FileName, @Namespace,
@Type, @TimeToWork, @CDNumber
WHILE (@@fetch_status <> -1)
BEGIN
IF (@@fetch_status <> -2)
BEGIN
SET @NewAssignmentId = NEWID()
--Populate student_assignment table
INSERT INTO student_assignment ([id], sequence_nbr, completed_ind,
blocked_ind, student_unit_id, title, folder, [filename],
namespace, assignment_type, time_to_work, cd_number)
VALUES(@NewAssignmentId, @Sequence, 0, 0, @NewUnitId, @AssignmentTitle,
@UnitFolder, @FileName, @Namespace, @Type, @TimeToWork, @CDNumber)
--Populate student_skipped_problem table
INSERT INTO student_skipped_problem
SELECT assignment_id = @NewAssignmentId, problem_id
FROM skipped_problem
WHERE assignment_id = @AssignmentId
END
FETCH NEXT FROM curAssignments INTO @AssignmentId, @Sequence,
@AssignmentTitle, @UnitFolder, @FileName, @Namespace,
@Type, @TimeToWork, @CDNumber
END
CLOSE curAssignments
DEALLOCATE curAssignments
-- Insert custom assignments
INSERT INTO student_assignment ([id], sequence_nbr, completed_ind,
blocked_ind, student_unit_id, title, folder, [filename],
namespace, assignment_type, time_to_work, cd_number, custom_xml)
SELECT newid() [id], a.sequence_nbr, 0 completed_ind, 0 blocked_ind,
@NewUnitId student_unit_id, a.title, '' folder, '' [filename],
'Custom' namespace, ac.assignment_type, ac.time_to_work, '1' cd_number, ac.custom_xml
FROM assignment a
JOIN assignment_custom ac ON ac.assignment_id = a.assignment_id
WHERE a.unit_id = @UnitId
END
FETCH NEXT FROM curUnits INTO @UnitId, @Sequence, @Title
END
CLOSE curUnits
DEALLOCATE curUnits
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating [dbo].[ProgressReport]'
GO
IF OBJECT_ID('[dbo].[ProgressReport]') IS NOT NULL
BEGIN
PRINT N'-Dropping proc [dbo].[ProgressReport]'
DROP PROC [dbo].[ProgressReport]
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
END
PRINT N'-Creating proc [dbo].[ProgressReport]'
GO
CREATE Procedure [dbo].[ProgressReport]
/* Param List */
@term_ids as varchar(max),
@user_ids as varchar(max)
AS
declare @sql as varchar(max)
declare @where as varchar(max)
set @sql='
SELECT
u.username,
isnull(u.first_name, '''') + '' '' + isnull(u.last_name, '''') as "DisplayName",
ss.title AS "subjecttitle", ss.[id] as "SubjectId", su.title AS "unittitle", su.[id], su.sequence_nbr, isnull(su.score, ''255'') as "UnitScore", isnull(ss.score, ''255'') as "SubjectScore", "UnitPercentComplete" = '' '', "TermTitle" = '' '', "SubjectPercentComplete" = '' '', "UnitGrade" = '' '', "SubjectGrade" = '' '',
count(sa.[id]) as "TotalUnitAssignments",
count(case when (sa.completed_ind = 1) then 1 else NULL end) as "CompletedUnitAssignments"
FROM student_assignment sa
INNER JOIN student_unit su ON sa.student_unit_id = su.[id]
INNER JOIN student_subject ss ON su.student_subject_id = ss.[id]
INNER JOIN [user] u ON u.[user_id] = ss.student_id
'
set @where = '
where u.user_id in (' + @user_ids + ')
and sa.assignment_type != ''Reference''
and su.term_id in (' + @term_ids + ')
'
set @sql = @sql + @where
set @sql = @sql + ' GROUP BY u.username, u.last_name, u.first_name, ss.title, ss.[id], su.title, su.[id], su.sequence_nbr, su.score, ss.score
ORDER BY u.username, ss.title, su.sequence_nbr'
exec (@sql)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Adding foreign keys to [dbo].[curriculum_ticket]'
GO
ALTER TABLE [dbo].[curriculum_ticket] ADD
CONSTRAINT [FK_curriculum_ticket_curriculum_ticket] FOREIGN KEY ([id]) REFERENCES [dbo].[curriculum_ticket] ([id]),
CONSTRAINT [FK_curriculum_ticket_Ticket] FOREIGN KEY ([ticket_id]) REFERENCES [dbo].[ticket] ([id]) ON DELETE CASCADE
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Adding foreign keys to [dbo].[student_problem_file_path]'
GO
ALTER TABLE [dbo].[student_problem_file_path] ADD
CONSTRAINT [FK_student_problem_file_path_student_problem_file] FOREIGN KEY ([student_assignment_id], [problem_id]) REFERENCES [dbo].[student_problem_file] ([student_assignment_id], [problem_id]) ON DELETE CASCADE
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Adding foreign keys to [dbo].[ticket]'
GO
ALTER TABLE [dbo].[ticket] ADD
CONSTRAINT [FK_ticket_user] FOREIGN KEY ([user_id]) REFERENCES [dbo].[user] ([user_id])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Altering permissions on [dbo].[student_assignment]'
GO
--REVOKE SELECT ON [dbo].[student_assignment] TO [soshome12]
--REVOKE SELECT ON [dbo].[student_assignment] TO [soshome13]
GO
PRINT N'Altering permissions on [dbo].[student_subject]'
GO
--REVOKE SELECT ON [dbo].[student_subject] TO [soshome12]
--REVOKE SELECT ON [dbo].[student_subject] TO [soshome13]
GO
PRINT N'Altering permissions on [dbo].[student_unit]'
GO
--REVOKE SELECT ON [dbo].[student_unit] TO [soshome12]
--REVOKE SELECT ON [dbo].[student_unit] TO [soshome13]
GO
PRINT N'Altering permissions on [dbo].[term]'
GO
--REVOKE SELECT ON [dbo].[term] TO [soshome12]
--REVOKE SELECT ON [dbo].[term] TO [soshome13]
GO
PRINT N'Altering permissions on [dbo].[user]'
GO
--REVOKE SELECT ON [dbo].[user] TO [soshome12]
--REVOKE SELECT ON [dbo].[user] TO [soshome13]
GO
IF EXISTS (SELECT * FROM #tmpErrors) ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT>0 BEGIN
PRINT 'The database update succeeded'
COMMIT TRANSACTION
END
ELSE PRINT 'The database update failed'
GO
DROP TABLE #tmpErrors
GO
/*
Run this script on:
(LOCAL).DMLCOMP - This database will be modified
to synchronize it with:
(LOCAL).soshome2014_goldendata
You are recommended to back up your database before running this script
Script created by SQL Data Compare version 8.1.0 from Red Gate Software Ltd at 12/06/2013 11:23:36
*/
SET NUMERIC_ROUNDABORT OFF
GO
SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS, NOCOUNT ON
GO
SET DATEFORMAT YMD
GO
SET XACT_ABORT ON
GO
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
GO
BEGIN TRANSACTION
-- Pointer used for text / image updates. This might not be needed, but is declared here just in case
DECLARE @pv binary(16)
-- Update rows in [dbo].[widget_app]
UPDATE [dbo].[widget_app] SET [template]='
', '#NONE#', '', 0, 0, 1, 0, 3, 2, 1, '2013-11-21 11:50:31.970')
-- Operation applied to 2 rows out of 2
print 'Custom DML'
print 'Adding ''StudentReport'' to homepage.modOrder'
update homepage
set modOrder =
/* Trim all commas off end of modOrder first */
reverse(substring(reverse(modOrder), patindex('%[^,]%',reverse(modOrder)), len(modOrder) - patindex('%[^,]%', reverse(modOrder)) + 1))
/* Append StudentReport to end of modOrder */
+ ',' + 'StudentReports'
COMMIT TRANSACTION
GO
lSystem.Resources.ResourceReader, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089#System.Resources.RuntimeResourceSet PADPADP t lSystem.Resources.ResourceReader, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089#System.Resources.RuntimeResourceSet fSystem.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3aBj 5 $ t h i s . I c o n @ QSystem.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a System.Drawing.Icon IconDataIconSizeSystem.Drawing.Size System.Drawing.Size widthheight > @@ (B B h fS @@ (2 W h @@ ( . h ָ ( @ % * _ | y V ! ^ S W
C &&&AAA\\\ppp~}}}mmmXXX==="!" l x ***XWX~~~yyyPPP### [ B CCCyyyppp::: + A@Awww666 o 101yyynmn&%&