2222// CONFIGURE THE RELEVANT PROPERTIES IN THE CONFIG OBJECT
2323// ***********************************************************
2424
25+ if ( typeof STUDENT_ID == 'undefined' ) {
26+ STUDENT_ID = null ;
27+ }
28+
2529var config = {
2630 // Your NUSSTU ID, such as a0012345
27- student_id : prompt ( 'Your NUSSTU ID, such as a0012345' ) ,
31+ student_id : STUDENT_ID ,
2832 // Module you are claiming hours for, such as CS1101S
2933 module : 'CS3216' ,
3034 // Format: YYYY/MM/DD
3135 // Note: Month is from 0-11, Date is from 1-31
3236 // This should be the semester's week 1. For AY15/16 Sem 1, it's Monday, Aug 10
33- first_day_of_sem : new Date ( 2015 , 7 , 10 ) ,
37+ first_day_of_sem : new Date ( 2016 , 7 , 8 ) ,
3438 // In case you want to customize the duties field for each activity
3539 // Do not modify the keys
3640 duties : {
@@ -43,7 +47,7 @@ var config = {
4347 activities_list_fn : function ( ) {
4448 var activities_list = [ ] ;
4549
46- // 2015 : 24 hours of assignment marking!
50+ // 2016 : 24 hours of assignment marking and 6 hours of course material preparation !
4751
4852 for ( var week = 4 ; week <= 10 ; week += 2 ) {
4953 activities_list . push ( {
@@ -61,6 +65,14 @@ var config = {
6165 end_time : '1900'
6266 } ) ;
6367 }
68+
69+ activities_list . push ( {
70+ activity_type : Claim . COURSE_MATERIAL_PREPARATION , // Now called "Course Material Creation".
71+ week : 1 ,
72+ day : 'MONDAY' ,
73+ start_time : '0900' ,
74+ end_time : '1500'
75+ } ) ;
6476
6577 return activities_list ;
6678 }
@@ -70,15 +82,19 @@ var config = {
7082// DO NOT CHANGE THE BOTTOM UNLESS YOU KNOW WHAT YOU ARE DOING
7183// ***********************************************************
7284
73- var core_script = 'https://rawgit.com/nusmodifications/nus-scripts/master/claims/claim.js' ;
74- var c = undefined ;
75- $ . getScript ( core_script )
76- . done ( function ( ) {
77- c = new Claim ( config ) ;
78- } )
79- . fail ( function ( jqxhr , settings , exception ) {
80- console . warn ( 'Error loading script' ) ;
81- console . warn ( jqxhr ) ;
82- console . warn ( exception ) ;
83- } ) ;
84- // c.makeAllClaims();
85+ if ( ! STUDENT_ID ) { // Chrome does not allow window.prompt() to run on an inactive tab.
86+ alert ( 'Please modify STUDENT_ID in the code, or run STUDENT_ID="a0123456" before pasting and running the code.' ) ;
87+ } else {
88+ var core_script = 'https://rawgit.com/nusmodifications/nus-scripts/master/claims/claim.js' ;
89+ var c = undefined ;
90+ $ . getScript ( core_script )
91+ . done ( function ( ) {
92+ c = new Claim ( config ) ;
93+ } )
94+ . fail ( function ( jqxhr , settings , exception ) {
95+ console . warn ( 'Error loading script' ) ;
96+ console . warn ( jqxhr ) ;
97+ console . warn ( exception ) ;
98+ } ) ;
99+ // c.makeAllClaims(); // Run this after successful pasting of code! :)
100+ }
0 commit comments