Source Package Components

Visual Studio .NET Academic Assignment Manager

Visual Studio .NET Academic Assignment Manager Source Package  

Source Package Components

Assignment Manager Source Package contains all of the source code for the Assignment Manager Server tool. When you download and install the source package, you have the pieces you need to customize the Assignment Manager server and clients.

  • AssignmentManager.sln   Installed at c:\ AssignmentManagerSource\Assignment Manager Server\ by default.
  • AMClients.sln   Installed at c:\ AssignmentManagerSource\Assignment Manager Clients\ by default.

AssignmentManager.sln

AssignmentManager.sln includes four project files: ActionService, AMInstall, AMWeb, and AMSetup. You can edit these files to customize the server portion of Assignment Manager.

ActionService.csproj

This project contains the Assignment Manager Service that monitors MSMQ and processes Auto Build and Auto Check requests. In addition, this project includes code for a timer for the service to check for notifications.

Some of the files related to monitoring MSMQ are listed below.

ServiceInstaller.cs
The file contains code that runs during Assignment Manager setup to install the service on the client machines and start the service.
ServerAction.cs
This file contains the event that runs when a message appears in the MSMQ. In addition, this file handles parsing the message and firing the correct process-either Auto Build or Auto Check.
IActionService.cs
This file contains the interface for the different processes that the server can run, Auto Build and Auto Check.
AutoBuild.cs
This file contains the code for the Auto Build process that builds the student's project.
AutoCheck.cs
This file contains the code for the Auto Check process that runs the student's executable against the expected output provided by the faculty and compares the results.

Some of the files related to the service timer are listed below.

RequestListener.cs
This file is the primary file for starting both functions of the ActionService. This file creates the MSMQ when started and then starts the process listening to it. In addition, the file starts the timer and sends out notifications.

AMWeb.csproj

This project contains the .aspx pages and code that display the Assignment Manager Server Web interface. In addition, this project contains code for all the actions a user can do, including data input, as well as Auto Build and Auto Check interactions with MSMQ.

AMVersion.xml   Contains the version information of the Assignment Manager Server. Clients reference this to tell if they are connecting to the correct version of Assignment Manager.

AssemblyInfo.cs   Contains assembly information for the amweb.dll assembly that is built.

Error.aspx   A page to display errors. For some errors, the user is redirected to this page.

Login.aspx   The Assignment Manager log on page. This file handles changing the user's password when they first log in.

logoff.aspx   Logs user out of Assignment Manager.

web.config   Contains Web server settings for the Assignment Manager virtual directory.

AssignmentManager folder
The files in this folder contain the background code that handles database interactions and interactions with MSMQ.

AssignmentList.cs   Represents the data structure used for storing a list of assignments. This class is used often when displaying a list of assignments to users, such as on assignments.aspx

AssignmentM.cs   Represents an assignment. This class is the middle level between the Web pages and database. The class also contains functions for adding, modifying, and deleting assignments from the database.

Constants.cs   Stores constants for using the middle-tier layer (\AssignmentManager).

CourseM.cs   Represents a course. Similar to AssignmentM.cs in that this class is the middle level between Web pages and the database, and therefore contains all the functions for manipulating the database.

DatabaseCall.cs   Abstracts database connections. This file stores all of the code that is common across all database connections, making it possible to call a stored procedure in Assignment Manager by using just a few lines of code.

ImportUsers.cs   Handles the commit method for committing an 'import users' transaction to the database.

LSAUtil.cs   Accesses the Local Security Authority (LSA) where the database connection string is stored.

MessageM.cs   Handles all of the work involved in sending SMTP messages to users.

RoleM.cs   Handles database interactions for roles and permissions, including setting and modifying.

ServiceControl.cs   Accesses the Windows Services on the machine to start or stop the Assignment Manager service. This class is used in settings.aspx.

StudentAssignmentM.cs   Similar to AssignmentM.cs, but for student assignments and submissions. Handles database interaction and is used by the Web pages when displaying information.

UserList.cs   Similar to AssignmentList. This class is a data structure used to store a list of users.

UserM.cs   Handles users, including loading information from the database and storing information to the database. This class is accessed by the Web pages for that information.

Common folder
This folder contains classes used by multiple Web pages.

Constants.cs   Contains constants used across Web pages.

Functions.cs   Contains functions commonly used across Web pages.

Faculty folder
This folder contains the .aspx files and C# code files for the Faculty Web pages. These Web pages are the interface that users interact with.

AddCourse.aspx   Contains no UI. This page is accessed via the Faculty Tools and adds a course, then redirects to a new page.

AddEditAssignment.aspx   Modifies the properties on an assignment or adds a new assignment.

AddEditCourse.aspx   Modifies the properties for a course.

AddEditUser.aspx   Modifies the properties for a user or adds a new user.

AddResource.aspx   Contains code for a small modal dialog box that displays when a user clicks the Add resource link on addeditcourse.aspx.

Assignments.aspx   Displays a list of assignments to the user.

