To answer your question on the impact of Indian Independence movement in obtaining Indian Independence, we need to look on both British and the Indian sides simultaneously.
Indian scenario before WW1:
India's fight to self rule began from the time of English East India company initially in South India by Puli Thevar, Pazhasi Raja(Pychy Raja), Veerapandiya Kattabomman followed by the Sepoy Mutiny at Vellore that caught the crown's attention marking the start of British Raj. Initial radical fighters(extremists) such as Lala Lajpat Rai, Bala Gangadhara Tilak, Bipin Chandra Pal(Lal Bal Pal); moderates Gopala Krishna Gokhale, Dadabhai Naoroji; the Indian National Congress and several other socio-religious groups strived for Independence before WW1.
British Scenario before WW1: Ref1
Britain was one of Europe's most prosperous countries, conquered other nations for trade and abundant raw materials to fuel its progress in industrial production. The crown resorted to policies to deal with the colonies (Partition of Bengal), few were unsuccessful and lead to wars(Boer war) that taught Britain a costly lesson to improve their army and colonial policies.
Indian Scenario during WW1:
Britain was stumped with the overwhelming response Indians gave in support of Britain during WW1. Though the incentives to the volunteers would bring the families of soldiers out of poverty, I still wonder how so many people volunteered to support them in WW1(see here). There are several claims stating it was an attempt to prove Indians were capable of self-rule and fell right into the crown's deceit.
British Scenario during and after WW1:
Britain suffered from heavy war casualties, couldn't afford to fight another WW due to its weakened economic state and the damage incurred post war. Britain efficiently utilised the Indian Army from WW1 to fight wars in its Indo-Afghan border until the next WW. Ref2 The British policy makers managed to convince Indians by allocating posts in all Government bodies through the Minto-Morley reforms. There were several revolts from Indians, but they were effectively contained and controlled by the British forces that also contained Indians.
British Raj in India declared entry into WW2 in support of the crown without consent from majority of National leaders(Ref3), Subhas Chandra Bose formed the Indian National Army(INA) uniting military strength across and outside India against British, this was a major hiccup and they were effectively dealt when Japan was crushed by USA.
The final breakdown of Imperial Britain in India took place due to coordinated factors of economic weakening and lack of reliable man power to control the colonies. Do read this article by Dr. Susmit Kumar explaining an alternate of the canonical view prevalent in India. Quoting his source:
It was British prime minister Clement Atlee who, when granting
independence to India, said that Gandhi’s non-violence movement had
next to zero effect on the British. In corroboration, Chief Justice
P.B. Chakrabarty of the Kolkata High Court, who had earlier served as
acting governor of West Bengal, disclosed the following in a letter
addressed to the publisher of Ramesh Chandra Majumdar’s book A History
You have fulfilled a noble task by persuading Dr. Majumdar to write
this history of Bengal and publishing it … In the preface of the book
Dr. Majumdar has written that he could not accept the thesis that
Indian independence was brought about solely, or predominantly by the
non-violent civil disobedience movement of Gandhi. When I was the
acting Governor, Lord Atlee, who had given us independence by
withdrawing the British rule from India, spent two days in the
Governor’s palace at Calcutta during his tour of India. At that time I
had a prolonged discussion with him regarding the real factors that
had led the British to quit India. My direct question to him was that
since Gandhi’s “Quit India” movement had tapered off quite some time
ago and in 1947 no such new compelling situation had arisen that would
necessitate a hasty British departure, why did they have to leave? In
his reply Atlee cited several reasons, the principal among them being
the erosion of loyalty to the British Crown among the Indian army and
navy personnel as a result of the military activities of Netaji
[Subhash Chandra Bose]. Toward the end of our discussion I asked Atlee
what was the extent of Gandhi’s influence upon the British decision to
quit India. Hearing this question, Atlee's lips became twisted in a
sarcastic smile as he slowly chewed out the word, “m-i-n-i-m-a-l!”
The question of loyalty to crown raised in their minds due to the Royal Indian Navy mutiny, 1946, that propogated across the coastal cities of India due to ill treatment of sepoys by officers.
With this background information, my answer your question if Indian Independence movement was a major factor is NO. They(Britain) have faced all kinds of threat posed by Indians during 1940s and yet they managed to maintain their supremacy in India. Their weakened economic state put them in a state obliged to US which was against colonialism, lack of reliable man power questioned their control over Indian rebels, threat from Burma occupied Japan, there was a risk of civil war(partition clashes) in India that hastened the grant of freedom from 1948 to 1947.
To be noted, Independence of several other colonies was granted around the same time(late 1940s to early 1950s)! Coincidence?