-
Notifications
You must be signed in to change notification settings - Fork 32
Update CS3216 script #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,15 +22,19 @@ | |
| // CONFIGURE THE RELEVANT PROPERTIES IN THE CONFIG OBJECT | ||
| // *********************************************************** | ||
|
|
||
| if (typeof STUDENT_ID == 'undefined') { | ||
| STUDENT_ID = null; | ||
| } | ||
|
|
||
| var config = { | ||
| // Your NUSSTU ID, such as a0012345 | ||
| student_id: prompt('Your NUSSTU ID, such as a0012345'), | ||
| student_id: STUDENT_ID, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. argh extra space |
||
| // Module you are claiming hours for, such as CS1101S | ||
| module: 'CS3216', | ||
| // Format: YYYY/MM/DD | ||
| // Note: Month is from 0-11, Date is from 1-31 | ||
| // This should be the semester's week 1. For AY15/16 Sem 1, it's Monday, Aug 10 | ||
| first_day_of_sem: new Date(2015, 7, 10), | ||
| first_day_of_sem: new Date(2016, 7, 8), | ||
| // In case you want to customize the duties field for each activity | ||
| // Do not modify the keys | ||
| duties: { | ||
|
|
@@ -43,7 +47,7 @@ var config = { | |
| activities_list_fn: function () { | ||
| var activities_list = []; | ||
|
|
||
| // 2015: 24 hours of assignment marking! | ||
| // 2016: 24 hours of assignment marking and 6 hours of course material preparation! | ||
|
|
||
| for (var week = 4; week <= 10; week+=2) { | ||
| activities_list.push({ | ||
|
|
@@ -61,6 +65,14 @@ var config = { | |
| end_time: '1900' | ||
| }); | ||
| } | ||
|
|
||
| activities_list.push({ | ||
| activity_type: Claim.COURSE_MATERIAL_PREPARATION, // Now called "Course Material Creation". | ||
| week: 1, | ||
| day: 'MONDAY', | ||
| start_time: '0900', | ||
| end_time: '1500' | ||
| }); | ||
|
|
||
| return activities_list; | ||
| } | ||
|
|
@@ -70,15 +82,19 @@ var config = { | |
| // DO NOT CHANGE THE BOTTOM UNLESS YOU KNOW WHAT YOU ARE DOING | ||
| // *********************************************************** | ||
|
|
||
| var core_script = 'https://rawgit.com/nusmodifications/nus-scripts/master/claims/claim.js'; | ||
| var c = undefined; | ||
| $.getScript(core_script) | ||
| .done(function () { | ||
| c = new Claim(config); | ||
| }) | ||
| .fail(function (jqxhr, settings, exception ) { | ||
| console.warn('Error loading script'); | ||
| console.warn(jqxhr); | ||
| console.warn(exception); | ||
| }); | ||
| // c.makeAllClaims(); | ||
| if (!STUDENT_ID) { // Chrome does not allow window.prompt() to run on an inactive tab. | ||
| alert('Please modify STUDENT_ID in the code, or run STUDENT_ID="a0123456" before pasting and running the code.'); | ||
| } else { | ||
| var core_script = 'https://rawgit.com/nusmodifications/nus-scripts/master/claims/claim.js'; | ||
| var c = undefined; | ||
| $.getScript(core_script) | ||
| .done(function () { | ||
| c = new Claim(config); | ||
| }) | ||
| .fail(function (jqxhr, settings, exception ) { | ||
| console.warn('Error loading script'); | ||
| console.warn(jqxhr); | ||
| console.warn(exception); | ||
| }); | ||
| // c.makeAllClaims(); // Run this after successful pasting of code! :) | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
declare
STUDENT_IDbefore this lineUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!STUDENT_ID)will do