ChangePassword.aspx   Changes a user's password.

ConfirmAssignmentDelete.aspx   Contains code for a modal confirmation dialog box that displays when the user chooses to delete an assignment from the AddEditAssignment.aspx page.

ConfirmResourceDelete.aspx   Contains code for a modal confirmation dialog box that displays when the user chooses to delete a resource from the AddEditcourse.aspx page.

ConfirmUserDelete.aspx   Contains code for a modal confirmation dialog box that displays when the user chooses to delete a user from AddEditUser.aspx page.

DeleteCourse.aspx   Contains no UI. This file is accessed via the Faculty Tools to delete a course, then redirects the user's browser to a different page.

GradeSubmissions.aspx   Contains the UI for faculty to grade a user's submission.

ImportForm.aspx   Contains the first page of import users, where the user is prompted for a file with user information in it.

ImportFormPreview.aspx   Contains the second page of import users, where the user is asked to select which fields match to which columns.

Results.aspx   Contains the final page of import users, where the user is shown the results of the import. For example, "20 users imported successfully."

Settings.aspx   Contains code for Assignment Manager-wide settings, such as enable or disable the auto build service and project upload size.

submissions.aspx   Lists user submissions.

UploadDownload.aspx   Contains code for uploading and downloading a student submission.

users.aspx   Lists users in the current course.

workwithcourse.aspx   Contains no UI. Redirects to the correct page.

Images folder
This folder contains all of the images used in the Web pages.
Scripts folder
This folder contains client-side scripts used in the Web pages.

assnMan.css   A cascading style sheet (.css) file that defines the look and feel of the Assignment Manager server Web site.

assnMan.js   A file, used for faculty pages, containing code for the descriptions that appear when the user pauses the mouse (mouses over) on menu items.

assnManStudent.js   A file, used for student pages, containing code for the descriptions that appear when the user pauses the mouse (mouses over) on menu items.

Download.js   Script for downloading files that is used from UploadDownload.aspx.

Miscellaneous.js   Additional JScript functions.

popUp.js   A file used to handle the modal dialog pages, such as ConfirmResourceDelete.aspx.

Upload.js   Handles uploads from UploadDownload.aspx.

Student folder
This folder contains the .aspx files and C# code files for the Student Web pages. These Web pages are the user interface that the user interacts with.

AddCourse.aspx   Contains no UI. A Web page for adding a course.

AssignmentGrade.aspx   Web page for viewing the grade of a submission and its associated details.

Assignments.aspx   Web page that lists the assignments for the current course.

ChangePassword.aspx   Web page for changing the current user's password.

CourseInfo.aspx   Displays course information.

UploadDownload.aspx   Handles uploads and downloads, using Upload.js and Download.js in the \scripts directory.

WorkWithCourse.aspx   Contains no UI. Redirects the user to the correct page when connecting for the first time from the client tools.

UserControls folder
This folder contains custom controls that are used in many of the Web pages.

faculty.ascx   The user control for the border of faculty pages.

student.ascx   The user control for the border of student pages.

goBack.ascx   The user control for the Back and Help links.

AMInstall.csproj

This project contains a custom action that runs during installation of Assignment Manager to setup the database, add the AssignmentManager user group, as well as setting file and folder permissions and configuring IIS for Assignment Manager.

Some of the files included in this project:

AMInstall.cs
This file contains the majority of the code that drives the custom action.
AMUser.cs
This file contains the code that creates the AssignmentManager user group.
SecurityPermissions.cs
This file contains code that defines file and folder permissions.

AMSetup.vdproj

A deployment project that builds a distributable .msi file.

AMClients.sln

AMClients.sln includes five project files, FacultyClient, StudentClient, FacultyClientSetup, StudentClientSetup, and AddinResources. You can edit these files to customize the user interface for the Faculty and Student clients.

FacultyClient.csproj

This project contains all of the code for the Faculty Client, which allows the faculty features to appear in Visual Studio .NET.

*Dialog.cs
These files contain code for Windows dialogs.
*Command.cs
These files contain code for the menu and command items that appear on the Visual Studio Tools menu, which are used to display the Windows dialogs.
Facultytools.cs
This file contains code that handles the functionality for the Faculty tools.

StudentClient.csproj

This project contains all of the code for the Student Client, which allows the Student features to appear in Visual Studio .NET.

*Dialog.cs
These files contain code for Windows dialogs.
*Command.cs
These files contain code for the menu and command items that appear on the Visual Studio Tools menu, which are used to display the Windows dialogs.
Studenttools.cs
This file contains code that handles the functionality of the Student Client, including loading courses, managing the Start Page tabs.

FacultyClientSetup.vdproj

This deployment project builds the .msi used to install the Faculty Client.

StudentClientSetup.vdproj

This deployment project builds the .msi used to install the Student Client.

AddinResources.vcproj

This project creates an assembly that stores resources used for the Add-in names and descriptions, which display in the Add-in Manager dialog box.

See Also

Customizing Assignment Manager Source Package