The Student application allows users to take tests either as a guest student or using the session ID generated by a Proctor. A student may also log in using a Guest session. If using an actual session ID, a request goes to the Proctor for approval (via the Proctor app). Once the Proctor approves the request, the student can begin the test.
This project is licensed under the AIR Open Source License v1.0.
We would be happy to receive feedback on its capabilities, problems, or future enhancements:
- For general questions or discussions, please use the Forum.
- Use the Issues link to file bugs or enhancement requests.
- Feel free to Fork this project and develop your changes!
The Webapp module contains the Student UI and REST APIs.
The ResourceBundler module provides the classes to parse the xml files in Student's 'Scripts' folder which contains the configuration for loading java scripts in the pages in run time.When the jsf pages' custom tags are executed, the code behind invokes those classes to load appropriate java scripts and css files.
The SpellCheck module contains REST APIs related to dictionary and spell check for student tests with passages. It contains integration to the Hunspell Engine for spell check.
IRiS (Item Rendering System) provides a web service to render content using the same control paths that the student application uses except that it is very lightweight. This rendered content can be embedded in an iFrame for purposes such as item review.
Add following parameter to context.xml of the tomcat where IRiS is deployed
<Parameter name="tds.iris.EncryptionKey" override="false" value="24 characters alphanumeric Encryption key" />
IRiS is a WAR file that can be deployed to its own Tomcat web container. The easiest way to deploy content is to scp the file to the server. Content needs to be deployed to the folder /usr/local/tomcat/content.
Once content has been deployed as above, the system should pick it up automatically. However, this feature may not be reliable - especially when deploying massive number of files by copying from a remote location. The only reliable way to make sure the system picks up all newly deployed content is to hit this API endpoint: /iris/Pages/API/content/reload. This is a blocking call and is an initial attempt at providing an API that doesn’t involve restarting the server.
Rendering is now common to three different projects: Proctor, Student and IRiS. All three projects however have different underlying business rules. All such interfaces have been abstracted in student.library and the concrete implementations are provided by each individual application using Spring dependency injection.
In general, building the code and deploying the WAR file is a good first step. The Student application, however, has a number of other steps that need to be performed in order to fully setup the system.
Within the file system of the deployment (local file system if running locally or within Tomcat file directories), create a configuration folder structure as follows:
{CONFIG-FOLDER-NAME}/progman/
example: /my-app-config/progman/
Within the deepest folder ('/progman/'), place a file named 'pm-client-security.properties' with the following contents:
#security props
oauth.access.url={the URL of OAuth2 access token provider}
pm.oauth.client.id={Client ID for program management client, can be shared amongst all client users or application/consumer specific values}
pm.oauth.client.secret={Password for program management client, can be shared amongst all client users or application/consumer specific values}
pm.oauth.batch.account={OAuth Client id configured in OAM to allow get an OAuth token for the ‘batch' web service call to program management(for loading configs during start up)}
pm.oauth.batch.password={OAuth Client secret/password configured in OAM to allow get an OAuth token for the ‘batch' web service call to program management(for loading configs during start up)}
oauth.testreg.client.id={OAuth test client ID for test registration}
oauth.testreg.client.secret={OAuth client secret for test registration}
oauth.testreg.client.granttype={OAuth grant type for test registration}
oauth.testreg.username={OAuth username for test registration}
oauth.testreg.password={OAuth password for test registration}
working example:
oauth.access.url=https://drc-dev-secure.opentestsystem.org/auth/oauth2/access_token?realm=/sbac
pm.oauth.client.id=pm
pm.oauth.client.secret=OAUTHCLIENTSECRET
pm.oauth.batch.account=test@example.com
pm.oauth.batch.password=<password>
oauth.testreg.client.id=testreg
oauth.testreg.client.secret=<secret>
oauth.testreg.client.granttype=password
oauth.testreg.username=testreg@example.org
oauth.testreg.password=<password>
Add environment variable -DSB11_CONFIG_DIR to application server startup as shown in Tomcat (Run Configuration).
Like other SBAC applications, Student must be set up with active profiles and program management settings.
-Dspring.profiles.active- Active profiles should be comma separated. Typical profiles for the-Dspring.profiles.activeinclude:progman.client.impl.integration- Use the integrated program managementprogman.client.impl.null- Use the program management null implementationmna.client.integration- Use the integrated MnA componentmna.client.null- Use the null MnA component
-Dprogman.baseUri- This URI is the base URI where the Program Management REST module is deployed.-Dprogman.locator- The locator variable describes which combinations of name and environment (with optional overlay) should be loaded from Program Management. For example:"component1-urls,dev"would look up the name component1-urls for the dev environment at the configured REST endpoint. Multiple lookups can be performed by using a semicolon to delimit the pairs (or triplets with overlay):"component1-urls,dev;component1-other,dev"-DSB11_CONFIG_DIR- Locator string needed to find the Student properties to load.-Djavax.net.ssl.trustStore- Location of .jks file which contains security certificates for SSO, Program Management and Permissions URL specified inside baseuri and Program Management configuration.-Djavax.net.ssl.trustStorePassword- Password string for the keystore.jks file.
Example:
-Dspring.profiles.active="progman.client.impl.integration,mna.client.integration"
-Dprogman.baseUri=http://<program-management-url>/programmanagement.rest/
-Dprogman.locator="Student,local"
-DSB11_CONFIG_DIR=<CONFIG-FOLDER-NAME>
-Djavax.net.ssl.trustStore="<filesystem_dir>/saml_keystore.jks"
-Djavax.net.ssl.trustStorePassword="xxxxxx"
- Add the
vvtmime type to Tomcat’s web.xml file for the student site. This enables support for closed-captioning.
Program Management properties need to be set for running Student. Example Student properties at /Documents/Installation/student-progman-config.txt
Following parameters need to be configured inside program management for database.
datasource.url=jdbc:mysql://localhost:3306/schemaname- The JDBC URL of the database from which Connections can and should be acquired.datasource.username=<db-username>- Username that will be used for the DataSource's default getConnection() method.encrypt:datasource.password=<db-password>- Password that will be used for the DataSource's default getConnection() method.datasource.driverClassName=com.mysql.jdbc.Driver- The fully-qualified class name of the JDBC driverClass that is expected to provide Connectionsdatasource.minPoolSize=5- Minimum number of Connections a pool will maintain at any given time.datasource.acquireIncrement=5- Determines how many connections at a time datasource will try to acquire when the pool is exhausted.datasource.maxPoolSize=20- Maximum number of Connections a pool will maintain at any given time.datasource.checkoutTimeout=60000- The number of milliseconds a client calling getConnection() will wait for a Connection to be checked-in or acquired when the pool is exhausted. Zero means wait indefinitely. Setting any positive value will cause the getConnection() call to timeout and break with an SQLException after the specified number of milliseconds.datasource.maxConnectionAge=0- Seconds, effectively a time to live. A Connection older than maxConnectionAge will be destroyed and purged from the pool. This differs from maxIdleTime in that it refers to absolute age. Even a Connection which has not been much idle will be purged from the pool if it exceeds maxConnectionAge. Zero means no maximum absolute age is enforced.datasource.acquireRetryAttempts=5- Defines how many times datasource will try to acquire a new Connection from the database before giving up. If this value is less than or equal to zero, datasource will keep trying to fetch a Connection indefinitely.
The following parameters need to be configured inside program management for MNA.
mna.mnaUrl=http://<mna-context-url>/mna-rest/- URL of the Monitoring and Alerting client server's rest URL.mnaServerName=student_dev- Used by the mna clients to identify which server is sending the log/metrics/alerts.mnaNodeName=dev- Used by the mna clients to identify who is sending the log/metrics/alerts. There is a discrete mnaServerName and a node in case say XXX for server name & node1/node2 in a clustered environment giving the ability to search across clustered nodes by server name or specifically for a given node. It’s being stored in the db for metric/log/alert, but not displayed.mna.logger.level=ERROR- Used to control what is logged to the Monitoring and Alerting system. The logging levels are ALL - Turn on all logging levels, TRACE, DEBUG, INFO, WARN, ERROR, OFF - Turn off logging.
The following parameters need to be configured inside Program Management for Student.
student.IsCheckinSite=falsestudent.DONOT_Distributed=truestudent.ClientName=SBAC_PTstudent.StateCode=SBAC_PTstudent.ClientQueryString=truestudent.ClientCookie=true- If it is turned on, Student will try to get clientname from cookiestudent.Appkey=Studentstudent.RecordSystemClient=truestudent.AppName=Student- Application namestudent.SessionType=0- Type of the testing supported: 0 is online, 1 is paper-basedstudent.TestRegistrationApplicationUrl=http://localhost:8083/- URL to TR(ART) Applicationstudent.TDSArchiveDBName=archive- Name of the archive schemastudent.TDSSessionDBName=session- Name of the session schemastudent.TDSConfigsDBName=configs- Name of the config schemastudent.ItembankDBName=itembank- Name of the itembank schemastudent.Debug.AllowFTP=trueEncryptionKey=testKey123456789123456789- Encryption key is used for encrypting the cookies and item file path. There is no default value set for this property. It must be set in program management. Minimum length of this key is 24 characters.opportunity.isScoredByTDS=false- Set to false always. ScoreByTDS is not implemented yet and needs to be set false.tds.testshell.dictionaryUrl=http://<host>/Dictionary- URL for the Dictionary project deployment.
The following parameters need to be configured inside Program Management for Student Itemscoring.
itemscoring.qti.sympyServiceUrl=http://localhost:8084/- URL for Python ItemscoringEngineitemscoring.qti.sympyMaxTries=3- Maximum number of tries for Python ItemscoringEngineitemscoring.qti.sympyTimeoutMillis=10000- Timeout for Python ItemscoringEngineitemScoring.callbackUrl=http://localhost:8080/student/ItemScoringCallback.axd- Itemscoring callback url
performance.datasource.minPoolSize=5- Minimum pool size for the January release codeperformance.datasource.maxPoolSize=20- Maximum pool size for the January release codeperformance.logMaxTestOpportunities.enabled=false- Enable the tracking of the maximum test opportunities active at a given timeperformance.logLatency.enabled=false- Enable the logging of DB latencies from the code for debugging/tracking performance
Certain configuration and test metadata is now cached for a limited amount of time on the web server. It is enabled by default and provides the following caching buckets:
- Short Term: 20 seconds
- Medium Term: 10 minutes
- Long Term: 2 hours
These values can be changed in the resources\ehcache.xml if needed.
In order to disable caching you will need to make the following changes to resources\performance-context.xml:
- Comment out this line:
<cache:annotation-driven key-generator="cacheKeyGenerator" /> - Change the enabled property to
falsein thecachingServicebean
The diagnostic API is available via the /status endpoint. Most commonly that would mean https://url.com/student/status.
There are 5 different levels of details provided depending on what is passed in via the level querystring parameter like status?level=1. The levels are defined below:
- Local system details such as CPU usage, memory usage and free storage space
- Configuration details for the local java environment settings and ProgMan settings
- Database read access checks to each of the 4 databases used in TDS
- Database write access checks to each of the 4 databases used in TDS
- Component dependency checks for access to ART, ProgMan, TIS, Equation Scorer and the Student Report Processor.
The Diagnostic API has a few settings which can adjusted via ProgMan. Logical defaults are provided for each so there is no need to enter them usually. The default values are provided below.
diagnostic.enabled: true- Disable access to the API by setting tofalsediagnostic.volume.minimumPercentFree: 5- When the percent free space on disk is less than this value an error state is returned.diagnostic.volume.warningPercentFree: 15- A warning state is returned when the percent available disk space is below this value.
These are the steps that should be taken in order to build all of the Student-related artifacts:
- Tomcat 6 or higher
- Maven (mvn) version 3.X or higher installed
- Java 7
- Access to SharedMultiJarDev repository
- Access to ResourceBundler repository
- Access to ItemRendererDev repository
- Access to TDSDLLDev repository
- Access to ItemScoringDev repository
- Access to TDSLoadTester repository
- Access to TestScoringDev repository
- Access to SpellCheckEngine repository
- Access to sb11-shared-build repository
- Access to sb11-shared-code repository
- Access to sb11-security repository
- Access to sb11-rest-api-generator repository
- Access to sb11-program-management repository
- Access to sb11-monitoring-alerting-client repository
If building all components from scratch the following build order is needed:
- SharedMultiJarDev
- ResourceBundler
- ItemRendererDev
- TDSDLLDev
- ItemScoringDev
- TDSLoadTester
- TestScoringDev
- SpellCheckEngine
- SharedBuild
- SharedCode
- RESTApiGenerator
- MonitorindAndAlertingClient
- ProgramManagementClient
- StudentDev
Student has a number of direct dependencies that are necessary for it to function. These dependencies are already built into the Maven POM files.
- shared-master
- shared-web
- shared-tr-api
- shared-threading
- shared-test
- tds-dll-api
- tds-dll-mssql
- item-renderer
- ResourceBundler
- tds-itemselection-common
- tds-itemselection-aironline
- item-scoring-api
- item-scoring-engine
- testscoring
- spellcheck
- httpcore
- prog-mgmnt-client
- prog-mgmnt-client-null-impl
- monitoring-alerting.client-null-impl
- monitoring-alerting.client
- sb11-shared-code
- commons-primitives
- commons-collections
- commons-lang
- commons-configuration
- commons-digester
- javax.inject
- servlet-api
- jsp-api
- HikariCP
- junit
- c3p0
- Servlet API
- Persistence API